/* =====================================================================
   CampusCare - Global Theme & Styling
   Modern, ultra-polished, responsive aesthetic with rich micro-interactions
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --navy-950: #0b1b34;
  --navy-900: #10254a;
  --navy-800: #163268;
  --navy-700: #1d4188;
  --blue-600: #2f5fd8;
  --blue-500: #3b6fed;
  --blue-400: #608cf5;
  --blue-100: #e8eefc;
  --slate-50:  #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-500: #64748b;
  --slate-700: #334155;
  --slate-900: #0f172a;
  --ink:       #0f172a;
  
  --success: #10b981;
  --warning: #f59e0b;
  --danger:  #ef4444;
  --info:    #3b82f6;

  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --shadow-soft: 0 12px 32px -4px rgba(16, 37, 74, 0.08), 0 4px 12px -2px rgba(16, 37, 74, 0.04);
  --shadow-card: 0 4px 16px -2px rgba(16, 37, 74, 0.05), 0 2px 6px -1px rgba(16, 37, 74, 0.03);
  --shadow-hover: 0 20px 36px -6px rgba(16, 37, 74, 0.12), 0 8px 16px -4px rgba(16, 37, 74, 0.06);
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--slate-50);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--navy-950);
  letter-spacing: -0.025em;
}

a { text-decoration: none; transition: color 0.2s ease; }

/* Custom Scrollbars */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--slate-300); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--slate-500); }

/* ---------- Navbar ---------- */
.cc-navbar {
  background: linear-gradient(135deg, var(--navy-950) 0%, var(--navy-900) 100%);
  box-shadow: var(--shadow-soft);
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.cc-navbar .navbar-brand {
  font-weight: 800;
  font-size: 1.45rem;
  color: #fff !important;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  letter-spacing: -0.03em;
}
.cc-navbar .navbar-brand .brand-badge {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
  width: 38px; height: 38px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 4px 12px rgba(59, 111, 237, 0.4);
}
.cc-navbar .nav-link {
  color: rgba(255,255,255,0.85) !important;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 1rem !important;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}
.cc-navbar .nav-link:hover,
.cc-navbar .nav-link.active {
  color: #fff !important;
  background: rgba(255,255,255,0.08);
}

/* ---------- Buttons ---------- */
.btn-cc-primary {
  background: linear-gradient(135deg, var(--blue-600) 0%, var(--blue-500) 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  padding: 0.65rem 1.4rem;
  box-shadow: 0 4px 14px rgba(47, 95, 216, 0.3);
  transition: all 0.2s ease;
}
.btn-cc-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(47, 95, 216, 0.4);
  color: #fff;
}
.btn-cc-primary:active { transform: translateY(0); }

.btn-cc-outline {
  border: 1.5px solid rgba(255,255,255,0.45);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  padding: 0.6rem 1.3rem;
  background: transparent;
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
}
.btn-cc-outline:hover {
  background: rgba(255,255,255,0.15);
  border-color: #fff;
  color: #fff;
  transform: translateY(-1px);
}

/* ---------- Sidebar Shell ---------- */
.cc-shell { display: flex; min-height: 100vh; }
.cc-sidebar {
  width: 265px;
  background: linear-gradient(180deg, var(--navy-950) 0%, var(--navy-900) 100%);
  color: #cfd9ef;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 1.4rem 1.1rem;
  border-right: 1px solid rgba(255,255,255,0.06);
}
.cc-sidebar .brand {
  color: #fff; font-weight: 800; font-size: 1.3rem;
  padding: 0 0.5rem 1.5rem;
  display: flex; gap: 0.6rem; align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 1.2rem;
}
.cc-sidebar .brand .brand-badge {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
  width: 36px; height: 36px; border-radius: 10px;
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 4px 12px rgba(59, 111, 237, 0.35);
}
.cc-sidebar .side-section-label {
  text-transform: uppercase; font-size: 0.68rem; letter-spacing: 0.1em;
  color: #64748b; padding: 0.9rem 0.7rem 0.4rem; font-weight: 700;
}
.cc-sidebar .nav-link {
  color: #a0aec0;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font-weight: 500;
  font-size: 0.92rem;
  margin-bottom: 3px;
  display: flex; align-items: center; gap: 0.75rem;
  transition: all 0.2s ease;
}
.cc-sidebar .nav-link:hover { background: rgba(255,255,255,0.07); color: #fff; }
.cc-sidebar .nav-link.active {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  color: #fff;
  box-shadow: 0 4px 14px rgba(47,95,216,0.35);
  font-weight: 600;
}
.cc-sidebar .nav-link i { width: 20px; text-align: center; font-size: 1.05rem; }

.cc-main { flex: 1; min-width: 0; background: var(--slate-50); }
.cc-topbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--slate-200);
  padding: 0.9rem 1.8rem;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 20;
}
.cc-content { padding: 1.8rem; }

