body[data-theme="bright"]{--ink:#173656;--navy:#fff;--navy-2:#edf5ff;--teal:#2167d5;--teal-dark:#1855b5;--cyan:#2167d5;--paper:#f4f8fd;--card:#fff;--line:#dce6f1;--muted:#52677d;--shadow:0 12px 30px rgba(35,80,130,.07)}
body[data-theme="bright"] .sidebar{background:#fff;color:#173656;border-right:1px solid #dce6f1;box-shadow:none}
body[data-theme="bright"] .brand,body[data-theme="bright"] .sidebar-footer{border-color:#e2eaf4}
body[data-theme="bright"] .brand small,body[data-theme="bright"] .nav-label,body[data-theme="bright"] .sidebar-footer small{color:#61758b}
body[data-theme="bright"] .nav-item{color:#415e79}
body[data-theme="bright"] .nav-item span{color:#66809a}
body[data-theme="bright"] .nav-item.active,body[data-theme="bright"] .nav-item:hover{color:#175db9;background:#eaf3ff}
body[data-theme="bright"] .nav-item.active span{color:#175db9}
body[data-theme="bright"] .role-admin{background:#eaf3ff;color:#175db9}
body[data-theme="bright"] .topbar{background:#ffffffef}
body[data-theme="bright"] .metric-card strong{color:#2167d5}
body[data-theme="bright"] .metric-card,body[data-theme="bright"] .form-card,body[data-theme="bright"] .data-table-wrap{box-shadow:0 3px 14px rgba(35,80,130,.04)}
body[data-theme="bright"] .data-table th{background:#edf4fc;color:#365775}
body[data-theme="bright"] .data-table tbody tr:hover{background:#f0f6ff}
body[data-theme="bright"] input,body[data-theme="bright"] select,body[data-theme="bright"] textarea{background:#fff;border-color:#cbd9e8;color:#173656}
body[data-theme="bright"] .secondary-button,body[data-theme="bright"] .ghost-button{background:#fff;border:1px solid #cbd9e8;color:#265686}
body[data-theme="bright"] .primary-button{box-shadow:0 4px 10px #2167d51a}
body[data-theme="bright"] .recent-list{border-top-color:#b8cce3}

/* Second preview: gentle colour families and clearer visual hierarchy. */
body[data-theme="bright"]{--paper:#f5f8fb;--teal:#087f88;--teal-dark:#066770;--cyan:#25a7ad;--line:#dce5ed;--ink:#18364e}
body[data-theme="bright"] .sidebar{background:linear-gradient(165deg,#eaf4fb 0%,#f1f8fa 50%,#e9f3f4 100%);border-right-color:#d3e3ea}
body[data-theme="bright"] .brand-mark{background:#13858e;box-shadow:0 4px 12px #087f8820}
body[data-theme="bright"] .nav-item.active{background:#d6ecee;color:#075f69;box-shadow:inset 3px 0 #13858e}
body[data-theme="bright"] .nav-item:hover{background:#e0eef3;color:#17536a}
body[data-theme="bright"] .nav-item.active span{color:#08717b}
body[data-theme="bright"] .role-admin{background:#fff0d6;color:#835513}
body[data-theme="bright"] .topbar{background:#fffdf9;border-bottom-color:#e7e6df}
body[data-theme="bright"] .page-heading{padding:23px 25px;background:linear-gradient(110deg,#e3f1f4,#eff6fc 65%,#fff6e8);border:1px solid #d8e8ed;border-radius:12px;align-items:center}
body[data-theme="bright"] .metric-card{border-radius:10px;border-top:4px solid var(--accent,#2e7baa);background:var(--tint,#fff);box-shadow:0 4px 14px #24475a06}
body[data-theme="bright"] .metric-card strong{color:var(--accent,#2e7baa)}
body[data-theme="bright"] .metric-card:nth-child(5n+1){--accent:#2b78a9;--tint:#f1f8fe}
body[data-theme="bright"] .metric-card:nth-child(5n+2){--accent:#18897e;--tint:#f0faf6}
body[data-theme="bright"] .metric-card:nth-child(5n+3){--accent:#7760a7;--tint:#f7f4fc}
body[data-theme="bright"] .metric-card:nth-child(5n+4){--accent:#ac7625;--tint:#fff9ed}
body[data-theme="bright"] .metric-card:nth-child(5n+5){--accent:#b06167;--tint:#fff4f3}
body[data-theme="bright"] .metric-index{color:var(--accent);opacity:.75}
body[data-theme="bright"] .metric-card small{color:#61758b}
body[data-theme="bright"] .primary-button{background:#087f88;box-shadow:0 4px 12px #087f881f;border-radius:6px}
body[data-theme="bright"] .primary-button:hover{background:#066770}
body[data-theme="bright"] .secondary-button,body[data-theme="bright"] .ghost-button{border-radius:6px;color:#336479}
body[data-theme="bright"] .data-table-wrap,body[data-theme="bright"] .form-card{border-radius:10px}
body[data-theme="bright"] .data-table th{background:#e5f1f3;color:#215967}
body[data-theme="bright"] .data-table tbody tr:nth-child(even){background:#f8fbfd}
body[data-theme="bright"] .data-table tbody tr:hover{background:#edf7f6}
body[data-theme="bright"] .recent-list{background:#fff;border:1px solid #dce5ed;border-radius:10px}
body[data-theme="bright"] .recent-list a{padding:17px 18px}
body[data-theme="bright"] .recent-list a:last-child{border-bottom:0}
body[data-theme="bright"] .record-type{background:#e8f4f2;padding:5px 9px;border-radius:5px;width:fit-content}
body[data-theme="bright"] .record-form .form-grid>label>span:first-child{color:#246478}
body[data-theme="bright"] input:focus,body[data-theme="bright"] textarea:focus{outline:2px solid #7cc5c8;outline-offset:1px}
@media(max-width:820px){body[data-theme="bright"] .page-heading{padding:18px}body[data-theme="bright"] .recent-list a{padding:14px 10px}}

/* Shared production theme: all authenticated and anonymous pages. */
:root { color-scheme: light; background: #f5f8fb; }
body[data-theme="bright"] { color: var(--ink); --accent:#087f88; --tint:#eaf5f6; }
body[data-theme="bright"] .data-table-wrap { overflow:auto; }
body[data-theme="bright"] .form-card { overflow:visible; }
body[data-theme="bright"] .detail-card,
body[data-theme="bright"] .relation-panel,
body[data-theme="bright"] .upload-card,
body[data-theme="bright"] .pending-card,
body[data-theme="bright"] .login-card { background:#fff; border-color:var(--line); border-radius:10px; box-shadow:0 3px 14px #2350820a; }
body[data-theme="bright"] .login-stage,
body[data-theme="bright"] .pending-stage { background:linear-gradient(135deg,#e3f1f4,#eff6fc 65%,#fff6e8); }
body[data-theme="bright"] .login-intro { background:linear-gradient(145deg,#e3f1f4,#edf5fc); }
body[data-theme="bright"] .login-intro-inner { color:var(--ink); }
body[data-theme="bright"] .login-intro p { color:var(--muted); }
body[data-theme="bright"] .system-kicker { color:#08717b; }
body[data-theme="bright"] .login-intro:before { border-color:#bedee4; box-shadow:0 0 0 90px #a8d6dd12,0 0 0 180px #a8d6dd0a; }
body[data-theme="bright"] .relation-map { background:#ffffffa6; border-color:#cbdfe9; box-shadow:0 10px 30px #2350820a; }
body[data-theme="bright"] .relation-map-header { border-color:#dce5ed; color:#45637b; }
body[data-theme="bright"] .relation-map-header small { color:#08717b; }
body[data-theme="bright"] .relation-node { background:#fff; color:var(--ink); border-color:#bed8e3; box-shadow:0 3px 12px #2350820a; }
body[data-theme="bright"] .relation-node > span { color:#08717b; border-color:#b5dadd; }
body[data-theme="bright"] .relation-node small,
body[data-theme="bright"] .relation-hub small { color:#52677d; }
body[data-theme="bright"] .relation-hub { background:radial-gradient(circle at 35% 30%,#fff,#d9edef); color:var(--ink); border-color:#7db9bf; box-shadow:0 0 0 8px #d6ecee55,0 8px 25px #23508212; }
body[data-theme="bright"] .relation-hub > span { color:#08717b; }
body[data-theme="bright"] .copy-toast { background:#173656; color:#fff; }
body[data-theme="bright"] .role-viewer { background:#e5f1fb; color:#265c83; }
body[data-theme="bright"] .role-editor { background:#dff3ee; color:#17665b; }
body[data-theme="bright"] .field-grid dt { color:#52677d; }
body[data-theme="bright"] .field-grid div,
body[data-theme="bright"] .relation-panel a,
body[data-theme="bright"] .data-table td { border-color:#e2eaf1; }
body[data-theme="bright"] .relation-panel a:hover { background:var(--tint); }
body[data-theme="bright"] .select-search-option[aria-pressed=true] { background:#d6ecee; color:#075f69; }
body[data-theme="bright"] .select-search-option:hover { background:#edf7f8; }
body[data-theme="bright"] .select-search-panel { background:#fff; border-color:#bdd5e2; border-radius:6px; }
body[data-theme="bright"] .stack-form textarea { border-color:#cbd9e8; border-radius:6px; }
body[data-theme="bright"] :is(input,select,textarea,button,a):focus-visible { outline:2px solid #08717b; outline-offset:3px; }
body[data-theme="bright"] .form-card + .form-card { margin-top:18px; }

body[data-theme="bright"] [data-entity="companies"],body[data-theme="bright"][data-entity="companies"],body[data-theme="bright"] [data-entity="activities"],body[data-theme="bright"][data-entity="activities"] { --accent:#2b78a9; --tint:#f1f8fe; }

body[data-theme="bright"] [data-entity="schools"],body[data-theme="bright"][data-entity="schools"],body[data-theme="bright"] [data-entity="talent_matches"],body[data-theme="bright"][data-entity="talent_matches"] { --accent:#18897e; --tint:#f0faf6; }

body[data-theme="bright"] [data-entity="teachers"],body[data-theme="bright"][data-entity="teachers"],body[data-theme="bright"] [data-entity="guidance_projects"],body[data-theme="bright"][data-entity="guidance_projects"] { --accent:#7760a7; --tint:#f7f4fc; }

body[data-theme="bright"] [data-entity="company_interactions"],body[data-theme="bright"][data-entity="company_interactions"],body[data-theme="bright"] [data-entity="annual_summaries"],body[data-theme="bright"][data-entity="annual_summaries"] { --accent:#ac7625; --tint:#fff9ed; }

body[data-theme="bright"] [data-entity="school_interactions"],body[data-theme="bright"][data-entity="school_interactions"],body[data-theme="bright"] [data-entity="success_cases"],body[data-theme="bright"][data-entity="success_cases"] { --accent:#b06167; --tint:#fff4f3; }

body[data-theme="bright"][data-entity]:not([data-entity=""]) { --teal:color-mix(in srgb,var(--accent),black 15%); --teal-dark:color-mix(in srgb,var(--accent),black 30%); }
body[data-theme="bright"][data-entity]:not([data-entity=""]) .page-heading { background:linear-gradient(110deg,var(--tint),#fff); border-left:4px solid var(--accent); }
body[data-theme="bright"][data-entity]:not([data-entity=""]) .data-table th { background:var(--tint); color:var(--ink); }
body[data-theme="bright"][data-entity]:not([data-entity=""]) .primary-button { background:var(--teal); }
body[data-theme="bright"][data-entity]:not([data-entity=""]) .primary-button:hover { background:var(--teal-dark); }
body[data-theme="bright"][data-entity]:not([data-entity=""]) .nav-item.active { background:var(--tint); color:var(--teal); box-shadow:inset 3px 0 var(--accent); }
body[data-theme="bright"] .record-form .form-grid>label>span:first-child { color:var(--ink); }
@media(max-width:820px) { body[data-theme="bright"] .page-heading { gap:16px; } }
body[data-theme="bright"] .recent-list strong { min-width:0; overflow-wrap:anywhere; }
@media(max-width:820px) { body[data-theme="bright"] .recent-list a { grid-template-columns:80px minmax(0,1fr) 20px; } }
body[data-theme="bright"] .form-card { min-width:0; overflow-wrap:anywhere; }
body[data-theme="bright"] .stack-form { min-width:0; }
body[data-theme="bright"] .stack-form textarea { min-width:0; max-width:100%; }
/* Touch targets and narrow screens share the same theme. */
@media(max-width:820px) {
  body[data-theme="bright"] :is(.primary-button,.secondary-button,.ghost-button,.danger-button,.icon-button,.select-search-option) { min-height:44px; }
  body[data-theme="bright"] .form-actions { flex-wrap:wrap; }
  body[data-theme="bright"] .filter-form { max-width:100%; }
  body[data-theme="bright"] .filter-form input { min-width:0; }
  body[data-theme="bright"] .page-heading > div { min-width:0; max-width:100%; overflow-wrap:anywhere; }
  body[data-theme="bright"] .select-search-panel { max-height: min(360px,60vh); overflow:auto; }
}
body[data-theme="bright"] label.form-card { display:grid; gap:10px; margin-top:18px; }
body[data-theme="bright"] label.form-card input { width:100%; min-width:0; min-height:44px; padding:10px 12px; border:1px solid #cbd9e8; border-radius:6px; }
@media(max-width:820px) {
  body[data-theme="bright"] .upload-card form { grid-template-columns:minmax(0,1fr); }
  body[data-theme="bright"] .upload-card label { min-width:0; }
  body[data-theme="bright"] .upload-card input[type=file] { width:100%; min-width:0; max-width:100%; }
}
