/* ============================================================================
   Eliaskon ERP — Vercel / Geist theme (flat, monochrome, hairline borders)
   Light + dark via [data-theme] on <html>.
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono&display=swap');

:root {
  /* Light (Vercel light) */
  --bg: #ffffff;
  --panel: #ffffff;          /* topbar */
  --sidebar: #f5f5f6;        /* light grey — distinct from content */
  --card: #ffffff;
  --card-2: #fafafa;         /* hover / subtle fill */
  --border: #ebebeb;
  --border-strong: #d4d4d4;
  --fg: #171717;
  --muted-fg: #666666;
  --btn-bg: #171717;         /* primary = black on white */
  --btn-fg: #ffffff;
  --radius: 10px;

  --success: #0a7d33; --success-bg: #e7f6ec;
  --info: #0068d6;    --info-bg: #e6f0fc;
  --warning: #a35200; --warning-bg: #fdf0e1;
  --danger: #cc2a2a;  --danger-bg: #fdeaea;
  --purple: #6b3fd4;  --purple-bg: #f0eafc;
  --neutral: #666666; --neutral-bg: #f2f2f2;
}
html[data-theme="dark"] {
  /* Dark (Vercel dark — true black) */
  --bg: #000000;
  --panel: #0a0a0a;
  --sidebar: #0e0e0e;        /* lifted off true-black content */
  --card: #0a0a0a;
  --card-2: #1a1a1a;
  --border: #2a2a2a;
  --border-strong: #3a3a3a;
  --fg: #ededed;
  --muted-fg: #a1a1a1;
  --btn-bg: #ededed;         /* primary = white on black */
  --btn-fg: #000000;

  --success: #62c073; --success-bg: #0f2417;
  --info: #52a8ff;    --info-bg: #0d1f33;
  --warning: #f5b76a; --warning-bg: #2a1c0a;
  --danger: #ff6166;  --danger-bg: #2a1115;
  --purple: #b08cff;  --purple-bg: #1c1430;
  --neutral: #a1a1a1; --neutral-bg: #1f1f1f;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-y: scroll; }  /* always reserve the scrollbar gutter — no layout jump between pages */

body {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  letter-spacing: -0.01em;
}
a { color: inherit; text-decoration: none; }
/* Safety net: inline icons default to text size unless a component sizes them. */
svg { width: 1em; height: 1em; }
.muted { color: var(--muted-fg); }
.text-sm { font-size: 12.5px; }
.text-right { text-align: right; }
.text-center { text-align: center; }

/* Surfaces — .glass is kept as a class name but is now a flat card. */
.glass {
  background: var(--card);
  border: 1px solid var(--border);
}
.glass-chrome { background: var(--panel); }

/* ── Layout shell ─────────────────────────────────────────────────────────── */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 248px; flex-shrink: 0; display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; height: 100vh; z-index: 25;
  background: var(--sidebar); border-right: 1px solid var(--border);
}
.sidebar .brand {
  display: flex; align-items: center; gap: 10px; height: 62px;
  padding: 0 20px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 16px;
}
.brand .logo {
  width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center;
  background: var(--fg); color: var(--bg);
}
.brand .logo svg { width: 17px; height: 17px; }
.nav { flex: 1; overflow-y: auto; padding: 12px 10px; }
.nav .group + .group { margin-top: 18px; }
.nav .group-label {
  font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted-fg); padding: 0 10px 6px;
}
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 11px; border-radius: 9px;
  font-weight: 500; font-size: 13.5px; color: var(--muted-fg); margin-bottom: 2px;
  border: 1px solid transparent; transition: background .12s, color .12s, border-color .12s;
}
.nav a svg { width: 16px; height: 16px; color: var(--muted-fg); transition: color .12s; }
.nav a:hover { background: rgba(0,0,0,.05); color: var(--fg); }
.nav a:hover svg { color: var(--fg); }
.nav a.active { background: var(--card); color: var(--fg); font-weight: 600; border: 1px solid var(--border); }
.nav a.active svg { color: #7F77DD; }
html[data-theme="dark"] .nav a:hover { background: rgba(255,255,255,.06); }
html[data-theme="dark"] .nav a.active { background: var(--card-2); border-color: var(--border); }
.sidebar-foot { padding: 12px 18px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--muted-fg); }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; margin-left: 248px; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: 62px; display: flex; align-items: center; gap: 10px;
  padding: 0 22px; border-bottom: 1px solid var(--border);
  background: var(--panel);
}
.topbar .spacer { flex: 1; }

/* right-side action cluster */
.tb-cluster { display: flex; align-items: center; gap: 6px; }
.tb-div { width: 1px; height: 22px; background: var(--border); margin: 0 5px; flex-shrink: 0; }
.topbar .btn-icon { transition: background .14s ease, transform .1s ease, color .14s ease; }
.topbar .btn-icon:active { transform: scale(.9); }

/* Live exchange rates — pill with pulse */
.rates { display: flex; gap: 11px; align-items: center; padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--card-2); color: inherit; cursor: pointer; font: inherit; text-align: left; appearance: none; -webkit-appearance: none; transition: background .12s, border-color .12s; }
.rates:hover { background: var(--card); border-color: var(--border-strong); }
.rates:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Rates history popup ──────────────────────────────────────────────── */
.rates-popup { position: fixed; z-index: 210; background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 8px 32px rgba(0,0,0,.13); min-width: 500px; }
.rates-popup-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px 10px; font-weight: 600; font-size: 13px; border-bottom: 1px solid var(--border); }
.rates-popup-close { background: none; border: none; cursor: pointer; color: var(--muted-fg); font-size: 20px; line-height: 1; padding: 2px 6px; border-radius: 6px; font-family: inherit; }
.rates-popup-close:hover { background: var(--card-2); color: var(--fg); }
.rates-popup-body { padding: 14px 16px 16px; }
.rates-chart-legend { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted-fg); margin-bottom: 10px; }
.rates-chart-legend strong { color: var(--fg); }
.rcl-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 3px; flex-shrink: 0; }
@media (max-width: 600px) { .rates-popup { min-width: calc(100vw - 24px); left: 12px !important; right: 12px; } }
.rates-live { width: 7px; height: 7px; border-radius: 50%; background: #1D9E75; position: relative; flex-shrink: 0; }
.rates-live::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #1D9E75; animation: ratePulse 2s ease-out infinite; }
@keyframes ratePulse { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(3); opacity: 0; } }
.rate { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.rate .flag { width: 15px; height: 15px; }
.rate .rc { font-weight: 600; color: var(--muted-fg); font-size: 11px; }
.rate .rv { font-weight: 700; font-variant-numeric: tabular-nums; }
.rate .rt { color: var(--muted-fg); }
@media (max-width: 900px) { .rates, .tb-div--rates { display: none; } }
@media (prefers-reduced-motion: reduce) { .rates-live::after { animation: none; } }

/* Notifications */
.notif-btn { position: relative; }
.notif-badge { position: absolute; top: 1px; right: 1px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: #f43f5e; color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; line-height: 1; }
.notif-head { padding: 8px 10px 6px; font-weight: 600; font-size: 13px; }
.notif-empty { padding: 22px 10px; text-align: center; color: var(--muted-fg); font-size: 13px; }
.notif-item { display: flex; gap: 10px; padding: 9px 10px; border-radius: 8px; align-items: flex-start; }
.notif-item:hover { background: var(--card-2); }
.notif-dot { width: 8px; height: 8px; border-radius: 999px; margin-top: 5px; flex-shrink: 0; }
.tone-warning { background: var(--warning); } .tone-info { background: var(--info); } .tone-danger { background: var(--danger); }
.notif-text { display: block; font-size: 13px; line-height: 1.35; }
.notif-sub { display: block; font-size: 11.5px; color: var(--muted-fg); margin-top: 2px; }

.topbar-search { position: relative; flex: 1; max-width: 400px; }
.topbar-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted-fg); pointer-events: none; }
.topbar-search input { width: 100%; padding-left: 38px; padding-right: 34px; height: 40px; background: var(--card-2); border-color: var(--border); border-radius: 11px; transition: background .16s ease, border-color .16s ease, box-shadow .16s ease; }
.topbar-search input:focus { background: var(--card); border-color: #7F77DD; box-shadow: 0 0 0 3px rgba(127,119,221,.22); }
.search-kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 21px; height: 21px; display: grid; place-items: center; font: 600 12px/1 var(--font, inherit); color: var(--muted-fg); background: var(--card); border: 1px solid var(--border); border-radius: 6px; pointer-events: none; transition: opacity .12s ease; }
.topbar-search input:focus ~ .search-kbd, .topbar-search input:not(:placeholder-shown) ~ .search-kbd { opacity: 0; }
@media (max-width: 600px) { .topbar-search { display: none; } }
.search-pop { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--card); border: 1px solid var(--border-strong); border-radius: 11px; padding: 6px; max-height: 70vh; overflow-y: auto; z-index: 50; display: none; }
.topbar-search.open .search-pop { display: block; }
.sp-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-fg); padding: 8px 10px 3px; font-weight: 600; }
.sp-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 7px; }
.sp-item:hover, .sp-item.active { background: var(--card-2); }
.sp-label { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-sub { font-size: 11.5px; color: var(--muted-fg); flex-shrink: 0; }
.sp-empty { padding: 16px 12px; font-size: 13px; color: var(--muted-fg); text-align: center; }
.sp-all { display: block; padding: 9px 10px; margin-top: 4px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--accent); font-weight: 600; }
.sp-all:hover { background: var(--card-2); }
.content { flex: 1; padding: 28px; max-width: 1200px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.page-head p { color: var(--muted-fg); margin-top: 5px; font-size: 13.5px; }

/* ── Cards & grids ────────────────────────────────────────────────────────── */
.card { border-radius: var(--radius); padding: 20px; }
.card-title { font-weight: 600; margin-bottom: 16px; font-size: 14px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.col-span-2 { grid-column: span 2; }

.stat { display: flex; align-items: center; gap: 14px; border-radius: var(--radius); padding: 18px 20px; transition: border-color .15s; }
.stat:hover { border-color: var(--border-strong); }
.stat .icon { width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; background: var(--card-2); color: var(--fg); border: 1px solid var(--border); }
.stat .icon svg { width: 20px; height: 20px; }
.stat .label { font-size: 13px; color: var(--muted-fg); }
.stat .value { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.stat .hint { font-size: 12px; color: var(--muted-fg); }
/* icon accents kept monochrome to match Vercel */
.ic-indigo, .ic-emerald, .ic-amber, .ic-rose { background: var(--card-2); color: var(--fg); }

/* ── Tables ───────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
  text-align: left; padding: 10px 16px; font-size: 12px; color: var(--muted-fg);
  border-bottom: 1px solid var(--border); font-weight: 500; background: var(--card-2);
}
table.data td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background .1s; }
table.data tbody tr:hover { background: var(--card-2); }
.row-strong { font-weight: 600; }

/* ── Badges ───────────────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 500; border: 1px solid transparent; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.badge-neutral { background: var(--neutral-bg); color: var(--neutral); }
.badge-info    { background: var(--info-bg); color: var(--info); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger  { background: var(--danger-bg); color: var(--danger); }
.badge-purple  { background: var(--purple-bg); color: var(--purple); }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 8px;
  font-size: 13.5px; font-weight: 500; cursor: pointer; border: 1px solid transparent;
  transition: all .12s; white-space: nowrap; background: none; font-family: inherit;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-primary:hover { opacity: .85; }
.btn-outline { border-color: var(--border-strong); background: var(--card); color: var(--fg); }
.btn-outline:hover { background: var(--card-2); border-color: var(--muted-fg); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: .9; }
.btn-ghost { color: var(--muted-fg); }
.btn-ghost:hover { background: var(--card-2); color: var(--fg); }
.btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: 7px; }
.btn-icon { padding: 7px; border-radius: 7px; }

/* ── Forms ────────────────────────────────────────────────────────────────── */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.field .req { color: var(--danger); }
.input, .select, .textarea {
  width: 100%; padding: 9px 12px; border-radius: 8px; font-size: 14px; font-family: inherit;
  border: 1px solid var(--border-strong); background: var(--bg); color: var(--fg);
  transition: border-color .12s, box-shadow .12s;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg); }
.input::placeholder { color: var(--muted-fg); }
.textarea { min-height: 90px; resize: vertical; }
.form-row { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
.form-row-3 { grid-template-columns: repeat(3, 1fr); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.field-error { color: var(--danger); font-size: 12px; margin-top: 5px; }

/* ── Search & toolbar ─────────────────────────────────────────────────────── */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.search { position: relative; max-width: 320px; width: 100%; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted-fg); }
.search input { padding-left: 34px; }

/* ── Progress ─────────────────────────────────────────────────────────────── */
.progress { height: 6px; border-radius: 999px; background: var(--card-2); overflow: hidden; min-width: 80px; border: 1px solid var(--border); }
.progress > span { display: block; height: 100%; background: var(--fg); }

/* ── Empty state ──────────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 64px 20px; border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.empty-state h2 { font-size: 16px; margin-bottom: 6px; font-weight: 600; }
.empty-state .btn { margin-top: 14px; }

/* ── Flash ────────────────────────────────────────────────────────────────── */
.flash { padding: 11px 15px; border-radius: 8px; margin-bottom: 16px; font-size: 13.5px; font-weight: 500; border: 1px solid var(--border); }
.flash-success { background: var(--success-bg); color: var(--success); border-color: transparent; }
.flash-error { background: var(--danger-bg); color: var(--danger); border-color: transparent; }

/* ── Kanban ───────────────────────────────────────────────────────────────── */
.kanban { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: start; }
.kanban .col { border-radius: var(--radius); padding: 12px; background: var(--card-2); border: 1px solid var(--border); }
.kanban .col h3 { font-size: 12.5px; font-weight: 600; margin-bottom: 10px; display: flex; justify-content: space-between; color: var(--muted-fg); text-transform: uppercase; letter-spacing: .03em; }
.kanban .ticket { border-radius: 8px; padding: 11px; margin-bottom: 9px; background: var(--card); border: 1px solid var(--border); }
.kanban .ticket .t-title { font-weight: 600; font-size: 13px; margin-bottom: 7px; }
.kanban .ticket .t-meta { font-size: 11.5px; color: var(--muted-fg); display: flex; justify-content: space-between; align-items: center; gap: 6px; }

/* ── Avatar / misc ────────────────────────────────────────────────────────── */
.avatar { width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--card-2); color: var(--fg); border: 1px solid var(--border); cursor: pointer; }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 168px; border-radius: 10px; padding: 5px; z-index: 40; display: none; border: 1px solid var(--border-strong); }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border-radius: 6px; font-size: 13px; color: inherit; background: none; border: 0; cursor: pointer; text-align: left; font-family: inherit; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--card-2); }
.dropdown-menu .danger { color: var(--danger); }
.dropdown-menu a svg, .dropdown-menu button svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Reformed user (avatar) dropdown */
.user-menu { min-width: 242px; padding: 6px; }
.um-head { display: flex; align-items: center; gap: 11px; padding: 10px 10px 11px; }
.um-av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #534AB7, #7F77DD); flex-shrink: 0; }
.um-id { display: flex; flex-direction: column; min-width: 0; }
.um-name { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.um-mail { font-size: 12px; color: var(--muted-fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.um-sep { height: 1px; background: var(--border); margin: 4px 6px; }
.divider { height: 1px; background: var(--border); margin: 18px 0; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted-fg); margin-bottom: 14px; }
.back-link:hover { color: var(--fg); }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; transition: border-color .12s; }
.list-row:hover { border-color: var(--border-strong); background: var(--card-2); }

/* ── Login (split-screen) ─────────────────────────────────────────────────── */
.lg { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 100vh; }

/* brand panel */
.lg-art { position: relative; overflow: hidden; display: flex; align-items: center; padding: 52px; color: #fff;
  background: linear-gradient(125deg, #0f172a, #3b1d6e 45%, #1d4ed8 78%, #0ea5e9); background-size: 260% 260%; animation: heroShift 18s ease infinite; }
.lg-art-in { position: relative; z-index: 1; max-width: 460px; animation: cardIn .6s cubic-bezier(.22,1,.36,1) both; }
.lg-logo { display: inline-flex; align-items: center; gap: 11px; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.lg-cube { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.16); display: grid; place-items: center; flex-shrink: 0; }
.lg-cube svg { width: 21px; height: 21px; }
.lg-tag h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.14; letter-spacing: -.02em; margin: 36px 0 0; font-weight: 700; }
.lg-tag p { opacity: .85; font-size: 15px; margin-top: 14px; line-height: 1.6; }
.lg-points { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-direction: column; gap: 13px; }
.lg-points li { display: flex; align-items: center; gap: 12px; font-size: 14px; opacity: .95; }
.lg-points .pk { width: 28px; height: 28px; border-radius: 8px; background: rgba(255,255,255,.16); display: grid; place-items: center; flex-shrink: 0; }
.lg-points .pk svg { width: 15px; height: 15px; }
.lg-foot { position: absolute; bottom: 34px; left: 52px; z-index: 1; font-size: 12.5px; opacity: .7; letter-spacing: .05em; }

/* sign-in side */
.lg-form { display: grid; place-items: center; padding: 32px; background: var(--bg); }
.lg-card { width: 100%; max-width: 384px; animation: cardIn .5s cubic-bezier(.22,1,.36,1) both; }
.lg-brand-sm { display: none; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; margin-bottom: 24px; }
.lg-card h1 { font-size: 25px; letter-spacing: -.02em; }
.lg-card > p.muted { margin: 5px 0 0; font-size: 14px; }
.lg-lbl { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted-fg); margin: 0 0 6px; }
.lg-field { position: relative; margin-bottom: 14px; }
.lg-ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted-fg); display: grid; place-items: center; pointer-events: none; }
.lg-ic svg { width: 17px; height: 17px; }
.lg-field .input { height: 46px; padding-left: 40px; padding-right: 42px; border-radius: 11px; font-size: 14px; transition: border-color .15s, box-shadow .15s; }
.lg-field .input:focus { border-color: #7F77DD; box-shadow: 0 0 0 3px rgba(127,119,221,.2); }
.lg-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border: 0; background: none; color: var(--muted-fg); cursor: pointer; display: grid; place-items: center; border-radius: 7px; }
.lg-eye:hover { color: var(--fg); background: var(--card-2); }
.lg-eye.on { color: #7F77DD; }
.lg-eye svg { width: 17px; height: 17px; }
.lg-submit { width: 100%; height: 46px; justify-content: center; gap: 8px; border-radius: 11px; font-size: 14px; font-weight: 600; margin-top: 6px; }
.lg-submit svg { width: 17px; height: 17px; }
.lg-demo { margin-top: 18px; text-align: center; font-size: 12.5px; color: var(--muted-fg); }

@media (max-width: 880px) {
  .lg { grid-template-columns: 1fr; }
  .lg-art { display: none; }
  .lg-brand-sm { display: inline-flex; }
  .lg-brand-sm .lg-cube { background: #7F77DD; color: #fff; }
}
@media (prefers-reduced-motion: reduce) { .lg-art, .lg-art-in, .lg-card { animation: none; } }

/* ── Invoice / quote print ────────────────────────────────────────────────── */
.doc { max-width: 800px; margin: 0 auto; }
.doc-head { display: flex; justify-content: space-between; margin-bottom: 28px; }
.doc-head h2 { font-size: 24px; letter-spacing: -.02em; font-weight: 600; }
@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  .content { padding: 0; }
  .glass { border: 1px solid #ddd; }
}

/* ── Dashboard (bento grid + creative widgets) ────────────────────────────── */
.greeting { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.greeting h1 { font-size: 24px; font-weight: 600; letter-spacing: -.025em; }
.greeting .sub { color: var(--muted-fg); font-size: 13.5px; margin-top: 4px; }
.greeting .quick { display: flex; gap: 8px; flex-wrap: wrap; }

.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.bento > * { grid-column: span 12; min-width: 0; }
.sp-3 { grid-column: span 3; } .sp-4 { grid-column: span 4; }
.sp-5 { grid-column: span 5; } .sp-6 { grid-column: span 6; }
.sp-7 { grid-column: span 7; } .sp-8 { grid-column: span 8; } .sp-9 { grid-column: span 9; }

/* KPI card with trend delta */
.kpi { border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; transition: border-color .15s, transform .15s; }
.kpi:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.kpi .k-top { display: flex; align-items: center; justify-content: space-between; }
.kpi .k-label { font-size: 12.5px; color: var(--muted-fg); display: flex; align-items: center; gap: 7px; }
.kpi .k-ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--card-2); border: 1px solid var(--border); }
.kpi .k-ico svg { width: 15px; height: 15px; }
.kpi .k-value { font-size: 26px; font-weight: 650; letter-spacing: -.03em; line-height: 1; }
.kpi .k-foot { font-size: 12px; color: var(--muted-fg); }
.delta { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 600; padding: 2px 7px; border-radius: 999px; }
.delta svg { width: 12px; height: 12px; }
.delta.up { color: var(--success); background: var(--success-bg); }
.delta.down { color: var(--danger); background: var(--danger-bg); }
.delta.flat { color: var(--muted-fg); background: var(--neutral-bg); }

.tile-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.tile-head h3 { font-size: 14px; font-weight: 600; }
.tile-head a { font-size: 12.5px; color: var(--muted-fg); }
.tile-head a:hover { color: var(--fg); }
.tile-link { font-size: 12.5px; color: var(--muted-fg); }

/* SVG chart */
.chart { width: 100%; height: auto; display: block; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .rev-line { fill: none; stroke: var(--fg); stroke-width: 2; }
.chart .exp-line { fill: none; stroke: var(--muted-fg); stroke-width: 1.5; stroke-dasharray: 4 4; }
.chart .rev-dot { fill: var(--bg); stroke: var(--fg); stroke-width: 2; }
.chart-x { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11.5px; color: var(--muted-fg); }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted-fg); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 0; border-top: 2px solid var(--fg); display: inline-block; }
.legend i.dash { border-top: 2px dashed var(--muted-fg); }

