/* ============================================================
   NMOI SECURE PORTAL — portal.css
   Brand: Navy #2c4a6e · Teal #2d7d8f · Orange #e8622a · Blue #3b8fd4
   ============================================================ */

/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --teal:         #2d7d8f;
  --teal-dark:    #1e5f70;
  --teal-light:   #e8f5f8;
  --teal-mid:     #c2e4eb;
  --orange:       #e8622a;
  --orange-light: #fdf0eb;
  --blue:         #3b8fd4;
  --blue-light:   #e8f2fb;
  --navy:         #2c4a6e;
  --navy-light:   #3d5f8a;
  --green:        #16a34a;
  --green-light:  #dcfce7;
  --red:          #b91c1c;
  --red-light:    #fee2e2;
  --amber:        #d97706;
  --amber-light:  #fef3c7;
  --gray:         #f4f7f8;
  --gray-mid:     #e8edf0;
  --border:       #d0dde0;
  --text:         #1a2a30;
  --text2:        #445560;
  --text3:        #7a8f96;
  --white:        #ffffff;
  --radius:       8px;
  --radius-lg:    12px;
  --radius-xl:    16px;
  --shadow:       0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md:    0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg:    0 10px 25px rgba(0,0,0,0.12);
}

html { font-size: 15px; -webkit-text-size-adjust: 100%; }

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; }
img { max-width: 100%; }

/* ── Typography ───────────────────────────────────────────── */
h1 { font-size: 1.75rem; font-weight: 500; color: var(--navy); line-height: 1.3; }
h2 { font-size: 1.3rem;  font-weight: 500; color: var(--navy); line-height: 1.4; }
h3 { font-size: 1rem;    font-weight: 500; color: var(--navy); }
h4 { font-size: 0.9rem;  font-weight: 500; color: var(--navy); }
p  { color: var(--text2); }
small { font-size: 0.8rem; color: var(--text3); }
code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.85em;
  background: var(--gray);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--teal-dark);
}


/* ============================================================
   NAVIGATION
   ============================================================ */

.navbar {
  background: var(--navy);
  color: var(--white);
  height: 64px;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--teal);
  box-shadow: var(--shadow-md);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-logo-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--teal);
  overflow: hidden;
  flex-shrink: 0;
}

.nav-logo-text { line-height: 1.25; }
.nav-logo-text .org { font-size: 13px; font-weight: 500; color: var(--white); display: block; }
.nav-logo-text .tag { font-size: 11px; color: rgba(255,255,255,0.6); display: block; }

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
}

.nav-links a {
  color: rgba(255,255,255,0.82);
  font-size: 14px;
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-links a:hover { color: var(--white); border-bottom-color: var(--teal); }

.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-username { font-size: 13px; color: rgba(255,255,255,0.85); }
.nav-role {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,0.15);
  color: var(--white);
}

