
/* ===== V40 — global surface separation + creative tonal contrast ===== */
:root{
  --v40-bg:#070913;
  --v40-bg-2:#0b0e1c;
  --v40-surface-1:linear-gradient(180deg,rgba(14,18,40,.96) 0%,rgba(11,14,31,.98) 100%);
  --v40-surface-2:linear-gradient(180deg,rgba(19,15,51,.96) 0%,rgba(12,13,34,.98) 100%);
  --v40-surface-3:linear-gradient(135deg,rgba(31,21,74,.92) 0%,rgba(15,20,46,.96) 58%,rgba(18,14,36,.98) 100%);
  --v40-surface-soft:linear-gradient(135deg,rgba(28,27,68,.82),rgba(14,18,42,.9));
  --v40-card-a:linear-gradient(135deg,rgba(83,66,182,.18),rgba(13,17,40,.96));
  --v40-card-b:linear-gradient(135deg,rgba(193,73,155,.16),rgba(16,18,43,.96));
  --v40-card-c:linear-gradient(135deg,rgba(61,121,241,.16),rgba(14,18,45,.96));
  --v40-line:rgba(152,148,255,.20);
  --v40-line-strong:rgba(214,113,213,.26);
  --v40-shadow:0 20px 50px rgba(3,6,20,.42);
  --v40-shadow-soft:0 12px 30px rgba(4,8,25,.28);
  --v40-inset:inset 0 1px 0 rgba(255,255,255,.06), inset 0 0 0 1px rgba(255,255,255,.02);
  --v40-text:#eef1ff;
  --v40-muted:#aeb4d7;
  --v40-subtle:#8b92bc;
  --v40-accent-1:#8f73ff;
  --v40-accent-2:#e567b7;
  --v40-accent-3:#53a7ff;
  --v40-accent-4:#ff8f66;
}
body{
  background:
    radial-gradient(circle at 20% 15%,rgba(120,76,255,.14),transparent 26%),
    radial-gradient(circle at 80% 10%,rgba(233,89,161,.13),transparent 22%),
    radial-gradient(circle at 70% 72%,rgba(73,143,255,.10),transparent 24%),
    linear-gradient(180deg,var(--v40-bg) 0%,var(--v40-bg-2) 100%) !important;
  color:var(--v40-text)!important;
}
body:before{
  content:'';position:fixed;inset:0;pointer-events:none;z-index:-1;
  background:linear-gradient(180deg,rgba(255,255,255,.02),transparent 18%,transparent 82%,rgba(255,255,255,.015));
}
p,.small,.hint,.source-list span,.brand small,.section-heading p,.selection-bar small,.review p,.method-source>span,.workflow-meta,.workflow-info,.workflow-head p,.knowledge-head p,.admin-sub,.admin-mini,.privacy-note,.welcome-note,.welcome-lead{color:var(--v40-muted)!important}
a{color:#9cc7ff!important}

/* major windows / shells */
header,.sidebar,.panel,.proposal-main,.welcome-shell,.welcome-intake,.intake-card,.admin-shell,.workflow-shell,.knowledge-shell,.pro-shell-v17,.hub-card,.inspiration-card,.idea-card,.pro-card{
  background:var(--v40-surface-1)!important;
  color:var(--v40-text)!important;
  border:1px solid var(--v40-line)!important;
  box-shadow:var(--v40-shadow),var(--v40-inset)!important;
}
header,.welcome-shell,.intake-card,.admin-shell,.workflow-shell,.knowledge-shell,.pro-shell-v17{background:var(--v40-surface-3)!important}
.sidebar{background:var(--v40-surface-2)!important}
.panel,.proposal-main{background:linear-gradient(180deg,rgba(13,16,36,.98),rgba(10,13,30,.99))!important}

/* section blocks */
.family-section,.format-section,.sources-box,.reference-box,.reviewer-box,.spotlight,.notice,.selection-bar,.custom-method,.item-reference,.admin-card,.admin-preview-note,.workflow-result-box,.workflow-eval-card,.workflow-list-panel,.workflow-detail-panel,.workflow-detail,.workflow-composer,.workflow-section,.hub-item,.hub-wide-tips,.pro-topic,.source-list>div,.review,.banner-slot-inner,.welcome-bottom-line,.welcome-pro-line,.workflow-stat,.workflow-message,.workflow-snapshot,.workflow-evaluation-fields,.workflow-toolbar,.admin-footerbar,.admin-toolbar,.format-trend-note,.profile-review,.proposal-item,.proposal,.choice-card,.choice-cards{
  background:var(--v40-surface-soft)!important;
  color:var(--v40-text)!important;
  border:1px solid rgba(145,137,255,.15)!important;
  box-shadow:var(--v40-shadow-soft),var(--v40-inset)!important;
}
.notice,.welcome-bottom-line,.welcome-pro-line,.banner-slot-inner{background:linear-gradient(135deg,rgba(94,67,214,.20),rgba(230,94,161,.13),rgba(18,21,46,.94))!important}
.spotlight{background:linear-gradient(135deg,rgba(83,167,255,.15),rgba(125,87,255,.13),rgba(13,16,36,.96))!important}
.selection-bar,.admin-toolbar,.workflow-toolbar{backdrop-filter:blur(12px)!important}

/* cards / repeated items */
.family-card,.format-card,.execution-card,.source-list>div,.workflow-list-item,.workflow-item,.hub-item,.proposal-item,.pro-topic,.choice-card,.workflow-eval-card,.workflow-message,.workflow-mini-btn,.ref-group,.workflow-result-row,.workflow-file-link,.admin-list>*,.workflow-info-grid>div,.source-mini,.pill{
  background:var(--v40-card-a)!important;
  color:var(--v40-text)!important;
  border:1px solid rgba(146,138,255,.18)!important;
  border-right:4px solid var(--v40-accent-1)!important;
  box-shadow:var(--v40-shadow-soft),var(--v40-inset)!important;
}
.family-card:nth-child(3n+2),.format-card:nth-child(3n+2),.workflow-list-item:nth-child(3n+2),.hub-item:nth-child(3n+2),.proposal-item:nth-child(3n+2),.choice-card:nth-child(3n+2),.source-list>div:nth-child(3n+2){
  background:var(--v40-card-b)!important;border-right-color:var(--v40-accent-2)!important;
}
.family-card:nth-child(3n),.format-card:nth-child(3n),.workflow-list-item:nth-child(3n),.hub-item:nth-child(3n),.proposal-item:nth-child(3n),.choice-card:nth-child(3n),.source-list>div:nth-child(3n){
  background:var(--v40-card-c)!important;border-right-color:var(--v40-accent-3)!important;
}
.execution-card{background:linear-gradient(135deg,rgba(255,140,102,.10),rgba(15,18,41,.96))!important;border-right-color:var(--v40-accent-4)!important}
.execution-card.selected,.format-card.selected,.family-card.selected,.workflow-list-item.active,.workflow-item.active,.hub-item.active,.choice-card.selected{
  box-shadow:0 0 0 1px rgba(255,255,255,.06),0 0 0 2px rgba(143,115,255,.25),0 18px 38px rgba(2,8,24,.38)!important;
  transform:translateY(-1px);
}

/* texts inside item cards */
.family-card>span:not(.family-index),.format-card span,.format-card em,.open-label,.variant-count,.ref-group a,.workflow-status-row,.workflow-status-badge,.workflow-message-head,.hub-meta,.hub-tag,.proposalId,.workflowId{color:var(--v40-muted)!important}
.family-index,.section-number,.workflow-eyebrow,.tag,.pill,.hub-tag,.status-approved,.status-reviewing,.status-revision{box-shadow:inset 0 1px 0 rgba(255,255,255,.08)!important}
.tag,.pill,.hub-tag,.workflow-status-badge,.status-approved,.status-reviewing,.status-revision{
  background:rgba(255,255,255,.07)!important;border:1px solid rgba(255,255,255,.10)!important;color:#f4f6ff!important;
}
.status-approved{background:rgba(58,194,122,.14)!important;border-color:rgba(58,194,122,.25)!important;color:#aaf4c7!important}
.status-reviewing{background:rgba(255,196,76,.14)!important;border-color:rgba(255,196,76,.24)!important;color:#ffe6a0!important}
.status-revision{background:rgba(235,110,122,.14)!important;border-color:rgba(235,110,122,.24)!important;color:#ffbdc4!important}

/* controls */
input,textarea,select,.field-clean input,.field-clean select,.admin-field input,.admin-field textarea,.admin-field select,.method-select,.hub-search input,.workflow-composer textarea,.workflow-composer input{
  background:linear-gradient(180deg,rgba(8,11,25,.92),rgba(14,17,35,.96))!important;
  color:#f1f3ff!important;
  border:1px solid rgba(140,138,255,.20)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04),0 6px 20px rgba(2,6,18,.20)!important;
}
input::placeholder,textarea::placeholder{color:#7e86b2!important}
input:focus,textarea:focus,select:focus,.field-clean input:focus,.field-clean select:focus,.admin-field input:focus,.admin-field textarea:focus,.admin-field select:focus{
  border-color:rgba(162,146,255,.52)!important;
  box-shadow:0 0 0 3px rgba(139,115,255,.15),0 10px 24px rgba(3,8,20,.22)!important;
}

/* buttons */
.btn,.workflow-mini-btn,.hub-primary,.hub-secondary,.knowledge-close,.workflow-close,.admin-tab,.top-action,.text-button{
  background:linear-gradient(180deg,rgba(22,26,56,.96),rgba(16,19,42,.98))!important;
  color:var(--v40-text)!important;
  border:1px solid rgba(150,145,255,.18)!important;
  box-shadow:0 12px 24px rgba(2,6,20,.20),inset 0 1px 0 rgba(255,255,255,.06)!important;
}
.btn.primary,.welcome-start,.welcome-pro-cta,.pro-fab.pro-attention,.workflow-submit,.hub-primary{
  background:linear-gradient(135deg,#6f46f4 0%,#9a54fa 38%,#ee4f93 100%)!important;
  border-color:rgba(255,255,255,.12)!important;
  color:#fff!important;
}
.btn:hover,.workflow-mini-btn:hover,.hub-item:hover,.format-card:hover,.family-card:hover,.workflow-list-item:hover,.proposal-item:hover,.choice-card:hover,.pro-topic:hover{filter:brightness(1.05)!important}

/* navigation / steps */
.step{background:rgba(255,255,255,.025)!important;border:1px solid transparent;color:var(--v40-muted)!important}
.step b{background:rgba(255,255,255,.07)!important;color:#fff!important}
.step.active{background:linear-gradient(135deg,rgba(111,70,244,.24),rgba(229,86,183,.18),rgba(255,255,255,.04))!important;border-color:rgba(159,145,255,.22)!important;color:#fff!important}
.step.active b{background:linear-gradient(135deg,#7f57ff,#eb5fb2)!important}
.progress{background:rgba(255,255,255,.07)!important}.progress div{background:linear-gradient(90deg,#6e42ef,#ef4f93,#53a7ff)!important}
.foot{background:rgba(8,10,22,.82)!important;border-top:1px solid rgba(155,148,255,.14)!important;backdrop-filter:blur(16px)!important}

/* tabs and modal internals */
.admin-nav,.knowledge-head,.workflow-head,.admin-head{border-bottom:1px solid rgba(154,146,255,.16)!important}
.admin-tab.active{background:linear-gradient(135deg,rgba(111,70,244,.25),rgba(229,86,183,.18))!important;border-color:rgba(171,153,255,.30)!important}
.ref-group,.source-list>div,.item-reference,.workflow-stat,.workflow-info-grid>div{border-radius:16px!important}
.workflow-list-panel,.workflow-detail-panel,.workflow-detail{background:linear-gradient(180deg,rgba(14,17,38,.96),rgba(10,13,30,.98))!important}
.workflow-stat::before{opacity:.9!important}

/* icon surfaces */
.ui-svg,.welcome-bulb,.pro-topic-icon,.mark{
  background:linear-gradient(135deg,rgba(113,71,245,.28),rgba(232,88,166,.18),rgba(82,166,255,.14))!important;
  color:#fff!important;
  border:1px solid rgba(182,171,255,.18)!important;
  box-shadow:0 10px 24px rgba(3,8,20,.24), inset 0 1px 0 rgba(255,255,255,.10)!important;
}
.ui-svg svg{stroke:currentColor!important}

/* subtle creative separators */
.panel::before,.proposal-main::before,.admin-shell::before,.workflow-shell::before,.knowledge-shell::before,.welcome-shell::before,.intake-card::before{
  content:'';position:absolute;inset:0 auto auto 0;height:1px;width:100%;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.18),transparent);
  pointer-events:none;
}
.panel,.proposal-main,.admin-shell,.workflow-shell,.knowledge-shell,.welcome-shell,.intake-card{position:relative;overflow:hidden}

/* scrollbars */
*{scrollbar-color:#6e4cef #11162b}
*::-webkit-scrollbar{width:11px;height:11px}
*::-webkit-scrollbar-track{background:#11162b}
*::-webkit-scrollbar-thumb{background:linear-gradient(180deg,#6f46f4,#e85aa5);border-radius:999px;border:2px solid #11162b}

@media (max-width:760px){
  .panel,.proposal-main,.welcome-shell,.intake-card,.admin-shell,.workflow-shell,.knowledge-shell{border-radius:22px!important}
  .family-card,.format-card,.execution-card,.workflow-list-item,.hub-item,.proposal-item,.choice-card{border-right-width:3px!important}
}
