/*
 * RCI Portal Theme — matches index.html visual design
 * =====================================================
 * Primary: blue-700 (#1e40af) / blue-900 (#1e3a8a)
 * Fonts: Inter (body), Poppins (headings)
 * Icons: Font Awesome 6.4.0
 */

/* ── ROOT ── */
:root {
  --primary:   #1e40af;
  --primary-d: #1e3a8a;
  --primary-l: #3b82f6;
  --primary-xl:#dbeafe;
  --accent:    #6366f1;
  --success:   #059669;
  --warning:   #d97706;
  --danger:    #dc2626;
  --info:      #0284c7;
  --gray-50:   #f9fafb;
  --gray-100:  #f3f4f6;
  --gray-200:  #e5e7eb;
  --gray-300:  #d1d5db;
  --gray-400:  #9ca3af;
  --gray-500:  #6b7280;
  --gray-600:  #4b5563;
  --gray-700:  #374151;
  --gray-800:  #1f2937;
  --gray-900:  #111827;
  --dropdown:  #1a9fcf;
  --nav-h:     72px;
  --max-w:     1280px;
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #f0f9ff 0%, #fdf4ff 50%, #f0fdf4 100%);
  color: var(--gray-800);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}

h1,h2,h3,h4,h5,h6 { font-family: 'Poppins', 'Inter', sans-serif; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--primary-l); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ── PORTAL WRAPPER (replaces body for portals) ── */
.rci-app { display: flex; min-height: 100vh; background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 50%, #ecfdf5 100%); }

/* ══════════════════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════════════════ */
.rci-sidebar {
  width: 260px;
  min-width: 260px;
  background: linear-gradient(175deg, var(--primary-d) 0%, var(--primary) 60%, #1d4ed8 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 200;
  transition: width .3s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
  box-shadow: 4px 0 20px rgba(30,64,175,.3);
}
.rci-sidebar.collapsed { width: 64px; min-width: 64px; }

/* Logo area */
.sb-logo {
  padding: 18px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  min-height: var(--nav-h);
}
.sb-logo-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg,#3b82f6,#6366f1);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 900;
  color: #fff; flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(99,102,241,.4);
  font-family: 'Poppins', sans-serif;
}
.sb-logo-text { white-space: nowrap; overflow: hidden; }
.sb-logo-text h2 { font-size: .92rem; font-weight: 700; color: #fff; letter-spacing: .3px; }
.sb-logo-text h2 span { color: #93c5fd; }
.sb-logo-text p { font-size: .66rem; color: rgba(255,255,255,.5); margin-top: 1px; }

/* Nav body */
.sb-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 10px 0; }
.sb-nav::-webkit-scrollbar { width: 3px; }
.sb-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); }
.sb-group {
  padding: 14px 18px 4px;
  font-size: .62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.2px;
  color: rgba(255,255,255,.4);
  white-space: nowrap; overflow: hidden;
}
.sb-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px;
  cursor: pointer;
  transition: all .2s;
  border-left: 3px solid transparent;
  white-space: nowrap; overflow: hidden;
  position: relative;
  font-size: .84rem; font-weight: 500;
  color: rgba(255,255,255,.7);
}
.sb-item:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
  border-left-color: rgba(255,255,255,.3);
}
.sb-item.active {
  background: rgba(255,255,255,.15);
  color: #fff;
  border-left-color: #93c5fd;
  font-weight: 600;
}
.sb-item .sb-icon { font-size: .92rem; width: 18px; text-align: center; flex-shrink: 0; opacity: .85; }
.sb-item.active .sb-icon { opacity: 1; }
.sb-badge {
  background: #ef4444; color: #fff;
  font-size: .58rem; font-weight: 700;
  padding: 1px 6px; border-radius: 10px;
  margin-left: auto; flex-shrink: 0;
}
.sb-footer {
  padding: 14px 18px;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; gap: 12px;
  cursor: pointer; flex-shrink: 0;
  transition: background .2s;
  font-size: .84rem; font-weight: 500;
  color: rgba(255,255,255,.65);
  white-space: nowrap; overflow: hidden;
}
.sb-footer:hover { background: rgba(239,68,68,.15); color: #fca5a5; }
.rci-sidebar.collapsed .sb-logo-text,
.rci-sidebar.collapsed .sb-group,
.rci-sidebar.collapsed .sb-item span:not(.sb-badge),
.rci-sidebar.collapsed .sb-footer span { display: none; }
.rci-sidebar.collapsed .sb-item { justify-content: center; padding: 11px 0; }
.rci-sidebar.collapsed .sb-footer { justify-content: center; }

/* ══════════════════════════════════════════════════════
   MAIN CONTENT AREA
══════════════════════════════════════════════════════ */
.rci-main { flex: 1; margin-left: 260px; display: flex; flex-direction: column; min-height: 100vh; transition: margin-left .3s; }
.rci-main.expanded { margin-left: 64px; }

/* ══════════════════════════════════════════════════════
   TOPBAR  — matches index.html nav (frosted glass)
══════════════════════════════════════════════════════ */
.rci-topbar {
  height: var(--nav-h);
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 0 var(--gray-200), 0 2px 12px rgba(30,64,175,.06);
  border-bottom: 1px solid rgba(255,255,255,.6);
}
.tb-left { display: flex; align-items: center; gap: 14px; }
.tb-toggle {
  background: none; border: none;
  font-size: 1.1rem; color: var(--gray-500);
  padding: 7px; border-radius: 8px;
  transition: all .2s;
}
.tb-toggle:hover { background: var(--primary-xl); color: var(--primary); }
.tb-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem; font-weight: 700;
  color: var(--gray-800);
  background: linear-gradient(135deg, var(--primary-d), var(--primary-l));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.tb-right { display: flex; align-items: center; gap: 10px; }
.tb-search-wrap { position: relative; }
.tb-search-wrap i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--gray-400); font-size: .85rem; }
.tb-search {
  padding: 8px 14px 8px 36px;
  background: var(--gray-100);
  border: 1.5px solid var(--gray-200);
  border-radius: 22px;
  font-size: .82rem; outline: none;
  width: 200px; transition: all .3s;
  color: var(--gray-800);
}
.tb-search:focus { width: 260px; border-color: var(--primary-l); background: #fff; box-shadow: 0 0 0 3px rgba(59,130,246,.1); }
.tb-icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--gray-100); border: 1.5px solid var(--gray-200);
  color: var(--gray-600); font-size: .88rem;
  display: flex; align-items: center; justify-content: center;
  position: relative; transition: all .2s;
}
.tb-icon-btn:hover { background: var(--primary-xl); border-color: var(--primary-l); color: var(--primary); }
.tb-notif {
  position: absolute; top: -3px; right: -3px;
  width: 17px; height: 17px; border-radius: 50%;
  background: #ef4444; color: #fff;
  font-size: .55rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
}
.tb-user {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: linear-gradient(135deg, var(--primary-xl), #ede9fe);
  border-radius: 22px; border: 1px solid var(--primary-l);
}
.tb-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 800; color: #fff;
  font-family: 'Poppins', sans-serif;
}
.tb-user-name { font-size: .8rem; font-weight: 600; color: var(--primary-d); }
.tb-logout {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff; border: none;
  padding: 7px 16px; border-radius: 22px;
  font-size: .8rem; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
  transition: all .2s;
  box-shadow: 0 2px 8px rgba(239,68,68,.3);
}
.tb-logout:hover { opacity: .9; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(239,68,68,.4); }
.tb-role-badge {
  padding: 4px 12px; border-radius: 20px;
  font-size: .7rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .5px;
}
.tb-role-sa { background: linear-gradient(135deg,#fbbf24,#f97316); color: var(--primary-d); }
.tb-role-admin { background: linear-gradient(135deg, var(--primary-xl), #ddd6fe); color: var(--primary-d); }
.tb-role-fr { background: linear-gradient(135deg,#d1fae5,#a7f3d0); color: #065f46; }

/* ══════════════════════════════════════════════════════
   PAGE HEADER STRIP  (like section heading in index)
══════════════════════════════════════════════════════ */
.rci-page-header {
  background: linear-gradient(135deg, var(--primary-d) 0%, var(--primary) 60%, var(--primary-l) 100%);
  color: #fff;
  padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
}
.rci-page-header h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.05rem; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
}
.rci-page-header .breadcrumb { font-size: .74rem; color: rgba(255,255,255,.65); }

/* ══════════════════════════════════════════════════════
   CONTENT
══════════════════════════════════════════════════════ */
.rci-content { flex: 1; padding: 24px; }
.rci-section { display: none; animation: rciIn .3s ease; }
.rci-section.active { display: block; }
@keyframes rciIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ══════════════════════════════════════════════════════
   STAT CARDS  — matches index.html card design
══════════════════════════════════════════════════════ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px,1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid var(--gray-100);
  box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
  position: relative; overflow: hidden;
  transition: transform .25s, box-shadow .25s;
}
.stat-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(0,0,0,.1); }
/* Color variants */
.sc-blue::before   { background: linear-gradient(90deg,#3b82f6,#60a5fa); }
.sc-indigo::before { background: linear-gradient(90deg,#6366f1,#818cf8); }
.sc-green::before  { background: linear-gradient(90deg,#059669,#34d399); }
.sc-red::before    { background: linear-gradient(90deg,#dc2626,#f87171); }
.sc-orange::before { background: linear-gradient(90deg,#d97706,#fbbf24); }
.sc-purple::before { background: linear-gradient(90deg,#7c3aed,#a78bfa); }
.sc-teal::before   { background: linear-gradient(90deg,#0284c7,#38bdf8); }
.sc-pink::before   { background: linear-gradient(90deg,#be185d,#f472b6); }
.sc-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; margin-bottom: 12px;
}
.sc-blue .sc-icon   { background: #dbeafe; color: #2563eb; }
.sc-indigo .sc-icon { background: #e0e7ff; color: #4f46e5; }
.sc-green .sc-icon  { background: #d1fae5; color: #059669; }
.sc-red .sc-icon    { background: #fee2e2; color: #dc2626; }
.sc-orange .sc-icon { background: #fef3c7; color: #d97706; }
.sc-purple .sc-icon { background: #ede9fe; color: #7c3aed; }
.sc-teal .sc-icon   { background: #e0f2fe; color: #0284c7; }
.sc-pink .sc-icon   { background: #fce7f3; color: #be185d; }
.sc-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--gray-400); margin-bottom: 4px; }
.sc-value { font-size: 1.8rem; font-weight: 800; color: var(--gray-900); line-height: 1; font-family: 'Poppins', sans-serif; }
.sc-sub   { font-size: .72rem; color: var(--gray-400); margin-top: 4px; }

/* ══════════════════════════════════════════════════════
   CARDS  — index.html card style
══════════════════════════════════════════════════════ */
.rci-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--gray-100);
  box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
  overflow: hidden;
  transition: box-shadow .25s, transform .25s;
  margin-bottom: 20px;
  position: relative;
}
.rci-card:hover { box-shadow: 0 8px 24px rgba(30,64,175,.1); }
/* Animated neon border on hover (like index course cards) */
.rci-card.interactive:hover { transform: translateY(-4px); }
.rci-card::after {
  content: '';
  position: absolute; inset: 0;
  padding: 1.5px;
  border-radius: 16px;
  background: linear-gradient(90deg, #3b82f6, #6366f1, #3b82f6);
  background-size: 200% 100%;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude; -webkit-mask-composite: xor;
  opacity: 0; transition: opacity .3s;
  pointer-events: none;
}
.rci-card.interactive:hover::after { opacity: 1; animation: borderFlow .8s linear infinite; }
@keyframes borderFlow { to { background-position: 200% 0; } }

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, #f9fafb, #eff6ff);
}
.card-header h3 {
  font-size: .92rem; font-weight: 700; color: var(--gray-900);
  display: flex; align-items: center; gap: 8px;
  font-family: 'Poppins', sans-serif;
}
.card-header h3 i { color: var(--primary); }
.card-body { padding: 20px; }

/* ══════════════════════════════════════════════════════
   BUTTONS  — index.html btn-primary style
══════════════════════════════════════════════════════ */
.btn {
  padding: 9px 20px;
  border: none; border-radius: 10px;
  font-size: .82rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: 7px;
  cursor: pointer; transition: all .2s;
  white-space: nowrap; font-family: 'Inter', sans-serif;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary-d) 0%, var(--primary) 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(30,64,175,.3);
}
.btn-primary:hover { box-shadow: 0 4px 16px rgba(30,64,175,.4); }

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }

.btn-success { background: linear-gradient(135deg,#059669,#34d399); color:#fff; box-shadow:0 2px 8px rgba(5,150,105,.3); }
.btn-danger  { background: linear-gradient(135deg,#dc2626,#f87171); color:#fff; box-shadow:0 2px 8px rgba(220,38,38,.3); }
.btn-warning { background: linear-gradient(135deg,#d97706,#fbbf24); color:#fff; box-shadow:0 2px 8px rgba(217,119,6,.3); }
.btn-info    { background: linear-gradient(135deg,#0284c7,#38bdf8); color:#fff; box-shadow:0 2px 8px rgba(2,132,199,.3); }
.btn-purple  { background: linear-gradient(135deg,#7c3aed,#a78bfa); color:#fff; box-shadow:0 2px 8px rgba(124,58,237,.3); }
.btn-gray    { background: var(--gray-100); color: var(--gray-700); border: 1px solid var(--gray-200); }
.btn-gray:hover { background: var(--gray-200); }
.btn-glass {
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
}
.btn-glass:hover { background: rgba(255,255,255,.25); }

.btn-sm  { padding: 5px 13px; font-size: .76rem; border-radius: 8px; }
.btn-xs  { padding: 3px 9px;  font-size: .7rem;  border-radius: 6px; }
.btn-lg  { padding: 13px 28px; font-size: .95rem; border-radius: 12px; }
.btn-full { width: 100%; justify-content: center; }

/* ══════════════════════════════════════════════════════
   FORMS
══════════════════════════════════════════════════════ */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 14px; }
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: .76rem; font-weight: 700; color: var(--gray-600); }
.form-field input,
.form-field select,
.form-field textarea {
  padding: 10px 13px;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  font-size: .87rem; outline: none;
  transition: all .2s;
  background: #fff; color: var(--gray-800);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--primary-l);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.form-field textarea { resize: vertical; min-height: 72px; }
.form-hint { font-size: .68rem; color: var(--gray-400); margin-top: 2px; }

/* ══════════════════════════════════════════════════════
   TABLES  — clean with blue header
══════════════════════════════════════════════════════ */
.tbl-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--gray-100); }
table { width: 100%; border-collapse: collapse; font-size: .83rem; background: #fff; }
thead { background: linear-gradient(135deg, #eff6ff, #e0e7ff); }
th {
  padding: 11px 14px; text-align: left;
  font-weight: 700; color: var(--gray-600);
  font-size: .7rem; text-transform: uppercase; letter-spacing: .5px;
  border-bottom: 2px solid var(--gray-100); white-space: nowrap;
}
td { padding: 11px 14px; border-bottom: 1px solid #f8fafc; vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #eff6ff; }
.td-actions { display: flex; gap: 5px; flex-wrap: wrap; }

/* ══════════════════════════════════════════════════════
   BADGES
══════════════════════════════════════════════════════ */
.badge {
  padding: 3px 10px; border-radius: 20px;
  font-size: .7rem; font-weight: 700;
  display: inline-flex; align-items: center; gap: 4px;
}
.badge-green  { background: #d1fae5; color: #065f46; }
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-blue   { background: #dbeafe; color: #1e40af; }
.badge-indigo { background: #e0e7ff; color: #3730a3; }
.badge-purple { background: #ede9fe; color: #5b21b6; }
.badge-teal   { background: #ccfbf1; color: #0f766e; }
.badge-orange { background: #ffedd5; color: #9a3412; }
.badge-gray   { background: #f1f5f9; color: #475569; }

/* ══════════════════════════════════════════════════════
   TABS
══════════════════════════════════════════════════════ */
.tabs { display: flex; gap: 3px; border-bottom: 2px solid var(--gray-200); margin-bottom: 18px; flex-wrap: wrap; }
.tab-btn {
  padding: 9px 18px; border: none; background: transparent;
  font-size: .83rem; font-weight: 600; color: var(--gray-400);
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: all .2s;
}
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-panel { display: none; animation: rciIn .25s ease; }
.tab-panel.active { display: block; }

/* ══════════════════════════════════════════════════════
   ALERTS
══════════════════════════════════════════════════════ */
.alert {
  padding: 11px 16px; border-radius: 10px;
  font-size: .83rem; display: flex; align-items: center;
  gap: 8px; border: 1px solid;
}
.alert-success { background: #d1fae5; color: #065f46; border-color: #a7f3d0; }
.alert-error   { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.alert-info    { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }
.alert-warn    { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.alert-hide    { display: none !important; }

/* ══════════════════════════════════════════════════════
   SEARCH BAR
══════════════════════════════════════════════════════ */
.search-bar { display: flex; gap: 8px; margin-bottom: 16px; }
.search-wrap { flex: 1; position: relative; }
.search-wrap i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--gray-400); font-size: .85rem; }
.search-wrap input {
  width: 100%; padding: 9px 13px 9px 36px;
  border: 1.5px solid var(--gray-200); border-radius: 10px;
  font-size: .85rem; outline: none; background: #fff; transition: all .2s;
}
.search-wrap input:focus { border-color: var(--primary-l); box-shadow: 0 0 0 3px rgba(59,130,246,.12); }

/* ══════════════════════════════════════════════════════
   MODAL
══════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.55);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.modal-overlay.open { display: flex; animation: rciIn .2s ease; }
.modal {
  background: #fff; border-radius: 18px;
  width: 100%; max-width: 640px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 64px rgba(30,64,175,.25);
}
.modal-lg { max-width: 880px; }
.modal-header {
  padding: 18px 24px; border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: linear-gradient(135deg,#f9fafb,#eff6ff); z-index: 1;
}
.modal-header h3 { font-size: .95rem; font-weight: 700; display: flex; align-items: center; gap: 8px; font-family: 'Poppins',sans-serif; }
.modal-header h3 i { color: var(--primary); }
.modal-close {
  background: none; border: none; width: 32px; height: 32px;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: .95rem; color: var(--gray-400); transition: all .2s;
}
.modal-close:hover { background: #fee2e2; color: #dc2626; }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 14px 24px; border-top: 1px solid var(--gray-100);
  display: flex; justify-content: flex-end; gap: 10px;
  background: #f9fafb;
}

/* ══════════════════════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════════════════════ */
.empty-state { text-align: center; padding: 48px 20px; color: var(--gray-400); }
.empty-state i { font-size: 2.8rem; display: block; margin-bottom: 12px; opacity: .3; }
.empty-state h4 { font-size: .9rem; font-weight: 700; color: var(--gray-600); margin-bottom: 4px; font-family: 'Poppins',sans-serif; }
.empty-state p { font-size: .82rem; }

/* ══════════════════════════════════════════════════════
   MODULE GRID  — matches index.html dashboard grid
══════════════════════════════════════════════════════ */
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 16px; margin-bottom: 24px; }
.module-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--gray-100);
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  transition: transform .25s, box-shadow .25s;
  position: relative;
}
.module-card:hover { transform: translateY(-5px) scale(1.01); box-shadow: 0 12px 32px rgba(30,64,175,.12); border-color: transparent; }
.module-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg,#3b82f6,#6366f1);
  z-index: -1; transform: scale(1.02);
  opacity: 0; transition: opacity .3s; border-radius: 16px;
}
.module-card:hover::before { opacity: 1; }
.mc-thumb {
  height: 120px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.6rem; position: relative; overflow: hidden;
}
.mc-label {
  background: var(--primary);
  color: #fff;
  padding: 10px 14px;
  font-size: .82rem; font-weight: 600;
  text-align: center; letter-spacing: .2px;
}
.mc-blue    .mc-thumb { background: linear-gradient(135deg,#dbeafe,#ede9fe); }
.mc-green   .mc-thumb { background: linear-gradient(135deg,#d1fae5,#dcfce7); }
.mc-orange  .mc-thumb { background: linear-gradient(135deg,#ffedd5,#fef3c7); }
.mc-purple  .mc-thumb { background: linear-gradient(135deg,#ede9fe,#fce7f3); }
.mc-teal    .mc-thumb { background: linear-gradient(135deg,#ccfbf1,#dbeafe); }
.mc-red     .mc-thumb { background: linear-gradient(135deg,#fee2e2,#fce7f3); }
.mc-indigo  .mc-thumb { background: linear-gradient(135deg,#e0e7ff,#ede9fe); }

/* ══════════════════════════════════════════════════════
   HERO / PAGE BANNER  — like index hero but condensed
══════════════════════════════════════════════════════ */
.rci-hero {
  background: linear-gradient(135deg, var(--primary-d) 0%, var(--primary) 55%, var(--primary-l) 100%);
  color: #fff;
  padding: 48px 24px 80px;
  text-align: center;
  position: relative; overflow: hidden;
}
.rci-hero::before {
  content: ''; position: absolute;
  top: -80px; right: -80px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
}
.rci-hero::after {
  content: ''; position: absolute;
  bottom: -60px; left: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
}
.rci-hero h1 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 800; margin-bottom: 10px;
  position: relative; z-index: 1;
}
.rci-hero h1 .hl {
  background: linear-gradient(135deg,#fbbf24,#f97316);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.rci-hero p { font-size: .95rem; opacity: .82; max-width: 520px; margin: 0 auto; position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 30px; padding: 5px 16px;
  font-size: .75rem; font-weight: 600;
  color: rgba(255,255,255,.9); margin-bottom: 16px;
  position: relative; z-index: 1;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; animation: heroPulse 2s infinite; }
@keyframes heroPulse { 0%,100%{opacity:1}50%{opacity:.3} }

/* ══════════════════════════════════════════════════════
   PORTAL LANDING CARDS  — like index.html hero card group
══════════════════════════════════════════════════════ */
.portal-cards { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 20px; }
.portal-card {
  border-radius: 20px; overflow: hidden;
  text-decoration: none; display: block;
  cursor: pointer; transition: transform .25s, box-shadow .25s;
  box-shadow: 0 6px 24px rgba(0,0,0,.1);
}
.portal-card:hover { transform: translateY(-7px); box-shadow: 0 20px 48px rgba(0,0,0,.18); }
.pc-top {
  padding: 40px 28px 28px;
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  min-height: 200px;
}
.pc-icon {
  width: 76px; height: 76px; border-radius: 50%;
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.9rem; margin-bottom: 14px;
}
.pc-title { font-size: 1.2rem; font-weight: 800; color: #fff; margin-bottom: 8px; font-family: 'Poppins',sans-serif; }
.pc-desc  { font-size: .83rem; color: rgba(255,255,255,.8); line-height: 1.6; }
.pc-footer {
  background: rgba(0,0,0,.15);
  padding: 13px 22px;
  display: flex; align-items: center; justify-content: space-between;
  color: rgba(255,255,255,.85); font-size: .82rem; font-weight: 600;
  border-top: 1px solid rgba(255,255,255,.1);
}
.pc-blue   { background: linear-gradient(135deg,#1e3a8a,#1e40af,#3b82f6); }
.pc-green  { background: linear-gradient(135deg,#064e3b,#059669,#10b981); }
.pc-orange { background: linear-gradient(135deg,#92400e,#d97706,#f97316); }
.pc-purple { background: linear-gradient(135deg,#3b0764,#6d28d9,#8b5cf6); }
.pc-teal   { background: linear-gradient(135deg,#0c4a6e,#0284c7,#38bdf8); }
.pc-dark   { background: linear-gradient(135deg,#0f172a,#1e293b,#334155); }

/* ══════════════════════════════════════════════════════
   LOGIN PAGE
══════════════════════════════════════════════════════ */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg,var(--primary-d) 0%,var(--primary) 50%,var(--primary-l) 100%);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.login-wrap {
  background: #fff; border-radius: 22px;
  box-shadow: 0 28px 64px rgba(30,64,175,.3);
  width: 420px; max-width: 100%; overflow: hidden;
}
.login-header {
  background: linear-gradient(135deg,var(--primary-d),var(--primary));
  color: #fff; padding: 36px 32px 28px; text-align: center;
}
.login-header .logo-circle {
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(255,255,255,.15);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.8rem; margin-bottom: 14px;
}
.login-header h1 { font-family:'Poppins',sans-serif; font-size: 1.3rem; font-weight: 800; }
.login-header p  { font-size: .82rem; opacity: .8; margin-top: 4px; }
.login-body { padding: 30px 32px; }

/* ══════════════════════════════════════════════════════
   FOOTER  — matches index.html bg-gray-800 footer
══════════════════════════════════════════════════════ */
.rci-footer {
  background: var(--gray-800);
  color: var(--gray-400);
  padding: 16px 24px;
  text-align: right;
  font-size: .74rem;
  border-top: 1px solid var(--gray-700);
  margin-top: auto;
}
.rci-footer a { color: #93c5fd; text-decoration: none; }

/* ══════════════════════════════════════════════════════
   DROPDOWN  — matches index.html #1a9fcf dropdown
══════════════════════════════════════════════════════ */
.rci-dropdown {
  background: #1a9fcf;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
  z-index: 9999;
}
.rci-dropdown a, .rci-dropdown-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 18px;
  color: #fff; font-size: .83rem; font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,.1);
  transition: background .15s;
  text-decoration: none;
}
.rci-dropdown a:last-child, .rci-dropdown-item:last-child { border-bottom: none; }
.rci-dropdown a:hover, .rci-dropdown-item:hover { background: rgba(255,255,255,.18); }

/* ══════════════════════════════════════════════════════
   GRID UTILITIES
══════════════════════════════════════════════════════ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.grid-main { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }

/* ══════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .rci-sidebar { width: 64px; min-width: 64px; }
  .rci-sidebar .sb-logo-text,.rci-sidebar .sb-group,
  .rci-sidebar .sb-item span:not(.sb-badge),.rci-sidebar .sb-footer span { display: none; }
  .rci-sidebar .sb-item { justify-content: center; padding: 11px 0; }
  .rci-sidebar .sb-footer { justify-content: center; }
  .rci-main { margin-left: 64px; }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .grid-main { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .grid-2,.grid-3,.grid-4 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .module-grid { grid-template-columns: repeat(2,1fr); }
  .portal-cards { grid-template-columns: 1fr; }
  .rci-content { padding: 16px; }
}
@media print {
  .rci-sidebar,.rci-topbar,.no-print { display: none !important; }
  .rci-main { margin-left: 0 !important; }
  .rci-section { display: block !important; }
  .rci-card { box-shadow: none; }
}
