/* ============ Sistema de Gestão de Pagamentos — UI ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f4f2ec;
  --bg-grain: #efece3;
  --surface: #fffefb;
  --surface-2: #f7f5ef;
  --surface-3: #efece3;
  --ink: #1c1b18;
  --ink-2: #57544c;
  --ink-3: #8b877c;
  --line: #e3dfd3;
  --line-strong: #d1ccbd;
  --accent: #3d5a45;
  --accent-hover: #2f4636;
  --accent-soft: #e6ede6;
  --gold: #9a7b3f;
  --success: #2f7d56;
  --success-soft: #e2f0e7;
  --warning: #946a23;
  --warning-soft: #f6ecd9;
  --danger: #a23b34;
  --danger-soft: #f6e3e0;
  --info: #3a5a78;
  --info-soft: #e4ecf3;
  --radius-s: 7px;
  --radius: 11px;
  --radius-l: 16px;
  --shadow-s: 0 1px 2px rgba(28,27,24,.06), 0 1px 1px rgba(28,27,24,.04);
  --shadow-m: 0 4px 14px rgba(28,27,24,.08), 0 2px 5px rgba(28,27,24,.05);
  --shadow-l: 0 16px 44px rgba(28,27,24,.16), 0 6px 16px rgba(28,27,24,.09);
  --ring: 0 0 0 3px rgba(61,90,69,.16);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Outfit", -apple-system, BlinkMacSystemFont, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161512;
    --bg-grain: #1b1a16;
    --surface: #211f1b;
    --surface-2: #1c1b17;
    --surface-3: #2a2823;
    --ink: #f0ede4;
    --ink-2: #b3afa2;
    --ink-3: #837f73;
    --line: #322f29;
    --line-strong: #423e36;
    --accent: #7faa86;
    --accent-hover: #93b998;
    --accent-soft: #232c25;
    --gold: #c6a463;
    --success: #6db98c;
    --success-soft: #1f2f25;
    --warning: #cda155;
    --warning-soft: #322a18;
    --danger: #d98279;
    --danger-soft: #34211f;
    --info: #84a8c8;
    --info-soft: #1e2a34;
    --shadow-s: 0 1px 2px rgba(0,0,0,.3);
    --shadow-m: 0 4px 14px rgba(0,0,0,.4);
    --shadow-l: 0 16px 44px rgba(0,0,0,.55);
    --ring: 0 0 0 3px rgba(127,170,134,.22);
  }
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
.hidden { display: none !important; }

/* ============ Login ============ */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 860px) { .login-wrap { grid-template-columns: 1fr; } .login-aside { display: none; } }

.login-panel {
  display: flex; flex-direction: column; justify-content: center;
  padding: 3rem clamp(1.5rem, 6vw, 5rem); background: var(--surface);
}
.login-brand { margin-bottom: 2.5rem; }
.login-logo {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 600; margin-bottom: 1.2rem;
  box-shadow: var(--shadow-m);
}
.login-brand h1 { font-family: var(--font-display); font-size: 28px; font-weight: 500; letter-spacing: -.01em; }
.login-brand p { color: var(--ink-3); font-size: 14px; margin-top: 2px; }

.login-aside {
  background:
    radial-gradient(circle at 30% 20%, rgba(154,123,63,.18), transparent 55%),
    radial-gradient(circle at 75% 75%, rgba(61,90,69,.28), transparent 55%),
    var(--accent-hover);
  display: flex; align-items: center; justify-content: center; padding: 3rem;
}
.login-aside-inner { max-width: 360px; }
.login-aside blockquote {
  font-family: var(--font-display); font-size: 26px; line-height: 1.4;
  font-weight: 400; color: #f4f2ec; font-style: italic;
}

/* ============ Buttons ============ */
.btn {
  font-family: var(--font-body); font-size: 14px; font-weight: 500;
  padding: 10px 18px; border-radius: var(--radius-s); border: 1px solid transparent;
  cursor: pointer; transition: all .16s ease; display: inline-flex;
  align-items: center; justify-content: center; gap: 7px; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-s); }
.btn-primary:hover { background: var(--accent-hover); box-shadow: var(--shadow-m); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--ink-3); }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger-ghost { background: transparent; color: var(--danger); border-color: var(--line); }
.btn-danger-ghost:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(1.07); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 13px; font-size: 13px; }

