/* ===== VARIÁVEIS E RESET ===== */
:root {
  --bg0: #0d0d0f;
  --bg1: #1c1c1e;
  --bg2: #2c2c2e;
  --bg3: #3a3a3c;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text1: #f2f2f7;
  --text2: #ebebf5cc;    /* aumentei opacidade para melhor legibilidade */
  --text3: #ebebf580;
  --accent: #0a84ff;
  --accent-dim: rgba(10, 132, 255, 0.18);
  --green: #30d158;
  --green-dim: rgba(48, 209, 88, 0.18);
  --t0: #bf5af2;
  --t0-dim: rgba(191, 90, 242, 0.18);
  --t1: #30d158;
  --t1-dim: rgba(48, 209, 88, 0.18);
  --t2: #ff9f0a;
  --t2-dim: rgba(255, 159, 10, 0.18);
  --t3: #0a84ff;
  --t3-dim: rgba(10, 132, 255, 0.18);
  --t4: #ff375f;
  --t4-dim: rgba(255, 55, 95, 0.18);
  --t5: #64d2ff;
  --t5-dim: rgba(100, 210, 255, 0.18);
  --t6: #ffd60a;
  --t6-dim: rgba(255, 214, 10, 0.18);
  --t7: #ff6961;
  --t7-dim: rgba(255, 105, 97, 0.18);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-xl: 20px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
  background: var(--bg0);
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(50, 50, 70, 0.3) 0%, transparent 30%),
    radial-gradient(circle at 80% 70%, rgba(70, 70, 90, 0.2) 0%, transparent 40%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.01) 0px, rgba(255,255,255,0.01) 2px, transparent 2px, transparent 6px);
  color: var(--text1);
  min-height: 100vh;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

/* ===== TEMA CLARO ===== */
body.light {
  --bg0: #f2f2f7;
  --bg1: #ffffff;
  --bg2: #eaeaed;
  --bg3: #d9d9de;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --text1: #1c1c1e;
  --text2: #3a3a3ce6;
  --text3: #3a3a3c99;
  --accent: #0a84ff;
  --accent-dim: rgba(10, 132, 255, 0.15);
  --green: #28a745;
  --green-dim: rgba(40, 167, 69, 0.15);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Ajustes específicos para o tema claro (sobregravação quando necessário) */
body.light .window {
  background: rgba(255, 255, 255, 0.7);
  border: 0.5px solid rgba(0,0,0,0.08);
}
body.light .card,
body.light .treat-col-card,
body.light .stat-card,
body.light .info-box,
body.light .bio-date-row {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0,0,0,0.06);
}
body.light .field input,
body.light .table-wrap {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0,0,0,0.1);
  color: #1c1c1e;
}
body.light .field input:focus {
  background: #ffffff;
  border-color: var(--accent);
}
body.light th {
  background: rgba(245, 245, 247, 0.95);
  color: #1c1c1e;
  border-bottom-color: rgba(0,0,0,0.1);
}
body.light td {
  border-bottom: 0.5px solid rgba(0,0,0,0.05);
  color: #1c1c1e;
}
body.light tr:hover td {
  background: rgba(0,0,0,0.02);
}
body.light .btn-ghost {
  background: rgba(0,0,0,0.04);
  color: #1c1c1e;
  border-color: rgba(0,0,0,0.1);
}
body.light .btn-ghost:hover {
  background: rgba(0,0,0,0.08);
}
body.light .treat-btn {
  background: rgba(0,0,0,0.04);
  color: #3a3a3c;
}
body.light .treat-btn:hover {
  background: rgba(0,0,0,0.08);
  color: #1c1c1e;
}
body.light .box-chip {
  background: rgba(255,255,255,0.9);
  border-color: rgba(0,0,0,0.1);
  color: #1c1c1e;
}
body.light .box-chip:hover {
  background: var(--accent-dim);
  color: var(--accent);
}
body.light .nav-item {
  color: #3a3a3c;
}
body.light .nav-item.active {
  background: var(--accent-dim);
  color: var(--accent);
}
body.light .nav-item:hover:not(.locked) {
  background: rgba(0,0,0,0.05);
}
body.light .sidebar {
  background: rgba(245, 245, 247, 0.7);
  border-right-color: rgba(0,0,0,0.06);
}
body.light .titlebar {
  background: rgba(255, 255, 255, 0.6);
  border-bottom-color: rgba(0,0,0,0.08);
}
body.light .tb-title {
  background: linear-gradient(135deg, #1c1c1e 0%, #3a3a3c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
body.light .tab-btn {
  color: #3a3a3c;
}
body.light .tab-btn:hover {
  background: rgba(0,0,0,0.05);
}
body.light .tab-btn.active {
  background: var(--accent-dim);
  color: var(--accent);
}
body.light .cell-fixed {
  color: #3a3a3c;
}
body.light td.cell-input input {
  color: #1c1c1e;
}
body.light td.cell-input input:focus {
  background: rgba(10,132,255,0.1);
}
body.light .error-msg {
  background: rgba(255,69,58,0.08);
  border-color: rgba(255,69,58,0.3);
  color: #d32f2f;
}
body.light .toast {
  background: rgba(255,255,255,0.9);
  border-color: var(--green);
  color: #1c1c1e;
}
body.light input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0);
  opacity: 0.7;
}
body.light .theme-toggle:hover {
  background: rgba(0,0,0,0.05);
}
body.light .badge,
body.light .t0-pill, body.light .t1-pill, body.light .t2-pill, body.light .t3-pill,
body.light .t4-pill, body.light .t5-pill, body.light .t6-pill, body.light .t7-pill {
  background: rgba(0,0,0,0.08);
  color: #1c1c1e;
}
body.light .assigned-chip {
  background: rgba(0,0,0,0.05);
  color: #1c1c1e;
}
body.light .assigned-chip .x {
  color: #6c6c70;
}
body.light .tooltip-icon {
  color: #6c6c70;
}