.btn-logout {
  background: rgba(255,255,255,0.12);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-logout:hover { background: rgba(255,255,255,0.22); }

.badge-count {
  display: inline-block;
  background: var(--orange);
  color: var(--white);
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 8px;
  margin-left: 4px;
  vertical-align: middle;
}


/* ============================================================
   SESSION WARNING & HIPAA BAR
   ============================================================ */

.session-warning {
  background: var(--amber-light);
  border-bottom: 1px solid var(--amber);
  padding: 8px 1.5rem;
  font-size: 13px;
  color: #92400e;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.session-warning button {
  background: var(--amber);
  color: var(--white);
  border: none;
  padding: 4px 12px;
  border-radius: var(--radius);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.hipaa-bar {
  background: var(--teal-light);
  border-bottom: 1px solid var(--teal-mid);
  padding: 8px 1.5rem;
  font-size: 13px;
  color: var(--teal-dark);
}

.hidden { display: none !important; }


/* ============================================================
   LAYOUT — SIDEBAR + MAIN
   ============================================================ */

.layout {
  display: flex;
  min-height: calc(100vh - 67px);
}

.sidebar {
  width: 230px;
  background: var(--navy);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255,255,255,0.08);
}

.sidebar-user {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-name { font-size: 14px; font-weight: 500; color: var(--white); }
.sidebar-role { font-size: 12px; color: rgba(255,255,255,0.55); margin-top: 2px; }

.role-badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 6px;
  font-weight: 500;
}
.rb-admin     { background: rgba(232,98,42,0.25);  color: #f4a87a; }
.rb-staff     { background: rgba(59,143,212,0.25); color: #7dd3fc; }
.rb-volunteer { background: rgba(45,125,143,0.25); color: #81d4e4; }
.rb-guest     { background: rgba(200,200,200,0.15);color: #c0c8cc; }

.sidebar-section {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.35);
  padding: 1rem 1.2rem 0.4rem;
  font-weight: 500;
}

.sidebar nav ul { list-style: none; }

.sidebar nav ul li a,
.sidebar nav ul li button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 1.2rem;
  color: rgba(255,255,255,0.7);
  font-size: 13.5px;
  text-decoration: none;
  width: 100%;
  text-align: left;
  border: none;
  border-left: 3px solid transparent;
  background: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.sidebar nav ul li a:hover,
.sidebar nav ul li button:hover,
.sidebar nav ul li.active a,
.sidebar nav ul li.active button {
  background: rgba(255,255,255,0.1);
  color: var(--white);
  border-left-color: var(--teal);
  text-decoration: none;
}

.main-content {
  flex: 1;
  background: var(--gray);
  padding: 2rem;
  overflow-y: auto;
  min-width: 0;
}


/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: var(--radius);
  border: none;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s, transform 0.1s;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-teal    { background: var(--teal);   color: var(--white); }
.btn-teal:hover { background: var(--teal-dark); text-decoration: none; }

.btn-orange  { background: var(--orange); color: var(--white); }
.btn-orange:hover { background: #c4521e; text-decoration: none; }

.btn-navy    { background: var(--navy);   color: var(--white); }
.btn-navy:hover { background: #1a3352; text-decoration: none; }

.btn-green   { background: var(--green);  color: var(--white); }
.btn-green:hover { background: #15803d; text-decoration: none; }

.btn-danger  { background: var(--red);    color: var(--white); }
.btn-danger:hover { background: #991b1b; text-decoration: none; }

.btn-ghost {
  background: transparent;
  color: var(--teal);
  border: 1px solid var(--teal);
}
.btn-ghost:hover { background: var(--teal-light); text-decoration: none; }

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.55);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); text-decoration: none; }

.btn-sm  { padding: 5px 12px; font-size: 12px; }
.btn-lg  { padding: 12px 28px; font-size: 15px; }
.btn-full { width: 100%; justify-content: center; }


/* ============================================================
   FORMS
   ============================================================ */

.form-group { margin-bottom: 1.2rem; }

label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 5px;
  color: var(--text);
}

.required { color: var(--red); margin-left: 2px; }

input[type=text],
input[type=email],
input[type=password],
input[type=tel],
input[type=date],
input[type=number],
select,
textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(45,125,143,0.12);
}

input[type=checkbox] {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
  cursor: pointer;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--text2);
  cursor: pointer;
  font-weight: normal;
}

.checkbox-label input { margin-top: 2px; flex-shrink: 0; }

textarea { resize: vertical; min-height: 80px; }

.input-hint  { font-size: 12px; color: var(--text3); margin-top: 4px; }
.input-error { font-size: 12px; color: var(--red);   margin-top: 4px; }

.pw-strength {
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  overflow: hidden;
  margin-top: 6px;
}

.pw-fill {
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: width 0.3s, background 0.3s;
}

.pw-label { font-size: 12px; margin-top: 4px; color: var(--text3); }

.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1rem;
}

.filter-bar input,
.filter-bar select { width: auto; flex: 1; min-width: 140px; max-width: 220px; }


/* ============================================================
   CARDS
   ============================================================ */

.card {
  background: var(--white);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card-accent  { border-top: 3px solid var(--teal); }
.card-orange  { border-top: 3px solid var(--orange); }
.card-blue    { border-top: 3px solid var(--blue); }
.card-green   { border-top: 3px solid var(--green); }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }


/* ============================================================
   STAT CARDS
   ============================================================ */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat {
  background: var(--white);
  border: 0.5px solid var(--border);
  border-top: 3px solid var(--teal);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.stat.orange { border-top-color: var(--orange); }
.stat.blue   { border-top-color: var(--blue); }
.stat.navy   { border-top-color: var(--navy); }
.stat.green  { border-top-color: var(--green); }

.stat .val { font-size: 1.9rem; font-weight: 500; color: var(--navy); line-height: 1; }
.stat .lbl { font-size: 12px; color: var(--text3); margin-top: 6px; }


/* ============================================================
   TABLES
   ============================================================ */

.table-wrap {
  background: var(--white);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

.table-head {
  padding: 1rem 1.2rem;
  border-bottom: 0.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
}

.table-head h3 { font-size: 14px; font-weight: 500; color: var(--navy); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

th {
  background: var(--gray);
  padding: 10px 1rem;
  text-align: left;
  font-weight: 500;
  font-size: 12px;
  color: var(--text2);
  border-bottom: 0.5px solid var(--border);
  white-space: nowrap;
}

td {
  padding: 10px 1rem;
  border-bottom: 0.5px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: #f9fbfc; }
tr.row-fail td { background: #fff8f8; }

.empty-state {
  text-align: center;
  color: var(--text3);
  font-style: italic;
  padding: 2rem;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
  font-size: 13px;
  color: var(--text2);
}


/* ============================================================
   BADGES
   ============================================================ */

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 9px;
  border-radius: 20px;
  white-space: nowrap;
}

.badge-teal   { background: var(--teal-light);  color: var(--teal-dark); }
.badge-orange { background: var(--orange-light); color: #7a2e0e; }
.badge-blue   { background: var(--blue-light);   color: #1a4a7a; }
.badge-green  { background: var(--green-light);  color: #15803d; }
.badge-red    { background: var(--red-light);    color: var(--red); }
.badge-amber  { background: var(--amber-light);  color: #92400e; }
.badge-gray   { background: var(--gray);         color: var(--text2); }

.badge-active   { background: var(--teal-light);  color: var(--teal-dark); }
.badge-followup { background: var(--amber-light); color: #92400e; }
.badge-closed   { background: var(--red-light);   color: var(--red); }
.badge-referred { background: var(--blue-light);  color: #1a4a7a; }
.badge-pending  { background: var(--amber-light); color: #92400e; }
.badge-accepted { background: var(--green-light); color: #15803d; }
.badge-expired  { background: var(--red-light);   color: var(--red); }
.badge-revoked  { background: var(--gray);        color: var(--text3); }


/* ============================================================
   BANNERS / ALERTS
   ============================================================ */

.banner {
  background: var(--teal-light);
  border-left: 4px solid var(--teal);
  padding: 0.9rem 1.2rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 13.5px;
  color: var(--teal-dark);
  margin-bottom: 1.2rem;
}

.banner.warning { background: var(--orange-light); border-color: var(--orange); color: #7a2e0e; }
.banner.danger  { background: var(--red-light);    border-color: var(--red);    color: var(--red); }
.banner.success { background: var(--green-light);  border-color: var(--green);  color: #15803d; }
.banner.info    { background: var(--blue-light);   border-color: var(--blue);   color: #1a4a7a; }

.messages { padding: 0 1.5rem; max-width: 900px; margin: 0.5rem auto; }

.message {
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 13.5px;
  margin-bottom: 8px;
  border-left: 4px solid transparent;
  cursor: pointer;
}

.message-success { background: var(--green-light); border-color: var(--green); color: #15803d; }
.message-error   { background: var(--red-light);   border-color: var(--red);   color: var(--red); }
.message-warning { background: var(--amber-light); border-color: var(--amber); color: #92400e; }
.message-info    { background: var(--teal-light);  border-color: var(--teal);  color: var(--teal-dark); }

.alert { padding: 10px 16px; border-radius: var(--radius); font-size: 13.5px; margin-bottom: 1rem; }
.alert-danger  { background: var(--red-light);   color: var(--red);   border: 1px solid #fca5a5; }
.alert-warning { background: var(--amber-light); color: #92400e;      border: 1px solid #fcd34d; }
.alert ul { padding-left: 1.2rem; margin-top: 4px; }

.err-msg     { color: var(--red);   font-size: 13px; margin-top: 6px; text-align: center; }
.success-msg { color: var(--green); font-size: 13px; margin-top: 6px; text-align: center; }


/* ============================================================
   MODALS
   ============================================================ */

.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(2px);
}

.modal-box {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2rem;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-box h3 {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: var(--navy);
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 1.5rem;
}


/* ============================================================
   AUTH PAGES (login flow)
   ============================================================ */

.auth-body {
  background: linear-gradient(160deg, var(--navy) 0%, var(--teal-dark) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-wrap { width: 100%; max-width: 460px; }

.login-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.login-logo { text-align: center; margin-bottom: 1.5rem; }

.login-logo-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid var(--teal);
  margin: 0 auto 1rem;
  display: block;
  overflow: hidden;
}

.login-logo-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--teal-light);
  border: 2px solid var(--teal);
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.login-logo h2 { font-size: 1.2rem; font-weight: 500; color: var(--navy); }
.login-logo p  { font-size: 13px; color: var(--text3); margin-top: 3px; }
.login-logo .tagline { font-size: 12px; color: var(--teal); font-style: italic; margin-top: 3px; display: block; }

.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 1.5rem;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.3s;
}

.step-dot.active { background: var(--teal); width: 24px; border-radius: 4px; }
.step-dot.done   { background: var(--green); }

.auth-links { margin-top: 1.2rem; text-align: center; font-size: 13px; color: var(--text3); }
.auth-hint  { font-size: 13px; color: var(--text3); text-align: center; margin-top: 1rem; }

.btn-back {
  display: block;
  text-align: center;
  margin-top: 10px;
  font-size: 13px;
  color: var(--text2);
  padding: 8px;
  border-radius: var(--radius);
  transition: background 0.2s;
}
.btn-back:hover { background: var(--gray); text-decoration: none; }

/* OTP input */
.otp-wrap {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 1.5rem 0;
}

.otp-digit {
  width: 48px !important;
  height: 56px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 500;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  color: var(--navy);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.otp-digit:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(45,125,143,0.15);
}

/* 2FA setup */
.setup-steps { padding-left: 1.2rem; font-size: 14px; color: var(--text2); }
.setup-steps li { margin-bottom: 8px; }

/* HIPAA checklist */
.hipaa-checklist { background: var(--gray); border-radius: var(--radius); padding: 1rem; margin: 1rem 0; }
.hipaa-checklist p { font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 0.75rem; }

.hipaa-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text2);
  cursor: pointer;
}

.hipaa-item input { margin-top: 2px; flex-shrink: 0; }


/* ============================================================
   DASHBOARD
   ============================================================ */

.dash-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.dash-header h2 { font-size: 1.3rem; }
.dash-header p  { font-size: 14px; color: var(--text2); margin-top: 3px; }

/* Audit entries */
.audit-entry {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 0.5px solid var(--border);
}

.audit-entry:last-child { border-bottom: none; }

.audit-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0;
  margin-top: 6px;
}

.dot-red    { background: var(--red) !important; }
.dot-orange { background: var(--orange) !important; }
.dot-green  { background: var(--green) !important; }

.audit-text { font-size: 13px; color: var(--text2); }
.audit-time { font-size: 12px; color: var(--text3); margin-top: 2px; }


/* ============================================================
   INVITE LINK BOX
   ============================================================ */

.invite-link-box {
  background: var(--gray);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 12px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  color: var(--text2);
  word-break: break-all;
  margin: 1rem 0;
}


/* ============================================================
   MISC UTILITIES
   ============================================================ */

.section-divider { height: 0.5px; background: var(--border); margin: 2rem 0; }
.accent-line     { width: 48px; height: 3px; background: linear-gradient(90deg, var(--orange), var(--blue)); border-radius: 2px; margin-bottom: 1.2rem; }

.phi-warning { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #7a2e0e; background: var(--orange-light); padding: 8px 12px; border-radius: var(--radius); margin-bottom: 1rem; }


/* ============================================================
   RESPONSIVE — MOBILE
   ============================================================ */

@media (max-width: 768px) {
  .navbar { padding: 0 1rem; }
  .nav-links { display: none; }
  .layout { flex-direction: column; }

  .sidebar {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .sidebar-user { display: none; }

  .sidebar nav ul {
    display: flex;
    flex-direction: row;
    padding: 0;
  }

  .sidebar nav ul li a,
  .sidebar nav ul li button {
    padding: 12px 14px;
    white-space: nowrap;
    border-left: none;
    border-bottom: 3px solid transparent;
    font-size: 12px;
  }

  .sidebar nav ul li a:hover,
  .sidebar nav ul li.active a {
    border-left: none;
    border-bottom-color: var(--teal);
  }

  .sidebar-section { display: none; }

  .main-content { padding: 1rem; }

  .stat-grid { grid-template-columns: repeat(2, 1fr); }

  .dash-header { flex-direction: column; }

  .filter-bar { flex-direction: column; }
  .filter-bar input, .filter-bar select { width: 100%; max-width: 100%; }

  table { font-size: 12px; }
  th, td { padding: 8px; }

  .modal-box { padding: 1.5rem; }
  .login-card { padding: 1.5rem; }
  .otp-digit { width: 40px !important; height: 48px; font-size: 1.2rem; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .btn-full { font-size: 13px; }
}

/* ── HMIS / program modules ─────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 1.2rem; }
.form-grid .form-group textarea { min-height: 80px; }
.form-grid .form-group:has(textarea) { grid-column: 1 / -1; }
.form-group.form-check { align-self: end; }
.form-group.has-error input, .form-group.has-error select, .form-group.has-error textarea { border-color: var(--red); }
.form-actions { display: flex; gap: 10px; margin-top: 1rem; }
.card + .card, form > .card { margin-bottom: 1.2rem; }
.card h3 { margin-bottom: .8rem; }

table.kv { width: 100%; font-size: 13.5px; }
table.kv td { padding: 6px 0; vertical-align: top; }
table.kv td:first-child { color: var(--text3); width: 42%; }

.enrollment { border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem 1rem; margin-bottom: .8rem; }
.enrollment.open { border-left: 4px solid var(--teal); }
.enrollment-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.enrollment-meta { color: var(--text2); font-size: 13px; margin-top: .3rem; }
.enrollment-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: .6rem; }

.quick-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-bar label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text2); }

@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