/* mini cashflow */
.cash-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--border); }
.cash-row:last-child { border-bottom: 0; }
.cash-row .cv { font-weight: 600; font-variant-numeric: tabular-nums; }

/* funnel */
.funnel { display: flex; flex-direction: column; gap: 10px; }
.funnel .fr { display: grid; grid-template-columns: 96px 1fr 34px; align-items: center; gap: 10px; font-size: 12.5px; }
.funnel .bar { height: 10px; border-radius: 999px; background: var(--card-2); overflow: hidden; border: 1px solid var(--border); }
.funnel .bar > span { display: block; height: 100%; background: var(--fg); }
.funnel .fr .n { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

/* project progress rows */
.proj { display: flex; flex-direction: column; gap: 14px; }
.proj .pr { display: flex; flex-direction: column; gap: 6px; }
.proj .pr-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.proj .pr-top .pct { color: var(--muted-fg); font-variant-numeric: tabular-nums; }

/* timeline */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 4px; bottom: 4px; width: 1px; background: var(--border); }
.timeline .ti { position: relative; padding: 0 0 16px; }
.timeline .ti:last-child { padding-bottom: 0; }
.timeline .ti::before { content: ""; position: absolute; left: -22px; top: 4px; width: 11px; height: 11px; border-radius: 999px; background: var(--bg); border: 2px solid var(--muted-fg); }
.timeline .ti.dot-success::before { border-color: var(--success); }
.timeline .ti.dot-info::before { border-color: var(--info); }
.timeline .ti .tx { font-size: 13px; line-height: 1.4; }
.timeline .ti .tt { font-size: 11.5px; color: var(--muted-fg); margin-top: 2px; }

/* deadline list */
.dl { display: flex; flex-direction: column; gap: 4px; }
.dl a { display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: 8px; transition: background .12s; }
.dl a:hover { background: var(--card-2); }
.dl .dd { width: 42px; height: 42px; border-radius: 9px; background: var(--card-2); border: 1px solid var(--border); display: grid; place-items: center; text-align: center; flex-shrink: 0; line-height: 1; }
.dl .dd b { font-size: 15px; font-weight: 650; } .dl .dd small { font-size: 9.5px; text-transform: uppercase; color: var(--muted-fg); }
.dl .dmeta { min-width: 0; flex: 1; }
.dl .dname { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl .dwhen { font-size: 11.5px; color: var(--muted-fg); }
.dl .dwhen.soon { color: var(--warning); }

@media (max-width: 1024px) {
  .bento > * { grid-column: span 12; }
  .sp-3, .sp-4, .sp-5, .sp-6 { grid-column: span 6; }
  .sp-7, .sp-8, .sp-9 { grid-column: span 12; }
}
@media (max-width: 600px) {
  .bento > *, .sp-3, .sp-4, .sp-5, .sp-6 { grid-column: span 12; }
  .greeting .quick { width: 100%; }
  .greeting .quick .btn { flex: 1; justify-content: center; }
}

/* ── Dashboard v2 — fluid grids, motion, accent ───────────────────────────── */
:root { --accent: #0068d6; --accent-soft: rgba(0,104,214,.10); }
html[data-theme="dark"] { --accent: #3b82f6; --accent-soft: rgba(59,130,246,.16); }

/* Truly fluid grids — reflow by available width, no hard breakpoints needed */
.kpi-grid    { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(208px, 1fr)); margin-bottom: 16px; }
.dash-split  { display: grid; gap: 16px; grid-template-columns: minmax(0, 2.2fr) minmax(260px, 1fr); margin-bottom: 16px; }
.widget-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); margin-bottom: 16px; }
@media (max-width: 920px) { .dash-split { grid-template-columns: 1fr; } }

/* Fluid type */
.greeting h1   { font-size: clamp(20px, 2.4vw, 27px); }
.kpi .k-value  { font-size: clamp(22px, 2.4vw, 30px); }

/* Featured (revenue) KPI with subtle accent wash + sparkline */
.kpi.featured { background: linear-gradient(155deg, var(--accent-soft), transparent 62%); }
.kpi.featured .k-ico { color: var(--accent); border-color: var(--accent); }
.spark { width: 100%; height: 34px; display: block; margin-top: 2px; }
.spark .ln { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.spark .ar { fill: var(--accent); opacity: .12; stroke: none; }

/* Accent the main chart's revenue series */
.chart .rev-line { stroke: var(--accent); }
.chart .rev-dot  { stroke: var(--accent); }

/* Entrance motion (staggered) */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.reveal { animation: rise .5s cubic-bezier(.22,1,.36,1) both; }
.kpi-grid > :nth-child(1){animation-delay:.03s}.kpi-grid > :nth-child(2){animation-delay:.08s}
.kpi-grid > :nth-child(3){animation-delay:.13s}.kpi-grid > :nth-child(4){animation-delay:.18s}
.dash-split > :nth-child(1){animation-delay:.20s}.dash-split > :nth-child(2){animation-delay:.26s}
.widget-grid > :nth-child(1){animation-delay:.28s}.widget-grid > :nth-child(2){animation-delay:.34s}.widget-grid > :nth-child(3){animation-delay:.40s}
.dash-activity{animation-delay:.44s}

/* Self-drawing chart lines */
@keyframes draw { to { stroke-dashoffset: 0; } }
.chart .rev-line, .chart .exp-line { stroke-dasharray: 2200; stroke-dashoffset: 2200; animation: draw 1.5s cubic-bezier(.4,0,.2,1) .25s forwards; }
.chart .exp-line { animation-delay: .5s; }
.chart .rev-dot { opacity: 0; animation: fadeIn .4s ease 1.4s forwards; }
@keyframes fadeIn { to { opacity: 1; } }

/* Bars that reveal left→right (clip-path keeps the inline width intact) */
@keyframes revealBar { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.reveal-bar > span { animation: revealBar 1s cubic-bezier(.4,0,.2,1) .3s both; }

/* Hover lift on every dashboard tile */
.kpi, .dash-split > .card, .widget-grid > .card, .dash-activity { transition: transform .18s ease, border-color .18s ease; }
.widget-grid > .card:hover, .dash-split > .card:hover { transform: translateY(-3px); border-color: var(--border-strong); }

/* ── Dashboard veil (eye toggle) ─────────────────────────────────────────── */
.kpi .k-value, .kpi .k-foot, .delta, .hf-delta, .hero-stats .hs b { transition: filter .25s; }
.dash-veiled .kpi .k-value,
.dash-veiled .kpi .k-foot,
.dash-veiled .delta,
.dash-veiled .hf-delta,
.dash-veiled .hero-stats .hs b { filter: blur(7px); user-select: none; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-bar > span, .chart .rev-line, .chart .exp-line, .chart .rev-dot { animation: none !important; }
  .reveal { opacity: 1; transform: none; }
  .chart .rev-line, .chart .exp-line { stroke-dashoffset: 0; }
  .chart .rev-dot { opacity: 1; }
  .reveal-bar > span { clip-path: none; }
}

/* ── Form sections + repeatable contacts ──────────────────────────────────── */
.form-section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-fg); font-weight: 600; margin: 4px 0 14px; }
.contact-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.contact-row .cr-badge { flex-shrink: 0; width: 62px; font-size: 11px; font-weight: 600; color: var(--muted-fg); padding-top: 10px; }
.cr-grid { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; min-width: 0; }
.cr-phone { display: flex; gap: 6px; min-width: 0; }
.cr-phone .input { flex: 1; min-width: 0; }

/* Custom dial-code picker with real flags */
.dialpicker { position: relative; width: 104px; flex-shrink: 0; }
.dial-btn { width: 100%; display: flex; align-items: center; gap: 6px; padding: 9px 8px; border: 1px solid var(--border-strong); background: var(--bg); border-radius: 8px; font-size: 13.5px; color: var(--fg); cursor: pointer; font-family: inherit; height: 100%; }
.dial-btn .d { font-variant-numeric: tabular-nums; }
.dial-btn .ph { color: var(--muted-fg); }
.dial-btn .chev { width: 14px; height: 14px; margin-left: auto; color: var(--muted-fg); flex-shrink: 0; }
.dial-menu { position: fixed; z-index: 210; width: 270px; max-width: 92vw; border-radius: 11px; padding: 6px; display: none; flex-direction: column; overflow: hidden; background: var(--card); border: 1px solid var(--border-strong); }
.dial-menu.show { display: flex; }
.dial-search { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--card-2); color: var(--fg); font-size: 13px; margin-bottom: 6px; font-family: inherit; flex-shrink: 0; }
.dial-search:focus { outline: none; border-color: var(--fg); }
.dial-list { flex: 1; min-height: 0; overflow-y: auto; }
.dial-opt { width: 100%; display: flex; align-items: center; gap: 9px; padding: 7px 8px; border: 0; background: none; border-radius: 7px; cursor: pointer; font-size: 13px; color: var(--fg); text-align: left; font-family: inherit; }
.dial-opt:hover { background: var(--card-2); }
.dial-opt .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dial-opt .dl { color: var(--muted-fg); font-variant-numeric: tabular-nums; }
.cr-del { flex-shrink: 0; color: var(--muted-fg); }
.cr-del:hover { color: var(--danger); }
@media (max-width: 680px) {
  .cr-grid { grid-template-columns: 1fr; }
  .contact-row { flex-wrap: wrap; }
  .contact-row .cr-badge { width: 100%; padding-top: 0; }
}

