/* =========================================================
   inFILMity OPS
   Project / cost / reimbursement workspace
   ========================================================= */

:root {
  --bg: #070708;
  --bg-soft: #0a0a0c;
  --panel: #101013;
  --panel-2: #141418;
  --panel-3: #1a1a20;
  --paper: #f4f1ea;
  --paper-bright: #fffdf8;
  --muted: rgba(244, 241, 234, 0.62);
  --faint: rgba(244, 241, 234, 0.38);
  --ghost: rgba(244, 241, 234, 0.2);
  --line: rgba(244, 241, 234, 0.105);
  --line-strong: rgba(244, 241, 234, 0.19);
  --orange: #ff7a33;
  --orange-deep: #cf5e17;
  --orange-soft: rgba(255, 122, 51, 0.12);
  --sky: #7fd4f2;
  --sky-soft: rgba(127, 212, 242, 0.12);
  --blue: #5672ff;
  --green: #abc5b2;
  --green-soft: rgba(171, 197, 178, 0.12);
  --red: #ff6251;
  --red-soft: rgba(255, 98, 81, 0.12);
  --yellow: #e7b36a;
  --font: "Inter", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", "JetBrains Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --sidebar-w: 246px;
  --topbar-h: 76px;
  --shadow-lg: 0 32px 80px rgba(0, 0, 0, 0.55);
  --shadow-md: 0 16px 48px rgba(0, 0, 0, 0.36);
}

* { box-sizing: border-box; }

html { height: 100%; background: var(--bg); }

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--paper);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.is-locked { overflow: hidden; }

::selection { background: rgba(255, 122, 51, 0.32); color: var(--paper-bright); }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
svg { display: block; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(244, 241, 234, 0.16); border-radius: 20px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(244, 241, 234, 0.3); background-clip: padding-box; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.is-hidden { display: none !important; }

.icon { width: 18px; height: 18px; flex: none; stroke-width: 1.6; }
.icon--sm { width: 15px; height: 15px; }
.icon--lg { width: 22px; height: 22px; }

.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.mono { font-family: var(--mono); letter-spacing: 0.02em; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.accent { color: var(--orange); }
.danger-text { color: var(--red) !important; }
.success-text { color: var(--green) !important; }

/* ---------- Boot ---------- */

.boot {
  position: fixed; inset: 0; z-index: 200;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px;
  background: #050506;
  transition: opacity 0.55s var(--ease), visibility 0.55s;
}
.boot.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.boot__logo { width: 158px; opacity: 0.94; }
.boot__line { width: 116px; height: 1px; background: rgba(244,241,234,.12); overflow: hidden; }
.boot__line span { display: block; width: 50%; height: 100%; background: var(--orange); animation: bootLine 1.3s ease-in-out infinite; }
.boot__caption { margin: 0; font-family: var(--mono); font-size: 9px; letter-spacing: 0.28em; color: var(--faint); }
@keyframes bootLine { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }

/* ---------- Common controls ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 17px;
  border: 1px solid transparent; border-radius: 999px;
  background: transparent; color: var(--paper);
  font-size: 13px; font-weight: 600; letter-spacing: 0.01em; line-height: 1;
  white-space: nowrap; transition: background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn .icon { width: 16px; height: 16px; }
.btn--primary { background: var(--paper); color: #08080a; border-color: var(--paper); }
.btn--primary:hover { background: var(--orange); border-color: var(--orange); color: #08080a; }
.btn--accent { background: var(--orange); border-color: var(--orange); color: #100b08; }
.btn--accent:hover { background: #ff8d51; border-color: #ff8d51; }
.btn--ghost { border-color: var(--line-strong); color: var(--paper); }
.btn--ghost:hover { border-color: rgba(244,241,234,.36); background: rgba(244,241,234,.05); }
.btn--quiet { color: var(--muted); padding: 0 10px; }
.btn--quiet:hover { color: var(--paper); background: rgba(244,241,234,.05); }
.btn--danger { border-color: rgba(255,98,81,.38); color: var(--red); background: transparent; }
.btn--danger:hover { background: var(--red-soft); border-color: var(--red); }
.btn--danger-solid { background: var(--red); border-color: var(--red); color: #160504; }
.btn--sm { height: 32px; padding: 0 13px; font-size: 12px; }
.btn--wide { width: 100%; }
.btn--link { height: auto; padding: 0; border-radius: 0; color: var(--muted); font-weight: 500; }
.btn--link:hover { color: var(--paper); transform: none; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0;
  border: 1px solid transparent; border-radius: 50%;
  background: transparent; color: var(--muted);
  transition: all 0.2s var(--ease);
}
.icon-btn:hover { background: rgba(244,241,234,.07); color: var(--paper); border-color: var(--line); }
.icon-btn--danger:hover { color: var(--red); background: var(--red-soft); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}
button:focus:not(:focus-visible) { outline: none; }
[hidden] { display: none !important; }

.tag {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  min-height: 23px; padding: 2px 9px;
  border-radius: 999px; border: 1px solid var(--line);
  background: rgba(244,241,234,.045); color: var(--muted);
  font-size: 11px; font-weight: 500; letter-spacing: .01em; white-space: nowrap;
}
.tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .8; }
.tag--plain::before { display: none; }
.tag--success { color: var(--green); background: var(--green-soft); border-color: rgba(171,197,178,.18); }
.tag--warning { color: var(--yellow); background: rgba(231,179,106,.1); border-color: rgba(231,179,106,.2); }
.tag--danger { color: var(--red); background: var(--red-soft); border-color: rgba(255,98,81,.2); }
.tag--sky { color: var(--sky); background: var(--sky-soft); border-color: rgba(127,212,242,.2); }
.tag--orange { color: var(--orange); background: var(--orange-soft); border-color: rgba(255,122,51,.22); }
.tag--neutral { color: var(--muted); }
.tag--lg { min-height: 28px; padding: 4px 12px; font-size: 12px; }

.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: color-mix(in srgb, var(--avatar-color, #7fd4f2) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--avatar-color, #7fd4f2) 28%, transparent);
  color: var(--avatar-color, #7fd4f2);
  font-size: 12px; font-weight: 600; line-height: 1; flex: none;
  letter-spacing: 0;
}
.avatar--sm { width: 24px; height: 24px; font-size: 10px; }
.avatar--lg { width: 42px; height: 42px; font-size: 15px; }
.avatar--xl { width: 54px; height: 54px; font-size: 19px; }

.avatar-pair { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.avatar-pair__name { color: var(--paper); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- Login ---------- */

.login {
  position: relative; min-height: 100vh; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(430px, 0.75fr);
  background: #050506;
}
.login__art {
  position: absolute; inset: 0;
  background-image: url("/assets/keyart.webp");
  background-size: cover; background-position: center right;
  opacity: 0.62;
  transform: scale(1.02);
  animation: loginArt 14s ease-out both;
}
.login::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(5,5,6,.98) 0%, rgba(5,5,6,.88) 33%, rgba(5,5,6,.38) 62%, rgba(5,5,6,.82) 100%),
    linear-gradient(0deg, rgba(5,5,6,.88) 0%, transparent 36%, rgba(5,5,6,.18) 100%);
}
.login__left {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(28px, 4vw, 58px);
  min-height: 100vh;
}
.login__brand { width: 158px; opacity: .94; }
.login__brand img { width: 100%; }
.login__statement { max-width: 660px; padding-bottom: 5vh; }
.login__kicker {
  display: inline-flex; align-items: center; gap: 12px;
  margin: 0 0 25px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .28em; color: rgba(244,241,234,.54);
}
.login__kicker::before { content: ""; width: 34px; height: 1px; background: var(--orange); }
.login__title {
  margin: 0;
  font-size: clamp(46px, 6.6vw, 96px); font-weight: 700; line-height: .98; letter-spacing: -.06em;
  color: var(--paper-bright);
}
.login__title .dot { color: var(--orange); }
.login__desc {
  max-width: 430px; margin: 25px 0 0;
  color: rgba(244,241,234,.54); font-size: 13.5px; line-height: 1.9;
}
.login__foot {
  display: flex; justify-content: space-between; gap: 24px;
  color: rgba(244,241,234,.34); font-family: var(--mono); font-size: 9px; letter-spacing: .2em;
}
.login__right {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  padding: 30px clamp(26px, 4vw, 66px);
  border-left: 1px solid rgba(244,241,234,.08);
  background: linear-gradient(180deg, rgba(6,6,7,.58), rgba(6,6,7,.8));
  backdrop-filter: blur(16px);
}
.login-card { width: min(100%, 378px); animation: rise 0.8s var(--ease) both; }
.login-card__eyebrow { margin: 0 0 12px; font-family: var(--mono); font-size: 9px; letter-spacing: .28em; color: var(--faint); }
.login-card__title { margin: 0; font-size: 30px; font-weight: 650; letter-spacing: -.04em; }
.login-card__sub { margin: 9px 0 28px; color: var(--muted); font-size: 13px; }
.login-error {
  display: none; align-items: flex-start; gap: 9px;
  margin: 0 0 16px; padding: 11px 13px;
  border: 1px solid rgba(255,98,81,.22); background: var(--red-soft);
  color: #ffb4aa; font-size: 12.5px; line-height: 1.55;
}
.login-error.is-visible { display: flex; }
.login-form { display: grid; gap: 16px; }
.login-form .field { gap: 7px; }
.login-form .input { height: 46px; background: rgba(244,241,234,.045); }
.login-form__row { display: flex; justify-content: space-between; align-items: center; margin-top: -4px; }
.login-form__hint { color: var(--faint); font-size: 11.5px; }
.login-form .btn { height: 46px; margin-top: 3px; }
.login-demos { margin-top: 27px; padding-top: 22px; border-top: 1px solid var(--line); }
.login-demos__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.login-demos__label { font-family: var(--mono); font-size: 9px; letter-spacing: .18em; color: var(--faint); }
.demo-account {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 8px 6px; border: 0; border-radius: 3px; background: transparent;
  text-align: left; transition: background .2s var(--ease);
}
.demo-account:hover { background: rgba(244,241,234,.045); }
.demo-account__meta { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.demo-account__name { font-size: 12.5px; color: var(--paper); }
.demo-account__role { font-size: 10.5px; color: var(--faint); }
.demo-account__enter { color: var(--faint); opacity: 0; transform: translateX(-4px); transition: all .2s; }
.demo-account:hover .demo-account__enter { opacity: 1; transform: none; color: var(--orange); }
.login-legal { margin: 22px 0 0; color: var(--faint); font-size: 10px; line-height: 1.7; }

/* ---------- Application shell ---------- */

.app-shell { display: flex; height: 100vh; overflow: hidden; background: var(--bg); }

.sidebar {
  width: var(--sidebar-w); flex: none;
  display: flex; flex-direction: column;
  height: 100vh;
  background:
    radial-gradient(120% 50% at 0% 0%, rgba(255,122,51,.045), transparent 60%),
    linear-gradient(180deg, #0a0a0c 0%, #060607 100%);
  border-right: 1px solid var(--line);
  position: relative; z-index: 10;
}
.sidebar__head {
  height: var(--topbar-h); flex: none;
  display: flex; align-items: center;
  padding: 0 24px;
  border-bottom: 1px solid transparent;
}
.sidebar__logo { width: 137px; opacity: .94; }
.sidebar__mark { display: none; width: 34px; height: 34px; border-radius: 2px; background: url('/assets/logo-square-180.png') center/cover no-repeat; }
.sidebar__brand { display: inline-flex; align-items: center; }
.sidebar__body { flex: 1; overflow-y: auto; padding: 22px 14px 20px; }
.nav-group + .nav-group { margin-top: 26px; }
.nav-group__label {
  margin: 0 10px 8px;
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .22em; color: rgba(244,241,234,.27);
}
.nav-list { display: grid; gap: 3px; margin: 0; padding: 0; list-style: none; }
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  width: 100%; height: 42px; padding: 0 11px;
  border: 0; border-radius: 3px; background: transparent;
  color: rgba(244,241,234,.55); text-align: left;
  font-size: 12.5px; transition: all .2s var(--ease);
}
.nav-item:hover { color: var(--paper); background: rgba(244,241,234,.045); }
.nav-item .icon { width: 17px; height: 17px; opacity: .8; }
.nav-item.is-active {
  color: var(--paper); background: rgba(244,241,234,.07);
  box-shadow: inset 0 0 0 1px rgba(244,241,234,.04);
}
.nav-item.is-active::before {
  content: ""; position: absolute; left: 0; top: 11px; bottom: 11px; width: 2px; background: var(--orange);
}
.nav-item.is-active .icon { color: var(--orange); opacity: 1; }
.nav-item__badge {
  margin-left: auto; min-width: 19px; height: 19px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--orange); color: #140b06;
  font-family: var(--mono); font-size: 9px; font-weight: 700;
}
.nav-item__soon { margin-left: auto; font-family: var(--mono); font-size: 8px; color: var(--faint); }
.sidebar__foot { flex: none; padding: 16px 16px 18px; border-top: 1px solid var(--line); }
.user-chip { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 4px 2px; }
.user-chip__meta { flex: 1; min-width: 0; }
.user-chip__name { font-size: 12.5px; color: var(--paper); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip__role { font-size: 10px; color: var(--faint); }
.sidebar__version { margin-top: 14px; display: flex; justify-content: space-between; color: rgba(244,241,234,.2); font-family: var(--mono); font-size: 8px; letter-spacing: .08em; }

.workspace { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100vh; }

.topbar {
  height: var(--topbar-h); flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(7,7,8,.76);
  backdrop-filter: blur(18px);
  position: relative; z-index: 9;
}
.topbar__left { min-width: 0; display: flex; align-items: center; gap: 16px; }
.topbar__crumb { color: var(--faint); font-family: var(--mono); font-size: 9px; letter-spacing: .17em; white-space: nowrap; }
.topbar__crumb span { color: rgba(244,241,234,.22); margin: 0 7px; }
.topbar__title { font-size: 15px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.topbar__right { display: flex; align-items: center; gap: 14px; }
.sync-pill { display: inline-flex; align-items: center; gap: 7px; color: var(--faint); font-size: 10.5px; }
.sync-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(171,197,178,.08); }
.topbar__date { padding-left: 14px; border-left: 1px solid var(--line); color: var(--faint); font-family: var(--mono); font-size: 10px; letter-spacing: .04em; }
.topbar__user { display: flex; align-items: center; gap: 9px; padding-left: 14px; border-left: 1px solid var(--line); }
.topbar__user-name { font-size: 12px; line-height: 1.15; }
.topbar__user-role { font-family: var(--mono); font-size: 8px; color: var(--faint); letter-spacing: .09em; }
.topbar__menu { display: none; }

.main {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 30px clamp(22px, 2.6vw, 40px) 54px;
  scroll-behavior: smooth;
}
.view { max-width: 1600px; margin: 0 auto; animation: viewIn .5s var(--ease) both; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 26px; margin-bottom: 27px; }
.page-head__main { min-width: 0; }
.eyebrow { margin: 0 0 9px; font-family: var(--mono); font-size: 9px; letter-spacing: .24em; color: var(--faint); }
.page-title { margin: 0; font-size: clamp(28px, 3vw, 38px); font-weight: 650; letter-spacing: -.045em; line-height: 1.12; }
.page-title .thin { color: var(--faint); font-weight: 400; }
.page-sub { margin: 9px 0 0; color: var(--muted); font-size: 12.5px; }
.page-head__actions { display: flex; align-items: center; gap: 9px; padding-bottom: 3px; }

.loading-block {
  min-height: 240px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  color: var(--faint); font-size: 12px;
}
.spinner { width: 22px; height: 22px; border: 1.5px solid rgba(244,241,234,.15); border-top-color: var(--orange); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  position: relative; overflow: hidden; background: rgba(244,241,234,.045);
}
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(244,241,234,.06), transparent);
  transform: translateX(-100%); animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }

