/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
  --sage: #879882;
  --sage-light: #a8b4a3;
  --sage-dark: #6a7b66;
  --sage-bg: rgba(135, 152, 130, 0.09);
  --sage-bg-hover: rgba(135, 152, 130, 0.16);

  --gold: #C5A059;
  --gold-light: #d4b578;
  --gold-dark: #a8843c;
  --gold-bg: rgba(197, 160, 89, 0.1);

  --cream: #F2EDE3;
  --cream-dark: #e8e0d3;
  --cream-darker: #ddd4c2;

  --text: #4A4A4A;
  --text-light: #787878;
  --text-lighter: #aaaaaa;

  --white: #ffffff;
  --border: rgba(74, 74, 74, 0.13);
  --border-strong: rgba(74, 74, 74, 0.22);

  --danger: #c0392b;
  --danger-bg: rgba(192, 57, 43, 0.08);
  --success: #27ae60;
  --success-bg: rgba(39, 174, 96, 0.08);
  --info-bg: rgba(135, 152, 130, 0.12);

  --sidebar-w: 248px;
  --topbar-h: 62px;
  --gap: 1.4rem;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 14px rgba(0,0,0,0.08), 0 2px 5px rgba(0,0,0,0.05);
  --shadow-lg: 0 12px 36px rgba(0,0,0,0.13), 0 4px 12px rgba(0,0,0,0.07);

  --tr: 0.2s ease;
  --tr-slow: 0.35s ease;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--text);
  background: var(--cream);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}
a { text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
h1,h2,h3,h4 { font-weight: 600; line-height: 1.3; color: var(--text); }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { color: var(--text-light); line-height: 1.65; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--sage);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: transform var(--tr-slow);
  overflow: hidden;
}
.sidebar::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 80% 10%, rgba(255,255,255,0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 10% 90%, rgba(0,0,0,0.12) 0%, transparent 55%);
  pointer-events: none;
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 1.4rem 1.15rem;
  border-bottom: 1px solid rgba(255,255,255,0.16);
  position: relative; z-index: 1;
}
.logo-icon {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-text { display: flex; flex-direction: column; min-width: 0; }
.logo-name { color: white; font-weight: 700; font-size: 0.97rem; letter-spacing: -0.3px; }
.logo-sub { color: rgba(255,255,255,0.6); font-size: 0.7rem; }

.sidebar-nav {
  flex: 1;
  padding: 0.9rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  position: relative; z-index: 1;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.62rem 0.85rem;
  color: rgba(255,255,255,0.82);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--tr);
  position: relative;
}
.nav-item:hover { color: white; background: rgba(255,255,255,0.13); }
.nav-item.active {
  color: white;
  background: rgba(197,160,89,0.28);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(197,160,89,0.35);
}
.nav-item svg { flex-shrink: 0; opacity: 0.85; transition: opacity var(--tr); }
.nav-item:hover svg, .nav-item.active svg { opacity: 1; }
.nav-divider { border: none; border-top: 1px solid rgba(255,255,255,0.13); margin: 0.45rem 0; }
.sidebar-footer {
  padding: 0.9rem 1.15rem;
  border-top: 1px solid rgba(255,255,255,0.13);
  color: rgba(255,255,255,0.38);
  font-size: 0.68rem;
  position: relative; z-index: 1;
}
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.42);
  z-index: 190;
}

/* ============================================================
   MAIN WRAPPER
   ============================================================ */
.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 var(--gap);
  height: var(--topbar-h);
  background: rgba(242,237,227,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border: none;
  background: var(--sage-bg);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: background var(--tr);
  flex-shrink: 0;
}
.menu-btn:hover { background: var(--sage-bg-hover); }
.page-title { flex: 1; font-size: 1.05rem; font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 0.5rem; }

.main {
  padding: var(--gap);
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  animation: fadeIn 0.22s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0.52rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all var(--tr);
  white-space: nowrap;
  line-height: 1.4;
}
.btn-primary {
  background: var(--gold);
  color: white;
}
.btn-primary:hover { background: var(--gold-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-secondary {
  background: var(--sage-bg);
  color: var(--sage-dark);
  border: 1px solid rgba(135,152,130,0.25);
}
.btn-secondary:hover { background: var(--sage-bg-hover); }
.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(192,57,43,0.18);
}
.btn-danger:hover { background: var(--danger); color: white; }
.btn-ghost {
  background: transparent;
  color: var(--text-light);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--cream-dark); }
