/* ============================================================
   portal.css – Shared Portal Stylesheet (All 4 Portals)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary:       #5B21B6;
  --primary-dark:  #4C1D95;
  --primary-light: #7C3AED;
  --secondary:     #7E22CE;
  --accent:        #D4AF37;
  --bg:            #F1F5F9;
  --surface:       #FFFFFF;
  --text:          #1F2937;
  --text-muted:    #6B7280;
  --text-light:    #9CA3AF;
  --border:        #E5E7EB;
  --success:       #059669;
  --danger:        #DC2626;
  --warning:       #D97706;
  --info:          #2563EB;
  --sidebar-w:     260px;
  --topbar-h:      68px;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08);
  --shadow:        0 4px 16px rgba(0,0,0,.08);
  --shadow-lg:     0 10px 40px rgba(0,0,0,.1);
  --radius-sm:     6px;
  --radius:        10px;
  --radius-lg:     16px;
  --transition:    all .25s cubic-bezier(.4,0,.2,1);
  --font:          'Inter', system-ui, sans-serif;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; outline: none; font-family: var(--font); }
input, select, textarea { font-family: var(--font); }

/* ── Portal Layout ───────────────────────────────────────── */
.portal-layout { display: flex; min-height: 100vh; }

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: #0F0A1E;
  min-height: 100vh;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  overflow: hidden;
}
.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-logo { height: 36px; width: auto; }
.sidebar-brand { color: #fff; font-weight: 800; font-size: 1rem; }
.sidebar-brand small { display: block; font-size: .7rem; font-weight: 400; opacity: .5; text-transform: uppercase; letter-spacing: .08em; }

.sidebar-user {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: .95rem; flex-shrink: 0;
}
.sidebar-user-info .name { color: #fff; font-weight: 600; font-size: .88rem; }
.sidebar-user-info .role { font-size: .72rem; color: rgba(255,255,255,.4); text-transform: uppercase; letter-spacing: .06em; }

.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 2px; }
.nav-section { margin-bottom: 24px; }
.nav-section-title {
  font-size: .68rem;
  font-weight: 600;
  color: rgba(255,255,255,.3);
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 0 10px;
  margin-bottom: 8px;
}
.nav-item { margin-bottom: 2px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.6);
  font-size: .875rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}
