:root {
  --bg: #06080d;
  --bg-deep: #020307;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-strong: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.12);
  --text: #f4f2ed;
  --muted: #b3b8c1;
  --muted-strong: #d3d8e0;
  --accent: #d4a95f;
  --accent-strong: #f0c983;
  --good: #90d8ad;
  --warn: #f1cb86;
  --bad: #e78f89;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
  --radius: 24px;
  --max: 1180px;
  --mono: "Consolas", "SFMono-Regular", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(212, 169, 95, 0.18), transparent 24%),
    radial-gradient(circle at bottom left, rgba(99, 132, 182, 0.15), transparent 28%),
    linear-gradient(180deg, var(--bg), var(--bg-deep));
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.portal-shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 20px 72px;
}

.portal-header,
.hero,
.card,
.asset-item {
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.quick-access-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.tab-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tab-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted-strong);
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.tab-pill:hover {
  transform: translateY(-1px);
}

.tab-pill.is-active {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #101114;
  border-color: rgba(240, 201, 131, 0.84);
}

.workspace-detail-toggle {
  margin-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 14px;
}

.workspace-detail-toggle summary {
  cursor: pointer;
  color: var(--muted-strong);
  font-weight: 600;
  list-style: none;
}

.workspace-detail-toggle summary::-webkit-details-marker {
  display: none;
}

.workspace-detail-toggle[open] summary {
  margin-bottom: 10px;
}

.portal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(7, 11, 16, 0.82);
  backdrop-filter: blur(10px);
}

.brand-block {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 30%, rgba(255, 241, 216, 0.94), transparent 36%),
    radial-gradient(circle at 72% 74%, rgba(212, 169, 95, 0.86), transparent 56%),
    #0f151d;
}

.brand-copy strong,
.brand-copy span {
  display: block;
}

.brand-copy strong {
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.92rem;
}

.portal-nav,
.hero-actions,
.section-actions,
.cta-row,
.project-meta,
.detail-meta,
.tag-row,
.asset-actions,
.stat-row,
.asset-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nav-pill,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.nav-pill:hover,
.btn:hover {
  transform: translateY(-1px);
}

.nav-pill.is-active,
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #101114;
  border-color: rgba(240, 201, 131, 0.84);
}

.nav-pill:not(.is-active),
.btn-secondary,
.btn-tertiary {
  background: rgba(255, 255, 255, 0.04);
}

.btn-tertiary {
  color: var(--muted);
  cursor: pointer;
}

.btn-tertiary.is-active {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #101114;
  border-color: rgba(240, 201, 131, 0.84);
}

.hero {
  margin-top: 26px;
  padding: 38px 30px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.05), transparent 34%),
    linear-gradient(145deg, rgba(9, 14, 23, 0.96), rgba(13, 17, 25, 0.92));
}

.hero-client {
  position: relative;
  overflow: hidden;
}

.hero-client::after {
  content: "";
  position: absolute;
  inset: auto -12% -36% auto;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 169, 95, 0.22), transparent 65%);
  pointer-events: none;
}

.hero-admin {
  background:
    radial-gradient(circle at top left, rgba(110, 153, 212, 0.12), transparent 32%),
    linear-gradient(145deg, rgba(10, 15, 23, 0.96), rgba(12, 17, 28, 0.92));
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
}

.hero h1,
.section-head h2,
.card h2,
.card h3,
.asset-item strong {
  margin: 0 0 12px;
  line-height: 1.06;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.4rem);
}

.section-head h2,
.card h2 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
}

.card h3 {
  font-size: 1.2rem;
}

.lede,
.hero p,
.card p,
.footer-note,
.lookup-status,
.unlock-note {
  color: var(--muted);
  line-height: 1.7;
}

.section {
  margin-top: 28px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 18px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.card {
  grid-column: span 12;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--panel);
}

.grid-3 .card {
  grid-column: span 4;
}

.grid-2 .card {
  grid-column: span 6;
}

.portal-split .card {
  min-height: 100%;
}

.workspace-overview-card {
  display: grid;
  gap: 18px;
}

.workspace-overview-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
}

.workspace-stat-row .stat {
  min-width: 0;
}

.workspace-stat-row strong {
  word-break: break-word;
}

.workspace-panel {
  display: none;
}

.workspace-panel.is-active {
  display: block;
}

.workspace-stack {
  display: grid;
  gap: 18px;
}

.workspace-message-grid {
  align-items: start;
}

.workspace-message-stack {
  display: grid;
  gap: 14px;
}

.stat-row {
  margin-top: 20px;
}

.stat {
  flex: 1 1 210px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.stat strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.45rem;
}

.status-pill,
.tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.9rem;
}

