/* ============ VOLTA SEMPRE — tema baseado no GestãoClick ============ */
:root {
  /* identidade Volta Sempre */
  --marinho: #001548;
  --azul: #0654e4;
  --azul-claro: #eaf1ff;
  --turquesa: #08c89d;
  --turquesa-dark: #06a884;

  --sidebar-bg: #001548;
  --sidebar-bg-dark: #000d2e;
  --sidebar-text: #a8b8d8;
  --sidebar-active: #08c89d;
  /* "green" continua nomeado assim (usado em todo o app) mas agora é o azul da marca */
  --green: #0654e4;
  --green-dark: #0442b8;
  --blue: #0654e4;
  --red: #e5484d;
  --orange: #f5a623;
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #172033;
  --muted: #7b8794;
  --border: #e3e8f0;
  --topbar-h: 60px;
  --sidebar-w: 248px;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 4px 12px rgba(16,24,40,.04);
  --shadow-md: 0 4px 16px rgba(16,24,40,.08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ============ TOPBAR ============ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h);
  background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px; padding: 0 12px; z-index: 100;
}
.topbar-btn {
  background: none; border: none; width: 38px; height: 38px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; color: #5f6368; position: relative;
}
.topbar-btn:hover { background: #f1f3f4; }
.topbar-btn svg { width: 20px; height: 20px; }
.badge {
  position: absolute; top: 2px; right: 2px; background: var(--red); color: #fff;
  font-size: 10px; min-width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px; font-weight: 700;
}
.brand { display: flex; align-items: center; gap: 8px; margin-left: 4px; }
.brand-icon { font-size: 22px; }
.brand-name { font-size: 19px; color: var(--sidebar-bg); font-weight: 400; letter-spacing: -.3px; }
.brand-name b { color: var(--green); font-weight: 700; }
.topbar-spacer { flex: 1; }
.topbar-search { position: relative; width: min(420px, 40vw); }
.topbar-search input {
  width: 100%; height: 36px; border: 1px solid var(--border); border-radius: 18px;
  padding: 0 16px; font-size: 13px; background: #f8f9fa; outline: none;
}
.topbar-search input:focus { background: #fff; border-color: var(--green); }
.global-search-results {
  display: none; position: absolute; top: 42px; left: 0; right: 0; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.12);
  max-height: 400px; overflow: auto; z-index: 300;
}
.global-search-results.open { display: block; }
.gsr-item { padding: 8px 14px; cursor: pointer; display: flex; gap: 8px; align-items: center; }
.gsr-item:hover { background: #f1f8f2; }
.gsr-tag { font-size: 10px; background: #e9ecef; color: var(--muted); border-radius: 4px; padding: 2px 6px; text-transform: uppercase; font-weight: 700; flex-shrink: 0; }
.user-chip {
  display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 20px;
  cursor: pointer; border: 1px solid transparent; color: #444;
}
.user-chip:hover { background: #f1f3f4; }
.user-chip-name { font-size: 12px; font-weight: 600; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0;
}

/* dropdowns */
.dropdown {
  display: none; position: fixed; top: 56px; right: 12px; width: 300px; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.15); z-index: 300; overflow: hidden;
}
.dropdown.open { display: block; }
.dropdown-header { padding: 12px 16px; border-bottom: 1px solid var(--border); font-weight: 700; background: #f8f9fa; }
.dd-user-name { font-weight: 700; }
.dd-user-email { font-size: 12px; color: var(--muted); font-weight: 400; }
.dropdown-body { max-height: 320px; overflow: auto; }
.dropdown-item { display: block; padding: 10px 16px; color: var(--text); font-size: 13px; }
.dropdown-item:hover { background: #f1f3f4; }
.dropdown-sep { height: 1px; background: var(--border); margin: 4px 0; }
.empty-small { padding: 24px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.notif-item { padding: 10px 16px; border-bottom: 1px solid #f1f3f4; font-size: 13px; cursor: pointer; }
.notif-item:hover { background: #fffbea; }
.notif-item .n-title { font-weight: 600; }
.notif-item .n-sub { color: var(--muted); font-size: 12px; }

/* ============ SIDEBAR ============ */
.sidebar {
  position: fixed; top: var(--topbar-h); left: 0; bottom: 0; width: var(--sidebar-w);
  background: var(--sidebar-bg); overflow-y: auto; z-index: 90; transition: transform .2s;
  scrollbar-width: thin; scrollbar-color: #3d5866 transparent;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: #3d5866; border-radius: 3px; }
body.sidebar-closed .sidebar { transform: translateX(-100%); }
body.sidebar-closed .main { margin-left: 0; }
.menu-item { border-bottom: 1px solid rgba(255,255,255,.04); }
.menu-link {
  display: flex; align-items: center; gap: 12px; padding: 11px 16px; color: var(--sidebar-text);
  font-size: 13.5px; cursor: pointer; user-select: none; border-left: 3px solid transparent;
}
.menu-link:hover { background: var(--sidebar-bg-dark); color: #fff; }
.menu-link.active { background: var(--sidebar-bg-dark); color: #fff; border-left-color: var(--green); }
.menu-link .mi-icon { width: 18px; height: 18px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.menu-link .mi-icon svg { width: 17px; height: 17px; }
.menu-link .mi-caret { margin-left: auto; transition: transform .15s; opacity: .6; }
.menu-item.open > .menu-link .mi-caret { transform: rotate(90deg); }
.submenu { display: none; background: #1a2c36; }
.menu-item.open > .submenu { display: block; }
.submenu a {
  display: block; padding: 8px 16px 8px 46px; color: #8fa4ae; font-size: 13px;
}
.submenu a:hover { color: #fff; }
.submenu a.active { color: var(--green); font-weight: 600; }

/* ============ MAIN ============ */
.main {
  margin-left: var(--sidebar-w); margin-top: var(--topbar-h); padding: 20px 24px 60px;
  min-height: calc(100vh - var(--topbar-h)); transition: margin-left .2s;
}
.page-header { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-title { font-size: 22px; font-weight: 400; color: #444; }
.page-sub { color: var(--muted); font-size: 13px; }
.page-header .spacer { flex: 1; }

/* cards */
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; margin-bottom: 20px;
}
.card h3 { font-size: 15px; font-weight: 600; color: #444; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.card h3 .h-link { margin-left: auto; font-size: 12px; font-weight: 400; }

/* dashboard grid */
.dash-row { display: grid; gap: 20px; margin-bottom: 20px; }
.dash-row.cols-2 { grid-template-columns: 1fr 1fr; }
.dash-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
.dash-row.cols-4 { grid-template-columns: repeat(4, 1fr); }
.dash-row > .card { margin-bottom: 0; }

.stat-card { display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; }
.stat-card .s-label { font-size: 13px; color: var(--muted); }
.stat-card .s-value { font-size: 26px; font-weight: 700; }
.stat-card .s-value.pos { color: var(--green); }
.stat-card .s-value.neg { color: var(--red); }
.stat-card .s-link { font-size: 12px; margin-top: 6px; }
.stat-card .s-icon {
  position: absolute; right: 14px; top: 14px; width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 20px; opacity: .9;
}
.s-icon.g { background: #e8f5e9; } .s-icon.r { background: #fdecea; } .s-icon.b { background: #e3f2fd; } .s-icon.o { background: #fff8e1; }

.chart-legend { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; font-size: 13px; }
.chart-legend .lg { display: flex; align-items: center; gap: 8px; }
.chart-legend .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.chart-legend .lg b { margin-left: auto; }
.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut-center-label { font-size: 20px; font-weight: 700; fill: #444; }

.updates-list { display: flex; flex-direction: column; }
.update-item { padding: 12px 0; border-bottom: 1px solid #f1f3f4; }
.update-item:last-child { border-bottom: none; }
.update-item .u-title { font-weight: 600; font-size: 13.5px; color: var(--sidebar-bg); }
.update-item .u-date { font-size: 11px; color: var(--muted); margin: 2px 0 4px; }
.update-item .u-desc { font-size: 13px; color: #555; }

/* ============ TABLES / LISTS ============ */
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.toolbar input[type=search], .toolbar select, .toolbar input[type=date], .toolbar input[type=month] {
  height: 36px; border: 1px solid var(--border); border-radius: 6px; padding: 0 12px; font-size: 13px; background: #fff; outline: none;
}
.toolbar input[type=search] { flex: 1; min-width: 180px; }
.toolbar input:focus, .toolbar select:focus { border-color: var(--green); }

table.grid { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.grid th {
  text-align: left; padding: 10px 12px; background: #f8f9fa; color: #555; font-size: 12px;
  text-transform: uppercase; letter-spacing: .3px; border-bottom: 2px solid var(--border); white-space: nowrap;
}
table.grid td { padding: 10px 12px; border-bottom: 1px solid #f1f3f4; font-size: 13.5px; vertical-align: middle; }
table.grid tr:hover td { background: #fafcfa; }
table.grid td.num, table.grid th.num { text-align: right; white-space: nowrap; }
table.grid .row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.grid-wrap { overflow-x: auto; }
tfoot td { font-weight: 700; background: #f8f9fa; }

.tag { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.tag.green { background: #e8f5e9; color: #2d9540; }
.tag.red { background: #fdecea; color: #c62828; }
.tag.orange { background: #fff8e1; color: #b26a00; }
.tag.blue { background: #e3f2fd; color: #1565c0; }
.tag.gray { background: #eceff1; color: #546e7a; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.empty-state .e-icon { font-size: 44px; margin-bottom: 10px; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px;
  border-radius: 6px; border: 1px solid transparent; font-size: 13px; font-weight: 600;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-outline { background: #fff; border-color: var(--border); color: #555; }
.btn-outline:hover { border-color: var(--green); color: var(--green); }
.btn-danger { background: var(--red); color: #fff; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn-icon { width: 30px; height: 30px; padding: 0; justify-content: center; background: none; border: none; border-radius: 6px; color: #777; font-size: 15px; }
.btn-icon:hover { background: #f1f3f4; color: #333; }
.btn-icon.danger:hover { background: #fdecea; color: var(--red); }

/* ============ FORMS / MODAL ============ */
.modal-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(20,30,40,.5); z-index: 400;
  align-items: flex-start; justify-content: center; padding: 40px 16px; overflow: auto;
}
.modal-backdrop.open { display: flex; }
.modal { background: #fff; border-radius: 10px; width: 640px; max-width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal-header { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-size: 17px; font-weight: 600; }
.modal-close { margin-left: auto; background: none; border: none; font-size: 26px; color: #999; line-height: 1; }
.modal-close:hover { color: #333; }
.modal-body { padding: 20px; max-height: 65vh; overflow: auto; }
.modal-footer { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 12px; font-weight: 600; color: #555; margin-bottom: 4px; }
.field input, .field select, .field textarea {
  width: 100%; height: 38px; border: 1px solid var(--border); border-radius: 6px;
  padding: 0 12px; font-size: 13.5px; font-family: inherit; outline: none; background: #fff;
}
.field textarea { height: auto; min-height: 70px; padding: 10px 12px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(55,179,74,.12); }
.field .hint { font-size: 11px; color: var(--muted); margin-top: 3px; }

/* venda items editor */
.items-editor { border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.items-editor table { width: 100%; border-collapse: collapse; }
.items-editor th { background: #f8f9fa; font-size: 11px; text-transform: uppercase; padding: 8px; text-align: left; }
.items-editor td { padding: 6px 8px; border-top: 1px solid #f1f3f4; }
.items-editor input, .items-editor select { width: 100%; height: 32px; border: 1px solid var(--border); border-radius: 4px; padding: 0 8px; font-size: 13px; }
.items-total { text-align: right; padding: 10px; font-weight: 700; font-size: 15px; background: #f8f9fa; }

/* ============ TOASTS ============ */
.toast-wrap { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 500; }
.toast {
  background: #2d3b45; color: #fff; padding: 12px 18px; border-radius: 8px; font-size: 13.5px;
  box-shadow: 0 6px 20px rgba(0,0,0,.25); animation: slideIn .2s; display: flex; gap: 10px; align-items: center;
}
.toast.success { border-left: 4px solid var(--green); }
.toast.error { border-left: 4px solid var(--red); }
@keyframes slideIn { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* charts */
.svg-chart { width: 100%; height: auto; display: block; }
.axis-label { font-size: 10px; fill: #888; }
.bar-label { font-size: 11px; fill: #555; }

/* ============ DOCUMENTO IMPRIMÍVEL (orçamento / venda) ============ */
.doc-print { font-size: 13px; color: #222; }
.dp-head { display: flex; justify-content: space-between; gap: 20px; border-bottom: 3px solid var(--sidebar-bg); padding-bottom: 14px; margin-bottom: 16px; }
.dp-head h1 { font-size: 19px; color: var(--sidebar-bg); margin: 4px 0; }
.dp-logo { max-height: 54px; max-width: 170px; object-fit: contain; margin-bottom: 4px; display: block; }
.dp-sub { font-size: 11.5px; color: #666; line-height: 1.5; }
.dp-tit { text-align: right; }
.dp-tipo { font-size: 13px; font-weight: 800; letter-spacing: 1px; color: var(--green-dark); }
.dp-num { font-size: 24px; font-weight: 800; color: var(--sidebar-bg); line-height: 1.1; }
.dp-box { background: #f7f9fa; border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; font-size: 12.5px; line-height: 1.6; }
.dp-tab { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.dp-tab th { background: var(--sidebar-bg); color: #fff; padding: 8px 10px; font-size: 11px; text-transform: uppercase; text-align: left; }
.dp-tab td { padding: 8px 10px; border-bottom: 1px solid #eceff1; }
.dp-tab .c { text-align: center; } .dp-tab .d { text-align: right; }
.dp-tot { margin-left: auto; width: 280px; font-size: 13px; }
.dp-tot > div { display: flex; justify-content: space-between; padding: 5px 0; }
.dp-tot .dp-final { border-top: 2px solid var(--sidebar-bg); margin-top: 6px; padding-top: 10px; font-size: 17px; color: var(--sidebar-bg); }
.dp-tot .dp-final b { color: var(--green-dark); }
.dp-val { font-size: 11.5px; color: #b26a00; background: #fff8e1; border-radius: 6px; padding: 8px 12px; margin-top: 12px; }
.dp-rod { margin-top: 18px; padding-top: 10px; border-top: 1px solid #eceff1; font-size: 10.5px; color: #90a4ae; text-align: center; }

.rel-cabecalho { display: none; }
.rel-cabecalho h2 { font-size: 20px; color: var(--sidebar-bg); }

/* report print */
@media print {
  .no-print { display: none !important; }
  .rel-cabecalho { display: block; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 3px solid var(--sidebar-bg); }
  .dash-row.cols-4, .dash-row.cols-2 { display: grid !important; grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .dash-row.cols-2 { grid-template-columns: 1fr 1fr; }
  .card { box-shadow: none; border: 1px solid #e0e0e0; break-inside: avoid; }
  .topbar, .sidebar, .toolbar, .row-actions, .btn, .sidebar-overlay, .fab-suporte, .faixa-assin { display: none !important; }
  .main { margin: 0; padding: 0; }
  body { background: #fff; }
  /* imprimindo um documento dentro do modal: só ele aparece */
  body.imprimindo-doc .main, body.imprimindo-doc .modal-header, body.imprimindo-doc .modal-footer { display: none !important; }
  body.imprimindo-doc .modal-backdrop { position: static; display: block; padding: 0; background: none; }
  body.imprimindo-doc .modal { box-shadow: none; width: 100%; max-width: 100%; border-radius: 0; }
  body.imprimindo-doc .modal-body { max-height: none; overflow: visible; padding: 0; }
}

/* ============ TELA DE LOGIN ============ */
body.loading .topbar, body.loading .sidebar, body.loading .main { display: none; }
.login-screen {
  display: none; position: fixed; inset: 0; z-index: 1000;
  grid-template-columns: 1.1fr 1fr;
}
body.logged-out .login-screen { display: grid; }
body.logged-out .topbar, body.logged-out .sidebar, body.logged-out .main { display: none; }
.login-left {
  background: linear-gradient(150deg, #1a2e3a 0%, #243d4b 55%, #2b5a45 100%);
  color: #fff; padding: 60px; display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}
.login-left::after {
  content: ''; position: absolute; width: 500px; height: 500px; border-radius: 50%;
  background: rgba(55,179,74,.12); bottom: -200px; right: -150px;
}
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.login-brand-icon { font-size: 44px; }
.login-brand h1 { font-size: 38px; font-weight: 300; letter-spacing: -1px; }
.login-brand h1 b { color: #4ade6b; font-weight: 800; }
.login-tagline { font-size: 17px; color: #c9d6dd; margin-bottom: 34px; max-width: 420px; line-height: 1.5; }
.login-features { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.login-features li { font-size: 15px; color: #e2ebef; display: flex; align-items: center; gap: 10px; }
.login-right { background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 30px; }
.login-card {
  background: #fff; border-radius: 16px; padding: 40px; width: 400px; max-width: 100%;
  box-shadow: 0 20px 60px rgba(36,61,75,.14); display: flex; flex-direction: column; gap: 16px;
}
.login-card h2 { font-size: 22px; color: var(--sidebar-bg); }
.login-sub { font-size: 13px; color: var(--muted); margin-top: -10px; }
.login-btn { height: 44px; font-size: 15px; justify-content: center; margin-top: 4px; }
.login-error { color: var(--red); font-size: 13px; min-height: 16px; text-align: center; }
.login-switch { text-align: center; font-size: 13px; color: var(--muted); }
.brand-logo { height: 34px; max-width: 120px; object-fit: contain; border-radius: 6px; }
@media (max-width: 860px) {
  .login-screen { grid-template-columns: 1fr; }
  .login-left { display: none; }
}

/* ============ CARDS FINANCEIRO ============ */
.fin-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px; }
.fin-card {
  border-radius: 10px; padding: 12px 16px; color: #fff; cursor: pointer;
  display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow);
}
.fin-card span { font-size: 12px; opacity: .9; text-transform: uppercase; letter-spacing: .4px; }
.fin-card b { font-size: 20px; }
.fin-card.red { background: linear-gradient(140deg, #e05d4e, #c0392b); }
.fin-card.orange { background: linear-gradient(140deg, #f0a63c, #d68910); }
.fin-card.gray { background: linear-gradient(140deg, #95a5a6, #7f8c8d); }
.fin-card.green { background: linear-gradient(140deg, #3fbf54, #27884a); }
.fin-card.dark { background: linear-gradient(140deg, #34495e, #243d4b); }
@media (max-width: 980px) { .fin-cards { grid-template-columns: repeat(2, 1fr); } }

/* ============ PDV ============ */
.pdv-wrap { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: start; }
.pdv-left { background: #fff; border-radius: 12px; padding: 24px; box-shadow: var(--shadow); }
.pdv-title { font-size: 20px; font-weight: 700; color: #444; margin-bottom: 14px; letter-spacing: .5px; }
.pdv-search {
  width: 100%; height: 54px; font-size: 18px; border: 2px solid var(--border); border-radius: 10px;
  padding: 0 18px; outline: none;
}
.pdv-search:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(55,179,74,.15); }
.pdv-results { border: 1px solid var(--border); border-radius: 8px; margin-top: 8px; overflow: hidden; }
.pdv-result { padding: 10px 14px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid #f1f3f4; }
.pdv-result:hover, .pdv-result.sel { background: #e8f5e9; }
.pdv-result span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.pdv-item-form { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; background: #f8f9fa; border-radius: 10px; padding: 16px; }
.pdv-field label { display: block; font-size: 11px; font-weight: 700; color: #777; letter-spacing: .5px; margin-bottom: 4px; }
.pdv-field input { width: 100%; height: 42px; border: 1px solid var(--border); border-radius: 8px; padding: 0 12px; font-size: 16px; }
.pdv-field .pdv-val { font-size: 15px; font-weight: 700; padding: 10px 0; }
.pdv-add { grid-column: 1 / -1; height: 46px; justify-content: center; font-size: 15px; }
.pdv-cart { margin-top: 18px; }
.pdv-right {
  background: linear-gradient(170deg, #243d4b, #1a2e3a); border-radius: 12px; padding: 20px;
  color: #fff; position: sticky; top: 72px;
}
.pdv-header-box { background: var(--green); border-radius: 8px; padding: 12px 14px; font-size: 13px; display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.pdv-total-label { font-size: 13px; letter-spacing: 1px; color: #8fa4ae; }
.pdv-total { font-size: 42px; font-weight: 800; margin-bottom: 8px; }
.pdv-btn {
  width: 100%; height: 48px; border: none; border-radius: 8px; font-size: 15px; font-weight: 700;
  margin-top: 10px; color: #fff; letter-spacing: .5px;
}
.pdv-btn.finish { background: linear-gradient(140deg, #3fbf54, #27884a); }
.pdv-btn.finish:hover { filter: brightness(1.08); }
.pdv-btn.cancel { background: #e05d4e; }
.pdv-shortcuts { margin-top: 16px; font-size: 11px; color: #8fa4ae; text-align: center; }
@media (max-width: 980px) { .pdv-wrap { grid-template-columns: 1fr; } .pdv-right { position: static; } }

/* ============ CAIXA / CNPJ ============ */
.caixa-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; font-size: 14px;
}
.caixa-bar.aberto { background: #e8f5e9; border: 1px solid #c8e6c9; color: #1b5e20; }
.caixa-bar.fechado { background: #fff8e1; border: 1px solid #ffecb3; color: #7a5c00; }
.caixa-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cnpj-box { background: #f1f8f2; border: 1px solid #d7ecdb; border-radius: 10px; padding: 12px; margin-bottom: 16px; }
.cnpj-bar { display: flex; gap: 8px; }
.cnpj-bar input { flex: 1; height: 38px; border: 1px solid var(--border); border-radius: 6px; padding: 0 12px; font-size: 14px; }
.cnpj-bar input:focus { border-color: var(--green); outline: none; }
.cnpj-status { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.4; }

/* ============ BUSCA DENTRO DO FORMULÁRIO (itens / pessoas) ============ */
.doc-busca { position: relative; }
.doc-busca > input {
  width: 100%; height: 44px; border: 2px solid var(--border); border-radius: 8px;
  padding: 0 14px; font-size: 15px; outline: none; background: #fff;
}
.doc-busca > input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(55,179,74,.12); }
.doc-resultados {
  border: 1px solid var(--border); border-radius: 8px; margin-top: 6px; overflow: hidden; background: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,.07); max-height: 260px; overflow-y: auto;
}
.doc-resultado {
  padding: 10px 14px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px;
  align-items: center; border-bottom: 1px solid #f1f3f4; font-size: 14px;
}
.doc-resultado:last-child { border-bottom: none; }
.doc-resultado:hover { background: #e8f5e9; }
.dr-info { color: var(--muted); font-size: 13px; white-space: nowrap; }
.item-sub { font-size: 11.5px; color: var(--muted); }
.pessoa-sel {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #e8f5e9; border: 1px solid #c8e6c9; border-radius: 8px; padding: 10px 14px; font-size: 14px;
}

/* ============ RESUMO PÓS-LANÇAMENTO ============ */
.resumo-total {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(140deg, #243d4b, #1a2e3a); color: #fff;
  border-radius: 10px; padding: 16px 20px; margin-bottom: 14px;
}
.resumo-total span { font-size: 13px; color: #b8c7ce; text-transform: uppercase; letter-spacing: .5px; }
.resumo-total b { font-size: 28px; }
.resumo-lista { display: flex; flex-direction: column; gap: 8px; }
.resumo-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 8px; font-size: 14px; background: #fff;
}
.resumo-item:hover { border-color: var(--green); background: #f6fbf7; }
.ri-icone { font-size: 20px; flex-shrink: 0; }
.ri-seta { margin-left: auto; color: var(--muted); font-size: 20px; }

/* ============ PAINEL O.S. / KANBAN ============ */
.painel-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.painel-card { border-radius: 10px; color: #fff; padding: 16px; display: flex; flex-direction: column; gap: 2px; }
.painel-card b { font-size: 26px; }
.painel-card span { font-size: 12px; opacity: .9; }
.kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.kanban-col { background: #eceff1; border-radius: 10px; padding: 10px; }
.kanban-head { font-weight: 700; font-size: 13px; color: #455a64; padding: 6px 8px 10px; display: flex; justify-content: space-between; align-items: center; }
.kanban-card { background: #fff; border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.08); font-size: 13px; }
.kanban-card:hover { box-shadow: 0 3px 10px rgba(0,0,0,.14); }
.kanban-card .kc-row { color: var(--muted); margin: 4px 0 6px; }
@media (max-width: 980px) { .painel-cards { grid-template-columns: repeat(2, 1fr); } .kanban { grid-template-columns: 1fr; } }

/* ============ DRE ============ */
table.dre td { font-size: 13px; }
.dre-verde td { background: #e8f5e9; }
.dre-vermelho td { background: #fdecea; }
.dre-azul td { background: #e3f2fd; font-weight: 700; }
.dre-sinal { display: inline-block; width: 18px; height: 18px; text-align: center; background: #fff; border-radius: 4px; border: 1px solid var(--border); font-size: 12px; line-height: 17px; }

/* ============ PERMISSÕES ============ */
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.perm-item {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 13.5px; cursor: pointer; background: #fff;
}
.perm-item:hover { border-color: var(--green); }
.perm-item input { width: auto; height: auto; }
.perm-item.sensivel { background: #fffdf5; border-color: #ffe9b3; }
.perm-tag { font-size: 10px; background: #ffecb3; color: #8a6100; border-radius: 4px; padding: 1px 5px; font-weight: 700; }
@media (max-width: 700px) { .perm-grid { grid-template-columns: 1fr; } }

/* ============ MEU PLANO ============ */
.plano-atual { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.plano-atual h3 { font-size: 22px; color: var(--marinho); }
.toggle-ciclo { display: flex; gap: 6px; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 5px; width: fit-content; margin: 0 auto 20px; }
.tgc { border: none; background: none; padding: 10px 20px; border-radius: 9px; font-size: 14px; font-weight: 700; color: var(--muted); cursor: pointer; transition: .2s; }
.tgc i { font-style: normal; font-size: 11px; background: rgba(8,200,157,.18); color: var(--turquesa-dark); padding: 2px 6px; border-radius: 20px; margin-left: 4px; }
.tgc.ativo { background: linear-gradient(135deg, #0a63f5, #0442b8); color: #fff; }
.tgc.ativo i { background: rgba(255,255,255,.25); color: #fff; }
.plano-card { position: relative; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.plano-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.plano-card.popular { border: 2px solid var(--azul); }
.plano-card.atual { border: 2px solid var(--turquesa); }
.fita-plano { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, #0a63f5, #08c89d); color: #fff; font-size: 11px; font-weight: 800; padding: 4px 14px; border-radius: 20px; white-space: nowrap; }
.plano-card h3 { font-size: 19px; color: var(--marinho); margin-bottom: 2px; }
.plano-preco { display: flex; align-items: baseline; gap: 3px; margin: 6px 0 2px; }
.plano-preco span { font-size: 15px; font-weight: 700; color: var(--muted); }
.plano-preco b { font-size: 38px; letter-spacing: -1.6px; color: var(--marinho); }
.plano-preco i { font-style: normal; font-size: 13px; color: var(--muted); }
.plano-eco { font-size: 12px; color: var(--turquesa-dark); font-weight: 700; margin-bottom: 14px; min-height: 18px; }
.plano-itens { list-style: none; display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; flex: 1; }
.plano-itens li { font-size: 13.5px; color: #46536b; padding-left: 20px; position: relative; }
.plano-itens li::before { content: '✓'; position: absolute; left: 0; color: var(--turquesa-dark); font-weight: 900; }

/* ============ DASHBOARD 2.0 ============ */
.dash-hero {
  position: relative; overflow: hidden; border-radius: 20px; padding: 30px 34px;
  background: linear-gradient(135deg, #001548 0%, #052a7a 55%, #0654e4 120%);
  color: #fff; margin-bottom: 22px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  box-shadow: 0 12px 36px rgba(0,21,72,.22);
  animation: heroEntra .5s cubic-bezier(.2,1.2,.4,1) both;
}
@keyframes heroEntra { from { opacity: 0; transform: translateY(-10px); } }
.dh-luz {
  position: absolute; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(8,200,157,.35), transparent 68%);
  top: -230px; right: -110px; animation: giraLuz 14s ease-in-out infinite;
}
@keyframes giraLuz { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-40px,30px) scale(1.15); } }
.dh-txt { position: relative; flex: 1; min-width: 260px; }
.dh-ola { font-size: 13.5px; color: #9fc0ff; font-weight: 700; letter-spacing: .3px; }
.dash-hero h1 { font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -.8px; margin: 4px 0 6px; font-weight: 700; }
.dash-hero p { font-size: 13.5px; color: #c3d3ee; }
.dh-on { color: #4ade6b; }
.dh-acoes { position: relative; display: flex; gap: 10px; flex-wrap: wrap; }
.btn-hero { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn-hero span { font-size: 19px; line-height: 1; }
.btn-vidro {
  background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.28);
  backdrop-filter: blur(6px); display: inline-flex; align-items: center;
}
.btn-vidro:hover { background: rgba(255,255,255,.24); color: #fff; }

/* onboarding com progresso */
.onboard { animation: entrar .35s .05s both; }
.ob-topo { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.ob-perc { font-size: 26px; font-weight: 800; color: var(--azul); letter-spacing: -1px; }
.ob-barra { height: 8px; background: #eef2f8; border-radius: 5px; overflow: hidden; margin-bottom: 18px; }
.ob-barra i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #0654e4, #08c89d); transition: width .8s cubic-bezier(.2,1,.3,1); }
.ob-passos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.ob-passo {
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  padding: 16px 10px; border: 1px solid var(--border); border-radius: 14px; font-size: 13px;
  color: #46536b; background: #fff; transition: transform .18s, border-color .18s, box-shadow .18s;
  animation: entrar .35s both;
}
.ob-passo:hover { transform: translateY(-4px); border-color: var(--azul); box-shadow: var(--shadow-md); color: var(--azul); }
.ob-ic {
  width: 40px; height: 40px; border-radius: 12px; background: var(--azul-claro);
  display: flex; align-items: center; justify-content: center; font-size: 19px; color: var(--azul);
}
.ob-passo.ok { border-color: rgba(8,200,157,.45); background: rgba(8,200,157,.06); color: var(--turquesa-dark); }
.ob-passo.ok .ob-ic { background: var(--turquesa); color: #fff; font-weight: 900; }
@media (max-width: 880px) { .ob-passos { grid-template-columns: 1fr 1fr; } }

/* cards de métrica clicáveis */
a.stat-card { color: inherit; display: flex; animation: entrar .35s both; }
a.stat-card:hover { text-decoration: none; }
.stat-card .s-value { transition: color .2s; font-variant-numeric: tabular-nums; }
.s-icon.azul { background: var(--azul-claro); }
.s-icon.turq { background: rgba(8,200,157,.14); }
.s-icon.vermelho { background: #fdecea; }
.s-icon.laranja { background: #fff8e1; }
.s-icon.cinza { background: #eef2f7; }
.card-vazio { border: 1px dashed var(--border); background: #fbfcfe; }
.card-vazio:hover { border-color: var(--azul); border-style: solid; }
.stat-card .s-link { color: var(--azul); font-weight: 600; }

/* gráficos e blocos do painel entram escalonados */
.dash-row > .card { animation: entrar .35s both; }
.dash-row > .card:nth-child(2) { animation-delay: .05s; }
.dash-row > .card:nth-child(3) { animation-delay: .1s; }
.dash-row > .card:nth-child(4) { animation-delay: .15s; }
.card h3 { letter-spacing: -.2px; }

/* dicas do painel */
.dicas { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dica {
  display: flex; gap: 14px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 14px;
  color: inherit; background: #fff; transition: transform .18s, border-color .18s, box-shadow .18s;
}
.dica:hover { transform: translateY(-3px); border-color: var(--azul); box-shadow: var(--shadow-md); }
.dica-ic {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0; font-size: 20px;
  background: linear-gradient(135deg, var(--azul-claro), rgba(8,200,157,.16));
  display: flex; align-items: center; justify-content: center;
}
.dica b { display: block; font-size: 14.5px; color: var(--marinho); margin-bottom: 3px; }
.dica span { font-size: 13px; color: var(--muted); line-height: 1.5; }
@media (max-width: 880px) { .dicas { grid-template-columns: 1fr; } }

/* ============ CONFETES E CELEBRAÇÕES ============ */
.confete-wrap { position: fixed; inset: 0; pointer-events: none; z-index: 900; overflow: hidden; }
.confete-wrap i {
  position: absolute; top: -14px; width: 10px; height: 14px; opacity: .95;
  animation: cair linear forwards;
}
@keyframes cair {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(105vh) rotate(720deg); opacity: .2; }
}
.festa {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  z-index: 910; pointer-events: none;
}
.festa-card {
  background: #fff; border-radius: 20px; padding: 30px 44px; text-align: center;
  box-shadow: 0 24px 70px rgba(0,21,72,.28); border: 2px solid var(--turquesa);
  animation: pipoca .5s cubic-bezier(.2,1.6,.4,1);
  display: flex; flex-direction: column; gap: 6px; align-items: center; max-width: 90vw;
}
.festa-card b { font-size: 19px; color: var(--marinho); }
.festa-card span { font-size: 13.5px; color: var(--muted); }
.festa-ic { font-size: 46px; animation: foguete 1.4s ease-in-out infinite; }
.festa.sai .festa-card { animation: sumir .5s forwards; }
@keyframes pipoca { 0% { transform: scale(.5); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes sumir { to { transform: scale(.85) translateY(-16px); opacity: 0; } }
@keyframes foguete { 0%,100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-10px) rotate(4deg); } }

/* micro-animações do app */
.main > * { animation: entrar .28s ease both; }
@keyframes entrar { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.card { transition: box-shadow .18s, transform .18s; }
.toast { animation: slideIn .24s cubic-bezier(.2,1.4,.4,1); }

/* ============ BOTÃO FLUTUANTE DE SUPORTE ============ */
.fab-suporte {
  position: fixed; right: 22px; bottom: 22px; z-index: 350;
  display: flex; align-items: center; gap: 12px;
  height: 60px; padding: 0 26px 0 8px; border: none; border-radius: 32px;
  background: linear-gradient(135deg, #0a63f5 0%, #0442b8 55%, #06a884 130%);
  color: #fff; font-size: 16px; font-weight: 700; letter-spacing: .2px;
  box-shadow: 0 10px 30px rgba(6,84,228,.4);
  overflow: hidden; transition: transform .18s, box-shadow .18s;
  animation: fabEntra .5s cubic-bezier(.2,1.5,.4,1) both;
}
@keyframes fabEntra { from { opacity: 0; transform: translateY(20px) scale(.9); } }
/* pontinhos "digitando" dentro do balão */
.fab-suporte .pt { animation: digitando 1.4s infinite; }
.fab-suporte .pt2 { animation-delay: .18s; }
.fab-suporte .pt3 { animation-delay: .36s; }
@keyframes digitando { 0%, 60%, 100% { opacity: .35; } 30% { opacity: 1; } }
body.loading .fab-suporte, body.logged-out .fab-suporte { display: none; }
.fab-suporte:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 16px 40px rgba(6,84,228,.5); }
.fab-suporte .fab-ic {
  width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.fab-suporte .fab-ic svg { width: 26px; height: 26px; }
/* luzinha de "online" piscando */
.fab-suporte .fab-online {
  width: 11px; height: 11px; border-radius: 50%; background: #b9f6ca;
  box-shadow: 0 0 0 0 rgba(185,246,202,.9); animation: pulseOnline 1.8s infinite; flex-shrink: 0;
}
@keyframes pulseOnline {
  0% { box-shadow: 0 0 0 0 rgba(185,246,202,.85); opacity: 1; }
  70% { box-shadow: 0 0 0 12px rgba(185,246,202,0); opacity: .75; }
  100% { box-shadow: 0 0 0 0 rgba(185,246,202,0); opacity: 1; }
}
/* brilho passando por cima */
.fab-suporte::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.38), transparent);
  transform: skewX(-18deg); animation: brilhoFab 3.4s infinite;
}
@keyframes brilhoFab {
  0% { left: -60%; } 55% { left: 130%; } 100% { left: 130%; }
}
@media (max-width: 700px) {
  .fab-suporte { right: 14px; bottom: 14px; height: 54px; padding: 0 20px 0 7px; font-size: 15px; }
  .fab-suporte .fab-ic { width: 40px; height: 40px; }
}
@media print { .fab-suporte { display: none !important; } }

/* ============ SUPORTE ============ */
.suporte-grid { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.suporte-op {
  display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); font-size: 14px;
}
.suporte-op:hover { border-color: var(--green); background: #f6fbf7; }
.so-ic { font-size: 22px; }
.suporte-tec { background: #f8f9fa; border-radius: 8px; padding: 10px 12px; font-size: 11.5px; color: var(--muted); line-height: 1.6; }

/* ============ ASSINATURA / BLOQUEIO ============ */
.faixa-assin {
  border-radius: 8px; padding: 10px 16px; margin-bottom: 16px; font-size: 13.5px;
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.faixa-assin.trial { background: #e3f2fd; color: #0d47a1; border: 1px solid #bbdefb; }
.faixa-assin.aviso { background: #fff8e1; color: #7a5c00; border: 1px solid #ffecb3; }
.faixa-assin a { margin-left: auto; font-weight: 700; }
.bloqueio { display: flex; align-items: center; justify-content: center; min-height: 70vh; }
.bloqueio-card {
  background: #fff; border-radius: 16px; padding: 44px; max-width: 520px; text-align: center;
  box-shadow: 0 10px 40px rgba(36,61,75,.14);
}
.bloqueio-card h2 { font-size: 24px; color: var(--sidebar-bg); margin: 10px 0 8px; }
.bloqueio-card p { color: #555; font-size: 14px; line-height: 1.6; }

/* ============ MIGRAÇÃO ============ */
.passo-box { background: #f1f8f2; border: 1px solid #d7ecdb; border-radius: 10px; padding: 14px 18px; margin-top: 12px; font-size: 13.5px; }
.passo-box ol { margin: 8px 0 0 18px; line-height: 1.9; color: #444; }
.mg-ok { background: #e8f5e9; border: 1px solid #c8e6c9; border-radius: 10px; padding: 14px; margin-top: 14px; font-size: 14px; }
.mg-erro { background: #fdecea; border: 1px solid #f5c6c2; border-radius: 10px; padding: 14px; margin-top: 14px; font-size: 14px; color: #7f231c; }

/* ============ PDV: BUSCA DE CLIENTE ============ */
.pdv-cliente-busca { margin-top: 8px; }
.pdv-cliente-busca input {
  width: 100%; height: 36px; border: none; border-radius: 6px; padding: 0 10px; font-size: 13.5px;
}
.pdv-cli-res { background: #fff; border-radius: 6px; margin-top: 4px; overflow: hidden; max-height: 180px; overflow-y: auto; }
.pdv-cli-item {
  padding: 8px 10px; cursor: pointer; font-size: 13px; color: #333;
  display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid #f1f3f4;
}
.pdv-cli-item:hover { background: #e8f5e9; }
.pdv-cli-item span { color: var(--muted); font-size: 12px; }
.stat-card.destaque { border-left: 4px solid var(--green); }

/* ============ IDENTIDADE VOLTA SEMPRE (visual 2.0) ============ */
.sidebar { background: linear-gradient(180deg, #001548 0%, #00103a 60%, #000d2e 100%); }
.menu-link.active { background: rgba(6,84,228,.22); border-left-color: var(--turquesa); }
.menu-link:hover { background: rgba(255,255,255,.05); }
.submenu { background: rgba(0,0,0,.22); }
.submenu a.active { color: var(--turquesa); }

.card { border: 1px solid rgba(16,24,40,.04); border-radius: var(--radius); }
.btn { border-radius: 10px; transition: transform .12s, box-shadow .12s, filter .12s; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, #0a63f5, #0442b8);
  box-shadow: 0 2px 10px rgba(6,84,228,.32);
}
.btn-primary:hover { filter: brightness(1.07); box-shadow: 0 4px 16px rgba(6,84,228,.42); }
.btn-outline { border-color: var(--border); color: #46536b; }
.btn-outline:hover { border-color: var(--azul); color: var(--azul); background: var(--azul-claro); }

.stat-card { transition: transform .16s, box-shadow .16s; position: relative; }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-card.destaque { border-left: 4px solid var(--turquesa); }
.s-value.pos { color: var(--turquesa-dark); }
.avatar { background: linear-gradient(140deg, #0654e4, #08c89d); }

/* topbar mais leve e moderna */
.topbar { border-bottom: 1px solid var(--border); box-shadow: 0 1px 3px rgba(16,24,40,.03); }
.topbar-search input { border-radius: 12px; background: #f4f6fa; border-color: transparent; }
.topbar-search input:focus { background: #fff; border-color: var(--azul); box-shadow: 0 0 0 3px rgba(6,84,228,.1); }
.topbar-btn:hover { background: var(--azul-claro); color: var(--azul); }

/* logo na topbar e no login */
.brand-mark { height: 30px; width: auto; display: block; }
.login-simbolo { height: 64px; width: auto; }
.brand-name { font-size: 18px; font-weight: 700; color: var(--marinho); letter-spacing: -.4px; }
.brand-name b { color: var(--azul); }

/* tags e badges com a nova paleta */
.tag.green { background: rgba(8,200,157,.14); color: var(--turquesa-dark); }
.tag.blue { background: var(--azul-claro); color: var(--azul); }
table.grid { border-radius: var(--radius); }
table.grid th { background: #f7f9fc; color: #46536b; border-bottom: 1px solid var(--border); }
table.grid tr:hover td { background: #f7faff; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--azul); box-shadow: 0 0 0 3px rgba(6,84,228,.12);
}
.doc-busca > input:focus { border-color: var(--azul); box-shadow: 0 0 0 3px rgba(6,84,228,.12); }
.doc-resultado:hover { background: var(--azul-claro); }
.pessoa-sel { background: var(--azul-claro); border-color: #cfe0ff; }
.cnpj-box { background: var(--azul-claro); border-color: #cfe0ff; }
.caixa-bar.aberto { background: rgba(8,200,157,.1); border-color: rgba(8,200,157,.3); color: #04624c; }
.perm-item:hover { border-color: var(--azul); }
.suporte-op:hover { border-color: var(--azul); background: var(--azul-claro); }
.resumo-item:hover { border-color: var(--azul); background: var(--azul-claro); }
.resumo-total { background: linear-gradient(135deg, #001548, #0442b8); }
.passo-box { background: var(--azul-claro); border-color: #cfe0ff; }
.mg-ok { background: rgba(8,200,157,.12); border-color: rgba(8,200,157,.35); }
.fin-card.green { background: linear-gradient(140deg, #0ad3a6, #06a884); }
.fin-card.dark { background: linear-gradient(140deg, #0442b8, #001548); }
.pdv-right { background: linear-gradient(170deg, #001548, #00103a); }
.pdv-header-box { background: linear-gradient(135deg, #0654e4, #0442b8); }
.pdv-btn.finish { background: linear-gradient(135deg, #0ad3a6, #06a884); }
.pdv-search:focus { border-color: var(--azul); box-shadow: 0 0 0 4px rgba(6,84,228,.14); }
.pdv-result:hover, .pdv-result.sel { background: var(--azul-claro); }
.dp-head { border-bottom-color: var(--azul); }
.dp-tab th { background: var(--marinho); }
.dp-tipo { color: var(--azul); }
.dp-tot .dp-final { border-top-color: var(--azul); }
.dp-tot .dp-final b { color: var(--azul); }
.login-left { background: linear-gradient(150deg, #001548 0%, #00256e 55%, #045fbe 100%); }
.login-left::after { background: rgba(8,200,157,.16); }
.login-brand h1 b { color: var(--turquesa); }
.login-features li { color: #d5e2f7; }
.login-card { border-radius: 18px; box-shadow: 0 24px 70px rgba(0,21,72,.16); }
.login-card h2 { color: var(--marinho); }
.login-btn { background: linear-gradient(135deg, #0a63f5, #0442b8); }
.faixa-assin.trial { background: var(--azul-claro); color: #0b3aa8; border-color: #cfe0ff; }
.kanban-card:hover { box-shadow: var(--shadow-md); }
.painel-card, .fin-card { border-radius: 14px; }

/* ============ RESPONSIVE ============ */
.sidebar-overlay { display: none; }
@media (max-width: 980px) {
  .dash-row.cols-2, .dash-row.cols-3, .dash-row.cols-4 { grid-template-columns: 1fr; }
  .main { margin-left: 0; padding: 14px 12px 60px; }
  .sidebar { transform: translateX(-100%); }
  body.sidebar-open-mobile .sidebar { transform: none; }
  body.sidebar-open-mobile .sidebar-overlay { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 85; }
  .topbar-search { display: none; }
  .user-chip-name { display: none; }
  .form-grid { grid-template-columns: 1fr; }
}
