:root{
  --cc-bg:#eeeae1;
  --cc-surface:#fbf8f1;
  --cc-surface-2:#e4ece8;
  --cc-ink:#0b2727;
  --cc-muted:#61726f;
  --cc-line:#ced8d2;
  --cc-green:#155b57;
  --cc-green-soft:#d7e7e2;
  --cc-blue:#456f78;
  --cc-blue-soft:#dbe8e9;
  --cc-amber:#a9752b;
  --cc-amber-soft:#f1e5c9;
  --cc-red:#9a4f48;
  --cc-red-soft:#efddda;
  --cc-gold:#a98550;
  --cc-shadow:0 14px 36px rgba(36,44,41,.08);
  --cc-radius:18px;
}
html{background:var(--cc-bg)}
body:not([data-theme="dark"]){
  --bg:var(--cc-bg);
  --panel:var(--cc-surface);
  --panel2:var(--cc-surface-2);
  --paper:var(--cc-ink);
  --muted:var(--cc-muted);
  --gold:var(--cc-gold);
  --gold2:#755c35;
  --line:rgba(155,122,69,.22);
  --soft:rgba(24,33,31,.11);
  --green:var(--cc-green);
  --amber:var(--cc-amber);
  --red:var(--cc-red);
  background:linear-gradient(180deg,#f5f1e9 0%,#e9e5dc 100%);
  color:var(--cc-ink);
}
body[data-theme="dark"]{
  --bg:#0b2625;
  --panel:#123332;
  --panel2:#193d3a;
  --paper:#f2eee5;
  --muted:#b8c7c3;
  --gold:#c4a36d;
  --gold2:#e4c99a;
  --line:rgba(196,163,109,.28);
  --soft:rgba(255,255,255,.11);
  --green:#8eb6a4;
  --amber:#d9b16d;
  --red:#d5968f;
  background:#0b2625;
}
body{font-size:16px;line-height:1.5}
.card{
  border-color:var(--cc-line);
  background:var(--cc-surface);
  box-shadow:var(--cc-shadow);
  border-radius:var(--cc-radius);
}
body[data-theme="dark"] .card{background:#123332;border-color:rgba(255,255,255,.08)}
.display,.topbar h1,.section-head h2,.workspace-head h2,
.client-page-head h2,.client-hero h2,.operator-hero h1,
.lead-hero h1,.lead-card-head h2{font-family:Georgia,"Times New Roman",serif}
.eyebrow{
  font-size:.72rem;
  letter-spacing:.12em;
  color:var(--cc-green);
}
.muted{color:var(--cc-muted)}
.btn{
  min-height:44px;
  border-radius:12px;
  border-color:rgba(62,103,93,.25);
  background:var(--cc-green);
  color:#fff;
  padding:.72rem 1rem;
  font-weight:750;
}
.btn:hover{background:#0c4744;color:#fff}
.btn.ghost{
  background:transparent;
  color:var(--cc-ink);
  border-color:var(--cc-line);
}
body[data-theme="dark"] .btn.ghost{color:var(--paper);background:rgba(255,255,255,.025)}
.btn.compact{min-height:38px}
.pill{
  border-radius:999px;
  font-size:.72rem;
  font-weight:700;
  padding:.38rem .62rem;
  color:var(--cc-muted);
  background:#f2f0e9;
  border-color:var(--cc-line);
}
.pill.green{background:var(--cc-green-soft);color:var(--cc-green);border-color:rgba(62,103,93,.22)}
.pill.amber{background:var(--cc-amber-soft);color:#7c5720;border-color:rgba(169,117,43,.2)}
.pill.red{background:var(--cc-red-soft);color:var(--cc-red);border-color:rgba(154,79,72,.2)}
.pill.gold{background:#eee5d5;color:#735c37;border-color:#ded0b7}

/* Main Studio shell */
.shell{grid-template-columns:230px 1fr}
.sidebar{
  background:#0b3633;
  border-right:0;
  color:#f4f1e8;
  padding:22px 16px;
}
.sidebar .brand strong,.sidebar .user-card strong{color:#fff}
.sidebar .brand span{color:#c9d8d0}
.sidebar .user-card{background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.09)}
.sidebar .user-card span,.sidebar .side-bottom{color:#c3cec8}
.nav{gap:8px}
.nav button,.nav a{
  min-height:44px;
  font-size:.86rem;
  border-radius:11px;
  color:#d7dfdb;
}
.nav button:hover,.nav button.active,.nav a:hover{
  background:rgba(255,255,255,.10);
  border-color:transparent;
  color:#fff;
}
.nav .ico{color:#d4c093}
.topbar{
  position:sticky;
  background:rgba(243,240,233,.93);
  border-bottom:1px solid var(--cc-line);
  backdrop-filter:blur(12px);
  padding:18px 28px;
}
body[data-theme="dark"] .topbar{background:rgba(32,37,34,.92)}
.topbar h1{font-size:1.65rem;color:var(--cc-ink)}
body[data-theme="dark"] .topbar h1{color:var(--paper)}
.content{padding-top:24px}
.banner{
  border:0;
  background:#dfe9e4;
  box-shadow:none;
  padding:18px 20px;
}
.banner strong{font-size:1.05rem}
.banner p{font-size:.86rem;color:#52615c}
.metrics{gap:14px}
.metric{padding:20px}
.metric small{font-size:.7rem;color:#6d7772}
.metric strong{font-size:2.45rem;color:#20332d}
.metric span{font-size:.78rem}
.section-head{margin:28px 0 12px}
.section-head h2{font-size:2rem}
.section-head p{font-size:.88rem}

/* 3-second command layer */
.command-hero{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:22px;
  align-items:center;
  padding:26px 28px;
  margin-bottom:16px;
  background:linear-gradient(130deg,#dfe9e4,#edf0ea);
  border:1px solid #cbd9d1;
  border-radius:22px;
  box-shadow:var(--cc-shadow);
}
.command-hero .command-kicker{
  font-size:.73rem;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--cc-green);
}
.command-hero h2{
  font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(2rem,4vw,3.4rem);
  line-height:1.02;
  margin:.35rem 0 .55rem;
  font-weight:400;
  color:#1b2925;
}
.command-hero p{margin:0;color:#56635e;max-width:740px;font-size:.95rem}
.command-hero .command-action{min-width:180px}
.command-hero.is-clear{background:linear-gradient(130deg,#e5ebe6,#f3f1ea)}
.command-hero.is-warning{background:linear-gradient(130deg,#f0e4c9,#f6efe0);border-color:#e5d2aa}
.command-hero.is-message{background:linear-gradient(130deg,#dbe8e9,#eef1ef);border-color:#cad9e2}
.command-hero.is-blocked{background:linear-gradient(130deg,#efddda,#f5ebe8);border-color:#e1c5c1}
.command-summary-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:14px 0 20px}
.command-summary{
  border:1px solid var(--cc-line);
  background:var(--cc-surface);
  border-radius:16px;
  padding:18px;
  box-shadow:0 8px 24px rgba(36,44,41,.05);
}
.command-summary small{display:block;font-size:.68rem;text-transform:uppercase;letter-spacing:.08em;color:var(--cc-muted);margin-bottom:5px}
.command-summary strong{font-size:1.05rem;color:var(--cc-ink)}
.command-summary.green{border-left:5px solid var(--cc-green)}
.command-summary.blue{border-left:5px solid var(--cc-blue)}
.command-summary.amber{border-left:5px solid var(--cc-amber)}

/* Generic work cards */
.column,.task,.row,.entity,.kv,.tabs button,
.storage-note,.no-password,.studio-message-alert{
  color:var(--cc-ink);
}
.column{
  background:#f3f1eb;
  border-color:var(--cc-line);
  min-height:170px;
}
.column-head{font-size:.78rem}
.task,.row{background:#fffdf8;border-color:var(--cc-line)}
.task strong,.row h4{font-size:.9rem}
.task span,.row p{font-size:.76rem;color:var(--cc-muted)}
.entity{background:var(--cc-surface)}
.entity p{font-size:.82rem}
.entity .big{color:#486c61}
.workspace-head p{font-size:.9rem}
.tabs{border-color:var(--cc-line)}
.tabs button{font-size:.8rem}
.tabs button.active,.tabs button:hover{background:#dfe9e4;color:#2d5449;border-color:#c6d8ce}

/* Client area: same language, slightly softer */
body.client-mode:not([data-theme="dark"]){
  background:linear-gradient(180deg,#f5f1e9,#e9e5dc);
}
body.client-mode:not([data-theme="dark"]) .sidebar{background:#0b3633}
body.client-mode:not([data-theme="dark"]) .topbar{background:rgba(243,240,233,.93)}
body.client-mode:not([data-theme="dark"]) .card{background:#fbf8f1;border-color:var(--cc-line)}
body.client-mode:not([data-theme="dark"]) .client-hero{
  background:linear-gradient(130deg,#dfe9e4,#edf0ea);
  border-color:#cbd9d1;
  box-shadow:var(--cc-shadow);
}
body.client-mode:not([data-theme="dark"]) .client-hero h2{color:#1c2a26}
body.client-mode:not([data-theme="dark"]) .client-hero p{color:#59655f}
body.client-mode:not([data-theme="dark"]) .client-action{
  background:#fbf8f1;
  border-color:var(--cc-line);
  box-shadow:var(--cc-shadow);
}
body.client-mode:not([data-theme="dark"]) .client-action h3{color:#1c2a26}
body.client-mode:not([data-theme="dark"]) .client-action p{color:#64706a}
body.client-mode:not([data-theme="dark"]) .client-primary{background:var(--cc-green);color:#fff;border-color:var(--cc-green)}
body.client-mode:not([data-theme="dark"]) .project-card-copy,
body.client-mode:not([data-theme="dark"]) .client-files-card{color:var(--cc-ink)}
body.client-mode:not([data-theme="dark"]) .mini-file{background:#fffdf8;color:var(--cc-ink);border-color:var(--cc-line)}

/* Operator */
.operator-shell,.lead-shell{width:min(calc(100% - 34px),1320px)}
.operator-top,.lead-top{border-bottom-color:var(--cc-line)}
.operator-hero,.lead-hero{padding:34px 0 22px}
.operator-hero h1,.lead-hero h1{
  color:#1b2925;
  font-size:clamp(2.6rem,5vw,5rem);
  line-height:.95;
}
.operator-hero>div>p,.lead-hero p{color:var(--cc-muted);font-size:.96rem}
.operator-rule,.operator-live-card,.lead-safety{
  background:var(--cc-surface);
  border-color:var(--cc-line);
  box-shadow:var(--cc-shadow);
}
.operator-live-card{border-left:6px solid var(--cc-green)}
.operator-card{background:var(--cc-surface)}
.operator-field textarea,.operator-result-field input,.park-entry input,
.ask-operator-form input,.quick-complete input{
  background:#fffdf8;
  color:var(--cc-ink);
  border-color:var(--cc-line);
  font-size:.9rem;
}
.energy-modes button,.parked-item,.history-item,.live-state-row,.live-option,
.operator-secondary>summary,.operator-answer{
  background:#fffdf8;
  color:var(--cc-ink);
  border-color:var(--cc-line);
}
.recommended-crossing{
  background:#dfe9e4;
  border-color:#c8d9cf;
}
.recommended-crossing strong{color:#1b2925}
.operator-secondary>summary{min-height:48px;font-size:.85rem}

/* Lead Engine */
.lead-hero{grid-template-columns:minmax(0,1.4fr) minmax(280px,.6fr)}
.lead-safety{border-left:6px solid var(--cc-green)}
.lead-safety strong{color:#1b2925}
.lead-pipeline{
  background:#fbf8f1;
  border-color:var(--cc-line);
}
.lead-pipeline span{color:#5d6964;font-size:.72rem}
.lead-metric{background:#fbf8f1}
.lead-metric strong{color:#315b50}
.lead-card{background:#fbf8f1}
.lead-form input,.lead-form select,.lead-form textarea,
.scout-controls input,.scout-controls select{
  background:#fffdf8;color:var(--cc-ink);border-color:var(--cc-line);font-size:.9rem
}
.scout-runner{background:#e3ebe6}
.autopilot-card{background:#e7edf0}
.automation-strip>div,.prospect-card,.draft-card,.follow-up-card,
.intelligence-detail,.score-cell{
  background:#fffdf8;border-color:var(--cc-line)
}
.draft-card pre{background:#f1eee7;color:#37413d;border-color:var(--cc-line);font-size:.78rem}
.prospect-title strong,.service-row strong,.top-opportunity strong{font-size:.84rem}
.prospect-title span,.service-row span,.top-opportunity span{font-size:.7rem}
.prospect-card ul,.audit-finding{font-size:.74rem}
.funnel-bar{background:#e3e0d8;border-color:#d8d5cd}
.funnel-bar i{background:linear-gradient(90deg,#456f78,#155b57)}
.intelligence-card:nth-child(1){border-top:5px solid var(--cc-blue)}
.intelligence-card:nth-child(2){border-top:5px solid var(--cc-green)}
.intelligence-card:nth-child(3){border-top:5px solid var(--cc-amber)}
.lead-action-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:0 0 18px}
.lead-action-card{
  border:1px solid var(--cc-line);
  border-radius:18px;
  padding:20px;
  background:#fbf8f1;
  box-shadow:var(--cc-shadow);
  display:grid;
  grid-template-columns:auto 1fr;
  gap:14px;
  align-items:start;
}
.lead-action-card .num{
  width:42px;height:42px;border-radius:12px;display:grid;place-items:center;
  font:700 1rem/1 Inter,sans-serif;color:#fff;background:var(--cc-green)
}
.lead-action-card.blue .num{background:var(--cc-blue)}
.lead-action-card.amber .num{background:var(--cc-amber)}
.lead-action-card h3{margin:0 0 5px;font-family:Georgia,"Times New Roman",serif;font-size:1.3rem;font-weight:400;color:#1b2925}
.lead-action-card p{margin:0 0 12px;color:var(--cc-muted);font-size:.82rem}
.lead-action-card.amber{background:#f2e7cf}
.lead-action-card.blue{background:#e2eaf0}
.lead-action-card.green{background:#e2ebe5}
.lead-action-card .btn{justify-self:start}
details.cc-details{
  border:1px solid var(--cc-line);border-radius:16px;background:#fbf8f1;margin-bottom:14px;overflow:hidden
}
details.cc-details>summary{
  cursor:pointer;list-style:none;padding:15px 18px;font-weight:750;color:#26332f
}
details.cc-details>summary::-webkit-details-marker{display:none}
details.cc-details[open]>summary{border-bottom:1px solid var(--cc-line)}
details.cc-details>.cc-details-body{padding:18px}

/* Login */
.auth-panel{background:#e4ece8}
.auth-visual{background:#0b3633;color:#f7f3ea}
.auth-visual .auth-copy p,.auth-visual .muted{color:#cbd5cf}
.auth-card{background:#fbf8f1;color:#0b2727;border-color:var(--cc-line)}
.field input{background:#fffdf8;color:#0b2727;border-color:var(--cc-line)}

/* Scheduler */
body .app{max-width:1380px}
body .app .topbar{position:relative;background:transparent;border:0;backdrop-filter:none;padding:12px 0 20px}
body .app .brand h1{font-family:Georgia,"Times New Roman",serif;color:#1b2925;font-size:clamp(2rem,4vw,3.7rem)}
body .app .brand p{color:var(--cc-muted);font-size:.9rem}
body .status-chip{background:var(--cc-green-soft);border-color:#c8d9cf;color:#315b50}
body .panel{background:#fbf8f1;border-color:var(--cc-line);box-shadow:var(--cc-shadow);backdrop-filter:none}
body .panel-head{border-color:var(--cc-line)}
body .panel-title{color:#1f2d29;font-size:.95rem}
body .small,body .today{color:var(--cc-muted)}
body .health-banner{background:#e2ebe5;border-color:#c8d9cf}
body .health-banner.warn{background:#f0e4c9;border-color:#e1c89a}
body .health-banner b,body .health-banner p{color:#33433e}
body .execution-strip{gap:14px}
body .exec-card{background:#fbf8f1;border-color:var(--cc-line);box-shadow:var(--cc-shadow)}
body .exec-card.primary{background:#dfe9e4;border-color:#c6d8ce}
body .exec-card span{color:#66726d;font-family:Inter,sans-serif;font-size:.66rem}
body .exec-card.primary span{color:#315b50}
body .exec-card b{color:#1b2925;font-size:1rem}
body .exec-card small{color:#66726d;font-family:Inter,sans-serif}
body .block{background:#fffdf8;border-color:var(--cc-line)}
body .block h3{color:#1f2d29;font-size:.92rem}
body .block-sub{color:#6f7a75;font-size:.73rem}
body .time-marker{color:#66726d;font-family:Inter,sans-serif}
body .time-input,body .duration-value{background:#f4f1ea;color:#1f2d29;border-color:var(--cc-line)}
body .gate-tag{color:#5d6662;border-color:var(--cc-line);background:#f2f0e9}
body .metric,body .gate-card,body .check{background:#fffdf8;border-color:var(--cc-line)}
body .metric-label,body .check span{color:var(--cc-muted)}
body .metric-hours,body .summary-line b,body .check b,body .gate-name{color:#1f2d29}
body .summary-line{color:var(--cc-muted)}
body .ring:after{background:#fbf8f1;border-color:var(--cc-line)}
body .gate-rule{color:#59655f;font-family:Inter,sans-serif}
body .test-btn,body .reset-btn{background:#f2f0e9;color:#26332f;border-color:var(--cc-line)}
body .nowline{background:#dbe8e9;border-color:#c8d7e0;color:#3f6277;font-family:Inter,sans-serif}
body .legend-item{color:var(--cc-muted)}
body .toast{background:#fbf8f1;color:#1f2d29;border-color:#c8d9cf}
body .toast-rule{color:#59655f;font-family:Inter,sans-serif}

/* Stronger readability */
p,li,.row p,.entity p,.workspace-head p,.operator-answer,.draft-card pre{line-height:1.55}
small{line-height:1.35}
@media(max-width:900px){
  .command-hero{grid-template-columns:1fr}
  .command-summary-grid,.lead-action-grid{grid-template-columns:1fr}
  .command-hero .command-action{min-width:0}
}
@media(max-width:700px){
  body{font-size:15px}
  .sidebar{background:#0b3633}
  .lead-hero h1,.operator-hero h1{font-size:2.7rem}
}


/* Legacy React scheduler: force the same Calm Command visual language over Tailwind utilities. */
.daily-scheduler-calm{
  background:linear-gradient(180deg,#f5f1e9,#e9e5dc)!important;
  color:#0b2727!important;
}
.daily-scheduler-calm .panel,
.daily-scheduler-calm [class*="bg-slate-950"],
.daily-scheduler-calm [class*="bg-slate-900"],
.daily-scheduler-calm [class*="bg-[#0b111c]"],
.daily-scheduler-calm [class*="bg-black"]{
  background:#fbf8f1!important;
  border-color:var(--cc-line)!important;
  box-shadow:var(--cc-shadow)!important;
}
.daily-scheduler-calm .text-white,
.daily-scheduler-calm .text-slate-100,
.daily-scheduler-calm .text-slate-200,
.daily-scheduler-calm .text-slate-300{
  color:#1f2d29!important;
}
.daily-scheduler-calm .text-slate-400,
.daily-scheduler-calm .text-slate-500,
.daily-scheduler-calm .text-slate-600{
  color:#66726d!important;
}
.daily-scheduler-calm [class*="border-white"]{border-color:var(--cc-line)!important}
.daily-scheduler-calm [class*="divide-white"]> :not([hidden])~ :not([hidden]){border-color:var(--cc-line)!important}
.daily-scheduler-calm [class*="bg-white"]{background-color:#f2f0e9!important}
.daily-scheduler-calm [class*="text-emerald"]{color:#155b57!important}
.daily-scheduler-calm [class*="text-sky"],
.daily-scheduler-calm [class*="text-cyan"]{color:#456f78!important}
.daily-scheduler-calm [class*="text-amber"]{color:#9a6e2d!important}
.daily-scheduler-calm [class*="text-violet"]{color:#735f8f!important}
.daily-scheduler-calm input{
  background:#fffdf8!important;
  color:#1f2d29!important;
  border-color:var(--cc-line)!important;
}
.daily-scheduler-calm h1{
  font-family:Georgia,"Times New Roman",serif!important;
  font-weight:400!important;
  color:#1b2925!important;
}
.daily-scheduler-calm p{color:#66726d}
.daily-scheduler-calm footer{border-color:var(--cc-line)!important}

/* Approval gates: the thing being approved is the page. Metadata stays secondary. */
.approval-focus{display:grid;gap:14px;margin-bottom:16px}
.approval-preview-head{
  padding:22px 24px;
  border:1px solid #cbd9d1;
  border-radius:18px;
  background:linear-gradient(130deg,#dfe9e4,#edf0ea);
  box-shadow:var(--cc-shadow);
}
.approval-preview-head h2{
  margin:.35rem 0 .4rem;
  font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(1.8rem,3vw,2.55rem);
  font-weight:400;
  color:#1b2925;
}
.approval-preview-head p{margin:0;color:#5f6b66;font-size:.9rem}
.approval-design-preview{overflow:hidden;background:#fbf8f1;border-color:#cfd6d1}
.approval-design-preview .direction-preview-toolbar{
  background:#f1eee7;
  border-bottom-color:var(--cc-line);
  color:#1f2d29;
}
.approval-design-preview .direction-preview-toolbar strong{font-size:.9rem;color:#1f2d29}
.approval-design-preview .direction-preview-toolbar small{font-size:.75rem;color:#68736e}
.approval-decision-card,
body:not([data-theme="dark"]) .owner-decision-card{
  background:#fbf8f1;
  color:#1f2d29;
  border-color:var(--cc-line);
  box-shadow:var(--cc-shadow);
}
body:not([data-theme="dark"]) .owner-decision-card h3{color:#1f2d29}
body:not([data-theme="dark"]) .owner-primary-action{
  background:var(--cc-green);
  border-color:var(--cc-green);
  color:#fff;
}
body:not([data-theme="dark"]) .owner-primary-action:hover{background:#0c4744;border-color:#0c4744;color:#fff}
body:not([data-theme="dark"]) .owner-revision-panel label{color:#53605a}
body:not([data-theme="dark"]) .owner-revision-panel textarea,
body:not([data-theme="dark"]) .owner-delivery-note textarea{
  background:#fffdf8;color:#1f2d29;border-color:var(--cc-line)
}
body:not([data-theme="dark"]) .owner-action-hero{
  background:linear-gradient(130deg,#dfe9e4,#edf0ea);
  border-color:#cbd9d1;
  box-shadow:var(--cc-shadow);
}
body:not([data-theme="dark"]) .owner-action-kicker{color:var(--cc-green)}
body:not([data-theme="dark"]) .owner-action-hero h2,
body:not([data-theme="dark"]) .owner-action-title{color:#1b2925}
body:not([data-theme="dark"]) .owner-action-hero p,
body:not([data-theme="dark"]) .owner-action-copy{color:#53605a}
body:not([data-theme="dark"]) .owner-next-step-card:hover{
  border-color:#8eafa4;
  box-shadow:0 18px 42px rgba(36,44,41,.13)
}
body:not([data-theme="dark"]) .owner-next-step-card:focus-visible{outline-color:var(--cc-green)}
body:not([data-theme="dark"]) .owner-action-cta{color:var(--cc-green)}

/* Queued internal work is an action state, not a passive success state. */
body:not([data-theme="dark"]) .owner-action-hero.is-queued{
  background:linear-gradient(130deg,#f0e4c9,#f7f0df);
  border-color:#e1c89a;
}
body:not([data-theme="dark"]) .owner-action-hero.is-queued .owner-action-kicker{
  color:#7c5720;
}
body:not([data-theme="dark"]) .studio-modal{
  background:#fbf8f1;
  color:#1f2d29;
  border-color:var(--cc-line);
  box-shadow:0 36px 100px rgba(36,44,41,.22);
}
body:not([data-theme="dark"]) .studio-modal::backdrop{background:rgba(36,44,41,.34)}
body:not([data-theme="dark"]) .studio-modal .modal-close,
body:not([data-theme="dark"]) .studio-modal .field input,
body:not([data-theme="dark"]) .studio-modal .field textarea,
body:not([data-theme="dark"]) .studio-modal .field select{
  background:#fffdf8;
  color:#1f2d29;
  border-color:var(--cc-line);
}
body:not([data-theme="dark"]) .studio-modal .field textarea{
  width:100%;
  min-height:110px;
  border-radius:11px;
  padding:.85rem;
  resize:vertical;
  outline:none;
}
body:not([data-theme="dark"]) .studio-modal .field label{color:#53605a}
body:not([data-theme="dark"]) .studio-modal .error{color:var(--cc-red)}
body:not([data-theme="dark"]) .studio-modal .modal-status{color:var(--cc-muted);min-height:1.2em;margin-top:6px}
body:not([data-theme="dark"]) .studio-modal .btn.ghost{color:#1f2d29;background:transparent;border-color:var(--cc-line)}
.approval-preview-missing{border-left:5px solid var(--cc-red)}
.approval-preview-missing p{margin:.35rem 0 0;color:var(--cc-muted)}
.approval-history{margin-top:6px}

/* Loki belongs to Calm Command. Opaque surfaces and their own stacking layer
   keep page headings behind the panel, including on iPad Safari. */
.main>.topbar{z-index:40}
.main>.content{position:relative;z-index:0}
.neo-top-panel{background:#dbe8e9;color:#0b2727;border-color:#b6c9d4;backdrop-filter:none;max-height:calc(100dvh - 110px);overflow-y:auto;overscroll-behavior:contain;isolation:isolate}
.neo-top-panel .neo-top-panel-head strong,.neo-top-panel .neo-top-answer{color:#0b2727}
.neo-top-panel .neo-top-answer{background:#f8fafb;border-color:#b6c9d4;overflow-wrap:anywhere}
.neo-top-panel .studio-loki-activity{background:#edf3f6;border-color:#b6c9d4;color:#0b2727}
.neo-top-panel .studio-loki-activity small,.neo-top-panel .studio-loki-event span,.neo-top-panel .muted{color:#485c67}
.neo-top-panel .btn.ghost{background:#f8fafb;color:#244b43;border-color:#a4bcb7}
.neo-top-panel .studio-loki-form input{background:#fff;color:#0b2727;-webkit-text-fill-color:#0b2727;caret-color:#155b57;border-color:#a4bcb7}
.neo-top-panel .studio-loki-form input::placeholder{color:#526570;-webkit-text-fill-color:#526570}
.neo-top-panel .studio-loki-sources a{color:#244b43}
body[data-theme="dark"] .neo-top-panel{background:#26343d;color:#f2eee5;border-color:#526570}
body[data-theme="dark"] .neo-top-panel .neo-top-panel-head strong,body[data-theme="dark"] .neo-top-panel .neo-top-answer{color:#f2eee5}
body[data-theme="dark"] .neo-top-panel .neo-top-answer,body[data-theme="dark"] .neo-top-panel .studio-loki-activity{background:#1d2a32;color:#f2eee5;border-color:#526570}
body[data-theme="dark"] .neo-top-panel .studio-loki-activity small,body[data-theme="dark"] .neo-top-panel .studio-loki-event span,body[data-theme="dark"] .neo-top-panel .muted{color:#c0ced7}
body[data-theme="dark"] .neo-top-panel .btn.ghost,body[data-theme="dark"] .neo-top-panel .studio-loki-sources a{background:#334750;color:#f2eee5}

/* Loki drone mission progress */
.loki-drone-progress{
  display:grid;
  gap:8px;
  margin:0 0 10px;
  padding:12px;
  border:1px solid rgba(62,103,93,.22);
  border-radius:12px;
  background:rgba(62,103,93,.07);
}
.loki-drone-progress-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.loki-drone-progress-head strong{font-size:12px;color:#244b43}
.loki-drone-progress-head span{font-size:10px;color:var(--cc-muted,#61726f);text-align:right}
.loki-drone-progress-track{position:relative;height:5px;overflow:hidden;border-radius:999px;background:rgba(62,103,93,.13)}
.loki-drone-progress-track i{position:absolute;inset:0 auto 0 -35%;width:35%;border-radius:999px;background:var(--cc-green,#155b57);animation:lokiDroneSweep 1.35s ease-in-out infinite}
.loki-drone-progress small{color:var(--cc-muted,#61726f);font-size:10px;line-height:1.4}
.loki-drone-roster{display:flex;flex-wrap:wrap;gap:5px}
.loki-drone-roster span{padding:4px 7px;border:1px solid rgba(62,103,93,.16);border-radius:999px;background:rgba(255,255,255,.45);font-size:9px;color:#43534e}
@keyframes lokiDroneSweep{0%{left:-35%}100%{left:100%}}
@media(prefers-reduced-motion:reduce){.loki-drone-progress-track i{animation:none;left:0;width:100%;opacity:.55}}

body[data-theme="dark"] .loki-drone-progress{background:rgba(93,145,132,.12);border-color:rgba(133,184,170,.28)}
body[data-theme="dark"] .loki-drone-progress-head strong,body[data-theme="dark"] .loki-drone-roster span{color:#e5f1ec}
body[data-theme="dark"] .loki-drone-progress-head span,body[data-theme="dark"] .loki-drone-progress small{color:#c0ced7}
body[data-theme="dark"] .loki-drone-roster span{background:rgba(255,255,255,.04);border-color:rgba(255,255,255,.12)}


/* Mineracy Digital Studio official identity — faceted mineral technology */
.brand img{width:58px;height:58px;object-fit:contain;object-position:center;border-radius:12px;background:transparent;filter:drop-shadow(0 7px 12px rgba(2,25,24,.22))}
.sidebar .brand{gap:13px}
.sidebar .brand strong,.operator-top .brand strong,.lead-top .brand strong{color:#f8f4eb;letter-spacing:.2em}
.sidebar .brand span,.operator-top .brand span,.lead-top .brand span{color:#c5d7d2}
.operator-top,.lead-top{border-color:rgba(169,133,80,.22)}
.operator-top .brand,.lead-top .brand{color:var(--cc-ink)}
.operator-top .brand strong,.lead-top .brand strong{color:#123c39}
.operator-top .brand span,.lead-top .brand span{color:#56716c}
body[data-theme="dark"] .operator-top .brand strong,body[data-theme="dark"] .lead-top .brand strong{color:#f8f4eb}
body[data-theme="dark"] .operator-top .brand span,body[data-theme="dark"] .lead-top .brand span{color:#c5d7d2}
.auth-visual{background:radial-gradient(circle at 12% 12%,rgba(69,111,120,.15),transparent 25rem),linear-gradient(145deg,#0a302e,#071f1e)}
.auth-visual .brand strong{color:#f8f4eb}
.auth-visual .brand span{color:#c5d7d2}
.auth-visual .auth-copy p,.auth-visual>.muted{color:#c0ceca!important}
.auth-panel{background:#eeeae1}
body:not([data-theme="dark"]) .neo-top-panel{background:#dbe8e9;border-color:#aec7c8}
