/* NegócioFácil — design system próprio v3 (esmeralda/ciano: crescimento + clareza) */
:root {
  --bg: #08120f;
  --bg2: #0e1a16;
  --bg3: #15251f;
  --card: #101e19;
  --card-2: #16281f;
  --border: #22443a;
  --border-soft: #193029;
  --text: #e9f1ee;
  --muted: #86a29a;
  --primary: #10b981;
  --primary-2: #059669;
  --accent: #22d3ee;
  --green: #34d399;
  --red: #f87171;
  --yellow: #fbbf24;
  --orange: #fb923c;
  --purple: #a78bfa;
  --shadow: 0 10px 30px rgba(0, 0, 0, .42);
  --shadow-sm: 0 3px 10px rgba(0, 0, 0, .26);
  --radius: 16px;
  --grad-primary: linear-gradient(135deg, #059669, #10b981 52%, #22d3ee 140%);
}
[data-theme="light"] {
  --bg: #eef5f2;
  --bg2: #ffffff;
  --bg3: #e5efeb;
  --card: #ffffff;
  --card-2: #f2f9f6;
  --border: #d1e2db;
  --border-soft: #e0ede8;
  --text: #0f2620;
  --muted: #557069;
  --shadow: 0 10px 26px rgba(15, 60, 45, .12);
  --shadow-sm: 0 3px 8px rgba(15, 60, 45, .08);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: 'Segoe UI Variable Display', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  background:
    radial-gradient(1100px 520px at 85% -10%, rgba(16, 185, 129, .13), transparent 60%),
    radial-gradient(900px 480px at -10% 110%, rgba(34, 211, 238, .07), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text); font-size: 14.5px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ---------- layout ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 256px; flex-shrink: 0; background: var(--bg2); border-right: 1px solid var(--border-soft);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .brand { display: flex; align-items: center; gap: 11px; padding: 20px 18px 16px; }
.brand-logo {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--grad-primary); color: #fff; font-weight: 800; font-size: 15px;
  box-shadow: 0 6px 16px rgba(5, 150, 105, .45);
}
.brand-name { font-weight: 800; font-size: 16.5px; letter-spacing: -.01em; }
.brand-sub { font-size: 11px; color: var(--muted); }
.nav { padding: 2px 12px 22px; display: flex; flex-direction: column; gap: 2px; }
.nav-label {
  font-size: 10px; letter-spacing: .14em; color: var(--muted); text-transform: uppercase;
  margin: 16px 10px 6px; font-weight: 700;
}
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 11px;
  color: var(--text); cursor: pointer; border: none; background: none; width: 100%;
  text-align: left; font-size: 13.5px; font-weight: 500; transition: background .15s, transform .1s;
}
.nav-item:hover { background: var(--bg3); }
.nav-item:active { transform: scale(.985); }
.nav-item.active { background: linear-gradient(90deg, rgba(16, 185, 129, .18), rgba(16, 185, 129, .04)); color: #fff; }
[data-theme="light"] .nav-item.active { color: var(--primary-2); }
.nav-item .ico {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--bg3); font-size: 14px; flex-shrink: 0; transition: background .15s;
}
.nav-item.active .ico { background: var(--grad-primary); box-shadow: 0 4px 10px rgba(5, 150, 105, .4); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 14px; padding: 13px 28px;
  border-bottom: 1px solid var(--border-soft);
  background: color-mix(in srgb, var(--bg2) 82%, transparent);
  backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 20;
}
.topbar .hello b { font-size: 15px; }
.topbar .hello span { display: block; font-size: 11.5px; color: var(--muted); }
.topbar .spacer { flex: 1; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 13px; border-radius: 20px;
  font-size: 12px; border: 1px solid var(--border); background: var(--bg3); font-weight: 600;
}
.chip.green { color: var(--green); border-color: rgba(52, 211, 153, .35); background: rgba(52, 211, 153, .08); }
.content { padding: 26px 28px 70px; max-width: 1520px; width: 100%; }

