@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap');

:root {
  --ink: #172b2e;
  --muted: #66777a;
  --paper: #f5f4ef;
  --surface: #ffffff;
  --line: #dde2df;
  --line-strong: #cbd3cf;
  --teal: #0f766e;
  --teal-soft: #e1f2ee;
  --teal-dark: #15524f;
  --gold: #d59b42;
  --gold-soft: #fff3dc;
  --red: #b8473f;
  --red-soft: #fbe9e7;
  --blue: #3d6f8f;
  --blue-soft: #e8f1f6;
  --green: #47755a;
  --green-soft: #eaf4ed;
  --shadow: 0 10px 34px rgba(23,43,46,.08);
  --radius: 15px;
  --sidebar: 252px;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 14px/1.5 'DM Sans', system-ui, sans-serif; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(15,118,110,.25); outline-offset: 2px; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-family: 'Manrope', sans-serif; line-height: 1.2; letter-spacing: -.02em; }
p { margin: 0; }
.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 16px; color: var(--muted); }
.mark { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 15px 5px 15px 5px; background: var(--teal); color: white; font: 800 18px 'Manrope'; }

.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(330px, .78fr) 1.4fr; }
.login-story { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; padding: clamp(32px, 5vw, 72px); color: white; background: #173a3a; }
.login-story::before { content: ''; position: absolute; inset: -10%; background: radial-gradient(circle at 80% 16%, rgba(92,166,151,.36), transparent 33%), radial-gradient(circle at 10% 88%, rgba(213,155,66,.2), transparent 28%), linear-gradient(145deg, transparent 45%, rgba(255,255,255,.035) 45% 46%, transparent 46%); background-size: auto, auto, 36px 36px; }
.login-brand, .login-copy, .login-proof { position: relative; z-index: 1; }
.login-brand { display: flex; align-items: center; gap: 13px; font: 700 15px 'Manrope'; letter-spacing: .05em; text-transform: uppercase; }
.login-brand .mark { background: white; color: var(--teal-dark); }
.login-copy { max-width: 520px; }
.login-copy .eyebrow { color: #b6d9d1; }
.login-copy h1 { margin: 16px 0 20px; max-width: 500px; font-size: clamp(37px, 5vw, 64px); font-weight: 700; line-height: 1.02; }
.login-copy p { max-width: 470px; color: #d8e4e1; font-size: 17px; }
.login-proof { display: flex; gap: 28px; flex-wrap: wrap; }
.proof { max-width: 150px; }
.proof strong { display: block; color: #f3d49d; font: 700 25px 'Manrope'; }
.proof span { color: #bfd0cc; font-size: 12px; }
.login-panel { min-height: 100vh; padding: clamp(28px, 5vw, 70px); overflow-y: auto; background: #fafaf7; }
.login-panel-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.login-panel h2 { font-size: clamp(28px, 3vw, 40px); }
.login-panel-head p { margin-top: 8px; color: var(--muted); }
.role-filter { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 18px; }
.role-filter button { flex: 0 0 auto; }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 13px; }
.profile-card { display: flex; flex-direction: column; align-items: flex-start; min-height: 176px; padding: 20px; text-align: left; border: 1px solid var(--line); border-radius: var(--radius); background: white; cursor: pointer; transition: .18s ease; }
.profile-card:hover { transform: translateY(-3px); border-color: #a6c8c2; box-shadow: var(--shadow); }
.profile-card .avatar { margin-bottom: 16px; }
.profile-card h3 { font-size: 16px; }
.profile-card .title { margin-top: 3px; color: var(--muted); font-size: 12px; }
.profile-card .role { margin-top: auto; padding-top: 15px; color: var(--teal); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.profile-card .notes { margin-top: 5px; color: var(--muted); font-size: 12px; }

.shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; width: var(--sidebar); display: flex; flex-direction: column; color: #dce8e5; background: #172f31; border-right: 1px solid rgba(255,255,255,.06); transition: transform .2s ease, width .2s ease; }
.side-head { height: 72px; display: flex; align-items: center; gap: 12px; padding: 0 21px; border-bottom: 1px solid rgba(255,255,255,.07); }
.side-head .mark { width: 40px; height: 40px; flex: 0 0 40px; background: #e5f2ee; color: var(--teal-dark); }
.brand-words strong { display: block; color: white; font: 700 14px 'Manrope'; }
.brand-words span { color: #89aaa4; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.side-nav { flex: 1; overflow-y: auto; padding: 20px 12px; }
.nav-group { margin-bottom: 20px; }
.nav-label { margin: 0 10px 8px; color: #789995; font: 700 10px 'Manrope'; text-transform: uppercase; letter-spacing: .11em; }
.nav-link { width: 100%; display: flex; align-items: center; gap: 11px; padding: 9px 11px; margin-bottom: 3px; color: #b9ceca; border: 0; border-radius: 9px; background: transparent; cursor: pointer; text-align: left; transition: .15s ease; }
.nav-link:hover { color: white; background: rgba(255,255,255,.06); }
.nav-link.active { color: white; background: rgba(61,148,133,.28); box-shadow: inset 3px 0 #72c0b2; }
.nav-icon { width: 19px; font-size: 15px; text-align: center; }
.nav-badge { margin-left: auto; min-width: 20px; padding: 1px 6px; border-radius: 10px; color: #1d3a39; background: #f0cc8b; font-size: 10px; font-weight: 700; text-align: center; }
.side-foot { padding: 13px; border-top: 1px solid rgba(255,255,255,.07); }
.demo-tag { display: flex; align-items: center; gap: 7px; padding: 9px 10px; color: #a9c2bd; border-radius: 9px; background: rgba(255,255,255,.04); font-size: 11px; }
.demo-dot { width: 7px; height: 7px; border-radius: 50%; background: #f3bd62; box-shadow: 0 0 0 3px rgba(243,189,98,.13); }

.workspace { min-height: 100vh; margin-left: var(--sidebar); }
.topbar { position: sticky; z-index: 20; top: 0; height: 72px; display: flex; align-items: center; gap: 14px; padding: 0 26px; background: rgba(250,250,247,.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.menu-button { display: none; }
.search-wrap { position: relative; width: min(540px, 48vw); }
.search-input { width: 100%; padding: 10px 14px 10px 38px; border: 1px solid var(--line); border-radius: 11px; background: white; color: var(--ink); }
.search-icon { position: absolute; left: 14px; top: 10px; color: var(--muted); }
.search-results { position: absolute; top: 46px; left: 0; right: 0; max-height: 440px; overflow-y: auto; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: var(--shadow); }
.search-result { display: block; width: 100%; padding: 10px; border: 0; border-radius: 9px; background: transparent; text-align: left; cursor: pointer; }
.search-result:hover { background: #f1f5f3; }
.search-result small { display: block; color: var(--muted); }
.top-spacer { flex: 1; }
.icon-button, .menu-button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); cursor: pointer; }
.profile-menu-wrap { position: relative; }
.profile-button { display: flex; align-items: center; gap: 10px; padding: 5px 8px 5px 5px; border: 1px solid var(--line); border-radius: 12px; background: white; cursor: pointer; }
.profile-button .meta { text-align: left; }
.profile-button strong { display: block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.profile-button span { display: block; color: var(--muted); font-size: 10px; }
.avatar { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 10px; color: white; background: linear-gradient(145deg, var(--teal), #56a292); font: 700 11px 'Manrope'; }
.profile-dropdown { position: absolute; top: 50px; right: 0; width: 240px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: var(--shadow); }
.profile-dropdown button { width: 100%; padding: 10px; border: 0; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; }
.profile-dropdown button:hover { background: #f1f5f3; }

.content { max-width: 1500px; margin: 0 auto; padding: 30px 30px 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 24px; }
.page-head h1 { font-size: clamp(25px, 3vw, 34px); }
.page-head p { margin-top: 6px; color: var(--muted); }
.eyebrow { color: var(--teal); font: 700 11px 'Manrope'; text-transform: uppercase; letter-spacing: .1em; }
.head-actions, .button-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.btn { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 13px; border: 1px solid var(--line-strong); border-radius: 9px; color: var(--ink); background: white; font-weight: 600; cursor: pointer; transition: .15s ease; }
.btn:hover { transform: translateY(-1px); border-color: #9bb3ae; box-shadow: 0 4px 14px rgba(23,43,46,.07); }
.btn.primary { color: white; border-color: var(--teal); background: var(--teal); }
.btn.dark { color: white; border-color: var(--ink); background: var(--ink); }
.btn.danger { color: var(--red); border-color: #e7bdb9; background: var(--red-soft); }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn.small { min-height: 30px; padding: 5px 9px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.filter-chip { min-height: 32px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: white; font-weight: 600; cursor: pointer; }
.filter-chip.active { color: var(--teal-dark); border-color: #a9ccc5; background: var(--teal-soft); }

.summary-grid { display: grid; grid-template-columns: repeat(6, minmax(130px, 1fr)); gap: 11px; margin-bottom: 20px; }
.summary-card { position: relative; overflow: hidden; min-height: 112px; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: white; cursor: pointer; text-align: left; }
.summary-card:hover { border-color: #a8c5bf; box-shadow: var(--shadow); }
.summary-card.active { border-color: var(--teal); box-shadow: inset 0 -3px var(--teal); }
.summary-card .label { color: var(--muted); font-weight: 600; font-size: 11px; }
.summary-card strong { display: block; margin: 8px 0 3px; font: 700 28px 'Manrope'; }
.summary-card small { color: var(--muted); }
.summary-card .card-icon { position: absolute; top: 14px; right: 14px; width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; background: var(--teal-soft); color: var(--teal); }
.brief { position: relative; margin-bottom: 20px; padding: 19px 54px 19px 56px; border: 1px solid #bed8d1; border-radius: 14px; background: linear-gradient(105deg, #edf7f4, #f7faf7); }
.brief::before { content: 'AI'; position: absolute; left: 18px; top: 19px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; color: white; background: var(--teal); font: 700 9px 'Manrope'; }
.brief h3 { margin-bottom: 4px; font-size: 14px; }
.brief p { color: #425e5c; }
.brief button { position: absolute; top: 14px; right: 14px; }

.card { border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 2px 8px rgba(23,43,46,.025); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 19px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { font-size: 16px; }
.card-body { padding: 19px; }
.split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .7fr); gap: 18px; }
.three-col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.stack { display: grid; gap: 14px; }
.muted { color: var(--muted); }
.micro { font-size: 11px; }
.divider { height: 1px; margin: 15px 0; background: var(--line); }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 10px 13px; color: #748381; border-bottom: 1px solid var(--line); background: #fbfcfa; font-size: 10px; font-weight: 700; text-align: left; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.data-table td { padding: 13px; border-bottom: 1px solid #edf0ee; vertical-align: middle; }
.data-table tbody tr { transition: .12s ease; }
.data-table tbody tr.clickable { cursor: pointer; }
.data-table tbody tr.clickable:hover { background: #f7faf8; }
.data-table tr:last-child td { border-bottom: 0; }
.primary-cell { font-weight: 700; }
.secondary-cell { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 400; }
.amount { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }

.status { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 999px; background: #edf0ee; color: #52615f; font-size: 10px; font-weight: 700; white-space: nowrap; }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .75; }
.status.good, .status.complete, .status.synced, .status.confirmed, .status.eligible, .status.paid, .status.current, .status.accepted { color: var(--green); background: var(--green-soft); }
.status.warn, .status.pending, .status.watch, .status.in-progress, .status.ready, .status.assigned, .status.queued, .status.partially-eligible, .status.partially-paid { color: #94621e; background: var(--gold-soft); }
.status.bad, .status.urgent, .status.at-risk, .status.failed, .status.discrepancy, .status.hold, .status.expired, .status.rejected { color: var(--red); background: var(--red-soft); }
.status.info, .status.syncing, .status.submitted, .status.proposal-sent, .status.work-in-progress, .status.done { color: var(--blue); background: var(--blue-soft); }
.priority { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; }
.priority::before { content: ''; width: 8px; height: 8px; border-radius: 3px; background: #93a19f; }
.priority.urgent::before { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.priority.high::before { background: var(--gold); }
.priority.normal::before { background: var(--teal); }

.work-list { display: grid; gap: 9px; }
.work-row { display: grid; grid-template-columns: 28px minmax(220px, 1.3fr) minmax(150px, .7fr) minmax(120px, .55fr) minmax(120px, .55fr) auto; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: white; transition: .15s ease; }
.work-row:hover { border-color: #afc8c2; box-shadow: 0 7px 22px rgba(23,43,46,.06); }
.work-row h3 { font-size: 13px; }
.work-row .reason { margin-top: 3px; color: var(--muted); font-size: 11px; }
.work-row .cell-label { display: block; margin-bottom: 2px; color: #899693; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.risk-mark { width: 12px; height: 34px; border-radius: 5px; background: var(--teal); }
.risk-mark.Urgent { background: var(--red); }
.risk-mark.High { background: var(--gold); }

.project-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.project-card { padding: 18px; cursor: pointer; }
.project-card:hover { border-color: #abc6c0; box-shadow: var(--shadow); }
.project-card-top { display: flex; justify-content: space-between; gap: 12px; }
.project-card h3 { margin-top: 5px; font-size: 17px; }
.project-card .address { margin: 7px 0 15px; color: var(--muted); font-size: 12px; }
.project-meta { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.project-meta div { padding: 8px 10px; border-radius: 9px; background: #f6f8f6; }
.project-meta span { display: block; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.project-meta strong { font-size: 11px; }

.hero { overflow: hidden; margin-bottom: 16px; border: 0; color: white; background: linear-gradient(115deg, #163f3d, #1f5550 60%, #2f6b61); box-shadow: var(--shadow); }
.hero .card-body { padding: 24px; }
.hero h1 { margin: 5px 0 7px; font-size: clamp(24px, 4vw, 36px); }
.hero .address { color: #c3d8d3; }
.hero-grid { display: grid; grid-template-columns: minmax(260px, 1.4fr) repeat(4, minmax(100px, .45fr)); gap: 18px; align-items: end; }
.hero-stat span { display: block; color: #9ec0ba; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.hero-stat strong { display: block; margin-top: 3px; font: 700 13px 'Manrope'; }
.tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 16px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.tab { flex: 0 0 auto; padding: 8px 12px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-weight: 600; cursor: pointer; }
.tab.active { color: var(--teal-dark); background: var(--teal-soft); }

.checklist { display: grid; gap: 8px; }
.check-row { display: grid; grid-template-columns: 30px minmax(180px,1fr) minmax(100px,.4fr) auto; align-items: center; gap: 12px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; }
.check-icon { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); background: #edf0ee; }
.check-icon.complete { color: var(--green); background: var(--green-soft); }
.check-icon.overridden { color: #94621e; background: var(--gold-soft); }

.stepper { display: grid; grid-template-columns: repeat(8, minmax(90px, 1fr)); overflow-x: auto; margin-bottom: 16px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.step { position: relative; min-width: 100px; padding: 0 9px; text-align: center; }
.step:not(:last-child)::after { content: ''; position: absolute; z-index: 0; top: 13px; left: 60%; width: 80%; height: 2px; background: var(--line); }
.step-dot { position: relative; z-index: 1; width: 27px; height: 27px; display: grid; place-items: center; margin: 0 auto 8px; border: 2px solid var(--line-strong); border-radius: 50%; color: var(--muted); background: white; font-size: 10px; font-weight: 700; }
.step.complete .step-dot { color: white; border-color: var(--green); background: var(--green); }
.step.current .step-dot { color: white; border-color: var(--gold); background: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.step.bad .step-dot { color: white; border-color: var(--red); background: var(--red); }
.step span { color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }

.ai-card { border-color: #b9d5ce; background: linear-gradient(110deg, #eff8f5, white); }
.ai-head { display: flex; align-items: flex-start; gap: 12px; }
.ai-badge { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 34px; border-radius: 10px; color: white; background: var(--teal); font: 700 10px 'Manrope'; }
.source-list { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.source { padding: 3px 7px; border-radius: 7px; color: var(--teal-dark); background: var(--teal-soft); font-size: 9px; font-weight: 700; }
.metric-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.metric { padding: 10px; border-radius: 10px; background: #f4f7f5; }
.metric span { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.metric strong { display: block; margin-top: 2px; font: 700 16px 'Manrope'; }

.finance-card { padding: 17px; }
.finance-head { display: flex; justify-content: space-between; gap: 12px; }
.finance-total { margin: 15px 0; font: 700 27px 'Manrope'; }
.finance-lines { display: grid; gap: 7px; }
.finance-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid #edf0ee; }
.finance-line:last-child { border: 0; }
.hold-callout { padding: 10px; border-radius: 9px; color: #8a3e38; background: var(--red-soft); font-size: 11px; }

.timeline { position: relative; display: grid; gap: 0; }
.timeline::before { content: ''; position: absolute; left: 13px; top: 15px; bottom: 15px; width: 1px; background: var(--line); }
.timeline-item { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 11px; padding: 10px 0; }
.timeline-dot { z-index: 1; width: 27px; height: 27px; display: grid; place-items: center; border: 4px solid white; border-radius: 50%; color: white; background: var(--teal); font-size: 8px; }
.timeline-item h4 { margin-bottom: 2px; font-size: 12px; }
.timeline-item p { color: var(--muted); font-size: 11px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 11px; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; padding: 10px 11px; color: var(--ink); border: 1px solid var(--line-strong); border-radius: 9px; background: white; }
.field textarea { min-height: 105px; resize: vertical; }
.field small { color: var(--muted); }
.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(15,35,36,.62); backdrop-filter: blur(4px); }
.modal { width: min(620px, 100%); max-height: 90vh; overflow-y: auto; border-radius: 17px; background: #fff; box-shadow: 0 30px 90px rgba(0,0,0,.25); }
.modal-head { display: flex; justify-content: space-between; gap: 15px; padding: 19px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 18px; }
.modal-body { padding: 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 15px 20px; border-top: 1px solid var(--line); background: #fbfcfa; }

.empty { padding: 50px 22px; color: var(--muted); text-align: center; }
.empty-icon { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto 13px; border-radius: 15px; color: var(--teal); background: var(--teal-soft); font-size: 20px; }
.toast { position: fixed; z-index: 200; right: 24px; bottom: 24px; max-width: 390px; padding: 12px 15px; border-radius: 10px; color: white; background: #173b3a; box-shadow: var(--shadow); opacity: 0; transform: translateY(15px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: var(--red); }
.mobile-only { display: none; }

.today-page { max-width: 660px; margin: 0 auto; }
.today-hero { padding: 22px; color: white; background: linear-gradient(135deg, #163d3b, #24665d); border-radius: 20px; box-shadow: var(--shadow); }
.today-hero h1 { margin: 7px 0; font-size: 30px; }
.today-location { color: #c6dbd6; }
.today-time { display: inline-flex; margin-top: 16px; padding: 7px 10px; border-radius: 8px; color: #1f4743; background: #e7f4f0; font-weight: 700; }
.today-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; }
.today-action { min-height: 78px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: white; text-align: left; cursor: pointer; }
.today-action strong { display: block; margin-top: 9px; font-size: 12px; }

@media (max-width: 1180px) {
  .summary-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-grid { grid-template-columns: 1fr repeat(2, minmax(100px,.45fr)); }
  .work-row { grid-template-columns: 20px 1.3fr .7fr .55fr auto; }
  .work-row > :nth-child(5) { display: none; }
}
@media (max-width: 900px) {
  .login-page { grid-template-columns: 1fr; }
  .login-story { min-height: 440px; }
  .login-panel { min-height: auto; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: 20px 0 50px rgba(0,0,0,.2); }
  .workspace { margin-left: 0; }
  .menu-button { display: grid; }
  .topbar { padding: 0 15px; }
  .search-wrap { width: auto; flex: 1; }
  .profile-button .meta { display: none; }
  .content { padding: 23px 16px 90px; }
  .split, .three-col { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-grid > :first-child { grid-column: 1 / -1; }
  .work-row { grid-template-columns: 14px 1fr auto; }
  .work-row > :nth-child(3), .work-row > :nth-child(4), .work-row > :nth-child(5) { display: none; }
  .mobile-only { display: initial; }
}
@media (max-width: 620px) {
  .login-story { min-height: 390px; padding: 30px 24px; }
  .login-proof { display: none; }
  .login-panel { padding: 30px 18px 50px; }
  .login-panel-head { align-items: flex-start; flex-direction: column; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-card { min-height: 150px; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .summary-card { min-height: 100px; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .page-head .head-actions { width: 100%; }
  .page-head .head-actions .btn { flex: 1; }
  .two-col, .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .hero .card-body { padding: 19px; }
  .hero-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .project-card-grid { grid-template-columns: 1fr; }
  .metric-strip { grid-template-columns: repeat(2, 1fr); }
  .check-row { grid-template-columns: 28px 1fr auto; }
  .check-row > :nth-child(3) { display: none; }
  .brief { padding-right: 18px; }
  .brief button { position: static; margin-top: 10px; }
  .topbar .icon-button { display: none; }
  .today-page { margin: -8px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
