/* ==========================================================================
   VEKTOR · Sistema visual 2026
   Capa de identidad sobre style.css. Tipografía propia, contraste, jerarquía,
   movimiento reducido y componentes de producto.
   ========================================================================== */

@font-face {
  font-family: 'Inter Vektor';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter Vektor';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Sora Vektor';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/sora-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Sora Vektor';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/sora-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --font-ui: 'Inter Vektor', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-display: 'Sora Vektor', 'Inter Vektor', 'Segoe UI', sans-serif;
  --font-mono: 'Cascadia Mono', 'Consolas', ui-monospace, monospace;

  --bg: #f6f5ef;
  --paper: #ffffff;
  --ink: #102b26;
  --ink-soft: #29433c;
  --muted: #5a6e64;
  --muted-2: #7d8c84;
  --line: #e3e6dc;
  --line-strong: #d2d8cb;
  --green: #147a64;
  --green-dark: #0f5f4f;
  --green-deep: #0b322c;
  --green-ink: #08251f;
  --mint: #e7f3ec;
  --mint-2: #d7ecdf;
  --lime: #d8f36e;
  --lime-soft: #eef9c9;
  --clay: #b9663b;
  --sand: #f3eddc;
  --danger: #a33c33;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-xs: 0 1px 2px rgba(11, 50, 44, .05);
  --shadow-sm: 0 1px 2px rgba(11, 50, 44, .05), 0 10px 30px -22px rgba(11, 50, 44, .35);
  --shadow-md: 0 2px 4px rgba(11, 50, 44, .06), 0 24px 60px -38px rgba(11, 50, 44, .45);
  --ring: 0 0 0 3px rgba(20, 122, 100, .22);
  color-scheme: light;
}

html { font-family: var(--font-ui); font-size: 15px; -webkit-text-size-adjust: 100%; }
body {
  background:
    radial-gradient(1100px 480px at 82% -10%, rgba(216, 243, 110, .16), transparent 62%),
    radial-gradient(900px 520px at 8% 0%, rgba(117, 201, 181, .10), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--lime); color: var(--green-ink); }
h1, h2, h3, h4, .brand, .home-heading, .auth-box h2, .story-content h1 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.8px;
}
h1 { font-size: clamp(30px, 3vw, 38px); line-height: 1.08; letter-spacing: -1.3px; }
h2 { font-size: 18px; line-height: 1.3; letter-spacing: -.4px; }
h3 { font-size: 15.5px; letter-spacing: -.2px; }
p { line-height: 1.62; }
small, .muted { color: var(--muted); }
a { color: var(--green-dark); }

