/* Director console layout - structural layer loaded after premium.css. */

:root {
  --director-rail: 96px;
  --director-offset: 116px;
  --director-panel: rgba(10, 13, 11, 0.94);
  --director-line: rgba(145, 174, 156, 0.2);
  --director-mint: #74efb4;
  --director-ice: #92dcff;
  --director-gold: #efc86f;
}

body:not(.landing-page):not(.auth-page) {
  background-color: #050706;
  background-image:
    linear-gradient(115deg, rgba(146, 220, 255, 0.025), transparent 24%),
    linear-gradient(rgba(150, 177, 160, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150, 177, 160, 0.028) 1px, transparent 1px);
  background-size: auto, 48px 48px, 48px 48px;
}

/* Compact director rail */
.sidebar {
  width: var(--director-rail);
  top: 10px;
  bottom: 10px;
  left: 10px;
  background: rgba(8, 11, 9, 0.96);
  border-color: rgba(146, 176, 157, 0.22);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.sidebar::after {
  content: "";
  position: absolute;
  top: 82px;
  right: -1px;
  width: 1px;
  height: 76px;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--director-ice), var(--director-mint), transparent);
  box-shadow: 0 0 18px rgba(116, 239, 180, 0.28);
  animation: director-rail-scan 5.8s ease-in-out infinite;
}

.sidebar-logo {
  min-height: 82px;
  padding: 12px 8px;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
}

.sidebar-logo .logo-icon { width: 38px; height: 38px; border-radius: 8px; }
.sidebar-logo .logo-text { font-size: 10px; line-height: 1; white-space: nowrap; }
.sidebar-nav { padding: 12px 7px; }
.nav-section { margin-bottom: 9px; }
.nav-section-title {
  position: relative;
  height: 12px;
  margin: 0;
  padding: 0;
  color: transparent;
  font-size: 0;
}
.nav-section-title::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 16px;
  left: 16px;
  height: 1px;
  background: rgba(145, 174, 156, 0.16);
}

.nav-item {
  min-height: 52px;
  margin: 3px 0;
  padding: 6px 3px;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  color: #7f8b84;
  border-radius: 7px;
  font-size: 10px;
  line-height: 1.15;
  text-align: center;
}
.nav-item .nav-icon { display: grid; place-items: center; width: 20px; height: 20px; }
.nav-item .nav-icon svg { width: 18px; height: 18px; }
.nav-item::after { inset: auto 22px 3px; }
.nav-item:hover { transform: none; }
.nav-item.active {
  background: linear-gradient(145deg, rgba(116, 239, 180, 0.16), rgba(146, 220, 255, 0.045));
  border-color: rgba(116, 239, 180, 0.26);
  box-shadow: inset 0 -2px 0 rgba(116, 239, 180, 0.85), 0 0 24px rgba(116, 239, 180, 0.06);
}

.sidebar-footer { padding: 8px; }
.sidebar-footer .user-info { min-height: 48px; padding: 5px; justify-content: center; }
.sidebar-footer .user-info > div:not(.user-avatar) { display: none; }
.sidebar-footer .user-avatar { width: 34px; height: 34px; margin: 0; }

.main-content { margin-left: var(--director-offset); }
.main-content::after { left: var(--director-offset); opacity: 0.45; }

/* Floating command header */
.page-header {
  top: 10px;
  min-height: 74px;
  margin: 10px 16px 0;
  padding: 14px 18px;
  overflow: hidden;
  background: rgba(8, 11, 9, 0.86);
  border: 1px solid rgba(146, 176, 157, 0.2);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}
.page-header::after {
  right: 18px;
  left: 18px;
  background: linear-gradient(90deg, var(--director-mint), var(--director-ice) 24%, transparent 60%);
}
.page-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 19px;
  font-weight: 760;
}
.page-title::before {
  content: "";
  width: 3px;
  height: 22px;
  flex: 0 0 auto;
  background: linear-gradient(to bottom, var(--director-ice), var(--director-mint));
  box-shadow: 0 0 14px rgba(116, 239, 180, 0.35);
}
.page-title i[data-lucide] { width: 17px !important; height: 17px !important; }
.page-subtitle { margin-top: 2px; padding-left: 10px; }
.page-body { padding: 22px 24px 44px; }

