/* ==========================================================================
   MoobiQ Family - Modern Portal Styles
   ========================================================================== */

:root {
  --primary-blue: #0250bb;
  --primary-blue-dark: #00378b;
  --primary-blue-light: #0d6efd;
  --accent-cyan: #00b4d8;
  --accent-cyan-light: #e0f2fe;
  --accent-teal: #06b6d4;
  --bg-page: #eef3f9;
  --card-bg: #ffffff;
  --text-dark: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --status-active: #10b981;
  --status-pending: #f59e0b;
  --status-danger: #ef4444;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-dark);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Base utilities */
a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Top Header Navigation
   ========================================================================== */
.top-navbar {
  background: linear-gradient(90deg, #0248ad 0%, #035ccf 50%, #0045a8 100%);
  color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(2, 40, 100, 0.25);
}

.top-navbar-container {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 64px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-icon svg {
  width: 100%;
  height: 100%;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
  line-height: 1.1;
}

.brand-subtitle {
  font-size: 13px;
  font-weight: 600;
  color: #38bdf8;
  letter-spacing: 0.2px;
}

/* Nav Menu Items */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-item-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: #e0f2fe;
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

.nav-item-link:hover {
  background-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.nav-item-link.active {
  background-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-weight: 700;
}

.nav-item-link.active::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background-color: #38bdf8;
  border-radius: 2px;
}

.nav-item-link svg {
  width: 16px;
  height: 16px;
  opacity: 0.95;
}

/* Right Nav Controls */
.nav-user-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
}

.btn-icon-badge {
  position: relative;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-icon-badge:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-icon-badge svg {
  width: 18px;
  height: 18px;
}

.notification-count {
  position: absolute;
  top: -2px;
  right: -2px;
  background-color: #ef4444;
  color: white;
  font-size: 10px;
  font-weight: 700;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #035ccf;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 12px 4px 5px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background 0.2s;
}

.user-profile-badge:hover {
  background: rgba(255, 255, 255, 0.16);
}

.user-avatar-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #38bdf8;
}

.user-welcome-text {
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
}

/* Mobile Nav Toggle */
.mobile-menu-toggle {
  display: none;
  background: transparent;
  color: #ffffff;
  padding: 6px;
  font-size: 24px;
}

/* ==========================================================================
   Hero Banner Section
   ========================================================================== */
.hero-wrapper {
  max-width: 1320px;
  margin: 16px auto 20px auto;
  padding: 0 20px;
}

.hero-banner-card {
  position: relative;
  background: linear-gradient(135deg, #0143a3 0%, #0260db 45%, #0284c7 80%, #06b6d4 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 0.8fr;
  align-items: stretch;
  min-height: 220px;
  box-shadow: 0 10px 25px -5px rgba(2, 69, 168, 0.25);
}

/* Left Hero Content */
.hero-text-block {
  padding: 28px 24px 28px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 2;
  color: #ffffff;
}

.hero-tag {
  font-size: 13.5px;
  font-weight: 600;
  color: #e0f2fe;
  margin-bottom: 6px;
  display: inline-block;
  opacity: 0.95;
}

.hero-title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.hero-title span {
  display: block;
}

.hero-description {
  font-size: 13.5px;
  color: #f0f9ff;
  line-height: 1.45;
  margin-bottom: 18px;
  max-width: 380px;
  opacity: 0.92;
}

.btn-hero-cta {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #0284c7;
  color: #ffffff;
  padding: 9px 22px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.25s ease;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-hero-cta:hover {
  background-color: #0369a1;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

/* Center Family Image in Hero */
.hero-image-block {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: visible;
}

.hero-family-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  transform: scale(1.02);
}

/* Painted Brush Stroke Badge */
.hero-brush-badge {
  position: absolute;
  top: 18px;
  right: -25px;
  z-index: 5;
  background: #ffffff;
  color: #0250bb;
  padding: 10px 18px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  transform: rotate(-2deg);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.25;
  text-align: center;
  border: 2px dashed #93c5fd;
  white-space: nowrap;
}

.hero-brush-badge span {
  display: block;
}

/* Right Logo Mission Card */
.hero-mission-card {
  background: #ffffff;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 3;
}

.hero-mission-card .mission-logo {
  width: 68px;
  height: auto;
  margin-bottom: 10px;
}

.hero-mission-card h3 {
  font-size: 22px;
  font-weight: 800;
  color: #00378b;
  margin-bottom: 2px;
  line-height: 1.1;
}

.hero-mission-card h4 {
  font-size: 15px;
  font-weight: 700;
  color: #0284c7;
  margin-bottom: 8px;
}

.hero-mission-card p {
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  line-height: 1.35;
  max-width: 200px;
}

/* ==========================================================================
   Main 3-Column Portal Layout
   ========================================================================== */
.portal-container {
  max-width: 1320px;
  margin: 0 auto 30px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 210px 1fr 270px;
  gap: 20px;
  align-items: start;
}

/* Left Sidebar */
.portal-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-nav-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 10px;
  border: 1px solid var(--border-color);
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #475569;
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  background: transparent;
  transition: all 0.2s ease;
}

.sidebar-btn:hover {
  background-color: #f1f5f9;
  color: var(--primary-blue);
}

.sidebar-btn.active {
  background: linear-gradient(90deg, #0070eb 0%, #0056b3 100%);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 112, 235, 0.3);
}

.sidebar-btn svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.sidebar-promo-card {
  background: linear-gradient(135deg, #0260db 0%, #0284c7 100%);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 18px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(2, 96, 219, 0.25);
}

.promo-icon-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.promo-icon-circle svg {
  width: 22px;
  height: 22px;
}

.sidebar-promo-card h5 {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

/* ==========================================================================
   Center Dashboard Column
   ========================================================================== */
.portal-main-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* User Greeting Card */
.greeting-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.greeting-profile-side {
  display: flex;
  align-items: center;
  gap: 14px;
}

.greeting-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #0250bb;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.greeting-avatar svg {
  width: 28px;
  height: 28px;
}

.greeting-text h2 {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}

.greeting-text p {
  font-size: 13px;
  color: #64748b;
}

.greeting-badges {
  display: flex;
  align-items: center;
  gap: 20px;
}

.date-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #475569;
  background: #f8fafc;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid #e2e8f0;
}

.date-badge svg {
  color: #0284c7;
  width: 16px;
  height: 16px;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #475569;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--status-active);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.status-badge strong {
  color: var(--status-active);
  font-weight: 700;
}

/* Dashboard Sections */
.dashboard-section {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

.section-title svg {
  color: #0284c7;
  width: 18px;
  height: 18px;
}

.section-link {
  font-size: 12.5px;
  font-weight: 600;
  color: #0070eb;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.section-link:hover {
  color: #0047ba;
  text-decoration: underline;
}

/* 1. Family Overview Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.stat-card {
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 18px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #ffffff;
  transition: all 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #93c5fd;
}

.stat-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f0f7ff;
  color: #0070eb;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.stat-icon-wrapper svg {
  width: 22px;
  height: 22px;
}

.stat-value {
  font-size: 19px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

/* 2. Your Benefits 2x2 Grid */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.benefit-item-card {
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s;
  cursor: pointer;
}

.benefit-item-card:hover {
  background: #f8fbff;
  border-color: #93c5fd;
}

.benefit-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.benefit-icon.basket {
  background: #fef3c7;
  color: #d97706;
}

.benefit-icon.shield {
  background: #e0f2fe;
  color: #0284c7;
}

.benefit-icon.health {
  background: #e0f2fe;
  color: #0070eb;
}

.benefit-icon.edu {
  background: #e0f2fe;
  color: #0284c7;
}

.benefit-icon svg {
  width: 22px;
  height: 22px;
}

.benefit-info h4 {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
}

.benefit-info p {
  font-size: 11.5px;
  color: #64748b;
}

/* 3. Featured Services Grid */
.featured-services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.service-card {
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.2s;
  background: #ffffff;
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #93c5fd;
}

.service-card-thumb {
  height: 80px;
  position: relative;
  overflow: hidden;
  background: #f1f5f9;
}

.service-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-card-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.service-card-body h4 {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 3px;
  line-height: 1.25;
}

.service-card-body p {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 10px;
  flex-grow: 1;
}

.btn-service-action {
  width: 100%;
  background: #0070eb;
  color: #ffffff;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: background 0.2s;
}

.btn-service-action:hover {
  background: #0056b3;
}

/* ==========================================================================
   Right Column (Profile, Actions, Recent Activity)
   ========================================================================== */
.portal-right-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Family Profile Card */
.family-profile-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.family-thumb-wrapper {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 3px solid #38bdf8;
  overflow: hidden;
  margin-bottom: 8px;
}

.family-thumb-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.family-profile-card h3 {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

.family-id-badge {
  font-size: 11.5px;
  color: #64748b;
  margin-bottom: 12px;
  font-weight: 500;
}

.btn-manage-family {
  width: 100%;
  background: #0070eb;
  color: #ffffff;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-manage-family:hover {
  background: #0056b3;
}

/* Quick Actions Card */
.quick-actions-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.quick-actions-card h4 {
  font-size: 14.5px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 12px;
}

.action-items-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  transition: all 0.2s;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
}

.action-row:hover {
  background: #f0f7ff;
  border-color: #bae6fd;
  color: #0070eb;
  transform: translateX(2px);
}

.action-row-left {
  display: flex;
  align-items: center;
  gap: 9px;
}

.action-row svg.action-icon {
  width: 16px;
  height: 16px;
  color: #0070eb;
  flex-shrink: 0;
}

.action-chevron {
  color: #94a3b8;
  font-size: 12px;
}

/* Recent Activity Card */
.recent-activity-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.activity-icon-bubble {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #0070eb;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.activity-icon-bubble svg {
  width: 15px;
  height: 15px;
}

.activity-content h5 {
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.3;
}

.activity-meta {
  font-size: 11px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.activity-meta .amount {
  font-weight: 700;
  color: #0f172a;
}

.activity-meta .status-badge-inline {
  background: #dcfce7;
  color: #15803d;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.main-footer {
  background: linear-gradient(90deg, #0243a3 0%, #0352be 100%);
  color: #ffffff;
  padding: 24px 20px;
  font-size: 12.5px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-container {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 320px;
}

.footer-brand-text h4 {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
}

.footer-brand-text p {
  font-size: 11px;
  color: #bae6fd;
}

/* Core Values Bar */
.footer-values-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.val-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #e0f2fe;
  font-size: 10.5px;
  font-weight: 600;
}

.val-item svg {
  width: 16px;
  height: 16px;
  color: #7dd3fc;
}

/* Social & Contact */
.footer-right-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.social-links a {
  color: #ffffff;
  font-size: 14px;
  opacity: 0.85;
  transition: all 0.2s;
}

.social-links a:hover {
  opacity: 1;
  color: #38bdf8;
  transform: translateY(-2px);
}

.footer-address {
  font-size: 11px;
  color: #e0f2fe;
  text-align: right;
  line-height: 1.35;
}

.footer-website-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #38bdf8;
  font-weight: 700;
  font-size: 11.5px;
}

/* ==========================================================================
   Modals & Popovers
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

.modal-dialog {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
  animation: slideUp 0.25s ease-out;
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

.modal-close-btn {
  background: #f1f5f9;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 18px;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background: #f8fafc;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Form inputs in modal */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid #cbd5e1;
  font-family: inherit;
  font-size: 13.5px;
  color: #1e293b;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: #0070eb;
  box-shadow: 0 0 0 3px rgba(0, 112, 235, 0.15);
}

.btn-secondary {
  background: #f1f5f9;
  color: #475569;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #e2e8f0;
}

.btn-primary {
  background: #0070eb;
  color: #ffffff;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 700;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: #0056b3;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #0f172a;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 600;
  animation: slideInRight 0.3s ease-out;
  border-left: 4px solid #10b981;
}

/* Notifications Dropdown */
.notifications-dropdown {
  position: absolute;
  top: 56px;
  right: 140px;
  width: 320px;
  background: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  z-index: 1500;
  display: none;
  flex-direction: column;
  overflow: hidden;
  color: #1e293b;
}

.notifications-dropdown.active {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

.notif-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
}

.notif-header h4 {
  font-size: 14px;
  font-weight: 800;
}

.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.2s;
  cursor: pointer;
}

.notif-item:hover {
  background: #f0f7ff;
}

.notif-item p {
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
}

.notif-item span {
  font-size: 10.5px;
  color: #94a3b8;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes slideInRight {
  from { transform: translateX(50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1140px) {
  .portal-container {
    grid-template-columns: 200px 1fr;
  }
  .portal-right-column {
    grid-column: span 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
  .hero-banner-card {
    grid-template-columns: 1.2fr 1fr;
  }
  .hero-mission-card {
    display: none;
  }
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
  }
  .portal-container {
    grid-template-columns: 1fr;
  }
  .portal-sidebar {
    display: none;
  }
  .portal-sidebar.mobile-open {
    display: block;
    position: fixed;
    top: 64px;
    left: 0;
    width: 260px;
    height: calc(100vh - 64px);
    background: #ffffff;
    z-index: 1200;
    padding: 16px;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
  }
  .portal-right-column {
    grid-column: span 1;
    grid-template-columns: 1fr;
  }
  .hero-banner-card {
    grid-template-columns: 1fr;
  }
  .hero-image-block {
    height: 200px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .featured-services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-right-block {
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .greeting-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .greeting-badges {
    flex-wrap: wrap;
    gap: 10px;
  }
  .benefits-grid {
    grid-template-columns: 1fr;
  }
  .featured-services-grid {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 24px;
  }
}