/* ---------- Sidebar ---------- */
.layout { grid-template-columns: 264px minmax(0, 1fr); }
.sidebar {
  width: 264px;
  padding: 22px 16px 14px;
  background:
    radial-gradient(420px 260px at 20% 0%, rgba(216, 243, 110, .10), transparent 70%),
    linear-gradient(178deg, #0d3730 0%, #0a2f29 52%, #07241f 100%);
  color: #d6e6dc;
  border-right: 1px solid rgba(255, 255, 255, .06);
}
.sidebar .brand { padding: 2px 10px 0; gap: 11px; font-size: 26px; letter-spacing: -1.4px; }
.sidebar .brand img { width: 36px; height: 36px; filter: drop-shadow(0 6px 14px rgba(0,0,0,.28)); }
.sidebar .brand .muted { color: #91ab9d !important; font-size: 12px; }
.product-label {
  margin: 13px 10px 15px;
  padding: 5px 10px;
  width: fit-content;
  border: 1px solid rgba(216, 243, 110, .28);
  border-radius: 999px;
  color: #e4f6b3;
  font-size: 9.5px;
  letter-spacing: 2.2px;
  background: rgba(216, 243, 110, .07);
}
.tenant-switch {
  margin: 0 6px 14px;
  padding: 11px 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.035));
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 13px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.tenant-switch:hover { border-color: rgba(216, 243, 110, .28); }
.tenant-avatar { background: var(--lime); color: #163a2e; border-radius: 9px; box-shadow: 0 4px 12px rgba(0,0,0,.18); }
.tenant-switch b { font-size: 12.5px; max-width: 150px; }
.tenant-switch small { color: #a9c0b4; font-size: 10.5px; }
.nav-scroll { padding: 2px 0 8px; scrollbar-color: #3a5a4e transparent; }
.sidebar .nav-item { font-size: 12.8px; padding: 9px 11px; border-radius: 10px; gap: 11px; margin-bottom: 2px; color: #c7d9cf; }
.sidebar .nav-item .icon { width: 18px; height: 18px; opacity: .92; }
.sidebar .nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar .nav-item.active {
  background: linear-gradient(180deg, #e2fa86, #d3ef63);
  color: #143527;
  font-weight: 650;
  box-shadow: 0 8px 22px -10px rgba(216, 243, 110, .55);
}
.sidebar .nav-item.active .icon { opacity: 1; }
.navigation-group { border-top: 0; margin: 2px 0; }
.navigation-group > summary {
  padding: 10px 11px;
  border-radius: 10px;
  font-size: 12.4px;
  font-weight: 550;
  color: #bed2c6;
  letter-spacing: .1px;
}
.navigation-group > summary:hover { background: rgba(255,255,255,.06); color: #fff; }
.navigation-group[open] > summary { color: #ecf7f0; }
.navigation-group[open] > summary::after { opacity: .7; }
.navigation-group > div { padding-left: 6px; border-left: 1px solid rgba(255,255,255,.07); margin: 2px 0 4px 15px; padding-bottom: 4px; }
.sidebar-footer.compact { padding-top: 6px; }
.folio-balance {
  margin: 4px 6px 8px;
  padding: 11px 13px;
  border: 1px solid rgba(216, 243, 110, .20);
  border-radius: 12px;
  background: rgba(216, 243, 110, .06);
  color: #e9f7d6;
  font-size: 10.5px;
}
.folio-balance strong { color: #f3ffd4; font-size: 17px; font-family: var(--font-display); }
.folio-balance small { color: #a9c0b4; }
.sidebar-footer .account { border-top: 1px solid rgba(255,255,255,.09); padding: 13px 6px 0; }
.account .identity b { font-size: 12px; }
.account .identity small { color: #9cb4a8; }

/* ---------- Topbar ---------- */
.topbar {
  height: 74px;
  padding: 0 34px;
  background: rgba(250, 249, 244, .82);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid rgba(16, 43, 38, .08);
  position: sticky;
  top: 0;
  z-index: 8;
}
.top-actions { gap: 9px; }
.header-home img { border-radius: 9px; box-shadow: var(--shadow-xs); }
.environment {
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid #e3dcc4;
  background: #fbf6e7;
  color: #7c6735;
  font-size: 9.5px;
  letter-spacing: .7px;
  font-weight: 700;
  white-space: nowrap;
}
.environment.live { background: #e8f6ee; border-color: #bfe2cd; color: #216b4d; }
.icon-button { border-radius: 10px; padding: 8px; }
.icon-button:hover { background: rgba(16, 43, 38, .06); }
.store-trigger, .workspace-search-trigger { border-radius: 11px; background: #fff; }
.workspace-search-trigger { color: var(--muted); }
.avatar { background: linear-gradient(180deg, #f4efe0, #e8dfc8); color: #5f5237; box-shadow: inset 0 1px 0 #fff; }

/* ---------- Shell ---------- */
.content { max-width: 1400px; padding: 38px 40px 52px; }
.page-heading { margin-bottom: 26px; align-items: flex-end; }
.page-heading h1 { margin-bottom: 6px; }
.page-heading p { font-size: 13px; color: var(--muted); max-width: 720px; }
.eyebrow { font-size: 10px; letter-spacing: 2.4px; font-weight: 700; color: var(--green); margin-bottom: 9px; }
.page-footer { margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 10px; color: var(--muted-2); }

/* ---------- Buttons ---------- */
.btn {
  border: 1px solid #d9dfd3;
  background: #fff;
  color: var(--ink);
  padding: 10px 15px;
  border-radius: 11px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -.05px;
  gap: 8px;
  min-height: 38px;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.btn .icon { width: 17px; height: 17px; }
.btn:hover { border-color: #b9c6b8; background: #fcfdf8; box-shadow: 0 4px 14px -10px rgba(11,50,44,.4); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: linear-gradient(180deg, #1a8a70, #126c59);
  border-color: #0f6250;
  color: #fff;
  box-shadow: 0 8px 20px -12px rgba(20, 122, 100, .75), inset 0 1px 0 rgba(255,255,255,.16);
}
.btn.primary:hover { background: linear-gradient(180deg, #1d987b, #137863); border-color: #0f6d59; }
.btn.lime { background: var(--lime); border-color: #c9e45d; color: #17392b; }
.btn.danger { color: #9d3b32; border-color: #eccfc9; background: #fffafa; }
.btn.small { font-size: 11px; padding: 6px 10px; min-height: 30px; border-radius: 9px; }
.auth-link { font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.auth-link .icon { width: 15px; height: 15px; }

/* ---------- Panels, cards, tables ---------- */
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.panel-head { padding: 22px 24px; }
.panel-head h2 { font-size: 15.5px; }
.panel-head p { font-size: 11px; color: var(--muted); }
.panel-body { padding: 0 24px 24px; }
.cards-grid { gap: 18px; }
.entity-card { border-radius: var(--radius); }
button.entity-card { width: 100%; text-align: left; color: inherit; font: inherit; cursor: pointer; }
button.entity-card:hover { border-color: var(--green); box-shadow: var(--shadow-md); }
.soon-panel > summary { cursor: pointer; padding: 18px 22px; font-family: var(--font-display); font-size: 14px; font-weight: 600; color: var(--ink); }
.soon-panel > summary::marker { color: var(--green); }
.soon-panel .cards-grid { padding: 0 22px 22px; }
.complement-table { table-layout: fixed; width: 100%; }
.complement-table th:nth-child(1), .complement-table td:nth-child(1) { width: 20%; }
.complement-table th:nth-child(2), .complement-table td:nth-child(2) { width: 45%; white-space: normal; line-height: 1.45; }
.complement-table th:nth-child(3), .complement-table td:nth-child(3) { width: 14%; }
.complement-table th:nth-child(4), .complement-table td:nth-child(4) { width: 21%; white-space: normal; }
.complement-table td:nth-child(2) .auth-link { margin-top: 5px; font-size: 10.5px; }
@media (max-width: 700px) {
  .complement-table th:nth-child(3), .complement-table td:nth-child(3) { display: none; }
  .complement-table th:nth-child(1), .complement-table td:nth-child(1) { width: 26%; }
  .complement-table th:nth-child(2), .complement-table td:nth-child(2) { width: 50%; }
  .complement-table th:nth-child(4), .complement-table td:nth-child(4) { width: 24%; }
}
.addenda-table { table-layout: fixed; width: 100%; }
.addenda-table th:nth-child(1), .addenda-table td:nth-child(1) { width: 25%; }
.addenda-table th:nth-child(2), .addenda-table td:nth-child(2) { width: 38%; white-space: normal; line-height: 1.45; }
.addenda-table th:nth-child(3), .addenda-table td:nth-child(3) { width: 14%; }
.addenda-table th:nth-child(4), .addenda-table td:nth-child(4) { width: 23%; }
.addenda-table .addenda-actions { display: flex; flex-direction: column; align-items: stretch; gap: 5px; white-space: normal; min-width: 0; }
.addenda-actions .btn { width: 100%; min-height: 32px; padding: 6px 8px; font-size: 10px; white-space: nowrap; justify-content: flex-start; text-align: left; line-height: 1.25; }
.addenda-actions .btn .icon { width: 14px; height: 14px; }
@media (max-width: 700px) {
  .addenda-table th:nth-child(2), .addenda-table td:nth-child(2) { display: none; }
  .addenda-table th:nth-child(1), .addenda-table td:nth-child(1) { width: 42%; }
  .addenda-table th:nth-child(3), .addenda-table td:nth-child(3) { width: 20%; }
  .addenda-table th:nth-child(4), .addenda-table td:nth-child(4) { width: 38%; }
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chips .badge { white-space: nowrap; }
.kpi { border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 21px 22px; }
.kpi-top { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .1px; }
.kpi-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--mint); color: var(--green); }
.kpi-value { font-family: var(--font-display); font-size: 28px; font-weight: 600; letter-spacing: -1px; margin: 15px 0 9px; }
.kpi-sub { font-size: 11px; }
.kpi-sub b { color: var(--green); font-weight: 600; }
.table-wrap { overflow: auto; scrollbar-width: thin; scrollbar-color: #bcc9b8 transparent; }
.table-hint { display: none; margin: 9px 20px 14px; font-size: 10.5px; color: var(--muted); }
.dashboard-table table { table-layout: fixed; width: 100%; }
.dashboard-table th, .dashboard-table td { padding: 11px 10px; }
.dashboard-table th:first-child, .dashboard-table td:first-child { padding-left: 18px; width: 30%; }
.dashboard-table th:nth-child(2), .dashboard-table td:nth-child(2) { width: 34%; }
.dashboard-table th:nth-child(3), .dashboard-table td:nth-child(3) { width: 16%; }
.dashboard-table th:nth-child(4), .dashboard-table td:nth-child(4) { width: 14%; text-align: right; }
.dashboard-table th:last-child, .dashboard-table td:last-child { width: 6%; padding-right: 8px; padding-left: 2px; text-align: right; }
.dashboard-table .icon-button { padding: 4px; }
.dashboard-table .cell-name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dashboard-table td:nth-child(2) .cell-secondary { overflow: hidden; text-overflow: ellipsis; }
.dashboard-table td:nth-child(3) .badge { white-space: nowrap; }
@media (max-width: 760px) {
  .dashboard-table th:nth-child(2), .dashboard-table td:nth-child(2) { display: none; }
}
@media (max-width: 480px) {
  .dashboard-table th, .dashboard-table td { padding: 10px 8px; }
  .dashboard-table th:first-child, .dashboard-table td:first-child { padding-left: 12px; }
  .dashboard-table th:last-child, .dashboard-table td:last-child { display: none; }
}
table { font-variant-numeric: tabular-nums; }
th {
  font-size: 10.5px;
  color: #5f7268;
  background: #fafbf6;
  padding: 12px 20px;
  letter-spacing: .6px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
td { padding: 15px 20px; font-size: 12.5px; border-bottom: 1px solid #eef0e8; }
tbody tr { transition: background .12s ease; }
tbody tr:hover { background: #fbfcf7; }
.cell-secondary { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.mono { font-family: var(--font-mono); font-size: .93em; letter-spacing: -.2px; }
.badge { font-size: 10px; padding: 4px 8px; border-radius: 6px; font-weight: 600; letter-spacing: .1px; color: #5f6f64; }
.badge .dot { width: 5px; height: 5px; }
.badge.good { background: #e7f6ed; color: #27724d; }
.badge.warn { background: #fdf3dc; color: #8d6422; }
.badge.bad { background: #fbeae6; color: #9c443a; }
.badge.blue { background: #eaf1fb; color: #3f6392; }
.toolbar { padding: 15px 20px; gap: 10px; }
.search { border-radius: 10px; padding: 8px 11px; max-width: 360px; border-color: #dde2d7; background: #fbfcf8; }
.search input { font-size: 12.5px; }
.toolbar select { border-radius: 9px; padding: 8px 10px; font-size: 12px; border-color: #dde2d7; background: #fff; }
.empty { padding: 56px 24px; }
.empty .icon { width: 38px; height: 38px; color: var(--green); background: var(--mint); padding: 9px; border-radius: 12px; margin-bottom: 16px; box-sizing: content-box; }
.empty h3 { font-family: var(--font-display); font-size: 17px; }
.empty p { font-size: 12.5px; max-width: 440px; margin: 0 auto; }
.notice { border-radius: 12px; padding: 12px 15px; font-size: 12px; border-color: #e9e1c8; background: #fcf8eb; color: #725f32; }
.notice .icon { width: 18px; height: 18px; }
.notice.info { background: #edf6f1; border-color: #cfe6da; color: #35614e; }
.notice.error { background: #fdf0ed; border-color: #eed1cb; color: #943b33; }

/* ---------- Forms ---------- */
.field { gap: 6px; font-size: 11.5px; color: #4b6257; font-weight: 600; letter-spacing: .1px; }
.field input, .field select, .field textarea {
  border: 1px solid #d9dfd2;
  border-radius: 10px;
  padding: 11px 12px;
  background: #fcfcf8;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 450;
  transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: #c3cdbd; }
.field input:focus, .field select:focus, .field textarea:focus { background: #fff; border-color: var(--green); outline: 0; box-shadow: var(--ring); }
.field small { font-size: 10.5px; font-weight: 400; color: var(--muted); line-height: 1.55; }
.form-grid { gap: 16px; }
.form-error { border-radius: 10px; font-size: 12px; }
.check-field { font-size: 12.5px; }
.selection-bar { padding: 12px 20px; font-size: 11.5px; }

/* ---------- Dialogs ---------- */
dialog { border-radius: 20px; box-shadow: 0 30px 120px rgba(8, 37, 31, .38); border-color: #e1e5da; }
dialog::backdrop { background: rgba(8, 37, 31, .48); backdrop-filter: blur(4px); }
.modal-head { padding: 22px 26px; }
.modal-head h2 { font-size: 19px; }
.modal-body { padding: 22px 26px; }
.modal-foot { padding: 16px 26px; background: #fbfcf7; }
.capture-dialog { border-radius: 20px; }

/* ---------- Auth ---------- */
.auth { grid-template-columns: 47% 53%; background: var(--bg); }
.auth-story {
  padding: 44px 7.5vw 34px;
  background:
    radial-gradient(720px 520px at 85% 12%, rgba(216, 243, 110, .16), transparent 60%),
    radial-gradient(620px 480px at 0% 100%, rgba(117, 201, 181, .14), transparent 55%),
    linear-gradient(160deg, #0d3a32 0%, #08271f 78%);
  isolation: isolate;
}
.auth-story::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(70% 60% at 60% 40%, #000 0%, transparent 78%);
}
.auth-story::after {
  content: '';
  position: absolute;
  right: -120px;
  bottom: -160px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(216, 243, 110, .35), rgba(216, 243, 110, 0) 62%);
  filter: blur(6px);
  z-index: -1;
}
.auth-story .brand { font-size: 30px; letter-spacing: -1.6px; }
.auth-story .brand img { width: 42px; height: 42px; }
.story-content { padding: 44px 0 34px; }
.story-content .eyebrow { color: #d9f77c; font-size: 10.5px; letter-spacing: 3px; }
.story-content h1 { font-size: clamp(36px, 4.1vw, 56px); line-height: 1.04; letter-spacing: -2.2px; margin: 21px 0 22px; }
.story-content h1 em { font-style: normal; color: var(--lime); }
.story-content > p { color: #c4d8cc; font-size: 14px; line-height: 1.75; max-width: 430px; }
.story-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.story-chip {
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.055);
  color: #dcebe1;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 10.5px;
  letter-spacing: .2px;
  backdrop-filter: blur(4px);
}
.auth-story footer { color: #8fab9c; font-size: 10.5px; letter-spacing: .2px; }
.story-proof {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 22px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  max-width: 440px;
}
.story-proof b { display: block; color: #f2fbe5; font-family: var(--font-display); font-size: 12.5px; font-weight: 600; margin-bottom: 3px; }
.story-proof span { color: #a9c0b4; font-size: 10.5px; line-height: 1.55; display: block; }
.auth-eyebrow { margin: 12px 0 0; color: var(--green); font-size: 9.5px; }
@media (max-height: 790px) {
  .auth-trust { display: none; }
  .auth-note { margin-top: 10px; }
  .story-proof { display: none; }
  .story-content { margin: 0; padding: 26px 0 18px; }
  .story-content h1 { font-size: clamp(34px, 3.8vw, 50px); margin: 16px 0 18px; }
  .story-chips { margin-top: 18px; }
  .story-content > p { font-size: 13px; }
}
.auth-main { padding: 26px 34px; background: transparent; }
.auth-box {
  max-width: 438px;
  background: #fff;
  border: 1px solid #e4e7dd;
  border-radius: 24px;
  padding: 30px 32px 24px;
  box-shadow: 0 2px 4px rgba(11,50,44,.04), 0 40px 90px -60px rgba(11,50,44,.55);
}
.auth-box.wide { max-width: 580px; }
.auth-box h2 { font-size: 29px; letter-spacing: -1.1px; margin: 12px 0 8px; }
.auth-box > p { font-size: 12.5px; color: var(--muted); line-height: 1.65; margin-bottom: 18px; }
.auth-mobile-brand { display: none; }
.auth-mark { width: 42px; height: 42px; border-radius: 13px; background: linear-gradient(160deg, #eaf9c6, #d8f36e); color: #1f4a38; box-shadow: inset 0 1px 0 #fff; }
.auth-box form { gap: 12px; }
.auth-box .btn { padding: 12px; border-radius: 11px; font-size: 13px; }
.auth-box .notice { margin-bottom: 14px; padding: 9px 12px; font-size: 11px; }
.auth-bottom { font-size: 12px; color: var(--muted); margin-top: 14px; }
.auth-link { color: var(--green-dark); }
.auth-help { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 2px; }
.auth-help .auth-link { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.auth-help .auth-link:hover { color: var(--green-dark); }
.auth-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #eceee6;
  color: var(--muted);
  font-size: 10px;
}
.auth-trust span { display: inline-flex; align-items: center; gap: 5px; }
.auth-trust .icon { width: 13px; height: 13px; color: var(--green); }
.auth-note { margin-top: 12px; text-align: center; font-size: 10.5px; color: var(--muted-2); line-height: 1.55; }
.auth-note a { color: var(--green-dark); font-weight: 600; }

/* ---------- Dashboard ---------- */
.dash-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 22px;
  margin-bottom: 24px;
}
.dash-hero .eyebrow { margin-bottom: 8px; }
.dash-hero h1 { font-size: clamp(30px, 3.2vw, 42px); margin-bottom: 9px; }
.dash-hero p { color: var(--muted); font-size: 13.5px; max-width: 720px; }
.dash-hero p strong { color: var(--ink); font-weight: 600; }
.dash-date {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 11.5px;
}
.dash-date .icon { width: 15px; height: 15px; color: var(--green); }
.dash-hero > div:first-child { flex: 1; min-width: 0; }
.dash-actions { display: flex; flex-wrap: wrap; gap: 9px; justify-content: flex-end; flex: 0 0 auto; }
@media (min-width: 1200px) { .dash-actions { flex-wrap: nowrap; } }
.dash-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.dash-kpis .kpi { position: relative; overflow: hidden; }
.dash-kpis .kpi::after {
  content: '';
  position: absolute;
  right: -44px;
  top: -54px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(216,243,110,.24), transparent 68%);
  pointer-events: none;
}
.dash-kpis .kpi.highlight { background: linear-gradient(150deg, #0e3d34, #0a2e28); border-color: #0e3d34; color: #fff; }
.dash-kpis .kpi.highlight .kpi-top, .dash-kpis .kpi.highlight .kpi-sub { color: #b5cec0; }
.dash-kpis .kpi.highlight .kpi-sub b { color: var(--lime); }
.dash-kpis .kpi.highlight .kpi-icon { background: rgba(216,243,110,.14); color: var(--lime); }
.dash-kpis .kpi.highlight::after { background: radial-gradient(circle, rgba(216,243,110,.22), transparent 66%); }
.kpi-delta { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 3px 7px; }
.kpi-delta.up { background: #e7f6ed; color: #27724d; }
.kpi-delta.down { background: #fbeae6; color: #9c443a; }
.kpi-delta.flat { background: #f0f2ec; color: var(--muted); }
.dash-kpis .kpi.highlight .kpi-delta.up { background: rgba(216,243,110,.16); color: var(--lime); }
.dashboard-grid { grid-template-columns: minmax(0, 1fr) 348px; gap: 18px; margin-bottom: 20px; }
.side-panels { display: grid; gap: 18px; align-content: start; }
.side-panels > .panel { margin: 0 !important; }
.activity-panel .panel-head { padding-bottom: 6px; }
.activity-total { display: flex; align-items: baseline; gap: 10px; padding: 4px 24px 8px; }
.activity-total strong { font-family: var(--font-display); font-size: 34px; letter-spacing: -1.3px; font-weight: 600; }
.activity-total span { color: var(--muted); font-size: 11.5px; }
.chart-wrap { padding: 4px 14px 14px; }
.chart-wrap svg.chart { width: 100%; height: auto; display: block; }
.chart text { font-family: var(--font-ui); font-size: 9px; fill: #7d8c84; }
.chart-grid { stroke: #edf0e7; stroke-dasharray: 3 5; }
.quick-list { list-style: none; margin: 0; padding: 0 12px 14px; display: grid; gap: 2px; }
.quick-list li { margin: 0; }
.quick-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 11px 12px;
  border-radius: 11px;
  text-align: left;
  color: var(--ink);
  text-decoration: none;
  font: inherit;
}
.quick-item:hover { background: #f7f9f2; text-decoration: none; }
.quick-item .icon { width: 17px; height: 17px; color: var(--green); flex: none; }
.quick-item span { flex: 1; min-width: 0; }
.quick-item strong { display: block; font-size: 12.5px; font-weight: 600; }
.quick-item small { display: block; color: var(--muted); font-size: 10.5px; margin-top: 1px; }
.quick-item .count { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--ink); }
.quick-empty { padding: 8px 22px 20px; color: var(--muted); font-size: 12px; display: flex; gap: 9px; align-items: flex-start; }
.quick-empty .icon { color: var(--green); width: 18px; height: 18px; flex: none; }
.plan-box { padding: 2px 22px 22px; }
.plan-box .plan-name { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
.plan-box .plan-name strong { color: var(--ink); font-size: 12.5px; }
.plan-meter { height: 9px; border-radius: 999px; background: #edf1e6; overflow: hidden; margin: 13px 0 8px; }
.plan-meter i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #1a8a70, #8fc73e); }
progress.plan-progress {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 9px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: #edf1e6;
  margin: 13px 0 8px;
  display: block;
}
progress.plan-progress::-webkit-progress-bar { background: #edf1e6; border-radius: 999px; }
progress.plan-progress::-webkit-progress-value { background: linear-gradient(90deg, #1a8a70, #8fc73e); border-radius: 999px; }
progress.plan-progress::-moz-progress-bar { background: linear-gradient(90deg, #1a8a70, #8fc73e); border-radius: 999px; }
.plan-box .plan-numbers { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); }
.plan-box .plan-numbers b { color: var(--ink); }
.plan-box .plan-payments { margin-top: 8px; }
.plan-box .btn { width: 100%; margin-top: 14px; justify-content: center; }
.plan-note { font-size: 10px; color: var(--muted); margin-top: 9px; line-height: 1.5; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Setup checklist */
.setup-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 26px;
  padding: 26px 28px;
  margin-bottom: 20px;
  border-radius: 20px;
  color: #f1f8f2;
  background:
    radial-gradient(420px 260px at 92% 8%, rgba(216,243,110,.22), transparent 66%),
    linear-gradient(140deg, #103f35, #0a2b25);
  border: 1px solid rgba(255,255,255,.09);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.setup-card::after {
  content: '';
  position: absolute;
  right: -80px;
  bottom: -140px;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(216,243,110,.16);
  border-radius: 50%;
  pointer-events: none;
}
.setup-card .eyebrow { color: var(--lime); }
.setup-card h2 { color: #fff; font-size: 21px; letter-spacing: -.6px; }
.setup-card p { color: #b9d0c3; font-size: 12px; line-height: 1.65; max-width: 520px; }
.setup-progress { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; font-size: 11px; color: #cfe1d5; }
.setup-progress .meter { flex: 1; height: 7px; background: rgba(255,255,255,.12); border-radius: 99px; overflow: hidden; max-width: 220px; }
.setup-progress .meter i { display: block; height: 100%; background: var(--lime); border-radius: 99px; }
progress.setup-meter {
  appearance: none;
  -webkit-appearance: none;
  flex: 1;
  max-width: 220px;
  height: 7px;
  border: 0;
  border-radius: 99px;
  overflow: hidden;
  background: rgba(255,255,255,.12);
}
progress.setup-meter::-webkit-progress-bar { background: rgba(255,255,255,.12); border-radius: 99px; }
progress.setup-meter::-webkit-progress-value { background: var(--lime); border-radius: 99px; }
progress.setup-meter::-moz-progress-bar { background: var(--lime); border-radius: 99px; }
.setup-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; align-self: center; }
.setup-step { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #cfe1d5; }
.setup-step .check { width: 19px; height: 19px; border-radius: 50%; border: 1px solid rgba(255,255,255,.28); display: grid; place-items: center; flex: none; font-size: 10px; }
.setup-step.done { color: #90a99a; text-decoration: line-through; }
.setup-step.done .check { background: var(--lime); border-color: var(--lime); color: #193a2c; }
.setup-step.current { color: #fff; font-weight: 600; }
.setup-step.current .check { border-color: var(--lime); box-shadow: 0 0 0 4px rgba(216,243,110,.12); }
.setup-step a, .setup-step button {
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,.22);
  text-underline-offset: 3px;
  cursor: pointer;
}
.setup-step a:hover, .setup-step button:hover { text-decoration-color: var(--lime); color: #fff; }
.setup-dismiss {
  position: absolute;
  top: 12px;
  right: 13px;
  color: #b9d0c3;
  border: 0;
  background: rgba(255,255,255,.06);
  border-radius: 8px;
  padding: 6px;
  display: grid;
  place-items: center;
}
.setup-dismiss:hover { background: rgba(255,255,255,.12); color: #fff; }
.setup-dismiss .icon { width: 15px; height: 15px; }

/* Period panel */
.period-panel .panel-head { padding-bottom: 10px; }
.period-panel form { display: flex; align-items: end; gap: 12px; padding: 0 24px 18px; flex-wrap: wrap; }
.period-panel form .field { flex: 1 1 130px; }
.period-panel form .btn { margin-bottom: 1px; }
.period-results { border-top: 1px solid var(--line); padding: 18px 24px 22px; }
.period-results h3 { font-size: 11px; text-transform: uppercase; letter-spacing: 1.4px; color: var(--muted); margin-bottom: 14px; }
.period-results dl { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin: 0; }
.period-results dt { font-size: 10.5px; color: var(--muted); margin-bottom: 5px; }
.period-results dd { margin: 0; font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: -.5px; }

@media (max-width: 1300px) {
  .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr) 320px; }
  .invoice-table .col-branch { display: none; }
}
@media (max-width: 1100px) {
  .invoice-table .col-date { display: none; }
  .table-hint { display: block; }
}
@media (max-width: 1100px) {
  .dashboard-grid, .setup-card { grid-template-columns: 1fr; }
  .side-panels { grid-template-columns: 1fr 1fr; }
  .side-panels > .panel { margin: 0 !important; }
  .content { padding: 30px 26px 44px; }
  .topbar { padding: 0 24px; }
  .period-results dl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 940px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar.open { z-index: 30; }
  .sidebar.open ~ .navigation-backdrop { z-index: 20; background: rgba(7, 28, 24, .62); }
  .auth-story { display: none; }
  .auth-mobile-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 20px; }
  .auth-mobile-brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 6px 16px -10px rgba(11,50,44,.6); }
  .auth-mobile-brand b { font-family: var(--font-display); font-size: 23px; letter-spacing: -1.2px; }
  .auth-mobile-brand span { margin-left: 2px; padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 8.5px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }
  .auth-main { padding: 28px 20px; align-items: flex-start; }
  .auth-box { border: 0; box-shadow: none; padding: 10px 4px 20px; background: transparent; border-radius: 0; }
  .auth-box h2 { font-size: 28px; }
  .auth { grid-template-columns: 1fr; }
  .content { padding: 24px 18px 40px; }
  .dash-hero { flex-direction: column; align-items: flex-start; }
  .dash-actions { justify-content: flex-start; }
  .side-panels { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  html { font-size: 15px; }
  .topbar { gap: 4px; padding-inline: 8px; }
  .top-actions { gap: 3px; }
  .top-actions .store-trigger, .workspace-search-trigger { display: none; }
  .environment { font-size: 7px; max-width: 58px; padding: 4px 5px; line-height: 1.18; text-align: center; white-space: normal; letter-spacing: .3px; }
  .header-home img { width: 30px; height: 30px; }
  .workspace-create > summary { padding: 8px 10px; font-size: 10.5px; min-height: 36px; }
  .workspace-create > summary .icon { width: 15px; height: 15px; }
  .dash-kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 16px 15px; }
  .kpi-value, .dash-kpis .kpi-value { font-size: 23px; }
  .kpi-top { font-size: 10px; }
  .kpi-icon { width: 28px; height: 28px; border-radius: 8px; }
  .dashboard-grid { gap: 14px; }
  .setup-card { padding: 22px 18px; }
  .setup-card h2 { font-size: 19px; }
  .period-results dl { grid-template-columns: 1fr 1fr; }
  .activity-total strong { font-size: 28px; }
  .auth-main { padding: 22px 14px; }
  .auth-box { padding: 6px 2px 16px; }
  .auth-box h2 { font-size: 26px; }
  .topbar { padding: 0 12px; }
  .store-trigger { display: none; }
  .page-footer { flex-direction: column; gap: 5px; }
}

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

.annual-packs{margin:0 0 18px}.annual-packs summary{cursor:pointer;font-weight:600;padding:4px 0}.annual-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}.annual-option{display:flex;align-items:flex-start;gap:9px;border:1px solid var(--line);border-radius:10px;padding:11px 12px;background:var(--paper);cursor:pointer}.annual-option:has(input:checked){border-color:var(--green);background:var(--mint)}.annual-option input{margin-top:3px}.annual-option span{min-width:0}.annual-option b{display:block;font-size:12px}.annual-option small{display:block;color:var(--muted);font-size:10px;margin-top:4px}@media(max-width:680px){.annual-grid{grid-template-columns:1fr}}

.credit-note-guide{display:flex;align-items:center;gap:14px;margin:-8px 0 18px;padding:15px 18px;border:1px solid #d7e7df;border-radius:12px;background:linear-gradient(120deg,#f3faf6,#fbfdf9);color:#35584a}.credit-note-guide .credit-note-icon{display:grid;place-items:center;flex:0 0 38px;height:38px;border-radius:10px;background:#e4f2ea;color:var(--green)}.credit-note-guide b{display:block;font-size:12px;color:#224538}.credit-note-guide p{margin-top:4px;font-size:11px;line-height:1.6;color:#5b7468;max-width:760px}.credit-note-guide .btn{margin-left:auto;flex:0 0 auto}@media(max-width:760px){.credit-note-guide{align-items:flex-start;flex-wrap:wrap}.credit-note-guide .btn{margin-left:52px}}

.auth-help{flex-wrap:wrap}.auth-help .auth-link{white-space:nowrap}.recovery-hints{margin:8px 0 0;padding-left:18px;line-height:1.9}.recovery-hints code{font-size:11px;color:#224538}

.order-history li{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:7px 0;border-bottom:1px solid var(--line)}.order-history li:last-child{border-bottom:0}.order-history li>span:first-child{flex:1;min-width:180px}.order-history .btn{padding:6px 9px;font-size:10px}