.btn-icon {
  padding: 0.42rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-light);
  transition: all var(--tr);
}
.btn-icon:hover { background: var(--cream-dark); color: var(--text); }
.btn-sm { padding: 0.38rem 0.8rem; font-size: 0.8rem; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.card-header h2 { font-size: 1rem; }
.card-body { padding: 1.4rem; }
.card-body-sm { padding: 1rem 1.4rem; }

/* ============================================================
   DASHBOARD STATS GRID
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
  margin-bottom: var(--gap);
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.3rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: box-shadow var(--tr), transform var(--tr);
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.stat-icon.gold { background: var(--gold-bg); }
.stat-icon.sage { background: var(--sage-bg); }
.stat-value { font-size: 1.35rem; font-weight: 700; color: var(--text); line-height: 1.2; }
.stat-label { font-size: 0.78rem; color: var(--text-lighter); font-weight: 500; margin-top: 2px; }

/* ============================================================
   TABLES
   ============================================================ */
.table-wrap { overflow-x: auto; }
table.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.table thead tr { background: var(--cream); }
.table th {
  padding: 0.7rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-light);
  border-bottom: 1px solid var(--border);
}
.table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--cream); }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover { background: var(--sage-bg); }
.price-tag {
  font-weight: 700;
  color: var(--gold-dark);
  font-size: 0.95rem;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 1.1rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-light); margin-bottom: 0.4rem; }
input[type="text"],
input[type="number"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color var(--tr), box-shadow var(--tr);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px var(--sage-bg);
}
textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 0.75rem; color: var(--text-lighter); margin-top: 4px; }
.form-check { display: flex; align-items: center; gap: 8px; }
.form-check input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--sage); cursor: pointer; }
.form-check label { margin-bottom: 0; cursor: pointer; font-size: 0.875rem; color: var(--text); font-weight: 400; }
.form-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-lighter);
  margin: 1.2rem 0 0.7rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
.span-full { grid-column: 1 / -1; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(30,30,30,0.45);
  backdrop-filter: blur(4px);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal-backdrop.active { display: flex; animation: fadeIn 0.18s ease; }
.modal-dialog {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.22s ease;
}
.modal-dialog.wide { max-width: 760px; }
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-title { font-size: 1rem; font-weight: 600; }
.modal-close {
  width: 30px; height: 30px;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-lighter);
  border-radius: 6px;
  transition: all var(--tr);
  line-height: 1;
}
.modal-close:hover { background: var(--cream-dark); color: var(--text); }
.modal-body { padding: 1.4rem; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 1rem 1.4rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* ============================================================
   COST / MATERIAL LIST ITEMS
   ============================================================ */
.list-items { display: flex; flex-direction: column; gap: 0.5rem; }
.list-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--cream);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: border-color var(--tr);
}
.list-item:hover { border-color: var(--sage-light); }
.list-item-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--sage-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.list-item-body { flex: 1; min-width: 0; }
.list-item-name { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item-sub { font-size: 0.78rem; color: var(--text-lighter); }
.list-item-value { font-weight: 700; font-size: 0.95rem; color: var(--gold-dark); white-space: nowrap; }
.list-item-actions { display: flex; gap: 0.35rem; flex-shrink: 0; }

/* ============================================================
   BADGE / PILL
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.65rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
}
.badge-sage { background: var(--sage-bg); color: var(--sage-dark); }
.badge-gold { background: var(--gold-bg); color: var(--gold-dark); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-warn   { background: rgba(230,168,23,.10); color: #b87d00; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3.5rem 2rem;
}
.empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.6; }
.empty-state h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.empty-state p { font-size: 0.875rem; color: var(--text-lighter); max-width: 340px; margin-bottom: 1.4rem; }

/* ============================================================
   PRICING BREAKDOWN
   ============================================================ */
.breakdown-box {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 1.2rem;
  border: 1px solid var(--border);
}
.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0;
  font-size: 0.875rem;
}
.breakdown-row + .breakdown-row { border-top: 1px dashed var(--border); }
.breakdown-label { color: var(--text-light); }
.breakdown-val { font-weight: 600; }
.breakdown-total {
  border-top: 2px solid var(--border-strong) !important;
  margin-top: 0.35rem;
  padding-top: 0.65rem;
  font-size: 1rem;
}
.breakdown-total .breakdown-label { color: var(--text); font-weight: 700; }
.breakdown-total .breakdown-val { color: var(--gold-dark); font-size: 1.15rem; font-weight: 700; }
.breakdown-lucro { color: var(--success) !important; }

/* ============================================================
   MATERIAL FORM ROWS (in procedure modal)
   ============================================================ */
.mat-rows { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.6rem; }
.mat-row {
  display: grid;
  grid-template-columns: 1fr 120px 36px;
  gap: 0.5rem;
  align-items: center;
}
.mat-row select, .mat-row input { margin: 0; }
.btn-remove-mat {
  width: 34px; height: 34px;
  border: none;
  background: var(--danger-bg);
  color: var(--danger);
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--tr);
}
.btn-remove-mat:hover { background: var(--danger); color: white; }

/* ============================================================
   SECTION PAGE HEADING
   ============================================================ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--gap);
  gap: 1rem;
  flex-wrap: wrap;
}
.page-header h2 { font-size: 1.25rem; }
.page-header p { font-size: 0.85rem; color: var(--text-lighter); margin-top: 2px; }

/* ============================================================
   SETTINGS SECTION
   ============================================================ */
