:root {
  --ink: #0d0e10;
  --ink-2: #1b1c1f;
  --paper: #f5f5f3;
  --surface: #ffffff;
  --line: #dedfd8;
  --muted: #73766f;
  --accent: #e30613;
  --accent-strong: #c9000c;
  --accent-soft: #ffe5e7;
  --signal: #2acb82;
  --signal-strong: #18ad6a;
  --green: #1e7c54;
  --green-soft: #dcf4e8;
  --orange: #bc6712;
  --orange-soft: #fff0da;
  --red: #b33939;
  --red-soft: #fde7e5;
  --blue: #2b63c4;
  --blue-soft: #e6efff;
  --purple: #7651c7;
  --purple-soft: #eee9ff;
  --shadow: 0 18px 50px rgba(27, 29, 25, 0.08);
  --radius: 20px;
  --radius-sm: 13px;
  --sidebar: 252px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.is-hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 9px; color: #7b7e75; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow--light { color: rgba(255,255,255,.55); }

.brand-lockup { position: relative; z-index: 2; width: min(660px, 84vw); aspect-ratio: 662 / 98; overflow: hidden; }
.brand-logo-image { position: absolute; top: 0; left: -22.66%; display: block; width: 143.5%; max-width: none; height: auto; }
.brand-lockup--sidebar { width: 190px; margin: 0 auto; }

/* Login */
.login-screen { min-height: 100dvh; padding-bottom: 42px; background: linear-gradient(145deg, #f8f8f6 0%, #fff 70%, #fff4f4 100%); }
.login-brand-stage { position: relative; height: 170px; display: grid; place-items: center; overflow: hidden; background: transparent; }
.login-brand-stage::before, .login-brand-stage::after { position: absolute; border: 1px solid rgba(227,6,19,.22); border-radius: 50%; content: ""; }
.login-brand-stage::before, .login-brand-stage::after { display: none; }
.login-brand-accent { position: absolute; width: 44px; height: 4px; left: 50%; bottom: 4px; background: var(--accent); border-radius: 4px; transform: translateX(-50%); }
.login-visual { position: relative; display: flex; min-height: 100dvh; padding: 44px 5vw; flex-direction: column; overflow: hidden; color: white; background: #0b0c0e; }
.login-copy { position: relative; z-index: 2; max-width: 660px; margin: auto 0 12vh; }
.login-copy h1 { margin: 0; font-size: clamp(54px, 6.7vw, 108px); line-height: .91; letter-spacing: -.075em; font-weight: 780; }
.login-copy h1 em { color: var(--accent); font-style: normal; }
.login-copy > p:last-child { max-width: 510px; margin: 32px 0 0; color: rgba(255,255,255,.6); font-size: 18px; line-height: 1.6; }
.login-art { position: absolute; inset: 0; pointer-events: none; }
.art-ring { position: absolute; width: 510px; aspect-ratio: 1; border: 1px solid rgba(227,6,19,.25); border-radius: 50%; }
.art-ring--one { top: -225px; right: -150px; }
.art-ring--two { right: -60px; bottom: -310px; width: 680px; }
.art-line { position: absolute; top: 35%; right: -10%; width: 64%; height: 16px; background: var(--accent); transform: rotate(-18deg) skew(-30deg); opacity: .88; }
.login-panel { position: relative; z-index: 3; width: min(100% - 32px, 520px); min-height: 0; display: block; margin: 12px auto 0; padding: 0; background: transparent; }
.login-form-wrap { width: 100%; padding: 30px 42px 20px; background: white; border: 1px solid #ecece8; border-radius: 24px; box-shadow: 0 24px 70px rgba(22,23,25,.12); }
.login-form-wrap h2 { margin: 0 0 8px; font-size: clamp(38px, 4vw, 54px); letter-spacing: -.055em; }
.login-form-wrap > .muted { margin: 0 0 24px; font-size: 15px; }
.login-form { display: grid; gap: 14px; }
label { display: grid; gap: 8px; color: #40433e; font-size: 13px; font-weight: 700; }
input, select, textarea { width: 100%; padding: 13px 14px; color: var(--ink); background: #fff; border: 1px solid #d7d9d1; border-radius: 11px; outline: 0; transition: .2s border-color, .2s box-shadow; }
input:focus, select:focus, textarea:focus { border-color: #d94851; box-shadow: 0 0 0 4px rgba(227,6,19,.11); }
textarea { min-height: 90px; resize: vertical; }
.button { min-height: 43px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border: 1px solid transparent; border-radius: 11px; font-size: 13px; font-weight: 800; cursor: pointer; transition: .18s transform, .18s background, .18s border-color; }
.button:hover { transform: translateY(-1px); }
.button--primary { color: white; background: var(--accent); }
.button--primary:hover { background: var(--accent-strong); }
.button--dark { color: white; background: var(--ink); }
.button--secondary { background: white; border-color: var(--line); }
.button--danger { color: var(--red); background: var(--red-soft); }
.button--ghost { padding-inline: 7px; background: transparent; }
.button--full { width: 100%; margin-top: 8px; justify-content: space-between; padding-inline: 18px; }
.demo-users { margin-top: 26px; }
.demo-users > span { display: block; margin-bottom: 12px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.demo-user-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.demo-user { display: flex; align-items: center; gap: 12px; padding: 10px; text-align: left; background: transparent; border: 1px solid transparent; border-radius: 12px; cursor: pointer; }
.demo-user:hover { background: white; border-color: var(--line); }
.demo-user b, .avatar { display: grid; flex: 0 0 auto; width: 36px; height: 36px; place-items: center; background: #e9eae4; border-radius: 50%; font-size: 11px; }
.demo-user span { display: grid; gap: 2px; }
.demo-user strong { font-size: 13px; }
.demo-user small { color: var(--muted); font-size: 11px; }
.login-note { display: flex; align-items: center; gap: 8px; margin-top: 20px; color: var(--muted); font-size: 11px; }
.status-dot { display: inline-block; width: 7px; height: 7px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 0 4px var(--accent-soft); }

/* Shell */
.app-shell { min-height: 100dvh; }
.sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; width: var(--sidebar); display: flex; padding: 24px 16px 18px; flex-direction: column; color: var(--ink); background: #fff; border-right: 1px solid #e2e3de; box-shadow: 8px 0 30px rgba(18,20,18,.035); }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 0 8px; }
.sidebar .sidebar-close { display: none; color: var(--ink); }
.workspace-badge { display: flex; align-items: center; gap: 11px; margin: 30px 0 20px; padding: 11px; background: #f7f7f5; border: 1px solid #e7e8e3; border-radius: 13px; }
.workspace-badge > span { display: grid; width: 36px; height: 36px; place-items: center; color: white; background: var(--accent); border-radius: 9px; font-size: 11px; font-weight: 900; }
.workspace-badge div, .user-switch > span:nth-child(2) { display: grid; gap: 3px; min-width: 0; }
.workspace-badge strong { font-size: 12px; }
.workspace-badge small { color: var(--muted); font-size: 10px; }
.primary-nav { display: grid; gap: 5px; }
.nav-item { position: relative; width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 12px; color: #777a74; background: transparent; border: 0; border-radius: 10px; text-align: left; font-size: 13px; font-weight: 650; cursor: pointer; }
.nav-item:hover { color: var(--ink); background: #f5f5f2; }
.nav-item.is-active { color: var(--ink); background: #efefec; }
.nav-item.is-active::before { position: absolute; left: -16px; width: 3px; height: 22px; background: var(--accent); border-radius: 0 4px 4px 0; content: ""; }
.nav-icon { width: 21px; text-align: center; font-size: 17px; }
.nav-badge { margin-left: auto; min-width: 21px; padding: 3px 6px; color: white; background: var(--accent); border-radius: 10px; text-align: center; font-size: 9px; font-weight: 900; }
.sidebar-foot { display: grid; gap: 12px; margin-top: auto; }
.install-card, .user-switch { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px; color: var(--ink); background: transparent; border: 0; border-radius: 12px; text-align: left; cursor: pointer; }
.install-card { background: var(--accent-soft); border: 1px solid #ffcbd0; }
.install-icon { display: grid; width: 32px; height: 32px; place-items: center; color: white; background: var(--accent); border-radius: 8px; font-weight: 900; }
.install-card > span:last-child { display: grid; gap: 2px; }
.install-card strong, .user-switch strong { font-size: 11px; }
.install-card small, .user-switch small { color: var(--muted); font-size: 9px; }
.user-switch { border-top: 1px solid #e8e9e4; border-radius: 0; padding-top: 16px; }
.user-switch .avatar { color: var(--ink); background: #f1f2ec; }
.logout-icon { margin-left: auto; color: #9b9e97; }
.main-column { min-height: 100dvh; margin-left: var(--sidebar); }
.topbar { min-height: 105px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 23px clamp(24px, 4vw, 58px); background: var(--paper); }
.topbar h1 { margin: 0; font-size: clamp(28px, 3vw, 39px); letter-spacing: -.045em; line-height: 1; }
.topbar .eyebrow { margin-bottom: 7px; font-size: 9px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.icon-button { position: relative; width: 42px; height: 42px; display: inline-grid; place-items: center; padding: 0; background: transparent; border: 1px solid transparent; border-radius: 11px; cursor: pointer; }
.notification-button { background: white; border-color: var(--line); font-size: 20px; }
.notification-button > span { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; display: grid; place-items: center; color: white; background: var(--red); border: 2px solid var(--paper); border-radius: 50%; font-size: 8px; font-weight: 800; }
.menu-button { display: none; }
.view { padding: 5px clamp(24px, 4vw, 58px) 60px; outline: none; }

/* Shared content */
.section-grid { display: grid; gap: 18px; }
.section-grid--2 { grid-template-columns: minmax(0, 1.45fr) minmax(300px, .7fr); }
.section-grid--equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { min-width: 0; padding: 22px; background: var(--surface); border: 1px solid #e2e3dc; border-radius: var(--radius); box-shadow: 0 2px 0 rgba(255,255,255,.8) inset; }
.card--dark { color: white; background: var(--ink); border-color: var(--ink); }
.card--accent { background: var(--accent); border-color: var(--accent); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.card-head h2, .card-head h3 { margin: 0; font-size: 17px; letter-spacing: -.025em; }
.card-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.card--dark .card-head p { color: rgba(255,255,255,.5); }
.text-button { padding: 4px; color: #61655b; background: transparent; border: 0; font-size: 11px; font-weight: 800; cursor: pointer; }
.text-button:hover { color: var(--ink); }
.balance-hero { position: relative; min-height: 220px; display: flex; padding: 27px; flex-direction: column; justify-content: space-between; overflow: hidden; }
.balance-hero::after { position: absolute; right: -55px; bottom: -115px; width: 255px; height: 255px; border: 35px solid rgba(227,6,19,.13); border-radius: 50%; content: ""; }
.balance-label { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.55); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.balance-label .pulse { width: 7px; height: 7px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 0 5px rgba(227,6,19,.14); }
.balance-number { position: relative; z-index: 1; margin: 10px 0 4px; font-size: clamp(45px, 6vw, 72px); font-weight: 750; letter-spacing: -.065em; }
.balance-number--negative { color: #ff4d57; }
.balance-number small { font-size: .35em; font-weight: 650; letter-spacing: -.02em; }
.balance-caption { color: rgba(255,255,255,.55); font-size: 12px; }
.balance-caption strong { color: var(--accent); }
.balance-breakdown { position: relative; z-index: 1; display: flex; gap: 24px; margin-top: 24px; }
.balance-breakdown div { display: grid; gap: 4px; }
.balance-breakdown span { color: rgba(255,255,255,.42); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.balance-breakdown strong { font-size: 13px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin: 17px 0; }
.metric-card { min-width: 0; padding: 17px; background: white; border: 1px solid #e2e3dc; border-radius: 15px; }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.metric-icon { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 8px; font-size: 13px; }
.metric-icon--green { color: var(--green); background: var(--green-soft); }
.metric-icon--blue { color: var(--blue); background: var(--blue-soft); }
.metric-icon--red { color: var(--red); background: var(--red-soft); }
.metric-icon--orange { color: var(--orange); background: var(--orange-soft); }
.metric-value { display: block; margin: 15px 0 4px; font-size: clamp(22px, 2.3vw, 31px); letter-spacing: -.045em; white-space: nowrap; }
.metric-meta { color: var(--muted); font-size: 10px; }
.activity-list { display: grid; }
.activity-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid #ecece6; }
.activity-row:first-child { border-top: 0; padding-top: 0; }
.activity-row:last-child { padding-bottom: 0; }
.activity-symbol { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 10px; font-size: 15px; font-weight: 800; }
.activity-symbol--evening { color: var(--blue); background: var(--blue-soft); }
.activity-symbol--project { color: var(--purple); background: var(--purple-soft); }
.activity-symbol--payment { color: var(--green); background: var(--green-soft); }
.activity-symbol--material { color: var(--red); background: var(--red-soft); }
.activity-symbol--bonus { color: #8b7200; background: #fff7c6; }
.activity-symbol--adjustment { color: #656864; background: #eceee9; }
.activity-main { min-width: 0; }
.activity-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.activity-main small { color: var(--muted); font-size: 10px; }
.activity-value { text-align: right; }
.activity-value strong { display: block; font-size: 12px; white-space: nowrap; }
.activity-value small { color: var(--muted); font-size: 9px; }
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.quick-action { min-height: 78px; display: flex; padding: 13px; flex-direction: column; justify-content: space-between; align-items: flex-start; color: #e8e9e3; background: #242629; border: 1px solid #303235; border-radius: 13px; cursor: pointer; }
.quick-action:hover { border-color: #8c1d24; }
.quick-action span { color: #ff3d49; font-size: 18px; }
.quick-action[data-view="jobs"] { border-color: rgba(42,203,130,.35); }
.quick-action[data-view="jobs"] span { color: var(--signal); }
.quick-action strong { font-size: 11px; }
.quick-action--wide { grid-column: 1 / -1; min-height: 55px; flex-direction: row; align-items: center; }
.pending-callout { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding: 14px; background: var(--orange-soft); border-radius: 13px; }
.pending-callout > span { display: grid; width: 36px; height: 36px; place-items: center; color: var(--orange); background: white; border-radius: 50%; font-size: 14px; font-weight: 900; }
.pending-callout div { display: grid; gap: 3px; }
.pending-callout strong { font-size: 12px; }
.pending-callout small { color: #88603b; font-size: 10px; }
.sparkline { width: 100%; height: 90px; margin-top: 12px; }
.sparkline polyline { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.sparkline .area { fill: url(#spark-gradient); stroke: none; }
.month-bars { height: 116px; display: flex; align-items: flex-end; gap: 10px; padding-top: 10px; }
.month-bar { flex: 1; display: grid; align-items: end; gap: 7px; text-align: center; color: var(--muted); font-size: 8px; }
.month-bar i { display: block; min-height: 4px; background: #e4e5de; border-radius: 5px 5px 2px 2px; }
.month-bar.is-current i { background: var(--accent); }
.month-bar.is-current { color: var(--ink); font-weight: 800; }

/* Tables and filters */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.filter-tabs { display: flex; gap: 5px; padding: 4px; overflow-x: auto; background: #e9eae4; border-radius: 12px; scrollbar-width: none; }
.filter-tab { flex: 0 0 auto; padding: 8px 12px; color: var(--muted); background: transparent; border: 0; border-radius: 9px; font-size: 11px; font-weight: 750; cursor: pointer; }
.filter-tab.is-active { color: var(--ink); background: white; box-shadow: 0 2px 5px rgba(0,0,0,.06); }
.search-box { position: relative; min-width: 230px; }
.search-box input { padding-left: 37px; background: white; }
.search-box span { position: absolute; left: 13px; top: 50%; color: var(--muted); transform: translateY(-50%); }
.data-table-wrap { overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 11px 12px; color: #8b8d86; border-bottom: 1px solid var(--line); text-align: left; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 14px 12px; border-bottom: 1px solid #ecece7; font-size: 11px; vertical-align: middle; }
.data-table tbody tr { cursor: pointer; transition: background .15s; }
.data-table tbody tr:hover { background: #fafaf6; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.title-cell { min-width: 190px; }
.title-cell strong { display: block; margin-bottom: 3px; font-size: 12px; }
.title-cell small { color: var(--muted); }
.money { font-weight: 800; white-space: nowrap; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 99px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.status::before { width: 6px; height: 6px; background: currentColor; border-radius: 50%; content: ""; }
.status--approved, .status--active { color: var(--green); background: var(--green-soft); }
.status--pending { color: var(--orange); background: var(--orange-soft); }
.status--changes { color: #92650a; background: #fff5c5; }
.status--rejected, .status--cancelled { color: var(--red); background: var(--red-soft); }
.status--draft { color: #656864; background: #eceee9; }
.empty-state { padding: 56px 20px; text-align: center; }
.empty-state span { display: grid; width: 54px; height: 54px; margin: 0 auto 15px; place-items: center; background: #f0f1eb; border-radius: 50%; font-size: 22px; }
.empty-state h3 { margin: 0 0 6px; font-size: 16px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 12px; }

/* Calendar */
.calendar-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, .55fr); gap: 18px; }
.calendar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.calendar-head h2 { margin: 0; font-size: 20px; letter-spacing: -.03em; }
.calendar-controls { display: flex; gap: 6px; }
.calendar-controls button { width: 33px; height: 33px; border: 1px solid var(--line); background: white; border-radius: 9px; cursor: pointer; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays div { padding: 8px; color: var(--muted); text-align: center; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.calendar-day { position: relative; min-height: 91px; padding: 9px; background: white; border: 1px solid #ecece6; border-width: 1px 1px 0 0; cursor: pointer; }
.calendar-day:nth-child(7n+1) { border-left-width: 1px; }
.calendar-day.is-outside { color: #b5b7b0; background: #fafaf6; }
.calendar-day.is-today .day-number { color: var(--ink); background: var(--accent); }
.calendar-day.is-selected { box-shadow: inset 0 0 0 2px var(--ink); z-index: 1; }
.day-number { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; font-size: 10px; font-weight: 800; }
.day-events { display: grid; gap: 3px; margin-top: 6px; }
.calendar-event { overflow: hidden; padding: 4px 5px; border-radius: 5px; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; font-weight: 750; }
.calendar-event--evening { color: var(--blue); background: var(--blue-soft); }
.calendar-event--project { color: var(--purple); background: var(--purple-soft); }
.calendar-event--payment { color: var(--green); background: var(--green-soft); }
.calendar-event--material { color: var(--red); background: var(--red-soft); }
.calendar-event--bonus { color: #7b6700; background: #fff4b7; }
.calendar-event--adjustment { color: #5e625b; background: #e9ebe6; }
.calendar-more { color: var(--muted); font-size: 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 9px 13px; margin-top: 16px; }
.legend span { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 9px; }
.legend i { width: 8px; height: 8px; border-radius: 3px; }
.day-panel-date { margin: 0 0 18px; font-size: 20px; letter-spacing: -.03em; }

/* Reports / employees / audit */
.report-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 25px; background: var(--ink); color: white; border-radius: var(--radius); }
.report-hero h2 { margin: 0 0 5px; font-size: 23px; }
.report-hero p { margin: 0; color: rgba(255,255,255,.5); font-size: 11px; }
.report-actions { display: flex; gap: 8px; }
.report-actions .button--secondary { color: white; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.13); }
.date-range { display: flex; align-items: end; gap: 10px; margin: 18px 0; padding: 17px; background: white; border: 1px solid var(--line); border-radius: 15px; }
.date-range label { min-width: 170px; }
.summary-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 18px 0; background: white; border: 1px solid var(--line); border-radius: 15px; overflow: hidden; }
.summary-strip div { padding: 17px; border-left: 1px solid var(--line); }
.summary-strip div:first-child { border-left: 0; }
.summary-strip span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.summary-strip strong { font-size: 16px; white-space: nowrap; }
.employee-card { display: flex; align-items: center; gap: 15px; }
.employee-card .avatar { width: 47px; height: 47px; background: var(--accent); font-size: 13px; }
.employee-card-main { min-width: 0; flex: 1; }
.employee-card-main h3 { margin: 0 0 4px; font-size: 15px; }
.employee-card-main p { margin: 0; color: var(--muted); font-size: 10px; }
.employee-card-value { text-align: right; }
.employee-card-value strong { display: block; font-size: 17px; }
.audit-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid #ebebe5; }
.audit-row:last-child { border-bottom: 0; }
.audit-icon { display: grid; width: 36px; height: 36px; place-items: center; color: #5f625c; background: #eff0eb; border-radius: 10px; font-size: 13px; }
.audit-main { font-size: 11px; line-height: 1.5; }
.audit-main strong { font-weight: 800; }
.audit-main small { display: block; color: var(--muted); }
.audit-time { color: var(--muted); font-size: 9px; white-space: nowrap; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; border-bottom: 1px solid #ecece6; }
.settings-row:last-child { border-bottom: 0; }
.settings-row strong { display: block; font-size: 12px; }
.settings-row small { color: var(--muted); font-size: 10px; }
.settings-row input { width: 100px; text-align: right; }

/* Modal */
.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; padding: 18px; place-items: center; background: rgba(9,10,10,.58); backdrop-filter: blur(6px); animation: fade-in .18s ease-out; }
.modal { position: relative; width: min(100%, 680px); max-height: calc(100dvh - 36px); overflow: auto; padding: 28px; background: #f9f9f5; border-radius: 22px; box-shadow: 0 30px 100px rgba(0,0,0,.28); animation: rise-in .22s ease-out; }
.modal--wide { width: min(100%, 820px); }
.modal--compact { width: min(100%, 440px); }
.modal-close { position: absolute; z-index: 2; top: 17px; right: 17px; background: #ecece7; font-size: 23px; }
.modal-header { padding-right: 46px; margin-bottom: 23px; }
.modal-header h2 { margin: 0 0 5px; font-size: 25px; letter-spacing: -.04em; }
.modal-header p { margin: 0; color: var(--muted); font-size: 11px; }
.code-login-identity { display: flex; align-items: center; gap: 16px; padding-right: 42px; margin-bottom: 24px; }
.code-login-identity > span { display: grid; flex: 0 0 auto; width: 52px; height: 52px; place-items: center; color: white; background: var(--accent); border-radius: 15px; font-size: 13px; font-weight: 900; }
.code-login-identity .eyebrow { margin-bottom: 5px; }
.code-login-identity h2 { margin: 0; font-size: 24px; letter-spacing: -.035em; }
.code-login-identity div > p:last-child { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.type-picker { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 22px; }
.type-option { display: flex; align-items: center; gap: 12px; padding: 14px; text-align: left; background: white; border: 1px solid var(--line); border-radius: 13px; cursor: pointer; }
.type-option.is-active { border-color: #bd1a24; box-shadow: 0 0 0 3px rgba(227,6,19,.13); }
.type-option > span { display: grid; width: 38px; height: 38px; place-items: center; background: var(--blue-soft); border-radius: 10px; }
.type-option:nth-child(2) > span { color: var(--purple); background: var(--purple-soft); }
.type-option strong { display: block; font-size: 12px; }
.type-option small { color: var(--muted); font-size: 9px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.form-grid .field--full { grid-column: 1 / -1; }
.field-help { color: var(--muted); font-size: 9px; font-weight: 500; }
input[readonly] { background: #f1f1ee; color: #6f706a; cursor: not-allowed; }
.full-amount-toggle { display: flex; align-items: center; gap: 12px; padding: 14px 15px; color: var(--ink); background: #fff4f5; border: 1px solid #f1c9cd; border-radius: 13px; cursor: pointer; }
.full-amount-toggle input { flex: 0 0 auto; width: 20px; height: 20px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.full-amount-toggle span { display: grid; gap: 3px; }
.full-amount-toggle strong { font-size: 11px; }
.full-amount-toggle small { color: var(--muted); font-size: 9px; font-weight: 500; }
.full-amount-toggle:has(input:checked) { background: #ffe7e9; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(227,6,19,.09); }
.cash-taken-options { min-width: 0; margin: 0; padding: 0; border: 0; }
.cash-taken-options legend { margin-bottom: 8px; color: var(--ink); font-size: 11px; font-weight: 800; }
.cash-option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.cash-option { display: flex; align-items: flex-start; gap: 10px; min-width: 0; padding: 13px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.cash-option--full { grid-column: 1 / -1; background: #fff4f5; border-color: #f1c9cd; }
.cash-option input { flex: 0 0 auto; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); cursor: pointer; }
.cash-option span { display: grid; gap: 3px; min-width: 0; }
.cash-option strong { font-size: 10px; line-height: 1.35; }
.cash-option small { color: var(--muted); font-size: 9px; font-weight: 500; line-height: 1.45; }
.cash-option:has(input:checked) { background: #ffe7e9; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(227,6,19,.09); }
.install-steps { margin: 20px 0 4px; padding-left: 24px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.install-steps li + li { margin-top: 7px; }
.install-steps strong { color: var(--ink); }
.calc-box { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px; background: var(--ink); color: white; border-radius: 13px; }
.calc-box span { color: rgba(255,255,255,.52); font-size: 10px; }
.calc-box strong { font-size: 21px; }
.project-calculations { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.project-calculations .calc-box { align-items: flex-start; flex-direction: column; gap: 5px; min-width: 0; }
.project-calculations .calc-box strong { font-size: 17px; }
.calc-box--secondary { background: #252729; }
.calc-box--balance { background: #7f1017; }
.photo-drop { padding: 22px; color: var(--muted); background: white; border: 1px dashed #cbd0c2; border-radius: 12px; text-align: center; font-size: 10px; }
.photo-drop input { display: none; }
.photo-drop strong { display: block; margin-top: 5px; color: var(--ink); font-size: 11px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.review-grid { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 20px; }
.detail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.detail-list div { padding: 13px; background: white; border: 1px solid #e7e8e1; border-radius: 11px; }
.detail-list span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.detail-list strong { font-size: 12px; }
.review-side { padding: 17px; color: white; background: var(--ink); border-radius: 15px; }
.review-side h3 { margin: 0 0 16px; font-size: 13px; }
.review-side label { color: rgba(255,255,255,.6); }
.review-side input, .review-side textarea { color: white; background: #292b2e; border-color: #393c3f; }
.review-total { display: flex; justify-content: space-between; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.12); }
.review-total span { color: rgba(255,255,255,.5); font-size: 10px; }
.review-total strong { color: var(--accent); font-size: 19px; }
.review-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 18px; }
.review-actions .button { font-size: 10px; }
.review-actions .button--primary { grid-column: 1 / -1; color: #052417; background: var(--signal); }
.review-actions .button--primary:hover { background: var(--signal-strong); }
.toast-root { position: fixed; z-index: 200; right: 22px; bottom: 22px; display: grid; gap: 8px; }
.toast { min-width: 280px; display: flex; align-items: center; gap: 11px; padding: 13px 15px; color: white; background: var(--ink); border-radius: 12px; box-shadow: var(--shadow); animation: toast-in .24s ease-out; font-size: 11px; }
.toast > span { display: grid; width: 23px; height: 23px; place-items: center; color: #052417; background: var(--signal); border-radius: 50%; font-weight: 900; }

.mobile-nav, .sidebar-scrim { display: none; }

@keyframes fade-in { from { opacity: 0; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(16px) scale(.985); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 1100px) {
  :root { --sidebar: 220px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-grid--2 { grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); }
  .summary-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .summary-strip div:nth-child(4) { border-left: 0; border-top: 1px solid var(--line); }
  .summary-strip div:nth-child(5) { border-top: 1px solid var(--line); }
}

@media (max-width: 820px) {
  .login-brand-stage { height: 155px; }
  .brand-lockup--login { width: min(620px, 86vw); }
  .login-panel { width: min(100% - 28px, 520px); margin-top: -36px; }
  .sidebar { width: min(86vw, 300px); transform: translateX(-105%); transition: transform .25s ease; }
  .app-shell.is-menu-open .sidebar { transform: translateX(0); }
  .sidebar .sidebar-close { display: grid; }
  .sidebar-scrim { position: fixed; z-index: 20; inset: 0; background: rgba(0,0,0,.4); }
  .app-shell.is-menu-open .sidebar-scrim { display: block; }
  .main-column { margin-left: 0; padding-bottom: 73px; }
  .menu-button { display: inline-flex; flex-direction: column; gap: 4px; }
  .menu-button span { width: 18px; height: 2px; background: var(--ink); border-radius: 2px; }
  .topbar { min-height: 90px; padding: 18px 20px; }
  .topbar > div:nth-child(2) { margin-right: auto; }
  .topbar h1 { font-size: 27px; }
  .topbar-actions .button { width: 42px; padding: 0; font-size: 0; }
  .topbar-actions .button span { font-size: 20px; }
  .view { padding: 4px 16px 30px; }
  .mobile-nav { position: fixed; z-index: 15; inset: auto 0 0; height: calc(67px + env(safe-area-inset-bottom)); display: flex; padding: 8px 8px env(safe-area-inset-bottom); justify-content: space-around; background: rgba(255,255,255,.95); border-top: 1px solid var(--line); backdrop-filter: blur(16px); }
  .mobile-nav .nav-item { width: auto; min-width: 58px; padding: 5px; flex-direction: column; gap: 3px; font-size: 8px; color: var(--muted); }
  .mobile-nav .nav-item.is-active { color: var(--ink); background: transparent; }
  .mobile-nav .nav-item.is-active::before { inset: auto auto -3px; width: 24px; height: 3px; border-radius: 3px 3px 0 0; }
  .mobile-nav .nav-icon { font-size: 18px; }
  .mobile-nav .nav-badge { position: absolute; top: 1px; right: 7px; }
  .section-grid--2, .section-grid--equal, .calendar-layout { grid-template-columns: 1fr; }
  .calendar-layout > .card:last-child { order: -1; }
  .report-hero { align-items: flex-start; flex-direction: column; }
  .review-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .login-screen { padding-bottom: 0; }
  .login-brand-stage { height: 126px; }
  .login-brand-accent { bottom: 1px; height: 4px; }
  .brand-lockup--login { width: min(420px, 88vw); }
  .login-panel { width: 100%; margin-top: 0; }
  .login-form-wrap { padding: 30px 22px 32px; border: 0; border-radius: 0; box-shadow: none; }
  .demo-user-grid { grid-template-columns: 1fr; }
  .login-form-wrap h2 { font-size: 39px; }
  .topbar .eyebrow { display: none; }
  .topbar { gap: 8px; }
  .topbar h1 { font-size: 24px; }
  .notification-button { width: 39px; }
  .metric-grid { gap: 9px; }
  .metric-card { padding: 14px; }
  .metric-value { margin-top: 12px; font-size: 22px; }
  .card { padding: 17px; border-radius: 16px; }
  .balance-hero { min-height: 210px; padding: 22px; }
  .balance-number { font-size: 52px; }
  .balance-breakdown { gap: 14px; }
  .balance-breakdown strong { font-size: 11px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .search-box { min-width: 0; }
  .data-table thead { display: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table tr { position: relative; padding: 13px 0; border-bottom: 1px solid #ecece7; }
  .data-table td { padding: 3px 0; border: 0; }
  .data-table td:nth-child(n+5) { display: inline-block; width: auto; margin-right: 8px; }
  .data-table td:last-child { position: absolute; top: 14px; right: 0; }
  .calendar-day { min-height: 60px; padding: 5px; }
  .calendar-event { width: 6px; height: 6px; padding: 0; border-radius: 50%; font-size: 0; }
  .day-events { display: flex; flex-wrap: wrap; gap: 3px; }
  .calendar-more { display: none; }
  .date-range { align-items: stretch; flex-direction: column; }
  .date-range label { min-width: 0; }
  .summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-strip div:nth-child(n) { border: 0; border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
  .summary-strip div:nth-child(odd) { border-left: 0; }
  .summary-strip div:nth-child(-n+2) { border-top: 0; }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal { width: 100%; max-height: 92dvh; padding: 22px 17px calc(22px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; }
  .form-grid, .detail-list, .cash-option-grid, .project-calculations { grid-template-columns: 1fr; }
  .form-grid .field--full { grid-column: auto; }
  .cash-option--full { grid-column: auto; }
  .type-option { padding: 11px; }
  .type-option small { display: none; }
  .modal-actions { flex-wrap: wrap; }
  .modal-actions .button { flex: 1; }
  .report-actions { width: 100%; }
  .report-actions .button { flex: 1; }
  .toast-root { left: 14px; right: 14px; bottom: 82px; }
  .toast { min-width: 0; }
}

@media print {
  .sidebar, .topbar, .mobile-nav, .report-actions, .date-range, .toolbar { display: none !important; }
  .main-column { margin: 0; }
  .view { padding: 0; }
  .card, .report-hero, .summary-strip { break-inside: avoid; box-shadow: none; }
  .report-hero { color: black; background: white; border: 1px solid #ccc; }
  .report-hero p { color: #555; }
}