/* ---------- Dashboard ---------- */

.dashboard-hero {
  position: relative; overflow: hidden;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 28px;
  padding: 24px 0 26px;
  margin-bottom: 20px;
}
.dashboard-hero::before {
  content: ""; position: absolute; right: -80px; top: -200px; width: 560px; height: 380px;
  background: url("/assets/keyart.webp") center/cover no-repeat;
  opacity: .16; filter: saturate(.8); pointer-events: none;
  mask-image: linear-gradient(90deg, transparent, #000 55%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 55%);
}
.dashboard-hero__main { position: relative; z-index: 1; }
.dashboard-hero .page-title { font-size: clamp(32px, 3.6vw, 46px); }
.dashboard-hero__meta { display: flex; align-items: center; gap: 16px; margin-top: 14px; color: var(--faint); font-size: 11px; }
.dashboard-hero__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ghost); }
.dashboard-hero__actions { position: relative; z-index: 1; display: flex; gap: 9px; }

.range-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  margin: 0 0 12px; padding: 9px 12px;
  background: rgba(17,17,21,.7); border: 1px solid var(--line); border-radius: 2px;
}
.range-tabs { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: rgba(244,241,234,.025); }
.range-tab {
  height: 29px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent;
  color: var(--muted); font-size: 11px; white-space: nowrap; transition: color .2s var(--ease), background .2s var(--ease);
}
.range-tab:hover { color: var(--paper); background: rgba(244,241,234,.05); }
.range-tab.is-active { color: #0b0b0d; background: var(--paper); font-weight: 600; }
.range-caption { display: inline-flex; align-items: center; gap: 7px; color: var(--faint); font-size: 10px; }
.range-caption .icon { width: 13px; height: 13px; color: var(--orange); }
.range-caption span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 12px; }
.metric-card {
  position: relative; overflow: hidden;
  min-height: 150px; padding: 20px 21px 18px;
  background: linear-gradient(145deg, rgba(20,20,24,.95), rgba(12,12,15,.98));
  border: 1px solid var(--line); border-radius: 2px;
  display: flex; flex-direction: column;
}
.metric-card::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(244,241,234,.22), transparent);
}
.metric-card--hero {
  background:
    radial-gradient(130% 140% at 100% 0%, rgba(255,122,51,.18), transparent 48%),
    linear-gradient(145deg, #181410, #0f0d0c);
  border-color: rgba(255,122,51,.2);
}
.metric-card--hero::after { background: linear-gradient(90deg, transparent, rgba(255,122,51,.65), transparent); }
.metric-card--receivable {
  background: radial-gradient(130% 120% at 100% 0%, rgba(127,212,242,.11), transparent 55%), linear-gradient(145deg, #12161a, #0d0f12);
  border-color: rgba(127,212,242,.16);
}
.metric-card--receivable::after { background: linear-gradient(90deg, transparent, rgba(127,212,242,.42), transparent); }
.metric-card--hero .metric-card__value { color: var(--paper-bright); }
.metric-card__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.metric-card__label { color: var(--muted); font-size: 11.5px; }
.metric-card__icon { color: var(--faint); }
.metric-card__icon .icon { width: 17px; height: 17px; }
.metric-card__value { margin-top: 13px; font-size: clamp(24px, 2vw, 29px); font-weight: 600; letter-spacing: -.04em; line-height: 1.1; white-space: nowrap; }
.metric-card__value .currency { font-size: .54em; font-weight: 500; color: var(--faint); margin-right: 4px; letter-spacing: 0; }
.metric-card__value .unit { font-size: .48em; color: var(--faint); margin-left: 5px; font-weight: 400; letter-spacing: 0; }
.metric-card__foot { margin-top: auto; padding-top: 13px; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.metric-card__note { color: var(--faint); font-size: 10.5px; line-height: 1.5; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-family: var(--mono); font-size: 9.5px; white-space: nowrap; }
.delta.is-up { color: var(--green); }
.delta.is-down { color: var(--red); }
.delta.is-flat { color: var(--faint); }
.sparkline { width: 58px; height: 25px; opacity: .8; }
.sparkline path { fill: none; stroke: var(--orange); stroke-width: 1.3; vector-effect: non-scaling-stroke; }
.sparkline path.area { fill: rgba(255,122,51,.08); stroke: none; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(330px, .8fr); gap: 12px; margin-bottom: 12px; }
.dashboard-lower { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(330px, .8fr); gap: 12px; }
.panel {
  background: linear-gradient(160deg, rgba(17,17,21,.98), rgba(11,11,14,.98));
  border: 1px solid var(--line); border-radius: 2px;
  min-width: 0;
}
.panel__head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 21px 15px;
}
.panel__title-wrap { display: flex; align-items: center; gap: 10px; }
.panel__title { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.panel__sub { margin: 5px 0 0; color: var(--faint); font-size: 10.5px; }
.panel__action { color: var(--muted); font-size: 11px; display: inline-flex; align-items: center; gap: 5px; padding: 4px; border: 0; background: none; }
.panel__action:hover { color: var(--orange); }
.panel__body { padding: 0 21px 20px; }
.panel__body--flush { padding: 0; }
.panel__foot { padding: 14px 21px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }

.warning-list { display: grid; }
.warning-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 92px 142px;
  width: 100%; border-left: 0; border-right: 0; border-bottom: 0; background: transparent; color: inherit; font: inherit; text-align: left;
  align-items: center; gap: 18px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  cursor: pointer; transition: background .2s;
}
.warning-row:hover { background: rgba(244,241,234,.025); }
.warning-row__main { min-width: 0; }
.warning-row__name { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.warning-row__meta { display: flex; align-items: center; gap: 8px; margin-top: 5px; color: var(--faint); font-size: 10px; }
.warning-row__ratio { text-align: right; }
.warning-row__ratio strong { color: var(--red); font-family: var(--mono); font-size: 14px; font-weight: 600; letter-spacing: -.02em; }
.warning-row__ratio span { color: var(--faint); font-size: 9px; display: block; margin-top: 1px; }
.ratio-bar { width: 100%; height: 3px; background: rgba(244,241,234,.08); position: relative; overflow: hidden; margin-top: 8px; }
.ratio-bar i { display: block; height: 100%; background: var(--red); max-width: 100%; }
.ratio-bar--safe i { background: var(--green); }
.ratio-bar--warn i { background: var(--orange); }
.warning-row__amount { text-align: right; color: var(--muted); font-size: 10px; }
.warning-row__amount strong { display: block; color: var(--paper); font-size: 12px; font-weight: 500; margin-bottom: 3px; }

.donut-wrap { display: flex; align-items: center; gap: 26px; padding: 10px 0 6px; }
.donut {
  position: relative; width: 168px; height: 168px; flex: none; border-radius: 50%;
  background: var(--donut);
  transform: rotate(-90deg);
}
.donut::after { content: ""; position: absolute; inset: 25px; border-radius: 50%; background: #0e0e11; border: 1px solid var(--line); }
.donut__center {
  position: absolute; inset: 25px; z-index: 1; transform: rotate(90deg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.donut__center strong { font-size: 29px; font-weight: 600; letter-spacing: -.05em; line-height: 1; }
.donut__center span { margin-top: 5px; font-family: var(--mono); font-size: 8px; letter-spacing: .16em; color: var(--faint); }
.legend { flex: 1; min-width: 0; display: grid; gap: 11px; }
.legend-row { display: flex; align-items: center; gap: 9px; font-size: 11px; }
.legend-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.legend-label { flex: 1; color: var(--muted); }
.legend-value { color: var(--paper); font-family: var(--mono); font-size: 10px; }

.trend-legend { display: flex; align-items: center; gap: 16px; color: var(--faint); font-size: 10px; }
.trend-legend span { display: inline-flex; align-items: center; gap: 6px; }
.trend-legend i { width: 6px; height: 6px; display: block; border-radius: 1px; }
.trend-chart {
  position: relative; display: flex; align-items: stretch; gap: 12px; height: 206px; padding-top: 17px;
  background-image: repeating-linear-gradient(to bottom, rgba(244,241,234,.055) 0, rgba(244,241,234,.055) 1px, transparent 1px, transparent 52px);
  background-position: 0 16px;
}
.trend-group { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; }
.trend-bars { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 4px; min-height: 0; }
.trend-bar { width: 20%; max-width: 13px; min-height: 2px; border-radius: 1px 1px 0 0; transition: opacity .2s; }
.trend-bar:hover { opacity: .72; }
.trend-bar--contract { background: var(--cream, #f7efdb); }
.trend-bar--received { background: var(--sky); }
.trend-bar--spend { background: var(--orange); }
.trend-month { text-align: center; color: var(--faint); font-family: var(--mono); font-size: 8.5px; letter-spacing: .04em; }
.trend-group.is-current .trend-month { color: var(--paper); }

.todo-list { display: grid; }
.todo-row {
  display: flex; align-items: center; gap: 12px; padding: 13px 0;
  border-top: 1px solid var(--line); cursor: pointer; text-align: left; width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0;
}
.todo-row:hover .todo-row__desc { color: var(--paper); }
.todo-row__main { flex: 1; min-width: 0; }
.todo-row__desc { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s; }
.todo-row__meta { margin-top: 4px; color: var(--faint); font-size: 9.5px; }
.todo-row__amount { color: var(--paper); font-family: var(--mono); font-size: 11.5px; white-space: nowrap; }
.pending-empty { padding: 28px 0; text-align: center; color: var(--faint); font-size: 11px; }
.pending-empty .icon { margin: 0 auto 8px; opacity: .4; }

/* ---------- Toolbar / filters ---------- */

.toolbar {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  margin-bottom: 12px; padding: 12px 13px;
  background: rgba(17,17,21,.7); border: 1px solid var(--line); border-radius: 2px;
}
.toolbar__spacer { flex: 1; }
.toolbar__meta { color: var(--faint); font-size: 10.5px; white-space: nowrap; }
.search-box { position: relative; width: min(260px, 100%); }
.search-box .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--faint); pointer-events: none; }
.search-box .input { height: 38px; padding-left: 35px; background: rgba(244,241,234,.035); }
.filter-select { width: auto; min-width: 128px; height: 38px; padding-right: 32px; background-color: rgba(244,241,234,.035); }
.toolbar .filter-select { width: auto; flex: 0 0 auto; min-width: 128px; }
.toolbar .search-box { flex: 0 1 280px; }
.filter-toggle { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 13px; border: 1px solid var(--line); border-radius: 2px; color: var(--muted); background: rgba(244,241,234,.025); font-size: 11.5px; }
.filter-toggle:hover { color: var(--paper); border-color: var(--line-strong); }
.filter-toggle.is-active { color: var(--red); border-color: rgba(255,98,81,.35); background: var(--red-soft); }
.filter-toggle .icon { width: 14px; height: 14px; }
.filter-toggle__count { font-family: var(--mono); font-size: 9px; opacity: .7; }

.filter-tabs { display: flex; align-items: center; gap: 3px; }
.filter-tab {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
  border: 1px solid transparent; border-radius: 999px;
  background: transparent; color: var(--muted); font-size: 11.5px;
}
.filter-tab:hover { color: var(--paper); }
.filter-tab.is-active { color: var(--paper); background: rgba(244,241,234,.08); border-color: var(--line); }
.filter-tab__count { color: var(--faint); font-family: var(--mono); font-size: 9px; }
.filter-tab.is-active .filter-tab__count { color: var(--orange); }

/* ---------- Tables ---------- */

.project-date-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 12px; padding: 9px 13px;
  background: rgba(17,17,21,.72); border: 1px solid var(--line); border-radius: 2px;
}
.date-bar__presets { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.date-bar__label { margin-right: 4px; color: var(--faint); font-family: var(--mono); font-size: 9px; letter-spacing: .08em; white-space: nowrap; }
.date-preset {
  height: 28px; padding: 0 10px; border: 1px solid transparent; border-radius: 999px;
  background: transparent; color: var(--muted); font-size: 10px; transition: all .2s;
}
.date-preset:hover { color: var(--paper); background: rgba(244,241,234,.05); }
.date-preset.is-active { color: var(--paper); border-color: var(--line); background: rgba(244,241,234,.08); }
.date-bar__custom { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.project-date-bar .date-input { width: 127px; height: 32px; padding: 0 7px; font-size: 10px; background: rgba(244,241,234,.03); }
.date-bar__sep { color: var(--faint); font-size: 9px; }
.date-bar__summary {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-left: auto; color: var(--faint); font-size: 9.5px; white-space: nowrap;
}
.date-bar__summary span { display: inline-flex; align-items: center; gap: 5px; }
.date-bar__summary strong { color: var(--paper); font-weight: 500; }
.date-bar__summary span:first-child { color: var(--muted); font-family: var(--mono); font-size: 9px; }
@media (max-width: 1320px) {
  .date-bar__summary { width: 100%; margin-left: 0; padding-top: 2px; }
}
@media (max-width: 900px) {
  .project-date-bar { align-items: flex-start; flex-direction: column; }
  .date-bar__custom { width: 100%; }
  .project-date-bar .date-input { flex: 1; width: auto; min-width: 120px; }
}

.table-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 2px; overflow: hidden; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; }
.data-table th {
  padding: 11px 14px; text-align: left;
  font-size: 9.5px; font-weight: 500; letter-spacing: .06em; color: var(--faint); text-transform: none;
  background: #0c0c0f; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.data-table td { padding: 14px; border-bottom: 1px solid rgba(244,241,234,.065); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background .18s; }
.data-table tbody tr[data-action="open-project"] { cursor: pointer; }
.data-table tbody tr[data-action="open-project"]:hover { background: rgba(244,241,234,.032); }
.data-table .cell-right { text-align: right; }
.data-table .cell-nowrap { white-space: nowrap; }
.data-table .cell-muted { color: var(--muted); }
.project-table { min-width: 1060px; }
.project-table .col-project { min-width: 225px; }
.project-table th, .project-table td { padding-left: 10px; padding-right: 10px; }
.project-table th:last-child, .project-table td:last-child {
  position: sticky; right: 0; z-index: 2;
  background: #101013;
  box-shadow: -10px 0 14px rgba(5,5,6,.28);
}
.project-table th:last-child { background: #0c0c0f; }
.project-table tbody tr:hover td:last-child { background: #141418; }
.project-table .row-actions { justify-content: flex-end; gap: 1px; }
.project-table .row-actions .icon-btn { color: var(--faint); }
.project-table tr:hover .row-actions .icon-btn { color: var(--muted); }
.project-table .row-actions .icon-btn:hover { color: var(--paper); }
.project-table .row-actions .icon-btn--danger:hover { color: var(--red); }
.project-cell { display: flex; align-items: center; gap: 11px; min-width: 0; }
.project-cell__mark {
  width: 3px; height: 34px; flex: none; border-radius: 2px;
  background: rgba(244,241,234,.12);
}
.project-cell__mark--warning { background: var(--red); }
.project-cell__main { min-width: 0; }
.project-cell__name { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--paper); white-space: nowrap; }
.project-cell__meta { display: flex; align-items: center; gap: 7px; margin-top: 4px; color: var(--faint); font-family: var(--mono); font-size: 9px; letter-spacing: .01em; }
.project-cell__meta i { width: 2px; height: 2px; background: var(--ghost); border-radius: 50%; }
.project-cell__warn { color: var(--red); display: inline-flex; }
.project-cell__warn .icon { width: 13px; height: 13px; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--paper); }
.money--muted { color: var(--muted); }
.money--lg { font-size: 13px; }
.money--zero { color: var(--faint); }
.ratio-cell { min-width: 94px; }
.ratio-cell__top { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.ratio-cell__value { font-family: var(--mono); font-size: 11.5px; color: var(--paper); }
.ratio-cell__value.is-warning { color: var(--red); font-weight: 600; }
.ratio-cell__hint { color: var(--faint); font-size: 8px; }
.ratio-cell .ratio-bar { margin-top: 6px; }
.row-actions { display: flex; justify-content: flex-end; gap: 2px; }
.table-empty { padding: 64px 24px; text-align: center; color: var(--faint); }
.table-empty .icon { width: 30px; height: 30px; margin: 0 auto 12px; opacity: .35; }
.table-empty h3 { margin: 0 0 5px; color: var(--muted); font-size: 13px; font-weight: 500; }
.table-empty p { margin: 0; font-size: 11px; }
.table-foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; color: var(--faint); font-size: 10px; border-top: 1px solid var(--line); background: rgba(244,241,234,.014); }
.table-foot strong { color: var(--muted); font-weight: 500; }

/* ---------- Drawer ---------- */

.layer { position: fixed; inset: 0; z-index: 100; }
.layer__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.66); backdrop-filter: blur(3px); animation: fadeIn .3s var(--ease) both; }
.drawer {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(900px, 70vw); min-width: min(900px, 100vw);
  display: flex; flex-direction: column;
  background:
    radial-gradient(100% 32% at 100% 0%, rgba(255,122,51,.055), transparent 65%),
    #0a0a0c;
  border-left: 1px solid var(--line-strong);
  box-shadow: -30px 0 80px rgba(0,0,0,.48);
  animation: drawerIn .45s var(--ease) both;
}
.drawer__head { flex: none; padding: 22px 28px 20px; border-bottom: 1px solid var(--line); }
.drawer__topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.drawer__title-wrap { min-width: 0; }
.drawer__code { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; color: var(--faint); font-family: var(--mono); font-size: 9px; letter-spacing: .08em; }
.drawer__title { margin: 0; font-size: 23px; font-weight: 600; letter-spacing: -.035em; line-height: 1.25; }
.drawer__meta { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; margin-top: 11px; color: var(--faint); font-size: 10.5px; }
.drawer__meta .owner { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.drawer__actions { display: flex; align-items: center; gap: 5px; flex: none; }
.drawer__body { flex: 1; overflow-y: auto; padding: 0 28px 40px; }
.drawer__metrics {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin: 20px 0 0; border: 1px solid var(--line); border-radius: 2px;
  background: rgba(244,241,234,.02);
}
.drawer-metric { padding: 14px 16px; border-right: 1px solid var(--line); }
.drawer-metric:last-child { border-right: 0; }
.drawer-metric__label { color: var(--faint); font-size: 9.5px; }
.drawer-metric__value { margin-top: 5px; font-size: 19px; font-weight: 550; letter-spacing: -.03em; white-space: nowrap; }
.drawer-metric__value .currency { color: var(--faint); font-size: .6em; margin-right: 2px; }
.drawer-metric__value .unit { color: var(--faint); font-size: .5em; margin-left: 3px; }
.drawer-metric__hint { margin-top: 4px; color: var(--faint); font-size: 9px; white-space: nowrap; }
.drawer-metric--danger .drawer-metric__value { color: var(--red); }
.drawer-warning {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 12px; padding: 10px 13px;
  border: 1px solid rgba(255,98,81,.18); background: var(--red-soft);
  color: #ffb8ae; font-size: 11px; line-height: 1.6;
}
.drawer-warning .icon { color: var(--red); flex: none; margin-top: 1px; }
.drawer-tabs { display: flex; align-items: center; gap: 27px; margin-top: 20px; border-bottom: 1px solid var(--line); }
.drawer-tab {
  position: relative; display: inline-flex; align-items: center; gap: 7px;
  height: 44px; padding: 0 1px; border: 0; background: transparent; color: var(--muted); font-size: 12px;
}
.drawer-tab:hover { color: var(--paper); }
.drawer-tab.is-active { color: var(--paper); }
.drawer-tab.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--orange); }
.drawer-tab__count { padding: 1px 5px; min-width: 17px; border-radius: 999px; background: rgba(244,241,234,.07); color: var(--faint); font-family: var(--mono); font-size: 8.5px; text-align: center; }
.drawer-tab.is-active .drawer-tab__count { color: var(--orange); }
.drawer-section { padding-top: 18px; }
.drawer-section__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.drawer-section__title { margin: 0; font-size: 12.5px; font-weight: 550; }
.drawer-section__hint { color: var(--faint); font-size: 10px; margin-top: 3px; }
.drawer-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 11.5px; }
.drawer-table th { padding: 9px 10px; color: var(--faint); font-size: 9px; font-weight: 500; letter-spacing: .04em; text-align: left; background: rgba(244,241,234,.022); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); white-space: nowrap; }
.drawer-table td { padding: 11px 10px; border-bottom: 1px solid rgba(244,241,234,.06); vertical-align: middle; }
.drawer-table tr:last-child td { border-bottom: 1px solid var(--line); }
.drawer-table .right { text-align: right; }
.drawer-total { display: flex; justify-content: flex-end; gap: 28px; padding: 12px 10px; color: var(--faint); font-size: 10px; }
.drawer-total strong { color: var(--paper); font-size: 12px; font-weight: 550; }
.inline-select {
  height: 25px; min-width: 66px; padding: 0 20px 0 7px;
  border: 1px solid var(--line); border-radius: 2px; background-color: transparent;
  color: var(--muted); font-size: 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 6px center;
  appearance: none;
}
.inline-select:hover { border-color: var(--line-strong); color: var(--paper); }
.inline-select option { background: var(--panel-2); color: var(--paper); }
.inline-date { width: 114px; height: 26px; padding: 0 4px; border: 1px solid transparent; background: transparent; color: var(--muted); font-size: 10px; }
.inline-date:hover { border-color: var(--line); }
.drawer-footer-note { display: flex; align-items: center; gap: 8px; margin-top: 18px; color: var(--faint); font-size: 9.5px; line-height: 1.6; }
.drawer-footer-note .icon { width: 12px; height: 12px; }
.cost-row__supplier { display: flex; align-items: center; gap: 8px; }
.supplier-mark { width: 24px; height: 24px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 2px; color: var(--faint); font-size: 9px; }
.reimb-mini { display: flex; align-items: center; gap: 11px; padding: 12px 6px; border-bottom: 1px solid var(--line); }
.reimb-mini:last-child { border-bottom: 0; }
.reimb-mini__main { flex: 1; min-width: 0; }
.reimb-mini__desc { color: var(--paper); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reimb-mini__meta { margin-top: 4px; color: var(--faint); font-size: 9.5px; display: flex; align-items: center; gap: 7px; }
.reimb-mini__amount { text-align: right; white-space: nowrap; }
.reimb-mini__amount strong { display: block; font-size: 12px; font-weight: 500; }
.reimb-mini__amount span { color: var(--faint); font-size: 9px; }

/* ---------- Reimbursement page ---------- */

.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.stat-card { padding: 17px 19px; display: flex; align-items: center; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 2px; }
.stat-card__icon { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); }
.stat-card__icon .icon { width: 16px; height: 16px; }
.stat-card__label { color: var(--faint); font-size: 10px; }
.stat-card__value { margin-top: 3px; font-size: 19px; font-weight: 550; letter-spacing: -.03em; }
.stat-card__value .currency { color: var(--faint); font-size: .6em; margin-right: 2px; }
.stat-card__note { margin-left: auto; color: var(--faint); font-size: 9.5px; }

.reimburse-table { min-width: 960px; }
.reimburse-table .col-desc { min-width: 280px; }
.reimb-desc { min-width: 0; }
.reimb-desc__main { color: var(--paper); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 380px; }
.reimb-desc__sub { display: flex; align-items: center; gap: 7px; margin-top: 5px; color: var(--faint); font-size: 9.5px; }
.reimb-desc__sub .icon { width: 11px; height: 11px; }
.project-ref { color: var(--sky); font-size: 10.5px; }
.daily-ref { color: var(--muted); font-size: 10.5px; }
.attachment-link { display: inline-flex; align-items: center; gap: 5px; color: var(--sky); font-size: 10px; }
.attachment-link:hover { color: var(--paper); }
.attachment-link .icon { width: 13px; height: 13px; }
.reject-reason { margin-top: 4px; color: rgba(255,98,81,.72); font-size: 9.5px; max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Approvals ---------- */

.approval-layout { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 12px; align-items: start; }
.approval-queue { overflow: hidden; }
.approval-queue__tools { padding: 13px 14px; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.approval-queue__tools .search-box { width: 100%; }
.approval-tabs { display: flex; gap: 3px; flex-wrap: wrap; }
.approval-tabs .filter-tab { height: 28px; padding: 0 9px; font-size: 10px; }
.approval-list { max-height: calc(100vh - 310px); min-height: 280px; overflow-y: auto; }
.approval-item {
  display: block; width: 100%; text-align: left; padding: 15px 16px;
  border: 0; border-bottom: 1px solid var(--line); background: transparent;
  transition: background .18s; position: relative;
}
.approval-item:hover { background: rgba(244,241,234,.03); }
.approval-item.is-active { background: rgba(255,122,51,.065); }
.approval-item.is-active::before { content: ""; position: absolute; left: 0; top: 13px; bottom: 13px; width: 2px; background: var(--orange); }
.approval-item__top { display: flex; align-items: center; gap: 9px; }
.approval-item__person { flex: 1; min-width: 0; font-size: 11.5px; color: var(--paper); }
.approval-item__amount { color: var(--paper); font-family: var(--mono); font-size: 12px; }
.approval-item__desc { margin: 9px 0 7px 39px; color: var(--muted); font-size: 11px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.approval-item__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-left: 39px; color: var(--faint); font-size: 9px; }
.approval-detail { min-height: 560px; }
.approval-detail__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 24px 25px 19px; border-bottom: 1px solid var(--line); }
.approval-detail__person { display: flex; align-items: center; gap: 12px; }
.approval-detail__name { font-size: 14px; font-weight: 550; }
.approval-detail__role { margin-top: 3px; color: var(--faint); font-size: 10px; }
.approval-detail__amount { text-align: right; }
.approval-detail__amount strong { display: block; font-size: 30px; font-weight: 600; letter-spacing: -.04em; line-height: 1; }
.approval-detail__amount span { display: block; margin-top: 7px; color: var(--faint); font-size: 9.5px; }
.approval-detail__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(290px, .9fr); gap: 24px; padding: 21px 25px 24px; }
.detail-facts { display: grid; gap: 13px; align-content: start; }
.detail-fact { display: grid; grid-template-columns: 75px 1fr; gap: 13px; font-size: 11px; line-height: 1.6; }
.detail-fact dt { color: var(--faint); }
.detail-fact dd { margin: 0; color: var(--muted); }
.detail-fact dd strong { color: var(--paper); font-weight: 500; }
.detail-desc { margin: 5px 0 0; padding: 13px 14px; border: 1px solid var(--line); background: rgba(244,241,234,.018); color: var(--muted); font-size: 11.5px; line-height: 1.8; }
.detail-receipt { min-width: 0; }
.detail-receipt__label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; color: var(--faint); font-size: 9.5px; }
.receipt-frame { position: relative; border: 1px solid var(--line); background: #17171a; overflow: hidden; min-height: 260px; display: flex; align-items: center; justify-content: center; }
.receipt-frame img { width: 100%; max-height: 430px; object-fit: contain; object-position: top; background: #e9e2d4; cursor: zoom-in; }
.receipt-frame--empty { color: var(--faint); font-size: 10.5px; flex-direction: column; gap: 8px; min-height: 230px; }
.receipt-frame--empty .icon { width: 25px; height: 25px; opacity: .4; }
.approval-detail__foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 25px; border-top: 1px solid var(--line); }
.approval-detail__hint { color: var(--faint); font-size: 9.5px; display: flex; align-items: center; gap: 6px; }
.approval-detail__buttons { display: flex; gap: 8px; }
.reviewed-stamp { display: inline-flex; align-items: center; gap: 7px; color: var(--green); font-size: 11px; }
.reviewed-stamp--rejected { color: var(--red); }

/* ---------- Empty states ---------- */

.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 64px 24px; text-align: center; }
.empty-state__icon { width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 50%; color: var(--faint); margin-bottom: 15px; }
.empty-state__icon .icon { width: 20px; height: 20px; }
.empty-state h3 { margin: 0 0 6px; font-size: 14px; font-weight: 550; }
.empty-state p { margin: 0 0 18px; color: var(--faint); font-size: 11.5px; line-height: 1.7; }

/* ---------- Mobile reimbursement QR ---------- */

.qr-modal__body { text-align: center; }
.qr-code { display: inline-flex; padding: 12px; background: #fff; border-radius: 3px; }
.qr-code img { display: block; width: 260px; height: 260px; }
.qr-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0; text-align: left; }
.qr-steps > div { display: flex; gap: 7px; padding: 9px 8px; border-top: 1px solid var(--line); }
.qr-steps span { color: var(--orange); font-family: var(--font-mono); font-size: 8px; }
.qr-steps p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.qr-link { display: flex; gap: 7px; align-items: center; }
.qr-link .input { flex: 1; min-width: 0; font-size: 9px; color: var(--faint); }
.qr-link .btn { flex: none; }
.qr-local-warning {
  display: flex; align-items: flex-start; gap: 7px; margin-top: 12px; padding: 9px 10px;
  border: 1px solid rgba(231,179,106,.2); background: rgba(231,179,106,.06);
  color: var(--muted); text-align: left; font-size: 9.5px; line-height: 1.6;
}
.qr-local-warning .icon { flex: none; color: var(--orange); margin-top: 1px; }
.qr-note { margin: 12px 0 0; color: var(--faint); font-size: 9px; line-height: 1.6; }
@media (max-width: 640px) {
  .qr-code img { width: 220px; height: 220px; }
  .qr-steps { grid-template-columns: 1fr; gap: 0; }
  .qr-steps > div { border-top: 1px solid var(--line); }
  .qr-link { flex-direction: column; align-items: stretch; }
}

/* ---------- Monthly payroll ---------- */

.payroll-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 12px; padding: 11px 14px; border: 1px solid var(--line); background: var(--panel);
}
.payroll-month-label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.payroll-month-input { width: 148px; height: 31px; padding: 0 9px; color-scheme: dark; font-size: 10.5px; }
.payroll-toolbar__note { display: inline-flex; align-items: center; gap: 5px; color: var(--faint); font-size: 9px; }
.payroll-toolbar__note .icon { width: 12px; height: 12px; }
.payroll-stats { margin-bottom: 12px; }
.payroll-table-panel { margin-bottom: 12px; }
.payroll-table { min-width: 860px; }
.payroll-name { display: block; color: var(--paper); font-size: 11.5px; }
.payroll-table td small { display: block; margin-top: 3px; color: var(--faint); font-size: 9px; white-space: nowrap; }
.payroll-amount { display: block; color: var(--paper); font-family: var(--font-mono); font-size: 11px; white-space: nowrap; }
.payroll-amount--paid { color: #abc5b2; }
.payroll-amount--due { color: var(--orange); }
.payroll-amount--clear { color: var(--green); }
.payroll-amount--muted { color: var(--faint); }
.payroll-detail-body { padding: 0 20px 20px; }
.payroll-detail-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.payroll-detail-list { border-top: 1px solid var(--line); }
.payroll-detail-row {
  display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.payroll-detail-row input { width: 14px; height: 14px; flex: none; accent-color: var(--orange); }
.payroll-detail-row.is-paid { opacity: .55; }
.payroll-detail-main { flex: 1; min-width: 0; }
.payroll-detail-main strong { display: block; font-size: 10.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.payroll-detail-main small { display: block; margin-top: 4px; color: var(--faint); font-size: 9px; }
.payroll-detail-side { flex: none; text-align: right; }
.payroll-detail-side strong { display: block; color: var(--paper); font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; }
.payroll-detail-side small { display: block; margin-top: 4px; color: var(--faint); font-size: 9px; }
.payroll-detail-note { display: flex; align-items: center; gap: 6px; margin: 14px 0 0; color: var(--faint); font-size: 9.5px; }
.payroll-detail-note .icon { flex: none; }
.payroll-detail-modal .modal__foot { justify-content: flex-end; }
@media (max-width: 700px) {
  .payroll-toolbar { align-items: flex-start; }
  .payroll-toolbar__note { flex-basis: 100%; }
  .payroll-detail-row { align-items: flex-start; }
  .payroll-detail-side { min-width: 90px; }
}

/* ---------- Compensation time & suppliers ---------- */

.comp-table { min-width: 760px; }
.comp-table .unit { font-size: 12px; color: var(--faint); margin-left: 4px; }
.comp-table small { margin-left: 3px; }
.supplier-table { min-width: 900px; }
.supplier-name { display: block; color: var(--paper); font-size: 11px; font-weight: 500; }
.supplier-table td small { display: block; margin-top: 3px; color: var(--faint); font-size: 9px; }
.supplier-page .row-actions { gap: 5px; }
.supplier-upload {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap; min-height: 36px; padding: 8px 10px;
  border: 1px dashed var(--line-strong); background: rgba(244,241,234,.025);
}
.supplier-upload input { max-width: 100%; color: var(--faint); font-size: 10px; }
.supplier-upload span { color: var(--faint); font-size: 9px; }
.supplier-pending-panel { margin-bottom: 12px; }
@media (max-width: 700px) {
  .comp-table, .supplier-table { min-width: 720px; }
  .supplier-upload { align-items: flex-start; flex-direction: column; }
}

/* ---------- System settings ---------- */

.settings-page { padding-bottom: 72px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.settings-section--wide { grid-column: 1 / -1; }
.settings-body { padding: 18px 20px 20px; }
.settings-readonly {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 11px 14px;
  border: 1px solid rgba(231,179,106,.18); background: rgba(231,179,106,.055); color: var(--muted); font-size: 10.5px;
}
.settings-readonly .icon { color: var(--orange); }
.settings-number { display: flex; align-items: center; gap: 8px; }
.settings-number .input { width: 100px; }
.settings-number span { color: var(--faint); font-size: 10px; white-space: nowrap; }
.settings-checks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 7px; }
.check-item {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: 2px; color: var(--muted); font-size: 10.5px; cursor: pointer;
}
.check-item:hover { border-color: var(--line-strong); color: var(--paper); }
.check-item input { width: 13px; height: 13px; accent-color: var(--orange); }
.settings-list-block { padding: 0 0 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.settings-list-block:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.settings-list-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.settings-list-head strong { display: block; font-size: 11.5px; font-weight: 550; }
.settings-list-head span { display: block; margin-top: 4px; color: var(--faint); font-size: 9.5px; line-height: 1.6; }
.settings-list-head > .faint { flex: none; margin: 1px 0 0; color: var(--faint); font-size: 9px; }
.settings-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.settings-tag {
  display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 4px 8px;
  border: 1px solid var(--line-strong); background: rgba(244,241,234,.045); color: var(--paper); font-size: 10px;
}
.settings-tag.is-locked { border-color: rgba(171,197,178,.25); color: #abc5b2; }
.settings-tag button { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; padding: 0; border: 0; background: transparent; color: var(--faint); cursor: pointer; }
.settings-tag button:hover { color: var(--red); }
.settings-tag .icon { width: 10px; height: 10px; }
.settings-add { display: flex; gap: 7px; margin-top: 10px; }
.settings-add .input { flex: 1; min-width: 0; height: 31px; font-size: 10.5px; }
.settings-add .btn { flex: none; }
.settings-audit { margin-bottom: 12px; }
.settings-audit-list { display: flex; flex-direction: column; }
.settings-audit-row {
  display: flex; align-items: center; gap: 14px; padding: 10px 20px;
  border-bottom: 1px solid var(--line); font-size: 10px;
}
.settings-audit-row:last-child { border-bottom: 0; }
.settings-audit-time { width: 132px; flex: none; color: var(--faint); font-family: var(--font-mono); font-size: 9px; }
.settings-audit-actor { width: 64px; flex: none; color: var(--muted); }
.settings-audit-change { display: flex; flex-wrap: wrap; gap: 4px; }
.settings-savebar {
  position: fixed; z-index: 40; right: 26px; bottom: 16px; left: calc(var(--sidebar-w) + 26px);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 14px; border: 1px solid var(--line-strong);
  background: rgba(13,15,18,.94); box-shadow: 0 10px 34px rgba(0,0,0,.35); backdrop-filter: blur(14px);
}
.settings-savebar .faint { font-size: 9.5px; }
.settings-page .field__hint { margin-top: 6px; line-height: 1.6; }
@media (max-width: 1100px) {
  .settings-grid { grid-template-columns: 1fr; }
  .settings-section--wide { grid-column: auto; }
  .settings-savebar { left: calc(var(--sidebar-w) + 16px); right: 16px; }
}
@media (max-width: 700px) {
  .settings-savebar { left: 12px; right: 12px; bottom: 10px; }
  .settings-audit-row { align-items: flex-start; flex-wrap: wrap; gap: 6px 12px; }
  .settings-audit-time, .settings-audit-actor { width: auto; }
}

.select--inline {
  height: 27px; padding: 0 25px 0 7px; border-color: var(--line); background-color: rgba(244,241,234,.025);
  color: var(--paper); font-size: 9.5px; letter-spacing: .02em;
}
.select--inline:hover { border-color: var(--line-strong); background-color: rgba(244,241,234,.055); }
.select--inline:focus { border-color: rgba(255,122,51,.55); }
.select--inline:disabled { opacity: .45; cursor: wait; }
.project-progress-select { min-width: 112px; }

/* ---------- Account management ---------- */

.user-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.user-stat {
  display: flex; align-items: baseline; gap: 9px; padding: 14px 17px;
  border: 1px solid var(--line); background: var(--panel); border-radius: 2px;
}
.user-stat span { color: var(--faint); font-size: 10px; }
.user-stat strong { font-size: 23px; font-weight: 600; letter-spacing: -.04em; line-height: 1; }
.user-stat small { color: var(--faint); font-size: 9px; }
.admin-account-panel { margin-bottom: 12px; }
.admin-account-list { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 20px 18px; }
.admin-account {
  flex: 1 1 210px; display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line); background: rgba(244,241,234,.018);
}
.admin-account > div { flex: 1; min-width: 0; }
.admin-account strong { display: block; font-size: 12px; font-weight: 550; }
.admin-account div span { display: block; margin-top: 2px; color: var(--faint); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-table { min-width: 900px; }
.user-table tr.is-inactive { opacity: .52; }
.user-table__name { display: block; color: var(--paper); font-size: 12px; }
.user-table .avatar-pair { align-items: center; }
.user-table .avatar-pair .avatar { width: 28px; height: 28px; }
.user-form-note {
  display: flex; align-items: center; gap: 7px; margin-top: 15px; padding-top: 13px;
  border-top: 1px solid var(--line); color: var(--faint); font-size: 9.5px;
}
.user-form-note .icon { width: 13px; height: 13px; color: var(--orange); }
@media (max-width: 1100px) {
  .user-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .user-stats { grid-template-columns: 1fr 1fr; }
  .admin-account { flex-basis: 100%; }
}

/* ---------- Forms & modal ---------- */

.modal-layer { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.72); backdrop-filter: blur(5px); animation: fadeIn .25s var(--ease) both; }
.modal {
  position: relative; width: min(var(--modal-w, 590px), 100%);
  max-height: calc(100vh - 48px);
  display: flex; flex-direction: column;
  background: #0e0e11;
  border: 1px solid var(--line-strong); border-radius: 2px;
  box-shadow: var(--shadow-lg);
  animation: modalIn .4s var(--ease) both;
}
.modal--wide { --modal-w: 760px; }
.modal--sm { --modal-w: 460px; }
.modal__head { flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 21px 23px 17px; border-bottom: 1px solid var(--line); }
.modal__eyebrow { margin: 0 0 6px; color: var(--faint); font-family: var(--mono); font-size: 8.5px; letter-spacing: .17em; }
.modal__title { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -.025em; line-height: 1.3; }
.modal__sub { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.modal__body { flex: 1; overflow-y: auto; padding: 21px 23px; }
.modal__foot { flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 15px 23px; border-top: 1px solid var(--line); background: rgba(244,241,234,.012); }
.modal__foot--between { justify-content: space-between; }
.modal__foot-note { color: var(--faint); font-size: 9.5px; }
.modal-close { margin: -4px -4px 0 0; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-grid--single { grid-template-columns: 1fr; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label, .field__label { color: var(--muted); font-size: 10.5px; display: flex; align-items: center; justify-content: flex-start; gap: 4px; }
.field label .faint, .field label .field__hint { margin-left: auto; }
.field__required { color: var(--orange); }
.field__hint { color: var(--faint); font-size: 9.5px; line-height: 1.5; }
.input, .textarea, .select {
  width: 100%; height: 42px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 2px;
  background: rgba(244,241,234,.035); color: var(--paper);
  font-size: 12.5px; outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.input::placeholder, .textarea::placeholder { color: rgba(244,241,234,.26); }
.input:hover, .textarea:hover, .select:hover { border-color: var(--line-strong); }
.input:focus, .textarea:focus, .select:focus { border-color: rgba(255,122,51,.65); background: rgba(244,241,234,.05); box-shadow: 0 0 0 3px rgba(255,122,51,.08); }
.textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.7; }
.select {
  appearance: none; padding-right: 33px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='1.8'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.select option { background: #17171b; color: var(--paper); }
input[type="date"] { color-scheme: dark; }
#attachment-input { display: none; }
.input--amount { font-size: 17px; font-weight: 550; letter-spacing: -.02em; }
.input-prefix { position: relative; }
.input-prefix > span { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: 14px; }
.input-prefix .input { padding-left: 27px; }
.field-error { color: var(--red); font-size: 10px; margin-top: -1px; }

.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.segment {
  display: flex; align-items: center; gap: 9px; min-height: 48px; padding: 7px 12px;
  border: 1px solid var(--line); border-radius: 2px; background: rgba(244,241,234,.02);
  text-align: left; transition: all .2s;
}
.segment:hover { border-color: var(--line-strong); }
.segment.is-active { border-color: rgba(255,122,51,.5); background: var(--orange-soft); }
.segment__icon { color: var(--faint); }
.segment.is-active .segment__icon { color: var(--orange); }
.segment__label { display: block; font-size: 11.5px; color: var(--paper); line-height: 1.2; }
.segment__sub { display: block; margin-top: 4px; color: var(--faint); font-size: 9px; }
.segment__radio { margin-left: auto; width: 14px; height: 14px; border: 1px solid var(--ghost); border-radius: 50%; position: relative; flex: none; }
.segment.is-active .segment__radio { border-color: var(--orange); }
.segment.is-active .segment__radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--orange); }

.multi-select { position: relative; }
.multi-select summary { list-style: none; }
.multi-select summary::-webkit-details-marker { display: none; }
.multi-select__control {
  display: flex; align-items: center; gap: 9px;
  width: 100%; height: 44px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 2px;
  background: rgba(244,241,234,.035); cursor: pointer;
  transition: border-color .2s, background .2s;
}
.multi-select__control:hover { border-color: var(--line-strong); }
.multi-select[open] .multi-select__control { border-color: rgba(255,122,51,.65); background: rgba(244,241,234,.05); box-shadow: 0 0 0 3px rgba(255,122,51,.08); }
.multi-select__icon { color: var(--orange); display: flex; }
.multi-select__icon .icon { width: 15px; height: 15px; }
.multi-select__value { flex: 1; min-width: 0; color: var(--paper); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.multi-select__meta { color: var(--faint); font-size: 9px; letter-spacing: .04em; }
.multi-select__chevron { color: var(--faint); display: flex; transition: transform .25s var(--ease); }
.multi-select[open] .multi-select__chevron { transform: rotate(180deg); }
.multi-select__chevron .icon { width: 14px; height: 14px; }
.multi-select__menu {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px);
  padding: 6px; border: 1px solid var(--line-strong); border-radius: 2px;
  background: #17171b; box-shadow: var(--shadow-md);
  animation: fadeIn .18s var(--ease) both;
}
.multi-select__hint { padding: 5px 9px 7px; color: var(--faint); font-size: 9px; font-family: var(--mono); letter-spacing: .08em; }
.multi-select__option {
  position: relative; display: flex; align-items: center; gap: 9px;
  padding: 9px 9px; border-radius: 2px; cursor: pointer; transition: background .18s;
}
.multi-select__option:hover { background: rgba(244,241,234,.05); }
.multi-select__option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.multi-select__check {
  width: 15px; height: 15px; flex: none; border: 1px solid var(--line-strong); border-radius: 2px;
  position: relative; background: rgba(244,241,234,.02); transition: all .18s;
}
.multi-select__option input:checked + .multi-select__check { background: var(--orange); border-color: var(--orange); }
.multi-select__option input:checked + .multi-select__check::after {
  content: ""; position: absolute; left: 4px; top: 1px; width: 5px; height: 8px;
  border: solid #160b05; border-width: 0 1.5px 1.5px 0; transform: rotate(42deg);
}
.multi-select__option input:focus-visible + .multi-select__check { outline: 2px solid var(--orange); outline-offset: 2px; }
.multi-select__option-name { color: var(--paper); font-size: 11.5px; }
.multi-select__option-desc { margin-left: auto; color: var(--faint); font-size: 9.5px; }
.collection-drafts-head { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 9px; color: var(--muted); font-size: 10.5px; }
.collection-drafts { display: grid; gap: 9px; }
.collection-draft { padding: 13px 14px 14px; border: 1px solid var(--line); background: rgba(244,241,234,.018); }
.collection-draft__head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.collection-draft__head .faint { font-size: 9px; }
.collection-draft__head .icon-btn { width: 23px; height: 23px; margin-left: auto; }
.collection-type-chip { display: inline-flex; align-items: center; min-height: 20px; padding: 1px 8px; border: 1px solid rgba(255,122,51,.24); border-radius: 999px; background: var(--orange-soft); color: var(--orange); font-size: 10px; }
.collection-draft .form-grid { gap: 11px; }
.collection-draft .field label { font-size: 9.5px; }
.collection-draft .input, .collection-draft .select { height: 38px; font-size: 11.5px; }
.collection-draft .input--amount { font-size: 15px; }
.collection-drafts-empty { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 80px; border: 1px dashed var(--line); color: var(--faint); font-size: 10.5px; }
.collection-drafts-empty .icon { width: 16px; height: 16px; }
.collection-draft-total { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--faint); font-size: 10.5px; }
.collection-draft-total strong { color: var(--paper); font-size: 15px; font-weight: 550; letter-spacing: -.02em; }

.upload { border: 1px dashed rgba(244,241,234,.18); border-radius: 2px; background: rgba(244,241,234,.018); transition: border-color .2s, background .2s; }
.upload:hover { border-color: rgba(244,241,234,.34); background: rgba(244,241,234,.03); }
.upload.is-dragover { border-color: var(--orange); background: var(--orange-soft); }
.upload__empty { min-height: 108px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; cursor: pointer; color: var(--faint); font-size: 10.5px; text-align: center; padding: 16px; }
.upload__empty .icon { width: 19px; height: 19px; }
.upload__empty strong { color: var(--muted); font-size: 11.5px; font-weight: 500; }
.upload__preview { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.upload__thumb { width: 68px; height: 54px; background: #e9e2d4; border: 1px solid var(--line); object-fit: cover; flex: none; }
.upload__thumb--file { display: flex; align-items: center; justify-content: center; background: var(--panel-2); color: var(--faint); }
.upload__meta { flex: 1; min-width: 0; }
.upload__name { color: var(--paper); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload__size { color: var(--faint); font-size: 9.5px; margin-top: 2px; }
.upload input[type="file"] { display: none; }

.warning-box { display: flex; gap: 12px; padding: 14px; border: 1px solid rgba(255,98,81,.22); background: var(--red-soft); color: var(--muted); font-size: 11.5px; line-height: 1.7; }
.warning-box .icon { color: var(--red); flex: none; margin-top: 2px; }
.warning-box strong { color: #ffb5aa; font-weight: 550; }
.overspend-numbers { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 13px; border: 1px solid rgba(255,98,81,.16); background: rgba(255,98,81,.16); }
.overspend-numbers div { padding: 10px 12px; background: rgba(18,11,10,.95); }
.overspend-numbers span { display: block; color: rgba(255,181,170,.6); font-size: 9px; }
.overspend-numbers strong { display: block; margin-top: 3px; color: #ffd3cc; font-size: 16px; font-weight: 550; letter-spacing: -.02em; }
.overspend-numbers strong.is-over { color: var(--red); }
.modal--warning .modal__head { border-bottom-color: rgba(255,98,81,.18); }
.warning-title { display: flex; align-items: center; gap: 10px; }
.warning-title .icon { color: var(--red); }

.reject-box { display: grid; gap: 14px; }
.reject-box .textarea { min-height: 110px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 160; display: flex; align-items: center; justify-content: center; padding: 30px; }
.lightbox__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.88); backdrop-filter: blur(8px); }
.lightbox__img { position: relative; max-width: min(860px, 94vw); max-height: 90vh; object-fit: contain; box-shadow: var(--shadow-lg); animation: modalIn .3s var(--ease) both; }
.lightbox__close { position: fixed; right: 24px; top: 24px; z-index: 2; background: rgba(244,241,234,.08); color: var(--paper); }

/* ---------- Toasts ---------- */

.toast-root { position: fixed; right: 24px; bottom: 24px; z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast {
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: 10px;
  min-width: 280px; max-width: 380px; padding: 12px 15px;
  background: #17171b; border: 1px solid var(--line-strong); border-radius: 2px;
  box-shadow: var(--shadow-md); color: var(--paper); font-size: 11.5px; line-height: 1.55;
  animation: toastIn .35s var(--ease) both;
}
.toast.is-out { animation: toastOut .25s var(--ease) both; }
.toast__icon { flex: none; margin-top: 1px; color: var(--green); }
.toast--error .toast__icon { color: var(--red); }
.toast--warning .toast__icon { color: var(--yellow); }
.toast__body { flex: 1; min-width: 0; }
.toast__title { font-weight: 550; margin-bottom: 1px; }
.toast__message { color: var(--muted); font-size: 10.5px; }
.toast__close { color: var(--faint); margin: -2px -3px 0 0; width: 20px; height: 20px; border: 0; background: none; display: flex; align-items: center; justify-content: center; }
.toast__close:hover { color: var(--paper); }

/* ---------- Workload / timesheet ---------- */

.week-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  padding: 10px 13px; margin-bottom: 12px;
  background: rgba(17,17,21,.7); border: 1px solid var(--line); border-radius: 2px;
}
.week-nav { display: flex; align-items: center; gap: 7px; }
.week-nav__label { display: flex; flex-direction: column; min-width: 190px; padding: 0 5px; }
.week-nav__label strong { font-size: 13px; font-weight: 550; letter-spacing: -.01em; }
.week-nav__label span { margin-top: 2px; color: var(--faint); font-size: 9.5px; }
.week-toolbar__right { display: flex; align-items: center; gap: 8px; }

.worklog-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.worklog-stat {
  min-height: 128px; padding: 17px 19px;
  display: flex; flex-direction: column;
  background: linear-gradient(145deg, rgba(20,20,24,.95), rgba(11,11,14,.98));
  border: 1px solid var(--line); border-radius: 2px;
}
.worklog-stat--primary {
  background: radial-gradient(130% 120% at 100% 0%, rgba(255,122,51,.13), transparent 55%), linear-gradient(145deg, #17140f, #0f0d0c);
  border-color: rgba(255,122,51,.19);
}
.worklog-stat__label { color: var(--muted); font-size: 11px; }
.worklog-stat__value { margin-top: 10px; font-size: 32px; font-weight: 600; line-height: 1; letter-spacing: -.045em; }
.worklog-stat__value small { margin-left: 4px; color: var(--faint); font-size: 12px; font-weight: 400; letter-spacing: 0; }
.worklog-stat__bar { height: 3px; margin-top: 13px; background: rgba(244,241,234,.08); overflow: hidden; }
.worklog-stat__bar i { display: block; height: 100%; background: var(--orange); transition: width .5s var(--ease); }
.worklog-stat__foot { display: flex; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 9px; color: var(--faint); font-size: 9.5px; }
.worklog-stat__foot span:last-child { color: var(--muted); font-family: var(--mono); }

.worklog-layout { display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(300px, .58fr); gap: 12px; align-items: start; }
.worklog-days { display: grid; gap: 9px; padding: 0 20px 20px; }
.worklog-day {
  border: 1px solid var(--line); background: rgba(244,241,234,.016);
  transition: border-color .2s, background .2s;
}
.worklog-day.is-today { border-color: rgba(255,122,51,.3); background: rgba(255,122,51,.027); }
.worklog-day.is-future { opacity: .62; }
.worklog-day__head { display: flex; align-items: center; gap: 16px; padding: 11px 13px; border-bottom: 1px solid var(--line); }
.worklog-day__date { display: flex; align-items: baseline; gap: 7px; min-width: 100px; }
.worklog-day__date span { color: var(--muted); font-size: 10px; }
.worklog-day__date strong { color: var(--paper); font-size: 17px; font-weight: 550; letter-spacing: -.02em; }
.worklog-day__date em { padding: 1px 5px; border-radius: 999px; background: var(--orange-soft); color: var(--orange); font-size: 8px; font-style: normal; }
.worklog-day__hours { display: flex; align-items: center; gap: 9px; min-width: 142px; }
.worklog-day__hours > div:first-child { white-space: nowrap; }
.worklog-day__hours strong { font-family: var(--mono); font-size: 11.5px; font-weight: 500; }
.worklog-day__hours span { color: var(--faint); font-size: 9px; }
.worklog-day__hours .day-overtime { margin-left: 3px; padding: 1px 5px; border: 1px solid rgba(255,98,81,.25); border-radius: 999px; background: var(--red-soft); color: var(--red); font-size: 8px; font-style: normal; white-space: nowrap; }
.day-bar { width: 78px; height: 3px; background: rgba(244,241,234,.08); overflow: hidden; }
.day-bar i { display: block; height: 100%; background: var(--orange); }
.day-bar.is-overtime i { background: var(--red); }
.worklog-day__action { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.worklog-day__action .btn { height: 28px; }
.worklog-entries { padding: 0 13px 5px; }
.worklog-entry { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid rgba(244,241,234,.06); }
.worklog-entry:last-child { border-bottom: 0; }
.worklog-entry__icon { width: 27px; height: 27px; flex: none; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); color: var(--sky); }
.worklog-entry__icon.is-internal { color: var(--faint); }
.worklog-entry__icon .icon { width: 13px; height: 13px; }
.worklog-entry__main { flex: 1; min-width: 0; }
.worklog-entry__title { color: var(--paper); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.worklog-entry__meta { margin-top: 2px; color: var(--faint); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.worklog-entry__hours { width: 44px; text-align: right; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.worklog-entry__actions { display: flex; gap: 1px; opacity: .35; transition: opacity .2s; }
.worklog-entry:hover .worklog-entry__actions { opacity: 1; }
.worklog-empty { padding: 14px 3px 17px; color: var(--faint); font-size: 10px; }
.worklog-empty .icon { width: 14px; height: 14px; }

.worklog-side { display: grid; gap: 12px; }
.worklog-breakdown { display: grid; gap: 13px; }
.worklog-breakdown__top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; color: var(--muted); font-size: 10.5px; }
.worklog-breakdown__top span { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.worklog-breakdown__top i { width: 5px; height: 5px; border-radius: 50%; flex: none; }
.worklog-breakdown__top strong { color: var(--paper); font-family: var(--mono); font-size: 10px; font-weight: 500; }
.worklog-breakdown__bar { height: 3px; background: rgba(244,241,234,.07); overflow: hidden; }
.worklog-breakdown__bar i { display: block; height: 100%; }
.worklog-rules { padding: 18px 20px; border: 1px solid var(--line); background: rgba(244,241,234,.018); }
.worklog-rules__head { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.worklog-rules__head .icon { width: 14px; height: 14px; color: var(--orange); }
.worklog-rules ul { margin: 12px 0 0; padding: 0 0 0 15px; color: var(--faint); font-size: 10px; line-height: 1.85; }
.worklog-rules li + li { margin-top: 3px; }
.worklog-rules li::marker { color: rgba(255,122,51,.7); }
.worklog-rules li span { color: var(--orange); }
.worklog-hour-hint { display: flex; align-items: center; gap: 7px; margin-top: 15px; padding: 9px 11px; border: 1px solid var(--line); background: rgba(244,241,234,.02); color: var(--faint); font-size: 10px; }
.worklog-hour-hint .icon { width: 13px; height: 13px; color: var(--sky); flex: none; }
.worklog-hour-hint strong { color: var(--paper); font-weight: 550; }
.worklog-hour-hint.is-over { border-color: rgba(255,98,81,.25); background: var(--red-soft); color: #ffb8ae; }
.worklog-hour-hint.is-over .icon, .worklog-hour-hint.is-over strong { color: var(--red); }

.workload-employee-list { display: grid; }
.workload-employee { padding: 17px 20px; border-bottom: 1px solid var(--line); }
.workload-employee:last-child { border-bottom: 0; }
.workload-employee.is-empty { opacity: .58; }
.workload-employee__head { display: flex; align-items: center; gap: 11px; }
.workload-employee__identity { flex: 1; min-width: 0; }
.workload-employee__identity strong { display: block; font-size: 13px; font-weight: 550; }
.workload-employee__identity span { display: block; margin-top: 2px; color: var(--faint); font-size: 9.5px; }
.workload-employee__total { text-align: right; white-space: nowrap; }
.workload-employee__total strong { display: block; font-size: 21px; font-weight: 600; letter-spacing: -.035em; }
.workload-employee__total strong small { color: var(--faint); font-size: 10px; margin-left: 2px; }
.workload-employee__total span { display: block; margin-top: 2px; color: var(--faint); font-size: 9px; }
.workload-employee__body { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr); gap: 18px; margin-top: 13px; padding-left: 53px; }
.workload-week-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.workload-day-cell { min-width: 0; padding: 6px 5px; border: 1px solid var(--line); text-align: center; background: rgba(244,241,234,.015); }
.workload-day-cell span { display: block; color: var(--faint); font-size: 8px; }
.workload-day-cell strong { display: block; margin-top: 2px; color: var(--muted); font-family: var(--mono); font-size: 10px; font-weight: 500; }
.workload-day-cell small { display: block; margin-top: 1px; color: rgba(244,241,234,.23); font-size: 7.5px; }
.workload-day-cell.has-hours { border-color: rgba(255,122,51,.23); background: rgba(255,122,51,.05); }
.workload-day-cell.has-hours strong { color: var(--paper); }
.workload-day-cell.is-overtime { border-color: rgba(255,98,81,.28); background: rgba(255,98,81,.055); }
.workload-day-cell.is-overtime strong, .workload-day-cell.is-overtime small { color: var(--red); }
.workload-project-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; min-height: 28px; }
.workload-project-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border: 1px solid var(--line); border-radius: 2px; color: var(--muted); font-size: 9px; }
.workload-project-chip strong { color: var(--paper); font-family: var(--mono); font-size: 8.5px; font-weight: 500; }
.workload-project-chip.is-internal { border-color: rgba(244,241,234,.08); color: var(--faint); background: rgba(244,241,234,.02); }
.workload-project-list { display: grid; }
.workload-project-row { display: grid; grid-template-columns: minmax(220px, 1.25fr) minmax(230px, 1fr) minmax(160px, .7fr) 80px; gap: 20px; align-items: center; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.workload-project-row:last-child { border-bottom: 0; }
.workload-project-row__main { min-width: 0; }
.workload-project-row__name { font-size: 12.5px; color: var(--paper); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workload-project-row__meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; color: var(--faint); font-size: 9px; }
.workload-project-row__people { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.workload-person-chip { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 9.5px; white-space: nowrap; }
.workload-person-chip .avatar { width: 20px; height: 20px; font-size: 8px; }
.workload-project-row__bar { min-width: 0; }
.workload-project-row__track { height: 3px; background: rgba(244,241,234,.08); overflow: hidden; }
.workload-project-row__track i { display: block; height: 100%; background: var(--orange); }
.workload-project-row__bar span { display: block; margin-top: 5px; color: var(--faint); font-size: 8.5px; }
.workload-project-row__hours { text-align: right; color: var(--paper); font-size: 23px; font-weight: 600; letter-spacing: -.04em; white-space: nowrap; }
.workload-project-row__hours small { color: var(--faint); font-size: 10px; font-weight: 400; margin-left: 2px; }
.workload-internal-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding: 13px 20px; border-top: 1px solid var(--line); background: rgba(244,241,234,.014); color: var(--faint); font-size: 9.5px; }

@media (max-width: 1320px) {
  .worklog-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .worklog-layout { grid-template-columns: 1fr; }
  .worklog-side { grid-template-columns: 1fr 1fr; }
  .workload-employee__body { grid-template-columns: minmax(240px, .9fr) minmax(0, 1.1fr); }
  .workload-project-row { grid-template-columns: minmax(200px, 1.1fr) minmax(190px, 1fr) minmax(140px, .7fr) 75px; gap: 14px; }
}

@media (max-width: 1100px) {
  .workload-project-row { grid-template-columns: minmax(0, 1fr) 90px; }
  .workload-project-row__people { display: none; }
  .workload-project-row__bar { grid-column: 1 / -1; }
  .workload-project-row__hours { grid-row: 1; grid-column: 2; }
}

@media (max-width: 900px) {
  .worklog-stats { grid-template-columns: 1fr 1fr; }
  .week-toolbar { align-items: flex-start; flex-direction: column; }
  .week-toolbar__right { width: 100%; justify-content: space-between; }
  .worklog-day__head { flex-wrap: wrap; gap: 8px 12px; }
  .worklog-day__hours { min-width: 0; }
  .worklog-day__action { margin-left: 0; width: 100%; }
  .workload-employee__body { grid-template-columns: 1fr; padding-left: 0; }
  .worklog-side { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .worklog-stats { grid-template-columns: 1fr; }
  .week-nav__label { min-width: 0; flex: 1; }
  .week-nav__label strong { font-size: 12px; }
  .worklog-days { padding-left: 12px; padding-right: 12px; }
  .worklog-entry__actions { opacity: 1; }
  .workload-project-row { grid-template-columns: minmax(0, 1fr) 70px; gap: 8px 12px; }
  .worklog-stat__value { font-size: 28px; }
  .modal__foot--between { align-items: stretch; }
}

/* ---------- Animations ---------- */

@keyframes viewIn { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes drawerIn { from { transform: translateX(44px); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes modalIn { from { transform: translateY(12px) scale(.985); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastOut { to { transform: translateY(6px); opacity: 0; } }
@keyframes loginArt { from { transform: scale(1.06); } to { transform: scale(1.01); } }

/* ---------- Responsive ---------- */

@media (max-width: 1320px) {
  :root { --sidebar-w: 224px; }
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric-card { min-height: 140px; }
  .dashboard-grid, .dashboard-lower { grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); }
  .warning-row { grid-template-columns: minmax(0, 1fr) 84px 120px; gap: 12px; }
  .approval-layout { grid-template-columns: 340px minmax(0, 1fr); }
  .approval-detail__body { grid-template-columns: 1fr; }
  .detail-receipt { max-width: 380px; }
}

@media (max-width: 1100px) {
  :root { --sidebar-w: 76px; --topbar-h: 70px; }
  .sidebar__head { padding: 0 20px; justify-content: center; }
  .sidebar__logo { display: none; }
  .sidebar__mark { display: block; }
  .sidebar__body { padding: 18px 12px; }
  .nav-group__label, .nav-item span:not(.nav-item__badge), .nav-item__soon, .user-chip__meta, .sidebar__version { display: none; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-item__badge { position: absolute; top: 4px; right: 5px; min-width: 15px; height: 15px; padding: 0 4px; font-size: 8px; }
  .sidebar__foot { padding: 13px 10px; }
  .user-chip { justify-content: center; }
  .user-chip .icon-btn { display: none; }
  .dashboard-grid, .dashboard-lower { grid-template-columns: 1fr; }
  .approval-layout { grid-template-columns: 1fr; }
  .approval-list { max-height: 360px; }
  .approval-detail__body { grid-template-columns: minmax(0, 1fr) minmax(260px, .9fr); }
  .caret-collapse { display: none; }
  .topbar { padding: 0 22px; }
  .main { padding: 24px 22px 44px; }
  .login { grid-template-columns: 1fr 430px; }
  .login__title { font-size: clamp(42px, 6vw, 68px); }
}

@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login__art { opacity: .32; }
  .login__left { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .35; }
  .login__statement, .login__foot { display: none; }
  .login__right { min-height: 100vh; border-left: 0; background: rgba(5,5,6,.72); }
  .topbar__crumb, .sync-pill, .topbar__date, .topbar__user-name, .topbar__user-role { display: none; }
  .topbar__user { border-left: 0; padding-left: 0; }
  .topbar__menu { display: inline-flex; }
  .page-head { align-items: flex-start; flex-direction: column; gap: 16px; }
  .page-head__actions { padding-bottom: 0; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .stat-strip { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .drawer { width: 100%; min-width: 0; }
  .approval-detail__body { grid-template-columns: 1fr; }
  .detail-receipt { max-width: none; }
  .donut-wrap { flex-wrap: wrap; }
  .toolbar__spacer { display: none; }
  .range-toolbar { align-items: flex-start; flex-direction: column; gap: 8px; }
  .range-caption span { white-space: normal; }
  .search-box { flex: 1; width: auto; min-width: 170px; }
  .warning-row { grid-template-columns: minmax(0, 1fr) 80px; }
  .warning-row__amount { display: none; }
}

@media (max-width: 640px) {
  .metric-grid { grid-template-columns: 1fr; }
  .range-tabs { width: 100%; overflow-x: auto; }
  .range-tab { flex: 1; padding: 0 9px; }
  .dashboard-hero, .page-head { flex-direction: column; align-items: flex-start; }
  .dashboard-hero__actions { width: 100%; }
  .dashboard-hero__actions .btn { flex: 1; }
  .topbar { padding: 0 15px; }
  .main { padding: 18px 15px 35px; }
  .drawer__head { padding: 18px 18px 16px; }
  .drawer__body { padding: 0 18px 30px; }
  .drawer__metrics { grid-template-columns: 1fr 1fr; }
  .drawer-metric:nth-child(2) { border-right: 0; }
  .drawer-metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .drawer-tabs { gap: 18px; }
  .drawer__title { font-size: 19px; }
  .modal-layer { padding: 12px; }
  .modal { max-height: calc(100vh - 24px); }
  .modal__head, .modal__body { padding-left: 17px; padding-right: 17px; }
  .modal__foot { padding: 13px 17px; flex-wrap: wrap; }
  .modal__foot .btn { flex: 1; }
  .segmented { grid-template-columns: 1fr; }
  .login__right { padding: 24px; }
  .login-card__title { font-size: 27px; }
  .approval-detail__head { flex-direction: column; gap: 14px; }
  .approval-detail__amount { text-align: left; }
  .approval-detail__foot { flex-direction: column; align-items: stretch; }
  .approval-detail__buttons .btn { flex: 1; }
  .toast-root { left: 14px; right: 14px; bottom: 14px; align-items: stretch; }
  .toast { min-width: 0; max-width: none; }
  .warning-row { grid-template-columns: 1fr; gap: 8px; }
  .warning-row__ratio { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