.btn-icon {
  width: 36px; height: 36px; border-radius: var(--radius-s);
  border: 1px solid transparent; background: transparent; color: var(--ink-2);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: all .16s ease; flex-shrink: 0;
}
.btn-icon:hover { background: var(--surface-3); color: var(--ink); }
.btn-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ============ Fields ============ */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 500; color: var(--ink-2); margin-bottom: 5px; }
.field small { display: block; font-size: 12px; color: var(--ink-3); margin-top: 4px; }
input, select, textarea {
  width: 100%; font-family: var(--font-body); font-size: 14px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius-s); padding: 10px 12px; transition: all .16s ease;
}
input::placeholder { color: var(--ink-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
textarea { resize: vertical; min-height: 70px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 540px) { .grid-2 { grid-template-columns: 1fr; } }

.form-error { color: var(--danger); font-size: 13px; min-height: 18px; margin-top: 8px; }

/* ============ App shell ============ */
.app-shell { display: grid; grid-template-columns: 256px 1fr; min-height: 100vh; }

/* Sidebar */
.sidebar {
  background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar-head { display: flex; align-items: center; gap: 10px; padding: 20px 18px; border-bottom: 1px solid var(--line); }
.sidebar-logo {
  width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 600; flex-shrink: 0;
}
.sidebar-title { font-family: var(--font-display); font-size: 15px; font-weight: 500; line-height: 1.2; }
.sidebar-nav { padding: 14px 12px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px;
  border-radius: var(--radius-s); border: none; background: transparent;
  color: var(--ink-2); font-family: var(--font-body); font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all .15s ease; text-align: left; width: 100%;
}
.nav-item svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.nav-item:hover { background: var(--surface-3); color: var(--ink); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.sidebar-foot {
  padding: 12px; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px;
}
.user-chip { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px;
  flex-shrink: 0; text-transform: uppercase;
}
.user-meta { display: flex; flex-direction: column; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--ink-3); }

/* Main */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: center; gap: 14px; padding: 14px 26px;
  border-bottom: 1px solid var(--line); background: var(--surface);
  position: sticky; top: 0; z-index: 20;
}
.topbar h2 { font-family: var(--font-display); font-size: 20px; font-weight: 500; flex: 1; letter-spacing: -.01em; }
.menu-toggle { display: none; }
.content { padding: 26px; max-width: 1180px; width: 100%; margin: 0 auto; }

.view { display: none; animation: fade-up .3s ease; }
.view.active { display: block; }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ============ Dashboard ============ */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: flex; gap: 14px; align-items: center; box-shadow: var(--shadow-s);
  transition: transform .16s ease, box-shadow .16s ease;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-m); }
.stat-icon {
  width: 44px; height: 44px; border-radius: 11px; display: flex; align-items: center;
  justify-content: center; font-size: 20px; font-weight: 600; flex-shrink: 0;
}
.stat-icon-neutral { background: var(--surface-3); color: var(--ink-2); }
.stat-icon-success { background: var(--success-soft); color: var(--success); }
.stat-icon-warning { background: var(--warning-soft); color: var(--warning); }
.stat-icon-danger { background: var(--danger-soft); color: var(--danger); }
.stat-body { display: flex; flex-direction: column; min-width: 0; }
.stat-label { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.stat-value { font-family: var(--font-display); font-size: 23px; font-weight: 500; letter-spacing: -.01em; }

.panel-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 720px) { .panel-row { grid-template-columns: 1fr; } }
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-s); margin-bottom: 14px;
}
.panel-title { font-family: var(--font-display); font-size: 16px; font-weight: 500; margin-bottom: 14px; }
.panel-title-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.panel-title-row .panel-title { margin-bottom: 0; }
.kv-list { list-style: none; }
.kv-list li { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv-list li:last-child { border-bottom: none; }
.kv-list li span { color: var(--ink-2); }
.kv-list li strong { font-weight: 600; }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }

/* Alerts */
.alert {
  padding: 12px 16px; border-radius: var(--radius-s); margin-bottom: 12px;
  font-size: 13.5px; display: flex; gap: 9px; align-items: center; font-weight: 500;
}
.alert-danger { background: var(--danger-soft); color: var(--danger); }
.alert-warning { background: var(--warning-soft); color: var(--warning); }

