/* ============================================================
   SBPPL APQR System — Production Stylesheet v2.0
   Fully Responsive | Mobile-First | Professional
   ============================================================ */

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

:root {
  --navy:        #1a3558;
  --navy-light:  #24487a;
  --teal:        #0e7490;
  --teal-light:  #0891b2;
  --green:       #047857;
  --red:         #991b1b;
  --amber:       #b45309;
  --light:       #f0f4f8;
  --white:       #ffffff;
  --border:      #e2e8f0;
  --border-dark: #cbd5e1;
  --text:        #1e293b;
  --text-sm:     #334155;
  --muted:       #64748b;
  --muted-light: #94a3b8;
  --navbg:       #0f1f36;
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.08);
  --shadow:      0 2px 8px rgba(0,0,0,0.10);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.14);
  --sidebar-w:   240px;
  --topbar-h:    60px;
  --radius:      10px;
  --radius-sm:   6px;
  --transition:  0.18s ease;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ── */
.app-layout { display: flex; min-height: 100vh; }
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.5); z-index: 99;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; background: var(--navbg);
  display: flex; flex-direction: column; position: fixed;
  top: 0; left: 0; height: 100vh; overflow-y: auto; z-index: 100;
  transition: transform var(--transition), box-shadow var(--transition);
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.sidebar-brand {
  padding: 22px 18px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: linear-gradient(180deg, #0a1a2e 0%, var(--navbg) 100%);
}
.brand-logo { font-size: 20px; font-weight: 800; letter-spacing: 0.1em; color: #38bdf8; text-transform: uppercase; margin-bottom: 4px; }
.brand-name { font-size: 11px; color: rgba(255,255,255,0.45); line-height: 1.5; }
.sidebar-nav { padding: 12px 10px; flex: 1; }
.nav-section-label {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.22); padding: 14px 10px 5px; margin-top: 4px;
}
.nav-link {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px; border-radius: var(--radius-sm); margin-bottom: 2px;
  color: rgba(255,255,255,0.52); text-decoration: none; font-size: 13px; font-weight: 400;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.nav-link .nav-icon { font-size: 15px; flex-shrink: 0; width: 18px; text-align: center; }
.nav-link .nav-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nav-link:hover { background: rgba(14,116,144,0.18); color: rgba(255,255,255,0.9); text-decoration: none; }
.nav-link.active { background: linear-gradient(90deg,rgba(14,116,144,0.45),rgba(14,116,144,0.2)); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 #38bdf8; }
.nav-badge { background: #ef4444; color: #fff; font-size: 9px; font-weight: 700; padding: 1px 6px; border-radius: 20px; min-width: 18px; text-align: center; flex-shrink: 0; }
.sidebar-footer { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,0.07); background: rgba(0,0,0,0.15); }
.user-card { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.user-avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--teal), var(--navy-light)); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0; }
.user-name { font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,0.8); }
.user-role { font-size: 10.5px; color: rgba(255,255,255,0.35); }
.logout-link { display: flex; align-items: center; gap: 6px; font-size: 12px; color: rgba(255,255,255,0.35); text-decoration: none; padding: 6px 0; transition: color var(--transition); }
.logout-link:hover { color: #f87171; text-decoration: none; }

/* ── Main Content ── */
.main-content { margin-left: var(--sidebar-w); flex: 1; min-height: 100vh; display: flex; flex-direction: column; min-width: 0; }

/* ── Top Bar ── */
.top-bar { height: var(--topbar-h); background: var(--white); border-bottom: 1px solid var(--border); padding: 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; position: sticky; top: 0; z-index: 50; box-shadow: var(--shadow-sm); }
.top-bar-left { display: flex; align-items: center; gap: 14px; }
.page-title { font-size: 17px; font-weight: 700; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 6px; border-radius: 6px; flex-direction: column; gap: 5px; transition: background var(--transition); }
.hamburger:hover { background: var(--light); }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--navy); border-radius: 2px; transition: all var(--transition); }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.top-bar-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.top-date { font-size: 12px; color: var(--muted); white-space: nowrap; }
.content-body { padding: 24px 28px; flex: 1; }

/* ── Cards ── */
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.card-title { font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 16px; }
.card-top-teal   { border-top: 3px solid var(--teal); }
.card-top-green  { border-top: 3px solid var(--green); }
.card-top-amber  { border-top: 3px solid var(--amber); }
.card-top-red    { border-top: 3px solid var(--red); }
.card-top-navy   { border-top: 3px solid var(--navy); }
.card-alert-red   { background: #fff5f5; border-left: 4px solid var(--red); }
.card-alert-amber { background: #fffbeb; border-left: 4px solid var(--amber); }
.card-alert-green { background: #f0fdf4; border-left: 4px solid var(--green); }

/* ── Stat Cards ── */
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-sm); transition: box-shadow var(--transition), transform var(--transition); }
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.stat-label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 10px; }
.stat-value { font-size: 30px; font-weight: 700; line-height: 1; margin-bottom: 4px; }
.stat-sub { font-size: 11.5px; color: var(--muted); }

