/* ============================================================
   AutomaCrew CRM — réplica visual (Facturas · Presupuestos ·
   Tesorería · Contabilidad · CRM)
   ============================================================ */
:root {
  --blue:      #2f6bff;
  --blue-600:  #1f5af0;
  --blue-ink:  #2563eb;
  --blue-50:   #eef3ff;
  --ink:       #0f1115;
  --ink-2:     #1c2030;
  --txt:       #111827;
  --txt-soft:  #4b5563;
  --muted:     #6b7280;
  --muted-2:   #9ca3af;
  --line:      #ececef;
  --line-2:    #f1f2f5;
  --bg:        #f3f4f6;
  --white:     #fff;
  --green:#16a34a; --green-bg:#e8f7ef; --green-soft:#12b76a;
  --amber:#d98e04; --amber-bg:#fdf3e2;
  --red:#e5484d;   --red-bg:#fdecec;
  --violet:#7c5cfc; --violet-bg:#efeafe;
  --teal:#0ea5a5; --orange:#f97316;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16,18,21,.04), 0 1px 3px rgba(16,18,21,.06);
  --shadow-lg: 0 16px 48px rgba(16,18,21,.18);
  --rail: 66px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--txt); background: var(--bg); font-size: 14px; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
input, select, textarea, button { font-family: inherit; font-size: 14px; }
.t-num { font-variant-numeric: tabular-nums; }
.t-right { text-align: right; } .t-muted { color: var(--muted); } .t-strong { font-weight: 600; }