/* ===== LAYOUT PRINCIPAL ===== */
.window {
  max-width: 1160px;
  margin: 28px auto;
  background: rgba(28, 28, 30, 0.6);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-radius: var(--radius-xl);
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow), 0 0 0 1px rgba(0,0,0,0.2) inset;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 640px;
}

/* ===== BARRA DE TÍTULO ===== */
.titlebar {
  background: rgba(20, 20, 22, 0.5);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.06);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 200;
  flex-shrink: 0;
}
.tb-title {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #b0b0c0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0 auto;
}
.theme-toggle {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 20px;
  transition: background 0.2s;
  color: var(--text1);
  margin-left: auto;
}
.theme-toggle:hover {
  background: rgba(255,255,255,0.1);
}

.content { display: flex; flex: 1; min-height: 0; overflow: hidden; }

/* ===== SIDEBAR ===== */
.sidebar {
  width: 214px;
  min-width: 214px;
  background: rgba(18, 18, 20, 0.5);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-right: 0.5px solid rgba(255, 255, 255, 0.04);
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  flex-shrink: 0;
}
.sb-section {
  font-size: 10px;
  font-weight: 700;
  color: var(--text3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 10px 4px;
  margin-top: 6px;
}
.sb-section:first-child { margin-top: 0; }
.sb-div { height: 0.5px; background: var(--border); margin: 8px 4px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.1s;
  color: var(--text2);
  font-size: 13px;
  font-weight: 400;
  user-select: none;
  backdrop-filter: blur(5px);
}
.nav-item:hover:not(.locked) { background: rgba(255,255,255,0.08); }
.nav-item.active { background: var(--accent-dim); color: var(--accent); font-weight: 500; }
.nav-item.done { color: var(--green); }
.nav-item.locked { opacity: 0.35; cursor: not-allowed; }

.nav-icon {
  width: 22px; height: 22px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  background: var(--bg2); color: var(--text2); flex-shrink: 0;
}
.nav-item.active .nav-icon { background: var(--accent); color: #fff; }
.nav-item.done .nav-icon { background: var(--green-dim); color: var(--green); }

/* ===== ÁREA PRINCIPAL ===== */
.main { flex: 1; padding: 28px 28px 48px; overflow-y: auto; min-width: 0; }
.panel { display: none; animation: fadeIn 0.17s ease; }
.panel.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text1);
  margin-bottom: 6px;
}
.panel-sub { font-size: 13px; color: var(--text2); margin-bottom: 22px; line-height: 1.5; }

