/* =========================================================
   B-System Web — Tema Claro Premium (estilo SaaS moderno)
   ========================================================= */

:root {
  --bg:          #f1f5f9;
  --bg-2:        #ffffff;
  --bg-3:        #f8fafc;
  --sidebar-w:   240px;
  --sidebar-collapsed: 64px;

  --accent:      #4f46e5;
  --accent-light:#ede9fe;
  --accent-hover:#4338ca;
  --accent-glow: rgba(79,70,229,0.15);
  --green:       #16a34a;
  --green-light: #dcfce7;
  --red:         #dc2626;
  --red-light:   #fee2e2;
  --orange:      #ea580c;
  --orange-light:#ffedd5;
  --purple:      #7c3aed;
  --purple-light:#ede9fe;

  --text-1:  #0f172a;
  --text-2:  #475569;
  --text-3:  #94a3b8;

  --border:  #e2e8f0;
  --border-2:#cbd5e1;
  --glass:   rgba(0,0,0,0.02);
  --glass-2: rgba(0,0,0,0.04);

  --radius:    14px;
  --radius-sm: 9px;
  --shadow:    0 1px 3px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.10);

  --font: 'Inter', sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --transition: 0.18s ease;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-1);
  display: flex;
  height: 100vh;
  overflow: hidden;
}
a { text-decoration: none; color: inherit; }
button { font-family: var(--font); cursor: pointer; border: none; outline: none; }
input, select, textarea { font-family: var(--font); }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ========================
   SIDEBAR
======================== */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: width var(--transition), min-width var(--transition);
  overflow: hidden;
  z-index: 100;
  box-shadow: 1px 0 0 var(--border);
}
.sidebar.collapsed {
  width: var(--sidebar-collapsed);
  min-width: var(--sidebar-collapsed);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 18px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.brand-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px; color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(79,70,229,0.3);
}
.brand-name { font-size: 15px; font-weight: 700; color: var(--text-1); }
.brand-sub  { font-size: 11px; color: var(--text-3); }

.sidebar-nav {
  flex: 1;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  overflow-x: hidden;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
  font-size: 14px;
  font-weight: 500;
  position: relative;
}
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.nav-item:hover { background: var(--bg-3); color: var(--text-1); }
.nav-item.active {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 600;
}
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .brand-text { display: none; }

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  white-space: nowrap;
}
.server-status {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-3);
}
.status-dot {
  width: 7px; height: 7px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
}
.sidebar.collapsed .sidebar-footer span { display: none; }

/* ========================
   MAIN CONTENT
======================== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

.topbar {
  height: 56px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: var(--bg-2);
  flex-shrink: 0;
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.topbar-btn {
  background: none; color: var(--text-3);
  padding: 6px; border-radius: 8px;
  display: flex;
  transition: color var(--transition), background var(--transition);
}
.topbar-btn:hover { background: var(--bg-3); color: var(--text-1); }
.topbar-btn svg { width: 19px; height: 19px; }
.breadcrumb { font-size: 15px; font-weight: 600; color: var(--text-1); }
.current-time { font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }

.page-container {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
}

/* ========================
   PAGE HEADER
======================== */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-title { font-size: 22px; font-weight: 700; color: var(--text-1); letter-spacing: -0.3px; }
.page-subtitle { font-size: 13px; color: var(--text-2); margin-top: 3px; }

/* ========================
   CARDS
======================== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  align-items: center;
  gap: 16px;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.card-icon {
  width: 60px; height: 60px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.card-icon svg { width: 30px; height: 30px; }
.card-icon.blue   { background: var(--accent-light); color: var(--accent); }
.card-icon.green  { background: var(--green-light);  color: var(--green); }
.card-icon.red    { background: var(--red-light);    color: var(--red); }
.card-icon.orange { background: var(--orange-light); color: var(--orange); }
.card-icon.purple { background: var(--purple-light); color: var(--purple); }
.card-body { flex: 1; min-width: 0; }

.card-value { font-size: 20px; font-weight: 700; color: var(--text-1); line-height: 1; margin-bottom: 4px; }
.card-label { font-size: 12px; color: var(--text-2); font-weight: 500; }
.card-accent { font-size: 12px; margin-top: 5px; color: var(--green); font-weight: 500; }
.card-accent.neg { color: var(--red); }

/* Chart card */
.chart-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}
.chart-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.chart-card-title { font-size: 14px; font-weight: 600; color: var(--text-1); }
.chart-container { position: relative; height: 220px; }

