/* Shared, accessible appearance for the staff workspace and customer portal. */
:root {
  color-scheme: light;
  --bg:#f4f6f9;
  --surface:#fff;
  --surface-soft:#f7f9fc;
  --surface-hover:#edf2f7;
  --ink:#172b40;
  --text:#273a4d;
  --muted:#617185;
  --line:#dce3ec;
  --line-strong:#c5d0dd;
  --green:#087f68;
  --green-hover:#066b58;
  --accent-soft:#e7f5ef;
  --accent-ink:#09694f;
  --sidebar:#142634;
  --sidebar-active:#263f4c;
  --danger:#b42334;
  --danger-soft:#fff0f1;
  --warning:#8b570b;
  --warning-soft:#fff5dc;
  --blue:#315f9c;
  --blue-soft:#eaf2ff;
  --focus:#258cdb;
  --shadow:0 2px 5px #15283d04,0 12px 30px #15283d06;
  --shadow-popover:0 12px 36px #15283d24;
  --radius:14px;
  --font-sans:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
:root[data-theme="dark"] {
  color-scheme:dark;
  --bg:#101822;
  --surface:#18232f;
  --surface-soft:#1d2b39;
  --surface-hover:#243647;
  --ink:#edf3fb;
  --text:#d7e1ee;
  --muted:#a6b5c7;
  --line:#304152;
  --line-strong:#4c6278;
  --green:#4bd2b1;
  --green-hover:#77dfc6;
  --accent-soft:#193d36;
  --accent-ink:#84e0c2;
  --sidebar:#0d151f;
  --sidebar-active:#213643;
  --danger:#ff9ba5;
  --danger-soft:#442832;
  --warning:#f1cc83;
  --warning-soft:#403521;
  --blue:#a4c7fb;
  --blue-soft:#233752;
  --focus:#75baff;
  --shadow:0 2px 5px #0001,0 12px 30px #0002;
  --shadow-popover:0 12px 36px #0006;
}
* { scrollbar-width:thin; scrollbar-color:var(--line-strong) transparent; }
body { background:var(--bg); color:var(--text); font:1rem/1.5 var(--font-sans); -webkit-font-smoothing:antialiased; }
.main,.content,.task-sections,.split>*,.cards>*,.grow { min-width:0; }
.tablewrap { max-width:100%; }
.card h3,.details dd,.project-builder,.project-person,.crumb,.person-choice>span { overflow-wrap:anywhere; }
.person-choice>span { min-width:0; }
button,input,select,textarea { font-family:var(--font-sans); }
button,.button { min-height:40px; padding:9px 15px; color:var(--ink); background:var(--surface); border:1px solid var(--line); border-radius:9px; font-size:.875rem; font-weight:550; line-height:1.4; transition:background-color .15s,border-color .15s,box-shadow .15s; }
button:hover,.button:hover { background:var(--surface-hover); border-color:var(--line-strong); }
button.primary,.button.primary { color:#fff; background:var(--green); border-color:var(--green); box-shadow:0 2px 3px #076d5520; }
button.primary:hover,.button.primary:hover { background:var(--green-hover); border-color:var(--green-hover); }
[data-theme="dark"] button.primary,[data-theme="dark"] .button.primary { color:#082d25; }
button.ghost,button.textbutton,.profile-trigger { background:transparent; }
button.ghost:hover { background:var(--surface-hover); }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible,[tabindex]:focus-visible { outline:3px solid var(--focus); outline-offset:3px; }
button:disabled,input:disabled,select:disabled { opacity:.55; }
input,select,textarea { color:var(--text); accent-color:var(--green); }
input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),textarea,select { border:1px solid var(--line-strong); background-color:var(--surface); border-radius:8px; font-size:.875rem; }
input::placeholder,textarea::placeholder { color:var(--muted); opacity:1; }
:root[data-theme] select { appearance:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23617185' stroke-width='1.7'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-position:right 10px center; background-repeat:no-repeat; background-size:16px 16px; padding-right:32px!important; }
:root[data-theme="dark"] select { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23a6b5c7' stroke-width='1.7'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); }
select option { background:var(--surface); color:var(--text); }
h1,h2,h3 { font-family:var(--font-sans); color:var(--ink); line-height:1.25; }
h1 { font-size:2rem; letter-spacing:-.065rem; font-weight:700; }
h2 { font-size:1.125rem; letter-spacing:-.025rem; font-weight:650; }
h3 { font-size:1rem; font-weight:650; }
.subtitle,.muted,.details dt,.crumb,.small.muted { color:var(--muted); }
.small { font-size:.8125rem; }
.tag,.navlabel,.news-visibility { font-size:.75rem; line-height:1.5; font-weight:650; letter-spacing:.09em; color:var(--muted); }
.sidebar { width:240px; padding:26px 17px; background:var(--sidebar); color:#b8c9d8; border-right:1px solid #ffffff08; }
.brand { font-family:var(--font-sans); }
.sidebar .brand { padding:0 14px 24px; }
.brand .egnite-logo { object-fit:cover; object-position:center; width:170px; height:76px; background:transparent; }
.sidebar .egnite-logo { filter:brightness(0) invert(1); opacity:.95; }
[data-theme="dark"] .cloud-gate .egnite-logo,[data-theme="dark"] body > header .egnite-logo { filter:brightness(0) invert(1); }
.navlabel { margin:19px 14px 12px; color:#91a6ba; font-size:.6875rem; }
.nav button { min-height:46px; padding:12px 14px; color:#bdcddb; font-size:.875rem; border-radius:9px; gap:12px; }
.nav button:hover { color:#fff; background:#ffffff0a; }
.nav button.active { background:var(--sidebar-active); color:#fff; box-shadow:inset 3px 0 #61d9b8; }
.nav i { font-size:1.2rem; color:#94b4c5; }
.nav button.active i { color:#85e4c9; }
.sidebarfooter { border-color:#ffffff17; color:#9cafc1; font-size:.75rem; padding:20px 13px 0; }
.sidebarfooter b { color:#dce7ee; font-weight:550; }
.sidebarfooter button { color:#b8c9d8!important; font-size:.75rem; }
.main { margin-left:240px; }
.topbar { min-height:78px; height:auto; padding:18px 36px; background:var(--surface); border-color:var(--line); }
.role { gap:16px; }
.crumb { font-size:.8125rem; }
.cloud-identity { color:var(--muted); font-size:.8125rem; gap:14px; }
.cloud-identity a { color:var(--green); text-underline-offset:3px; }
.profile-trigger { min-height:0; padding:0; border:0; }
.content { max-width:1640px; padding:32px 36px 48px; }
.heading { margin-bottom:28px; }
.heading .tools { flex-wrap:wrap; justify-content:flex-end; }
.stats { gap:18px; margin-bottom:32px; }
.stat { background:var(--surface); border-color:var(--line); border-radius:var(--radius); padding:22px 24px; box-shadow:var(--shadow); }
.stat strong { font:650 2.1rem/1.3 var(--font-sans); letter-spacing:-.08rem; margin:14px 0 8px; }
.stat small { font-size:.8125rem; font-weight:550; color:var(--muted); }
.stat span { font-size:.75rem; color:var(--muted); }
.my-tasks-stat:hover { border-color:var(--green); box-shadow:0 3px 16px #077f6812; }
.card,.panel,.tablewrap,.list-organizer { background:var(--surface); border-color:var(--line); border-radius:var(--radius); box-shadow:var(--shadow); }
.card,.panel { padding:24px; }
.cards { gap:20px; }
.project { transition:border-color .15s,box-shadow .15s; }
.project:hover { transform:none; border-color:var(--green); box-shadow:0 5px 22px #077f6814; }
.card h3 { font-size:1.125rem; line-height:1.45; }
.house { color:var(--accent-ink); background:var(--accent-soft); border-radius:12px; padding:10px 13px; }
.badge { border-radius:6px; font-size:.75rem; padding:5px 9px; line-height:1.4; background:var(--accent-soft); color:var(--accent-ink); font-weight:650; }
.badge.amber,.vip-star.is-vip,.vip-active { background:var(--warning-soft); color:var(--warning); }
.badge.grey { background:var(--surface-hover); color:var(--muted); }
.avatar { color:var(--accent-ink); background:var(--accent-soft); font-size:.75rem; }
.progress { background:var(--surface-hover); height:5px; }
.progress div { background:var(--green); }
.sectionhead { margin:26px 0 18px; }
.listrow,.cardbottom,.news-item,.portal-file,.portal-topic,.project-people-summary { border-color:var(--line); }
.textbutton { color:var(--green); min-height:0; font-weight:550; }
.textbutton:hover { color:var(--green-hover); background:transparent; text-decoration:underline; text-underline-offset:3px; }
.tabs { gap:28px; margin:24px 0 26px; }
.tabs button { color:var(--muted); border-bottom:2px solid transparent; font-size:.875rem; }
.tabs button:hover { color:var(--ink); background:transparent; }
.tabs button.active { color:var(--green); border-bottom-color:var(--green); }
th { background:var(--surface-soft); color:var(--muted); font-size:.75rem; letter-spacing:.055em; font-weight:650; }
td { font-size:.875rem; }
th,td { border-color:var(--line); padding:16px 20px; }
tbody tr:hover { background:var(--surface-soft); }
.tasks-table th { font-size:.6875rem; }
.tasks-table td,.editable-cell,.task-inline-form>label,.person-choice,.list-jump,.project-choice { font-size:.875rem; }
.tasks-table th,.tasks-table td { padding:15px 12px; }
.created-cell small,.due-cell small { font-size:.75rem; color:var(--muted); }
.task-title { line-height:1.55; }
.task-row:focus-within { background:var(--surface-soft); }
.task-comments,.calendar-hint,.drag-handle { color:var(--muted); }
.task-comments,.pencil,.drag-handle,.list-menu-trigger { min-height:30px; }
.task-complete .task-title { color:var(--muted); }
.overdue,.overdue small,.my-task-group .overdue,.closed-late,.danger,.filter-error,.required-mark { color:var(--danger)!important; }
.closed-late { font-size:.8125rem; }
.person-icon { border-color:var(--surface); }
.more-people,.anybody-icon { background:var(--surface-hover); color:var(--muted); }
.anybody-icon { border-color:var(--line-strong); }
.task-inline-form { background:var(--surface-soft); border:1px solid var(--line); border-radius:10px; }
.task-inline-form input:not([type="checkbox"]),.task-inline-form select,.person-choice,.profile-panel input:not([type="color"]),.field textarea { background-color:var(--surface); color:var(--text); border-color:var(--line-strong); }
.list-organizer { padding:18px 16px; }
.list-organizer h3 { font-size:.875rem; }
.list-organizer>button,.project-people-summary button { font-size:.8125rem; }
.list-organizer li { padding:12px 0; border-color:var(--line); }
.list-jump { font-size:.8125rem; line-height:1.5; }
.list-jump:hover { background:transparent; color:var(--green); }
.list-collapse { color:var(--ink); }
.list-collapse:hover { color:var(--green); background:transparent; }
.collapse-chevron,.completed-chevron { background:var(--surface-hover); border-color:var(--line); color:var(--muted); }
.list-collapse:hover .collapse-chevron { background:var(--accent-soft); color:var(--accent-ink); }
.task-section-title h2 { font-size:1.0625rem; }
.task-section-title .list-add-task { background:var(--accent-soft); color:var(--accent-ink); border-color:var(--line); font-size:.8125rem; }
.task-section-title .list-add-task:hover { background:var(--surface-hover); border-color:var(--green); }
.list-menu-trigger { color:var(--muted); border-color:var(--line); background:var(--surface); }
.list-menu-trigger:hover,.list-menu-trigger[aria-expanded="true"] { background:var(--surface-hover); color:var(--ink); border-color:var(--line-strong); }
.list-menu-popup,.builder-picker-options { background:var(--surface); border-color:var(--line); box-shadow:var(--shadow-popover); padding:6px; border-radius:10px; }
.list-menu-popup button { font-size:.875rem; }
.list-menu-popup button:hover,.list-menu-popup button:focus { background:var(--surface-hover); }
.list-menu-popup button:focus-visible { outline:2px solid var(--focus); outline-offset:-2px; }
.list-menu-popup .delete-list-option { color:var(--danger); }
.list-menu-popup .delete-list-option:hover,.list-menu-popup .delete-list-option:focus { background:var(--danger-soft); }
.completed-task-section { background:var(--surface-soft); border-color:var(--line); }
.completed-task-section th { background:var(--surface-soft); }
.completed-toggle { color:var(--muted); font-size:.8125rem; }
.completed-toggle:hover { background:var(--surface-hover); }
.drag-handle:hover,.drag-handle:focus-visible { background:var(--accent-soft); color:var(--accent-ink); outline-color:var(--green); }
.drop-before { box-shadow:inset 0 3px var(--green)!important; }
.drop-after { box-shadow:inset 0 -3px var(--green)!important; }
.task-section.drop-into,.list-organizer li.drop-into { background:var(--accent-soft); outline-color:var(--green); }
.is-task-dragging .task-drop-end { color:var(--muted); border-color:var(--line-strong); }
.task-drag-ghost { background:var(--sidebar-active); color:#fff; border-color:var(--line-strong); box-shadow:var(--shadow-popover); }
.view-switch { background:var(--surface); border-color:var(--line); border-radius:10px; }
.view-switch button { min-height:35px; }
.view-switch button[aria-pressed="true"] { background:var(--accent-soft); color:var(--accent-ink); }
.directory-toggle button { padding:10px 16px; font-size:.875rem; }
.directory-toggle span { background:var(--surface-hover); color:var(--muted); font-size:.75rem; }
.directory-filters { padding:22px; }
.filter-grid label,.builder-picker>label,label.field,legend { font-size:.875rem; color:var(--text); }
.filter-grid input,.filter-grid select,.tools input,.tools select,label.field input,label.field select,label.field textarea,.builder-picker>input,.profile-panel input[type="color"] { border-color:var(--line-strong); color:var(--text); background-color:var(--surface); }
label.field { font-weight:550; }
.field select:disabled,input:disabled { background-color:var(--surface-hover); color:var(--muted); }
.builder-picker-options button { background:var(--surface); color:var(--text); }
.builder-picker-options button:hover,.builder-picker-options button[aria-selected="true"] { background:var(--accent-soft); color:var(--accent-ink); }
.builder-picker-options p { font-size:.8125rem; }
.project-home-tabs button { border-radius:10px; font-size:.875rem; }
.project-home-tabs button.selected { background:var(--accent-soft); color:var(--accent-ink); border-color:var(--green); }
.project-status { background:var(--accent-soft); color:var(--accent-ink); border-color:var(--line); padding:14px 18px; }
.project-status>span { font-size:.6875rem; }
.project-status select { color:inherit; background-color:transparent; border:0; }
.status-blocked { background:var(--danger-soft)!important; color:var(--danger)!important; }
.status-waiting { background:var(--warning-soft)!important; color:var(--warning)!important; }
.status-completed,.status-hibernating { background:var(--surface-hover)!important; color:var(--muted)!important; }
.task-priority { font-size:.75rem; }
.priority-high { background:var(--danger-soft); color:var(--danger); }
.priority-normal { background:var(--surface-hover); color:var(--muted); }
.priority-low { background:var(--blue-soft); color:var(--blue); }
.home-choice button { border-color:var(--line-strong); background:var(--surface); }
.home-choice button:hover { background:var(--accent-soft); border-color:var(--green); }
.home-choice small,.roster-choice small { color:var(--muted); }
.roster-choice small { font-size:.75rem; }
.news-item p { font-size:.875rem; }
.news-visibility { font-size:.6875rem; }
.topic:hover { background:var(--surface-soft); }
.bubble { background:var(--surface-soft); border:1px solid var(--line); font-size:.9375rem; line-height:1.65; }
.upload { background:var(--surface-soft); border-color:var(--line-strong); }
.info,.portal-status { background:var(--accent-soft); color:var(--text); border:1px solid var(--line); font-size:.875rem; }
.cloud-status { background:var(--surface); border-color:var(--line); color:var(--muted); padding:11px 16px; border-radius:10px; font-size:.8125rem; }
.cloud-status b { font-size:.625rem; letter-spacing:.07em; color:var(--accent-ink); background:var(--accent-soft); border-radius:5px; padding:4px 7px; }
.cloud-status span { color:var(--muted); }
.cloud-status button { min-height:30px; padding:5px 10px; font-size:.75rem; }
.cloud-error { background:var(--danger-soft); border-color:var(--danger); }
.cloud-error b,.cloud-error span { color:var(--danger); }
.cloud-loading { color:var(--ink); }
.cloud-gate h1,.portal-gate h1 { font-size:2rem; }
.cloud-gate .panel,.portal-gate { box-shadow:var(--shadow); }
dialog,.builder-subdialog { color:var(--text); background:var(--surface); border:1px solid var(--line); border-radius:18px; padding:30px; box-shadow:0 24px 90px #07182755; }
dialog::backdrop,.builder-subdialog::backdrop { background:#07152388; backdrop-filter:blur(5px); }
dialog h2 { font-size:1.35rem; letter-spacing:-.03rem; }
fieldset { border-color:var(--line); border-radius:10px; }
.details dt { font-size:.8125rem; }
.details dd { font-size:.9375rem; }
.template-task-preview { border-color:var(--line); background:var(--surface-soft); }
#toast,#notice:not(:empty) { color:var(--ink); background:var(--surface); border:1px solid var(--line-strong); box-shadow:var(--shadow-popover); font-size:.875rem; }
/* The overview welcome card predates theme tokens. */
.panel[style*="background:#edf2e6"] { background:var(--accent-soft)!important; }
body > header { background:var(--surface); border-color:var(--line); padding-top:18px; padding-bottom:18px; }
body > header .brand { color:var(--ink); }
body > header .brand .egnite-logo { width:185px; height:78px; }
#account { gap:18px; flex-wrap:wrap; justify-content:flex-end; font-size:.875rem; }
#portal { padding-top:40px; }
.portal-top { margin-bottom:30px; }
.portal-project { background:var(--surface); border-color:var(--line); color:var(--text); border-radius:var(--radius); box-shadow:var(--shadow); min-height:190px; }
.portal-project:hover { background:var(--surface-soft); border-color:var(--green); box-shadow:0 5px 22px #077f6814; }
.portal-project h2 { font-size:1.25rem; }
.portal-meta { color:var(--muted); font-size:.8125rem; }
.reply { border-color:var(--line-strong); }
.portal-topic form textarea,.portal-topic form input,#new-topic textarea,#new-topic input { padding:11px 12px; }
.portal-columns details summary { cursor:pointer; color:var(--green); font-weight:600; padding:14px 0; }
.theme-control { display:inline-flex; align-items:center; gap:7px; border:1px solid var(--line); border-radius:9px; background:var(--surface-soft); padding:0 8px 0 11px; color:var(--muted); min-height:38px; flex-shrink:0; margin:0; }
.theme-control .theme-icon { flex-shrink:0; }
:root .theme-control select { border:0!important; border-radius:5px; padding:8px 24px 8px 0!important; min-width:74px; background-color:transparent!important; background-position:right 1px center; font-size:.8125rem; color:var(--text); cursor:pointer; margin:0; width:auto; }
.theme-control:focus-within { outline:3px solid var(--focus); outline-offset:3px; }
.theme-control select:focus-visible { outline:0; }
.theme-control-floating { position:fixed; top:20px; right:24px; z-index:5; box-shadow:var(--shadow); }
@media (min-width:1500px) { .content { padding:38px 46px 56px; } }
@media (max-width:1100px) { .sidebar { width:210px; padding:22px 13px; } .main { margin-left:210px; } .content { padding:28px; } .topbar { padding:16px 28px; } .role { gap:10px; } .cloud-identity>span { display:none; } }
@media (max-width:900px) { .task-workspace { grid-template-columns:1fr; } .list-organizer { position:static; } .list-organizer ol { gap:12px; } }
@media (max-width:720px) {
  .sidebar { position:static; width:auto; padding:16px 18px 12px; }
  .sidebar .brand { padding:0 3px 10px; }
  .sidebar .egnite-logo { width:132px; height:56px; }
  .main { margin-left:0; }
  .nav { gap:5px; padding-bottom:3px; }
  .nav button { padding:10px 13px; min-height:40px; font-size:.8125rem; }
  .nav button.active { box-shadow:inset 0 -2px #61d9b8; }
  .topbar { padding:14px 20px; }
  .role { gap:12px; justify-content:flex-end; flex-wrap:wrap; }
  .role .theme-control { margin-right:auto; }
  .content { padding:24px 18px 40px; }
  .heading { flex-wrap:wrap; gap:16px; }
  .heading .tools { justify-content:flex-start; }
  h1 { font-size:1.65rem; letter-spacing:-.045rem; }
  .stats { gap:12px; }
  .stat { padding:18px 16px; }
  .stat strong { font-size:1.8rem; }
  .card,.panel { padding:20px; }
  .tabs { overflow-x:auto; gap:24px; }
  .tabs button { font-size:.875rem; white-space:nowrap; }
  .directory-toolbar { gap:14px; }
  .directory-toggle button { padding:9px 12px; }
  dialog,.builder-subdialog { padding:24px 20px; }
  body > header { padding:16px 18px; gap:16px; flex-wrap:wrap; }
  body > header .brand .egnite-logo { width:145px; height:62px; }
  #account { gap:10px; }
  .theme-control { min-height:36px; }
  .theme-control-floating { top:16px; right:18px; }
}
@media (max-width:420px) { .filter-grid,.company-filters .filter-grid { grid-template-columns:1fr; } .filter-search { grid-column:auto; } .stats { grid-template-columns:1fr 1fr; } .stat small { font-size:.75rem; } .stat span { font-size:.6875rem; } .directory-toggle { width:100%; } .directory-toggle button { flex:1; } }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important; transition:none!important; animation:none!important; } }
@media print { .sidebar,.theme-control,.cloud-status,.topbar .role { display:none!important; } .main { margin:0; } :root { --bg:#fff; --surface:#fff; --text:#111; --ink:#111; --muted:#444; --line:#ccc; color-scheme:light; } }