/* ───────── Shell ───────── */
.app-shell { display: flex; min-height: 100vh; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content { padding: 26px 30px 70px; flex: 1; }

/* ───────── Software certificado (badge esquina) ───────── */
.cert-badge {
  position: fixed; top: 0; right: 26px; z-index: 30;
  background: var(--ink); color: #fff; font-size: 11px; font-weight: 600;
  padding: 9px 16px 7px; border-radius: 0 0 12px 12px; display: flex; align-items: center; gap: 6px;
  box-shadow: var(--shadow);
}
.cert-badge svg { width: 13px; height: 13px; fill: #4ade80; }

/* ───────── Sidebar (rail de iconos) ───────── */
.rail {
  width: var(--rail); flex-shrink: 0; background: var(--white); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; position: sticky; top: 0; height: 100vh; padding: 14px 0; gap: 4px;
}
.rail__logo { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 14px; overflow: hidden; }
.rail__logo img { width: 100%; height: 100%; object-fit: contain; }
.rail__item {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; cursor: pointer;
  color: #9098a6; position: relative; transition: background .12s, color .12s;
}
.rail__item:hover { background: var(--bg); color: var(--ink); }
.rail__item.active { background: #eef1f6; color: var(--ink); }
.rail__item svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.rail__item[data-tip]:hover::after {
  content: attr(data-tip); position: absolute; left: 52px; top: 50%; transform: translateY(-50%);
  background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 8px; white-space: nowrap; z-index: 60; box-shadow: var(--shadow-lg);
}
.rail__spacer { flex: 1; }
.rail__avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center;
  font-weight: 700; cursor: pointer; position: relative; text-transform: uppercase;
}
.rail__avatar::after { content: ''; position: absolute; bottom: 1px; right: 1px; width: 9px; height: 9px; background: #22c55e; border: 2px solid #fff; border-radius: 50%; }
.rail-menu {
  position: fixed; left: 60px; bottom: 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lg); min-width: 200px; padding: 7px; z-index: 80;
}
.rail-menu .rm-head { padding: 8px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.rail-menu .rm-head .nm { font-weight: 700; } .rail-menu .rm-head .em { font-size: 12px; color: var(--muted); }
.rail-menu a { display: flex; gap: 9px; align-items: center; padding: 9px 12px; border-radius: 8px; font-weight: 500; cursor: pointer; }
.rail-menu a:hover { background: var(--bg); }
.rail-menu a svg { width: 17px; height: 17px; fill: none; stroke: var(--txt-soft); stroke-width: 1.8; }

/* ───────── Page header ───────── */
.phead { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 22px; }
.phead h1 { font-size: 21px; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.phead .sub { font-size: 13px; color: var(--muted); margin-top: 3px; }
.phead .spacer { flex: 1; }
.phead .actions { display: flex; gap: 10px; align-items: center; }

/* ───────── Botones ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 15px; font-weight: 600; cursor: pointer; background: #fff; color: var(--txt);
  transition: background .12s, border-color .12s, box-shadow .12s; white-space: nowrap;
}
.btn:hover { background: var(--bg); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-primary:hover { background: var(--blue-600); border-color: var(--blue-600); }
.btn-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--txt-soft); }
.btn-ghost:hover { background: var(--bg); }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-bg); border-color: var(--red-bg); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.icon-btn { background: transparent; border: 0; cursor: pointer; padding: 7px; border-radius: 8px; display: grid; place-items: center; }
.icon-btn:hover { background: var(--bg); }
.icon-btn svg { width: 18px; height: 18px; fill: var(--muted); }
.pill { font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 100px; display: inline-flex; align-items: center; gap: 7px; }
.pill-blue { background: var(--blue-50); color: var(--blue-ink); }
.pill-soft { background: #eef1f6; color: var(--txt-soft); }
.pill .dotpulse { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }

/* ───────── Cards / KPIs ───────── */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 18px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.kpi { padding: 18px 20px; }
.kpi__label { color: var(--muted); font-size: 13px; font-weight: 500; margin-bottom: 9px; }
.kpi__value { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.kpi__value.green { color: var(--green); } .kpi__value.amber { color: var(--amber); } .kpi__value.red { color: var(--red); }
.kpi__sub { font-size: 12px; color: var(--muted); margin-top: 5px; }

.progress { height: 8px; border-radius: 100px; background: #eceef2; overflow: hidden; margin-top: 12px; }
.progress > i { display: block; height: 100%; border-radius: 100px; background: var(--green-soft); }
.progress.blue > i { background: var(--blue); }

.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel__head { display: flex; align-items: center; padding: 15px 20px; border-bottom: 1px solid var(--line); font-weight: 700; }
.panel__head .spacer { flex: 1; }

/* ───────── Tablas ───────── */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; }
table.data th {
  text-align: left; font-size: 11px; font-weight: 600; color: var(--muted-2); text-transform: uppercase;
  letter-spacing: .04em; padding: 13px 20px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data td { padding: 15px 20px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.data tbody tr { cursor: pointer; }
table.data tbody tr:hover { background: #fafbfc; }
table.data tbody tr:last-child td { border-bottom: 0; }
.cell-id { color: var(--blue-ink); font-weight: 600; }
.row-actions { display: flex; gap: 2px; justify-content: flex-end; opacity: 0; transition: opacity .1s; }
tr:hover .row-actions { opacity: 1; }

/* ───────── Dot-badge (estado) ───────── */
.dotb { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13px; }
.dotb::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); }
.dotb.green::before, .dotb.paid::before, .dotb.accepted::before, .dotb.won::before { background: var(--green); }
.dotb.amber::before, .dotb.sent::before, .dotb.draft::before, .dotb.pending::before { background: var(--amber); }
.dotb.red::before, .dotb.overdue::before, .dotb.rejected::before, .dotb.cancelled::before, .dotb.lost::before { background: var(--red); }
.dotb.blue::before, .dotb.invoiced::before { background: var(--blue); }
.dotb.gray::before { background: var(--muted-2); }
.dotb.green { color: var(--green); } .dotb.amber { color: var(--amber); } .dotb.red { color: var(--red); }

.avatar-sq { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-weight: 700; color: #fff; flex-shrink: 0; }

/* ───────── Filtros ───────── */
.filters { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.chip { padding: 7px 13px; border-radius: 100px; background: #fff; border: 1px solid var(--line); color: var(--txt-soft); font-weight: 600; cursor: pointer; font-size: 13px; }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ───────── Info boxes (presupuestos) ───────── */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.info-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; background: #fff; }
.info-box.amber { background: #fffdf7; border-color: #f3e6c8; }
.info-box.blue { background: #f8faff; border-color: #dce7fb; }
.info-box__title { font-weight: 700; display: flex; align-items: center; gap: 9px; margin-bottom: 4px; }
.info-box__title .ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; }
.info-row { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--line-2); }
.info-row .nm { display: flex; align-items: center; gap: 8px; }

/* ───────── Formularios ───────── */
.field { margin-bottom: 16px; }
.field > label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: var(--txt-soft); }
.input, select.input, textarea.input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; outline: 0; background: #fff; color: var(--txt);
  transition: border-color .12s, box-shadow .12s;
}
.input:focus, select.input:focus, textarea.input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-50); }
textarea.input { resize: vertical; min-height: 76px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 16px; }
.form-hint { font-size: 12px; color: var(--muted); }

/* ───────── Slide-over ───────── */
.overlay { position: fixed; inset: 0; background: rgba(16,18,21,.4); z-index: 60; }
.slideover { position: fixed; top: 0; right: 0; height: 100vh; width: 470px; max-width: 94vw; background: #fff; z-index: 70; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.slideover.open { transform: translateX(0); }
.slideover__head { display: flex; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.slideover__title { font-size: 17px; font-weight: 700; }
.slideover__body { padding: 22px; overflow-y: auto; flex: 1; }
.slideover__foot { padding: 16px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }

/* ============================================================
   FACTURA — detalle a dos columnas
   ============================================================ */
.inv-layout { display: grid; grid-template-columns: 1fr 360px; gap: 22px; align-items: start; }
.doc-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 34px 36px; }
.doc-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 26px; }
.doc-client { display: flex; gap: 14px; }
.doc-client .nm { font-weight: 700; font-size: 16px; }
.doc-client .ad { color: var(--muted); font-size: 13px; margin-top: 2px; }
.doc-qr { width: 78px; height: 78px; }
.doc-qr img, .doc-qr canvas { width: 100%; height: 100%; }
.doc-billrow { display: flex; justify-content: space-between; align-items: flex-end; border-top: 1px solid var(--line); padding-top: 22px; margin-bottom: 8px; }
.doc-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-2); font-weight: 700; margin-bottom: 6px; }
.doc-bigtotal { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.doc-items { width: 100%; border-collapse: collapse; margin-top: 18px; }
.doc-items th { text-align: left; font-size: 11px; text-transform: uppercase; color: var(--muted-2); font-weight: 700; letter-spacing: .04em; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.doc-items th.r, .doc-items td.r { text-align: right; }
.doc-items td { padding: 14px 8px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.doc-items .desc-nm { font-weight: 600; }
.doc-items .desc-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.doc-items .input { padding: 7px 9px; }
.add-line { color: var(--blue-ink); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 14px 8px; }
.doc-foot { display: flex; justify-content: space-between; gap: 30px; margin-top: 18px; }
.doc-pay { color: var(--muted); font-size: 13px; max-width: 280px; }
.doc-totals { width: 280px; }
.tline { display: flex; justify-content: space-between; padding: 7px 0; color: var(--txt-soft); }
.tline.total { font-size: 18px; font-weight: 800; color: var(--txt); border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; }
.line-rm { color: var(--muted-2); cursor: pointer; background: none; border: 0; padding: 4px; }
.line-rm:hover { color: var(--red); }

/* Panel propiedades derecha */
.props { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px; position: sticky; top: 18px; }
.props-tabs { display: flex; gap: 4px; background: var(--bg); border-radius: 10px; padding: 4px; margin-bottom: 14px; }
.props-tab { flex: 1; text-align: center; padding: 8px; border-radius: 7px; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; }
.props-tab.active { background: var(--ink); color: #fff; }
.props-body { padding: 6px 10px 12px; }
.prop-row { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.prop-row .k { color: var(--muted); } .prop-row .v { font-weight: 700; }
.review-box { background: var(--green-bg); border-radius: 10px; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; }
.review-box svg { width: 18px; height: 18px; fill: var(--green); flex-shrink: 0; margin-top: 1px; }
.review-box .ti { font-weight: 700; color: #0a6b39; font-size: 13px; }
.review-box .me { font-size: 12px; color: #2f8f5b; }
.cobro-head { display: flex; justify-content: space-between; font-weight: 600; margin: 16px 0 8px; }
.cobro-sub { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }
.status-box { border: 1px solid var(--line); border-radius: 10px; padding: 13px 15px; display: flex; align-items: center; justify-content: space-between; margin: 14px 0; }
.status-box a { color: var(--blue-ink); font-weight: 700; }
.cat-box { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; align-items: center; gap: 18px; }
.swatches { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.swatch { width: 24px; height: 24px; border-radius: 50%; cursor: pointer; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.swatch.more { background: var(--bg); color: var(--muted); font-size: 11px; font-weight: 700; display: grid; place-items: center; width: auto; padding: 0 8px; border-radius: 100px; box-shadow: none; }

/* ============================================================
   TESORERÍA
   ============================================================ */
.treas-top { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-bottom: 16px; }
.balance-card { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 22px 24px; position: relative; overflow: hidden; }
.balance-card .lbl { font-size: 11px; letter-spacing: .08em; color: #8b93a7; font-weight: 700; }
.balance-card .val { font-size: 30px; font-weight: 800; margin: 6px 0 10px; letter-spacing: -.02em; }
.balance-card .delta { display: inline-flex; align-items: center; gap: 5px; background: rgba(34,197,94,.16); color: #4ade80; font-weight: 700; font-size: 12px; padding: 4px 10px; border-radius: 100px; }
.balance-card .accounts { position: absolute; top: 22px; right: 24px; font-size: 12px; color: #8b93a7; }
.spark { position: absolute; right: 18px; bottom: 14px; width: 150px; height: 56px; opacity: .9; }
.flow-card { padding: 18px 20px; }
.flow-row { margin-bottom: 14px; }
.flow-row .top { display: flex; justify-content: space-between; font-weight: 700; }
.flow-bar { height: 7px; border-radius: 100px; margin-top: 7px; }
.flow-bar.in { background: var(--green-soft); } .flow-bar.out { background: var(--red); }
.recon { display: grid; grid-template-columns: 1fr 44px 1fr; }
.recon__col h4 { font-size: 12px; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; margin: 0; padding: 14px 18px; border-bottom: 1px solid var(--line); display:flex; align-items:center; gap:8px; }
.mv { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.mv__ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.mv__ic.in { background: var(--green-bg); } .mv__ic.out { background: var(--red-bg); }
.mv__ic svg { width: 16px; height: 16px; }
.mv__ic.in svg { stroke: var(--green); } .mv__ic.out svg { stroke: var(--red); }
.mv__nm { font-weight: 600; } .mv__ref { font-size: 12px; color: var(--muted); }
.mv__amt { margin-left: auto; font-weight: 700; }
.mv__amt.in { color: var(--green); } .mv__amt.out { color: var(--red); }
.recon__link { display: grid; place-items: center; border-bottom: 1px solid var(--line-2); color: var(--muted-2); }

/* ============================================================
   CONTABILIDAD
   ============================================================ */
.acc-check { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.acc-check.on { background: var(--green); } .acc-check.on svg { stroke: #fff; width: 13px; height: 13px; }
.acc-check.off { border: 2px solid #e3e6ec; }
.tabs-dark { display: inline-flex; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.tabs-dark .t { padding: 7px 16px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; }
.tabs-dark .t.active { background: var(--ink); color: #fff; }
table.data tr.totals td { font-weight: 800; border-top: 2px solid var(--line); border-bottom: 0; background: #fafbfc; }

/* ============================================================
   CRM — embudo kanban
   ============================================================ */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 16px; overflow-x: auto; padding-bottom: 8px; }
.kcol { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; min-height: 200px; }
.kcol__head { padding: 14px 16px 0; }
.kcol__title { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.kcol__title .count { margin-left: auto; color: var(--muted); font-weight: 600; }
.kcol__title .dot { width: 9px; height: 9px; border-radius: 50%; }
.kcol__accent { height: 3px; border-radius: 100px; margin: 12px 0 4px; background: #e7e9ee; }
.kcol__body { padding: 8px 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.kcard { border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; background: #fff; cursor: pointer; box-shadow: var(--shadow); transition: box-shadow .12s, transform .05s; }
.kcard:hover { box-shadow: 0 6px 18px rgba(16,18,21,.1); }
.kcard__top { display: flex; align-items: flex-start; gap: 10px; }
.kcard__av { width: 26px; height: 26px; border-radius: 7px; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex-shrink: 0; }
.kcard__nm { font-weight: 700; font-size: 13.5px; line-height: 1.25; }
.kcard__co { color: var(--muted); font-size: 12px; }
.kcard__grip { margin-left: auto; color: #c7ccd6; }
.kcard__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.kcard__amt { font-weight: 800; }
.kcard__prob { font-weight: 700; font-size: 12px; color: var(--muted); }
.kcard__prob.hi { color: var(--green); }

/* ───────── Toast / spinner / empty ───────── */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 10px; box-shadow: var(--shadow-lg); font-weight: 500; }
.toast.error { background: var(--red); } .toast.success { background: var(--green); }
.spinner { width: 30px; height: 30px; border: 3px solid var(--line); border-top-color: var(--blue); border-radius: 50%; animation: spin .7s linear infinite; margin: 70px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty svg { width: 50px; height: 50px; fill: #d7dbe3; margin-bottom: 12px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.tab { padding: 11px 16px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.active { color: var(--blue-ink); border-bottom-color: var(--blue); }

/* ============================================================
   AUTH (login / install)
   ============================================================ */
.auth-body { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg,#eef2fb,#f3f4f6); }
.auth-card { width: 380px; max-width: 92vw; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); padding: 34px 32px; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; margin-bottom: 22px; }
.auth-logo { width: 36px; height: 36px; border-radius: 9px; overflow: hidden; display: grid; place-items: center; }
.auth-logo img { width: 100%; height: 100%; object-fit: contain; }
.auth-title { font-size: 22px; margin: 0 0 4px; }
.auth-sub { color: var(--muted); margin: 0 0 22px; }
.auth-form label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 16px; color: var(--txt-soft); }
.auth-form input { width: 100%; margin-top: 6px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; outline: 0; }
.auth-form input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-50); }
.auth-error { background: var(--red-bg); color: var(--red); padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; font-weight: 500; font-size: 13px; }
code { background: var(--bg); padding: 1px 6px; border-radius: 5px; font-size: 12px; }

/* ───────── Print ───────── */
@media print {
  .rail, .cert-badge, .props, .print-hide, .overlay, .slideover, .toast { display: none !important; }
  body, .content, .app-shell, .main { background: #fff !important; }
  .content { padding: 0 !important; } .inv-layout { display: block !important; }
  .doc-card { border: 0; box-shadow: none; padding: 0; }
}

/* ───────── Responsive ───────── */
@media (max-width: 1024px) { .inv-layout { grid-template-columns: 1fr; } .treas-top { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .grid-2, .grid-3, .info-grid { grid-template-columns: 1fr; } .recon { grid-template-columns: 1fr; } .recon__link { display: none; } }