/* ===== CARDS E GRIDS ===== */
.card {
  background: rgba(44, 44, 48, 0.5);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: var(--radius-md);
  border: 0.5px solid rgba(255, 255, 255, 0.06);
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3); }
.card-title {
  font-size: 11px; font-weight: 700; color: var(--text2);
  letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 14px;
}

.fg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fg3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 500; color: var(--text2); }
.field input {
  background: rgba(44,44,46,0.6); backdrop-filter: blur(5px);
  border: 0.5px solid rgba(255,255,255,0.1); border-radius: var(--radius-sm);
  color: var(--text1); padding: 9px 12px; font-size: 14px;
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%; appearance: none;
}
.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
  background: rgba(44,44,46,0.9);
}
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1); opacity: 0.4; }

/* ===== BOTÕES ===== */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; cursor: pointer;
  border: none; transition: all 0.2s cubic-bezier(0.2, 0.9, 0.4, 1);
  letter-spacing: -0.01em;
  backdrop-filter: blur(5px);
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.1); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(10,132,255,0.3); }
.btn-primary:hover { background: #0070e0; box-shadow: 0 8px 16px rgba(10,132,255,0.4); }
.btn-ghost { background: rgba(72,72,74,0.6); color: var(--text1); border: 0.5px solid rgba(255,255,255,0.1); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); }
.btn-success { background: var(--green); color: #000; box-shadow: 0 4px 12px rgba(48,209,88,0.3); }
.btn-success:hover { background: #26b84e; }
.btn-print { background: #ff9f0a; color: #000; font-weight: 700; }
.btn-print:hover { background: #e08a00; }
.btn-add { background: var(--accent-dim); color: var(--accent); border: 0.5px solid rgba(10,132,255,0.3); }
.btn-add:hover { background: rgba(10,132,255,0.28); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-row { display: flex; gap: 10px; margin-top: 18px; align-items: center; flex-wrap: wrap; }

/* ===== MENSAGENS ===== */
.error-msg {
  display: none; background: rgba(255,69,58,0.12); backdrop-filter: blur(10px);
  border: 0.5px solid rgba(255,69,58,0.3); color: #ff6b6b;
  border-radius: var(--radius-sm); padding: 9px 12px; font-size: 13px; margin-top: 10px;
}
.error-msg.show { display: block; }

.toast {
  position: fixed; bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: rgba(30,30,32,0.8); backdrop-filter: blur(30px);
  border: 1px solid var(--green); color: var(--green);
  padding: 10px 22px; border-radius: 24px; font-size: 13px; font-weight: 600;
  opacity: 0; transition: all 0.22s; pointer-events: none; z-index: 999;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== ABAS ===== */
.tabs-container { margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.tabs { display: flex; gap: 2px; }
.tab-btn {
  background: transparent; border: none; color: var(--text2);
  font-size: 13px; font-weight: 500; padding: 8px 16px; cursor: pointer;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: all 0.15s; backdrop-filter: blur(5px);
}
.tab-btn:hover { background: rgba(255,255,255,0.05); color: var(--text1); }
.tab-btn.active { color: var(--accent); background: rgba(10,132,255,0.1); box-shadow: inset 0 -2px 0 var(--accent); }
.tab-content { display: none; animation: fadeIn 0.2s ease; }
.tab-content.active { display: block; }

/* ===== SELEÇÃO DE TRATAMENTOS ===== */
.treat-selector { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.treat-btn {
  padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 600;
  cursor: pointer; border: 1.5px solid transparent;
  background: rgba(72,72,74,0.6); backdrop-filter: blur(10px);
  color: var(--text2); transition: all 0.14s;
}
.treat-btn:hover { color: var(--text1); background: rgba(255,255,255,0.1); }
.treat-btn[data-t="0"].sel { background: var(--t0-dim); color: var(--t0); border-color: var(--t0); }
.treat-btn[data-t="1"].sel { background: var(--t1-dim); color: var(--t1); border-color: var(--t1); }
.treat-btn[data-t="2"].sel { background: var(--t2-dim); color: var(--t2); border-color: var(--t2); }
.treat-btn[data-t="3"].sel { background: var(--t3-dim); color: var(--t3); border-color: var(--t3); }
.treat-btn[data-t="4"].sel { background: var(--t4-dim); color: var(--t4); border-color: var(--t4); }
.treat-btn[data-t="5"].sel { background: var(--t5-dim); color: var(--t5); border-color: var(--t5); }
.treat-btn[data-t="6"].sel { background: var(--t6-dim); color: var(--t6); border-color: var(--t6); }
.treat-btn[data-t="7"].sel { background: var(--t7-dim); color: var(--t7); border-color: var(--t7); }

.box-pool { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.box-chip {
  padding: 5px 11px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 600;
  cursor: pointer; border: 1px solid rgba(255,255,255,0.1);
  background: rgba(44,44,46,0.6); backdrop-filter: blur(5px);
  color: var(--text2); transition: all 0.12s;
  font-family: 'SF Mono', monospace;
}
.box-chip:hover { border-color: var(--accent); color: var(--accent); background: rgba(10,132,255,0.1); }
.box-chip.taken { opacity: 0.25; cursor: not-allowed; pointer-events: none; }

.treat-columns { display: grid; gap: 10px; margin-bottom: 10px; }
.treat-col-card {
  background: rgba(44,44,46,0.5); backdrop-filter: blur(15px);
  border-radius: var(--radius-md); border: 0.5px solid rgba(255,255,255,0.08);
  padding: 14px 16px;
}
.treat-col-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.treat-count { font-size: 11px; color: var(--text3); }
.chips-container { display: flex; flex-wrap: wrap; gap: 6px; min-height: 26px; }
.assigned-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: 6px; font-size: 11px; font-weight: 600;
  cursor: pointer; transition: opacity 0.1s; font-family: 'SF Mono', monospace;
}
.assigned-chip:hover { opacity: 0.65; }
.assigned-chip .x { font-size: 10px; opacity: 0.65; }

/* ===== BADGES ===== */
.badge { display: inline-block; padding: 2px 8px; border-radius: 5px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; }
.t0-pill { background: var(--t0-dim); color: var(--t0); }
.t1-pill { background: var(--t1-dim); color: var(--t1); }
.t2-pill { background: var(--t2-dim); color: var(--t2); }
.t3-pill { background: var(--t3-dim); color: var(--t3); }
.t4-pill { background: var(--t4-dim); color: var(--t4); }
.t5-pill { background: var(--t5-dim); color: var(--t5); }
.t6-pill { background: var(--t6-dim); color: var(--t6); }
.t7-pill { background: var(--t7-dim); color: var(--t7); }

/* ===== ESTATÍSTICAS ===== */
.stats-bar { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 18px; }
.stat-card {
  background: rgba(58,58,60,0.5); backdrop-filter: blur(15px);
  border-radius: var(--radius-md); border: 0.5px solid rgba(255,255,255,0.08);
  padding: 14px 16px;
}
.stat-label { font-size: 11px; color: var(--text2); font-weight: 500; margin-bottom: 3px; }
.stat-val { font-size: 22px; font-weight: 700; color: var(--text1); letter-spacing: -0.03em; }

/* ===== TABELAS ===== */
.table-controls { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.table-wrap {
  border-radius: var(--radius-md); border: 0.5px solid rgba(255,255,255,0.08);
  overflow: auto; max-height: 56vh; background: rgba(44,44,46,0.4);
  backdrop-filter: blur(15px);
}
table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 800px; }
thead { position: sticky; top: 0; z-index: 10; }
th {
  background: rgba(46,46,48,0.9); backdrop-filter: blur(20px);
  padding: 9px 10px; text-align: left; font-size: 10px; font-weight: 700;
  color: var(--text2); letter-spacing: 0.07em; text-transform: uppercase;
  border-bottom: 0.5px solid rgba(255,255,255,0.08); white-space: nowrap;
}
td { padding: 0; border-bottom: 0.5px solid rgba(255,255,255,0.05); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.03); }
.cell-fixed {
  padding: 6px 10px; white-space: nowrap; font-size: 11px;
  color: var(--text2); font-family: 'SF Mono', monospace;
}
.cell-num { text-align: right; }
td.cell-input { padding: 2px 3px; }
td.cell-input input {
  width: 100%; min-width: 48px; background: transparent; border: none;
  border-radius: 5px; color: var(--text1); font-size: 12px;
  font-family: 'SF Mono', monospace; padding: 5px 7px; outline: none;
}
td.cell-input input:focus { background: rgba(10,132,255,0.2); color: #fff; }
tr.day-start td { border-top: 1px solid rgba(255,255,255,0.12); }
tr.bio-group-start td { border-top: 2px solid rgba(255,255,255,0.18); }

/* ===== BIOMETRIA ===== */
.bio-dates-list { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.bio-date-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: rgba(44,44,46,0.5); backdrop-filter: blur(10px);
  border-radius: var(--radius-sm); border: 0.5px solid rgba(255,255,255,0.06);
}
.bio-date-info { display: flex; align-items: center; gap: 12px; }
.bio-date-label { font-size: 13px; font-weight: 600; color: var(--text1); }
.bio-date-sub { font-size: 11px; color: var(--text3); white-space: nowrap; }
.bio-tag {
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 4px;
  letter-spacing: 0.05em; white-space: nowrap;
}
.tag-initial { background: var(--green-dim); color: var(--green); }
.tag-final { background: rgba(255,69,58,0.15); color: #ff6b6b; }
.tag-inter { background: var(--accent-dim); color: var(--accent); }
.bio-remove { background: none; border: none; color: var(--text3); cursor: pointer; font-size: 15px; padding: 3px 7px; }
.bio-remove:hover { background: rgba(255,69,58,0.15); color: #ff6b6b; }
.bio-add-row { display: flex; gap: 8px; align-items: flex-end; }
.bio-add-row .field { flex: 1; }

.info-box {
  background: rgba(44,44,46,0.5); backdrop-filter: blur(10px);
  border-radius: var(--radius-sm); border: 0.5px solid rgba(255,255,255,0.06);
  padding: 14px 16px; font-size: 13px; color: var(--text2); line-height: 1.8;
}
.info-box strong { color: var(--text1); }
.legend-row { display: flex; gap: 20px; align-items: center; margin-top: 14px; font-size: 12px; color: var(--text2); }
.leg-swatch { width: 20px; height: 14px; border-radius: 3px; border: 1px solid rgba(255,255,255,0.2); }

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 860px) {
  .window { margin: 0; border-radius: 0; min-height: 100vh; }
  .content { flex-direction: column; overflow: visible; }
  .sidebar { width: 100%; min-width: unset; border-right: none; border-bottom: 0.5px solid rgba(255,255,255,0.06); padding: 10px; flex-direction: row; flex-wrap: wrap; overflow-x: auto; }
  .sb-section, .sb-div { display: none; }
  .nav-item { padding: 5px 10px; font-size: 12px; }
  .main { padding: 18px 16px 36px; }
  .fg2, .fg3 { grid-template-columns: 1fr 1fr; }
  .stats-bar { grid-template-columns: 1fr 1fr; }
  .treat-columns { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .fg2, .fg3 { grid-template-columns: 1fr; }
  .treat-columns { grid-template-columns: 1fr; }
}