/* ============ Toolbar ============ */
.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.search-box { position: relative; flex: 1; min-width: 200px; }
.search-box svg {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; fill: none; stroke: var(--ink-3); stroke-width: 2;
  stroke-linecap: round; pointer-events: none;
}
.search-box input { padding-left: 34px; }
.filter-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill-btn {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink-2); font-family: var(--font-body);
  font-size: 13px; font-weight: 500; cursor: pointer; transition: all .15s ease;
}
.pill-btn:hover { border-color: var(--ink-3); }
.pill-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ============ Cards (cliente/compra) ============ */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin-bottom: 12px; box-shadow: var(--shadow-s);
  transition: box-shadow .16s ease;
}
.card:hover { box-shadow: var(--shadow-m); }
.card-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.card-name { font-family: var(--font-display); font-size: 16.5px; font-weight: 500; }
.card-sub { font-size: 13px; color: var(--ink-2); margin-top: 1px; }
.card-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); margin-top: 9px; }
.card-meta b { color: var(--ink-2); font-weight: 600; }
.card-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px;
  border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-neutral { background: var(--surface-3); color: var(--ink-2); }

/* Parcelas */
.parcelas-wrap { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 6px; }
.parcela-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--line);
}
.parcela-row:last-child { border-bottom: none; }
.parcela-left { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.parcela-chip {
  width: 30px; height: 30px; border-radius: 8px; background: var(--surface-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--ink-2); flex-shrink: 0;
}
.parcela-chip-entrada { background: var(--gold); color: #fff; }
.parcela-val { font-weight: 600; font-size: 14px; }
.parcela-val s { color: var(--ink-3); font-weight: 400; font-size: 12.5px; margin-left: 5px; }
.parcela-date { font-size: 12.5px; color: var(--ink-3); }
.parcela-actions { display: flex; gap: 6px; }
.tag-entrada {
  font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  color: var(--gold); background: var(--warning-soft); padding: 1px 6px;
  border-radius: 4px; margin-left: 6px;
}

/* Cards recolhíveis (vendas) */
.card-collapsible { padding: 0; overflow: hidden; }
.card-head {
  display: flex; align-items: center; gap: 12px; padding: 15px 18px; cursor: pointer;
  transition: background .14s ease;
}
.card-head:hover { background: var(--surface-2); }
.card-chevron {
  width: 22px; height: 22px; flex-shrink: 0; color: var(--ink-3);
  transition: transform .2s ease;
}
.card-chevron svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.card-collapsible.expanded .card-chevron { transform: rotate(90deg); }
.card-head-main { flex: 1; min-width: 0; }
.card-head-side { text-align: right; flex-shrink: 0; }
.card-amount { font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.card-progress { font-size: 11.5px; color: var(--ink-3); }
.card-collapse {
  max-height: 0; overflow: hidden;
  transition: max-height .28s ease;
  padding: 0 18px;
}
.card-collapsible.expanded .card-collapse {
  max-height: 4000px;
  padding: 0 18px 16px;
}
.card-collapse .card-meta { margin-top: 0; padding-top: 4px; }
@media (max-width: 600px) {
  .card-head { flex-wrap: wrap; }
  .card-head-side { text-align: left; }
}

/* Modal de edição de venda */
.edit-parc-title {
  font-family: var(--font-display); font-size: 15px; font-weight: 500;
  margin: 18px 0 4px;
}
.edit-hint { font-size: 12px; color: var(--ink-3); margin-bottom: 12px; }
.edit-parc {
  border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 12px 14px 2px; margin-bottom: 10px;
}
.edit-parc-locked { background: var(--surface-2); opacity: .85; }
.edit-parc-label {
  font-size: 13px; font-weight: 600; margin-bottom: 4px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.edit-parc .field { margin-bottom: 10px; }

/* Empty state */
.empty {
  text-align: center; padding: 3rem 1rem; color: var(--ink-3);
}
.empty-icon {
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 14px;
  background: var(--surface-3); display: flex; align-items: center;
  justify-content: center; font-size: 26px;
}
.empty h4 { font-family: var(--font-display); font-size: 17px; font-weight: 500; color: var(--ink-2); margin-bottom: 4px; }
.empty p { font-size: 13.5px; }

/* ============ Nova venda ============ */
.venda-layout { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .venda-layout { grid-template-columns: 1fr; } }

.block {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 14px; box-shadow: var(--shadow-s); overflow: hidden;
}
.block-head { display: flex; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); align-items: center; }
.block-num {
  width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; flex-shrink: 0;
}
.block-head h3 { font-family: var(--font-display); font-size: 16px; font-weight: 500; }
.block-head p { font-size: 12.5px; color: var(--ink-3); }
.block-body { padding: 18px; }

/* Segmented control */
.seg-control {
  display: flex; gap: 3px; background: var(--surface-3); padding: 3px;
  border-radius: var(--radius-s); margin-bottom: 16px;
}
.seg {
  flex: 1; padding: 8px 12px; border: none; background: transparent; cursor: pointer;
  border-radius: 5px; font-family: var(--font-body); font-size: 13.5px; font-weight: 500;
  color: var(--ink-2); transition: all .15s ease;
}
.seg.active { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-s); }

/* Search results */
.search-results {
  margin-top: 4px; border: 1px solid var(--line); border-radius: var(--radius-s);
  overflow: hidden; display: none;
}
.search-results.show { display: block; }
.search-result {
  padding: 10px 12px; cursor: pointer; font-size: 13.5px; border-bottom: 1px solid var(--line);
  transition: background .12s ease;
}
.search-result:last-child { border-bottom: none; }
.search-result:hover { background: var(--accent-soft); }
.search-result b { font-weight: 600; }
.search-result span { color: var(--ink-3); font-size: 12px; }

.selected-card {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--accent-soft); border-radius: var(--radius-s); padding: 12px 14px;
}
.selected-card .sc-name { font-weight: 600; font-size: 14px; }
.selected-card .sc-sub { font-size: 12.5px; color: var(--ink-2); }

/* Resumo lateral */
.venda-resumo {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-s); position: sticky; top: 90px;
}
.venda-resumo h3 { font-family: var(--font-display); font-size: 16px; font-weight: 500; margin-bottom: 14px; }
.resumo-line { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; padding: 6px 0; }
.resumo-line span { color: var(--ink-3); }
.resumo-line strong { font-weight: 600; text-align: right; word-break: break-word; }
.resumo-divider { height: 1px; background: var(--line); margin: 10px 0; }
.resumo-parcelas { font-size: 12.5px; color: var(--ink-2); }
.resumo-parcelas .rp-line { display: flex; justify-content: space-between; padding: 3px 0; }
.resumo-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.resumo-total span { font-size: 13px; color: var(--ink-3); }
.resumo-total strong { font-family: var(--font-display); font-size: 24px; font-weight: 600; }
.resumo-hint { font-size: 11.5px; color: var(--ink-3); margin-top: 10px; line-height: 1.45; }