.settings-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  margin-bottom: var(--gap);
}
.settings-card h3 {
  font-size: 0.95rem;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
.info-box {
  background: var(--info-bg);
  border: 1px solid rgba(135,152,130,0.25);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.83rem;
  color: var(--sage-dark);
  margin-top: 0.75rem;
  line-height: 1.55;
}

/* ============================================================
   TOAST
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: var(--text);
  color: white;
  font-size: 0.875rem;
  box-shadow: var(--shadow-lg);
  min-width: 240px;
  max-width: 360px;
  opacity: 0;
  transform: translateY(12px);
  transition: all var(--tr);
  pointer-events: all;
}
.toast.show { opacity: 1; transform: none; }
.toast-success { background: var(--success); }
.toast-danger  { background: var(--danger); }
.toast-info    { background: var(--sage-dark); }
.toast button  { background: none; border: none; color: rgba(255,255,255,0.75); font-size: 1.1rem; cursor: pointer; flex-shrink: 0; }

/* ============================================================
   PROCEDURE DETAIL
   ============================================================ */
.proc-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: var(--gap);
  flex-wrap: wrap;
}
.proc-detail-actions { display: flex; gap: 0.5rem; margin-left: auto; }
.proc-grid { display: grid; grid-template-columns: 1fr 340px; gap: var(--gap); }

/* ============================================================
   SCREEN-ONLY / PRINT-ONLY VISIBILITY HELPERS
   ============================================================ */
.print-only { display: none; }
.screen-only { display: block; }

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  /* — ocultar toda a interface de tela — */
  .sidebar,
  .topbar,
  .topbar-actions,
  .btn,
  .modal-backdrop,
  .toast-container,
  .screen-only { display: none !important; }

  /* — ajustes de layout — */
  .main-wrapper { margin-left: 0 !important; }
  .main { padding: 0; max-width: 100%; animation: none; }
  body { background: white; font-size: 11pt; color: #222; }

  /* — mostrar bloco de impressão — */
  .print-only { display: block !important; }

  /* ── Cabeçalho de impressão ── */
  .print-header {
    text-align: center;
    margin-bottom: 18pt;
    padding-bottom: 10pt;
    border-bottom: 2px solid #4a4a4a;
  }
  .print-clinic {
    font-size: 10pt;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4pt;
  }
  .print-title {
    font-size: 18pt;
    font-weight: 700;
    color: #222;
    margin: 0 0 4pt;
  }
  .print-date {
    font-size: 9pt;
    color: #888;
  }

  /* ── Tabela comercial de preços ── */
  .print-price-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10pt;
    margin-top: 4pt;
  }
  .print-price-table thead tr {
    background: #f2ede3;
  }
  .print-price-table th {
    padding: 7pt 9pt;
    text-align: center;
    font-weight: 700;
    font-size: 9pt;
    border: 1px solid #ccc;
    vertical-align: middle;
    line-height: 1.3;
  }
  .print-price-table th:first-child {
    text-align: left;
    width: 30%;
  }
  .print-price-table td {
    padding: 6pt 9pt;
    border: 1px solid #ddd;
    vertical-align: middle;
    text-align: center;
    line-height: 1.4;
  }
  .print-price-table td.proc-name {
    text-align: left;
    font-weight: 600;
    font-size: 10pt;
  }
  .print-price-table tbody tr:nth-child(even) {
    background: #faf8f5;
  }
  .print-price-table tbody tr:last-child td {
    border-bottom: 2px solid #aaa;
  }

  /* — células de preço — */
  .print-price-table .price-pix {
    color: #1a7a40;
    font-weight: 700;
  }
  .print-price-table .price-base {
    font-weight: 700;
    color: #333;
  }
  .print-price-table .price-parc {
    font-weight: 600;
    color: #333;
  }
  .print-price-table .parc-sub {
    display: block;
    font-size: 8pt;
    color: #777;
    font-weight: 400;
    margin-top: 1pt;
  }

  /* — subtítulo do cabeçalho de coluna — */
  .print-price-table .th-sub {
    display: block;
    font-size: 7.5pt;
    font-weight: 400;
    color: #666;
  }

  /* ── Rodapé de impressão ── */
  .print-footer {
    margin-top: 12pt;
    font-size: 8pt;
    color: #888;
    text-align: center;
    border-top: 1px solid #ddd;
    padding-top: 8pt;
  }

  /* — garantir page-break limpo — */
  .print-price-table thead { display: table-header-group; }
  .print-price-table tr    { page-break-inside: avoid; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .proc-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .sidebar-overlay.open { display: block; }
  .main-wrapper { margin-left: 0; }
  .menu-btn { display: flex; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .mat-row { grid-template-columns: 1fr 90px 34px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .main { padding: 1rem; }
}
.brand-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex-shrink: 0;
  filter: brightness(0) saturate(100%) invert(92%) sepia(12%) saturate(450%) hue-rotate(350deg) brightness(105%) contrast(95%);
}

.logo-name {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
}

.logo-sub {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.75);
}