/* Instrument surfaces */
.card,
.pricing-card,
.chart-container,
.table-container {
  border-radius: 8px 0 8px 8px;
  background:
    linear-gradient(90deg, rgba(146, 220, 255, 0.14), transparent 38%) top left / 100% 1px no-repeat,
    linear-gradient(145deg, rgba(18, 23, 19, 0.98), rgba(8, 11, 9, 0.98));
  border-color: rgba(145, 174, 156, 0.2);
}
.card:hover { border-color: rgba(146, 220, 255, 0.32); }
.card-title { display: flex; align-items: center; gap: 7px; font-size: 13px; }

/* Asymmetric dashboard */
.dashboard-stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 32px;
}
.dashboard-stats .stat-card { min-height: 122px; border-radius: 8px 0 8px 8px; }
.dashboard-stats .stat-card:first-child {
  grid-column: span 2;
  min-height: 138px;
  padding: 22px;
  background:
    linear-gradient(110deg, rgba(239, 200, 111, 0.12), transparent 42%),
    linear-gradient(145deg, rgba(21, 26, 22, 0.98), rgba(8, 11, 9, 0.98)) !important;
}
.dashboard-stats .stat-card:first-child .stat-value { font-size: 40px; }
.dashboard-stats .stat-card:first-child .stat-icon { width: 50px; height: 50px; }
.dashboard-grid { grid-template-columns: minmax(0, 1fr) 310px; gap: 38px; }
.dashboard-rail { position: sticky; top: 104px; align-self: start; }
.dashboard-section-header { padding-bottom: 11px; }
.dashboard-section-title { font-size: 13px; }
.quick-actions { gap: 0; }
.quick-action {
  min-height: 62px;
  border-width: 0 0 1px;
  border-color: rgba(145, 174, 156, 0.12);
  border-radius: 0;
}
.quick-action:hover { transform: translateX(5px); border-color: rgba(116, 239, 180, 0.24); }