/* ============ Users ============ */
.user-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-s);
  margin-bottom: 8px; gap: 10px; flex-wrap: wrap;
}
.user-row-left { display: flex; align-items: center; gap: 11px; }
.user-row-name { font-weight: 600; font-size: 14px; }
.user-row-sub { font-size: 12px; color: var(--ink-3); }

/* ============ Modal ============ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(28,27,24,.5);
  backdrop-filter: blur(3px); display: flex; align-items: center;
  justify-content: center; padding: 1.2rem; z-index: 100; animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface); border-radius: var(--radius-l); width: 100%; max-width: 540px;
  max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow-l);
  animation: modal-in .24s cubic-bezier(.2,.7,.3,1);
}
@keyframes modal-in { from { opacity: 0; transform: scale(.95) translateY(12px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-header h3 { font-family: var(--font-display); font-size: 18px; font-weight: 500; }
.modal-body { padding: 22px; overflow-y: auto; }

/* ============ Toast ============ */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(0);
  background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: var(--radius-s);
  font-size: 13.5px; font-weight: 500; z-index: 200; box-shadow: var(--shadow-l);
  animation: toast-in .3s cubic-bezier(.2,.7,.3,1);
}
@keyframes toast-in { from { opacity: 0; transform: translateX(-50%) translateY(16px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ============ Sidebar mobile ============ */
.sidebar-backdrop { position: fixed; inset: 0; background: rgba(28,27,24,.5); z-index: 40; }
@media (max-width: 768px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 50; width: 256px;
    transform: translateX(-100%); transition: transform .25s ease;
  }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-l); }
  .menu-toggle { display: inline-flex; }
  .content { padding: 18px; }
  .topbar { padding: 12px 16px; }
}
