/* ===== Emissor Fiscal: design system ===== */
:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --txt: #0f172a;
  --txt-2: #334155;
  --muted: #64748b;
  --line: #e5e9f2;
  --line-2: #eef1f6;
  --pri: #0e9f5a;
  --pri-600: #0b7f48;
  --pri-50: #e8faf0;
  --pri-100: #c6f3da;
  --ok: #059669; --ok-50: #ecfdf5; --ok-100: #d1fae5;
  --warn: #b45309; --warn-50: #fffbeb; --warn-100: #fef3c7;
  --err: #dc2626; --err-50: #fef2f2; --err-100: #fee2e2;
  --info: #0284c7; --info-50: #f0f9ff;
  --side: #044040;
  --side-2: #032d2d;
  --side-txt: #a7c9c4;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .04);
  --shadow-lg: 0 10px 40px rgba(15, 23, 42, .16);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
[hidden] { display: none !important; }
body { margin: 0; font: 14px/1.5 var(--font); color: var(--txt); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--pri); text-decoration: none; }
a:hover { color: var(--pri-600); }
.ic { flex-shrink: 0; vertical-align: middle; }
.muted { color: var(--muted); }
.right { text-align: right; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.nowrap { white-space: nowrap; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

/* ===== Estrutura ===== */
.app { display: flex; min-height: 100vh; }
.side {
  width: 248px; flex-shrink: 0; background: linear-gradient(180deg, var(--side) 0%, var(--side-2) 100%);
  color: var(--side-txt); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 40;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 20px 20px 18px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff;
  background: transparent; color: #25d978;
}
.brand-name { color: #fff; font-weight: 700; font-size: 15px; letter-spacing: .2px; line-height: 1.2; }
.brand-sub { font-size: 12px; color: var(--side-txt); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.nav { padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: #5f8f8a; padding: 14px 10px 6px; font-weight: 600; }
.nav a, .nav .soon {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; color: var(--side-txt);
  font-weight: 500; transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.on { background: rgba(37, 217, 120, .16); color: #fff; }
.nav a.on .ic { color: #25d978; }
.nav .soon { opacity: .45; cursor: default; }
.nav .tag { margin-left: auto; font-size: 10px; background: rgba(255, 255, 255, .08); padding: 1px 7px; border-radius: 20px; font-weight: 600; }
.side-foot { margin-top: auto; padding: 14px; border-top: 1px solid rgba(255, 255, 255, .06); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px;
  color: #fff; background: linear-gradient(135deg, #25d978, #0e9f5a); color: #04302f; flex-shrink: 0;
}
.user-chip .nm { color: #fff; font-weight: 600; font-size: 13px; line-height: 1.2; }
.user-chip .em { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.user-chip button { margin-left: auto; background: none; border: 0; color: var(--side-txt); cursor: pointer; padding: 6px; border-radius: 8px; }
.user-chip button:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top {
  background: rgba(255, 255, 255, .85); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
  padding: 14px 32px; display: flex; align-items: center; gap: 16px; position: sticky; top: 0; z-index: 30;
}
.top h1 { font-size: 20px; margin: 0; font-weight: 700; letter-spacing: -.2px; }
.top .crumbs { font-size: 12px; color: var(--muted); margin-bottom: 1px; }
.top .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.burger { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px; cursor: pointer; color: var(--txt); }
.env-bar { padding: 7px 32px; font-size: 13px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid; }
.env-bar.homolog { background: var(--warn-50); color: #92400e; border-color: var(--warn-100); }
.env-bar.prod { background: var(--ok-50); color: #065f46; border-color: var(--ok-100); }
.content { padding: 28px 32px 48px; width: 100%; max-width: 1400px; }

/* ===== Cartões ===== */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px; margin-bottom: 20px; }
.card-h { display: flex; align-items: center; gap: 10px; margin: -2px 0 16px; }
.card-h h2, .card h2 { font-size: 15px; margin: 0; font-weight: 650; }
.card-h .sub { font-size: 13px; color: var(--muted); }
.card-h .actions { margin-left: auto; display: flex; gap: 8px; }
.card-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--pri-50); color: var(--pri); }
.card.flush { padding: 0; overflow: hidden; }
.card.flush .card-h { padding: 18px 22px 0; }
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }

/* ===== Indicadores ===== */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); display: flex; gap: 14px; align-items: flex-start; }
.stat .si { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; }
.stat .l { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.stat .v { font-size: 22px; font-weight: 700; letter-spacing: -.3px; margin-top: 2px; }
.stat .d { font-size: 12px; color: var(--muted); margin-top: 2px; }
.si.indigo { background: var(--pri-50); color: var(--pri); }
.si.green { background: var(--ok-50); color: var(--ok); }
.si.amber { background: var(--warn-50); color: var(--warn); }
.si.sky { background: var(--info-50); color: var(--info); }

/* Gráfico de barras */
.bars { display: flex; align-items: flex-end; gap: 14px; height: 190px; padding: 10px 4px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bar { width: 100%; max-width: 46px; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, #25d978, #0e9f5a); min-height: 4px; position: relative; transition: opacity .15s; }
.bar:hover { opacity: .85; }
.bar.zero { background: var(--line); }
.bar .tip { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 600; color: var(--txt-2); white-space: nowrap; }
.bar-col .lb { font-size: 12px; color: var(--muted); text-transform: capitalize; }

/* Atalhos */
.quick { display: grid; gap: 10px; }
.quick a { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--txt); transition: border-color .15s, background .15s; }
.quick a:hover { border-color: var(--pri-100); background: var(--pri-50); }
.quick .t { font-weight: 600; font-size: 13.5px; }
.quick .s { font-size: 12px; color: var(--muted); }

/* ===== Abas ===== */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a, .tabs span { display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; font-weight: 600; font-size: 13.5px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs .on { color: var(--pri); border-bottom-color: var(--pri); }
.tabs .soon { opacity: .5; cursor: default; }
.tabs .tag { font-size: 10px; background: var(--line-2); color: var(--muted); padding: 1px 7px; border-radius: 20px; }

/* ===== Botões ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--txt-2); font: inherit; font-weight: 600; font-size: 13.5px;
  cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-sm); transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn:hover { background: var(--surface-2); border-color: #d5dbe7; color: var(--txt); }
.btn:focus-visible { outline: 3px solid var(--pri-100); outline-offset: 1px; }
.btn.pri { background: var(--pri); border-color: var(--pri); color: #fff; box-shadow: 0 1px 2px rgba(14, 159, 90, .3); }
.btn.pri:hover { background: var(--pri-600); border-color: var(--pri-600); color: #fff; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.ok:hover { background: #047857; color: #fff; }
.btn.danger { color: var(--err); border-color: var(--err-100); }
.btn.danger:hover { background: var(--err-50); color: var(--err); }
.btn.danger.solid { background: var(--err); color: #fff; border-color: var(--err); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--line-2); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; }
.btn.icon { padding: 7px; }
.btn[disabled], .btn.disabled { opacity: .45; pointer-events: none; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 16px; }
.toolbar .spacer { flex: 1; }
.toolbar form { margin: 0; }

/* Menus suspensos */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 50; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow-lg); min-width: 250px; padding: 6px;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 10px; color: var(--txt-2);
  background: none; border: 0; font: inherit; font-weight: 500; cursor: pointer; border-radius: 7px;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-2); color: var(--txt); }
.dropdown-menu form { margin: 0; }

/* ===== Tabelas ===== */
.table-wrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); }
.grid th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 11px 14px;
  background: var(--surface-2); border-bottom: 1px solid var(--line); font-weight: 600; white-space: nowrap;
}
.grid td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; color: var(--txt-2); }
.grid tbody tr { transition: background .1s; }
.grid tbody tr:hover td { background: #f7fdfa; }
.grid tbody tr.sel td { background: var(--pri-50); }
.grid tbody tr:last-child td { border-bottom: 0; }
.grid .num { text-align: right; font-variant-numeric: tabular-nums; }
.grid tfoot td { font-weight: 600; background: var(--surface-2); border-top: 1px solid var(--line); color: var(--txt); }
.grid .strong { color: var(--txt); font-weight: 600; }
.grid input, .grid select { padding: 6px 9px; }
.card.flush .grid th:first-child, .card.flush .grid td:first-child { padding-left: 22px; }
.card.flush .grid th:last-child, .card.flush .grid td:last-child { padding-right: 22px; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--pri); vertical-align: middle; }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .ei { width: 52px; height: 52px; border-radius: 14px; background: var(--pri-50); color: var(--pri); display: grid; place-items: center; margin: 0 auto 12px; }
.empty h3 { color: var(--txt); margin: 0 0 4px; font-size: 15px; }
.empty p { margin: 0 0 14px; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; background: var(--line-2); color: var(--muted); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.autorizada { background: var(--ok-50); color: var(--ok); }
.badge.rejeitada, .badge.denegada { background: var(--err-50); color: var(--err); }
.badge.cancelada { background: #f1f5f9; color: #94a3b8; }
.badge.processando { background: var(--warn-50); color: var(--warn); }
.badge.rascunho { background: var(--info-50); color: var(--info); }
.badge.plain::before { display: none; }

/* ===== Alertas ===== */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: 10px; margin-bottom: 16px; border: 1px solid; font-size: 13.5px; }
.alert .ic { margin-top: 1px; }
.alert.ok { background: var(--ok-50); border-color: var(--ok-100); color: #065f46; }
.alert.erro { background: var(--err-50); border-color: var(--err-100); color: #991b1b; }
.alert.warn { background: var(--warn-50); border-color: var(--warn-100); color: #92400e; }
.alert.info { background: var(--info-50); border-color: #bae6fd; color: #075985; }
.alert ul { margin: 0; padding-left: 18px; }
.alert .x { margin-left: auto; background: none; border: 0; color: inherit; opacity: .6; cursor: pointer; padding: 0; }

/* ===== Formulários ===== */
.form-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.f label, .lbl { font-size: 12.5px; font-weight: 600; color: var(--txt-2); }
.f .hint { font-size: 12px; color: var(--muted); }
.c1 { grid-column: span 1; } .c2 { grid-column: span 2; } .c3 { grid-column: span 3; } .c4 { grid-column: span 4; }
.c5 { grid-column: span 5; } .c6 { grid-column: span 6; } .c7 { grid-column: span 7; } .c8 { grid-column: span 8; }
.c9 { grid-column: span 9; } .c12 { grid-column: span 12; }
input, select, textarea {
  font: inherit; font-size: 14px; padding: 9px 12px; border: 1px solid #d6dce8; border-radius: var(--radius-sm); background: #fff;
  width: 100%; color: var(--txt); transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #9aa4b8; }
input:hover, select:hover, textarea:hover { border-color: #c3cbdb; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--pri); box-shadow: 0 0 0 3px var(--pri-100); }
input:disabled { background: var(--surface-2); color: var(--muted); }
input[type=file] { padding: 7px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--txt-2); cursor: pointer; }
.input-ic { position: relative; }
.input-ic .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; }
.input-ic input { padding-left: 36px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(180deg, rgba(245, 247, 251, 0), var(--bg) 35%); }
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 700; margin: 6px 0 -4px; grid-column: span 12; }

/* ===== Detalhes ===== */
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 24px; margin: 0; }
.kv div { min-width: 0; }
.kv dt { font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 2px; }
.kv dd { margin: 0; font-weight: 600; color: var(--txt); overflow-wrap: anywhere; }
.total-box { background: linear-gradient(135deg, #044040, #0b6b55); color: #fff; border-radius: var(--radius); padding: 18px 22px; }
.total-box .l { font-size: 12.5px; opacity: .85; }
.total-box .v { font-size: 26px; font-weight: 700; letter-spacing: -.3px; }
.key-box { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px dashed var(--line); border-radius: 10px; padding: 10px 14px; }

/* ===== Modais ===== */
.modal { display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, .5); backdrop-filter: blur(2px); z-index: 100; align-items: center; justify-content: center; padding: 16px; }
.modal.open { display: flex; animation: fade .15s ease-out; }
.modal .card { width: 540px; max-width: 100%; margin: 0; box-shadow: var(--shadow-lg); animation: pop .18s ease-out; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }

/* Autocomplete */
.ac { position: relative; }
.ac-list { position: absolute; z-index: 60; top: calc(100% + 4px); left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; max-height: 280px; overflow: auto; box-shadow: var(--shadow-lg); padding: 4px; }
.ac-list div { padding: 9px 10px; cursor: pointer; border-radius: 7px; }
.ac-list div:hover { background: var(--pri-50); }

/* Paginação */
.pager { display: flex; gap: 8px; align-items: center; padding: 14px 22px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.pager select { width: auto; padding: 6px 10px; }

/* ===== Login / cadastro ===== */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-hero {
  background: radial-gradient(1000px 520px at -10% -10%, rgba(37, 217, 120, .35) 0%, transparent 60%), radial-gradient(900px 500px at 120% 120%, rgba(37, 217, 120, .22) 0%, transparent 55%), var(--side);
  color: #b9d6d1; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-hero h2 { color: #fff; font-size: 32px; line-height: 1.2; margin: 0 0 14px; letter-spacing: -.5px; max-width: 460px; }
.auth-hero p { font-size: 15px; max-width: 440px; margin: 0; }
.auth-feats { display: grid; gap: 14px; margin-top: 32px; }
.auth-feats div { display: flex; gap: 12px; align-items: center; }
.auth-feats .fi { width: 34px; height: 34px; border-radius: 9px; background: rgba(255, 255, 255, .08); display: grid; place-items: center; color: #25d978; }
.auth-side { display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.auth-box { width: 100%; max-width: 420px; }
.auth-box h1 { font-size: 24px; margin: 0 0 6px; letter-spacing: -.3px; }
.auth-box .lead { color: var(--muted); margin: 0 0 24px; }

/* ===== Responsivo ===== */
.overlay { display: none; }
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .side { position: fixed; left: 0; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .side { transform: none; }
  body.nav-open .overlay { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 35; }
  .burger { display: inline-flex; }
  .top, .content, .env-bar { padding-left: 16px; padding-right: 16px; }
  .form-grid > * { grid-column: span 12; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .kv { grid-template-columns: 1fr; }
}
@media (max-width: 560px) { .stats { grid-template-columns: 1fr; } }
.auth-brand-mobile { display: none; }
@media (max-width: 900px) { .auth-brand-mobile { display: flex; } }
.copiado { color: var(--ok) !important; }

/* ===== Marca notton ===== */
.logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; }
.logo svg { display: block; }
.logo .wm { font-weight: 800; font-size: 24px; letter-spacing: -.8px; line-height: 1; }
.logo .tg { font-size: 8.5px; font-weight: 800; line-height: 1.05; color: #25d978; letter-spacing: .3px; text-transform: uppercase; }
.logo.dark { color: #044040; }
.brand-mark { width: auto; height: auto; box-shadow: none; }

/* Telas largas: topo e faixa de ambiente acompanham a largura do conteúdo */
@media (min-width: 901px) {
  .top, .env-bar { padding-right: max(32px, calc(100% - 1400px + 32px)); }
}

/* ===== Nota rápida ===== */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font: inherit; font-size: 13px; font-weight: 500; color: var(--txt-2); cursor: pointer; transition: border-color .15s, background .15s;
}
.chip:hover { border-color: var(--pri-100); background: var(--pri-50); color: var(--txt); }
.chip.on { border-color: var(--pri); background: var(--pri-50); color: var(--pri-600); font-weight: 600; }
.chip .p { color: var(--muted); font-size: 12px; }
.step { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--side); color: #25d978; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.sel-cli { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--pri-100); background: var(--pri-50); border-radius: 10px; }
.rapida-lado { position: sticky; top: 90px; }
.rapida-lado .linha { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13.5px; }
.kbd { font: 600 11px ui-monospace, monospace; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--surface-2); color: var(--muted); }
.qtd-ctl { display: inline-flex; align-items: center; border: 1px solid #d6dce8; border-radius: 8px; overflow: hidden; }
.qtd-ctl button { border: 0; background: var(--surface-2); width: 30px; height: 34px; cursor: pointer; font-size: 16px; color: var(--txt-2); }
.qtd-ctl input { border: 0; width: 80px; text-align: center; border-radius: 0; padding: 6px; box-shadow: none !important; }

/* ===== Impressão (relatórios) ===== */
.print-only { display: none; }
@media print {
  .side, .top, .env-bar, .no-print, .overlay, .alert .x { display: none !important; }
  .print-only { display: block; }
  body { background: #fff; }
  .content { padding: 0; max-width: none; }
  .card, .stat { box-shadow: none; break-inside: avoid; }
  .stats { grid-template-columns: repeat(4, 1fr) !important; }
}

/* ===== Troca de empresa ===== */
.emp-atual {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); color: #fff; font: inherit; text-align: left;
}
.emp-atual:hover { background: rgba(255, 255, 255, .1); }
.emp-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: rgba(37, 217, 120, .16); color: #25d978; flex-shrink: 0; }
.emp-nome { display: block; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.emp-doc { display: block; font-size: 11px; color: var(--side-txt); }
.emp-switch .dropdown-menu button[disabled] { color: var(--pri-600); font-weight: 600; opacity: 1; cursor: default; }
.user-chip a.avatar { text-decoration: none; }

/* Assinatura e planos */
.uso { height: 10px; background: var(--line-2); border-radius: 20px; overflow: hidden; margin: 10px 0 6px; }
.uso i { display: block; height: 100%; background: var(--pri); border-radius: 20px; }
.uso.warn i { background: var(--warn); } .uso.erro i { background: var(--err); }
.ciclo-sw { display: inline-flex; background: var(--line-2); border-radius: 30px; padding: 4px; gap: 2px; }
.ciclo-sw button { border: 0; background: none; padding: 7px 16px; border-radius: 30px; font: 600 13px var(--font); color: var(--muted); cursor: pointer; }
.ciclo-sw button.on { background: var(--surface); color: var(--txt); box-shadow: var(--shadow-sm); }
.ciclo-sw small { color: var(--ok); font-weight: 700; }
.planos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 14px; }
.plano { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 8px; background: var(--surface); position: relative; }
.plano.destaque { border-color: var(--pri); box-shadow: 0 0 0 3px var(--pri-50); }
.plano.atual { background: var(--pri-50); }
.plano .selo { position: absolute; top: -10px; right: 14px; background: var(--pri); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 20px; }
.plano h3 { margin: 0; font-size: 15px; }
.plano .preco { font-size: 24px; font-weight: 750; letter-spacing: -.5px; }
.plano .preco small { font-size: 13px; color: var(--muted); font-weight: 500; }
.plano .det { font-size: 12.5px; color: var(--muted); min-height: 18px; }
.plano ul { list-style: none; padding: 0; margin: 4px 0 8px; font-size: 13px; display: grid; gap: 4px; }
.plano ul li::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.plano form { margin-top: auto; }
.plano .btn { width: 100%; justify-content: center; }
[data-ciclo="mensal"] .so-anual, [data-ciclo="anual"] .so-mensal { display: none; }
.nav a .tag.lock { background: rgba(255,255,255,.1); }
