/* ============================================================
   portal.css — Mavericks Report Portal  (Professional Redesign)
   ============================================================ */

:root {
  --red:      #A40D12;
  --red-dark: #7d090e;
  --navy:     #1F3864;
  --navy-lt:  #263f78;
  --white:    #ffffff;
  --bg:       #F0F2F5;
  --sidebar-w: 210px;
  --lgray:    #F4F6F9;
  --border:   #DDE1E9;
  --dgray:    #6B7280;
  --success:  #16a34a;
  --warning:  #d97706;
  --danger:   #dc2626;
  --info:     #2563eb;
  --radius:   5px;
  --shadow:   0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:0 4px 12px rgba(0,0,0,.12);
}

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

body {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  font-size: 13.5px;
  background: var(--bg);
  color: #1e2535;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ══════════════════════════════════════════════════
   TOP HEADER BAR
══════════════════════════════════════════════════ */
.topbar {
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  padding: 0 20px;
  height: 52px;
  gap: 0;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  box-shadow: 0 2px 8px rgba(0,0,0,.30);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0;
  width: var(--sidebar-w);
  flex-shrink: 0;
  border-right: 1px solid rgba(255,255,255,.12);
  padding-right: 16px;
  height: 100%;
}
.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-icon {
  width: 32px;
  height: 32px;
  background: var(--red);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  color: white;
  letter-spacing: -1px;
  flex-shrink: 0;
}
.brand-text { line-height: 1.2; }
.brand-name { font-size: 15px; font-weight: 800; color: var(--white); letter-spacing: -.3px; }
.brand-sub  { font-size: 9.5px; color: rgba(255,255,255,.55); letter-spacing: .8px; text-transform: uppercase; }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}
.topbar-user-info { display: flex; align-items: center; gap: 8px; }
.user-avatar {
  width: 30px; height: 30px;
  background: var(--red);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: white;
  flex-shrink: 0;
}
.user-name  { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.9); }
.user-role  { font-size: 11px; color: rgba(255,255,255,.5); margin-top: 1px; }
.btn-logout {
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.8);
  border: 1px solid rgba(255,255,255,.2);
  padding: 5px 14px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
}
.btn-logout:hover { background: var(--red); border-color: var(--red); color: white; }

/* ══════════════════════════════════════════════════
   SIDEBAR  (fixed left)
══════════════════════════════════════════════════ */
.sidebar {
  position: fixed;
  top: 52px; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--navy);
  z-index: 150;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255,255,255,.07);
}

.sidebar-section { padding: 14px 0 0; }
.sidebar-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,.35);
  padding: 0 14px 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── SIDEBAR LINK — truncated to ~10 words ─────── */
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  color: rgba(255,255,255,.68);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  transition: all .15s;
  border-left: 3px solid transparent;
  position: relative;
  min-width: 0;           /* allow children to shrink */
  overflow: hidden;
}
.sidebar-link:hover {
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.95);
  border-left-color: rgba(164,13,18,.5);
}
.sidebar-link.active {
  background: rgba(164,13,18,.18);
  color: #fff;
  border-left-color: var(--red);
  font-weight: 600;
}
.sidebar-link.disabled {
  opacity: .35;
  cursor: not-allowed;
  pointer-events: none;
}

/* Text label inside link — truncates at ~10 words wide */
.sidebar-link-text {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;       /* ~10 chars visible; feels like ~10 words */
}

.sidebar-icon {
  font-size: 14px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}
.sidebar-badge {
  margin-left: auto;
  background: var(--red);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  flex-shrink: 0;
}
/* "Soon" pill */
.sidebar-soon {
  margin-left: auto;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.5);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: .4px;
  flex-shrink: 0;
}

.sidebar-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,.07);
  margin: 8px 0;
}