.nav-link .icon { width: 20px; text-align: center; font-size: 1rem; flex-shrink: 0; }
.nav-link .badge-count {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: .65rem;
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 700;
}
.nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-link.active {
  background: linear-gradient(135deg, rgba(91,33,182,.6), rgba(126,34,206,.4));
  color: #fff;
  box-shadow: 0 2px 12px rgba(91,33,182,.3);
}
.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 3px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.sidebar-footer .nav-link { color: rgba(255,255,255,.5); }
.sidebar-footer .nav-link:hover { color: #fff; background: rgba(220,38,38,.15); }

/* Sidebar Overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 199;
}
.sidebar-overlay.show { display: block; }

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

/* ── Top Bar ─────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  box-shadow: var(--shadow-sm);
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-toggle {
  width: 36px; height: 36px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}
.topbar-toggle:hover { background: var(--border); }
.topbar-title { font-size: 1rem; font-weight: 700; color: var(--text); }
.topbar-breadcrumb { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-wallet {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: rgba(91,33,182,.08);
  border-radius: 50px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--primary);
}
.topbar-wallet i { color: var(--accent); }
.topbar-notif {
  width: 38px; height: 38px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}
.topbar-notif:hover { background: var(--border); }
.topbar-notif .dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; background: var(--danger); border-radius: 50%; border: 2px solid var(--surface); }
.topbar-avatar {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: var(--transition);
}
.topbar-avatar:hover { transform: scale(1.08); }

/* ── Page Wrapper ────────────────────────────────────────── */
.page-wrapper { padding: 28px; flex: 1; }
.page-header { margin-bottom: 28px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-header h1 { font-size: 1.5rem; font-weight: 800; color: var(--text); }
.page-header p  { font-size: .88rem; color: var(--text-muted); margin-top: 4px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Dashboard Cards ─────────────────────────────────────── */
.stats-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 28px; }
.stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  background: radial-gradient(circle at top right, rgba(91,33,182,.06), transparent);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-card-icon {
  width: 56px; height: 56px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.stat-card-icon.purple { background: rgba(91,33,182,.1); color: var(--primary); }
.stat-card-icon.green  { background: rgba(5,150,105,.1); color: var(--success); }
.stat-card-icon.amber  { background: rgba(212,175,55,.1); color: var(--accent); }
.stat-card-icon.blue   { background: rgba(37,99,235,.1); color: var(--info); }
.stat-card-icon.red    { background: rgba(220,38,38,.1); color: var(--danger); }
.stat-value { font-size: 1.9rem; font-weight: 800; color: var(--text); line-height: 1; }
.stat-label { font-size: .78rem; color: var(--text-muted); margin-top: 4px; }
.stat-change { font-size: .75rem; font-weight: 600; margin-top: 4px; }
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ── Cards / Panels ──────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title { font-size: 1rem; font-weight: 700; }
.card-body { padding: 24px; }
.card-footer { padding: 16px 24px; border-top: 1px solid var(--border); background: rgba(0,0,0,.02); }

/* ── Tables ──────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.data-table th {
  text-align: left;
  padding: 12px 16px;
  background: var(--bg);
  font-size: .75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: rgba(91,33,182,.03); }
.data-table .lead-no { font-family: monospace; font-size: .8rem; color: var(--primary); font-weight: 600; }

/* ── Badges / Status ─────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.badge-purple  { background: rgba(91,33,182,.1);  color: var(--primary); }
.badge-green   { background: rgba(5,150,105,.1);  color: var(--success); }
.badge-amber   { background: rgba(212,175,55,.12); color: #92660A; }
.badge-blue    { background: rgba(37,99,235,.1);  color: var(--info); }
.badge-red     { background: rgba(220,38,38,.1);  color: var(--danger); }
.badge-gray    { background: rgba(107,114,128,.1); color: var(--text-muted); }
.badge-pending    { background: rgba(212,175,55,.12); color: #92660A; }
.badge-active     { background: rgba(5,150,105,.1);  color: var(--success); }
.badge-blocked    { background: rgba(220,38,38,.1);  color: var(--danger); }
.badge-draft      { background: rgba(107,114,128,.1); color: var(--text-muted); }
.badge-submitted  { background: rgba(37,99,235,.1);  color: var(--info); }
.badge-approved   { background: rgba(5,150,105,.1);  color: var(--success); }
.badge-rejected   { background: rgba(220,38,38,.1);  color: var(--danger); }
.badge-disbursed  { background: rgba(91,33,182,.1);  color: var(--primary); }
.badge-docs_pending { background: rgba(217,119,6,.1); color: var(--warning); }

/* ── Buttons (Portal) ────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #047857; }
.btn-danger  { background: var(--danger); color: #fff; }
.btn-danger:hover  { background: #B91C1C; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #B45309; }
.btn-info    { background: var(--info); color: #fff; }
.btn-info:hover    { background: #1D4ED8; }
.btn-outline { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-outline-primary { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: .78rem; }
.btn-lg { padding: 12px 28px; font-size: .95rem; }
.btn-icon { padding: 8px; width: 34px; height: 34px; border-radius: var(--radius-sm); justify-content: center; }
.btn-block { width: 100%; justify-content: center; }

/* ── Forms (Portal) ──────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: .82rem; font-weight: 600; color: var(--text); margin-bottom: 7px; }
.form-label .req { color: var(--danger); margin-left: 2px; }
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .88rem;
  color: var(--text);
  background: var(--surface);
  transition: var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(91,33,182,.1); }
.form-control::placeholder { color: var(--text-light); }
.form-control:disabled { background: var(--bg); color: var(--text-muted); cursor: not-allowed; }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-hint { font-size: .75rem; color: var(--text-muted); margin-top: 5px; }
.form-error { font-size: .75rem; color: var(--danger); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.form-section-title { font-size: .8rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }

/* ── Upload Area ─────────────────────────────────────────── */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg);
}
.upload-area:hover, .upload-area.drag-over {
  border-color: var(--primary);
  background: rgba(91,33,182,.04);
}
.upload-area i { font-size: 2rem; color: var(--text-light); margin-bottom: 12px; }
.upload-area p { font-size: .88rem; color: var(--text-muted); }
.upload-area span { color: var(--primary); font-weight: 600; }

/* ── Timeline (File Tracking) ────────────────────────────── */
.timeline { position: relative; padding-left: 32px; }
.timeline::before { content: ''; position: absolute; left: 10px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.timeline-item { position: relative; margin-bottom: 28px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -28px;
  top: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.timeline-dot.active { border-color: var(--primary); background: var(--primary); }
.timeline-dot.success { border-color: var(--success); background: var(--success); }
.timeline-dot.danger  { border-color: var(--danger);  background: var(--danger); }
.timeline-title { font-size: .9rem; font-weight: 700; color: var(--text); }
.timeline-time  { font-size: .75rem; color: var(--text-muted); margin: 3px 0 6px; }
.timeline-desc  { font-size: .85rem; color: var(--text-muted); }

/* ── Wallet Balance Card ─────────────────────────────────── */
.wallet-card {
  background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
  border-radius: var(--radius-lg);
  padding: 28px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.wallet-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: rgba(255,255,255,.06);
  border-radius: 50%;
}
.wallet-label { font-size: .78rem; opacity: .7; text-transform: uppercase; letter-spacing: .08em; }
.wallet-amount { font-size: 2.5rem; font-weight: 800; margin: 8px 0; color: var(--accent); }
.wallet-meta { font-size: .8rem; opacity: .65; }

/* ── Profile Card ────────────────────────────────────────── */
.profile-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
  border-radius: var(--radius-lg);
  padding: 36px;
  text-align: center;
  color: #fff;
  margin-bottom: 24px;
}
.profile-avatar-lg {
  width: 90px; height: 90px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  border: 3px solid rgba(255,255,255,.4);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  overflow: hidden;
}
.profile-avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.profile-name { font-size: 1.4rem; font-weight: 800; margin-bottom: 4px; }
.profile-role { font-size: .82rem; opacity: .7; text-transform: uppercase; letter-spacing: .08em; }

/* ── Login Page ──────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-dark) 0%, #0F0A1E 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute;
  top: -200px; left: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(91,33,182,.3), transparent 70%);
}
.login-page::after {
  content: '';
  position: absolute;
  bottom: -150px; right: -150px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(212,175,55,.15), transparent 70%);
}
.login-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 48px;
  width: 100%;
  max-width: 460px;
  position: relative;
  z-index: 10;
  box-shadow: 0 24px 80px rgba(0,0,0,.4);
}
.login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.login-logo img { height: 48px; margin: 0 auto 12px; }
.login-logo h2 { font-size: 1.3rem; color: var(--primary); }
.login-logo p { font-size: .82rem; color: var(--text-muted); }
.login-form h3 { font-size: 1.4rem; margin-bottom: 6px; }
.login-form p { font-size: .85rem; color: var(--text-muted); margin-bottom: 28px; }
.input-icon-wrap { position: relative; }
.input-icon-wrap .form-control { padding-left: 44px; }
.input-icon-wrap .inp-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-light); font-size: .95rem; }
.input-icon-wrap .eye-toggle { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-light); cursor: pointer; font-size: .95rem; }

/* ── Pagination ──────────────────────────────────────────── */
.pagination { display: flex; gap: 6px; align-items: center; justify-content: center; padding: 16px 0; }
.page-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── Search & Filter Bar ─────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 20px;
}
.search-box {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.search-box input { padding-left: 38px; }
.search-box i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: .9rem; }
.filter-select { min-width: 150px; }

/* ── Modal ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow: auto;
  transform: scale(.9) translateY(20px);
  transition: var(--transition);
  box-shadow: 0 24px 80px rgba(0,0,0,.2);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title { font-size: 1rem; font-weight: 700; }
.modal-close { width: 32px; height: 32px; background: var(--bg); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-muted); transition: var(--transition); }
.modal-close:hover { background: var(--danger); color: #fff; }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ── Alerts ──────────────────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}
.alert i { margin-top: 1px; flex-shrink: 0; }
.alert-success { background: rgba(5,150,105,.08); border-left: 3px solid var(--success); color: var(--success); }
.alert-danger  { background: rgba(220,38,38,.08); border-left: 3px solid var(--danger); color: var(--danger); }
.alert-warning { background: rgba(217,119,6,.08);  border-left: 3px solid var(--warning); color: var(--warning); }
.alert-info    { background: rgba(37,99,235,.08);  border-left: 3px solid var(--info); color: var(--info); }

/* ── Toaster ─────────────────────────────────────────────── */
#toaster-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--primary);
  animation: toastIn .3s cubic-bezier(.4,0,.2,1) forwards;
  position: relative;
  overflow: hidden;
}
.toast.success { border-color: var(--success); }
.toast.error   { border-color: var(--danger); }
.toast.warning { border-color: var(--warning); }
.toast-icon { font-size: 1.05rem; flex-shrink: 0; margin-top: 1px; }
.toast.success .toast-icon { color: var(--success); }
.toast.error   .toast-icon { color: var(--danger); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.info    .toast-icon { color: var(--info); }
.toast-body    { flex: 1; }
.toast-title   { font-weight: 700; font-size: .85rem; margin-bottom: 2px; }
.toast-msg     { font-size: .8rem; color: var(--text-muted); }
.toast-close   { font-size: 1rem; color: var(--text-light); cursor: pointer; }
.toast-close:hover { color: var(--danger); }
.toast-progress { position: absolute; bottom: 0; left: 0; height: 3px; animation: toastProgress 4s linear forwards; }
.toast.success .toast-progress { background: var(--success); }
.toast.error   .toast-progress { background: var(--danger); }
.toast.warning .toast-progress { background: var(--warning); }
.toast.info    .toast-progress { background: var(--primary); }
.toast.removing { animation: toastOut .3s forwards; }
@keyframes toastIn      { from { opacity:0; transform: translateX(100%); } to { opacity:1; transform: translateX(0); } }
@keyframes toastOut     { from { opacity:1; transform: translateX(0); }    to { opacity:0; transform: translateX(100%); } }
@keyframes toastProgress { from { width:100%; } to { width:0%; } }

/* ── Empty State ─────────────────────────────────────────── */
.empty-state { text-align: center; padding: 64px 24px; }
.empty-state i { font-size: 3rem; color: var(--text-light); margin-bottom: 16px; }
.empty-state h4 { color: var(--text-muted); margin-bottom: 8px; }
.empty-state p { font-size: .88rem; color: var(--text-light); }

/* ── Misc ────────────────────────────────────────────────── */
.text-muted  { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.fw-700 { font-weight: 700; }
.fw-600 { font-weight: 600; }
.mb-0 { margin-bottom: 0; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.gap-8 { gap: 8px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

/* ── Responsive Portal ───────────────────────────────────── */
@media (max-width: 992px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .topbar-toggle { display: flex; }
  .form-row-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .page-wrapper { padding: 20px 16px; }
  .topbar { padding: 0 16px; }
  .form-row { grid-template-columns: 1fr; }
  .form-row-3 { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; }
  .search-box { width: 100%; }
  .stats-cards { grid-template-columns: 1fr 1fr; }
  .login-card { padding: 32px 24px; }
}
@media (max-width: 480px) {
  .stats-cards { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; }
}