/* ---------- Cards & Stats ---------- */
.cc-card {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cc-card.glass-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.cc-stat-card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  padding: 1.3rem 1.4rem;
  box-shadow: var(--shadow-card);
  display: flex; align-items: center; gap: 1.1rem;
  transition: transform .2s ease, box-shadow .2s ease;
}
.cc-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.cc-stat-icon {
  width: 54px; height: 54px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: #fff; flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}
.cc-stat-value { font-size: 1.75rem; font-weight: 800; color: var(--navy-950); line-height: 1.1; }
.cc-stat-label { color: var(--slate-500); font-size: 0.86rem; font-weight: 500; }

/* ---------- Tables ---------- */
.cc-table { vertical-align: middle; }
.cc-table thead th {
  background: var(--slate-100);
  color: var(--slate-700);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  border-bottom: none;
  padding: 0.85rem 1rem;
}
.cc-table tbody td { padding: 0.9rem 1rem; border-color: var(--slate-200); }
.cc-table tbody tr { transition: background 0.15s ease; }
.cc-table tbody tr:hover { background: rgba(241, 245, 249, 0.6); }

/* ---------- Badges ---------- */
.badge {
  font-weight: 600;
  padding: 0.45em 0.8em;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

/* ---------- Landing Page ---------- */
.cc-hero {
  background: radial-gradient(circle at 80% 20%, rgba(59, 111, 237, 0.28), transparent 50%),
              radial-gradient(circle at 20% 80%, rgba(47, 95, 216, 0.3), transparent 50%),
              linear-gradient(160deg, var(--navy-950) 0%, var(--navy-900) 60%, var(--navy-800) 100%);
  color: #fff;
  padding: 7rem 0 6rem;
  position: relative;
  overflow: hidden;
}
.cc-hero .eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  padding: 0.4rem 1rem; border-radius: 999px; font-size: 0.84rem; font-weight: 600;
  color: #cfe0ff; margin-bottom: 1.4rem;
  backdrop-filter: blur(8px);
}
.cc-hero h1 { font-size: 3.3rem; color: #fff; line-height: 1.12; font-weight: 800; }
.cc-hero p.lead { color: #c6d3ee; font-size: 1.18rem; max-width: 580px; }

.section-label {
  text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; font-weight: 800;
  color: var(--blue-600);
}

.feature-card {
  background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--slate-200);
  padding: 2rem; height: 100%; box-shadow: var(--shadow-card);
  transition: transform .2s ease, box-shadow .2s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.feature-icon {
  width: 52px; height: 52px; border-radius: 14px; background: var(--blue-100);
  color: var(--blue-600); display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
  margin-bottom: 1.2rem;
}

.step-item { display: flex; gap: 1.1rem; }
.step-num {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-950), var(--blue-600)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(16, 37, 74, 0.2);
}

.category-pill {
  background: #fff; border: 1px solid var(--slate-200); border-radius: 999px;
  padding: 0.6rem 1.2rem; font-weight: 600; font-size: 0.92rem; color: var(--navy-900);
  display: inline-flex; align-items: center; gap: 0.6rem; box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  transition: all 0.2s ease;
}
.category-pill:hover {
  background: var(--blue-600); color: #fff; border-color: var(--blue-600);
  transform: translateY(-2px); box-shadow: 0 6px 16px rgba(47,95,216,0.3);
}

.cc-footer { background: var(--navy-950); color: #9fb0d6; padding: 4rem 0 2rem; border-top: 1px solid rgba(255,255,255,0.08); }
.cc-footer h6 { color: #fff; font-weight: 700; }
.cc-footer a { color: #9fb0d6; }
.cc-footer a:hover { color: #fff; }

/* ---------- Auth Pages ---------- */
.auth-shell { min-height: 100vh; display: flex; background: var(--slate-50); }
.auth-visual {
  flex: 1;
  background: linear-gradient(160deg, var(--navy-950) 0%, var(--navy-900) 50%, var(--navy-800) 100%);
  color: #fff; display: flex; flex-direction: column; justify-content: center;
  padding: 4.5rem; position: relative; overflow: hidden;
}
.auth-form-side { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2.5rem; }
.auth-card { width: 100%; max-width: 450px; }
.form-control, .form-select {
  border-radius: var(--radius-sm);
  border-color: var(--slate-200);
  padding: 0.65rem 0.95rem;
  font-size: 0.93rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59,111,237,0.18);
}
.form-label { font-weight: 600; font-size: 0.88rem; color: var(--slate-700); }

/* ---------- Timeline ---------- */
.cc-timeline { list-style: none; padding-left: 0; margin: 0; }
.cc-timeline li {
  position: relative; padding-left: 2.3rem; padding-bottom: 1.8rem; border-left: 2px solid var(--slate-200); margin-left: 12px;
}
.cc-timeline li:last-child { border-color: transparent; padding-bottom: 0; }
.cc-timeline .dot {
  position: absolute; left: -11px; top: 0; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: 3px solid var(--blue-500); display:flex; align-items:center; justify-content:center;
}
.cc-timeline li.done .dot { background: var(--success); border-color: var(--success); }
.cc-timeline li.rejected .dot { background: var(--danger); border-color: var(--danger); }
.cc-timeline .tl-title { font-weight: 700; color: var(--navy-950); }
.cc-timeline .tl-meta { font-size: 0.8rem; color: var(--slate-500); }

/* ---------- AI Assistant Widget ---------- */
.cc-ai-fab {
  position: fixed; bottom: 28px; right: 28px; z-index: 1050;
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-600), var(--navy-700));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem; border: none; box-shadow: 0 12px 30px rgba(16,37,74,0.35);
  cursor: pointer; transition: transform .2s ease, box-shadow .2s ease;
  animation: pulse-ring 3s infinite;
}
.cc-ai-fab:hover { transform: scale(1.08); box-shadow: 0 16px 36px rgba(16,37,74,0.45); }

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(47, 95, 216, 0.4); }
  70% { box-shadow: 0 0 0 15px rgba(47, 95, 216, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 95, 216, 0); }
}

.cc-ai-panel {
  position: fixed; bottom: 105px; right: 28px; width: 375px; max-width: 92vw; height: 520px; max-height: 76vh;
  background: #fff; border-radius: 20px; box-shadow: 0 24px 60px rgba(16,37,74,0.28);
  display: none; flex-direction: column; overflow: hidden; z-index: 1050; border: 1px solid var(--slate-200);
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.cc-ai-panel.open { display: flex; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.cc-ai-head {
  background: linear-gradient(135deg, var(--navy-950), var(--navy-800)); color: #fff;
  padding: 1rem 1.2rem; display: flex; align-items: center; justify-content: space-between;
}
.cc-ai-body { flex: 1; overflow-y: auto; padding: 1.1rem; background: var(--slate-50); }
.cc-ai-msg { max-width: 86%; padding: 0.65rem 0.95rem; border-radius: 15px; margin-bottom: 0.7rem; font-size: 0.9rem; line-height: 1.45; }
.cc-ai-msg.bot { background: #fff; border: 1px solid var(--slate-200); border-bottom-left-radius: 4px; box-shadow: 0 2px 6px rgba(0,0,0,0.03); }
.cc-ai-msg.user { background: linear-gradient(135deg, var(--blue-600), var(--blue-500)); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.cc-ai-quick { display: flex; flex-wrap: wrap; gap: 0.45rem; padding: 0.5rem 1.1rem 0.8rem; background: #fff; }
.cc-ai-quick button {
  font-size: 0.78rem; border: 1px solid var(--slate-200); background: var(--slate-50); border-radius: 999px;
  padding: 0.35rem 0.75rem; color: var(--navy-900); font-weight: 600; transition: all 0.15s ease;
}
.cc-ai-quick button:hover { background: var(--blue-100); border-color: var(--blue-500); color: var(--blue-600); }
.cc-ai-input { border-top: 1px solid var(--slate-200); padding: 0.75rem; display: flex; gap: 0.5rem; background: #fff; }
.cc-ai-input input { flex: 1; border: 1px solid var(--slate-200); border-radius: 999px; padding: 0.55rem 1.1rem; font-size: 0.9rem; }
.cc-ai-input input:focus { outline: none; border-color: var(--blue-500); }
.cc-ai-input button { background: var(--blue-600); color: #fff; border: none; width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; transition: transform 0.15s ease; }
.cc-ai-input button:hover { transform: scale(1.06); }

/* ---------- Responsiveness ---------- */
@media (max-width: 991px) {
  .cc-sidebar { position: fixed; left: -285px; transition: left .25s ease; z-index: 1040; }
  .cc-sidebar.open { left: 0; }
  .cc-hero h1 { font-size: 2.4rem; }
  .auth-visual { display: none; }
}