/* ---------- componentes ---------- */
.page-head { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 25px; font-weight: 800; letter-spacing: -.02em; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 3px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 17px; border-radius: 11px;
  border: 1px solid var(--border); background: var(--bg3); color: var(--text);
  cursor: pointer; font-size: 13.5px; font-weight: 600;
  transition: filter .15s, transform .1s, box-shadow .15s;
}
.btn:hover { filter: brightness(1.13); box-shadow: var(--shadow-sm); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--grad-primary); border: none; color: #fff; box-shadow: 0 5px 16px rgba(5, 150, 105, .35); }
.btn.success { background: linear-gradient(135deg, #059669, #34d399); border: none; color: #fff; box-shadow: 0 5px 16px rgba(5, 150, 105, .3); }
.btn.danger { background: transparent; border-color: rgba(248, 113, 113, .45); color: var(--red); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--bg3); }
.btn.sm { padding: 5px 11px; font-size: 12.5px; border-radius: 9px; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: linear-gradient(180deg, var(--card-2), var(--card) 55%);
  border: 1px solid var(--border-soft); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-sm);
}
.card h3 { font-size: 14.5px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; font-weight: 700; }

/* KPI cards */
.kpi { position: relative; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kpi .lbl {
  color: var(--muted); font-size: 11.5px; display: flex; gap: 8px; align-items: center;
  text-transform: uppercase; letter-spacing: .06em; font-weight: 700;
}
.kpi .lbl .ib {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 14px;
  background: rgba(16, 185, 129, .16);
}
.kpi .val { font-size: 22px; font-weight: 800; margin-top: 8px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.kpi.tint-green::before, .kpi.tint-blue::before, .kpi.tint-gold::before, .kpi.tint-purple::before, .kpi.tint-red::before, .kpi.tint-cyan::before {
  content: ''; position: absolute; inset: 0; opacity: .12; pointer-events: none;
}
.kpi.tint-green::before { background: linear-gradient(130deg, #059669, transparent 55%); }
.kpi.tint-blue::before { background: linear-gradient(130deg, #2563eb, transparent 55%); }
.kpi.tint-gold::before { background: linear-gradient(130deg, #d97706, transparent 55%); }
.kpi.tint-purple::before { background: linear-gradient(130deg, #7c3aed, transparent 55%); }
.kpi.tint-red::before { background: linear-gradient(130deg, #dc2626, transparent 55%); }
.kpi.tint-cyan::before { background: linear-gradient(130deg, #0891b2, transparent 55%); }
.kpi.tint-green .ib { background: rgba(52, 211, 153, .16); }
.kpi.tint-gold .ib { background: rgba(251, 191, 36, .16); }
.kpi.tint-red .ib { background: rgba(248, 113, 113, .16); }
.kpi.tint-purple .ib { background: rgba(167, 139, 250, .16); }
.kpi.tint-cyan .ib { background: rgba(34, 211, 238, .16); }
.kpi .val.green { color: var(--green); }
.kpi .val.red { color: var(--red); }
.kpi .val.accent { color: var(--accent); }
.kpi .val.purple { color: var(--purple); }
.kpi.clickable::after {
  content: '→'; position: absolute; top: 14px; right: 16px; color: var(--muted);
  font-size: 14px; opacity: 0; transition: opacity .15s, transform .15s;
}
.kpi.clickable:hover::after { opacity: 1; transform: translateX(2px); }

/* tabela */
.tbl-wrap { overflow-x: auto; border-radius: var(--radius); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
  text-align: left; color: var(--muted); font-weight: 700; font-size: 11px; padding: 11px 12px;
  border-bottom: 1px solid var(--border); white-space: nowrap; text-transform: uppercase; letter-spacing: .07em;
  position: sticky; top: 0; background: var(--card);
}
.tbl td { padding: 13px 12px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.tbl tbody tr, .tbl tr { transition: background .12s; }
.tbl tr:hover td { background: rgba(16, 185, 129, .06); }
.tbl tr:last-child td { border-bottom: none; }
.tbl .num { font-variant-numeric: tabular-nums; }

.avatar {
  width: 36px; height: 36px; border-radius: 12px; display: inline-grid; place-items: center;
  font-size: 12px; font-weight: 800; color: #fff; flex-shrink: 0; box-shadow: var(--shadow-sm);
}
.row-flex { display: flex; align-items: center; gap: 10px; }

.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px; border-radius: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
}
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { background: rgba(52, 211, 153, .13); color: var(--green); }
.pill.late { background: rgba(248, 113, 113, .13); color: var(--red); }
.pill.done { background: rgba(167, 139, 250, .13); color: var(--purple); }
.pill.warn { background: rgba(251, 191, 36, .13); color: var(--yellow); }
.pill.info { background: rgba(34, 211, 238, .13); color: var(--accent); }
.pill.mut { background: var(--bg3); color: var(--muted); }

.tag-dot { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 2px 9px; border-radius: 20px; border: 1px solid var(--border); }
.tag-dot i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* formulários */
.field { margin-bottom: 13px; }
.field label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.field .hint { font-size: 11px; color: var(--muted); margin-top: 4px; text-transform: none; letter-spacing: 0; }
.input, select.input, textarea.input {
  width: 100%; padding: 9.5px 13px; border-radius: 11px; border: 1px solid var(--border);
  background: var(--bg3); color: var(--text); font-size: 13.5px; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(16, 185, 129, .22); }
textarea.input { resize: vertical; min-height: 70px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; margin: 6px 0; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); }

/* seletor segmentado (tipo de pagamento, forma etc.) */
.seg { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
.seg .seg-btn {
  flex: 1; min-width: 90px; padding: 9px 12px; border-radius: 11px; border: 1px solid var(--border);
  background: var(--bg3); color: var(--text); cursor: pointer; font-size: 12.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: all .15s;
}
.seg .seg-btn:hover { border-color: var(--primary); }
.seg .seg-btn.on { background: var(--grad-primary); border-color: transparent; color: #fff; box-shadow: 0 4px 12px rgba(5, 150, 105, .35); }
.seg .seg-btn.on.green { background: linear-gradient(135deg, #059669, #34d399); }

.info-box {
  background: var(--bg3); border: 1px solid var(--border-soft); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 13px; font-size: 13px;
}
.info-box .line { display: flex; justify-content: space-between; padding: 3px 0; }
.info-box .line b { font-variant-numeric: tabular-nums; }
.info-box .line.total { border-top: 1px dashed var(--border); margin-top: 5px; padding-top: 8px; font-weight: 800; }

.searchbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.searchbar .input { flex: 1; min-width: 220px; }

/* modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(4, 6, 16, .72); backdrop-filter: blur(5px);
  display: grid; place-items: center; z-index: 100; padding: 20px; overflow-y: auto;
  animation: fadeIn .15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 18px;
  width: 100%; max-width: 560px; max-height: 92vh; display: flex; flex-direction: column;
  box-shadow: var(--shadow); animation: popIn .18s ease;
}
@keyframes popIn { from { transform: translateY(14px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal.lg { max-width: 780px; }
.modal-head { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border-soft); }
.modal-head h2 { font-size: 16.5px; font-weight: 800; }
.modal-close { margin-left: auto; background: rgba(248, 113, 113, .13); color: var(--red); border: none; width: 30px; height: 30px; border-radius: 10px; cursor: pointer; font-size: 14px; transition: filter .15s; }
.modal-close:hover { filter: brightness(1.3); }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border-soft); display: flex; justify-content: flex-end; gap: 10px; }

/* toast */
#toasts { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--bg2); border: 1px solid var(--border); border-left: 4px solid var(--primary);
  padding: 13px 18px; border-radius: 12px; box-shadow: var(--shadow); font-size: 13.5px; max-width: 380px;
  animation: slideIn .25s ease; font-weight: 600;
}
.toast.ok { border-left-color: var(--green); }
.toast.err { border-left-color: var(--red); }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* tabs */
.tabs {
  display: inline-flex; background: var(--bg3); border: 1px solid var(--border-soft);
  border-radius: 13px; padding: 4px; gap: 4px; margin-bottom: 18px; flex-wrap: wrap;
}
.tab { padding: 8px 17px; border-radius: 10px; border: none; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 700; transition: all .15s; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--grad-primary); color: #fff; box-shadow: 0 4px 12px rgba(5, 150, 105, .35); }

/* login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background:
    radial-gradient(1000px 520px at 15% -10%, rgba(16, 185, 129, .30), transparent 55%),
    radial-gradient(900px 460px at 95% 110%, rgba(34, 211, 238, .20), transparent 55%), var(--bg); }
.login-card { width: 100%; max-width: 410px; }
.login-card .brand { justify-content: center; margin-bottom: 14px; display: flex; gap: 11px; align-items: center; }
.login-card .card { padding: 26px; }
.lang-select { margin-bottom: 14px; }
.lang-title { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; text-align: center; margin-bottom: 8px; }
.lang-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lang-opt {
  display: flex; align-items: center; gap: 9px; padding: 12px 14px; border-radius: 13px;
  border: 2px solid var(--border); background: var(--bg2); color: var(--text); cursor: pointer;
  font-size: 13px; font-weight: 700; transition: all .16s;
}
.lang-opt:hover { border-color: var(--primary); transform: translateY(-1px); }
.lang-opt.on { border-color: var(--primary); background: linear-gradient(135deg, rgba(79,70,229,.18), rgba(34,211,238,.08)); box-shadow: 0 4px 14px rgba(79,70,229,.25); }
.lang-opt .flag { font-size: 24px; line-height: 1; }
@media (max-width: 420px) { .lang-opts { grid-template-columns: 1fr; } }

/* login/registro profissional (split) */
.brand-logo.lg { width: 54px; height: 54px; border-radius: 16px; font-size: 20px; }
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.auth-brand {
  position: relative; display: flex; align-items: center; justify-content: center; padding: 40px;
  background:
    radial-gradient(700px 420px at 20% 15%, rgba(16, 185, 129, .30), transparent 60%),
    radial-gradient(600px 400px at 90% 90%, rgba(34, 211, 238, .18), transparent 60%),
    linear-gradient(160deg, #0b1a15, #06120e);
  overflow: hidden;
}
.auth-brand::after {
  content: ''; position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .05) 1px, transparent 0);
  background-size: 26px 26px; pointer-events: none;
}
.auth-brand-inner { position: relative; z-index: 1; max-width: 440px; width: 100%; }
.auth-lema { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin: 30px 0 22px; }
.auth-bullets { list-style: none; display: flex; flex-direction: column; gap: 13px; }
.auth-bullets li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--text); }
.auth-bullets li span { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: rgba(16, 185, 129, .16); font-size: 17px; flex-shrink: 0; }
.auth-badge { margin-top: 26px; display: inline-block; padding: 9px 16px; border-radius: 22px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); font-size: 13px; font-weight: 700; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--bg); }
.auth-form-inner { width: 100%; max-width: 380px; }
.btn.lg { padding: 13px 22px; font-size: 15px; }
[data-theme="light"] .auth-brand { background: linear-gradient(160deg, #0b1a15, #06120e); }
[data-theme="light"] .auth-bullets li { color: #eafaf4; }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-form { min-height: 100vh; }
}

/* ícones SVG (substituem os emojis) */
.ic { width: 1.05em; height: 1.05em; display: inline-block; vertical-align: -0.16em; flex: none; }
.btn .ic { width: 1.15em; height: 1.15em; vertical-align: -0.2em; }
.nav-item .ico .ic { width: 18px; height: 18px; }
.nav-item.active .ico .ic { stroke: #fff; }
[data-theme="light"] .nav-item.active .ico .ic { stroke: var(--primary-2); }
.kpi .lbl .ib .ic { width: 17px; height: 17px; }
.brand-logo .ic, .brand-sub .ic { width: 1em; height: 1em; }
.card h3 .ic, .page-head h1 .ic { width: 1.05em; height: 1.05em; vertical-align: -0.17em; }
.pill .ic { width: 1.05em; height: 1.05em; vertical-align: -0.18em; }
.tab .ic { width: 1.1em; height: 1.1em; vertical-align: -0.2em; }
.chip .ic { width: 1.05em; height: 1.05em; vertical-align: -0.17em; }
.msg-preview .ic { width: 1.05em; height: 1.05em; }
.lang-opt .flag .ic { width: 22px; height: 22px; }

/* mini-gráfico de barras do admin (crescimento de contas) */
.ad-bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 8px; }
.ad-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.ad-bar i { width: 100%; max-width: 42px; min-height: 4px; border-radius: 6px 6px 0 0; background: var(--grad-primary); display: block; transition: height .3s; }
.ad-bar b { font-size: 12px; font-weight: 800; }
.ad-bar span { font-size: 10px; color: var(--muted); }

/* chips de plano */
.chip.chip-info { color: var(--accent); border-color: rgba(34, 211, 238, .4); background: rgba(34, 211, 238, .08); }
.chip.chip-warn { color: var(--yellow); border-color: rgba(251, 191, 36, .4); background: rgba(251, 191, 36, .08); }
.chip.chip-ok { color: var(--green); border-color: rgba(52, 211, 153, .4); background: rgba(52, 211, 153, .08); }
@media (max-width: 720px) { .chip.chip-info, .chip.chip-warn, .chip.chip-ok { display: none; } }

/* progresso / barras */
.bar { height: 9px; background: var(--bg3); border-radius: 8px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--grad-primary); border-radius: 8px; transition: width .4s ease; }

.ring { position: relative; width: 96px; height: 96px; }
.ring svg { transform: rotate(-90deg); }
.ring .ring-val { position: absolute; inset: 0; display: grid; place-items: center; font-size: 23px; font-weight: 800; }

/* calendário v2 */
.cal-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 14px; align-items: start; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.cal .dow { text-align: center; color: var(--muted); font-size: 10.5px; padding: 4px; text-transform: uppercase; font-weight: 700; letter-spacing: .08em; }
.cal .day {
  min-height: 74px; background: var(--bg3); border: 1px solid var(--border-soft); border-radius: 12px;
  padding: 8px; font-size: 11px; cursor: pointer; position: relative;
  display: flex; flex-direction: column; gap: 4px; transition: border-color .15s, transform .12s, box-shadow .15s;
}
.cal .day:hover { border-color: var(--primary); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.cal .day.out { opacity: .28; pointer-events: none; }
.cal .day.today { outline: 2px solid var(--accent); outline-offset: -2px; }
.cal .day.sel { border-color: var(--green); outline: 2px solid var(--green); outline-offset: -2px; }
.cal .day .dnum { font-weight: 800; font-size: 12.5px; }
.cal .day .dots { display: flex; gap: 4px; flex-wrap: wrap; margin-top: auto; }
.cal .cnt {
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 20px; display: inline-grid; place-items: center;
  font-size: 10.5px; font-weight: 800; color: #fff;
}
.cal .cnt.pend { background: #d97706; }
.cal .cnt.late { background: #dc2626; }
.cal .cnt.paid { background: #059669; }
.cal-panel .item {
  border: 1px solid var(--border-soft); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: var(--bg3);
}
.cal-panel .item .top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.cal-panel .item .kv { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 12px; font-size: 12px; }
.cal-panel .item .kv span { color: var(--muted); }
.cal-panel .item .kv b { font-variant-numeric: tabular-nums; }

/* mensagem-preview */
.msg-preview { background: #10241b; border: 1px solid #1d4034; color: #d9fdd3; padding: 14px; border-radius: 13px; white-space: pre-wrap; font-size: 13px; line-height: 1.55; }
[data-theme="light"] .msg-preview { background: #e7fbe2; border-color: #b9e4b4; color: #1c3d1a; }
.var-chip { display: inline-block; background: rgba(34, 211, 238, .13); color: var(--accent); border: 1px solid rgba(34, 211, 238, .3); border-radius: 8px; padding: 2px 8px; font-size: 11px; margin: 2px; cursor: pointer; font-family: Consolas, monospace; transition: all .12s; }
.var-chip:hover { background: rgba(34, 211, 238, .28); }

/* misc */
.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty .big { font-size: 42px; margin-bottom: 10px; }
.loading-screen { min-height: 100vh; display: grid; place-items: center; gap: 14px; align-content: center; color: var(--muted); }
.spinner { width: 42px; height: 42px; border: 4px solid var(--bg3); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.mut { color: var(--muted); }
.sm-txt { font-size: 12px; }
.bold { font-weight: 700; }
.right { text-align: right; }
.mb0 { margin-bottom: 0; }
.clickable { cursor: pointer; }
.banner {
  border-radius: 14px; padding: 15px 18px; margin-bottom: 16px;
  background: linear-gradient(100deg, rgba(16, 185, 129, .22), rgba(34, 211, 238, .08));
  border: 1px solid rgba(16, 185, 129, .35);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px;
}
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 6px); background: var(--bg2); border: 1px solid var(--border);
  border-radius: 13px; box-shadow: var(--shadow); min-width: 200px; z-index: 50; overflow: hidden;
  animation: popIn .13s ease;
}
.dropdown-menu button { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 10px 15px; background: none; border: none; color: var(--text); cursor: pointer; font-size: 13px; font-weight: 600; }
.dropdown-menu button:hover { background: var(--bg3); }
.dropdown-menu button.danger { color: var(--red); }
.dropdown-menu hr { border: none; border-top: 1px solid var(--border-soft); }

/* proposta (chips de cenário no simulador) */
.scenario-chip {
  display: inline-flex; align-items: center; gap: 8px; background: var(--bg3);
  border: 1px solid var(--border); border-radius: 11px; padding: 7px 12px; font-size: 12.5px; font-weight: 700;
}
.scenario-chip button { border: none; background: none; color: var(--red); cursor: pointer; font-size: 13px; }

/* tooltip e interação dos gráficos */
.chart-wrap { position: relative; }
.ch-hit { transition: fill .1s; }
.ch-hit.clk { cursor: pointer; }
.ch-hit:hover { fill: rgba(16, 185, 129, .10) !important; }
.chart-tip {
  position: fixed; z-index: 300; background: var(--bg2); border: 1px solid var(--border);
  border-radius: 11px; box-shadow: var(--shadow); padding: 9px 12px; font-size: 12px;
  pointer-events: none; max-width: 240px;
}
.chart-tip .ct-h { font-weight: 800; margin-bottom: 5px; font-size: 12.5px; }
.chart-tip .ct-r { display: flex; align-items: center; gap: 7px; padding: 1.5px 0; white-space: nowrap; }
.chart-tip .ct-r i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; flex-shrink: 0; }

@media (max-width: 980px) { .cal-layout { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .sidebar { position: fixed; z-index: 90; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .g4, .g3 { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .content { padding: 16px 14px 70px; }
  .menu-btn { display: inline-flex !important; }
}
.menu-btn { display: none; }
@media (max-width: 560px) { .g4, .g3, .g2 { grid-template-columns: 1fr; } }

@media print {
  .sidebar, .topbar, .btn, #toasts { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; border-color: #ccc; }
}

/* ---- ajustes v15: gráficos, inputs, categorias, produtos ---- */
.chart-box { max-width: 660px; margin: 0 auto; }
.chart-wrap svg { max-height: 300px; display: block; }
.input.sm { padding: 6px 9px; font-size: 13px; }
/* categorias sempre em CAIXA ALTA */
.pill.cat { text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
select.upper, select.upper option, .input.upper { text-transform: uppercase; }
/* tabela de Recebidos: fonte mais forte/legível */
.rb-tbl td { font-size: 14px; font-weight: 500; color: var(--text); }
.rb-tbl td .bold, .rb-tbl td.bold { font-weight: 800; }
.rb-tbl th { font-size: 12.5px; }
/* linha de empréstimo que vence hoje */
.tbl tr.row-hoje td { background: rgba(251, 191, 36, .10); }
.tbl tr.row-hoje td:first-child { box-shadow: inset 3px 0 0 var(--yellow); }
/* card de produto */
.prod-card { padding: 0; overflow: hidden; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.prod-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.prod-photo { aspect-ratio: 4 / 3; width: 100%; background: var(--bg3); display: grid; place-items: center; position: relative; overflow: hidden; }
.prod-photo img { width: 100%; height: 100%; object-fit: cover; }
.prod-photo .noimg { font-size: 42px; opacity: .4; }
/* visualização ampliada de produto */
.prod-view-photo { width: 100%; max-height: 320px; object-fit: contain; background: #0b0f0d; border-radius: 12px; }
.prod-kv { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
.prod-kv .box { background: var(--bg3); border-radius: 10px; padding: 10px 12px; }
.prod-kv .box .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.prod-kv .box .v { font-size: 17px; font-weight: 700; margin-top: 2px; }