.sidebar-bottom {
  margin-top: auto;
  padding: 10px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.sidebar-user-card {
  background: rgba(255,255,255,.06);
  border-radius: var(--radius);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.sidebar-user-card .user-avatar { width: 26px; height: 26px; font-size: 10px; flex-shrink: 0; }
.sidebar-user-name  { font-size: 11.5px; font-weight: 600; color: rgba(255,255,255,.85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-desig { font-size: 9.5px; color: rgba(255,255,255,.45); margin-top: 1px; }

/* ══════════════════════════════════════════════════
   MAIN CONTENT AREA
══════════════════════════════════════════════════ */
.app-body {
  margin-top: 84px; /* 48px brand row + 36px nav row */
  margin-left: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 84px);
}

.main-wrap {
  flex: 1;
  padding: 24px 28px;
  max-width: 100%;
}

/* ══════════════════════════════════════════════════
   PAGE HEADER
══════════════════════════════════════════════════ */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.page-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -.3px;
}
.page-title span { color: var(--red); }
.page-sub {
  font-size: 10px;
  color: var(--dgray);
  margin-top: 3px;
}
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ══════════════════════════════════════════════════
   FLASH MESSAGES
══════════════════════════════════════════════════ */
.flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: var(--radius);
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 10px;
  border-left: 4px solid;
}
.flash-success { background:#f0fdf4; color:#15803d; border-color:#16a34a; }
.flash-error   { background:#fef2f2; color:#b91c1c; border-color:#dc2626; }
.flash-info    { background:#eff6ff; color:#1d4ed8; border-color:#2563eb; }
.flash-close   { background:none; border:none; font-size:18px; cursor:pointer; opacity:.5; line-height:1; }

/* ══════════════════════════════════════════════════
   CARDS
══════════════════════════════════════════════════ */
.card {
  background: var(--white);
  border-radius: 7px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 18px;
  overflow: hidden;
}
.card-header {
  background: var(--navy);
  color: var(--white);
  padding: 11px 18px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .2px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-header .ch-right { margin-left: auto; }
.card-body  { padding: 20px 22px; }
.card-body-flush { padding: 0; }

/* ══════════════════════════════════════════════════
   FORMS — GENERAL
   Label has a bottom border acting as a separator
   between the label text and the input field below.
══════════════════════════════════════════════════ */
.form-group { margin-bottom: 14px; }

label {
  display: block;
  font-weight: 600;
  font-size: 11px;
  margin-bottom: 0;          /* no gap — border IS the separator */
  padding-bottom: 5px;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: .45px;
  border-bottom: 1px solid var(--border);  /* ← separator line */
}
label .opt {
  font-weight: 400;
  color: var(--dgray);
  text-transform: none;
  letter-spacing: 0;
  font-size: 10.5px;
}

input[type=text], input[type=email], input[type=password],
input[type=number], input[type=tel], select, textarea {
  width: 100%;
  padding: 8px 11px;
  border: 1.5px solid var(--border);
  border-top: none;          /* top border removed — label border flows into field */
  border-radius: 0 0 var(--radius) var(--radius);
  font-size: 13px;
  font-family: inherit;
  color: #111;
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--navy);
  border-top: 1.5px solid var(--navy);
  box-shadow: 0 0 0 3px rgba(31,56,100,.10);
}
textarea {
  resize: vertical;
  line-height: 1.65;
  min-height: 90px;
  border-top: none;
}
textarea:focus { border-top: 1.5px solid var(--navy); }

/* Standalone inputs (not after a label) keep all borders */
.input-standalone {
  border: 1.5px solid var(--border) !important;
  border-radius: var(--radius) !important;
}

/* ── TWO-COLUMN FORM GRID ────────────────────────────── */
.form-grid {
  display: grid;
  gap: 14px 24px;
}
.form-grid.g2 { grid-template-columns: 1fr 1fr; }
.form-grid.g3 { grid-template-columns: 1fr 1fr 1fr; }
.form-grid.g4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.form-grid.g-span2 { grid-column: span 2; }

/* ── SECTION HEADING BAR ────────────────────────────── */
.fsection {
  background: var(--navy);
  color: white;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 4px;
  margin: 20px 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.fsection.red { background: var(--red); }
.fsection.sub {
  background: #EEF1F7;
  color: var(--navy);
  font-size: 11.5px;
  margin: 14px 0 10px;
}

/* ══════════════════════════════════════════════════
   LARGE TEXTAREA
══════════════════════════════════════════════════ */
.textarea-large { min-height: 130px !important; width: 100% !important; }
.textarea-xl    { min-height: 160px !important; width: 100% !important; }

/* ══════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius);
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
  font-family: inherit;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 3px 8px rgba(0,0,0,.15); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--red);     color: white; }
.btn-navy    { background: var(--navy);    color: white; }
.btn-success { background: var(--success); color: white; }
.btn-warning { background: var(--warning); color: white; }
.btn-danger  { background: var(--danger);  color: white; }
.btn-ghost   { background: white; color: var(--navy); border: 1.5px solid var(--border); }
.btn-ghost:hover { background: var(--lgray); border-color: var(--navy); filter: none; }
.btn-sm  { padding: 5px 12px; font-size: 12px; }
.btn-xs  { padding: 3px 8px; font-size: 11px; border-radius: 3px; }

/* ══════════════════════════════════════════════════
   TABLES
══════════════════════════════════════════════════ */
.table-wrap { overflow-x: auto; }
table       { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  background: #F8F9FC;
  color: #374151;
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: .4px;
  text-transform: uppercase;
  border-bottom: 2px solid var(--border);
}
tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid #EAECF0;
  vertical-align: middle;
}
tbody tr:hover { background: #FAFBFF; }
tbody tr:last-child td { border-bottom: none; }

/* ── STATUS BADGES ─────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-draft        { background:#F1F5F9; color:#475569; border:1px solid #CBD5E1; }
.badge-submitted_qa { background:#DBEAFE; color:#1e40af; border:1px solid #93C5FD; }
.badge-qa_rework    { background:#FEF9C3; color:#92400e; border:1px solid #FCD34D; }
.badge-published    { background:#DCFCE7; color:#166534; border:1px solid #86EFAC; }

/* ── ROLE BADGE ────────────────────────────────── */
.role-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: .4px;
  white-space: nowrap;
}
.role-research { background:#DBEAFE; color:#1e40af; }
.role-qa       { background:#DCFCE7; color:#15803d; }
.role-qc       { background:#FEF9C3; color:#854d0e; }
.role-lead     { background:#EDE9FE; color:#6b21a8; }
.role-manager  { background:var(--red); color:white; }
.role-hr       { background:#FCE7F3; color:#9d174d; }

/* ══════════════════════════════════════════════════
   DASHBOARD — MODULE CARDS
══════════════════════════════════════════════════ */
.module-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 6px;
}
.module-card {
  background: white;
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: box-shadow .2s, transform .2s;
}
.module-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.module-card.locked { opacity: .55; pointer-events: none; }
.mc-stripe { height: 5px; }
.mc-stripe.red  { background: linear-gradient(90deg, var(--red), #d4222a); }
.mc-stripe.navy { background: linear-gradient(90deg, var(--navy), var(--navy-lt)); }
.mc-stripe.teal { background: linear-gradient(90deg, #0d9488, #14b8a6); }
.mc-body { padding: 10px 12px; }
.mc-icon { font-size: 20px; margin-bottom: 4px; }
.mc-title { font-size: 10px; font-weight: 700; color: var(--navy); }
.mc-desc  { font-size: 10px; color: var(--dgray); margin-top: 5px; line-height: 1.5; }
.mc-stats { display: flex; gap: 10px; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border); }
.mc-stat-num { font-size: 10px; font-weight: 800; color: var(--red); line-height: 1; }
.mc-stat-lbl { font-size: 9px; color: var(--dgray); margin-top: 2px; }

/* ── STAT SUMMARY ROW ──────────────────────────── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-bottom: 5px;
}
.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 5px 8px;
  box-shadow: var(--shadow);
  border-left: 4px solid;
}
.stat-card.sc-total  { border-left-color: var(--navy); }
.stat-card.sc-draft  { border-left-color: #94a3b8; }
.stat-card.sc-qa     { border-left-color: var(--info); }
.stat-card.sc-pub    { border-left-color: var(--success); }
.stat-card-num { font-size: 10px; font-weight: 800; color: var(--navy); line-height: 1; }
.stat-card-lbl { font-size: 11.5px; color: var(--dgray); margin-top: 4px; font-weight: 500; }

/* ══════════════════════════════════════════════════
   COMPANY FORM — SPECIFIC
══════════════════════════════════════════════════ */
.submit-panel {
  background: #F8F9FC;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 18px 20px;
  margin-top: 8px;
}
.submit-panel h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.qa-row { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.qa-row .form-group { flex: 1; min-width: 200px; margin: 0; }

/* SEGMENT BUILDER */
.segment-block {
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 16px 18px;
  margin-bottom: 12px;
  background: #FAFBFF;
  position: relative;
}
.segment-block .seg-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.seg-remove {
  position: absolute;
  top: 12px; right: 12px;
  background: var(--danger);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  cursor: pointer;
  font-weight: 600;
}

/* ══════════════════════════════════════════════════
   SEARCH PAGE
══════════════════════════════════════════════════ */
.search-wrap {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.search-wrap input {
  flex: 1;
  font-size: 14px;
  padding: 10px 14px;
  /* search bar is standalone — restore all borders */
  border: 1.5px solid var(--border) !important;
  border-radius: var(--radius) !important;
}
.search-wrap input:focus {
  border-color: var(--navy) !important;
  border-top: 1.5px solid var(--navy) !important;
}

/* ══════════════════════════════════════════════════
   MODALS
══════════════════════════════════════════════════ */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 500;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: white;
  border-radius: 8px;
  max-width: 680px;
  width: 94%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.modal-head {
  background: var(--navy);
  color: white;
  padding: 14px 20px;
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-head h3 { font-size: 14px; font-weight: 700; }
.modal-close   { background: none; border: none; color: white; font-size: 20px; cursor: pointer; line-height: 1; }
.modal-body    { padding: 20px; overflow-y: auto; flex: 1; font-size: 13px; line-height: 1.65; }
.modal-body h4 { color: var(--navy); font-size: 12.5px; margin: 14px 0 5px; text-transform: uppercase; letter-spacing: .4px; }
.modal-body ul { padding-left: 18px; }
.modal-body li { margin-bottom: 4px; color: #444; }
.modal-body p  { color: #444; margin-bottom: 8px; }
.modal-foot    { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; }

/* CONFIRM */
.confirm-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 600; align-items: center; justify-content: center; }
.confirm-overlay.open { display: flex; }
.confirm-box  { background: white; border-radius: 8px; width: 440px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.confirm-head { background: var(--navy); color: white; padding: 13px 18px; font-weight: 700; font-size: 14px; }
.confirm-body { padding: 18px; font-size: 13.5px; color: #333; line-height: 1.6; }
.confirm-body ul { padding-left: 18px; margin-top: 8px; }
.confirm-body li { color: var(--danger); font-weight: 500; margin-bottom: 3px; }
.confirm-foot { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }

/* ══════════════════════════════════════════════════
   LOGIN PAGE
══════════════════════════════════════════════════ */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0d1f3c 0%, var(--navy) 50%, #0d1f3c 100%);
  position: relative;
  overflow: hidden;
}
.login-wrap::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(164,13,18,.15) 0%, transparent 70%);
  top: -200px; right: -200px;
}
.login-box {
  background: white;
  border-radius: 10px;
  width: 420px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,.45);
  position: relative;
  z-index: 1;
}
.login-header {
  background: var(--red);
  padding: 28px 32px 22px;
  text-align: center;
}
.login-logo-icon {
  width: 52px; height: 52px;
  background: rgba(255,255,255,.2);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 900; color: white;
  margin: 0 auto 10px;
}
.login-title  { font-size: 18px; font-weight: 800; color: white; }
.login-sub    { font-size: 11px; color: rgba(255,255,255,.7); letter-spacing: 1px; margin-top: 3px; text-transform: uppercase; }
.login-body   { padding: 28px 32px 32px; }
.login-body h2 { font-size: 17px; color: var(--navy); margin-bottom: 18px; font-weight: 700; }

/* Login inputs — need full borders since they're standalone */
.login-body input[type=email],
.login-body input[type=password] {
  border: 1.5px solid var(--border) !important;
  border-radius: var(--radius) !important;
}
.login-body input:focus {
  border-color: var(--navy) !important;
  border-top: 1.5px solid var(--navy) !important;
}

/* ══════════════════════════════════════════════════
   MISC UTILITIES
══════════════════════════════════════════════════ */
.text-red   { color: var(--red); }
.text-navy  { color: var(--navy); }
.text-muted { color: var(--dgray); }
.fw-700     { font-weight: 700; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.d-flex { display: flex; }
.gap-2  { gap: 12px; }
.align-c { align-items: center; }
.j-end  { justify-content: flex-end; }
.w-full { width: 100%; }
.req { color: var(--red); margin-left: 2px; }

/* Site footer */
.site-footer {
  background: white;
  border-top: 1px solid var(--border);
  padding: 10px 20px;
  font-size: 11.5px;
  color: var(--dgray);
  text-align: center;
  margin-left: 0;
}

/* Login page — override site-footer */
.login-wrap + .site-footer,
body.no-sidebar .site-footer { margin-left: 0; }
body.no-sidebar .app-body    { margin-left: 0; }

/* ══════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════ */
@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  .sidebar { display: none; }
  .topbar-brand { width: auto; border-right: none; }
  .site-footer  { margin-left: 0; }
  .stat-row     { grid-template-columns: 1fr 1fr; }
  .module-grid  { grid-template-columns: 1fr; }
  .form-grid.g2, .form-grid.g3, .form-grid.g4 { grid-template-columns: 1fr; }
  .site-footer  { margin-left: 0; }
}
