/* HQ professional interface layer. Visual-only overrides; no layout contracts or JS hooks. */
:root {
  --bg-primary: #080c12;
  --bg-secondary: #0c121b;
  --bg-card: #111923;
  --bg-card-hover: #16212d;
  --bg-input: #0b111a;
  --border: #243141;
  --border-light: #344357;
  --text-primary: #f4f7fb;
  --text-secondary: #b9c4d2;
  --text-muted: #7f8da1;
  --purple: #2eb8b0;
  --purple-light: #6edbd3;
  --purple-dark: #238f8a;
  --purple-glow: rgba(46,184,176,.2);
  --purple-gradient: linear-gradient(135deg,#2eb8b0 0%,#3f9bd8 100%);
  --purple-gradient-dark: linear-gradient(135deg,#238f8a 0%,#337fb4 100%);
  --green: #45c98f;
  --red: #f06d78;
  --orange: #d9ac5f;
  --blue: #6ba7e8;
  --cyan: #5bd4cc;
  --radius: 6px;
  --radius-lg: 8px;
  --radius-xl: 10px;
  --shadow-card: 0 12px 30px rgba(0,0,0,.18),0 1px 0 rgba(255,255,255,.025) inset;
  --shadow-card-hover: 0 16px 38px rgba(0,0,0,.24),0 0 0 1px rgba(91,212,204,.09);
  --shadow-glow: 0 18px 46px rgba(0,0,0,.3);
  --shadow-glow-lg: 0 28px 72px rgba(0,0,0,.42);
  --transition: .16s ease;
}

html { color-scheme: dark; }
body { background:#080c12; color:var(--text-primary); letter-spacing:0; }
body::before,body::after { display:none!important; animation:none!important; }
.bg-grid {
  background-image:linear-gradient(rgba(116,136,160,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(116,136,160,.035) 1px,transparent 1px)!important;
  background-size:56px 56px!important;
  mask-image:none!important;
  opacity:.34;
}
::-webkit-scrollbar{width:7px;height:7px}
::-webkit-scrollbar-track{background:#080c12}
::-webkit-scrollbar-thumb{background:#344357;border-radius:6px}
::-webkit-scrollbar-thumb:hover{background:#496079}

/* Navigation and page framing */
.sidebar {
  background:rgba(9,14,22,.97)!important;
  border-right-color:#202c3a!important;
  box-shadow:14px 0 36px rgba(0,0,0,.16);
  backdrop-filter:blur(18px) saturate(1.15)!important;
}
.sidebar-logo { min-height:64px; padding:14px 20px!important; border-bottom-color:#202c3a!important; }
.sidebar-logo .logo-icon {
  border-radius:7px!important;
  background:#2eb8b0!important;
  box-shadow:0 8px 22px rgba(46,184,176,.16)!important;
  animation:none!important;
}
.sidebar-logo .logo-text { background:none!important; color:#f4f7fb!important; -webkit-text-fill-color:currentColor!important; font-weight:760!important; }
.sidebar-nav .nav-section { color:#66768b!important; letter-spacing:.08em!important; }
.nav-item { border:1px solid transparent; border-radius:6px!important; margin:2px 10px!important; padding:9px 13px!important; }
.nav-item:hover { background:#111a25!important; border-color:#243244; color:#eef4fb!important; }
.nav-item.active,.nav-item.on {
  background:#14252b!important;
  border-color:rgba(91,212,204,.22)!important;
  color:#8ce6df!important;
  box-shadow:none!important;
}
.nav-item.active::before { left:-1px!important; top:7px!important; bottom:7px!important; width:2px!important; background:#5bd4cc!important; }
.sidebar-footer { border-top-color:#202c3a!important; }
.sidebar-footer .avatar { background:#253548!important; box-shadow:none!important; }
.topbar {
  background:rgba(8,13,20,.9)!important;
  border-bottom-color:#202c3a!important;
  box-shadow:0 8px 26px rgba(0,0,0,.12);
  backdrop-filter:blur(18px)!important;
}
.topbar-title { font-weight:740!important; }
.topbar-breadcrumb { color:#77869a!important; }
.page-content { padding-top:22px!important; }
.page-header { border-bottom-color:#243141!important; margin-bottom:18px!important; }
.page-title { font-size:21px!important; font-weight:760!important; }
.section-title::before { background:#5bd4cc!important; }

/* Surfaces */
.card,.panel,.op-panel,.stat-card,.op-stat,.kpi-card,.snapshot-card,.insight-card,.metric,.box {
  background:#111923!important;
  border-color:#243141!important;
  box-shadow:var(--shadow-card)!important;
}
.card::before,.stat-card::after,.op-stat::after,.kpi-card::after { display:none!important; }
.card:hover,.panel:hover,.op-panel:hover,.stat-card:hover,.op-stat:hover,.kpi-card:hover {
  border-color:#34465a!important;
  box-shadow:var(--shadow-card-hover)!important;
  transform:none!important;
}
.stat-card::before,.op-stat::before { background:#4ecdc4!important; }
.stat-value,.kpi-value { background:none!important; color:#f4f7fb!important; -webkit-text-fill-color:currentColor!important; }
.kpi-code,.section-kicker { color:#6edbd3!important; }
.table-container,.table-wrap {
  background:#0f1721!important;
  border-color:#263445!important;
  border-radius:8px!important;
  box-shadow:0 12px 28px rgba(0,0,0,.14);
}
table th { background:#0c131c!important; color:#8594a8!important; border-bottom-color:#283648!important; letter-spacing:.03em!important; }
table td { border-bottom-color:#202c3a!important; color:#bec9d6!important; }
table tr:hover td { background:#14202b!important; }

/* Commands and form controls */
.btn { border-radius:6px!important; font-weight:680!important; box-shadow:none!important; }
.btn::after { display:none!important; }
.btn:active { transform:translateY(1px)!important; }
.btn-primary {
  background:#2eb8b0!important;
  border:1px solid #48c9c1!important;
  color:#061413!important;
}
.btn-primary:hover { background:#44c8c0!important; border-color:#75ddd6!important; transform:none!important; }
.btn-secondary,.btn-ghost {
  background:#151e29!important;
  border:1px solid #2b3a4d!important;
  color:#c5d0dc!important;
}
.btn-secondary:hover,.btn-ghost:hover { background:#1b2835!important; border-color:#40546c!important; color:#fff!important; }
.btn-danger { background:#2b171d!important; border-color:#60303a!important; color:#ff9ca4!important; }
input:not([type=checkbox]):not([type=radio]),textarea,select,.input {
  background-color:#0a1119!important;
  border-color:#2a394b!important;
  color:#eef4fa!important;
  border-radius:6px!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025)!important;
}
input:not([type=checkbox]):not([type=radio]):hover,textarea:hover,select:hover,.input:hover { border-color:#3b5068!important; }
input:not([type=checkbox]):not([type=radio]):focus,textarea:focus,select:focus,.input:focus {
  border-color:#4ecdc4!important;
  box-shadow:0 0 0 3px rgba(78,205,196,.11)!important;
  outline:none!important;
}
input::placeholder,textarea::placeholder { color:#5f6e82!important; }
select { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238ba2ba' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")!important; background-repeat:no-repeat!important; background-position:right 12px center!important; background-size:14px 14px!important; }
select option { background:#0b121b!important; }
input[type=checkbox],input[type=radio] { accent-color:#2eb8b0; }
.tabs { background:#0a1119!important; border:1px solid #243141!important; }
.tab-item.active,.tabs button.on { background:#223944!important; color:#8ce6df!important; }

/* Feedback, tags, modals */
.tag,.badge-soft,.op-badge,.pill { border-radius:999px!important; }
.tag-purple,.badge-info { background:rgba(78,205,196,.11)!important; color:#87e4dd!important; }
.modal-overlay,.op-modal-mask { background:rgba(2,5,9,.78)!important; backdrop-filter:blur(7px)!important; }
.modal,.op-modal {
  background:#111923!important;
  border-color:#344357!important;
  border-radius:9px!important;
  box-shadow:0 30px 80px rgba(0,0,0,.5)!important;
}
.op-toast { background:#111b26!important; border-color:#365268!important; box-shadow:0 18px 46px rgba(0,0,0,.34)!important; }
.op-code,.key { color:#72dcd5!important; }

/* Open Platform management pages */
.op-toolbar,.toolbar {
  background:#0d151f!important;
  border-color:#263648!important;
  border-radius:8px!important;
  box-shadow:none!important;
}
.op-nav-group { background:#0d151f!important; border-color:#273648!important; border-radius:7px!important; }
.op-nav-head { background:#111c27!important; }
.op-nav-head:hover { background:#172531!important; }
.op-nav-items button.active { background:#183139!important; color:#8ce6df!important; }
.op-nav-items button:hover { background:#14232e!important; }
.op-result { background:#091019!important; border-color:#29394c!important; }

/* Developer console */
.console-shell { background:#080c12!important; }
.console-shell>.sidebar { background:#0a1018!important; overflow-x:hidden!important; }
.console-shell .nav-item { width:100%!important; margin:0!important; }
.console-shell .brand-mark { background:#2eb8b0!important; color:#061413!important; box-shadow:none!important; }
.workspace { background:transparent!important; }
.workspace-top { border-bottom:1px solid #202d3c; padding-bottom:16px; }
.kicker { color:#6edbd3!important; letter-spacing:.1em!important; }
.panel,.stat,.metric,.model-feature-card,.result-preview-card,.asset-upload-card {
  background:#111923!important;
  border-color:#263445!important;
  box-shadow:var(--shadow-card)!important;
}
.model-feature-card:hover { background:#15212c!important; border-color:#3a5368!important; transform:none!important; }
.seg-control,.video-parse-tabs { background:#0a1119!important; border-color:#263445!important; }
.seg-btn.on,.video-parse-tab.on { background:#223d47!important; color:#8ce6df!important; box-shadow:none!important; }
.chip,.price-mode,.model-feature-tag { border-radius:999px!important; }

/* Authentication surfaces */
.auth-surface { background:#080d14!important; }
.auth-surface .page { background:#080d14!important; }
.auth-surface .page::before {
  background-image:linear-gradient(rgba(108,128,151,.04) 1px,transparent 1px),linear-gradient(90deg,rgba(108,128,151,.04) 1px,transparent 1px)!important;
  background-size:58px 58px!important;
}
.auth-surface .page::after,.auth-surface .beam { display:none!important; }
.auth-surface .brand-mark { background:transparent!important; color:#dce6f2!important; box-shadow:none!important; }
.auth-surface .mark,.auth-surface .mark-icon,.auth-surface .chip { background:#2eb8b0!important; box-shadow:0 12px 30px rgba(46,184,176,.14)!important; border-radius:8px!important; }
.auth-surface .hero h1 { max-width:760px; font-size:clamp(38px,4.3vw,58px)!important; font-weight:760; }
.auth-surface .hero p { color:#9eacbd!important; }
.auth-surface .point,.auth-surface .metric { background:#0f1721!important; border-color:#263445!important; border-radius:8px!important; }
.auth-surface .card,.auth-surface .auth-card { background:#111923!important; border:1px solid #314154!important; border-radius:10px!important; padding:0!important; box-shadow:0 30px 80px rgba(0,0,0,.38)!important; }
.auth-surface .inner,.auth-surface .auth-inner { background:#111923!important; border-radius:9px!important; }
.auth-surface .submit { background:#2eb8b0!important; color:#061413!important; border-radius:6px!important; box-shadow:none!important; }
.auth-surface .ghost,.auth-surface .doc-link { border-radius:6px!important; background:#151f2a!important; border-color:#2b3b4e!important; color:#c7d2de!important; }
.auth-surface .tabs { border-radius:7px!important; padding:4px!important; }
.auth-surface .tabs button { border-radius:5px!important; }
.auth-surface .tabs button.on { background:#223d47!important; color:#8ce6df!important; }
.auth-surface .eyebrow { border-color:#40566d!important; background:#111c28!important; color:#9cb3cb!important; border-radius:6px!important; }

@media(max-width:1180px){
  .page-content{padding:18px 18px 28px!important}
  .console-shell>.sidebar{position:relative!important;inset:auto!important;width:auto!important;height:auto!important;transform:none!important}
}
@media(max-width:720px){
  .topbar{padding:0 14px!important}
  .page-content{padding:14px 12px 24px!important}
  .page-header{align-items:stretch!important}
  .page-actions{justify-content:flex-start!important}
  .auth-surface .hero h1{font-size:36px!important}
  .console-shell .side-nav{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}

/* Introduction-page palette: shared by HQ and developer surfaces. */
:root {
  --bg-primary: #07101d;
  --bg-secondary: #0c1828;
  --bg-card: #0c1828;
  --bg-card-hover: #101f32;
  --bg-input: #091522;
  --border: #20344a;
  --border-light: #2b4661;
  --text-primary: #f5f8fc;
  --text-secondary: #b8c7d9;
  --text-muted: #91a4ba;
  --purple: #55d7e8;
  --purple-light: #7fb1ff;
  --purple-dark: #347ea9;
  --purple-glow: rgba(85,215,232,.18);
  --purple-gradient: linear-gradient(135deg,#55d7e8 0%,#7fb1ff 52%,#a98bff 100%);
  --purple-gradient-dark: linear-gradient(135deg,#1d718c 0%,#3866a8 52%,#6d55a5 100%);
  --cyan: #55d7e8;
}

html { background: #07101d!important; }
body { background: #07101d!important; }
body::before, body::after { display: none!important; }
.bg-grid { display: none!important; }
::-webkit-scrollbar-track { background: #07101d!important; }
::-webkit-scrollbar-thumb { background: #2b4661!important; }
::-webkit-scrollbar-thumb:hover { background: #3c6688!important; }

.app-layout { background: #07101d!important; }
.main-content {
  background:
    radial-gradient(circle at 84% 3%, rgba(85,215,232,.11), transparent 28%),
    radial-gradient(circle at 8% 92%, rgba(169,139,255,.08), transparent 25%),
    #07101d!important;
}
.sidebar {
  background: linear-gradient(180deg, rgba(9,21,35,.98), rgba(7,16,29,.99))!important;
  border-right-color: #20344a!important;
}
.sidebar-logo { border-bottom-color: #20344a!important; }
.sidebar-footer { border-top-color: #20344a!important; }
.sidebar-nav .nav-section { color: #718aa4!important; }
.nav-item { color: #b8c7d9!important; }
.nav-item:hover { background: rgba(85,215,232,.07)!important; border-color: rgba(85,215,232,.2)!important; color: #f5f8fc!important; }
.nav-item.active,.nav-item.on { background: rgba(85,215,232,.12)!important; border-color: rgba(85,215,232,.24)!important; color: #a8edf3!important; }
.nav-item.active::before { background: #55d7e8!important; }
.sidebar-logo .logo-icon { background: var(--purple-gradient)!important; box-shadow: 0 8px 24px rgba(85,215,232,.14)!important; }
.topbar { background: rgba(7,16,29,.86)!important; border-bottom-color: #20344a!important; }
.page-header { border-bottom-color: #20344a!important; }
.card,.panel,.op-panel,.stat-card,.op-stat,.kpi-card,.snapshot-card,.insight-card,.metric,.box {
  background: #0c1828!important;
  border-color: #20344a!important;
}
.table-container,.table-wrap { background: #0a1625!important; border-color: #20344a!important; }
table th { background: #0e1d2f!important; border-bottom-color: #20344a!important; }
table td { border-bottom-color: #1b3046!important; }
table tr:hover td { background: rgba(85,215,232,.045)!important; }
input:not([type=checkbox]):not([type=radio]),textarea,select,.input {
  background-color: #091522!important;
  border-color: #29445d!important;
}
input:not([type=checkbox]):not([type=radio]):focus,textarea:focus,select:focus,.input:focus {
  border-color: #55d7e8!important;
  box-shadow: 0 0 0 3px rgba(85,215,232,.12)!important;
}
.btn-primary { background: #55d7e8!important; border-color: #7ae4ef!important; color: #06131d!important; }
.btn-primary:hover { background: #7ae4ef!important; border-color: #a9f0f6!important; }
.btn-secondary,.btn-ghost { background: #101f32!important; border-color: #2b4661!important; color: #c6d4e3!important; }
.btn-secondary:hover,.btn-ghost:hover { background: #162a42!important; border-color: #477092!important; }

/* Developer console framing. */
.console-shell,.developer-console-shell {
  background:
    radial-gradient(circle at 84% 5%, rgba(85,215,232,.12), transparent 28%),
    radial-gradient(circle at 8% 92%, rgba(169,139,255,.08), transparent 26%),
    #07101d!important;
}
.developer-console-shell>.page {
  background:
    radial-gradient(circle at 84% 5%, rgba(85,215,232,.12), transparent 28%),
    radial-gradient(circle at 8% 92%, rgba(169,139,255,.08), transparent 26%),
    #07101d!important;
}
.console-shell>.sidebar,.developer-console-shell>.sidebar {
  background: linear-gradient(180deg, rgba(9,21,35,.98), rgba(7,16,29,.99))!important;
  border-right-color: #20344a!important;
}
.console-shell .nav-item:hover,.developer-console-shell .nav-item:hover { background: rgba(85,215,232,.07)!important; border-color: rgba(85,215,232,.2)!important; }
.console-shell .nav-item.on,.developer-console-shell .nav-item.on { background: rgba(85,215,232,.12)!important; border-color: rgba(85,215,232,.24)!important; color: #a8edf3!important; }
.console-shell .brand-mark,.developer-console-shell .brand-mark { background: var(--purple-gradient)!important; color: #06131d!important; }
.workspace { background: transparent!important; }
.workspace-top { border-bottom-color: #20344a!important; }
.panel,.stat,.metric,.model-feature-card,.result-preview-card,.asset-upload-card { background: #0c1828!important; border-color: #20344a!important; }

/* Refined document-processing panel. Existing field IDs and handlers remain untouched. */
#section-gm-document {
  position: relative;
  overflow: hidden;
  padding: 22px!important;
  border-color: #2b4b68!important;
  background: linear-gradient(145deg, rgba(12,24,40,.98), rgba(9,20,34,.98))!important;
  box-shadow: 0 24px 58px rgba(0,0,0,.28), 0 0 0 1px rgba(85,215,232,.035) inset!important;
}
#section-gm-document::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, #55d7e8, #7fb1ff 52%, #a98bff);
  opacity: .9;
}
#section-gm-document .panel-head {
  margin: -2px 0 18px!important;
  padding-bottom: 15px;
  border-bottom: 1px solid #203c55;
}
#section-gm-document .panel-head h3 { font-size: 18px; letter-spacing: .01em; }
#section-gm-document .panel-head .hint { max-width: 780px; color: #91a9c1; }
#section-gm-document .form-grid {
  gap: 15px!important;
  padding: 16px;
  border: 1px solid rgba(43,75,104,.78);
  border-radius: 10px;
  background: rgba(16,31,50,.48);
}
#section-gm-document .field label { color: #a9bdd1!important; font-size: 12px; letter-spacing: .01em; }
#section-gm-document .field input,
#section-gm-document .field select {
  min-height: 42px;
  border-color: #2a4963!important;
  background: #091827!important;
}
#section-gm-document .field input[type=file] { padding: 8px 11px; color: #b8c9d9; }
#section-gm-document .field input[type=file]::file-selector-button {
  margin-right: 10px;
  padding: 7px 11px;
  border: 1px solid #38617f;
  border-radius: 6px;
  background: #122940;
  color: #d9edf5;
  cursor: pointer;
}
#section-gm-document .field input:hover,
#section-gm-document .field select:hover { border-color: #477092!important; }
#section-gm-document .field input:focus,
#section-gm-document .field select:focus { border-color: #55d7e8!important; box-shadow: 0 0 0 3px rgba(85,215,232,.12)!important; }
#section-gm-document .config-actions {
  align-items: center;
  margin-top: 16px!important;
  padding-top: 16px;
  border-top: 1px solid #203c55;
}
#section-gm-document .config-actions .btn { min-height: 40px; padding-inline: 16px; }
#section-gm-document > .field.full { margin-top: 16px!important; }
#section-gm-document > .field.full input { min-height: 42px; }
#section-gm-document #gmDocumentResult {
  min-height: 180px!important;
  margin-top: 13px!important;
  padding: 15px!important;
  border-color: #2a4963!important;
  background: #081522!important;
  color: #b7d2e4!important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025), 0 12px 28px rgba(0,0,0,.14);
  font-family: var(--font-mono);
  font-size: 12px;
}
@media(max-width:680px){
  #section-gm-document { padding: 16px!important; }
  #section-gm-document .form-grid { padding: 12px; }
}