/* ========================
   TABLE
======================== */
.table-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}
.table-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  gap: 12px; flex-wrap: wrap;
  background: var(--bg-2);
}
.table-card-title { font-size: 14px; font-weight: 600; color: var(--text-1); }
.table-wrapper { overflow-x: auto; max-height: 560px; overflow-y: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: auto; }
thead th {
  background: var(--bg-3);
  color: var(--text-2);
  font-weight: 600;
  text-align: left;
  padding: 10px 14px;
  white-space: nowrap;
  position: sticky; top: 0; z-index: 2;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
tbody tr { border-bottom: 1px solid var(--border); transition: background var(--transition); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #f8faff; }
tbody tr.subtotal-row { background: var(--group-bg, #eff6ff); font-weight: 600; color: var(--group-text, var(--accent)); }
tbody tr.multi-item-row { background: var(--group-bg, #eff6ff); }
tbody tr.subtotal-row td { border-bottom: 1px solid var(--group-border, #bfdbfe); }
tbody tr.subtotal-row:hover, tbody tr.multi-item-row:hover { background: var(--group-hover, #e0e7ff); }
td { padding: 9px 14px; color: var(--text-1); white-space: normal; word-break: break-word; }
td.nowrap { white-space: nowrap; }
td.mono { font-family: var(--mono); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
td.green { color: var(--green); font-weight: 600; }
td.red   { color: var(--red);   font-weight: 600; }
td.dim   { color: var(--text-3); }

.totals-row { background: #f0fdf4 !important; }
.totals-row td { font-weight: 700; color: var(--text-1); border-top: 2px solid #bbf7d0 !important; }
.totals-row td.green { color: var(--green); }
.totals-row td.red   { color: var(--red); }

/* ========================
   FORMS
======================== */
.form-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}
.form-card-title {
  font-size: 14px; font-weight: 600; color: var(--text-1);
  margin-bottom: 18px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 7px;
}
.form-card-title svg { width: 16px; height: 16px; color: var(--accent); }

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }
.form-label {
  font-size: 12px; font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.form-control {
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  padding: 8px 11px;
  font-size: 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-control::placeholder { color: var(--text-3); }
select.form-control { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; appearance: none; padding-right: 28px; }

/* Autocomplete */
.autocomplete-wrapper { position: relative; }
.autocomplete-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--bg-2);
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius-sm);
  max-height: 200px; overflow-y: auto;
  z-index: 200;
  box-shadow: var(--shadow-lg);
  display: none;
}
.autocomplete-list.open { display: block; }
.autocomplete-item {
  padding: 9px 12px; font-size: 13px;
  cursor: pointer; transition: background var(--transition);
  color: var(--text-1);
}
.autocomplete-item:hover, .autocomplete-item.selected {
  background: var(--accent-light); color: var(--accent);
}

/* ========================
   BUTTONS
======================== */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
  transition: all var(--transition);
  cursor: pointer; white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 2px 8px rgba(79,70,229,0.3); }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { opacity: 0.9; }
.btn-danger  { background: var(--red); color: #fff; }
.btn-danger:hover { opacity: 0.9; }
.btn-ghost {
  background: var(--bg-3);
  color: var(--text-2);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--border); color: var(--text-1); }
.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ========================
   BADGES
======================== */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.badge-blue   { background: var(--accent-light); color: var(--accent); }
.badge-green  { background: var(--green-light);  color: var(--green); }
.badge-red    { background: var(--red-light);    color: var(--red); }
.badge-orange { background: var(--orange-light); color: var(--orange); }
.badge-purple { background: var(--purple-light); color: var(--purple); }

/* ========================
   FILTERS BAR
======================== */
.filters-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-group { display: flex; align-items: center; gap: 6px; }
.filter-label { font-size: 12px; color: var(--text-2); font-weight: 600; white-space: nowrap; }
.filter-control {
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  padding: 6px 10px; font-size: 13px; min-width: 100px;
}
.filter-control:focus { outline: none; border-color: var(--accent); }

/* ========================
   PRODUTO LIST (na venda)
======================== */
.produto-list { display: flex; flex-direction: column; gap: 7px; }
.produto-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  animation: slideIn 0.18s ease;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}
.produto-item-nome { flex: 1; font-weight: 600; font-size: 13px; color: var(--text-1); }
.produto-item-info { font-size: 12px; color: var(--text-2); }
.produto-item-remove {
  background: none; color: var(--text-3);
  padding: 3px; border-radius: 5px;
  display: flex; transition: all var(--transition);
}
.produto-item-remove:hover { background: var(--red-light); color: var(--red); }
.produto-item-remove svg { width: 14px; height: 14px; }

/* ========================
   RESUMO VENDA
======================== */
.resumo-box {
  background: var(--bg-3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.resumo-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; font-size: 13px;
}
.resumo-row:not(:last-child) { border-bottom: 1px solid var(--border); }
.resumo-row.total { font-size: 15px; font-weight: 700; padding-top: 10px; }
.resumo-row .label { color: var(--text-2); }
.resumo-row .value { font-family: var(--mono); font-size: 12px; }
.resumo-row.green .value { color: var(--green); font-weight: 700; font-size: 14px; }
.resumo-row.red   .value { color: var(--red);   font-weight: 700; }

/* ========================
   LOADING / EMPTY
======================== */
.loading-state, .empty-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 60px 20px;
  color: var(--text-3); text-align: center; gap: 10px;
}
.loading-state svg, .empty-state svg { width: 36px; height: 36px; opacity: 0.35; }
.spinner {
  width: 28px; height: 28px;
  border: 2.5px solid var(--border-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state-msg { font-size: 14px; color: var(--text-2); }

/* ========================
   TOAST
======================== */
.toast-container {
  position: fixed; bottom: 22px; right: 22px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 9999;
}
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  box-shadow: var(--shadow-lg);
  min-width: 270px; max-width: 360px;
  animation: toastIn 0.22s ease;
}
@keyframes toastIn { from { opacity:0; transform:translateX(18px); } to { opacity:1; transform:translateX(0); } }
.toast.removing { animation: toastOut 0.18s ease forwards; }
@keyframes toastOut { to { opacity:0; transform:translateX(18px); } }
.toast-icon { flex-shrink:0; margin-top:1px; }
.toast-icon svg { width:17px; height:17px; }
.toast.success .toast-icon { color: var(--green); }
.toast.error   .toast-icon { color: var(--red); }
.toast.info    .toast-icon { color: var(--accent); }
.toast.warning .toast-icon { color: var(--orange); }
.toast-body { flex:1; }
.toast-title { font-size:13px; font-weight:600; color:var(--text-1); }
.toast-msg   { font-size:12px; color:var(--text-2); margin-top:2px; }
.toast-close { background:none; color:var(--text-3); padding:2px; border-radius:4px; display:flex; transition:color var(--transition); }
.toast-close:hover { color:var(--text-1); }
.toast-close svg { width:13px; height:13px; }

/* ========================
   MODAL
======================== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.35);
  backdrop-filter: blur(3px);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.18s ease;
}
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
.modal {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 94%; max-width: 520px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.22s ease;
}
@keyframes slideUp { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:translateY(0); } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 15px; font-weight: 700; color: var(--text-1); }
.modal-close { background:none; color:var(--text-3); padding:4px; border-radius:6px; display:flex; transition:color var(--transition); }
.modal-close:hover { color:var(--text-1); }
.modal-close svg { width:17px; height:17px; }
.modal-body   { padding: 20px; }
.modal-footer { display:flex; justify-content:flex-end; gap:8px; padding:14px 20px; border-top:1px solid var(--border); }

/* ========================
   UTILITIES
======================== */
.text-right  { text-align: right; }
.text-center { text-align: center; }
.flex-gap    { display: flex; gap: 8px; align-items: center; }
.separator   { height: 1px; background: var(--border); margin: 16px 0; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.hidden { display: none !important; }
.w-full { width: 100%; }

/* ========================
   DATEPICKER
======================== */
.dp-wrapper { position: relative; }
.dp-input-row {
  display: flex; align-items: center; gap: 0;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--bg-2);
}
.dp-input-row:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.dp-input-row .form-control {
  border: none !important;
  box-shadow: none !important;
  border-radius: 0;
  flex: 1;
}
.dp-btn {
  background: none;
  border: none;
  border-left: 1.5px solid var(--border);
  padding: 0 10px;
  height: 38px;
  color: var(--text-3);
  cursor: pointer;
  display: flex; align-items: center;
  transition: color var(--transition), background var(--transition);
  flex-shrink: 0;
}
.dp-btn:hover { color: var(--accent); background: var(--accent-light); }
.dp-btn svg { width: 15px; height: 15px; }

.dp-popup {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 300;
  background: var(--bg-2);
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 14px;
  width: 270px;
  animation: slideUp 0.16s ease;
  user-select: none;
}
.dp-popup.hidden { display: none; }

.dp-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.dp-nav {
  background: none; border: none;
  color: var(--text-3); padding: 4px 8px;
  border-radius: 6px; cursor: pointer;
  display: flex; align-items: center;
  transition: color var(--transition), background var(--transition);
}
.dp-nav:hover { color: var(--accent); background: var(--accent-light); }
.dp-nav svg { width: 15px; height: 15px; }
.dp-month-label {
  font-size: 14px; font-weight: 700; color: var(--text-1);
  cursor: pointer; padding: 2px 8px; border-radius: 6px;
  transition: background var(--transition);
}
.dp-month-label:hover { background: var(--bg-3); }

.dp-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}
.dp-weekday {
  text-align: center; font-size: 11px; font-weight: 700;
  color: var(--text-3); padding: 4px 0;
  text-transform: uppercase; letter-spacing: 0.05em;
}

.dp-days {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.dp-day {
  text-align: center; padding: 6px 0;
  font-size: 13px; border-radius: 7px;
  cursor: pointer; color: var(--text-1);
  transition: background var(--transition), color var(--transition);
  line-height: 1;
}
.dp-day:hover:not(.dp-empty):not(.dp-selected) {
  background: var(--accent-light); color: var(--accent);
}
.dp-day.dp-empty { cursor: default; }
.dp-day.dp-today {
  font-weight: 700; color: var(--accent);
  background: var(--accent-light);
}
.dp-day.dp-selected {
  background: var(--accent) !important;
  color: #fff !important;
  font-weight: 700;
}
.dp-day.dp-other-month { color: var(--text-3); }

.dp-footer {
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.dp-today-btn {
  font-size: 12px; color: var(--accent); font-weight: 600;
  background: none; border: none; cursor: pointer; padding: 0;
}
.dp-today-btn:hover { text-decoration: underline; }
.dp-clear-btn {
  font-size: 12px; color: var(--text-3);
  background: none; border: none; cursor: pointer; padding: 0;
}
.dp-clear-btn:hover { color: var(--red); }

/* ========================
   TABS (Custos)
======================== */
.tab-btn {
  background: none; border: none;
  padding: 9px 18px;
  font-size: 13px; font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color var(--transition), border-color var(--transition);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-family: var(--font);
}
.tab-btn:hover { color: var(--text-1); background: var(--bg-3); }
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: var(--bg-2);
}

/* ========================
   DEVOLUÇÃO — Radio Cards
======================== */
.dev-radio-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg-3);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  transition: border-color var(--transition), background var(--transition), color var(--transition);
  user-select: none;
}
.dev-radio-label:hover {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
}
.dev-radio-label.checked {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 600;
}
.dev-radio-label input[type="radio"] {
  accent-color: var(--accent);
  width: 15px; height: 15px;
  cursor: pointer;
  flex-shrink: 0;
}

/* Toggle inline (Estornado / Grátis) */
.dev-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  transition: color var(--transition);
  user-select: none;
}
.dev-toggle-label:hover { color: var(--text-2); }
.dev-toggle-label input[type="checkbox"] {
  accent-color: var(--accent);
  width: 13px; height: 13px;
  cursor: pointer;
  margin: 0;
}

/* ========================
   DEVOLUÇÃO — Destino Cards
======================== */
.dev-destino-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg-3);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
  user-select: none;
}
.dev-destino-label input[type="radio"] {
  display: none; /* ícone visual faz o papel */
}
.dev-destino-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.dev-destino-icon {
  font-size: 22px;
  line-height: 1;
  margin-bottom: 4px;
  display: block;
}
.dev-destino-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  transition: color var(--transition);
}
.dev-destino-desc {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 400;
  transition: color var(--transition);
}
.dev-destino-label:hover {
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.dev-destino-label:hover .dev-destino-text { color: var(--accent); }
.dev-destino-label:hover .dev-destino-desc { color: var(--accent); opacity: 0.75; }

/* Checked: usa cor diferente por posição (novo=verde, usado=laranja, não=cinza) */
#dev-dest-label-ESTOQUE_NOVO.checked {
  border-color: var(--green);
  background: var(--green-light);
  box-shadow: 0 0 0 3px rgba(22,163,74,0.12);
}
#dev-dest-label-ESTOQUE_NOVO.checked .dev-destino-text { color: var(--green); }
#dev-dest-label-ESTOQUE_NOVO.checked .dev-destino-desc { color: var(--green); opacity: 0.7; }

#dev-dest-label-ESTOQUE_USADO.checked {
  border-color: var(--orange);
  background: var(--orange-light);
  box-shadow: 0 0 0 3px rgba(234,88,12,0.12);
}
#dev-dest-label-ESTOQUE_USADO.checked .dev-destino-text { color: var(--orange); }
#dev-dest-label-ESTOQUE_USADO.checked .dev-destino-desc { color: var(--orange); opacity: 0.7; }

#dev-dest-label-NAO_ADICIONAR.checked {
  border-color: var(--text-3);
  background: var(--bg);
  box-shadow: 0 0 0 3px rgba(148,163,184,0.15);
}
#dev-dest-label-NAO_ADICIONAR.checked .dev-destino-text { color: var(--text-2); }
#dev-dest-label-NAO_ADICIONAR.checked .dev-destino-desc { color: var(--text-3); }

/* ========================
   CONFIGURAÇÕES
======================== */
.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}
.config-grid .card {
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
}
.config-grid .card-full {
  grid-column: 1 / -1;
}
.config-grid .card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-3);
}
.config-grid .card-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.config-grid .card-icon svg { width: 20px; height: 20px; }
.config-grid .card-title   { font-size: 14px; font-weight: 700; color: var(--text-1); }
.config-grid .card-subtitle { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.config-grid .card-body { padding: 20px; }

/* Security status grid */
.security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.security-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg-3);
}
.security-item.ok {
  border-color: rgba(22,163,74,.25);
  background: rgba(22,163,74,.05);
}
.security-item.ok svg { color: var(--green); flex-shrink: 0; margin-top: 1px; }
.security-item.warning {
  border-color: rgba(234,88,12,.25);
  background: rgba(234,88,12,.05);
}
.security-item.warning svg { color: var(--orange); flex-shrink: 0; margin-top: 1px; }
.security-item svg { width: 17px; height: 17px; }
.security-label { font-size: 13px; font-weight: 600; color: var(--text-1); }
.security-desc  { font-size: 11px; color: var(--text-2); margin-top: 2px; }

/* Backup list */
.backup-list-header {
  font-size: 11px; font-weight: 700;
  color: var(--text-3); text-transform: uppercase;
  letter-spacing: .06em; margin-bottom: 10px;
}
.backup-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-3);
  margin-bottom: 6px;
}
.backup-name { font-size: 13px; font-weight: 600; color: var(--text-1); font-family: var(--mono); }
.backup-meta { font-size: 11px; color: var(--text-2); margin-top: 2px; }