.status-good {
  color: var(--good);
}

.status-warn {
  color: var(--warn);
}

.status-bad {
  color: var(--bad);
}

.tag-client {
  color: var(--muted-strong);
}

.tag-internal,
.tag-locked {
  color: var(--accent-strong);
}

.project-card,
.admin-project-card,
.info-card,
.support-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 18px;
}

.detail-sidebar {
  display: grid;
  gap: 18px;
}

.info-list,
.checklist {
  margin: 0;
  padding: 0;
  list-style: none;
}

.info-list li,
.checklist li {
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.info-list li:first-child,
.checklist li:first-child {
  border-top: 0;
  padding-top: 0;
}

.lookup-card {
  position: relative;
  overflow: hidden;
}

.lookup-card::after {
  content: "";
  position: absolute;
  inset: auto auto -90px -80px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(110, 153, 212, 0.16), transparent 70%);
  pointer-events: none;
}

.lookup-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.lookup-field {
  display: grid;
  gap: 8px;
}

.lookup-field span {
  font-size: 0.92rem;
  color: var(--muted-strong);
}

.lookup-field input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.lookup-field input:focus {
  outline: none;
  border-color: rgba(240, 201, 131, 0.8);
}

.field-grid {
  display: grid;
  gap: 14px;
}

.field-grid.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 0.92rem;
  color: var(--muted-strong);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(240, 201, 131, 0.8);
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.status-banner {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted-strong);
  line-height: 1.55;
}

.status-banner.is-success {
  border-color: rgba(144, 216, 173, 0.34);
  color: var(--good);
}

.status-banner.is-error {
  border-color: rgba(231, 143, 137, 0.34);
  color: var(--bad);
}

.status-banner.is-warn {
  border-color: rgba(241, 203, 134, 0.34);
  color: var(--warn);
}

.upload-list {
  display: grid;
  gap: 12px;
}

.upload-item {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.upload-item .top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 8px;
}

.upload-item strong {
  display: block;
  margin-bottom: 4px;
}

.upload-empty {
  padding: 16px 0;
  color: var(--muted);
  line-height: 1.6;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.86rem;
}

.status-chip.ok {
  color: var(--good);
}

.status-chip.warn {
  color: var(--warn);
}

.status-chip.error {
  color: var(--bad);
}

.asset-table {
  display: grid;
  gap: 14px;
}

.asset-item {
  position: relative;
  padding: 20px;
  border-radius: 18px;
  background: var(--panel-strong);
  overflow: hidden;
}

.asset-item.is-locked {
  border-color: rgba(240, 201, 131, 0.22);
}

.admin-list-card {
  min-height: 100%;
}

.asset-item-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
  margin-bottom: 10px;
}

.asset-item strong {
  display: block;
  margin-bottom: 6px;
}

.mono {
  font-family: var(--mono);
  font-size: 0.92rem;
  word-break: break-all;
}

.watermark-overlay {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%) rotate(-16deg);
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid rgba(240, 201, 131, 0.4);
  background: rgba(4, 7, 12, 0.72);
  color: rgba(240, 201, 131, 0.85);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  pointer-events: none;
}

.managed-preview-card {
  display: grid;
  gap: 16px;
}

.managed-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}

.managed-preview-head h3 {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
}

.managed-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.managed-preview-note {
  margin: 0;
}

.managed-preview-frame {
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(7, 10, 16, 0.96), rgba(4, 6, 11, 0.98));
}

.managed-preview-video {
  display: block;
  width: 100%;
  max-height: min(72vh, 820px);
  background: #010203;
}

.list-stack {
  display: grid;
  gap: 10px;
}

.list-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.list-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.list-primary {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.45;
}

.list-secondary {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.list-metric {
  color: var(--muted-strong);
  font-size: 0.9rem;
  white-space: nowrap;
  text-align: right;
  line-height: 1.6;
}

.list-actions {
  display: flex;
  align-items: center;
}

.empty-state {
  padding: 16px 0;
  color: var(--muted);
  line-height: 1.6;
}

.footer-note {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.94rem;
}

@media (max-width: 980px) {
  .grid-3 .card,
  .grid-2 .card {
    grid-column: span 12;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .portal-header,
  .section-head,
  .asset-item-top,
  .managed-preview-head,
  .workspace-overview-head {
    flex-direction: column;
    align-items: start;
  }

  .hero {
    padding: 30px 22px;
  }

  .nav-pill,
  .btn,
  .tab-pill {
    width: 100%;
  }

  .quick-access-strip .btn {
    width: 100%;
  }

  .list-row {
    flex-direction: column;
  }

  .list-metric {
    text-align: left;
    white-space: normal;
  }
}
