/* XIG-CRM — design system */
:root {
  --bg: #f3f5f9;
  --card: #ffffff;
  --ink: #101828;
  --ink-2: #475467;
  --ink-3: #98a2b3;
  --line: #e4e7ec;
  --accent: #4f46e5;
  --accent-soft: #eef0fe;
  --accent-ink: #3730a3;
  --green: #067647; --green-bg: #e7f6ef;
  --amber: #b54708; --amber-bg: #fdf2e3;
  --red: #b42318;   --red-bg: #fdebe9;
  --blue: #175cd3;  --blue-bg: #e8f1fd;
  --gray: #475467;  --gray-bg: #eef1f5;
  --sidebar: #101828;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  --shadow-lg: 0 12px 32px -8px rgba(16,24,40,.22);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.25; }
.boot { padding: 60px; text-align: center; color: var(--ink-3); }

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1100px 500px at 20% -10%, #312e81 0%, #101828 55%);
  padding: 24px;
}
.login-card {
  width: 100%; max-width: 400px; background: var(--card); border-radius: 20px;
  box-shadow: var(--shadow-lg); padding: 34px 30px;
}
.login-logo { display:flex; align-items:center; gap:12px; margin-bottom: 6px; }
.login-logo .mark {
  width: 44px; height: 44px; border-radius: 12px; background: var(--accent);
  color: #fff; font-weight: 800; font-size: 24px; display:flex; align-items:center; justify-content:center;
}
.login-sub { color: var(--ink-2); margin-bottom: 22px; }
.demo-hint {
  margin-top: 18px; padding: 12px 14px; background: var(--accent-soft);
  border-radius: 10px; font-size: 13px; color: var(--accent-ink);
}
.demo-hint code { background: #fff; padding: 1px 6px; border-radius: 6px; }

/* ---------- App shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; flex: 0 0 240px; background: var(--sidebar); color: #cdd5e0;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar .brand {
  display: flex; align-items: center; gap: 10px; padding: 20px 18px 14px; color: #fff;
}
.sidebar .brand .mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color:#fff;
  font-weight: 800; display:flex; align-items:center; justify-content:center;
}
.sidebar .brand b { font-size: 16px; }
.sidebar .brand small { display:block; font-size: 11px; color:#94a3b8; font-weight: 400; }
.nav { padding: 6px 10px; overflow-y: auto; flex: 1; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; margin: 2px 0;
  border-radius: 9px; color: #cdd5e0; font-weight: 500; font-size: 14px;
}
.nav a:hover { background: rgba(255,255,255,.07); text-decoration: none; }
.nav a.active { background: var(--accent); color: #fff; }
.nav a .ico { width: 20px; text-align: center; font-size: 16px; }
.nav a .badge {
  margin-left: auto; background: var(--red); color: #fff; font-size: 11px;
  border-radius: 99px; padding: 1px 7px; font-weight: 700;
}
.nav .nav-sep { margin: 10px 12px 4px; font-size: 11px; letter-spacing: .08em; color: #64748b; text-transform: uppercase; }
.sidebar .who { padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.09); font-size: 13px; }
.sidebar .who b { color: #fff; display: block; }
.sidebar .who a { color: #94a3b8; font-size: 12px; }

.main { flex: 1; min-width: 0; padding: 26px 30px 90px; }
.topbar { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.topbar h1 { font-size: 24px; margin: 0; }
.topbar .spacer { flex: 1; }
.crumb { color: var(--ink-3); font-size: 13px; margin-bottom: 4px; }
.crumb a { color: var(--ink-2); }

/* ---------- Cards / grid ---------- */
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; border: 1px solid var(--line);
}
.card + .card, .grid + .card, .card + .grid { margin-top: 16px; }
.card h2 { font-size: 16px; display:flex; align-items:center; gap:8px; }
.card h2 .right { margin-left: auto; font-weight: 400; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.kpi { padding: 16px 18px; }
.kpi .label { font-size: 12.5px; color: var(--ink-2); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.kpi .value { font-size: 26px; font-weight: 800; margin-top: 2px; }
.kpi .sub { font-size: 12.5px; color: var(--ink-3); }
.kpi.alert .value { color: var(--red); }
.kpi.good .value { color: var(--green); }

/* ---------- Tables & lists ---------- */
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--ink-2); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover { background: #f8fafc; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { color: var(--ink-3); text-align: center; padding: 26px 10px; }

.rowlist .row {
  display: flex; gap: 12px; align-items: center; padding: 12px 2px;
  border-bottom: 1px solid var(--line); cursor: pointer;
}
.rowlist .row:last-child { border-bottom: 0; }
.rowlist .row:hover { background: #f8fafc; }
.rowlist .row .grow { flex: 1; min-width: 0; }
.rowlist .row .title { font-weight: 600; }
.rowlist .row .sub { font-size: 13px; color: var(--ink-2); }

/* ---------- Pills & badges ---------- */
.pill {
  display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12px;
  font-weight: 700; white-space: nowrap;
}
.pill.green { background: var(--green-bg); color: var(--green); }
.pill.amber { background: var(--amber-bg); color: var(--amber); }
.pill.red { background: var(--red-bg); color: var(--red); }
.pill.blue { background: var(--blue-bg); color: var(--blue); }
.pill.gray { background: var(--gray-bg); color: var(--gray); }
.pill.indigo { background: var(--accent-soft); color: var(--accent-ink); }
.money { font-variant-numeric: tabular-nums; font-weight: 700; }
.money.red { color: var(--red); }
.money.green { color: var(--green); }

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 10px;
  background: var(--accent); color: #fff; border: 0; font-weight: 600; font-size: 14px;
  cursor: pointer; font-family: inherit; text-decoration: none !important;
}
.btn:hover { filter: brightness(1.08); }
.btn.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.secondary:hover { background: #f8fafc; filter: none; }
.btn.danger { background: var(--red); }
.btn.sm { padding: 5px 11px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .55; cursor: default; }

label.f { display: block; margin-bottom: 13px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
label.f input, label.f select, label.f textarea {
  display: block; width: 100%; margin-top: 5px; padding: 9px 12px; font: inherit;
  border: 1px solid #d0d5dd; border-radius: 9px; background: #fff; color: var(--ink);
}
label.f textarea { min-height: 84px; resize: vertical; }
label.f input:focus, label.f select:focus, label.f textarea:focus {
  outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent);
}
label.check { display: flex; gap: 9px; align-items: center; font-size: 14px; margin: 10px 0; cursor: pointer; }
label.check input { width: 17px; height: 17px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }
.hint { font-size: 12.5px; color: var(--ink-3); font-weight: 400; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(16,24,40,.55); z-index: 50;
  display: flex; align-items: flex-start; justify-content: center; padding: 4vh 14px;
  overflow-y: auto; backdrop-filter: blur(2px);
}
.modal {
  background: #fff; border-radius: 16px; width: 100%; max-width: 560px;
  box-shadow: var(--shadow-lg); animation: pop .14s ease-out; margin-bottom: 6vh;
}
.modal.wide { max-width: 780px; }
@keyframes pop { from { transform: translateY(8px) scale(.985); opacity: .6; } }
.modal header {
  display: flex; align-items: center; padding: 18px 22px 0; font-size: 17px; font-weight: 700;
}
.modal header .x {
  margin-left: auto; border: 0; background: var(--gray-bg); width: 30px; height: 30px;
  border-radius: 8px; font-size: 15px; cursor: pointer; color: var(--ink-2);
}
.modal .modal-body { padding: 16px 22px 22px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }

/* ---------- Toast ---------- */
#toast-root { position: fixed; bottom: calc(20px + var(--safe-bottom)); left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 11px;
  box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 500; max-width: 86vw;
  animation: pop .15s ease-out;
}
.toast.err { background: var(--red); }
.toast.ok { background: var(--green); }

/* ---------- Chat ---------- */
.chat-box { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; padding: 4px 2px; }
.bubble {
  max-width: 78%; padding: 9px 14px; border-radius: 16px; font-size: 14.5px;
  white-space: pre-wrap; word-break: break-word;
}
.bubble.me { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 5px; }
.bubble.them { align-self: flex-start; background: var(--gray-bg); border-bottom-left-radius: 5px; }
.bubble .meta { display: block; font-size: 11px; opacity: .75; margin-top: 3px; }
.chat-send { display: flex; gap: 9px; margin-top: 12px; }
.chat-send textarea {
  flex: 1; padding: 10px 13px; border: 1px solid #d0d5dd; border-radius: 11px;
  font: inherit; resize: none; min-height: 44px; max-height: 130px;
}

/* ---------- Photos / attachments ---------- */
.photo-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.photo-grid a img, .photo-grid .ph {
  width: 96px; height: 96px; object-fit: cover; border-radius: 10px;
  border: 1px solid var(--line); display: block;
}
.photo-grid .ph { display:flex; align-items:center; justify-content:center; background: var(--gray-bg); font-size: 11px; color: var(--ink-2); text-align: center; padding: 6px; }

/* ---------- Signature pad ---------- */
.sigpad { border: 2px dashed #c7cdd8; border-radius: 12px; background: #fbfcfe; touch-action: none; width: 100%; }
.sig-img { max-width: 220px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

/* ---------- Document body ---------- */
.docpaper {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 28px 30px;
  font-size: 15px; line-height: 1.65;
}
.docpaper h2 { font-size: 21px; } .docpaper h3 { font-size: 15px; margin-top: 1.2em; }

/* ---------- Charts ---------- */
.chart-wrap { overflow-x: auto; }
.bars { display: flex; gap: 14px; align-items: flex-end; height: 150px; padding-top: 8px; min-width: 320px; }
.bars .bgroup { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 44px; }
.bars .duo { display: flex; gap: 4px; align-items: flex-end; height: 116px; width: 100%; justify-content: center; }
.bars .bar { width: 16px; border-radius: 5px 5px 2px 2px; min-height: 2px; }
.bars .bar.in { background: var(--accent); }
.bars .bar.out { background: #f97066; }
.bars .blabel { font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--ink-2); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }

/* ---------- Tabs / filters ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs button {
  border: 1px solid var(--line); background: #fff; padding: 7px 14px; border-radius: 99px;
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink-2); cursor: pointer;
}
.tabs button.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- Mobile ---------- */
.bottom-nav { display: none; }
.menu-btn { display: none; }
@media (max-width: 920px) {
  .sidebar { display: none; }
  .main { padding: 16px 14px 96px; }
  .grid.cols-4 { grid-template-columns: 1fr 1fr; }
  .grid.cols-3 { grid-template-columns: 1fr 1fr; }
  .grid.cols-2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .topbar h1 { font-size: 20px; }
  .bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
    background: #fff; border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + var(--safe-bottom));
  }
  .bottom-nav a {
    flex: 1; text-align: center; font-size: 10.5px; color: var(--ink-2); font-weight: 600;
    padding: 4px 2px; border-radius: 9px; position: relative;
  }
  .bottom-nav a .ico { display: block; font-size: 20px; margin-bottom: 1px; }
  .bottom-nav a.active { color: var(--accent); }
  .bottom-nav a:hover { text-decoration: none; }
  .bottom-nav a .dot {
    position: absolute; top: 2px; right: 22%; width: 8px; height: 8px;
    border-radius: 99px; background: var(--red);
  }
  .menu-btn {
    display: inline-flex; border: 1px solid var(--line); background: #fff; border-radius: 9px;
    padding: 8px 11px; font-size: 16px; cursor: pointer;
  }
  .drawer-overlay { position: fixed; inset: 0; background: rgba(16,24,40,.5); z-index: 60; }
  .drawer {
    position: fixed; top: 0; left: 0; bottom: 0; width: 260px; background: var(--sidebar);
    z-index: 61; overflow-y: auto; animation: slide .16s ease-out; display: flex; flex-direction: column;
  }
  @keyframes slide { from { transform: translateX(-40px); opacity: .5; } }
}
@media print {
  .sidebar, .bottom-nav, .topbar .btn, .menu-btn { display: none !important; }
  .main { padding: 0; }
  body { background: #fff; }
  .card { box-shadow: none; }
}

/* ---------- Financials process-map hub ---------- */
.pm-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.kpi.k-green { border-left: 3px solid var(--green); }
.kpi.k-amber { border-left: 3px solid var(--amber); }
.kpi.k-blue  { border-left: 3px solid var(--blue); }
.kpi.k-red   { border-left: 3px solid var(--red); }
.kpi.k-indigo{ border-left: 3px solid var(--accent); }

.pm-banner {
  display: flex; gap: 10px; align-items: flex-start; padding: 13px 16px; border-radius: 12px;
  margin-bottom: 16px; font-size: 13.5px; border: 1px solid;
}
.pm-banner .pm-b-ico { font-size: 16px; line-height: 1.3; }
.pm-banner b { font-weight: 700; }
.pm-banner.info  { background: var(--accent-soft); border-color: #c7cdfb; color: var(--accent-ink); }
.pm-banner.warn  { background: var(--amber-bg); border-color: #f0d8a8; color: var(--amber); }
.pm-banner.alert { background: var(--red-bg); border-color: #f3c0ba; color: var(--red); }
.pm-banner a { color: inherit; font-weight: 700; text-decoration: underline; }

.pm-grid { display: grid; grid-template-columns: 1fr 1fr 288px; gap: 16px; align-items: start; }
.pm-col, .pm-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.pm-section { border-radius: 14px; border: 1px solid var(--line); padding: 15px 16px; background: #fff; }
.pm-section.lease     { background: #f3fbf6; border-color: #cdeedd; }
.pm-section.pay       { background: #fdfaf1; border-color: #efe3c4; }
.pm-section.portfolio { background: #f3f7fe; border-color: #d4e2f6; }
.pm-section.maint     { background: #fdf6f3; border-color: #f3d9d0; }
.pm-section.team      { background: #f7f6fc; border-color: #e1dcf0; }
.pm-section-h {
  font-weight: 800; font-size: 12.5px; letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink-2); display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.pm-section-h .pm-count { margin-left: auto; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink-3); font-size: 12px; }

.pm-flow { display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px; }
.pm-flow + .pm-flow { margin-top: 6px; }
.pm-tile {
  position: relative; flex: 0 0 auto; width: 116px; min-height: 102px; background: #fff;
  border: 1px solid var(--line); border-radius: 11px; padding: 11px 10px; cursor: pointer;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px;
  transition: transform .08s ease, box-shadow .08s ease, border-color .08s ease;
}
.pm-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.pm-tile .pm-ico { font-size: 19px; }
.pm-tile .pm-name { font-weight: 700; font-size: 12.5px; line-height: 1.2; }
.pm-tile .pm-sub { font-size: 10.5px; color: var(--ink-3); line-height: 1.25; }
.pm-tile .pm-badge {
  position: absolute; top: -7px; right: -7px; background: var(--ink); color: #fff; font-size: 11px;
  font-weight: 700; border-radius: 99px; min-width: 21px; height: 21px; display: flex;
  align-items: center; justify-content: center; padding: 0 5px;
}
.pm-tile .pm-foot { margin-top: auto; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.pm-tile .pm-foot.act { color: var(--accent); }
.pm-tile.roadmap {
  opacity: .6; cursor: default; box-shadow: none; background: transparent; border-style: dashed;
}
.pm-tile.roadmap:hover { transform: none; box-shadow: none; border-color: var(--line); }
.pm-tile.roadmap .pm-foot { color: var(--amber); }
.pm-arrow { align-self: center; color: var(--ink-3); font-size: 15px; flex: 0 0 auto; }

.pm-list { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 13px 16px; box-shadow: var(--shadow); }
.pm-list h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); display: flex; gap: 8px; align-items: center; margin: 0 0 6px; }
.pm-link { display: flex; align-items: center; gap: 8px; padding: 8px 0; font-weight: 600; font-size: 14px; color: var(--accent); cursor: pointer; border-bottom: 1px solid var(--line); }
.pm-link:last-child { border-bottom: 0; }
.pm-link:hover { text-decoration: underline; }
.pm-link.dim { color: var(--ink-3); cursor: default; font-weight: 500; }
.pm-link.dim:hover { text-decoration: none; }
.pm-link .pm-soon { margin-left: auto; font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--amber); }

/* ---------- Stays calendar ---------- */
.cal-wrap { overflow-x: auto; }
table.cal { border-collapse: collapse; width: 100%; min-width: 640px; }
table.cal th, table.cal td { border: 1px solid var(--line); text-align: center; }
table.cal .cal-d { font-size: 12px; font-weight: 700; padding: 4px 0; width: 30px; color: var(--ink-2); }
table.cal .cal-d.we { background: #f8fafc; }
table.cal .cal-dow { font-size: 9px; font-weight: 500; color: var(--ink-3); }
table.cal .cal-unit { text-align: left; padding: 6px 10px; white-space: nowrap; font-weight: 600; font-size: 13px; min-width: 130px; }
table.cal .cal-prop { font-size: 11px; color: var(--ink-3); font-weight: 400; }
table.cal .cal-c { height: 34px; font-size: 10px; color: #fff; font-weight: 700; cursor: default; }
table.cal .cal-c.booked { background: var(--blue); cursor: pointer; }
table.cal .cal-c.in { background: var(--green); cursor: pointer; }

/* ---------- Planning month calendar ---------- */
.cm-grid-head { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 4px; }
.cm-dow { text-align: center; font-size: 11px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.cm-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cm-cell { min-height: 96px; border: 1px solid var(--line); border-radius: 8px; padding: 4px; background: #fff; overflow: hidden; display: flex; flex-direction: column; gap: 2px; }
.cm-cell.out { background: #fafbfc; }
.cm-cell.out .cm-num { color: var(--ink-3); }
.cm-cell.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cm-cell[onclick] { cursor: pointer; }
.cm-num { font-size: 12px; font-weight: 700; color: var(--ink-2); display: flex; align-items: center; gap: 4px; }
.cm-today { background: var(--accent); color: #fff; font-size: 8.5px; font-weight: 700; border-radius: 99px; padding: 1px 5px; text-transform: uppercase; }
.cm-ev { font-size: 10.5px; line-height: 1.3; padding: 1px 5px; border-radius: 5px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid; }
.cm-ev.done { opacity: .5; text-decoration: line-through; }
.cm-ev.arrival { background: var(--green-bg); color: var(--green); border-color: var(--green); }
.cm-ev.departure { background: var(--blue-bg); color: var(--blue); border-color: var(--blue); }
.cm-ev.cleaning { background: #f3eefe; color: #6936d3; border-color: #6936d3; }
.cm-ev.maintenance { background: var(--red-bg); color: var(--red); border-color: var(--red); }
.cm-ev.pm { background: var(--amber-bg); color: var(--amber); border-color: var(--amber); }
.cm-more { font-size: 10px; color: var(--ink-3); font-weight: 600; cursor: pointer; padding-left: 4px; }
.cm-filter { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 4px 10px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.cm-filter.off { opacity: .45; }
.cm-filter .cm-cnt { color: var(--ink-3); font-weight: 700; }
.cm-dot { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }
.cm-dot.arrival { background: var(--green); } .cm-dot.departure { background: var(--blue); }
.cm-dot.cleaning { background: #6936d3; } .cm-dot.maintenance { background: var(--red); } .cm-dot.pm { background: var(--amber); }
@media (max-width: 700px) {
  .cm-cell { min-height: 64px; }
  .cm-ev { font-size: 0; padding: 3px; border-left-width: 0; height: 8px; border-radius: 2px; }
  .cm-ev::first-letter { font-size: 0; }
}

@media (max-width: 1500px) { .pm-kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1180px) { .pm-grid { grid-template-columns: 1fr; } }
@media (max-width: 920px) { .pm-kpis { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) {
  .pm-arrow { display: none; }
  .pm-tile { width: calc(50% - 4px); }
}

/* ---- Global search (sidebar) ---- */
.search-box { padding: 4px 12px 8px; position: relative; }
.search-box input {
  width: 100%; padding: 8px 10px; border-radius: 9px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06); color: #eef2f8; font-size: 13px;
}
.search-box input::placeholder { color: #8792a6; }
.search-box input:focus { outline: none; border-color: var(--accent); background: rgba(255,255,255,.1); }
.search-results {
  display: none; position: absolute; left: 12px; right: 12px; top: 46px; z-index: 60;
  background: var(--card); color: var(--ink); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 16px 40px rgba(16,24,40,.28); max-height: 62vh; overflow-y: auto;
}
.search-results.open { display: block; }
.search-group { padding: 6px 0; border-bottom: 1px solid var(--line); }
.search-group:last-child { border-bottom: 0; }
.search-head { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); padding: 6px 12px 2px; }
.search-row { display: flex; flex-direction: column; padding: 7px 12px; color: var(--ink); }
.search-row:hover { background: var(--accent-soft); text-decoration: none; }
.search-row b { font-size: 13.5px; }
.search-row span { font-size: 12px; color: var(--ink-3); }
.search-empty { padding: 16px; color: var(--ink-3); font-size: 13px; text-align: center; }

/* ---- File uploader button ---- */
.uploader {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; margin: 6px 0;
  padding: 8px 12px; border: 1px dashed var(--accent); border-radius: 10px;
  color: var(--accent-ink); background: var(--accent-soft); font-size: 13px; font-weight: 600;
}
.sigpad-wrap { max-width: 480px; margin: 6px 0 10px; }
.kpi.warn .value { color: var(--red); }

/* ---- Mobile: 16px inputs to stop iOS auto-zoom; larger touch targets ---- */
@media (max-width: 920px) {
  input, select, textarea { font-size: 16px; }
  .btn.sm { min-height: 34px; }
  .search-box { display: none; }
}

/* ---- Lease templates: editor + rendered lease ---- */
/* Stack full-width by default so field labels + lease text never clip; go 2-up only on wide screens. */
.lz-editor { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
@media (min-width: 1280px) { .lz-editor { grid-template-columns: minmax(440px, 560px) 1fr; } }
.lz-code { width: 100%; min-height: 620px; font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12.5px; line-height: 1.5; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
/* Fields as a wrapping grid of compact chips — nothing gets cut off at any width. */
.lz-fieldgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px;
  max-height: 560px; overflow-y: auto; padding: 2px; }
.lz-fchip { display: flex; gap: 9px; align-items: flex-start; border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 10px; background: var(--card, #fff); }
.lz-ftok { flex: none; border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent-ink);
  border-radius: 7px; padding: 4px 7px; font-family: ui-monospace, Menlo, monospace; font-size: 11px;
  font-weight: 700; cursor: pointer; line-height: 1; margin-top: 1px; }
.lz-ftok:hover { background: var(--accent); color: #fff; }
.lz-fbody { flex: 1; min-width: 0; }
.lz-flabel { font-weight: 600; font-size: 13px; line-height: 1.25; overflow-wrap: anywhere; }
.lz-req { color: var(--red); font-weight: 700; }
.lz-fmeta { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.lz-fmeta code { font-size: 10.5px; color: var(--ink-3); background: var(--bg-2, #f4f4f5); border-radius: 4px; padding: 0 4px; }
.lz-fmeta .pill { font-size: 10.5px; padding: 1px 6px; }
.lz-facts { flex: none; display: flex; flex-direction: column; gap: 4px; }
.lz-facts .btn { padding: 3px 8px; }
.lz-doc { font-size: 14px; line-height: 1.6; }
.lz-doc h1 { font-size: 20px; text-align: center; margin: 0 0 16px; }
.lz-doc h2 { font-size: 15px; margin: 18px 0 6px; border-bottom: 1px solid var(--line); padding-bottom: 3px; }
.lz-doc h3 { font-size: 13.5px; margin: 12px 0 4px; }
.lz-doc p { margin: 7px 0; }
.lz-in { display: inline-block; border: 0; border-bottom: 1.5px solid var(--accent); background: var(--accent-soft);
  border-radius: 4px 4px 0 0; padding: 1px 6px; font: inherit; min-width: 120px; color: var(--ink); }
.lz-in:focus { outline: none; background: #fff; box-shadow: 0 1px 0 var(--accent); }
.lz-ta { min-width: 260px; width: 60%; vertical-align: top; }
.lz-check { display: inline-flex; gap: 6px; align-items: center; }
.lz-val { background: #eef7ee; border-radius: 4px; padding: 0 4px; font-weight: 600; }
.lz-blank { color: var(--ink-3); letter-spacing: 1px; }
.lz-sign { border: 1.5px dashed var(--accent); background: var(--accent-soft); color: var(--accent-ink);
  border-radius: 8px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.lz-missing { background: #fde8e8; color: var(--red); border-radius: 4px; padding: 0 4px; font-family: monospace; }
.sigcols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 12px; }
.sigcol { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.sigcol h3 { margin-top: 0; }
@media (max-width: 920px) { .sigcols { grid-template-columns: 1fr; }
  .lz-code { min-height: 300px; } }
@media print { .sidebar, .bottom-nav, .topbar .btn, .pm-banner { display: none !important; }
  .lz-in { border: 0; background: transparent; } .card { box-shadow: none; border: 0; } }

/* ---- Bank import ---- */
.card.kpi.sel { outline: 2px solid var(--accent); }
.bktable td { vertical-align: top; }
.bk-sm { font-size: 12.5px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 7px; max-width: 170px; }
.bktable .money { font-variant-numeric: tabular-nums; }

/* ---- Financials hub: bank balances strip ---- */
.bankstrip { margin-top: 14px; }
.bankstrip-h { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.bankstrip-h .right { margin-left: auto; }
.bankstrip-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.bankcard { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; background: var(--card); }
.bankcard:hover { border-color: var(--accent); box-shadow: 0 2px 10px rgba(16,24,40,.06); }
.bankcard-n { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.bankcard-b { font-size: 21px; font-weight: 800; margin: 3px 0; font-variant-numeric: tabular-nums; }
.bankcard-b.red { color: var(--red); }
.bankcard-s { font-size: 11.5px; color: var(--ink-3); }

/* ---- Checkbook (register) ---- */
.ck-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.ck-balnow { text-align: right; }
.ck-balnow .label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.ck-balnow .value { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ck-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.ck-tab { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; border: 1px solid var(--line);
  background: #fff; border-radius: 10px; padding: 7px 12px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink); }
.ck-tab:hover { border-color: var(--accent); }
.ck-tab.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.ck-tabbal { font-size: 11px; font-weight: 600; opacity: .7; font-variant-numeric: tabular-nums; }
.ck-controls { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.ck-field { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--ink-2); font-weight: 600; }
.ck-field input { font-size: 13px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.ck-presets { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.ck-preset { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 11px; font-size: 12.5px; cursor: pointer; color: var(--ink-2); }
.ck-preset.on { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.ck-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.ck-summary { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 12px; margin-bottom: 12px; }
.ck-scard { border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; background: var(--card); }
.ck-scard .label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.ck-scard .value { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; margin: 2px 0; }
.ck-scard-cta { background: var(--accent-soft); border-color: #c7cdfb; display: flex; flex-direction: column; justify-content: center; }
.ck-note { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 9px; padding: 8px 12px; font-size: 12.5px; margin-bottom: 12px; }
.cktable { width: 100%; }
.cktable th, .cktable td { padding: 9px 10px; }
.cktable .money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cktable .num { text-align: right; }
.cktable tbody tr.ck-cleared { background: #f6fdf9; }
.cktable .ck-cl { text-align: center; width: 64px; }
.cktable .ck-clh { text-align: center; }
.cktable tfoot .ck-open td { color: var(--ink-2); border-top: 2px solid var(--line); font-variant-numeric: tabular-nums; }
.ck-foot { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 12.5px; margin-top: 10px; }
.ck-foot .right { margin-left: auto; display: flex; gap: 6px; }
@media (max-width: 720px) { .ck-summary { grid-template-columns: 1fr; } }
@media print {
  .ck-tabs, .ck-controls, .ck-actions, .ck-scard-cta, .ck-note, .ck-foot .right, .cktable .ck-cl, .cktable .ck-clh { display: none !important; }
  .topbar, .searchbar { display: none !important; }
}

/* =========================================================================
   Navigation v2 — glass header, floating dock, ⌘K command bar, launchpad.
   Replaces the left sidebar (old .sidebar/.bottom-nav rules are now unused).
   ========================================================================= */
.shell2 { min-height: 100vh; position: relative; }
.shell2::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 480px at 105% -8%, rgba(129,140,248,.20), transparent 62%),
    radial-gradient(760px 420px at -8% 108%, rgba(244,114,182,.12), transparent 60%),
    radial-gradient(640px 360px at 50% 118%, rgba(45,212,191,.10), transparent 60%);
}
.main.main2 { max-width: 1440px; margin: 0 auto; padding: 24px 32px 140px; }
body:has(.dock) #toast-root { bottom: calc(100px + var(--safe-bottom)); }

/* app tiles (dock, launchpad, command bar) */
.tile {
  --a: #94a3b8; --b: #475569;
  width: 44px; height: 44px; border-radius: 13px; flex: none; display: grid; place-items: center; color: #fff;
  background: linear-gradient(150deg, var(--a), var(--b));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -1px 0 rgba(0,0,0,.08), 0 6px 14px -8px var(--b);
  transition: transform .22s cubic-bezier(.3,.7,.35,1.35), filter .2s, opacity .2s; transform-origin: 50% 100%;
}
.tile svg { width: 22px; height: 22px; }
.tile.sm { width: 32px; height: 32px; border-radius: 9px; }
.tile.sm svg { width: 17px; height: 17px; }
.tile.lg { width: 62px; height: 62px; border-radius: 18px; }
.tile.lg svg { width: 30px; height: 30px; }
.t-indigo { --a: #818cf8; --b: #4f46e5; }  .t-rose { --a: #fb7185; --b: #e11d48; }
.t-sky { --a: #38bdf8; --b: #0369a1; }     .t-violet { --a: #a78bfa; --b: #6d28d9; }
.t-amber { --a: #fbbf24; --b: #d97706; }   .t-pink { --a: #f472b6; --b: #db2777; }
.t-orange { --a: #fdba74; --b: #ea580c; }  .t-slate { --a: #94a3b8; --b: #475569; }
.t-emerald { --a: #34d399; --b: #047857; } .t-cyan { --a: #22d3ee; --b: #0e7490; }
.t-blue { --a: #60a5fa; --b: #1d4ed8; }    .t-teal { --a: #2dd4bf; --b: #0f766e; }
.t-lime { --a: #a3e635; --b: #4d7c0f; }    .t-fuchsia { --a: #e879f9; --b: #a21caf; }
.t-zinc { --a: #a1a1aa; --b: #3f3f46; }
.t-ghost { --a: #ffffff; --b: #eef1f6; color: var(--ink-2);
  box-shadow: inset 0 0 0 1px rgba(16,24,40,.09), 0 4px 10px -8px rgba(16,24,40,.45); }

/* glass header */
.hdr {
  position: sticky; top: 0; z-index: 41; background: rgba(243,245,249,.74);
  backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid rgba(16,24,40,.06);
}
.hdr-in { max-width: 1440px; margin: 0 auto; height: 62px; padding: 0 32px; display: flex; align-items: center; gap: 16px; }
.hdr-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); min-width: 0; flex: 0 1 260px; }
.hdr-brand:hover { text-decoration: none; }
.hdr-brand .mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center;
  color: #fff; font-weight: 800; background: linear-gradient(145deg, #818cf8, #4338ca);
  box-shadow: 0 6px 14px -6px rgba(67,56,202,.75), inset 0 1px 0 rgba(255,255,255,.35);
}
.hdr-name { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.hdr-name b { font-size: 15px; letter-spacing: -.01em; }
.hdr-name small { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdr-search {
  flex: 0 1 480px; margin: 0 auto; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 8px 0 13px;
  border: 1px solid var(--line); background: rgba(255,255,255,.9); border-radius: 12px; color: var(--ink-3);
  font: inherit; font-size: 14px; cursor: pointer; text-align: left; box-shadow: 0 1px 2px rgba(16,24,40,.04);
  transition: border-color .15s, box-shadow .15s;
}
.hdr-search:hover { border-color: #c7cdfb; box-shadow: 0 0 0 4px rgba(79,70,229,.08); }
.hdr-search svg { width: 17px; height: 17px; flex: none; }
.hdr-search span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
kbd {
  font: 600 11px/1 ui-monospace, "SF Mono", Menlo, monospace; color: var(--ink-2); background: #fff;
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 3px 6px; display: inline-block;
}
kbd + kbd { margin-left: 3px; }
.hdr-right { display: flex; align-items: center; gap: 8px; flex: 0 1 260px; justify-content: flex-end; }
.hdr-new {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 15px 0 11px; border: 0; border-radius: 11px;
  background: var(--ink); color: #fff; font: inherit; font-size: 13.5px; font-weight: 650; cursor: pointer;
  box-shadow: 0 8px 18px -10px rgba(16,24,40,.7);
}
.hdr-new:hover { background: #283447; }
.hdr-new svg, .hdr-icon svg { width: 18px; height: 18px; }
.hdr-icon {
  width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line);
  background: rgba(255,255,255,.9); border-radius: 11px; color: var(--ink-2); cursor: pointer;
}
.hdr-icon:hover { color: var(--accent); border-color: #c7cdfb; }
.hdr-avatar {
  width: 38px; height: 38px; border-radius: 50%; border: 2px solid #fff; cursor: pointer; color: #fff;
  font-family: inherit; font-weight: 700; font-size: 13px; letter-spacing: .02em; display: grid; place-items: center; padding: 0;
  background: linear-gradient(145deg, #f472b6, #7c3aed); box-shadow: 0 0 0 1px var(--line), 0 6px 12px -6px rgba(124,58,237,.7);
}
.hdr-avatar.big { width: 44px; height: 44px; font-size: 15px; cursor: default; flex: none; }

/* account menu */
.umenu-scrim { position: fixed; inset: 0; z-index: 70; }
.umenu {
  position: fixed; top: 66px; right: calc(max(0px, (100vw - 1440px) / 2) + 26px); z-index: 71; width: 286px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 8px;
  box-shadow: 0 24px 60px -16px rgba(16,24,40,.35); animation: navPop .14s ease-out;
}
.umenu-who { display: flex; gap: 12px; align-items: center; padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.umenu-who b { display: block; font-size: 14px; }
.umenu-who small { display: block; font-size: 12px; color: var(--ink-3); }
.umenu a, .umenu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none;
  border-radius: 9px; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; text-align: left;
}
.umenu a:hover, .umenu button:hover { background: var(--bg); text-decoration: none; }
.umenu svg { width: 17px; height: 17px; color: var(--ink-2); flex: none; }
.umenu kbd { margin-left: auto; }
.umenu .danger, .umenu .danger svg { color: var(--red); }
@keyframes navPop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
@keyframes navFade { from { opacity: 0; } }

/* floating dock */
.dock { position: fixed; left: 50%; bottom: calc(14px + var(--safe-bottom)); transform: translateX(-50%); z-index: 40; }
.dock-inner {
  display: flex; align-items: flex-end; gap: 6px; padding: 8px 10px; border-radius: 24px;
  background: rgba(255,255,255,.62); backdrop-filter: saturate(1.8) blur(22px); -webkit-backdrop-filter: saturate(1.8) blur(22px);
  border: 1px solid rgba(255,255,255,.75);
  box-shadow: 0 18px 50px -14px rgba(16,24,40,.38), 0 2px 6px rgba(16,24,40,.06), inset 0 1px 0 rgba(255,255,255,.9);
}
.dock-item {
  position: relative; display: flex; flex-direction: column; align-items: center; border: 0; background: none;
  padding: 0; cursor: pointer; color: inherit; font: inherit;
}
.dock-item:hover { text-decoration: none; }
.dock-lbl { display: none; }
.dock-sep { width: 1px; align-self: stretch; margin: 6px 3px; background: rgba(16,24,40,.13); }
.dock-item.on::after {
  content: ''; position: absolute; bottom: -6px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px;
  border-radius: 50%; background: var(--ink);
}
.dock-item::before {
  content: attr(data-label); position: absolute; bottom: calc(100% + 30px); left: 50%;
  transform: translateX(-50%) translateY(4px); white-space: pre; background: rgba(16,24,40,.92); color: #fff;
  font-size: 12px; font-weight: 600; padding: 5px 9px; border-radius: 8px; opacity: 0; pointer-events: none;
  transition: opacity .12s, transform .12s;
}
@media (hover: hover) and (min-width: 921px) {
  .dock-item:hover .tile, .dock-item:focus-visible .tile { transform: translateY(-9px) scale(1.32); }
  .dock-item:hover + .dock-item .tile, .dock-item:has(+ .dock-item:hover) .tile { transform: translateY(-4px) scale(1.14); }
  .dock-item:hover::before, .dock-item:focus-visible::before { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.dock-item:focus-visible { outline: none; }
.dock-item:focus-visible .tile { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--accent); }
.dock-item:active .tile { transform: scale(.92); }

/* ⌘K command bar */
.cmdk-scrim { position: fixed; inset: 0; z-index: 80; background: rgba(15,23,42,.36); backdrop-filter: blur(3px); animation: navFade .12s ease-out; }
.cmdk {
  position: fixed; z-index: 81; left: 50%; top: 11vh; transform: translateX(-50%); width: min(680px, calc(100vw - 24px));
  max-height: 74vh; display: flex; flex-direction: column; overflow: hidden; background: #fff;
  border: 1px solid rgba(16,24,40,.08); border-radius: 18px;
  box-shadow: 0 40px 100px -20px rgba(15,23,42,.55); animation: cmdkIn .17s cubic-bezier(.2,.8,.3,1.1);
}
@keyframes cmdkIn { from { opacity: 0; transform: translateX(-50%) translateY(-8px) scale(.98); } }
.cmdk-in { display: flex; align-items: center; gap: 12px; padding: 4px 16px; border-bottom: 1px solid var(--line); }
.cmdk-in > svg { width: 20px; height: 20px; color: var(--ink-3); flex: none; }
.cmdk-in input { flex: 1; min-width: 0; border: 0; outline: none; font: inherit; font-size: 17px; padding: 17px 0; background: transparent; color: var(--ink); }
.cmdk-list { overflow-y: auto; padding: 4px 8px 10px; flex: 1; }
.cmdk-sec { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); padding: 12px 10px 5px; }
.cmdk-row { display: flex; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 11px; cursor: pointer; }
.cmdk-row.sel { background: var(--accent-soft); }
.cmdk-row.sel .cmdk-hint { color: var(--accent-ink); }
.cmdk-lbl { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cmdk-lbl b { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-lbl small { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-lbl mark { background: none; color: var(--accent); }
.cmdk-hint { font-size: 11.5px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.cmdk-empty { padding: 38px 16px; text-align: center; color: var(--ink-3); }
.cmdk-more { padding: 10px 12px 2px; font-size: 12.5px; color: var(--ink-3); }
.cmdk-foot {
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 10px 16px;
  border-top: 1px solid var(--line); background: #fafbfc; font-size: 12px; color: var(--ink-3);
}
.cmdk-foot kbd { margin-right: 3px; }
.cmdk-foot .r { margin-left: auto; }

/* launchpad */
.lp {
  position: fixed; inset: 0; z-index: 75; display: flex; flex-direction: column; color: #fff;
  background: rgba(15,23,42,.64); backdrop-filter: blur(24px) saturate(1.4); -webkit-backdrop-filter: blur(24px) saturate(1.4);
  animation: lpIn .2s ease-out;
}
@keyframes lpIn { from { opacity: 0; transform: scale(1.03); } }
.lp-top { display: flex; align-items: center; justify-content: center; padding: 26px 20px 6px; position: relative; }
.lp-search {
  display: flex; align-items: center; gap: 10px; width: min(380px, calc(100vw - 110px)); height: 42px; padding: 0 14px;
  border-radius: 12px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22);
}
.lp-search svg { width: 17px; height: 17px; opacity: .75; flex: none; }
.lp-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: #fff; font: inherit; font-size: 15px; }
.lp-search input::placeholder { color: rgba(255,255,255,.62); }
.lp-x {
  position: absolute; right: 22px; top: 26px; width: 42px; height: 42px; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.1); color: #fff; font-size: 16px;
}
.lp-x:hover { background: rgba(255,255,255,.22); }
.lp-body { flex: 1; overflow-y: auto; padding: 8px max(24px, calc((100vw - 1080px) / 2)) 60px; }
.lp-create { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 10px 0 8px; }
.lp-create[hidden] { display: none; }
.lp-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 15px 8px 11px; border-radius: 99px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.24); background: rgba(255,255,255,.1); color: #fff; font: inherit; font-size: 13.5px; font-weight: 600;
}
.lp-chip:hover { background: rgba(255,255,255,.22); }
.lp-chip svg { width: 15px; height: 15px; }
.lp-sec { margin-top: 22px; }
.lp-sec[hidden], .lp-app[hidden] { display: none; }
.lp-sec h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.6); font-weight: 700; margin: 0 0 12px 6px; }
.lp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 16px 10px; }
.lp-app {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 4px; border-radius: 16px;
  color: #fff; font-size: 13px; font-weight: 550; text-align: center; line-height: 1.25;
}
.lp-app:hover { text-decoration: none; background: rgba(255,255,255,.08); }
.lp-app:hover .tile { transform: translateY(-3px) scale(1.06); }
.lp-app .tile { box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 14px 26px -12px rgba(0,0,0,.7); }
.lp-app.first { background: rgba(255,255,255,.12); }
.lp-app.first .tile { box-shadow: 0 0 0 3px rgba(255,255,255,.9), 0 14px 26px -12px rgba(0,0,0,.7); }

/* shortcuts sheet */
.kbd-grid { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; align-items: center; font-size: 14px; }

/* company switcher (multi-company portal) — chip in the header + dropdown */
.co-dot {
  display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%;
  background: linear-gradient(150deg, var(--a, #818cf8), var(--b, #4f46e5)); box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(16,24,40,.1);
}
.co-dot.all { background: conic-gradient(#818cf8 0 25%, #34d399 0 50%, #fbbf24 0 75%, #fb7185 0); }
.hdr-co {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; min-width: 0; max-width: 250px; flex: 0 0 auto;
  padding: 0 9px 0 12px; border: 1px solid var(--line); background: rgba(255,255,255,.9); border-radius: 11px;
  color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 650; cursor: pointer; box-shadow: 0 1px 2px rgba(16,24,40,.04);
  transition: border-color .15s, box-shadow .15s;
}
.hdr-co:hover { border-color: #c7cdfb; box-shadow: 0 0 0 4px rgba(79,70,229,.08); }
.hdr-co-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdr-co svg { width: 15px; height: 15px; flex: none; color: var(--ink-3); }
.comenu { right: auto; left: 32px; width: 320px; max-width: calc(100vw - 16px); }
.comenu-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); padding: 8px 10px 5px; }
.umenu.comenu button.on { background: var(--accent-soft); }
.comenu .co-dot { width: 12px; height: 12px; margin: 0 3px; }
.co-mi { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.co-mi b { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-mi small { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-check { width: 16px; flex: none; text-align: center; color: var(--accent); font-weight: 800; }
.comenu-manage { position: relative; margin-top: 8px; }
.comenu-manage::before { content: ''; position: absolute; left: 4px; right: 4px; top: -5px; border-top: 1px solid var(--line); }

/* companies page (#/companies) */
.co-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; margin-top: 16px; }
.co-grid > .card { margin-top: 0; }
.co-card { display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden; }
.co-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--a, #94a3b8), var(--b, #475569)); }
.co-card.viewing { border-color: transparent; box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.co-card.inactive { opacity: .62; }
.co-head { display: flex; gap: 14px; align-items: center; }
.co-tile { font-weight: 800; font-size: 21px; letter-spacing: .02em; }
.co-id { min-width: 0; }
.co-id h2 { margin: 0; font-size: 17px; }
.co-legal { font-size: 13px; color: var(--ink-2); }
.co-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.co-pills:empty { display: none; }
.co-meta { display: grid; gap: 2px; font-size: 13.5px; color: var(--ink-2); }
.co-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.co-stat { background: var(--bg); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.co-stat b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-stat span { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.co-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }

/* phones + small tablets: tab-bar dock, compact header */
@media (max-width: 920px) {
  .main.main2 { padding: 14px 14px 118px; }
  .hdr-in { padding: 0 14px; height: 58px; gap: 8px; }
  .hdr-brand { flex: 1 1 auto; }
  .hdr-name small { display: none; }
  .hdr-search { flex: 0 0 40px; width: 40px; height: 40px; padding: 0; justify-content: center; margin: 0; }
  .hdr-search span, .hdr-search kbd { display: none; }
  .hdr-right { flex: none; }
  .hdr-new { width: 40px; padding: 0; justify-content: center; }
  .hdr-new span, .hdr-icon { display: none; }
  .dock { left: 10px; right: 10px; transform: none; bottom: calc(10px + var(--safe-bottom)); }
  .dock-inner { justify-content: space-around; gap: 0; padding: 7px 4px 6px; border-radius: 22px; }
  .dock-sep, .dock-item:not(.prim) { display: none; }
  .dock-item { flex: 1; gap: 3px; }
  .dock-item .tile { width: 34px; height: 34px; border-radius: 10px; }
  .dock-item .tile svg { width: 18px; height: 18px; }
  .dock-item:not(.on) .tile:not(.t-ghost) { filter: saturate(.2) brightness(1.15); opacity: .78; }
  .dock-lbl { display: block; max-width: 100%; font-size: 10.5px; font-weight: 650; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dock-item.on .dock-lbl { color: var(--ink); }
  .dock-item.on::after, .dock-item::before { display: none; }
  .umenu { top: 62px; right: 10px; }
  .hdr:has(.hdr-co) .hdr-brand { flex: 0 0 auto; }
  .hdr-co { flex: 0 1 auto; height: 40px; max-width: 150px; padding: 0 11px; gap: 7px; margin-right: auto; font-size: 13px; }
  .hdr-co svg { display: none; }
  .co-grid { grid-template-columns: 1fr; }
  .cmdk { top: 10px; max-height: calc(100vh - 20px); border-radius: 16px; }
  .cmdk-foot { display: none; }
  .lp-top { padding: 16px 12px 4px; justify-content: flex-start; }
  .lp-search { width: calc(100vw - 80px); }
  .lp-x { top: 16px; right: 12px; }
  .lp-body { padding: 4px 12px 40px; }
  .lp-grid { grid-template-columns: repeat(4, 1fr); gap: 14px 4px; }
  .lp-app { font-size: 11.5px; padding: 6px 2px; }
  .lp-app .tile.lg { width: 54px; height: 54px; border-radius: 15px; }
  .lp-app .tile.lg svg { width: 26px; height: 26px; }
}
@media print {
  .hdr, .dock, #cmdk-root, #lp-root, #umenu-root, #comenu-root { display: none !important; }
  .main.main2 { padding: 0; max-width: none; }
  .shell2::before { display: none; }
}
/* very narrow phones: the company chip replaces the "XIG-CRM" wordmark */
@media (max-width: 520px) {
  .hdr:has(.hdr-co) .hdr-name { display: none; }
}

/* =========================================================================
   Lease pages + per-page initials (leasetemplates.js renderLease)
   ========================================================================= */
.lz-paged { padding: 0; background: transparent; border: 0; }
.lz-paged > .lz-page:first-child { margin-top: 0; }
.lz-page {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 34px 40px 18px; margin: 18px auto 0; max-width: 860px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 6px 18px rgba(16, 24, 40, .05);
  display: flex; flex-direction: column; min-height: 380px;
}
.lz-pagefoot {
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.lz-page > :not(.lz-pagefoot):last-of-type { margin-bottom: 18px; }
.lz-pageno { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.lz-inits { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.lz-initlbl { font-size: 11.5px; color: var(--ink-3); align-self: center; margin-right: 2px; }
.lz-initbox {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: flex-end;
  width: 92px; height: 54px; padding: 3px 4px 2px; border-radius: 8px;
  border: 1.5px solid var(--line); background: #fff; font: inherit; color: var(--ink);
}
.lz-initbox small { font-size: 10px; color: var(--ink-3); line-height: 1.2; }
.lz-initbox img { max-width: 84px; max-height: 34px; object-fit: contain; }
.lz-initbox.done { border-color: #a6d8bf; background: #f3fbf6; }
.lz-initbox.done b { color: var(--green); font-size: 18px; }
.lz-initbox.empty > span { flex: 1; width: 100%; border-bottom: 1px solid #c7cdd8; margin-bottom: 2px; }
.lz-initbox.todo {
  border: 1.5px dashed var(--accent); background: var(--accent-soft); color: var(--accent-ink);
  cursor: pointer; font-weight: 600; font-size: 12.5px; justify-content: center; gap: 3px;
}
.lz-initbox.todo:hover { background: var(--accent); color: #fff; }
.lz-initbox.todo:hover small { color: #e0e3ff; }
.lz-initbox.pulse { animation: lzpulse 1.3s ease-out; }
@keyframes lzpulse { 0% { box-shadow: 0 0 0 0 rgba(79, 70, 229, .55); } 100% { box-shadow: 0 0 0 16px rgba(79, 70, 229, 0); } }
.lz-initbar:empty { display: none; }
.lz-initbar {
  position: sticky; top: 64px; z-index: 5; display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 9px 12px; margin: 0 0 12px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px);
}
.lz-initbar .btn { margin-left: auto; }
.lz-initchip { font-size: 12.5px; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); }
.lz-initchip.ok { background: var(--green-bg); color: var(--green); }
.lz-tokbar { display: flex; flex-wrap: wrap; gap: 5px; max-height: 120px; overflow-y: auto; margin-bottom: 8px; }
.lz-tokbar .lz-ftok { font-size: 11.5px; padding: 2px 7px; border-radius: 6px; cursor: pointer; }
.lz-doc table { border-collapse: collapse; width: 100%; margin: 8px 0; }
.lz-doc td, .lz-doc th { border: 1px solid var(--line); padding: 5px 8px; text-align: left; vertical-align: top; font-size: 13px; }
.lz-doc .lz-sigrow { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 14px; }
.lz-doc .lz-sigrow > div { border-top: 1px solid var(--line); padding-top: 8px; }
.lz-doc ol, .lz-doc ul { padding-left: 22px; margin: 6px 0; }
.lz-doc .lz-small { font-size: 12px; color: var(--ink-2); }
@media (max-width: 720px) {
  .lz-page { padding: 20px 16px 14px; }
  .lz-doc .lz-sigrow { grid-template-columns: 1fr; }
  .lz-initbox { width: 80px; }
}
@media print {
  .lz-initbar, .lz-sign { display: none !important; }
  .lz-paged { padding: 0; }
  .lz-page { border: 0; box-shadow: none; border-radius: 0; margin: 0; padding: 0; max-width: none; min-height: 0;
    break-after: page; page-break-after: always; }
  .lz-page:last-child { break-after: auto; page-break-after: auto; }
  .lz-initbox.todo { border: 1px solid #999; background: #fff; color: transparent; }
  .lz-initbox.todo small { color: #666; }
  .lz-initbox.done { background: #fff; border-color: #999; }
}
.lz-doc p.lz-li { margin-left: 26px; text-indent: -20px; }
.lz-doc p.lz-li b:first-child { display: inline-block; width: 20px; text-indent: 0; }
.lz-doc table.lz-veh th { background: #f8f9fc; font-weight: 600; font-size: 12px; }
.lz-doc table.lz-sigtable th { width: 90px; background: #f8f9fc; }
.lz-doc table.lz-sigtable td { height: 58px; vertical-align: bottom; }
.lz-doc table.lz-sigtable .sig-img { max-height: 46px; }
.lz-doc .lz-page h1 + h3 { margin-top: -6px; margin-bottom: 14px; }

/* =========================================================================
   Files — document vault (public/vault.js)
   ========================================================================= */
.vt-hero {
  display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 16px 18px; border-radius: 16px; margin-bottom: 14px;
  background: linear-gradient(120deg, #fff7e6, #eef0fe 60%, #ecfeff);
  border: 1.5px dashed #e5c76b; transition: background .2s, border-color .2s, transform .2s;
}
.vt-hero.drag { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.01); }
.vt-hero-l { display: flex; gap: 12px; align-items: center; min-width: 0; flex: 1 1 320px; }
.vt-hero-ico { font-size: 30px; }
.vt-search { display: flex; gap: 6px; flex: 1 1 320px; max-width: 520px; }
.vt-search input { flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }
.vt-shelves { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 10px; margin-bottom: 14px; }
.vt-shelf {
  display: flex; gap: 10px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 14px;
  border: 1px solid var(--line); background: #fff; cursor: pointer; font: inherit; color: var(--ink);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.vt-shelf:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -12px rgba(16,24,40,.35); }
.vt-shelf.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.vt-shelf.empty { opacity: .55; }
.vt-shelf .tile { width: 38px; height: 38px; border-radius: 11px; font-size: 18px; }
.vt-shelf-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.vt-shelf-txt b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vt-shelf-txt small { color: var(--ink-3); font-size: 12px; }
.vt-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.vt-filters select { padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; font: inherit; background: #fff; max-width: 260px; }
.vt-filters .right { margin-left: auto; }
.vt-year h3 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 18px 0 8px; }
.vt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.vt-card {
  display: flex; gap: 12px; align-items: stretch; text-align: left; padding: 10px; border-radius: 14px;
  border: 1px solid var(--line); background: #fff; cursor: pointer; font: inherit; color: var(--ink); min-width: 0;
  transition: transform .15s, box-shadow .15s;
}
.vt-card:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -14px rgba(16,24,40,.4); }
.vt-thumb {
  flex: none; width: 62px; height: 78px; border-radius: 9px; position: relative; overflow: hidden;
  display: grid; place-items: center; background: #f4f5f8; border: 1px solid var(--line);
}
.vt-thumb img { width: 100%; height: 100%; object-fit: cover; }
.vt-thumb.pdf { background: linear-gradient(160deg, #fff1f0, #ffe4e1); }
.vt-thumb.doc { background: linear-gradient(160deg, #eef4ff, #dbe7ff); }
.vt-thumb.xls { background: linear-gradient(160deg, #ecfdf3, #d1fadf); }
.vt-cat-ico { font-size: 24px; margin-top: 10px; }
.vt-badge {
  display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .04em; color: #fff; background: #d92d20;
  border-radius: 5px; padding: 1px 5px; line-height: 1.5;
}
.vt-thumb .vt-badge { position: absolute; top: 6px; left: 6px; }
.vt-thumb.doc .vt-badge { background: #1d4ed8; } .vt-thumb.xls .vt-badge { background: #067647; }
.vt-thumb.other .vt-badge { background: #475467; }
.vt-badge.sm { font-size: 9.5px; padding: 0 4px; background: #475467; }
.vt-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.vt-title { font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.vt-meta { font-size: 12px; color: var(--ink-2); }
.vt-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: auto; }
.vt-tag { font-size: 11px; padding: 1px 7px; border-radius: 999px; color: #fff; background: linear-gradient(150deg, var(--a), var(--b)); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.vt-tag.plain { background: #f2f4f7; color: var(--ink-2); }
.vt-up-list { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; }
.vt-up-row { display: grid; grid-template-columns: auto 1fr 190px auto; gap: 8px; align-items: center; }
.vt-up-row input, .vt-up-row select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; min-width: 0; }
.modal.vt-modal { max-width: 1180px; width: 96vw; }
.vt-open { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.vt-preview { width: 100%; height: 72vh; border: 1px solid var(--line); border-radius: 12px; background: #f4f5f8; }
.vt-preview.img { display: grid; place-items: center; overflow: auto; }
.vt-preview.img img { max-width: 100%; max-height: 100%; }
.vt-preview.none { display: grid; place-items: center; align-content: center; gap: 8px; height: 240px; }
.vt-file-meta { margin-bottom: 8px; overflow-wrap: anywhere; }
.vt-open-actions { display: flex; gap: 6px; margin-bottom: 10px; }
.vt-mini { display: flex; flex-direction: column; }
.vt-mini-row { display: flex; gap: 8px; align-items: center; padding: 6px 4px; border-bottom: 1px solid var(--line); color: var(--ink); }
.vt-mini-row:hover { background: #f8f9fc; text-decoration: none; }
.vt-mini-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 860px) {
  .vt-open { grid-template-columns: 1fr; }
  .vt-preview { height: 52vh; }
  .vt-up-row { grid-template-columns: auto 1fr; }
  .vt-up-row select, .vt-up-row .hint { grid-column: 2; }
}
/* company logo in the header + letterhead */
.hdr-brand .mark.logo { background: #fff; padding: 3px; box-shadow: 0 4px 12px -6px rgba(16,24,40,.35), inset 0 0 0 1px rgba(16,24,40,.06); }
.hdr-brand .mark.logo img { width: 100%; height: 100%; object-fit: contain; }
.co-logo { width: 62px; height: 62px; border-radius: 18px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; padding: 5px; flex: none; }
.co-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lz-letterhead { display: flex; justify-content: center; margin: -6px 0 14px; }
.lz-letterhead img { max-height: 74px; max-width: 220px; object-fit: contain; }

/* ===================== Financials: ledger, banking, checks (VEX-CRM design) ===================== */
.fin-range { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; }
.fin-range-custom { display: inline-flex; gap: 6px; align-items: center; margin-left: 6px; }
.fin-range input[type=date], .fin-range select { padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.fin-filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.fin-filters label { display: flex; flex-direction: column; font-size: 12px; color: var(--ink-2); gap: 4px; }
.fin-filters input, .fin-filters select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
tr.dim td { opacity: .55; }
tr.strike td { text-decoration: line-through; }
tr.fin-group td { font-weight: 700; background: #f8fafc; text-transform: uppercase; font-size: 11.5px; letter-spacing: .05em; color: var(--ink-2); }
tr.fin-sub td { font-weight: 700; border-top: 1px solid var(--line); }
tr.fin-total td { font-weight: 800; border-top: 2px solid var(--ink); }
tr.fin-total.big td { font-size: 15px; }
.fin-statement table td:first-child { width: 70%; }
.fin-gl h2 a { color: var(--ink); }
.fin-banks { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.fin-bank { margin: 0 !important; }
.fin-bank-h { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.fin-bank-bal { font-size: 28px; font-weight: 800; margin: 8px 0; font-variant-numeric: tabular-nums; }
.fin-bank-bal.red { color: var(--red); }
.fin-bank-grid { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; }
.fin-bank-grid span { color: var(--ink-3); }
.fin-bank-grid b { font-weight: 600; text-align: right; }
.fin-bank-actions { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.card.dim { opacity: .6; }
.fin-acct-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 12px; }
.bankcard.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.bankcard.undep { border-style: dashed; border-color: #f5b041; background: var(--amber-bg); }
.fin-register tr.fin-out td { background: #fffbeb; }
.fin-lines select, .fin-lines input:not([type=checkbox]) { width: 100%; padding: 6px; border: 1px solid #d0d5dd; border-radius: 7px; font: inherit; min-width: 80px; }
.fin-tabs { display: flex; gap: 6px; margin: 14px 0 8px; }
.fin-wc-total { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 12px 14px; margin-top: 10px; background: #f8fafc; border-radius: 10px; flex-wrap: wrap; }
.fin-wc-total b { font-size: 20px; }
.fin-stock label, .fin-choice { display: block; padding: 6px 0; cursor: pointer; }
.fin-nudge > div { display: flex; align-items: center; gap: 6px; margin: 6px 0; }
.fin-nudge span { width: 92px; color: var(--ink-2); font-size: 13px; }
.fin-nudge input { width: 80px; padding: 6px; border: 1px solid var(--line); border-radius: 7px; text-align: center; font: inherit; }
.fin-steps { padding-left: 18px; line-height: 1.7; }
.fin-checkface { border: 1px solid #94a3b8; border-radius: 8px; background: #fefce8; padding: 14px 16px; margin-bottom: 12px; font-size: 13px; }
.fin-cf-top { display: flex; justify-content: space-between; color: var(--ink-2); }
.fin-cf-date { text-align: right; margin: 8px 0; }
.fin-cf-amt { display: inline-block; border: 1px solid var(--ink); padding: 2px 10px; margin-left: 10px; font-weight: 800; }
.fin-cf-pay, .fin-cf-words, .fin-cf-memo { border-bottom: 1px solid #94a3b8; padding: 6px 0; }
.fin-recon-h { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.fin-recon-h > div { display: flex; flex-direction: column; gap: 4px; }
.fin-recon-h span { font-size: 12px; color: var(--ink-2); }
.fin-recon-h b { font-size: 18px; font-variant-numeric: tabular-nums; }
.fin-recon-h input { padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-weight: 700; width: 100%; }
.fin-recon-h .ok b { color: var(--green); }
.fin-recon-h .bad b { color: var(--red); }
tr.fin-ticked td { background: #f0fdf4; }
tr.fin-late td { background: #fff5f5; }
.fin-todo { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-top: 14px; }
.fin-todo a { color: var(--ink); padding: 6px 10px; border-radius: 8px; background: #f8fafc; border: 1px solid var(--line); }
.fin-todo a:hover { border-color: var(--accent); }
.fin-report h3 { font-size: 14px; }
@media (max-width: 920px) { .fin-recon-h { grid-template-columns: repeat(2, 1fr); } }
@media print {
  .fin-range, .fin-filters, .fin-acct-row, .fin-bank-actions, .fin-todo { display: none !important; }
  .fin-register tr.fin-out td, tr.fin-ticked td { background: none; }
}
.fin-pdf { height: 62vh; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #525659; }
.fin-pdf iframe { width: 100%; height: 100%; border: 0; }

/* ===================== Account security ===================== */
.sec-card { max-width: 480px; }
.sec-pw { display: flex; gap: 6px; }
.sec-pw input { flex: 1; }
.sec-meter { margin: 6px 0 4px; }
.sec-bar { height: 6px; border-radius: 4px; background: var(--line); overflow: hidden; }
.sec-bar i { display: block; height: 100%; width: 0; transition: width .2s; }
.sec-meter ul { list-style: none; padding: 0; margin: 6px 0 0; font-size: 12.5px; color: var(--ink-3); }
.sec-meter li.ok { color: var(--green); }
.sec-code { font-size: 22px; letter-spacing: .25em; text-align: center; font-variant-numeric: tabular-nums; }
.sec-steps { padding-left: 18px; line-height: 1.6; }
.sec-steps li { margin-bottom: 12px; }
.sec-qr { margin: 8px 0; }
.sec-qr svg { width: 190px; height: 190px; border: 1px solid var(--line); border-radius: 8px; }
.sec-key { display: inline-block; font-size: 13px; letter-spacing: .08em; background: #f8fafc; padding: 3px 6px; border-radius: 6px; word-break: break-all; }
.sec-row { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.sec-row input { max-width: 180px; padding: 8px; border: 1px solid #d0d5dd; border-radius: 8px; }
.sec-err { color: var(--red); font-weight: 600; min-height: 1px; margin: 6px 0 0; }
.sec-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.sec-codes code { background: #f8fafc; border: 1px solid var(--line); border-radius: 6px; padding: 6px; text-align: center; font-size: 14px; letter-spacing: .06em; }
.sec-check { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.sec-check > div { display: flex; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.sec-check > div.todo { background: #fffbeb; border-color: #fde68a; }
.sec-setup { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sec-setup .card { margin: 0 !important; }
@media (max-width: 720px) { .sec-setup { grid-template-columns: 1fr; } }
.sec-drop { border: 1.5px dashed var(--line); border-radius: 10px; padding: 12px; margin: 8px 0; }
.sec-progress { height: 8px; background: var(--line); border-radius: 5px; overflow: hidden; margin-top: 8px; }
.sec-progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.sec-fullbackup { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 14px; margin: 0 0 12px; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; }
.sec-fb-actions { display: flex; gap: 6px; }

/* ===================== KIDDOS ===================== */
.kd-holders { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 2px 12px; margin-bottom: 8px; }
.kd-me-h { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.kd-me-total { font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; }
.kd-me-kpis { display: flex; gap: 18px; }
.kd-me-kpis div, .kd-me-accts div { display: flex; flex-direction: column; }
.kd-me-kpis span, .kd-me-accts span { font-size: 12px; color: var(--ink-3); }
.kd-me-kpis b { font-size: 18px; }
.kd-me-accts { display: flex; gap: 22px; flex-wrap: wrap; padding: 10px 0 12px; border-top: 1px solid var(--line); }
.kd-cred { display: grid; gap: 6px; padding: 12px 14px; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; }
.kd-cred div { display: flex; gap: 10px; align-items: baseline; }
.kd-cred span { width: 80px; color: var(--ink-3); font-size: 12.5px; }
.kd-cred code { font-size: 15px; letter-spacing: .02em; word-break: break-all; }
.kd-pw #kd-pw { width: 100%; padding: 8px; border: 1px solid #d0d5dd; border-radius: 8px; margin: 4px 0 6px; }