/* ── Tables ── */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; min-width: 500px; }
th { background: #f1f5f9; padding: 10px 13px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 2px solid var(--border); text-align: left; white-space: nowrap; }
td { padding: 11px 13px; font-size: 13px; color: var(--text); border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8fafc; }
td.mono { font-family: 'Courier New', monospace; font-size: 12px; }
td.pass { color: var(--green); font-weight: 600; }
td.fail { color: var(--red);   font-weight: 600; }

/* ── Badges ── */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge-green  { background: #dcfce7; color: #166534; }
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-amber  { background: #fef3c7; color: #92400e; }
.badge-blue   { background: #dbeafe; color: #1e40af; }
.badge-teal   { background: #cffafe; color: #155e75; }
.badge-gray   { background: #f1f5f9; color: #475569; }

/* ── Forms ── */
.form-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-group  { margin-bottom: 16px; }
.form-group.full { grid-column: 1 / -1; }
label { display: block; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
input[type=text], input[type=date], input[type=number], input[type=email],
input[type=password], select, textarea { width: 100%; padding: 9px 13px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 13.5px; font-family: inherit; color: var(--text); background: var(--white); transition: border var(--transition), box-shadow var(--transition); appearance: none; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14,116,144,0.14); }
textarea { resize: vertical; min-height: 88px; line-height: 1.6; }
select { cursor: pointer; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 20px; border-radius: 7px; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; border: none; transition: all var(--transition); white-space: nowrap; font-family: inherit; line-height: 1; }
.btn:hover { text-decoration: none; }
.btn-primary  { background: var(--teal);  color: #fff; box-shadow: 0 2px 8px rgba(14,116,144,0.25); }
.btn-primary:hover  { background: #0c637d; }
.btn-success  { background: var(--green); color: #fff; }
.btn-success:hover  { background: #065f46; }
.btn-danger   { background: var(--red);   color: #fff; }
.btn-danger:hover   { background: #7f1d1d; }
.btn-outline  { background: var(--white); color: var(--teal); border: 1.5px solid var(--teal); }
.btn-outline:hover  { background: #f0fdff; }
.btn-ghost    { background: rgba(0,0,0,0.05); color: var(--text-sm); border: 1px solid var(--border); }
.btn-ghost:hover { background: rgba(0,0,0,0.08); }
.btn-sm  { padding: 6px 14px; font-size: 12px; border-radius: 5px; }
.btn-xs  { padding: 4px 10px; font-size: 11px; border-radius: 4px; }
.btn-lg  { padding: 12px 28px; font-size: 14px; }
.btn-link { background: none; border: none; color: var(--teal); cursor: pointer; font-size: 13px; text-decoration: underline; padding: 0; font-family: inherit; }
.btn-group { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; align-items: center; }

/* ── Login Page ── */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0a1a2e 0%, #1a3558 50%, #0e7490 100%); padding: 20px; }
.login-card { background: var(--white); border-radius: 16px; padding: 44px 40px; width: 100%; max-width: 420px; box-shadow: 0 24px 80px rgba(0,0,0,0.35); }
.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo .brand { font-size: 28px; font-weight: 800; color: var(--navy); letter-spacing: 0.06em; margin-bottom: 8px; }
.login-logo .sub   { font-size: 13px; color: var(--muted); }

/* ── Product Cards ── */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.product-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); transition: box-shadow var(--transition), transform var(--transition); border-left: 4px solid var(--teal); }
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.product-card-name  { font-size: 14.5px; font-weight: 700; color: var(--navy); margin-bottom: 5px; }
.product-card-meta  { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.product-card-stats { display: flex; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.product-card-stat  { font-size: 12px; color: var(--muted); }
.product-card-stat strong { font-size: 17px; font-weight: 700; color: var(--teal); display: block; line-height: 1.2; }

/* ── Sub-Nav ── */
.sub-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow-sm); }
.sub-nav-link { padding: 6px 13px; border-radius: 6px; font-size: 12.5px; font-weight: 500; border: 1px solid transparent; color: var(--muted); text-decoration: none; background: transparent; transition: all var(--transition); white-space: nowrap; }
.sub-nav-link:hover { border-color: var(--teal); color: var(--teal); background: #f0fdff; text-decoration: none; }
.sub-nav-link.active { background: var(--teal); color: #fff; border-color: var(--teal); }

/* ── Charts ── */
.chart-box  { position: relative; height: 220px; }
.chart-wrap { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.chart-title { font-size: 13px; font-weight: 700; color: var(--navy); margin-bottom: 14px; }

/* ── Dashboard Grid ── */
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.dashboard-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.col-span-2 { grid-column: span 2; }

/* ── Quick Actions ── */
.quick-actions { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.quick-action { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 12px; border: 1.5px solid var(--border); border-radius: var(--radius); background: var(--white); text-decoration: none; font-size: 12px; font-weight: 600; color: var(--text-sm); transition: all var(--transition); cursor: pointer; text-align: center; }
.quick-action:hover { border-color: var(--teal); color: var(--teal); background: #f0fdff; box-shadow: var(--shadow); text-decoration: none; }
.quick-action .qa-icon { font-size: 22px; }

/* ── Progress Bar ── */
.progress-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin-top: 8px; }
.progress-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--teal), var(--green)); }

/* ── Activity List ── */
.activity-list { list-style: none; }
.activity-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.activity-item:last-child { border-bottom: none; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); margin-top: 5px; flex-shrink: 0; }
.activity-text { font-size: 13px; color: var(--text-sm); }
.activity-time { font-size: 11px; color: var(--muted-light); margin-top: 2px; }

/* ── Health Grid ── */
.health-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.health-item { padding: 14px; border-radius: 8px; background: var(--light); border: 1px solid var(--border); }
.health-label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.health-value { font-size: 20px; font-weight: 700; }

/* ── Section Manager (toggle) ── */
.toggle { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: #cbd5e1; border-radius: 22px; cursor: pointer; transition: background var(--transition); }
.toggle-slider::before { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; background: white; border-radius: 50%; transition: transform var(--transition); box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.toggle input:checked + .toggle-slider { background: var(--teal); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

.section-row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; background: var(--white); transition: box-shadow var(--transition); cursor: grab; }
.section-row:hover { box-shadow: var(--shadow); }
.section-row.disabled { opacity: 0.5; background: var(--light); }
.section-drag { color: var(--muted-light); font-size: 16px; cursor: grab; flex-shrink: 0; }
.section-num  { font-size: 12px; font-weight: 700; color: var(--muted); width: 36px; text-align: center; flex-shrink: 0; }
.section-name { flex: 1; font-size: 13.5px; font-weight: 600; color: var(--text); }
.section-desc { font-size: 11.5px; color: var(--muted); display: block; font-weight: 400; }

/* ── Report Style Editor Panel ── */
.report-editor-panel { position: fixed; top: 0; right: 0; width: 320px; height: 100vh; background: #fff; box-shadow: -4px 0 30px rgba(0,0,0,0.18); z-index: 9999; transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.4,0,0.2,1); display: flex; flex-direction: column; overflow: hidden; }
.report-editor-panel.open { transform: translateX(0); }
.rep-panel-head { background: var(--navy); color: #fff; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.rep-panel-title { font-size: 14px; font-weight: 700; }
.rep-panel-close { background: rgba(255,255,255,0.12); border: none; color: #fff; width: 28px; height: 28px; border-radius: 6px; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; transition: background var(--transition); }
.rep-panel-close:hover { background: rgba(255,255,255,0.22); }
.rep-panel-body { padding: 18px; overflow-y: auto; flex: 1; }
.rep-control { margin-bottom: 20px; }
.rep-control-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.rep-control-label span { font-weight: 500; color: var(--text); font-size: 12px; }
.rep-slider { -webkit-appearance: none; width: 100%; height: 5px; border-radius: 3px; background: var(--border); outline: none; cursor: pointer; }
.rep-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--teal); cursor: pointer; box-shadow: 0 2px 6px rgba(14,116,144,0.35); }
.rep-select { width: 100%; padding: 8px 12px; border: 1.5px solid var(--border); border-radius: 6px; font-size: 13px; font-family: inherit; color: var(--text); background: var(--white); cursor: pointer; transition: border var(--transition); }
.rep-select:focus { outline: none; border-color: var(--teal); }
.rep-color-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.rep-color-swatch { width: 28px; height: 28px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: transform var(--transition), border-color var(--transition); }
.rep-color-swatch:hover { transform: scale(1.15); }
.rep-color-swatch.selected { border-color: #000; box-shadow: 0 0 0 2px rgba(0,0,0,0.15); }
.rep-panel-footer { padding: 14px 18px; border-top: 1px solid var(--border); background: var(--light); display: flex; gap: 10px; flex-shrink: 0; }
.rep-divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.rep-section-title { font-size: 12px; font-weight: 700; color: var(--navy); margin-bottom: 12px; padding-bottom: 6px; border-bottom: 2px solid var(--teal); }
.rep-editor-toggle { position: fixed; bottom: 28px; right: 28px; background: var(--navy); color: #fff; border: none; border-radius: 50px; padding: 12px 20px; font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: 0 6px 24px rgba(0,0,0,0.25); display: flex; align-items: center; gap: 8px; z-index: 9998; transition: all var(--transition); font-family: inherit; }
.rep-editor-toggle:hover { background: var(--teal); box-shadow: 0 8px 32px rgba(14,116,144,0.4); }

/* ── Misc Utilities ── */
.section-title { font-size: 17px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.section-sub   { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.info-row      { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 4px; }
.info-label    { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 3px; }
.info-value    { font-size: 13.5px; color: var(--text); }
.info-block    { min-width: 180px; margin-bottom: 14px; }
.divider       { border: none; border-top: 1px solid var(--border); margin: 22px 0; }
.text-muted    { color: var(--muted); }
.text-green    { color: var(--green); }
.text-red      { color: var(--red); }
.text-amber    { color: var(--amber); }
.text-navy     { color: var(--navy); }
.text-teal     { color: var(--teal); }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-10 { margin-top: 10px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; }
.fs-12 { font-size: 12px; } .fs-11 { font-size: 11px; }
.d-flex { display: flex; } .flex-col { flex-direction: column; }
.gap-6 { gap: 6px; } .gap-10 { gap: 10px; } .gap-14 { gap: 14px; } .gap-16 { gap: 16px; }
.flex-wrap { flex-wrap: wrap; } .align-center { align-items: center; } .justify-between { justify-content: space-between; } .justify-end { justify-content: flex-end; }
.w-100 { width: 100%; } .text-center { text-align: center; }

/* ── Empty State ── */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state .empty-title { font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.empty-state .empty-sub   { font-size: 13.5px; color: var(--muted); margin-bottom: 22px; }

/* ── Print ── */
@media print {
  body { font-size: 11px; }
  .no-print { display: none !important; }
  .sidebar, .top-bar, .hamburger, .sidebar-overlay { display: none !important; }
  .main-content { margin-left: 0 !important; }
  .content-body { padding: 0 !important; }
  .card { box-shadow: none !important; border: 1px solid #ccc !important; break-inside: avoid; margin-bottom: 14px !important; padding: 12px !important; }
  table { font-size: 10px; } th, td { padding: 6px 8px !important; }
  h2, h3 { page-break-after: avoid; }
  .sub-nav { display: none !important; }
  .report-editor-panel, .rep-editor-toggle { display: none !important; }
}

/* ══ RESPONSIVE ══ */
@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .dashboard-grid.cols-3 { grid-template-columns: 1fr 1fr; }
  .quick-actions { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  .hamburger { display: flex; }
  .sidebar { transform: translateX(-240px); width: 240px; }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .main-content { margin-left: 0; }
  .top-bar { padding: 0 16px; }
  .content-body { padding: 16px; }
  .stats-grid { grid-template-columns: repeat(2,1fr); gap: 12px; }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .dashboard-grid, .dashboard-grid.cols-3 { grid-template-columns: 1fr; }
  .col-span-2 { grid-column: span 1; }
  .product-grid { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: repeat(3,1fr); }
  .health-grid { grid-template-columns: 1fr 1fr; }
  .report-editor-panel { width: 100%; max-width: 320px; }
}

@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-value { font-size: 24px; }
  .page-title { font-size: 15px; }
  .content-body { padding: 12px; }
  .login-card { padding: 30px 22px; }
  .login-logo .brand { font-size: 22px; }
  .btn-group { gap: 6px; }
  .btn { padding: 8px 14px; font-size: 12.5px; }
  .btn-sm { padding: 5px 10px; font-size: 11.5px; }
  .sub-nav { padding: 8px 10px; gap: 4px; }
  .sub-nav-link { font-size: 11.5px; padding: 5px 10px; }
  .quick-actions { grid-template-columns: repeat(2,1fr); }
  .health-grid { grid-template-columns: 1fr; }
  .rep-editor-toggle { bottom: 16px; right: 16px; padding: 10px 16px; font-size: 12px; }
  .report-editor-panel { width: 100%; max-width: 100%; }
  .card { padding: 16px; }
  table { min-width: 380px; }
  .top-bar { height: 54px; }
}

@media (max-width: 380px) {
  .stats-grid { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: repeat(2,1fr); }
}