/* Status tabs (segmented control) */
.tabs { display: inline-flex; background: var(--card-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; }
.tab { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--muted-fg); white-space: nowrap; transition: color .12s, background .12s; background: none; border: 0; cursor: pointer; font-family: inherit; }
.tab:hover { color: var(--fg); }
.tab.active { background: var(--card); color: var(--fg); font-weight: 600; }
html[data-theme="dark"] .tab.active { background: #2a2a2a; }
.tab-count { font-size: 11px; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 0 6px; color: var(--muted-fg); font-variant-numeric: tabular-nums; }
.tab.active .tab-count { background: var(--accent); color: #fff; border-color: transparent; }

/* Flags */
.flag { border-radius: 50%; aspect-ratio: 1 / 1; object-fit: cover; box-shadow: 0 0 0 1px var(--border); vertical-align: middle; }
.country { display: inline-flex; align-items: center; gap: 7px; font-variant-numeric: tabular-nums; }

@media (max-width: 640px) { .tabs { width: 100%; overflow-x: auto; } }

/* contact list on the detail page */
.contact-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.contact-card { border: 0; border-radius: 11px; padding: 14px; display: flex; gap: 11px; align-items: flex-start; background: linear-gradient(135deg, #3b82f6, #6366f1); color: #fff; }
.contact-card .row-strong { color: #fff; }
.contact-card .muted, .contact-card .text-sm.muted { color: rgba(255,255,255,.8); }
.contact-card .ci { color: #fff; }
.contact-card .ci svg { color: #fff; }
.contact-card .ci a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.contact-card .avatar { background: rgba(255,255,255,.22); color: #fff; border-color: transparent; }
.contact-card .badge { background: rgba(255,255,255,.24); color: #fff; }
.contact-card .badge::before { background: #fff; }
.contact-card .ci { font-size: 12.5px; color: #fff; margin-top: 8px; display: flex; flex-direction: column; gap: 5px; }
.contact-card .ci span { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.contact-card .ci svg { width: 14px; height: 14px; flex-shrink: 0; color: #fff; }
.contact-card .ci a { color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: underline; text-underline-offset: 2px; }
.contact-card .ci .ci-phone { flex-wrap: wrap; }
.contact-card .ci .ci-num { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-card .ci a.ci-act { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0; overflow: visible; text-decoration: none; transition: background .12s, transform .12s; }
.contact-card .ci a.ci-act svg { width: 15px; height: 15px; color: #fff; }
.contact-card .ci a.ci-act:hover { transform: translateY(-1px); }
.contact-card .ci a.ci-act.wa { background: #25D366; }
.contact-card .ci a.ci-act.wa:hover { background: #1ebe5b; }
.contact-card .ci a.ci-act.call { background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.4); }
.contact-card .ci a.ci-act.call:hover { background: rgba(255,255,255,.32); }

/* ── Tasks board ──────────────────────────────────────────────────────────── */
.task-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tstat { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--card); transition: border-color .15s; }
.tstat:hover { border-color: var(--border-strong); }
.tstat .n { font-size: 22px; font-weight: 650; letter-spacing: -.02em; }
.tstat .l { font-size: 12px; color: var(--muted-fg); display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.tstat .d { width: 8px; height: 8px; border-radius: 999px; display: inline-block; }

.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
.board-col { background: var(--card-2); border: 1px solid var(--border); border-radius: 14px; display: flex; flex-direction: column; min-height: 140px; transition: outline-color .15s, background .15s; outline: 2px dashed transparent; outline-offset: -3px; }
.board-col.drag-over { outline-color: var(--col, var(--accent)); background: color-mix(in srgb, var(--col, var(--accent)) 7%, var(--card-2)); }
.col-h { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.col-h::before { content: ""; position: absolute; }
.board-col { position: relative; }
.board-col::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--col); border-radius: 14px 14px 0 0; opacity: .8; }
.col-h .ttl { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.col-h .dot { width: 8px; height: 8px; border-radius: 999px; }
.col-h .cnt { font-size: 12px; color: var(--muted-fg); background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 1px 9px; font-variant-numeric: tabular-nums; }
.col-body { padding: 10px; display: flex; flex-direction: column; gap: 9px; min-height: 64px; }

.task-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px; cursor: grab; transition: border-color .15s, box-shadow .15s, transform .12s, opacity .15s; }
.task-card:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.task-card:active { cursor: grabbing; }
.task-card.dragging { opacity: .45; }
.tc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.tc-title { font-weight: 600; font-size: 13.5px; line-height: 1.4; }
.tc-proj { font-size: 11.5px; color: var(--muted-fg); margin-top: 7px; display: inline-flex; gap: 5px; align-items: center; }
.tc-proj svg { width: 12px; height: 12px; }
.tc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 11px; min-height: 24px; }
.tc-due { font-size: 11.5px; color: var(--muted-fg); display: inline-flex; gap: 5px; align-items: center; }
.tc-due svg { width: 12px; height: 12px; }
.tc-due.soon { color: var(--warning); }
.tc-due.over { color: var(--danger); font-weight: 600; }
.col-empty { text-align: center; color: var(--muted-fg); font-size: 12px; padding: 20px 8px; border: 1px dashed var(--border); border-radius: 9px; }
.dropdown-menu .dd-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-fg); padding: 7px 10px 3px; }
.dropdown-menu form { margin: 0; }

@media (max-width: 1024px) { .board { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .board { grid-template-columns: 1fr; } }

/* ── Responsive tables → stacked cards on phones ──────────────────────────── */
@media (max-width: 640px) {
  table.data thead { display: none; }
  table.data, table.data tbody { display: block; width: 100%; }
  table.data tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--border); }
  table.data tr:last-child { border-bottom: 0; }
  table.data td { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 6px 16px; border: 0; text-align: right; min-height: 0; }
  table.data td::before { content: attr(data-label); font-weight: 500; color: var(--muted-fg); text-align: left; flex-shrink: 0; }
  table.data td:first-child { display: block; text-align: left; padding-top: 12px; font-size: 14px; }
  table.data td:first-child::before { display: none; }
  table.data td:empty { display: none; }
  table.data .progress { min-width: 90px; }
  .table-wrap { overflow-x: visible; }
}

/* Snappy row removal + filter empty state */
.row-removing { opacity: 0 !important; transition: opacity .18s ease; }
.filter-empty td { text-align: center; padding: 30px; color: var(--muted-fg); }

/* ── Toasts ───────────────────────────────────────────────────────────────── */
.toast-wrap { position: fixed; top: 16px; right: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 9px; background: var(--card); border: 1px solid var(--border-strong); border-radius: 11px; padding: 11px 15px; font-size: 13px; font-weight: 500; min-width: 200px; max-width: 360px; transform: translateX(130%); opacity: 0; transition: transform .32s cubic-bezier(.22,1,.36,1), opacity .2s; }
.toast.show { transform: none; opacity: 1; }
.toast .tdot { width: 8px; height: 8px; border-radius: 999px; flex-shrink: 0; background: var(--success); }
.toast.error .tdot { background: var(--danger); }
@media (max-width: 480px) { .toast-wrap { left: 12px; right: 12px; top: 12px; } .toast { max-width: none; } }

/* Page content transition + in-place refresh state (opacity only — no layout shift) */
.content { animation: pageIn .2s ease both; }
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }
.content.is-loading { pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .content { animation: none; } }

/* ── Confirm dialog ───────────────────────────────────────────────────────── */
.confirm-overlay { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(8,8,12,.5); -webkit-backdrop-filter: blur(6px) saturate(140%); backdrop-filter: blur(6px) saturate(140%); opacity: 0; transition: opacity .2s ease; }
.confirm-overlay.show { opacity: 1; }
.confirm-box { width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--border-strong); border-radius: 18px; padding: 26px 24px; text-align: center; transform: scale(.92) translateY(8px); opacity: 0; transition: transform .26s cubic-bezier(.22,1,.36,1), opacity .2s ease; }
.confirm-overlay.show .confirm-box { transform: none; opacity: 1; }
.confirm-ico { width: 54px; height: 54px; border-radius: 16px; margin: 0 auto 14px; display: grid; place-items: center; color: #fff; }
.confirm-ico svg { width: 26px; height: 26px; }
.confirm-ico.danger { background: linear-gradient(135deg, #f43f5e, #e11d48); }
.confirm-ico.neutral { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.confirm-title { font-size: 16.5px; font-weight: 650; letter-spacing: -.01em; }
.confirm-msg { font-size: 13px; color: var(--muted-fg); margin-top: 6px; }
.confirm-actions { display: flex; gap: 10px; margin-top: 22px; }
.confirm-actions .btn { flex: 1; justify-content: center; padding: 10px; }
@media (prefers-reduced-motion: reduce) { .confirm-box { transition: opacity .2s; transform: none; } }

/* ── Modal (liquid-glass popup) ───────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-start; justify-content: center;
  padding: 6vh 16px 40px; overflow-y: auto;
  background: rgba(8, 8, 12, .5);
  -webkit-backdrop-filter: blur(6px) saturate(140%); backdrop-filter: blur(6px) saturate(140%);
  opacity: 0; transition: opacity .25s ease;
}
.modal-overlay.show { opacity: 1; }
.modal-glass {
  position: relative; width: 100%; max-width: 720px; border-radius: 22px; overflow: hidden;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  transform: translateY(22px) scale(.97); opacity: 0;
  transition: transform .35s cubic-bezier(.22,1,.36,1), opacity .3s ease;
}
.modal-overlay.show .modal-glass { transform: none; opacity: 1; }
html[data-theme="dark"] .modal-glass {
  background: rgba(22, 22, 26, .62); border-color: rgba(255, 255, 255, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}
/* liquid colour sheen */
.modal-glass::before {
  content: ""; position: absolute; top: -45%; left: -25%; width: 150%; height: 90%;
  background: radial-gradient(55% 55% at 30% 25%, rgba(0,112,243,.20), transparent 70%);
  filter: blur(24px); pointer-events: none;
}
html[data-theme="dark"] .modal-glass::before { background: radial-gradient(55% 55% at 30% 25%, rgba(59,130,246,.26), transparent 70%); }
.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 3; width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--card-2); color: var(--fg);
  font-size: 20px; line-height: 1; cursor: pointer; display: grid; place-items: center; transition: background .15s;
}
.modal-close:hover { background: var(--card); }
.modal-body { position: relative; z-index: 1; padding: 28px; }
.modal-body .back-link { display: none; }
.modal-body .page-head { margin: 0 0 16px; }
.modal-body .page-head p { display: none; }
.modal-body .card { background: transparent !important; border: 0 !important; padding: 0 !important; max-width: none !important; }
.modal-body .input, .modal-body .select, .modal-body .textarea { background: var(--card); }
html[data-theme="dark"] .modal-body .input, html[data-theme="dark"] .modal-body .select, html[data-theme="dark"] .modal-body .textarea { background: rgba(0,0,0,.35); }
.modal-spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--fg); margin: 48px auto; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 600px) { .modal-glass { border-radius: 18px; } .modal-body { padding: 20px; } .modal-overlay { padding: 3vh 10px 30px; } }

/* ── Dashboard color ──────────────────────────────────────────────────────── */
.kpi { position: relative; overflow: hidden; }
.kpi::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.kpi .k-ico { color: #fff; border: 0; }

.k-c1 { background-color: var(--card); background-image: linear-gradient(160deg, rgba(99,102,241,.15), transparent 62%); }
.k-c1::before { background: linear-gradient(90deg, #6366f1, #8b5cf6); }
.k-c1 .k-ico { background: linear-gradient(135deg, #6366f1, #8b5cf6); }

.k-c2 { background-color: var(--card); background-image: linear-gradient(160deg, rgba(16,185,129,.15), transparent 62%); }
.k-c2::before { background: linear-gradient(90deg, #10b981, #14b8a6); }
.k-c2 .k-ico { background: linear-gradient(135deg, #10b981, #14b8a6); }

.k-c3 { background-color: var(--card); background-image: linear-gradient(160deg, rgba(245,158,11,.16), transparent 62%); }
.k-c3::before { background: linear-gradient(90deg, #f59e0b, #f97316); }
.k-c3 .k-ico { background: linear-gradient(135deg, #f59e0b, #f97316); }

.k-c4 { background-color: var(--card); background-image: linear-gradient(160deg, rgba(14,165,233,.15), transparent 62%); }
.k-c4::before { background: linear-gradient(90deg, #0ea5e9, #06b6d4); }
.k-c4 .k-ico { background: linear-gradient(135deg, #0ea5e9, #06b6d4); }

/* Colourful chart series */
.chart .rev-line { stroke: url(#revStroke); }
.chart .rev-dot  { stroke: #8b5cf6; }
.chart .exp-line { stroke: #f43f5e; }
.legend i        { border-top-color: #8b5cf6; }
.legend i.dash   { border-top-color: #f43f5e; }

/* Pipeline dots + project progress */
.funnel .fr .muted { display: inline-flex; align-items: center; gap: 7px; }
.fdot { width: 7px; height: 7px; border-radius: 999px; flex-shrink: 0; }
.proj .progress > span { background: linear-gradient(90deg, #6366f1, #8b5cf6); }

/* Hero banner */
.hero { position: relative; overflow: hidden; border-radius: 20px; padding: 26px 28px; margin-bottom: 18px; color: #fff; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap;
  background: linear-gradient(125deg, #0f172a, #3b1d6e 45%, #1d4ed8 78%, #0ea5e9); background-size: 260% 260%; animation: heroShift 18s ease infinite; }
.hero-glow { display: none; }
@media (prefers-reduced-motion: reduce) { .hero { animation: none; } }
.hero-main { position: relative; z-index: 1; }
.hero-greet { font-size: clamp(19px, 2.2vw, 23px); font-weight: 650; letter-spacing: -.02em; }
.hero-date { opacity: .85; font-size: 13px; margin-top: 3px; }
.hero-figure { display: flex; align-items: baseline; gap: 10px; margin-top: 16px; }
.hf-num { font-size: clamp(28px, 4vw, 38px); font-weight: 750; letter-spacing: -.03em; line-height: 1; }
.hf-delta { font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.22); }
.hf-delta.down { background: rgba(0,0,0,.2); }
.hero-label { opacity: .9; font-size: 12.5px; margin-top: 8px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hero-stats .hs { font-size: 12px; padding: 5px 11px; border-radius: 999px; background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.25); white-space: nowrap; }
.hero-stats .hs b { font-weight: 700; }
.hero-actions { position: relative; z-index: 1; display: flex; gap: 8px; flex-wrap: wrap; }
.hero-btn { padding: 9px 15px; border-radius: 10px; font-size: 13px; font-weight: 600; background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.28); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); transition: background .15s, transform .15s; }
.hero-btn:hover { background: rgba(255,255,255,.3); transform: translateY(-1px); }
.hero-btn.primary { background: #fff; color: #5b21b6; border-color: #fff; }
.hero-btn.primary:hover { background: rgba(255,255,255,.9); }
@media (max-width: 640px) { .hero { padding: 22px; } .hero-actions { width: 100%; } .hero-btn { flex: 1; text-align: center; } }

/* Interactive chart */
.chart-card .chart-wrap { position: relative; }
.chart-guide { stroke: var(--muted-fg); stroke-width: 1; stroke-dasharray: 3 3; }
.hit { cursor: crosshair; }
.chart-tip { position: absolute; transform: translateX(-50%); top: 4px; background: var(--card); border: 1px solid var(--border-strong); border-radius: 10px; padding: 8px 11px; font-size: 12px; pointer-events: none; white-space: nowrap; z-index: 3; }
.chart-tip .m { font-weight: 600; margin-bottom: 4px; }
.chart-tip .r { color: #8b5cf6; } .chart-tip .e { color: #f43f5e; }

/* Donut */
.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut { width: 130px; height: 130px; flex-shrink: 0; }
.donut-seg { transition: opacity .15s; }
.donut-num { font-size: 26px; font-weight: 700; fill: var(--fg); }
.donut-cap { font-size: 11px; fill: var(--muted-fg); }
.donut-legend { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dl-row { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.dl-row .ld { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.dl-row .ln { flex: 1; color: var(--muted-fg); }
.dl-row .lv { font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 440px) { .donut-wrap { flex-direction: column; } }

/* Top clients */
.tc-row { display: flex; gap: 11px; align-items: center; padding: 7px 0; }
.tc-row .pr-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tc-row .pr-top .row-strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-row .pr-top .text-sm { flex-shrink: 0; font-variant-numeric: tabular-nums; }

/* ── Payments monthly chart (responsive) ──────────────────────────────────── */
.mchart { display: flex; align-items: flex-end; gap: 14px; height: 170px; padding-top: 10px; }
.mcol { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; justify-content: flex-end; min-width: 0; }
.mval { font-size: 12px; color: var(--muted-fg); white-space: nowrap; }
.mbar { width: 100%; max-width: 54px; border-radius: 7px 7px 0 0; background: linear-gradient(180deg, #10b981, #14b8a6); }
.mmon { font-size: 12px; color: var(--muted-fg); }
@media (max-width: 560px) { .mchart { gap: 6px; height: 140px; } .mval { display: none; } .mbar { max-width: 34px; } .mmon { font-size: 11px; } }

/* ── Payments rows (clean, responsive list items) ─────────────────────────── */
.pay-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 14px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 9px; flex-wrap: wrap; transition: border-color .12s; }
.pay-row:hover { border-color: var(--border-strong); }
.pay-left { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 240px; }
.pay-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.pay-ico svg { width: 18px; height: 18px; }
.pay-ico.c2 { background: linear-gradient(135deg, #0ea5e9, #06b6d4); }
.pay-ico.c3 { background: linear-gradient(135deg, #10b981, #14b8a6); }
.pay-ico.c4 { background: linear-gradient(135deg, #f43f5e, #ec4899); }
.pay-date { width: 44px; height: 44px; border-radius: 11px; background: var(--card-2); border: 1px solid var(--border); display: grid; place-items: center; text-align: center; line-height: 1; flex-shrink: 0; }
.pay-date b { font-size: 15px; } .pay-date small { font-size: 9.5px; text-transform: uppercase; color: var(--muted-fg); }
.pay-main { min-width: 0; }
.pay-title { font-weight: 600; font-size: 14px; }
.pay-sub { font-size: 12px; color: var(--muted-fg); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pay-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.pay-amt { font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.pay-actions { display: flex; gap: 6px; }
@media (max-width: 560px) {
  .pay-row { align-items: flex-start; }
  .pay-right { width: 100%; justify-content: space-between; }
}

/* ── Client list (aligned, clickable rows) ────────────────────────────────── */
.client-list { background: var(--card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.client-head, .client-row { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1.25fr) 104px 104px 104px 120px 96px; align-items: center; gap: 14px; padding: 0 18px; }
.cl-flag { flex-shrink: 0; display: inline-flex; }
.cl-flag .flag { width: 26px; height: 26px; }
.cl-cell-money { text-align: right; font-variant-numeric: tabular-nums; }
.cl-rec { font-weight: 600; color: #059669; }
.cl-pay { font-weight: 600; color: var(--muted-fg); }
.cl-pay.due { color: #dc2626; }
[data-theme="dark"] .cl-rec { color: #34d399; }
[data-theme="dark"] .cl-pay.due { color: #f87171; }
.client-head { height: 44px; background: var(--card-2); border-bottom: 1px solid var(--border); }
.client-head span { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-fg); font-weight: 600; }
.client-row { position: relative; min-height: 70px; padding-top: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .12s; }
.client-row:last-child { border-bottom: 0; }
.client-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, #6366f1, #8b5cf6); opacity: 0; transition: opacity .12s; }
.client-row:hover { background: var(--card-2); }
.client-row:hover::before { opacity: 1; }

.cl-co { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cl-av { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px; flex-shrink: 0; }
.cl-name { font-weight: 650; font-size: 14.5px; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-mail { font-size: 12px; color: var(--muted-fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-contact { display: flex; align-items: center; gap: 9px; min-width: 0; }
.cl-cav { width: 30px; height: 30px; border-radius: 9px; background: rgba(99,102,241,.14); color: var(--accent); display: grid; place-items: center; font-size: 10.5px; font-weight: 700; flex-shrink: 0; }
.cl-cmeta { min-width: 0; }
.cl-cname { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-crole { font-size: 11.5px; color: var(--muted-fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-act { display: flex; gap: 14px; }
.cl-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted-fg); }
.cl-chip svg { width: 13px; height: 13px; }
.cl-chip b { color: var(--fg); font-weight: 650; }
.cl-actions { display: flex; gap: 1px; justify-content: flex-end; opacity: .45; transition: opacity .12s; }
.client-row:hover .cl-actions { opacity: 1; }
.cl-actions form { display: inline-flex; }
.cl-actions .cr-del:hover { color: var(--danger); }

@media (max-width: 980px) { .client-head, .client-row { grid-template-columns: minmax(0, 1.8fr) 100px 100px 96px 84px; } .cl-cell-contact, .cl-cell-act { display: none; } .cl-actions { opacity: 1; } }
@media (max-width: 560px) { .client-head, .client-row { grid-template-columns: 1fr 96px 78px; } .cl-cell-contact, .cl-cell-act, .cl-cell-rec, .cl-cell-status { display: none; } }
.filter-empty:not(td) { display: block; text-align: center; padding: 50px 20px; color: var(--muted-fg); border: 1px dashed var(--border-strong); border-radius: 14px; margin-top: 12px; }
.filter-empty[hidden] { display: none; }  /* respect the hidden attribute */

/* ── Colored stat boxes (Leads / Clients headers) ─────────────────────────── */
.cstat-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 18px; }
.cstat { border-radius: var(--radius); padding: 16px 18px; color: #fff; min-width: 0; }
.cstat .l { font-size: 12.5px; opacity: .92; font-weight: 500; }
.cstat .v { font-size: clamp(20px, 4.5vw, 26px); font-weight: 700; letter-spacing: -.02em; margin-top: 7px; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 380px) { .cstat-grid { grid-template-columns: 1fr 1fr; } }
.cstat.c1 { background: #6366f1; }
.cstat.c2 { background: #0ea5e9; }
.cstat.c3 { background: #059669; }
.cstat.c4 { background: #e11d48; }
.cstat.c5 { background: #d97706; }
.cstat.cg { background: #64748b; }

/* ── Scrollbars (subtle, inset, Vercel-style) ─────────────────────────────── */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
  border: 3px solid var(--bg);           /* inset look via padding-box */
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--muted-fg); background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }

/* Sidebar nav: thinner thumb that blends with the panel and brightens on hover */
.nav { scrollbar-width: thin; scrollbar-color: transparent transparent; transition: scrollbar-color .2s; }
.nav:hover { scrollbar-color: var(--border-strong) transparent; }
.nav::-webkit-scrollbar { width: 8px; }
.nav::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 999px;
  border: 2px solid var(--panel);
  background-clip: padding-box;
  transition: background .2s;
}
.sidebar:hover .nav::-webkit-scrollbar-thumb { background: var(--border-strong); background-clip: padding-box; }
.nav::-webkit-scrollbar-thumb:hover { background: var(--muted-fg); background-clip: padding-box; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
body { overflow-x: hidden; }              /* guard against the off-canvas sidebar */
.menu-btn { display: none; }

/* Large desktop down to laptop */
@media (max-width: 1180px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* Tablet / mobile: off-canvas sidebar */
@media (max-width: 1024px) {
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 60; width: 260px;
    transform: translateX(-100%); transition: transform .25s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 0 0 100vmax transparent;
  }
  .sidebar.open { transform: translateX(0); border-right: 1px solid var(--border-strong); }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .grid-3 { grid-template-columns: 1fr; }
  .col-span-2 { grid-column: span 1; }
  .kanban { grid-template-columns: repeat(2, 1fr); }
  .content { padding: 22px; }
}

/* Small tablets */
@media (max-width: 820px) {
  .kanban { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 20px; }
  .topbar { padding: 0 18px; }
}

/* Phones */
@media (max-width: 640px) {
  .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .content { padding: 16px; }
  .page-head { margin-bottom: 18px; }
  .page-head .btn { width: 100%; justify-content: center; }
  table.data th, table.data td { padding: 11px 12px; }
  .card { padding: 16px; }
}

/* Tiny phones */
@media (max-width: 380px) {
  .content { padding: 12px; }
  .stat { padding: 14px; gap: 11px; }
  .stat .value { font-size: 19px; }
}

.scrim { display: none; }
.scrim.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 55; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }

/* Segmented toggle (e.g. payment Full / Partial) */
.seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--card-2); border: 1px solid var(--border); border-radius: 12px; }
.seg-opt { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 9px; font-size: 13.5px; font-weight: 500; color: var(--muted-fg); cursor: pointer; user-select: none; transition: background .12s, color .12s; }
.seg-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.seg-opt:hover { color: var(--fg); }
.seg-opt.active { background: var(--card); color: var(--fg); box-shadow: 0 1px 0 var(--border); }
.input.is-locked { background: var(--card-2); color: var(--muted-fg); cursor: default; }

/* ── Websites module ────────────────────────────────────────────────────────── */
.site-av { background: linear-gradient(135deg,#0ea5e9,#6366f1); color:#fff; display:inline-flex; align-items:center; justify-content:center; }
.site-av svg { width:20px; height:20px; }

/* provider columns in the list */
.site-prov { display:flex; flex-direction:column; gap:2px; min-width:0; }
.site-prov .sp-name { font-size:13px; color:var(--fg); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.site-prov .sp-exp { font-size:12px; }

/* expiry colour cues */
.site-exp small { font-size:11px; opacity:.85; }
.site-exp.exp-ok   { color:var(--muted-fg); }
.site-exp.exp-soon { color:#b45309; font-weight:500; }
.site-exp.exp-over { color:#dc2626; font-weight:600; }
[data-theme="dark"] .site-exp.exp-soon { color:#fbbf24; }
[data-theme="dark"] .site-exp.exp-over { color:#f87171; }

/* credentials — type picker dropdown */
.cred-add-wrap { position:relative; }
.cred-type-menu { display:none; position:absolute; right:0; top:calc(100% + 6px); background:var(--card); border:1px solid var(--border-strong); border-radius:12px; padding:6px; z-index:30; min-width:230px; box-shadow:0 8px 28px rgba(0,0,0,.14); }
.cred-type-menu.open { display:block; }
.ctm-item { display:flex; align-items:center; gap:10px; width:100%; padding:9px 10px; border-radius:8px; background:none; border:0; cursor:pointer; color:var(--fg); text-align:left; font-family:inherit; }
.ctm-item:hover { background:var(--card-2); }
.ctm-dot { width:9px; height:9px; border-radius:50%; flex-shrink:0; }
.ctm-info { display:flex; flex-direction:column; gap:1px; }
.ctm-name { font-size:13.5px; font-weight:600; }
.ctm-hint { font-size:11.5px; color:var(--muted-fg); }

/* credentials — form rows */
.cred-row { border:1px solid var(--border); border-left:3px solid var(--border); border-radius:10px; padding:12px 14px; margin-bottom:10px; }
.cred-row-head { display:flex; align-items:center; margin-bottom:10px; }
.cred-cat-pill { font-size:11.5px; font-weight:600; padding:2px 8px; border-radius:99px; border:1px solid; display:inline-block; }
.cred-fields { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.cred-fields .cred-note { grid-column:1/-1; }
.cred-pass { position:relative; display:flex; align-items:center; }
.cred-pass .input { width:100%; padding-right:38px; }
.pass-toggle { position:absolute; right:6px; background:none; border:none; cursor:pointer; color:var(--muted-fg); padding:4px; display:inline-flex; border-radius:6px; }
.pass-toggle:hover { color:var(--fg); background:var(--card-2); }
.pass-toggle svg { width:17px; height:17px; }
.pass-toggle.on { color:#6366f1; }
@media (max-width:620px){ .cred-fields { grid-template-columns:1fr; } .cred-fields .cred-note { grid-column:auto; } }

/* credentials — detail view groups + cards */
.cred-group { margin-bottom:18px; }
.cred-group:last-child { margin-bottom:0; }
.cred-group-head { display:flex; align-items:center; gap:7px; font-size:11.5px; font-weight:700; text-transform:uppercase; letter-spacing:.07em; padding-bottom:8px; border-bottom:1px solid; margin-bottom:10px; }
.cg-dot { width:7px; height:7px; border-radius:50%; flex-shrink:0; }
.cred-cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:10px; }
.cred-card { border:1px solid var(--border); border-radius:12px; padding:14px; background:var(--card-2); }
.cc-head { display:flex; flex-direction:column; gap:2px; margin-bottom:10px; }
.cc-label { font-weight:600; font-size:14px; }
.cc-url { font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:var(--muted-fg); }
.cc-field { display:flex; align-items:center; gap:8px; padding:5px 0; }
.cc-k { font-size:11px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted-fg); width:38px; flex-shrink:0; }
.cc-val { flex:1; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:13px; background:var(--card); border:1px solid var(--border); border-radius:7px; padding:4px 8px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
.cc-btn { background:none; border:1px solid var(--border); border-radius:7px; cursor:pointer; color:var(--muted-fg); padding:5px; display:inline-flex; flex-shrink:0; transition:color .12s,border-color .12s; }
.cc-btn:hover { color:var(--fg); border-color:var(--border-strong); }
.cc-btn.ok { color:#16a34a; border-color:#16a34a; }
.cc-btn svg { width:15px; height:15px; }
.cc-notes { margin-top:8px; font-size:12px; }

/* key/value rows on detail cards */
.kv { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:7px 0; border-top:1px solid var(--border); }
.kv:first-of-type { border-top:none; }
.kv .k { color:var(--muted-fg); font-size:13px; }
.kv .v { font-size:13.5px; text-align:right; }

/* ── Assets list (Google Drive aware) ───────────────────────────────────────── */
.asset-name { display:flex; align-items:center; gap:10px; min-width:0; }
.asset-thumb { position:relative; width:36px; height:36px; border-radius:8px; flex-shrink:0; display:inline-flex; align-items:center; justify-content:center; background:var(--card-2); border:1px solid var(--border); color:var(--muted-fg); overflow:hidden; }
.asset-thumb svg { width:18px; height:18px; }
.asset-thumb img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; background:var(--card); }
.asset-thumb.is-drive { color:#0066da; }
.row-actions { display:inline-flex; gap:4px; justify-content:flex-end; align-items:center; }

/* ── Mobile: popups & dropdowns become bottom sheets ────────────────────────── */
@media (max-width: 640px) {
  /* Modal → bottom sheet */
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal-glass {
    max-width: none; width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 92vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
    transform: translateY(100%); 
  }
  .modal-overlay.show .modal-glass { transform: none; }
  .modal-body { padding: 22px 18px calc(24px + env(safe-area-inset-bottom)); }
  .modal-close { top: 10px; right: 10px; }
  /* grab handle */
  .modal-glass::after { content:""; position:absolute; top:8px; left:50%; transform:translateX(-50%);
    width:40px; height:4px; border-radius:99px; background:var(--border-strong); z-index:4; }

  /* Dropdown menu → bottom sheet */
  .dropdown-menu.as-sheet {
    position: fixed !important; left: 0 !important; right: 0 !important; bottom: 0 !important; top: auto !important;
    width: 100% !important; min-width: 0 !important; max-width: none !important; z-index: 320;
    border-radius: 16px 16px 0 0; padding: 8px 10px calc(12px + env(safe-area-inset-bottom));
    border: 1px solid var(--border-strong); border-bottom: 0;
    box-shadow: 0 -12px 40px rgba(0,0,0,.22);
    animation: sheetUp .24s cubic-bezier(.22,1,.36,1);
  }
  .dropdown-menu.as-sheet::before { content:""; display:block; width:40px; height:4px; border-radius:99px;
    background:var(--border-strong); margin:2px auto 10px; }
  .dropdown-menu.as-sheet a, .dropdown-menu.as-sheet button { padding: 14px 14px; font-size: 15px; border-radius: 10px; }
  .dropdown-menu.as-sheet .dd-label { padding: 10px 14px 4px; font-size: 11px; }
  .dropdown-menu.as-sheet .notif-head { padding: 2px 14px 12px; font-size: 15px; font-weight: 700; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
  .dropdown-menu.as-sheet .notif-item { padding: 12px 14px; border-radius: 10px; gap: 14px; }
  .dropdown-menu.as-sheet .notif-text { font-size: 14px; }
  .dropdown-menu.as-sheet .notif-sub { font-size: 12px; margin-top: 3px; }
  .dropdown-menu.as-sheet .notif-dot { width: 10px; height: 10px; margin-top: 4px; }
  .dropdown-menu.as-sheet .notif-empty { padding: 28px 14px; font-size: 15px; }
  @keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }

  .sheet-backdrop { position: fixed; inset: 0; z-index: 300; background: rgba(8,8,12,.45);
    -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); animation: fadeIn .2s ease; }
  @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
}

/* ════════════════════════════════════════════════════════════════════════════
   Calendar module
   ════════════════════════════════════════════════════════════════════════════ */
.cal-toolbar { display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; margin-bottom:14px; }
.cal-nav { display:flex; align-items:center; gap:8px; }
.cal-btn { display:inline-flex; align-items:center; justify-content:center; height:36px; min-width:36px; padding:0 10px;
  border:1px solid var(--border); border-radius:9px; background:var(--card); color:var(--fg); cursor:pointer; font-weight:600; font-size:13.5px; }
.cal-btn:hover { background:var(--card-2); border-color:var(--border-strong); }
.cal-btn svg { width:17px; height:17px; }
.cal-today.is-current { opacity:.55; pointer-events:none; }
.cal-month { font-size:19px; font-weight:700; letter-spacing:-.01em; margin:0 0 0 6px; }
.cal-views { flex-shrink:0; }

/* Legend filters */
.cal-legend { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:14px; }
.leg-chip { display:inline-flex; align-items:center; gap:7px; padding:5px 12px; border-radius:999px; cursor:pointer;
  font-size:12.5px; font-weight:500; border:1px solid var(--border); background:var(--card); color:var(--fg); transition:opacity .15s, background .15s; }
.leg-chip .cdot { width:9px; height:9px; border-radius:999px; background:var(--c); flex-shrink:0; }
.leg-chip:not(.is-on) { opacity:.4; text-decoration:line-through; }
.leg-chip:not(.is-on) .cdot { background:var(--muted-fg); }

.cal-card { padding:0 !important; overflow:hidden; }

/* Month grid */
.cal-grid { display:grid; grid-template-columns:repeat(7,1fr); }
.cal-head-row { border-bottom:1px solid var(--border); background:var(--card-2); }
.cal-dow { padding:10px 12px; font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.06em; color:var(--muted-fg); }
.cal-week { border-bottom:1px solid var(--border); }
.cal-week:last-child { border-bottom:0; }
.cal-cell { position:relative; min-height:116px; padding:6px 7px 8px; border-right:1px solid var(--border); cursor:pointer;
  transition:background .12s; display:flex; flex-direction:column; gap:5px; overflow:hidden; }
.cal-cell:nth-child(7n) { border-right:0; }
.cal-cell:hover { background:var(--card-2); }
.cal-cell.is-out { background:color-mix(in srgb, var(--card-2) 55%, transparent); }
.cal-cell.is-out .cal-daynum { color:var(--muted-fg); opacity:.6; }
.cal-daynum { font-size:13px; font-weight:600; width:26px; height:24px; display:grid; place-items:center; border-radius:7px; }
.cal-cell.is-today .cal-daynum { background:linear-gradient(135deg,#6366f1,#8b5cf6); color:#fff; }
.cal-events { display:flex; flex-direction:column; gap:3px; min-width:0; }
.cal-chip { display:flex; align-items:center; gap:5px; padding:2px 6px; border-radius:6px; font-size:11.5px; line-height:1.4;
  color:var(--fg); background:color-mix(in srgb, var(--c) 14%, transparent); border:1px solid color-mix(in srgb, var(--c) 30%, transparent);
  text-decoration:none; overflow:hidden; }
.cal-chip:hover { background:color-mix(in srgb, var(--c) 24%, transparent); }
.cal-chip .cdot { width:6px; height:6px; border-radius:999px; background:var(--c); flex-shrink:0; }
.cal-chip .ctime { font-variant-numeric:tabular-nums; color:var(--muted-fg); font-size:10.5px; flex-shrink:0; }
.cal-chip .ctxt { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cal-more { font-size:10.5px; color:var(--muted-fg); padding:0 6px; font-weight:500; }

/* Week grid */
.cal-weekgrid { display:grid; grid-template-columns:repeat(7,1fr); }
.cal-wcol { border-right:1px solid var(--border); min-height:340px; cursor:pointer; transition:background .12s; }
.cal-wcol:last-child { border-right:0; }
.cal-wcol:hover { background:var(--card-2); }
.cal-wcol.is-today { background:color-mix(in srgb,#6366f1 7%, transparent); }
.cal-whead { padding:10px 10px 8px; border-bottom:1px solid var(--border); text-align:center; }
.cal-whead .wdow { display:block; font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--muted-fg); }
.cal-whead .wnum { display:inline-grid; place-items:center; width:30px; height:30px; border-radius:8px; font-weight:700; font-size:15px; margin-top:3px; }
.cal-wcol.is-today .wnum { background:linear-gradient(135deg,#6366f1,#8b5cf6); color:#fff; }
.cal-wbody { padding:8px; display:flex; flex-direction:column; gap:4px; }
.cal-wbody .cal-chip { padding:5px 8px; font-size:12px; }
.cal-wempty { color:var(--muted-fg); text-align:center; font-size:13px; padding:8px 0; opacity:.5; }

/* Agenda */
.ag-day { display:flex; gap:18px; padding:16px 18px; border-bottom:1px solid var(--border); }
.ag-day:last-child { border-bottom:0; }
.ag-date { width:56px; flex-shrink:0; text-align:center; }
.ag-dnum { font-size:24px; font-weight:700; line-height:1; }
.ag-dmeta { display:block; margin-top:4px; }
.ag-dow { display:block; font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--muted-fg); }
.ag-mon { display:block; font-size:11px; color:var(--muted-fg); }
.ag-list { flex:1; display:flex; flex-direction:column; gap:6px; min-width:0; }
.ag-row { display:flex; align-items:center; gap:10px; padding:9px 12px; border-radius:10px; text-decoration:none; color:var(--fg);
  border:1px solid var(--border); border-left:3px solid var(--c); background:var(--card); }
.ag-row:hover { background:var(--card-2); }
.ag-row .cdot { width:8px; height:8px; border-radius:999px; background:var(--c); flex-shrink:0; }
.ag-title { font-weight:550; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ag-sub { margin-left:auto; font-size:12px; color:var(--muted-fg); flex-shrink:0; }

/* Mobile */
@media (max-width: 760px) {
  .cal-toolbar { flex-direction:column; align-items:stretch; }
  .cal-nav { justify-content:space-between; }
  .cal-views { display:flex; }
  .cal-views .tab { flex:1; text-align:center; }
}
@media (max-width: 640px) {
  .cal-cell { min-height:62px; padding:4px; }
  .cal-daynum { font-size:12px; width:22px; height:20px; }
  .cal-chip { padding:2px; gap:0; border:0; background:transparent !important; }
  .cal-chip .ctxt, .cal-chip .ctime { display:none; }       /* dots only on phones */
  .cal-chip .cdot { width:7px; height:7px; }
  .cal-events { flex-direction:row; flex-wrap:wrap; gap:3px; }
  .cal-more { display:none; }
  .cal-weekgrid { grid-template-columns:1fr; }              /* week stacks */
  .cal-wcol { min-height:0; border-right:0; border-bottom:1px solid var(--border); display:flex; }
  .cal-whead { border-bottom:0; display:flex; align-items:center; gap:8px; width:90px; flex-shrink:0; }
  .cal-whead .wnum { margin-top:0; }
  .ag-sub { display:none; }
}

/* Mobile: custom dial-code picker becomes a bottom sheet + prevent iOS zoom on form fields */
@media (max-width: 640px) {
  .dial-menu.as-sheet {
    position: fixed !important; left: 0 !important; right: 0 !important; bottom: 0 !important; top: auto !important;
    width: 100% !important; max-width: none !important; max-height: 72vh !important; z-index: 320;
    border-radius: 16px 16px 0 0; padding: 10px 10px calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 -12px 40px rgba(0,0,0,.22); animation: sheetUp .24s cubic-bezier(.22,1,.36,1);
  }
  .dial-menu.as-sheet::before { content:""; display:block; width:40px; height:4px; border-radius:99px;
    background:var(--border-strong); margin:2px auto 10px; flex-shrink:0; }
  .dial-menu.as-sheet .dial-opt { padding:13px 12px; font-size:15px; }
  .dial-menu.as-sheet .dial-search { font-size:16px; padding:11px 12px; }
  /* 16px prevents mobile Safari from zooming in when a field is focused */
  .input, .select, .textarea, .dial-search { font-size:16px; }
}

/* ════════════════════════════════════════════════════════════════════════════
   Settings
   ════════════════════════════════════════════════════════════════════════════ */
.set-hero { border-radius:16px; padding:24px 28px; margin-bottom:22px;
  background:var(--card); border:1px solid var(--border); }
.set-hero-in { display:flex; align-items:center; gap:16px; }
.set-hero h1 { margin:0; font-size:22px; letter-spacing:-.02em; color:var(--fg); }
.set-hero p { margin:3px 0 0; font-size:13px; color:var(--muted-fg); }
.set-mono { width:48px; height:48px; border-radius:12px; background:var(--accent,#c1121f);
  display:grid; place-items:center; flex-shrink:0; color:#fff; }
.set-mono svg { width:22px; height:22px; }

.set-grid { display:grid; grid-template-columns:minmax(0,1fr) 340px; gap:22px; align-items:start; }
.set-cols { display:flex; flex-direction:column; gap:18px; }

.set-card { background:var(--card); border:1px solid var(--border); border-radius:16px; padding:22px;
  opacity:0; transform:translateY(14px); animation:cardIn .55s cubic-bezier(.22,1,.36,1) forwards; animation-delay:var(--d,0s); }
@keyframes cardIn { to { opacity:1; transform:none; } }
.set-card-head { display:flex; align-items:center; gap:13px; margin-bottom:18px; }
.set-card-head h3 { margin:0; font-size:15.5px; }
.set-card-head p { margin:2px 0 0; font-size:12.5px; color:var(--muted-fg); }
.sc-ico { width:42px; height:42px; border-radius:12px; display:grid; place-items:center; color:#fff; flex-shrink:0; }
.sc-ico svg { width:20px; height:20px; }
.sc-ico.c1 { background:#6366f1; }
.sc-ico.c2 { background:#059669; }
.sc-ico.c3 { background:#d97706; }
.sc-ico.c4 { background:#0ea5e9; }
.sc-ico.c5 { background:#7c3aed; }
.set-card .field { margin-bottom:13px; }
/* team access */
.team-list { display:flex; flex-direction:column; gap:8px; }
.team-row { display:flex; align-items:center; gap:10px; padding:10px 12px; border:1px solid var(--border); border-radius:9px; background:var(--bg); }
.team-row-info { flex:1; display:flex; flex-direction:column; gap:1px; min-width:0; }
.team-row-name { font-size:13.5px; font-weight:600; color:var(--fg); }
.team-row-email { font-size:12px; color:var(--muted-fg); }
.team-row-perms { font-size:12px; color:var(--muted-fg); margin-top:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mod-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:5px 10px; }
.mod-check { display:flex; align-items:center; gap:7px; padding:5px 0; font-size:13px; color:var(--fg); cursor:pointer; white-space:nowrap; }
.mod-check input[type=checkbox] { width:15px; height:15px; accent-color:var(--accent,#6366f1); cursor:pointer; flex-shrink:0; }
.sec-pw-form { margin-top:4px; }
.req { color:var(--danger,#c1121f); }
.field-grid { display:grid; grid-template-columns:1fr 1fr; gap:13px; }
.field-grid.set-3 { grid-template-columns:1fr 1fr 1fr; }
.inv-pref-grid { display:grid; grid-template-columns:1fr 1fr 1fr; gap:14px 20px; margin-top:4px; }
.inv-pref-group { display:flex; flex-direction:column; gap:1px; }
.inv-pref-head { font-size:11px; font-weight:700; letter-spacing:.07em; color:var(--muted-fg); margin-bottom:8px; padding-bottom:6px; border-bottom:1px solid var(--border); }
.inv-pref-row { display:flex; align-items:center; gap:9px; padding:6px 0; font-size:13.5px; color:var(--fg); cursor:pointer; }
.inv-pref-row input[type=checkbox] { width:16px; height:16px; accent-color:var(--accent,#6366f1); cursor:pointer; flex-shrink:0; }

/* language flag picker */
.lang-picker { position:relative; }
.lang-btn { display:flex; align-items:center; gap:10px; width:100%; padding:9px 12px; border-radius:9px; cursor:pointer;
  border:1px solid var(--border-strong); background:var(--bg); color:var(--fg); font:inherit; }
.lang-btn .lang-name { flex:1; text-align:left; }
.lang-btn .chev { width:16px; height:16px; color:var(--muted-fg); transition:transform .2s; }
.lang-picker.open .chev { transform:rotate(180deg); }
/* menu is moved to <body> and positioned with JS (fixed) so it escapes stacking contexts */
.lang-menu { position:fixed; z-index:215; width:280px; max-width:92vw; background:var(--card);
  border:1px solid var(--border-strong); border-radius:11px; padding:5px; display:none;
  max-height:260px; overflow-y:auto; }
.lang-menu.show { display:block; animation:cardIn .18s ease forwards; }
.lang-opt { display:flex; align-items:center; gap:10px; width:100%; padding:9px 10px; border-radius:8px; border:0;
  background:none; cursor:pointer; font:inherit; color:var(--fg); text-align:left; }
.lang-opt:hover { background:var(--card-2); }
.lang-opt.on { background:color-mix(in srgb,var(--accent,#6366f1) 14%, transparent); font-weight:600; }
.lang-btn img, .lang-opt img { width:22px; height:22px; }

/* live preview */
.set-side { position:sticky; top:16px; }
.pv-label { display:flex; align-items:center; gap:7px; font-size:12px; font-weight:600; color:var(--muted-fg); margin-bottom:10px; text-transform:uppercase; letter-spacing:.05em; }
.pv-label svg { width:15px; height:15px; }
.pv-wrap { animation:cardIn .6s ease .3s both; }
.pv-doc { background:#fff; color:#111114; border-radius:14px; overflow:hidden; box-shadow:0 18px 50px rgba(0,0,0,.20); }
.pv-head { position:relative; background:#111114; color:#fff; padding:18px 18px 16px; }
.pv-hl { display:flex; align-items:center; gap:10px; }
.pv-mono { width:34px; height:34px; border-radius:8px; background:#c1121f; display:grid; place-items:center; font-weight:800; font-size:13px; }
.pv-co { font-weight:700; font-size:14px; }
.pv-sub { font-size:10.5px; color:#b9b9c2; margin-top:1px; word-break:break-all; }
.pv-word { position:absolute; top:16px; right:18px; font-weight:800; letter-spacing:.12em; font-size:18px; font-family:Georgia,serif; }
.pv-accent { position:absolute; left:0; right:0; bottom:0; height:4px; background:#c1121f; }
.pv-body { padding:16px 18px 18px; }
.pv-row { display:flex; justify-content:space-between; font-size:12.5px; color:#444; padding:5px 0; border-bottom:1px solid #eee; }
.pv-total { display:flex; justify-content:space-between; align-items:center; margin-top:10px; padding:10px 12px; border-radius:8px;
  background:#111114; color:#fff; border-left:4px solid #c1121f; font-weight:700; }
.pv-total span:last-child { font-size:15px; }
.pv-bank { margin-top:14px; padding:11px 12px; border:1px dashed #d9b3b6; border-radius:9px; background:#fdf6f6; font-size:11.5px; color:#444; }
.pv-bank-h { font-size:9.5px; letter-spacing:.1em; color:#c1121f; font-weight:700; margin-bottom:5px; }
.pv-bank div { line-height:1.55; }
.pv-foot { margin-top:12px; text-align:center; font-size:11px; color:#8a8a92; font-style:italic; }

/* floating save bar */
.save-bar { position:sticky; bottom:14px; margin-top:22px; display:flex; align-items:center; justify-content:flex-end; gap:16px;
  padding:12px 16px; border-radius:14px; background:color-mix(in srgb,var(--card) 80%, transparent);
  border:1px solid var(--border); backdrop-filter:blur(12px) saturate(160%); z-index:20; }
.save-hint { font-size:12.5px; color:var(--muted-fg); }
.btn-save { display:inline-flex; align-items:center; gap:9px; border:0; cursor:pointer; color:#fff; font:inherit; font-weight:600;
  font-size:14px; padding:11px 22px; border-radius:11px; background:#c1121f; transition:background .15s,transform .12s; }
.btn-save:hover { background:#a01019; transform:translateY(-1px); }
.btn-save:active { transform:translateY(0); }
.btn-save svg { width:17px; height:17px; }

@media (max-width:980px) { .set-grid { grid-template-columns:1fr; } .set-side { position:static; } }
@media (max-width:560px) { .field-grid, .field-grid.set-3 { grid-template-columns:1fr; } .set-hero { padding:24px; } .mod-grid { grid-template-columns:1fr 1fr; } }
@media (prefers-reduced-motion: reduce) { .set-hero, .btn-save { animation:none; } .set-card, .pv-wrap, .set-mono { animation-duration:.01s; } }

/* Settings repeatable rows (companies / bank accounts) */
.rep-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.rep-del { color:var(--muted-fg); }
.rep-del:hover { color:var(--danger); }

/* Entity cards (companies + bank accounts) */
.ent-card { border:1px solid var(--border); border-radius:10px; overflow:hidden; margin-bottom:10px; background:var(--bg); }
.ent-card:last-child { margin-bottom:0; }
.ent-card.is-primary { border-left:3px solid var(--accent,#c1121f); }
.ent-summary { display:flex; align-items:center; gap:10px; padding:12px 14px; cursor:default; }
.ent-badge { flex-shrink:0; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--accent,#c1121f); background:rgba(193,18,31,.09); border-radius:4px; padding:2px 8px; }
.ent-info { flex:1; min-width:0; }
.ent-name { font-size:14px; font-weight:650; display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ent-name.is-empty { color:var(--muted-fg); font-weight:400; font-style:italic; }
.ent-sub { font-size:12px; color:var(--muted-fg); margin-top:2px; display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ent-fields { border-top:1px solid var(--border); padding:14px; }
.ent-fields-foot { display:flex; justify-content:flex-end; margin-top:10px; }
@media (max-width:560px){ .rep-grid{grid-template-columns:1fr;} }

/* ── Projects grouped by company (accordion) ────────────────────────────────── */
.proj-groups { display: flex; flex-direction: column; gap: 12px; }
.proj-group { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--card); }
.pg-head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 13px 16px; background: none; border: 0; cursor: pointer; font: inherit; color: var(--fg); text-align: left; }
.pg-head:hover { background: var(--card-2); }
.pg-av { width: 34px; height: 34px; border-radius: 9px; background: #6366f1; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.pg-name { font-weight: 650; font-size: 15px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-count { font-size: 12px; color: var(--muted-fg); background: var(--card-2); border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.pg-head svg { width: 18px; height: 18px; color: var(--muted-fg); transition: transform .2s; flex-shrink: 0; }
.proj-group.open .pg-head svg { transform: rotate(180deg); }
.pg-body { display: none; border-top: 1px solid var(--border); padding: 0; }
.proj-group.open .pg-body { display: block; }
/* minimal project rows */
.proj-rows { display: flex; flex-direction: column; }
.proj-row { display: flex; align-items: center; gap: 12px; padding: 9px 16px; border-bottom: 1px solid var(--border); min-width: 0; --pr-color: #6366f1; }
.proj-row:last-child { border-bottom: 0; }
.proj-row:hover { background: var(--card-2); }
.proj-row[data-row-status="planned"]   { --pr-color: #6366f1; }
.proj-row[data-row-status="active"]    { --pr-color: #059669; }
.proj-row[data-row-status="waiting"]   { --pr-color: #d97706; }
.proj-row[data-row-status="completed"] { --pr-color: #0ea5e9; }
.proj-row[data-row-status="cancelled"] { --pr-color: #94a3b8; }
.pr-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pr-color); flex-shrink: 0; }
.pr-info { flex: 1; min-width: 0; }
.pr-title { font-size: 13.5px; font-weight: 600; color: var(--fg); text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-title:hover { color: var(--accent, #c1121f); }
.pr-svc { font-size: 11.5px; color: var(--muted-fg); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-prog { display: flex; align-items: center; gap: 7px; width: 160px; flex-shrink: 0; }
.pr-bar { flex: 1; height: 5px; border-radius: 99px; background: var(--border); overflow: hidden; }
.pr-bar span { display: block; height: 100%; background: var(--pr-color); border-radius: 99px; }
.pr-pct { font-size: 11.5px; color: var(--muted-fg); width: 32px; text-align: right; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.pr-bud { font-size: 13px; font-weight: 600; width: 90px; text-align: right; flex-shrink: 0; }
.proj-row .row-actions { opacity: 0; transition: opacity .12s; flex-shrink: 0; }
.proj-row:hover .row-actions { opacity: 1; }
@media (max-width: 640px) { .pr-prog { display: none; } .pr-bud { display: none; } .proj-row .row-actions { opacity: 1; } }
.proj-card .row-actions { opacity: .5; transition: opacity .12s; flex-shrink: 0; }
.proj-card:hover .row-actions { opacity: 1; }

/* ════════════════════════════════════════════════════════════════════════════
   Expenses — animated
   ════════════════════════════════════════════════════════════════════════════ */
.exp-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:16px; }
.exp-card { position:relative; border:1px solid var(--border); border-radius:16px; padding:18px; overflow:hidden;
  background:var(--card); opacity:0; transform:translateY(12px); animation:cardIn .5s cubic-bezier(.22,1,.36,1) forwards; animation-delay:var(--d,0s); }
.exp-card .ec-ico { width:38px; height:38px; border-radius:11px; display:grid; place-items:center; color:#fff; margin-bottom:12px; }
.exp-card .ec-ico svg { width:19px; height:19px; }
.exp-card .ec-l { font-size:12px; color:var(--muted-fg); }
.exp-card .ec-v { font-size:23px; font-weight:750; letter-spacing:-.02em; margin-top:3px; }
.exp-card.e1 .ec-ico { background:linear-gradient(135deg,#6366f1,#8b5cf6); }
.exp-card.e2 .ec-ico { background:linear-gradient(135deg,#0ea5e9,#2563eb); }
.exp-card.e3 .ec-ico { background:linear-gradient(135deg,#ec4899,#f43f5e); }
.exp-card.e4 .ec-ico { background:linear-gradient(135deg,#f59e0b,#f97316); }

.exp-breakdown { opacity:0; transform:translateY(12px); animation:cardIn .5s cubic-bezier(.22,1,.36,1) forwards; animation-delay:var(--d,0s); }
.cat-bars { display:flex; flex-direction:column; gap:12px; margin-top:6px; }
.cat-bar .cat-top { display:flex; justify-content:space-between; font-size:13px; margin-bottom:5px; }
.cat-name { display:flex; align-items:center; gap:7px; text-transform:capitalize; }
.cat-dot { width:9px; height:9px; border-radius:3px; }
.cat-amt { font-variant-numeric:tabular-nums; color:var(--muted-fg); }
.cat-track { height:8px; border-radius:99px; background:var(--card-2); overflow:hidden; }
.cat-fill { display:block; height:100%; width:0; border-radius:99px; animation:catGrow .9s cubic-bezier(.22,1,.36,1) forwards .2s; }
@keyframes catGrow { to { width:var(--w); } }

.exp-list { display:flex; flex-direction:column; border:1px solid var(--border); border-radius:16px; overflow:hidden; background:var(--card); }
.exp-row { display:flex; align-items:center; gap:14px; padding:13px 16px; border-bottom:1px solid var(--border); transition:background .12s; }
.exp-row:last-child { border-bottom:0; }
.exp-row:hover { background:var(--card-2); }
.exp-cat-dot { width:10px; height:10px; border-radius:4px; flex-shrink:0; }
.exp-main { flex:1; min-width:0; }
.exp-title { font-weight:600; font-size:14px; display:flex; align-items:center; flex-wrap:wrap; }
.exp-sub { font-size:12px; color:var(--muted-fg); margin-top:3px; }
.exp-amt { font-weight:700; font-variant-numeric:tabular-nums; white-space:nowrap; }
.exp-row .row-actions { opacity:.5; transition:opacity .12s; }
.exp-row:hover .row-actions { opacity:1; }

@media (max-width:900px){ .exp-stats { grid-template-columns:repeat(2,1fr); } }
@media (max-width:560px){ .exp-stats { grid-template-columns:1fr; } .exp-row .exp-sub .badge { display:none; } }

/* ════════════════════════════════════════════════════════════════════════════
   Reports — organized & animated
   ════════════════════════════════════════════════════════════════════════════ */
/* reveal helper */
.rp { opacity:0; transform:translateY(14px); animation:cardIn .55s cubic-bezier(.22,1,.36,1) forwards; animation-delay:var(--d,0s); }

/* Revenue vs Expenses chart */
.rp-legend { display:flex; align-items:center; gap:14px; font-size:12px; color:var(--muted-fg); }
.rp-legend i { display:inline-block; width:10px; height:10px; border-radius:3px; margin-right:5px; vertical-align:middle; }
.rvchart { display:flex; align-items:flex-end; gap:10px; padding:18px 4px 0; }
.rvcol { flex:1; display:flex; flex-direction:column; align-items:center; }
.rvbars { display:flex; align-items:flex-end; gap:5px; height:160px; }
.rvbar { width:16px; border-radius:6px 6px 0 0; height:var(--bh); animation:rvGrow .85s cubic-bezier(.22,1,.36,1) forwards; }
.rvbar.rev { background:#1D9E75; }
.rvbar.exp { background:#D85A30; }
@keyframes rvGrow { from { height:0; } to { height:var(--bh); } }
.rvm { font-size:11.5px; color:var(--muted-fg); margin-top:8px; }
.rvp { font-size:11px; font-weight:600; font-variant-numeric:tabular-nums; margin-top:2px; }
.rvp.pos { color:#059669; } .rvp.neg { color:#dc2626; }
[data-theme="dark"] .rvp.pos { color:#34d399; } [data-theme="dark"] .rvp.neg { color:#f87171; }

/* Business at a glance */
.rstat-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-top:6px; flex:1; align-content:center; }
.rstat { padding:16px; border:1px solid var(--border); border-radius:14px; background:var(--card-2); transition:border-color .12s, transform .12s; }
.rstat:hover { border-color:var(--border-strong); transform:translateY(-2px); }
.rs-v { font-size:26px; font-weight:780; letter-spacing:-.02em; font-variant-numeric:tabular-nums; }
.rs-l { font-size:12px; color:var(--muted-fg); margin-top:2px; }
.rstat:nth-child(1) .rs-v { color:#7F77DD; } .rstat:nth-child(2) .rs-v { color:#378ADD; } .rstat:nth-child(3) .rs-v { color:#EF9F27; }
.rstat:nth-child(4) .rs-v { color:#534AB7; } .rstat:nth-child(5) .rs-v { color:#1D9E75; } .rstat:nth-child(6) .rs-v { color:#E24B4A; }

@media (max-width:560px){ .rvbar{width:12px;} }
@media (prefers-reduced-motion: reduce){ .rp{animation-duration:.01s;} .rvbar{animation:none;} }

/* Reports hero */
.rep-hero { position:relative; overflow:hidden; border-radius:22px; padding:26px 30px 24px; color:#fff;
  background:linear-gradient(125deg,#0f172a,#3b1d6e 45%,#1d4ed8 78%,#0ea5e9); background-size:260% 260%;
  animation:heroShift 18s ease infinite; }
.rh-orb { position:absolute; border-radius:50%; filter:blur(22px); opacity:.42; z-index:0; }
.rh-orb.o1 { width:170px; height:170px; background:#f9a8d4; top:-60px; right:60px; animation:floatY 10s ease-in-out infinite; }
.rh-orb.o2 { width:120px; height:120px; background:#7dd3fc; bottom:-55px; right:250px; animation:floatY 8s ease-in-out infinite reverse; }
.rh-orb.o3 { width:90px; height:90px; background:#fde68a; top:24px; left:42%; animation:floatY 12s ease-in-out infinite; }
.rh-head { position:relative; z-index:1; }
.rh-kick { display:inline-flex; align-items:center; gap:7px; font-size:12px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; opacity:.9; }
.rh-kick svg { width:14px; height:14px; }
.rh-title { margin:7px 0 0; font-size:25px; letter-spacing:-.02em; }
.rh-stats { position:relative; z-index:1; display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-top:20px; }
.rh-stat { background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.22); border-radius:14px; padding:14px 16px;
  -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px); animation:cardIn .5s cubic-bezier(.22,1,.36,1) both; }
.rh-stat:nth-child(2){ animation-delay:.06s; } .rh-stat:nth-child(3){ animation-delay:.12s; } .rh-stat:nth-child(4){ animation-delay:.18s; }
.rh-stat.hi { background:rgba(255,255,255,.22); box-shadow:inset 0 0 0 1px rgba(255,255,255,.15); }
.rh-l { font-size:11.5px; opacity:.85; }
.rh-v { font-size:22px; font-weight:780; letter-spacing:-.02em; margin-top:3px; font-variant-numeric:tabular-nums; transition: color .25s, text-shadow .25s; }

/* ── Rep eye toggle ───────────────────────────────────────────────────────── */
.rep-eye { background:none; border:none; cursor:pointer; color:inherit; opacity:.75; padding:2px 5px; border-radius:6px; display:inline-flex; align-items:center; margin-left:4px; vertical-align:middle; transition:opacity .12s; }
.rep-eye:hover { opacity:1; }
.rep-eye svg { width:14px; height:14px; display:block; }
/* veiled state: show the "eye open" icon (click to reveal); hidden state icon hidden */
.rpage:not(.rep-veiled) .rep-eye .eye-show { display:none; }
.rpage.rep-veiled .rep-eye .eye-hide { display:none; }
/* blur numbers */
.rpage.rep-veiled .rh-v,
.rpage.rep-veiled .rm-n { color:transparent; text-shadow:0 0 14px rgba(255,255,255,.7); user-select:none; }

@media (max-width:760px){ .rh-stats { grid-template-columns:repeat(2,1fr); } }
@media (max-width:430px){ .rh-stats { grid-template-columns:1fr; } }
@media (prefers-reduced-motion: reduce){ .rep-hero { animation:none; } .rh-orb { animation:none; } }

/* Reports — unpaid invoice rows (truncate long client names cleanly) */
.list-row.ur { align-items:flex-start; gap:12px; }
.ur-l { display:flex; flex-direction:column; gap:2px; min-width:0; flex:1; }
.ur-co { font-size:12.5px; color:var(--muted-fg); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:100%; }
.ur-r { display:flex; flex-direction:column; align-items:flex-end; gap:5px; flex-shrink:0; text-align:right; }
.ur-amt { white-space:nowrap; }
.ur-r .badge { white-space:nowrap; }

/* ── Reports — reformed section components ──────────────────────────────── */
.rcard { display:flex; flex-direction:column; }

/* bar lists (service category, top clients, lead pipeline) */
.barlist { display:flex; flex-direction:column; gap:16px; flex:1; justify-content:center; }
.brow-top { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:7px; }
.brow-name { display:flex; align-items:center; gap:8px; min-width:0; font-size:13px; font-weight:500; }
.brow-name .tx { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.brow-val { font-size:12.5px; color:var(--muted-fg); font-variant-numeric:tabular-nums; white-space:nowrap; flex-shrink:0; }
.sw { width:10px; height:10px; border-radius:3px; flex-shrink:0; }
.rank { width:21px; height:21px; border-radius:7px; display:grid; place-items:center; font-size:11px; font-weight:700; background:var(--card-2); border:1px solid var(--border); color:var(--muted-fg); flex-shrink:0; }
.rank.r1 { background:#7F77DD; color:#fff; border-color:transparent; }
.brow-track { height:9px; border-radius:99px; background:var(--card-2); overflow:hidden; }
.brow-fill { display:block; height:100%; width:0; border-radius:99px; animation:catGrow .9s cubic-bezier(.22,1,.36,1) forwards .2s; }

/* scrollable lists (unpaid invoices, active projects) */
.rscroll { flex:1; display:flex; flex-direction:column; gap:8px; max-height:392px; overflow-y:auto; padding-right:4px; margin-right:-4px; }
.rscroll .list-row { margin-bottom:0; }
.rscroll::-webkit-scrollbar { width:6px; }
.rscroll::-webkit-scrollbar-thumb { background:var(--border-strong); border-radius:99px; }
.rscroll::-webkit-scrollbar-track { background:transparent; }
.rcount { font-size:12px; font-weight:600; color:var(--muted-fg); background:var(--card-2); border:1px solid var(--border); border-radius:99px; padding:2px 10px; }

/* active project rows with colored progress */
.list-row.pr { align-items:center; gap:14px; }
.pr-l { flex:1; min-width:0; }
.pr-t { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pr-co { color:var(--muted-fg); font-size:12.5px; }
.pbar { display:block; height:7px; border-radius:99px; background:var(--card-2); overflow:hidden; margin-top:9px; }
.pbar > span { display:block; height:100%; width:0; border-radius:99px; background:#7F77DD; animation:catGrow .9s cubic-bezier(.22,1,.36,1) forwards .2s; }
.pbar.done > span { background:#1D9E75; }
.pr-pct { flex-shrink:0; width:42px; text-align:right; font-size:12.5px; font-weight:600; color:var(--muted-fg); font-variant-numeric:tabular-nums; }
.list-row.pr.done .pr-pct { color:#059669; }
[data-theme="dark"] .list-row.pr.done .pr-pct { color:#34d399; }

/* empty states */
.rep-empty { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; gap:7px; padding:34px 12px; color:var(--muted-fg); }
.rep-empty svg { width:34px; height:34px; opacity:.45; margin-bottom:2px; }
.rep-empty .t { font-size:14px; font-weight:600; color:var(--fg); }
.rep-empty .s { font-size:12.5px; }

@media (max-width:900px){ .rstat-grid { grid-template-columns:repeat(3,1fr); } }
@media (max-width:560px){ .rstat-grid { grid-template-columns:repeat(2,1fr); } }
@media (prefers-reduced-motion: reduce){ .brow-fill, .pbar > span { animation:none; width:var(--w); } }

/* ── Reports — page wrapper + colored metric cards ──────────────────────── */
.rpage { display:flex; flex-direction:column; gap:16px; }
.rmetrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.rmetric { background:var(--card-2); border:1px solid var(--border); border-radius:14px; padding:16px; transition:transform .12s; }
.rmetric.tint { background:linear-gradient(135deg,var(--g1),var(--g2)); border:0; color:#fff; }
.rmetric.tint:hover { transform:translateY(-2px); }
.rm-k { font-size:12.5px; color:var(--muted-fg); display:flex; align-items:center; gap:7px; }
.rmetric.tint .rm-k { color:rgba(255,255,255,.88); }
.rm-n { font-size:25px; font-weight:780; letter-spacing:-.02em; margin-top:5px; font-variant-numeric:tabular-nums; transition: color .25s, text-shadow .25s; }

.rmetrics { opacity:0; transform:translateY(12px); animation:cardIn .55s cubic-bezier(.22,1,.36,1) forwards; animation-delay:var(--d,0s); }

@media (max-width:760px){ .rmetrics { grid-template-columns:repeat(2,1fr); } }
@media (max-width:440px){ .rmetrics { grid-template-columns:1fr; } }
@media (prefers-reduced-motion: reduce){ .rmetrics { animation-duration:.01s; } }

/* ── Reports — distinct section structures ──────────────────────────────── */
/* Donut (service category) */
.donut-wrap { display:flex; align-items:center; gap:22px; flex:1; }
.donut { width:132px; height:132px; border-radius:50%; flex-shrink:0; position:relative; animation:donutIn .7s ease both .15s; }
@keyframes donutIn { from { transform:rotate(-18deg) scale(.92); opacity:0; } to { transform:none; opacity:1; } }
.donut-hole { position:absolute; inset:27px; background:var(--card); border-radius:50%; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.donut-tot { font-size:15px; font-weight:780; letter-spacing:-.01em; }
.donut-lbl { font-size:10px; color:var(--muted-fg); text-transform:uppercase; letter-spacing:.08em; margin-top:1px; }
.donut-legend { flex:1; min-width:0; display:flex; flex-direction:column; gap:11px; }
.dl-row { display:flex; align-items:center; gap:9px; font-size:13px; }
.dl-dot { width:10px; height:10px; border-radius:3px; flex-shrink:0; }
.dl-name { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-transform:capitalize; }
.dl-val { color:var(--muted-fg); font-variant-numeric:tabular-nums; font-weight:600; flex-shrink:0; }

/* Leaderboard (top clients) */
.lb { display:flex; flex-direction:column; flex:1; justify-content:center; }
.lb-row { display:flex; align-items:center; gap:12px; padding:10px 0; border-bottom:1px solid var(--border); color:inherit; }
.lb-row:last-child { border-bottom:0; }
.lb-rank { width:14px; font-size:12px; font-weight:700; color:var(--muted-fg); font-variant-numeric:tabular-nums; text-align:center; flex-shrink:0; }
.lb-av { width:34px; height:34px; border-radius:50%; display:grid; place-items:center; font-size:13px; font-weight:700; color:#fff; flex-shrink:0; background:#7F77DD; }
.lb-1 { background:#EF9F27; } .lb-2 { background:#888780; } .lb-3 { background:#D85A30; }
.lb-name { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:500; font-size:13.5px; }
.lb-val { font-weight:700; font-size:14px; font-variant-numeric:tabular-nums; white-space:nowrap; flex-shrink:0; }
.lb-row:hover .lb-name { color:var(--fg); }

/* Status-stripe cards (unpaid invoices) */
.ui-list { display:flex; flex-direction:column; gap:10px; flex:1; }
.ui-row { display:flex; gap:12px; padding:12px 14px; border:1px solid var(--border); border-radius:12px; color:inherit; transition:border-color .12s, transform .12s; }
.ui-row:hover { border-color:var(--border-strong); transform:translateX(2px); }
.ui-stripe { width:4px; border-radius:99px; flex-shrink:0; }
.ui-body { flex:1; min-width:0; display:flex; flex-direction:column; gap:5px; }
.ui-top { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.ui-no { font-weight:700; font-size:14px; }
.ui-amt { font-weight:700; font-size:14px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.ui-bot { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.ui-co { flex:1; min-width:0; color:var(--muted-fg); font-size:12.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ui-bot .badge { flex-shrink:0; white-space:nowrap; }

/* Progress rings (active projects) */
.rscroll.tight { gap:0; }
.ring-row { display:flex; align-items:center; gap:14px; padding:11px 2px; border-bottom:1px solid var(--border); color:inherit; }
.ring-row:last-child { border-bottom:0; }
.ring-info { flex:1; min-width:0; }
.ring-t { display:block; font-weight:500; font-size:13.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ring-co { display:block; color:var(--muted-fg); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; margin-top:2px; }
.ring { width:46px; height:46px; border-radius:50%; flex-shrink:0; display:grid; place-items:center; position:relative;
  background:conic-gradient(var(--rc) calc(var(--p) * 1%), var(--card-2) 0); }
.ring::before { content:""; position:absolute; inset:5px; border-radius:50%; background:var(--card); }
.ring span { position:relative; z-index:1; font-size:11px; font-weight:700; font-variant-numeric:tabular-nums; }
.ring-row:hover .ring-t { color:var(--fg); }

@media (prefers-reduced-motion: reduce){ .donut { animation:none; } }

/* ── Dropdown open animation (pop + staggered items) ────────────────────── */
@keyframes ddPop { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes ddItem { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.dropdown.open .dropdown-menu:not(.as-sheet) { animation: ddPop .18s cubic-bezier(.16,1,.3,1); transform-origin: top right; }
.dropdown.open .dropdown-menu:not(.as-sheet) > * { animation: ddItem .28s ease both; }
.dropdown.open .dropdown-menu:not(.as-sheet) > *:nth-child(1) { animation-delay: .03s; }
.dropdown.open .dropdown-menu:not(.as-sheet) > *:nth-child(2) { animation-delay: .06s; }
.dropdown.open .dropdown-menu:not(.as-sheet) > *:nth-child(3) { animation-delay: .09s; }
.dropdown.open .dropdown-menu:not(.as-sheet) > *:nth-child(4) { animation-delay: .12s; }
.dropdown.open .dropdown-menu:not(.as-sheet) > *:nth-child(5) { animation-delay: .15s; }
.dropdown.open .dropdown-menu:not(.as-sheet) > *:nth-child(6) { animation-delay: .18s; }
.dropdown.open .dropdown-menu:not(.as-sheet) > *:nth-child(n+7) { animation-delay: .2s; }
@media (prefers-reduced-motion: reduce) {
  .dropdown.open .dropdown-menu:not(.as-sheet),
  .dropdown.open .dropdown-menu:not(.as-sheet) > * { animation: none; }
}

/* ════════════════════════════════════════════════════════════════════════════
   Sidebar — animated, collapsible rail
   ════════════════════════════════════════════════════════════════════════════ */
.brand { position: relative; overflow: hidden; }
.brand-name { white-space: nowrap; transition: opacity .16s ease, max-width .24s ease; max-width: 160px; }

/* nav items: icon wrap + label, micro-interactions */
.nav a { position: relative; }
.nav .nav-ic { display: inline-grid; place-items: center; width: 16px; height: 16px; flex-shrink: 0; transition: transform .15s ease; }
.nav .nav-ic svg { width: 16px; height: 16px; }
.nav a:hover .nav-ic { transform: translateX(2px); }
.nav .nav-label { white-space: nowrap; transition: opacity .14s ease; }

/* animated active indicator bar */
.nav a.active .nav-ic { transform: none; }
.nav a.active::before { content: ""; position: absolute; left: -1px; top: 50%; width: 3px; height: 0; border-radius: 0 3px 3px 0; background: #7F77DD; transform: translateY(-50%); animation: navBar .26s cubic-bezier(.22,1,.36,1) forwards; }
@keyframes navBar { to { height: 18px; } }

/* staggered entrance */
@keyframes navIn { from { opacity: 0; transform: translateX(-9px); } to { opacity: 1; transform: none; } }
.nav a { animation: navIn .42s cubic-bezier(.22,1,.36,1) both; animation-delay: calc(var(--i, 0) * .028s); }
/* footer */
.sidebar-foot .foot-mini { display: none; }

@media (prefers-reduced-motion: reduce) {
  .nav a { animation: none; }
  .nav a.active::before { animation: none; height: 18px; }
  .brand-name, .nav-label, .nav-ic { transition: none; }
}

/* ════════════════════════════════════════════════════════════════════════════
   Time Tracking — live timer, project totals, history
   ════════════════════════════════════════════════════════════════════════════ */
.tt-timer { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-bottom: 16px; }
.tt-clock { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 44px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; line-height: 1; flex-shrink: 0; }
.tt-clock.live { color: #1D9E75; }

/* shared control row: idle + running use the same layout, so the button keeps
   its place and just flips Start <-> Stop */
.tt-controls { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 260px; flex-wrap: wrap; }
.tt-fields { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 200px; flex-wrap: wrap; }
.tt-fields-run { gap: 12px; }
.tt-fields .tt-desc { flex: 1; min-width: 180px; }
.tt-fields .tt-proj-sel { width: 200px; flex-shrink: 0; }
.tt-run-desc { font-size: 15px; }
.tt-bill { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted-fg); white-space: nowrap; cursor: pointer; }
.tt-bill input { width: 15px; height: 15px; }
.tt-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* the single toggle button */
.tt-toggle { min-width: 116px; justify-content: center; color: #fff; border: 0; font-weight: 600; }
.tt-toggle.start { background: #1D9E75; }
.tt-toggle.start:hover { background: #178a64; }
.tt-toggle.stop { background: #E24B4A; }
.tt-toggle.stop:hover { background: #c93b3a; }
.tt-discard { color: var(--muted-fg); }
.tt-discard:hover { color: var(--danger); }

/* running pulse dot */
.tt-pulse { width: 11px; height: 11px; border-radius: 50%; background: #1D9E75; position: relative; flex-shrink: 0; }
.tt-pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #1D9E75; animation: ttPulse 1.6s ease-out infinite; }
@keyframes ttPulse { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(2.8); opacity: 0; } }

/* project totals bars */
.ppick.tt-filter-pick { width: 210px; flex-shrink: 0; }
.ppick.tt-filter-pick .ppick-btn { height: 34px; padding: 0 8px; }
.ppick.tt-filter-pick .ppick-menu { min-width: 220px; }
.tt-proj { display: block; padding: 11px 0; border-bottom: 1px solid var(--border); color: inherit; }
.tt-proj:last-child { border-bottom: 0; }
.tt-proj:hover .tt-proj-name { color: var(--fg); }
.tt-proj-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.tt-proj-name { font-size: 13.5px; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-proj-val { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; flex-shrink: 0; }
.tt-proj-val .muted { font-weight: 400; }
.tt-proj-track { height: 8px; border-radius: 99px; background: var(--card-2); overflow: hidden; }
.tt-proj-fill { display: block; height: 100%; width: 0; border-radius: 99px; background: #7F77DD; animation: catGrow .8s cubic-bezier(.22,1,.36,1) forwards .15s; }

/* filter clear chip */
.tt-clear { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted-fg); border: 1px solid var(--border); border-radius: 99px; padding: 3px 10px; }
.tt-clear:hover { color: var(--danger); border-color: var(--danger); }
.tt-clear svg { width: 13px; height: 13px; }

/* history: day groups + entries */
.tt-day { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 0 7px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.tt-day:first-of-type { padding-top: 4px; }
.tt-day-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted-fg); }
.tt-day-total { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tt-entry { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.tt-entry-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); flex-shrink: 0; }
.tt-entry-dot.bill { background: #1D9E75; }
.tt-entry-main { flex: 1; min-width: 0; }
.tt-entry-desc { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-entry-sub { font-size: 12px; color: var(--muted-fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.tt-entry-dur { font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tt-entry-menu { flex-shrink: 0; }

/* manual form duration */
.dur-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dur-box { display: inline-flex; align-items: center; gap: 6px; }
.dur-box .input { width: 84px; }
.dur-box span { color: var(--muted-fg); font-size: 13px; }
.dur-quick { display: flex; gap: 6px; margin-left: 4px; }
.dur-quick button { font: inherit; font-size: 12.5px; padding: 6px 11px; border: 1px solid var(--border); border-radius: 8px; background: var(--card-2); color: var(--muted-fg); cursor: pointer; transition: border-color .12s, color .12s; }
.dur-quick button:hover { color: var(--fg); border-color: var(--border-strong); }

@media (max-width: 640px) {
  .tt-clock { font-size: 36px; }
  .tt-fields .tt-proj-sel { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .tt-pulse::after, .tt-proj-fill { animation: none; } .tt-proj-fill { width: var(--w); } }

/* ── Elegant project picker (custom select) ─────────────────────────────── */
.ppick { position: relative; width: 100%; }
.tt-fields .ppick { width: 220px; flex-shrink: 0; }
.ppick-btn { display: flex; align-items: center; gap: 8px; width: 100%; height: 40px; padding: 0 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--card-2); color: var(--fg); cursor: pointer; font: inherit; transition: border-color .12s, box-shadow .12s, background .12s; }
.ppick-btn:hover { border-color: var(--border-strong); }
.ppick.open .ppick-btn { border-color: #7F77DD; box-shadow: 0 0 0 3px rgba(127,119,221,.18); background: var(--card); }
.ppick-ic { display: grid; place-items: center; color: var(--muted-fg); flex-shrink: 0; }
.ppick-ic svg { width: 16px; height: 16px; }
.ppick-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; font-size: 13.5px; color: var(--muted-fg); }
.ppick.has-val .ppick-label { color: var(--fg); font-weight: 500; }
.ppick-caret { display: grid; place-items: center; color: var(--muted-fg); flex-shrink: 0; transition: transform .18s ease; }
.ppick-caret svg { width: 15px; height: 15px; }
.ppick.open .ppick-caret { transform: rotate(180deg); }

.ppick-menu { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 50; min-width: 240px; background: var(--card); border: 1px solid var(--border-strong); border-radius: 12px; padding: 6px; display: none; }
.ppick.open .ppick-menu { display: block; animation: ddPop .16s cubic-bezier(.16,1,.3,1); transform-origin: top; }
.ppick-search { position: relative; margin-bottom: 6px; }
.ppick-search svg { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--muted-fg); pointer-events: none; }
.ppick-search input { width: 100%; height: 34px; padding: 0 10px 0 30px; border: 1px solid var(--border); border-radius: 8px; background: var(--card-2); font: inherit; font-size: 13px; color: var(--fg); }
.ppick-search input:focus { outline: none; border-color: #7F77DD; }
.ppick-list { max-height: 264px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.ppick-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: 8px; background: none; cursor: pointer; font: inherit; text-align: left; color: var(--fg); }
.ppick-opt:hover { background: var(--card-2); }
.ppick-opt.sel { background: color-mix(in srgb, #7F77DD 13%, transparent); }
.ppick-av { width: 28px; height: 28px; border-radius: 7px; background: #7F77DD; color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.ppick-none { width: 28px; height: 28px; border-radius: 7px; background: var(--card-2); border: 1px solid var(--border); color: var(--muted-fg); display: grid; place-items: center; font-size: 14px; flex-shrink: 0; }
.ppick-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ppick-name { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ppick-sub { font-size: 12px; color: var(--muted-fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.ppick-check { color: #7F77DD; flex-shrink: 0; opacity: 0; display: grid; place-items: center; }
.ppick-check svg { width: 16px; height: 16px; }
.ppick-opt.sel .ppick-check { opacity: 1; }
.ppick-empty { padding: 14px 8px; text-align: center; color: var(--muted-fg); font-size: 13px; }
@media (max-width: 640px) { .tt-fields .ppick { width: 100%; } }

/* ── Time history: multi-select + bulk bar ──────────────────────────────── */
.tt-head-right { display: flex; align-items: center; gap: 10px; }
.tt-check { display: none; width: 17px; height: 17px; flex-shrink: 0; cursor: pointer; accent-color: #7F77DD; }
#ttHistory.selecting .tt-check { display: inline-block; }
#ttHistory.selecting .tt-entry { cursor: pointer; border-radius: 8px; padding-left: 8px; padding-right: 8px; margin: 0 -8px; }
#ttHistory.selecting .tt-entry:hover { background: var(--card-2); }
.tt-bulk { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 10px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--card-2); }
.tt-bulk-all { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.tt-bulk-all input { width: 16px; height: 16px; accent-color: #7F77DD; }
.tt-bulk-move { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 230px; }
.tt-bulk-move .ppick { width: 190px; }
.tt-bulk-del { color: var(--danger); border-color: var(--danger); }
.tt-bulk-del:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

/* Login activity */
.la-ip { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; font-variant-numeric: tabular-nums; }

/* ── Client list: square company logo + contact-name flag ───────────────── */
.cl-logo { width: 38px; height: 38px; border-radius: 9px; flex-shrink: 0; display: grid; place-items: center; overflow: hidden;
  background: var(--card-2); border: 1px solid var(--border); color: var(--muted-fg); font-size: 12px; font-weight: 700; }
.cl-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cl-cname { display: inline-flex; align-items: center; gap: 6px; }
.cl-cflag { display: inline-flex; flex-shrink: 0; }
.cl-cflag .flag { width: 15px; height: 15px; vertical-align: middle; }

/* ── Logo upload (client form) ──────────────────────────────────────────── */
.logo-up { display: flex; align-items: center; gap: 14px; }
.logo-prev { width: 56px; height: 56px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center; overflow: hidden;
  background: var(--card-2); border: 1px solid var(--border); }
.logo-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.logo-ph { font-size: 16px; font-weight: 700; color: var(--muted-fg); }

/* ── Dashboard revenue privacy toggle ───────────────────────────────────── */
.hero-figure { display: flex; align-items: center; gap: 10px; }
.hf-num.masked { letter-spacing: .12em; }
.hf-eye { width: 34px; height: 34px; flex-shrink: 0; border: 0; border-radius: 9px; cursor: pointer; display: grid; place-items: center;
  background: rgba(255,255,255,.16); color: #fff; transition: background .14s, transform .12s; }
.hf-eye:hover { background: rgba(255,255,255,.3); }
.hf-eye:active { transform: scale(.92); }
.hf-eye svg { width: 18px; height: 18px; }

/* ════════════════════════════════════════════════════════════════════════════
   Client show — website & credentials section
   ════════════════════════════════════════════════════════════════════════════ */
.cs-site { padding: 4px 0 2px; }
.cs-site-head { display: flex; align-items: center; gap: 10px; }
.cs-av { width: 32px; height: 32px; border-radius: 8px; background: var(--card-2); border: 1px solid var(--border);
  display: grid; place-items: center; color: var(--muted-fg); flex-shrink: 0; }
.cs-av svg { width: 16px; height: 16px; }
.cs-meta { flex: 1; min-width: 0; }
.cs-name { font-weight: 650; font-size: 14px; color: var(--fg); text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-name:hover { color: var(--accent, #c1121f); }
.cs-domain { display: block; font-size: 12px; margin-top: 1px; }

/* ════════════════════════════════════════════════════════════════════════════
   Reports — price templates
   ════════════════════════════════════════════════════════════════════════════ */
.pt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.pt-group { display: flex; flex-direction: column; gap: 4px; }
.pt-cat { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; margin-bottom: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.pt-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 0;
  border-bottom: 1px solid var(--border); }
.pt-row:last-child { border-bottom: 0; }
.pt-name { font-size: 13.5px; color: var(--fg); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-price { font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; flex-shrink: 0; }
.pt-price small { font-size: 10px; font-weight: 500; color: var(--muted-fg); margin-left: 2px; }
@media (max-width: 600px) { .pt-grid { grid-template-columns: 1fr; } }

/* ════════════════════════════════════════════════════════════════════════════
   Mobile improvements — Projects
   ════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .pg-head { padding: 11px 13px; gap: 9px; }
  .pg-av { width: 30px; height: 30px; font-size: 12px; border-radius: 7px; }
  .pg-name { font-size: 14px; }
  .pg-count { font-size: 11px; padding: 2px 8px; }
  .pg-body { padding: 10px 10px; }
  .proj-card { padding: 12px 13px; }
  .pc-title { font-size: 13.5px; }
  /* Keep row-actions always visible on touch */
  .proj-card .row-actions { opacity: 1; }
}

/* ════════════════════════════════════════════════════════════════════════════
   Mobile improvements — Clients list
   ════════════════════════════════════════════════════════════════════════════ */
/* At 560px the money cols are hidden; show a compact badge under the company name instead */
@media (max-width: 560px) {
  .cl-co { position: relative; }
  .cl-co .cl-money-badge { display: flex; gap: 10px; margin-top: 4px; font-size: 11.5px; }
  .cl-money-badge .cl-rec { color: hsl(var(--success, 150 60% 35%)); font-weight: 600; }
  .cl-money-badge .cl-pay.due { color: hsl(var(--danger, 355 75% 45%)); font-weight: 600; }
}
@media (min-width: 561px) { .cl-money-badge { display: none !important; } }

/* ════════════════════════════════════════════════════════════════════════════
   Mobile improvements — Invoices table
   ════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 680px) {
  /* Hide Issue + Balance columns; keep Number, Client, Due, Total, Status, Actions */
  .data thead th:nth-child(3),
  .data tbody td:nth-child(3),
  .data thead th:nth-child(6),
  .data tbody td:nth-child(6) { display: none; }
}
@media (max-width: 480px) {
  /* Further collapse: hide Due, show only Number, Client, Total, Status, Actions */
  .data thead th:nth-child(4),
  .data tbody td:nth-child(4) { display: none; }
}

/* ════════════════════════════════════════════════════════════════════════════
   Mobile improvements — Calendar legend
   ════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .cal-legend { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; gap: 6px; }
  .leg-chip { flex-shrink: 0; font-size: 11.5px; padding: 4px 10px; }
  /* Month grid: show event text on phones (override the dots-only rule with a label) */
  .cal-chip { padding: 2px 5px; gap: 3px; border: 1px solid color-mix(in srgb, var(--c) 25%, transparent) !important; background: color-mix(in srgb, var(--c) 12%, transparent) !important; }
  .cal-chip .ctxt { display: block; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52px; }
}

/* ════════════════════════════════════════════════════════════════════════════
   Mobile improvements — Invoice/Quotes actions row
   ════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  /* Make action buttons always visible (not hover-only) on touch */
  .row-actions { opacity: 1 !important; }
  /* Reduce button padding for tighter rows */
  .btn.btn-icon { width: 30px; height: 30px; }
}

/* ════════════════════════════════════════════════════════════════════════════
   Logo SVG swap — dark logo on light theme, light logo on dark theme
   ════════════════════════════════════════════════════════════════════════════ */
/* Dark theme (default): show white logo, hide black logo */
html[data-theme="dark"]  .brand-logo-dark  { display: none; }
/* Light theme: show black logo, hide white logo */
html:not([data-theme="dark"]) .brand-logo-light { display: none; }

/* Sidebar logo */
.brand-logo { height: 22px; width: auto; max-width: 148px; object-fit: contain; display: block; }
.sidebar .brand { justify-content: flex-start; }

/* Login page left panel logo */
.lg-logo-img { height: 40px; width: auto; max-width: 200px; object-fit: contain; }

/* Login page right card (mobile) logo */
.lg-brand-sm { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.lg-brand-sm .brand-logo { height: 22px; }

/* ════════════════════════════════════════════════════════════════════════════
   Settings — company logo upload
   ════════════════════════════════════════════════════════════════════════════ */
.co-logo-thumb { height: 28px; width: auto; max-width: 80px; object-fit: contain; border-radius: 4px; flex-shrink: 0; }
.co-logo-field { padding: 10px 0 4px; display: flex; flex-direction: column; gap: 6px; }
.co-logo-label { font-size: 12px; font-weight: 600; color: var(--fg); }
/* Logo zone */
.co-logo-zone { border: 1.5px dashed var(--border); border-radius: 8px; overflow: hidden; background: var(--card); }
.co-logo-zone.has-logo { border-style: solid; }
.co-logo-zone.pending { border-color: #16a34a; border-style: solid; }
.co-logo-file { display: none !important; }
/* Empty upload state */
.co-logo-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px 16px; gap: 5px; cursor: pointer; text-align: center; transition: background .15s; }
.co-logo-empty:hover, .co-logo-empty:focus-visible { background: var(--hover); outline: none; }
.co-logo-empty-ico { width: 26px; height: 26px; color: var(--muted-fg); margin-bottom: 2px; }
.co-logo-empty-text { font-size: 13px; font-weight: 600; color: var(--fg); }
.co-logo-hint { font-size: 11px; color: var(--muted-fg); }
/* Existing logo state */
.co-logo-existing { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.co-logo-img { height: 40px; max-width: 130px; object-fit: contain; border-radius: 4px; background: var(--bg); padding: 4px; flex-shrink: 0; }
.co-logo-meta { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.co-logo-filename { font-size: 11.5px; color: var(--muted-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-logo-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.co-logo-remove-lbl { font-size: 12px; color: var(--muted-fg); cursor: pointer; display: flex; align-items: center; gap: 4px; }
/* Pending state — new file picked, not yet saved */
.co-logo-pending { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: rgba(22,163,74,.07); }
.co-logo-pending-img { height: 40px; max-width: 130px; object-fit: contain; border-radius: 4px; background: var(--bg); padding: 4px; flex-shrink: 0; }
.co-logo-pending-name { font-size: 11.5px; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; display: block; }
.co-logo-ready-badge { font-size: 11px; font-weight: 700; color: #16a34a; letter-spacing: .02em; }