/* Canvas-first generation workspace */
.gen-layout { grid-template-columns: 330px minmax(0, 1fr) !important; gap: 14px; }
.gen-panel {
  top: 100px !important;
  max-height: calc(100vh - 116px) !important;
}
.gen-panel > .card {
  border-left: 2px solid rgba(116, 239, 180, 0.62);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.31), -10px 0 34px rgba(116, 239, 180, 0.035);
}
.gen-result > .card:first-child {
  min-height: 620px !important;
  background-color: rgba(7, 10, 8, 0.96);
  background-image:
    linear-gradient(rgba(146, 220, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(146, 220, 255, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  border-color: rgba(146, 220, 255, 0.24);
}
.gen-result > .card:first-child::before {
  background:
    linear-gradient(var(--director-ice), var(--director-ice)) left 16px top 16px / 34px 1px no-repeat,
    linear-gradient(var(--director-ice), var(--director-ice)) left 16px top 16px / 1px 34px no-repeat,
    linear-gradient(var(--director-mint), var(--director-mint)) right 16px bottom 16px / 34px 1px no-repeat,
    linear-gradient(var(--director-mint), var(--director-mint)) right 16px bottom 16px / 1px 34px no-repeat;
  box-shadow: inset 0 0 80px rgba(146, 220, 255, 0.025);
}
.gen-action-bar { border-top-color: rgba(116, 239, 180, 0.22); }
.history-card { border-radius: 7px 0 7px 7px !important; }

/* Dense operational views */
.tab-bar,
.admin-tabs {
  padding: 3px;
  background: rgba(6, 9, 7, 0.8);
  border: 1px solid rgba(145, 174, 156, 0.18);
  border-radius: 7px;
}
.tab-btn { border-radius: 5px; }
.tab-btn.active {
  background: linear-gradient(145deg, rgba(116, 239, 180, 0.13), rgba(146, 220, 255, 0.04));
  box-shadow: inset 0 -1px 0 rgba(116, 239, 180, 0.7);
}
table th { height: 46px; font-size: 10px; }
table tbody tr:hover { background: linear-gradient(90deg, rgba(116, 239, 180, 0.045), transparent 74%); }
.pricing-card:nth-of-type(3n + 1) { border-left: 2px solid rgba(116, 239, 180, 0.55); }
.pricing-card:nth-of-type(3n + 2) { border-left: 2px solid rgba(146, 220, 255, 0.55); }
.pricing-card:nth-of-type(3n) { border-left: 2px solid rgba(239, 200, 111, 0.55); }
.admin-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.admin-stats .stat-card:first-child { grid-column: span 2; }

/* Branded authentication stage */
.auth-page::after {
  content: "GPT AIGC";
  position: fixed;
  left: 6vw;
  bottom: 8vh;
  color: rgba(245, 248, 246, 0.035);
  font-size: 96px;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}
.auth-card {
  z-index: 1;
  border-radius: 8px 0 8px 8px;
  border-left: 2px solid rgba(116, 239, 180, 0.55);
}

/* Full-bleed brand stage */
.landing-nav { height: 78px; background: rgba(4, 7, 5, 0.72); }
.landing-nav-inner { width: min(1320px, calc(100% - 64px)); }
.landing-brand { font-size: 14px; }
.landing-nav-links { gap: 36px; }

.landing-hero {
  height: 88vh;
  min-height: 720px;
  max-height: 880px;
  align-items: stretch;
  background-position: center;
}
.landing-hero::before {
  background:
    linear-gradient(90deg, rgba(2, 5, 3, 0.95) 0%, rgba(3, 6, 4, 0.88) 38%, rgba(3, 6, 4, 0.45) 72%, rgba(3, 6, 4, 0.2) 100%),
    linear-gradient(to top, rgba(2, 5, 3, 0.82), transparent 52%);
}
.landing-hero-inner {
  width: min(1320px, calc(100% - 64px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: end;
  gap: 80px;
  padding: 154px 0 72px;
}
.landing-hero-copy { max-width: 760px; }
.landing-hero-copy::before { left: -32px; }
.landing-kicker { margin-bottom: 24px; }
.landing-hero h1 {
  max-width: 760px;
  font-size: 82px;
  line-height: 0.98;
}
.landing-hero h1 span {
  color: transparent;
  -webkit-text-stroke: 1px rgba(132, 246, 190, 0.92);
  text-shadow: 0 0 34px rgba(116, 239, 180, 0.12);
}
.landing-hero-lead { max-width: 590px; margin-top: 28px; font-size: 16px; }
.landing-proof { margin-top: 34px; }

.landing-signal-panel {
  align-self: end;
  min-width: 0;
  color: #eaf1ed;
  border-top: 1px solid rgba(146, 220, 255, 0.48);
  border-bottom: 1px solid rgba(116, 239, 180, 0.34);
  background: rgba(6, 9, 7, 0.46);
  backdrop-filter: blur(12px);
}
.signal-panel-head,
.signal-row,
.signal-panel-foot {
  display: grid;
  align-items: center;
  min-width: 0;
  border-bottom: 1px solid rgba(145, 174, 156, 0.15);
}
.signal-panel-head {
  grid-template-columns: 1fr auto;
  min-height: 46px;
  color: #8d9991;
  font-size: 10px;
}
.signal-live { display: inline-flex; align-items: center; gap: 7px; color: #8ff5c3; }
.signal-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--director-mint); box-shadow: 0 0 14px rgba(116, 239, 180, 0.8); }
.signal-row {
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 66px;
}
.signal-index { color: #526159; font-size: 10px; font-variant-numeric: tabular-nums; }
.signal-row strong { overflow: hidden; font-size: 13px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.signal-row small { color: #7f8b84; font-size: 9px; }
.signal-panel-foot {
  grid-template-columns: 1fr auto;
  min-height: 46px;
  border-bottom: 0;
  color: #68766e;
  font-size: 9px;
}
.signal-panel-foot strong { color: var(--director-gold); font-size: 9px; font-weight: 650; }

.landing-section { padding: 96px 0; }
.landing-section-inner { width: min(1320px, calc(100% - 64px)); }
.landing-section-header { margin-bottom: 48px; }
.landing-section h2 { font-size: 40px; }
.capability-grid {
  grid-template-columns: 2fr 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  background: #ccd4ce;
  border: 1px solid #ccd4ce;
  border-radius: 8px;
}
.capability-card {
  min-height: 300px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.capability-card::before {
  content: "01";
  position: absolute;
  top: 20px;
  right: 22px;
  color: rgba(18, 21, 18, 0.11);
  font-size: 42px;
  font-weight: 760;
  line-height: 1;
}
.capability-card:nth-child(2)::before { content: "02"; }
.capability-card:nth-child(3)::before { content: "03"; }
.capability-card:first-child { padding-right: 30%; }
.capability-card:hover { transform: none; background: #f8fbf9; }
.model-section .landing-section-inner { width: min(1320px, calc(100% - 64px)); grid-template-columns: 360px minmax(0, 1fr); }

@keyframes director-rail-scan {
  0%, 100% { transform: translateY(0); opacity: 0.35; }
  50% { transform: translateY(320px); opacity: 1; }
}

@media (max-width: 1100px) {
  .dashboard-stats,
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-stats .stat-card:first-child,
  .admin-stats .stat-card:first-child { grid-column: auto; min-height: 122px; padding: 17px; }
  .dashboard-stats .stat-card:first-child .stat-value { font-size: 29px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; }
  .gen-layout { grid-template-columns: 310px minmax(0, 1fr) !important; }
  .landing-hero-inner { grid-template-columns: minmax(0, 1fr) 320px; gap: 44px; }
  .landing-hero h1 { font-size: 68px; }
}

@media (max-width: 900px) {
  .sidebar { width: var(--director-rail); }
  .main-content { margin-left: var(--director-offset); }
  .main-content::after { left: var(--director-offset); }
  .gen-layout { grid-template-columns: 300px minmax(0, 1fr) !important; }
  .landing-hero-inner { grid-template-columns: 1fr; }
  .landing-signal-panel { display: none; }
  .landing-hero h1 { font-size: 60px; }
  .capability-grid { grid-template-columns: 1.4fr 1fr; }
  .capability-card:nth-child(3) { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-rail {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .main-content { margin-left: 0; }
  .page-header {
    top: 64px;
    min-height: 70px;
    margin: 8px 10px 0;
    padding: 13px 14px;
  }
  .page-header::after { right: 14px; left: 14px; }
  .page-title { font-size: 18px; }
  .page-body { padding: 18px 14px 34px; }
  .dashboard-rail { grid-template-columns: 1fr; }
  .gen-panel { top: auto !important; max-height: none !important; }
  .gen-result > .card:first-child { min-height: 430px !important; }
  .auth-page::after { display: none; }
  .landing-nav-inner,
  .landing-hero-inner,
  .landing-section-inner,
  .model-section .landing-section-inner { width: min(100% - 32px, 1320px); }
  .landing-hero { min-height: 640px; max-height: 760px; }
  .landing-hero-inner { padding: 126px 0 54px; }
  .landing-hero-copy::before { display: none; }
  .landing-hero h1 { font-size: 48px; }
  .landing-hero-lead { font-size: 15px; }
  .landing-section { padding: 64px 0; }
  .landing-section h2 { font-size: 30px; }
  .capability-grid { grid-template-columns: 1fr; }
  .capability-card,
  .capability-card:first-child { min-height: 230px; padding-right: 24px; }
  .capability-card:nth-child(3) { grid-column: auto; }
}

@media (max-width: 430px) {
  .page-header { flex-direction: column; }
  .dashboard-stats .stat-card:first-child { min-height: 112px; }
  .landing-hero h1 { font-size: 40px; }
  .landing-hero-actions { gap: 8px; }
  .landing-proof-item { padding: 0 9px; }
}

@media (max-height: 700px) {
  .landing-hero {
    height: calc(100svh - 28px);
    min-height: 520px;
    max-height: 640px;
  }
  .landing-hero-inner { padding-top: 100px; padding-bottom: 32px; }
  .landing-kicker { margin-bottom: 14px; }
  .landing-hero-lead { margin-top: 16px; }
  .landing-hero-actions { margin-top: 18px; }
  .landing-proof { margin-top: 20px; }
}

@media (max-width: 430px) and (max-height: 700px) {
  .landing-hero-inner { padding-top: 90px; padding-bottom: 24px; }
  .landing-proof { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar::after { animation: none; }
}
