/* ==========================================================================
   Portal & Dashboard Styles - Pragyan Institute Lalganj
   Theme Accent: #064E3B (Deep Emerald Green)
   ========================================================================== */

/* Utility Emerald Classes */
.btn-emerald {
  background-color: var(--primary-emerald);
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(6, 78, 59, 0.25);
  transition: all var(--transition-fast);
}

.btn-emerald:hover {
  background-color: var(--primary-emerald-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-emerald-glow);
}

/* Sparkling Animation for /hg Highlighted Messages */
@keyframes sparkleGlow {
  0% { box-shadow: 0 0 4px rgba(245, 158, 11, 0.4), 0 0 10px rgba(245, 158, 11, 0.2); }
  50% { box-shadow: 0 0 12px rgba(245, 158, 11, 0.8), 0 0 22px rgba(251, 191, 36, 0.6); }
  100% { box-shadow: 0 0 4px rgba(245, 158, 11, 0.4), 0 0 10px rgba(245, 158, 11, 0.2); }
}

@keyframes sparkleShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes floatSparkle {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.8; }
  50% { transform: translateY(-3px) scale(1.25); opacity: 1; }
}

.hg-sparkle-card {
  animation: sparkleGlow 2.5s infinite ease-in-out;
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 50%, #FDE68A 100%) !important;
  border: 1.5px solid #F59E0B !important;
  position: relative;
  overflow: hidden;
}

.hg-sparkle-card::before {
  content: '';
  position: absolute;
  top: 0; left: -150%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transform: skewX(-20deg);
  animation: sparkleShimmer 3s infinite;
}

.hg-sparkle-icon {
  display: inline-block;
  animation: floatSparkle 1.8s infinite ease-in-out;
  color: #D97706;
}

/* Floating Portal Shortcut Button */
.floating-portal-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 995;
  background: linear-gradient(135deg, #064E3B 0%, #04382B 100%);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius-full);
  box-shadow: 0 8px 25px rgba(6, 78, 59, 0.4);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.25);
  transition: all var(--transition-fast);
}

.floating-portal-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 30px rgba(6, 78, 59, 0.5);
  background: linear-gradient(135deg, #04382B 0%, #02241b 100%);
}

@media (max-width: 600px) {
  .floating-portal-btn {
    bottom: 1rem;
    right: 1rem;
    font-size: 0.8rem;
    padding: 0.55rem 0.95rem;
  }
}

.pill-emerald {
  background-color: var(--primary-emerald-light);
  color: var(--primary-emerald);
  border: 1px solid rgba(6, 78, 59, 0.25);
}

.bg-emerald-gradient {
  background: linear-gradient(135deg, #064E3B 0%, #0a6c52 100%);
}

/* --------------------------------------------------------------------------
 * 1. Portal Modal Overlay Container
 * -------------------------------------------------------------------------- */
.portal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9990;
  background-color: rgba(18, 14, 12, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: calc(1rem + env(safe-area-inset-top)) calc(1rem + env(safe-area-inset-right)) calc(1rem + env(safe-area-inset-bottom)) calc(1rem + env(safe-area-inset-left));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
  overflow-y: auto;
}

.portal-overlay.active {
  opacity: 1 !important;
  visibility: visible !important;
  display: flex !important;
  pointer-events: auto !important;
}

.portal-modal-card {
  width: 100%;
  max-width: 1050px;
  max-height: 90vh;
  max-height: 90dvh;
  background-color: var(--bg-surface-pure);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(6, 78, 59, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  overscroll-behavior: contain;
  animation: portalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes portalSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.portal-close-btn {
  position: absolute;
  top: calc(0.85rem + env(safe-area-inset-top));
  right: calc(0.85rem + env(safe-area-inset-right));
  width: 44px;
  min-width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: #1F2937;
  border: 1.5px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
  z-index: 100;
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.portal-close-btn:hover {
  background: #DC2626;
  color: #ffffff;
  border-color: #B91C1C;
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.4);
  transform: rotate(90deg) scale(1.08);
}

.portal-close-btn:active {
  transform: scale(0.92);
}

/* --------------------------------------------------------------------------
 * 2. Login View Component & Global View Controllers
 * -------------------------------------------------------------------------- */
.hidden-view,
#loginViewContainer.hidden-view,
#studentDashboardContainer.hidden-view,
#adminDashboardContainer.hidden-view,
#loginViewContainer[hidden],
#studentDashboardContainer[hidden],
#adminDashboardContainer[hidden],
#loginViewContainer[style*="display: none"],
#studentDashboardContainer[style*="display: none"],
#adminDashboardContainer[style*="display: none"] {
  display: none !important;
}

.login-container-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  min-height: 540px;
}

@media (max-width: 850px) {
  .login-container-wrapper {
    grid-template-columns: 1fr;
  }
  .login-branding-side {
    display: none;
  }
}

.login-branding-side {
  background: linear-gradient(145deg, #064E3B 0%, #04382B 100%);
  color: #ffffff;
  padding: 3.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.login-branding-side::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -20%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.login-brand-header {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.login-brand-header img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.15);
  padding: 6px;
  border-radius: 12px;
}

.login-brand-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
}

.login-brand-subtitle {
  font-size: 0.85rem;
  opacity: 0.8;
  color: #e2e8f0;
}

.login-hero-body h2 {
  font-size: 1.85rem;
  color: #ffffff;
  margin-bottom: 1rem;
  line-height: 1.25;
}

.login-hero-body p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  line-height: 1.6;
}

.login-features-list {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.login-feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.9);
}

.login-feature-item i {
  color: #6EE7B7; /* Mint emerald */
}

.login-brand-footer {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 1rem;
}

/* Form Side */
.login-form-side {
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: var(--bg-surface-pure);
}

.role-switcher-tabs {
  display: flex;
  background-color: var(--bg-warm-cream);
  padding: 0.35rem;
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
  border: 1px solid var(--border-sand);
}

.role-tab-btn {
  flex: 1;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
}

.role-tab-btn.active {
  background-color: var(--primary-emerald);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(6, 78, 59, 0.2);
}

.login-header-group {
  margin-bottom: 1.75rem;
}

.login-header-group h3 {
  font-size: 1.45rem;
  color: var(--text-mahogany);
  margin-bottom: 0.35rem;
}

.login-header-group p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.form-group-portal {
  margin-bottom: 1.25rem;
}

.form-group-portal label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-charcoal);
  margin-bottom: 0.45rem;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-with-icon > i.input-icon-left,
.input-with-icon > i:first-child {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-emerald);
  font-size: 1rem;
  pointer-events: none;
  z-index: 2;
}

.portal-input {
  width: 100%;
  height: 46px;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-sand);
  background-color: var(--bg-surface-cream);
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text-charcoal);
  transition: all var(--transition-fast);
  text-align: left;
  box-sizing: border-box;
}

.input-with-icon .portal-input {
  padding-left: 2.75rem;
  padding-right: 2.75rem;
}

.portal-input:focus {
  border-color: var(--primary-emerald);
  background-color: #ffffff;
  box-shadow: 0 0 0 4px var(--primary-emerald-light);
  outline: none;
}

.toggle-password-btn {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  z-index: 3;
  border-radius: 6px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.toggle-password-btn:hover {
  color: var(--primary-emerald);
  background-color: rgba(6, 78, 59, 0.06);
}

.toggle-password-btn i {
  position: static !important;
  transform: none !important;
  font-size: 1rem !important;
  color: inherit !important;
}

.credential-hint-box {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: #065F46;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  border-radius: 6px;
  padding: 0.45rem 0.65rem;
  margin-top: 0.45rem;
  line-height: 1.4;
}

.credential-hint-box i {
  color: #059669;
  font-size: 0.85rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.credential-hint-box code {
  background: #D1FAE5;
  color: #047857;
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 700;
  font-family: monospace;
}

.demo-credentials-container {
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.875rem;
  background-color: var(--primary-emerald-lighter);
  border: 1px dashed rgba(6, 78, 59, 0.3);
  border-radius: var(--radius-md);
}

.demo-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-emerald);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.demo-pills-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.demo-chip-btn {
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  background-color: #ffffff;
  border: 1px solid var(--border-sand);
  font-size: 0.8rem;
  color: var(--primary-emerald);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.demo-chip-btn:hover {
  border-color: var(--primary-emerald);
  background-color: var(--primary-emerald);
  color: #ffffff;
}

.login-submit-btn {
  width: 100%;
  padding: 0.9rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
}

.login-error-msg {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background-color: #FEE2E2;
  border: 1px solid #FCA5A5;
  color: #991B1B;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  display: none;
}

/* --------------------------------------------------------------------------
 * 3. Shared Dashboard Banner & Tab System
 * -------------------------------------------------------------------------- */
.dashboard-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: var(--bg-surface-cream);
  overflow-y: auto;
}

.dashboard-header-bar {
  background: linear-gradient(135deg, #064E3B 0%, #04382B 100%);
  color: #ffffff;
  padding: 1.75rem 2.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  box-shadow: 0 4px 20px rgba(6, 78, 59, 0.2);
}

.dashboard-user-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.user-avatar-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #ffffff;
  color: var(--primary-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
  border: 3px solid rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-sm);
}

.user-text-details h2 {
  color: #ffffff;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.user-subline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  flex-wrap: wrap;
}

.user-badge-tag {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.dashboard-header-actions {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

/* The badge sits on the dark dashboard header gradient. The state class is the
   single source of truth for the pill's colour — js/supabase-sync.js sets it —
   so the announced text and the visual state cannot disagree. This rule used to
   be declared twice in this file (a green treatment here and a neutral white one
   further down), which left a green glow around a neutral pill. */
.cloud-sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #D1FAE5;
  padding: 0.35rem 0.85rem;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
  backdrop-filter: blur(8px);
}

.cloud-sync-badge.syncing {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.5);
  color: #FEF3C7;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

.cloud-sync-badge.offline {
  background: rgba(107, 114, 128, 0.28);
  border-color: rgba(156, 163, 175, 0.5);
  color: #F3F4F6;
  box-shadow: none;
}

.cloud-sync-badge i {
  font-size: 0.85rem;
}

.btn-logout {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.btn-logout:hover {
  background: #EF4444;
  border-color: #EF4444;
  color: #ffffff;
}

/* Dashboard Nav Tabs */
.dashboard-nav-tabs {
  background-color: #ffffff;
  padding: 0 2.25rem;
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-sand);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  flex-shrink: 0;
  min-height: 52px;
  position: relative;
  z-index: 10;
  box-sizing: border-box;
}

.dash-tab-btn {
  padding: 1.1rem 1.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  white-space: nowrap;
  transition: color 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
              background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.2s ease;
  flex-shrink: 0;
  cursor: pointer;
  background: transparent;
  border-top: none;
  border-left: none;
  border-right: none;
  will-change: transform;
}

.dash-tab-btn i {
  font-size: 1.05rem;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease;
}

.dash-tab-btn:hover {
  color: var(--primary-emerald);
  background-color: rgba(6, 78, 59, 0.05);
  transform: translateY(-1px);
}

.dash-tab-btn:active {
  transform: scale(0.97);
}

.dash-tab-btn.active {
  color: var(--primary-emerald);
  border-bottom-color: var(--primary-emerald);
  background-color: var(--primary-emerald-lighter);
  font-weight: 700;
  transform: translateY(-1px);
}

.dash-tab-btn.active i {
  transform: scale(1.1);
}

.tab-badge {
  background-color: var(--primary-emerald);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Tab Content Areas */
.dashboard-content-body {
  padding: 2rem 2.25rem;
  flex: 1 1 auto;
  min-height: 0;
}

.tab-pane,
.admin-tab-pane,
.student-tab-pane {
  display: none;
}

.tab-pane.active,
.admin-tab-pane.active,
.student-tab-pane.active {
  display: block !important;
  animation: tabPaneSmoothFadeSlide 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: opacity, transform;
}

.tab-pane:not(.active),
.tab-pane[hidden],
.admin-tab-pane:not(.active),
.admin-tab-pane[hidden],
.student-tab-pane:not(.active),
.student-tab-pane[hidden] {
  display: none !important;
}

@keyframes tabPaneSmoothFadeSlide {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* --------------------------------------------------------------------------
 * 4. Student Profile: Their Details Tab
 * -------------------------------------------------------------------------- */
.profile-grid-layout {
  display: grid;
  grid-template-columns: minmax(0, 720px) minmax(0, 380px);
  gap: 1.75rem;
  max-width: 1200px;
}

@media (max-width: 850px) {
  .profile-grid-layout {
    grid-template-columns: 1fr;
  }
}

.dash-card {
  background-color: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-sand);
  box-shadow: var(--shadow-sm);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}

.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--border-sand);
}

.dash-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-mahogany);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.dash-card-title i {
  color: var(--primary-emerald);
}

.detail-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.detail-box {
  background-color: var(--bg-surface-cream);
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(221, 213, 205, 0.6);
}

.detail-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.detail-val {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-charcoal);
}

/* ==========================================================================
   3D Metallic VIP Student ID Card (Royal Obsidian & 24K Gold Glassmorphic Sheen)
   ========================================================================== */
.metallic-card-3d-container {
  perspective: 1200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0.75rem auto 2.25rem auto;
  width: 100%;
  max-width: 460px;
  position: relative;
  overflow: visible;
}

.card-flip-hint {
  position: relative;
  z-index: 2;
  font-size: 0.82rem;
  font-weight: 700;
  color: #064E3B;
  background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
  padding: 0.45rem 1.15rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 12px rgba(6, 78, 59, 0.12), inset 0 1px 1px #ffffff;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(16, 185, 129, 0.35);
  user-select: none;
}

.card-flip-hint:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 18px rgba(6, 78, 59, 0.25);
}

.metallic-card-3d {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 450px;
  height: 420px;
  min-height: 420px;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
  cursor: pointer;
  border-radius: 20px;
  box-sizing: border-box;
  user-select: none;
}

.metallic-card-3d.is-flipped {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  padding: 1.05rem 1.35rem 1.15rem 1.35rem;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: #022C22;
  background: linear-gradient(
    145deg,
    #064E3B 0%,
    #022C22 52%,
    #011711 100%
  );
  box-shadow:
    0 18px 40px -8px rgba(0, 0, 0, 0.65),
    0 0 20px rgba(6, 78, 59, 0.35),
    inset 0 1px 2px rgba(255, 255, 255, 0.3),
    inset 0 -1px 3px rgba(0, 0, 0, 0.7);
  border: 1.5px solid rgba(245, 158, 11, 0.65);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  overflow: hidden;
}

/* FRONT FACE: Deep Imperial Emerald & 24K Gold Accents */
.card-face-front {
  color: #ffffff;
}

/* Circular SVG Radial Meter Styles */
.fee-radial-meter-container {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: linear-gradient(135deg, #FAF9F6 0%, #F3F4F6 100%);
  border: 1px solid var(--border-sand);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.fee-radial-svg-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.fee-radial-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.fee-radial-bg-circle {
  fill: none;
  stroke: #E5E7EB;
  stroke-width: 8;
}

.fee-radial-progress-circle {
  fill: none;
  stroke: #10B981;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.34, 1.45, 0.64, 1);
  filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.45));
}

.fee-radial-progress-circle.has-dues {
  stroke: #F59E0B;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.45));
}

.fee-radial-text-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary-emerald);
}

.fee-radial-text-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.fee-radial-info {
  flex: 1;
}

.fee-radial-info h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-mahogany);
  margin-bottom: 0.2rem;
}

.fee-radial-info p {
  font-size: 0.82rem;
  color: var(--text-charcoal);
  margin: 0;
}

/* Interactive Dynamic Specular Glare Layer */
.metallic-card-glimmer {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 6;
}

/* Smooth Modal Spring Transitions */
.inner-modal-backdrop.active {
  animation: modalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.inner-modal-content {
  animation: modalScaleUp 0.35s cubic-bezier(0.34, 1.45, 0.64, 1) both;
}

@keyframes modalFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes modalScaleUp {
  0% { opacity: 0; transform: scale(0.92) translate3d(0, 10px, 0); }
  100% { opacity: 1; transform: scale(1) translate3d(0, 0, 0); }
}

.card-face-front::before,
.card-face-back::before {
  content: '';
  position: absolute;
  top: -60%;
  left: -160%;
  width: 80%;
  height: 220%;
  background: linear-gradient(
    65deg,
    transparent 40%,
    rgba(255, 255, 255, 0.08) 50%,
    transparent 60%
  );
  transform: rotate(28deg);
  animation: metallicGoldSweep 6s infinite linear;
  pointer-events: none;
  z-index: 1;
}

@keyframes metallicGoldSweep {
  0% { left: -160%; }
  30% { left: 160%; }
  100% { left: 160%; }
}

@keyframes goldGlowPulse {
  0%, 100% {
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
    border-color: rgba(251, 191, 36, 0.7);
  }
  50% {
    box-shadow: 0 0 18px rgba(245, 158, 11, 0.95);
    border-color: rgba(255, 230, 0, 1);
  }
}

/* BACK FACE: Midnight Frosted Security Ledger */
.card-face-back {
  background: #022C22;
  background: linear-gradient(
    140deg,
    #03362A 0%,
    #022C22 55%,
    #011B14 100%
  );
  color: #ffffff;
  transform: rotateY(180deg);
}

/* Card Header */
.metallic-id-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(251, 191, 36, 0.25);
  padding-bottom: 0.35rem;
  margin-bottom: 0.15rem;
}

.metallic-id-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.metallic-id-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.45));
}

.metallic-id-inst-name {
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #FCD34D;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}

.metallic-id-inst-sub {
  font-size: 0.8rem;
  color: #E5E7EB;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.metallic-vip-crest,
.metallic-hologram-seal {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.28) 0%, rgba(217, 119, 6, 0.45) 100%);
  color: #FDE68A;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(251, 191, 36, 0.75);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  animation: goldGlowPulse 3s infinite ease-in-out;
}

/* Card Body Layout */
.metallic-id-body {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  margin-block: 0.15rem;
}

.metallic-avatar-upload-wrap {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.avatar-photo-label {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  border: 2px solid rgba(251, 191, 36, 0.85);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35), 0 0 10px rgba(245, 158, 11, 0.3);
}

.student-id-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.id-avatar-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-verified-mini-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #10B981;
  color: #ffffff;
  font-size: 8.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #ffffff;
  position: absolute;
  bottom: -2px;
  right: -2px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.4);
  z-index: 2;
}

.metallic-id-info {
  flex: 1;
  min-width: 0;
}

.metallic-emv-chip-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.15rem;
}

.metallic-emv-chip {
  width: 28px;
  height: 20px;
  border-radius: 4px;
  background: linear-gradient(135deg, #FFE082 0%, #FFB300 50%, #FFA000 100%);
  border: 1px solid #FFE082;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.8), 0 2px 4px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  padding: 2px 3px;
}

.chip-line {
  display: block;
  height: 1px;
  background: rgba(180, 83, 9, 0.65);
  width: 100%;
}

.metallic-nfc-wave {
  color: #FDE68A;
  font-size: 0.82rem;
  filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.6));
  transform: rotate(90deg);
}

.metallic-id-info h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.12rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0,0,0,0.85);
}

.metallic-pills-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.metallic-id-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #E5E7EB;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 5px;
}

.metallic-class-tag {
  font-size: 0.8rem;
  color: #6EE7B7;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Details Metric Grid (Clean 2-Column Grid) */
.metallic-id-details-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 0.85rem;
  background: rgba(0, 0, 0, 0.55);
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.82rem;
  box-sizing: border-box;
}

.metallic-id-details-row .detail-cell,
.metallic-id-details-row > div {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  overflow: hidden;
}

.metallic-id-details-row .detail-k,
.metallic-id-details-row span {
  color: #D1D5DB;
  font-weight: 600;
  font-size: 0.76rem;
  flex-shrink: 0;
}

.metallic-id-details-row .detail-v,
.metallic-id-details-row strong {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Dedicated Highlight Status & Session Strip (Zero Overlap Guaranteed) */
.metallic-credential-highlight-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.65);
  padding: 0.45rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
  width: 100%;
}

.metallic-credential-strip-left {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.metallic-credential-strip-right {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  flex-shrink: 0;
}

.metallic-strip-session-val,
.metallic-credential-strip-right strong {
  color: #FDE68A;
  font-weight: 800;
  font-size: 0.88rem;
  white-space: nowrap;
}

.metallic-strip-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #D1D5DB;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  white-space: nowrap;
}

.metallic-credential-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  padding: 0.22rem 0.65rem;
  border-radius: 99px;
  box-sizing: border-box;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.9) 0%, rgba(5, 150, 105, 0.8) 50%, rgba(16, 185, 129, 0.95) 100%);
  color: #ECFDF5;
  border: 1.5px solid rgba(52, 211, 153, 0.95);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.55), inset 0 1px 2px rgba(255, 255, 255, 0.6), inset 0 -1px 2px rgba(0, 0, 0, 0.4);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85), 0 0 8px rgba(110, 231, 183, 0.65);
}

.metallic-credential-pill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  animation: pillGleam 3.5s infinite ease-in-out;
}

.status-pulsing-gem {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34D399;
  box-shadow: 0 0 8px #34D399, 0 0 16px #10B981;
  display: inline-block;
  animation: gemPulse 1.8s infinite ease-in-out;
  border: 1px solid #ffffff;
}

@keyframes gemPulse {
  0%, 100% { transform: scale(1); opacity: 1; filter: drop-shadow(0 0 4px #34D399); }
  50% { transform: scale(1.35); opacity: 0.85; filter: drop-shadow(0 0 10px #10B981); }
}

@keyframes pillGleam {
  0%, 60% { left: -100%; }
  100% { left: 160%; }
}

/* Front Face Inspiring Quote Badge (Responsive Across All Devices) */
.metallic-id-front-quote-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.35rem;
  box-sizing: border-box;
}

.metallic-front-quote-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.45) 0%, rgba(2, 44, 34, 0.75) 100%);
  border: 1px dashed rgba(251, 191, 36, 0.45);
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
  text-align: center;
  box-sizing: border-box;
}

.metallic-quote-icon {
  font-size: 0.68rem;
  color: #FCD34D;
  opacity: 0.85;
  flex-shrink: 0;
}

.metallic-quote-sparkle {
  font-size: 0.65rem;
  color: #6EE7B7;
  flex-shrink: 0;
  animation: goldGlowPulse 2.5s infinite ease-in-out;
}

.metallic-quote-text {
  font-family: var(--font-heading, 'Cinzel', serif);
  font-size: clamp(0.68rem, 2vw, 0.78rem);
  font-weight: 700;
  color: #FEF3C7;
  letter-spacing: 0.02em;
  line-height: 1.3;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  font-style: italic;
}

@media (max-width: 480px) {
  .metallic-front-quote-badge {
    padding: 0.26rem 0.45rem;
    gap: 0.3rem;
  }
  .metallic-quote-text {
    font-size: 0.66rem;
  }
}

/* Card Barcode Footer (Laser Precision & Logical Encoding) */
.metallic-id-barcode-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  background: rgba(0, 0, 0, 0.65);
  padding: 0.45rem 0.95rem;
  border-radius: 10px;
  border: 1px solid rgba(245, 158, 11, 0.45);
  margin-top: auto;
  box-sizing: border-box;
  width: 100%;
}

.logical-barcode-container {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  overflow: hidden;
}

.logical-barcode-svg {
  width: 100%;
  max-width: 100%;
  height: 18px;
  display: block;
}

.logical-barcode-number {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: #D1D5DB;
  letter-spacing: 0.12em;
  margin-top: 2px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.metallic-qr-placeholder {
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #FDE68A;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.28) 0%, rgba(217, 119, 6, 0.45) 100%);
  border: 1px solid rgba(251, 191, 36, 0.75);
  padding: 0.25rem 0.65rem;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* BACK FACE CONTENT: Prominent Quote & Institutional Creed */
.back-card-content {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.84rem;
  flex: 1;
  justify-content: center;
  margin-block: 0.25rem;
  box-sizing: border-box;
}

.back-card-quote-centric {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.65rem;
  flex: 1;
}

/* Inspiring Academic Quote Box on Card Back (Hero Framed) */
.back-quote-box {
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.75) 0%, rgba(2, 44, 34, 0.92) 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.65);
  border-left: 4px solid #F59E0B;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), inset 0 1px 2px rgba(255, 255, 255, 0.15);
  box-sizing: border-box;
}

.quote-header-decor {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.quote-icon-large {
  color: #FCD34D;
  font-size: 1.15rem;
  opacity: 0.95;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.quote-decor-tag {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #FDE68A;
  background: rgba(245, 158, 11, 0.22);
  border: 1px solid rgba(251, 191, 36, 0.5);
  padding: 0.12rem 0.5rem;
  border-radius: 99px;
  text-transform: uppercase;
}

.quote-text,
.quote-text-hero {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-style: italic;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #FEF3C7;
  margin: 0;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
  display: block;
}

.quote-author,
.quote-author-hero {
  font-size: 0.74rem;
  font-weight: 700;
  color: #6EE7B7;
  margin-top: 0.45rem;
  text-align: right;
  letter-spacing: 0.02em;
}

.quote-author-hero strong {
  color: #FCD34D;
}

.back-creed-strip {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.74rem;
  color: #E2E8F0;
  box-sizing: border-box;
}

.creed-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  line-height: 1.35;
}

.creed-star {
  color: #FBBF24;
  font-size: 0.7rem;
  flex-shrink: 0;
}

.creed-check {
  color: #34D399;
  font-size: 0.74rem;
  flex-shrink: 0;
}

.creed-notice {
  font-size: 0.7rem;
  color: #94A3B8;
}

/* BACK FACE FOOTER (Signatories & Verified Campus Location) */
.back-card-footer {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  border-top: 1px dashed rgba(245, 158, 11, 0.55);
  padding-top: 0.55rem;
  margin-top: auto;
  box-sizing: border-box;
}

.back-signatories-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
}

.back-sign-block {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.back-sign-title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #FDE68A;
  text-transform: uppercase;
  margin-bottom: 2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.signature-script {
  font-family: 'Brush Script MT', 'Dancing Script', 'Segoe Script', cursive, sans-serif;
  font-size: 1.25rem;
  color: #FDE68A;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.75);
  line-height: 1.2;
  white-space: nowrap;
}

.back-seal-center {
  color: #F59E0B;
  font-size: 1.35rem;
  opacity: 0.95;
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.6));
}

.back-contact-help {
  color: rgba(229, 231, 235, 0.95);
  font-size: 0.76rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  line-height: 1.35;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.back-contact-help i {
  color: #FCD34D;
  flex-shrink: 0;
}

.id-photo {
  width: 70px;
  height: 70px;
  border-radius: 12px;
  background-color: #fff;
  color: var(--primary-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.id-meta h4 {
  color: #fff;
  font-size: 1.15rem;
}

.id-meta p {
  color: #A7F3D0;
  font-size: 0.82rem;
  font-weight: 600;
}

.id-bar-code {
  height: 32px;
  background: repeating-linear-gradient(90deg, #fff 0px, #fff 3px, transparent 3px, transparent 7px);
  opacity: 0.85;
  border-radius: 4px;
  margin-top: 1rem;
}

/* --------------------------------------------------------------------------
 * 5. Student Profile: Batch Detail Tab
 * -------------------------------------------------------------------------- */
.batch-overview-card {
  border-left: 5px solid var(--primary-emerald);
}

.batch-info-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.batch-title-tag {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-mahogany);
}

.syllabus-progress-wrapper {
  margin-top: 1.5rem;
  background: var(--bg-surface-cream);
  padding: 1.25rem;
  border-radius: var(--radius-sm);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.progress-track {
  height: 10px;
  background-color: var(--border-sand);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #064E3B 0%, #10B981 100%);
  border-radius: var(--radius-full);
  transition: width 1s ease-in-out;
}

/* --------------------------------------------------------------------------
 * 5. Student Profile: Batch & Daily Class Timetable
 * -------------------------------------------------------------------------- */
.profile-grid-layout {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 1.25rem;
  align-items: start;
}

.batch-overview-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-top: 1rem;
}

.batch-metric-box {
  background: var(--bg-surface-cream, #FAF9F6);
  border: 1px solid var(--border-sand, #E2E8F0);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  min-width: 0;
}

.batch-metric-label {
  font-size: 0.75rem;
  color: var(--text-muted, #64748B);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.batch-metric-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-mahogany, #1E293B);
  margin-top: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.batch-metric-value.fee-val {
  color: var(--primary-emerald, #064E3B);
}

.schedule-day-tabs {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.25rem 0.15rem 0.5rem 0.15rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.schedule-day-tabs::-webkit-scrollbar {
  display: none;
}

.btn-day-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 99px;
  border: 1.5px solid var(--border-sand, #E2E8F0);
  background: #ffffff;
  color: var(--text-mahogany, #1E293B);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
  position: relative;
}

.btn-day-tab:hover {
  border-color: var(--primary-emerald, #064E3B);
  color: var(--primary-emerald, #064E3B);
  transform: translateY(-1px);
}

.btn-day-tab.active {
  background: linear-gradient(135deg, #064E3B 0%, #047857 100%);
  color: #ffffff;
  border-color: #047857;
  box-shadow: 0 4px 12px rgba(6, 78, 59, 0.25);
}

.today-indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #F59E0B;
  display: inline-block;
  box-shadow: 0 0 6px #F59E0B;
}

.btn-day-tab.active .today-indicator-dot {
  background: #FDE68A;
  box-shadow: 0 0 6px #FDE68A;
}

.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.schedule-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.15rem;
  background: #ffffff;
  border-radius: 12px;
  border: 1.5px solid var(--border-sand, #E2E8F0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
  gap: 0.85rem;
}

.schedule-row:hover {
  border-color: rgba(6, 78, 59, 0.35);
  box-shadow: 0 4px 14px rgba(6, 78, 59, 0.07);
  transform: translateY(-1px);
}

.schedule-row.schedule-row-cancelled {
  background: #FEF2F2;
  border-color: #FECACA;
  border-left: 4px solid #EF4444;
}

.schedule-row-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  flex: 1;
}

.schedule-subject-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--primary-emerald-light, #ECFDF5);
  color: var(--primary-emerald, #064E3B);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  border: 1px solid rgba(6, 78, 59, 0.15);
}

.schedule-subject-icon.icon-cancelled {
  background: #FEE2E2;
  color: #DC2626;
  border-color: rgba(220, 38, 38, 0.2);
}

.schedule-subject-details {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.schedule-subject-title {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--text-mahogany, #1E293B);
  line-height: 1.3;
}

.schedule-subject-title.cancelled-text {
  text-decoration: line-through;
  color: #991B1B;
}

.schedule-subject-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--text-muted, #64748B);
}

.schedule-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.schedule-meta-chip i {
  color: var(--primary-emerald, #064E3B);
}

.schedule-row-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  flex-shrink: 0;
}

.schedule-time {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-emerald, #064E3B);
  background: var(--primary-emerald-light, #ECFDF5);
  padding: 0.25rem 0.65rem;
  border-radius: 99px;
  border: 1px solid rgba(6, 78, 59, 0.15);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.schedule-time.time-cancelled {
  color: #991B1B;
  background: #FEE2E2;
  border-color: rgba(220, 38, 38, 0.2);
}

.schedule-cancelled-pill {
  font-size: 0.72rem;
  font-weight: 800;
  color: #DC2626;
  background: #FEE2E2;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(220, 38, 38, 0.25);
}

/* --------------------------------------------------------------------------
 * 6. Student Profile: Notification Tab
 * -------------------------------------------------------------------------- */
.notifications-filter-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  background-color: #ffffff;
  border: 1px solid var(--border-sand);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-chip.active, .filter-chip:hover {
  background-color: var(--primary-emerald);
  color: #ffffff;
  border-color: var(--primary-emerald);
}

.notifications-stream {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.notice-item-card {
  background-color: #ffffff;
  border: 1px solid var(--border-sand);
  border-left: 4px solid var(--primary-emerald);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  transition: all var(--transition-fast);
  position: relative;
}

.notice-item-card.unread {
  background-color: var(--primary-emerald-lighter);
  border-left-color: #064E3B;
  border-left-width: 6px;
}

.notice-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.notice-cat-badge {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-full);
}

.cat-exam { background-color: #FEF3C7; color: #D97706; }
.cat-general { background-color: var(--primary-emerald-light); color: var(--primary-emerald); }
.cat-fees { background-color: #FEE2E2; color: #DC2626; }

.notice-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.notice-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-mahogany);
  margin-bottom: 0.35rem;
}

.notice-body {
  font-size: 0.9rem;
  color: var(--text-charcoal);
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
 * 7. Student Profile: Fee Tab
 * -------------------------------------------------------------------------- */
/* Fee Notice Banners */
.fee-pending-banner {
  background: #FEF3C7;
  border: 1px solid #F59E0B;
  border-left: 4px solid #D97706;
  border-radius: var(--radius-md);
  padding: 0.9rem 1.15rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.08);
}

.fee-pending-banner-text {
  flex: 1;
  min-width: 0;
}

.fee-pending-banner-title {
  font-weight: 700;
  color: #92400E;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.fee-pending-banner-desc {
  font-size: 0.83rem;
  color: #78350F;
  margin-top: 0.25rem;
  line-height: 1.45;
}

.fee-adjustment-banner {
  background: linear-gradient(135deg, #FAF5FF 0%, #F3E8FF 100%);
  border: 1.5px solid #C4B5FD;
  border-left: 5px solid #7C3AED;
  border-radius: 12px;
  padding: 0.95rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  box-shadow: 0 3px 10px rgba(124, 58, 237, 0.08);
}

.fee-adjustment-banner-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1;
  min-width: 0;
}

.fee-adjustment-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #EDE9FE;
  color: #7C3AED;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.15);
}

.fee-adjustment-title {
  font-weight: 800;
  color: #581C87;
  font-size: 0.95rem;
}

.fee-adjustment-desc {
  font-size: 0.83rem;
  color: #6B21A8;
  margin-top: 0.15rem;
  line-height: 1.45;
}

.fee-adjustment-badge {
  background: #7C3AED;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 0.35rem 0.8rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(124, 58, 237, 0.25);
}

/* Fee Summary 4-Cards Grid */
.fee-summary-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.fee-stat-box {
  background: linear-gradient(180deg, #ffffff 0%, #FAF9F6 100%);
  padding: 1.1rem 1.15rem;
  border-radius: 12px;
  border: 1px solid var(--border-sand);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 110px;
  box-sizing: border-box;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fee-stat-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.fee-stat-label {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.fee-stat-value {
  font-size: 1.55rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--text-mahogany);
  margin-bottom: 0.2rem;
  line-height: 1.15;
}

.fee-stat-value.emerald { color: var(--primary-emerald); }
.fee-stat-value.pending { color: #DC2626; }

.fee-stat-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Hero Net Dues Box */
.fee-stat-box.fee-stat-box-hero {
  border-width: 2px;
}

.fee-stat-box-hero.hero-dues-pending {
  border-color: #EF4444;
  background: linear-gradient(180deg, #FEF2F2 0%, #FEE2E2 100%);
}

.fee-stat-box-hero.hero-dues-cleared {
  border-color: #10B981;
  background: linear-gradient(180deg, #ECFDF5 0%, #D1FAE5 100%);
}

.fee-hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.fee-hero-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.fee-hero-badge.badge-due {
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FCA5A5;
}

.fee-hero-badge.badge-cleared {
  background: #DCFCE7;
  color: #166534;
  border: 1px solid #86EFAC;
}

.btn-hero-pay {
  margin-top: 0.65rem;
  width: 100%;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.84rem;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-decoration: none;
  border: none;
  box-shadow: 0 3px 8px rgba(5, 150, 105, 0.28);
  transition: all 0.2s ease;
}

.btn-hero-pay:hover {
  background: linear-gradient(135deg, #047857 0%, #065F46 100%);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
}

/* Desktop Table View */
.fee-table-desktop-wrap {
  display: block;
  width: 100%;
  overflow-x: auto;
}

/* Audited Fee Statement & Transaction History Header */
.fee-statement-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.fee-statement-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.fee-statement-ledger-tag {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--primary-emerald, #064E3B);
  background: var(--primary-emerald-light, #ECFDF5);
  border: 1px solid rgba(6, 78, 59, 0.18);
  padding: 0.18rem 0.55rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: fit-content;
}

.fee-statement-header-action {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Mobile Transaction List View */
.fee-tx-mobile-list {
  display: none;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0.25rem 0;
}

.fee-tx-card {
  background: #ffffff;
  border: 1.5px solid var(--border-sand, #E2E8F0);
  border-radius: 14px;
  padding: 1rem 1.15rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-sizing: border-box;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fee-tx-card:hover {
  box-shadow: 0 4px 14px rgba(6, 78, 59, 0.08);
}

.fee-tx-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px dashed #E2E8F0;
}

.fee-tx-receipt-badge {
  font-family: var(--font-mono, monospace);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-mahogany, #1E293B);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #F1F5F9;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  border: 1px solid #CBD5E1;
}

.fee-tx-card-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.fee-tx-amount-col {
  display: flex;
  flex-direction: column;
}

.fee-tx-amount-label,
.fee-tx-date-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--text-muted, #64748B);
  letter-spacing: 0.04em;
  margin-bottom: 0.15rem;
}

.fee-tx-amount-val {
  font-size: 1.35rem;
  font-weight: 800;
  font-family: var(--font-heading);
}

.fee-tx-date-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.fee-tx-date-val {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-charcoal, #334155);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.fee-tx-card-details {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.82rem;
}

.fee-tx-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.fee-tx-detail-key {
  color: var(--text-muted, #64748B);
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.fee-tx-detail-val {
  color: var(--text-charcoal, #1E293B);
  font-weight: 700;
  text-align: right;
}

.fee-tx-detail-note {
  margin-top: 0.25rem;
  padding-top: 0.4rem;
  border-top: 1px solid #E2E8F0;
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
}

.fee-tx-card-action {
  margin-top: 0.2rem;
}

.btn-tx-download {
  width: 100%;
  padding: 0.6rem 0.95rem;
  font-size: 0.84rem;
  font-weight: 700;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  cursor: pointer;
  border: none;
  background: #064E3B;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(6, 78, 59, 0.2);
  transition: all 0.2s ease;
  min-height: 42px;
}

.btn-tx-download:hover {
  background: #04382A;
  box-shadow: 0 4px 12px rgba(6, 78, 59, 0.3);
  transform: translateY(-1px);
}

.fee-tx-empty-state {
  text-align: center;
  padding: 2.25rem 1rem;
  background: #FAF9F6;
  border: 1.5px dashed var(--border-sand);
  border-radius: 12px;
  margin: 0.5rem 0;
}

.fee-tx-empty-icon {
  font-size: 2.2rem;
  color: var(--primary-emerald);
  margin-bottom: 0.5rem;
}

.fee-tx-empty-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-mahogany);
  margin-bottom: 0.35rem;
}

.fee-tx-empty-desc {
  font-size: 0.84rem;
  color: var(--text-charcoal);
  line-height: 1.5;
  max-width: 400px;
  margin: 0 auto 1.15rem;
}

/* Responsive Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.portal-table th {
  background-color: var(--bg-surface-cream);
  color: var(--text-mahogany);
  font-weight: 700;
  padding: 0.85rem 1rem;
  border-bottom: 2px solid var(--border-sand);
  white-space: nowrap;
}

.portal-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border-sand);
  color: var(--text-charcoal);
}

.portal-table tr:hover {
  background-color: var(--primary-emerald-lighter);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
}

.status-paid {
  background-color: #D1FAE5;
  color: #065F46;
}

.status-pending {
  background-color: #FEE2E2;
  color: #991B1B;
}

/* --------------------------------------------------------------------------
 * 8. Admin Page / Dashboard Components
 * -------------------------------------------------------------------------- */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.admin-stat-card {
  background: #ffffff;
  padding: 1.35rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-sand);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  cursor: pointer;
  user-select: none;
}

.admin-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(6, 78, 59, 0.12);
  border-color: var(--primary-emerald);
}

.admin-stat-card:active {
  transform: translateY(-1px);
}

.stat-click-hint {
  font-size: 0.8rem;
  color: var(--primary-emerald);
  font-weight: 700;
  margin-top: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: transform 0.2s ease;
}

.admin-stat-card:hover .stat-click-hint {
  transform: translateX(3px);
}

/* .cloud-sync-badge is defined once, near .dashboard-header-actions. A second
   declaration lived here and silently overrode the state colours. */

.admin-icon-square {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background-color: var(--primary-emerald-light);
  color: var(--primary-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.admin-stat-info h3 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-mahogany);
  margin: 0;
  line-height: 1.1;
}

.admin-stat-info p {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
  margin: 0.2rem 0 0 0;
}

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.search-box-portal {
  position: relative;
  min-width: 260px;
}

.search-box-portal i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-input-field {
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 2.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-sand);
  font-family: var(--font-body);
  font-size: 0.875rem;
}

.search-input-field:focus {
  outline: none;
  border-color: var(--primary-emerald);
}

/* Modals inside Admin */
.inner-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
}

.inner-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.inner-modal-content {
  background-color: #ffffff;
  width: 100%;
  max-width: 600px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  max-height: 90vh;
  overflow-y: auto;
}

#auditPurgeModal {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.75rem !important;
}

#auditPurgeModal .inner-modal-content,
#auditPurgeModal .audit-purge-modal-card {
  padding: 0 !important;
  max-height: min(92vh, 92dvh) !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  border: 2.5px solid #DC2626 !important;
  border-radius: 12px !important;
  margin: auto !important;
  box-shadow: 0 20px 50px rgba(220, 38, 38, 0.35) !important;
}

.inner-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-sand);
  padding-bottom: 0.875rem;
}

.inner-modal-header h3 {
  font-size: 1.25rem;
  color: var(--text-mahogany);
}

.btn-close-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #1F2937;
  border: 1.5px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-close-inner:hover {
  background: #DC2626;
  color: #ffffff;
  border-color: #B91C1C;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
  transform: rotate(90deg) scale(1.08);
}

.btn-close-inner:active {
  transform: scale(0.92);
}

/* The ✕ is a 36px target — under the 44px minimum (WCAG 2.5.5). A transparent
   ::after enlarges the hit area to 44px without changing the visual size or the
   surrounding layout, so it stays a small circle but is reliably tappable with
   a thumb. */
.btn-close-inner {
  position: relative;
}

.btn-close-inner::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
}

/* A visible focus ring on every dialog control. The buttons in these dialogs
   are styled inline and carry no :focus rule at all, so keyboard users had no
   indication of where they were — and the UA default outline is invisible
   against the dark emerald gateway card. */
.btn-close-inner:focus-visible,
.btn-pay-option:focus-visible,
.inner-modal-content .btn:focus-visible,
.inner-modal-content button:focus-visible,
.inner-modal-content a:focus-visible,
.inner-modal-content .portal-input:focus-visible {
  outline: 3px solid #047857;
  outline-offset: 2px;
  border-radius: 6px;
}

/* On the dark gradient of the UPI gateway card an emerald ring disappears, so
   controls inside it get a light ring instead. */
.upi-gateway-grid :focus-visible,
#autoUpiPayBtn:focus-visible {
  outline: 3px solid #A7F3D0;
  outline-offset: 2px;
}

/* Official UPI gateway card: QR beside the payee details.
   This was an inline `grid-template-columns: auto 1fr`, which the mobile
   grid-collapse rule could not reach — that rule only matches grids inside a
   <form>, and this card sits above the form. The result on a 375px phone was a
   130px QR competing with a monospace UPI-id chip and a Copy button in the
   remaining ~150px, so the chip overflowed the card. */
.upi-gateway-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
}

@media (max-width: 560px) {
  .upi-gateway-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0.85rem;
    text-align: center;
  }

  .upi-gateway-grid > div:last-child > div[style*="display: flex"] {
    justify-content: center;
  }
}

/* Notice & Announcement Filter Chips */
.notice-admin-filter-chip {
  background: #F3F4F6;
  border: 1px solid var(--border-sand);
  color: var(--text-charcoal);
  padding: 0.35rem 0.85rem;
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.notice-admin-filter-chip:hover {
  background: #E5E7EB;
  border-color: #D1D5DB;
}

.notice-admin-filter-chip.active {
  background: var(--primary-emerald);
  border-color: var(--primary-emerald);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(6, 78, 59, 0.2);
}

/* Request Sub-Pills */
.req-sub-pill {
  padding: 0.5rem 1.1rem;
  border-radius: 8px;
  background: #FAF9F6;
  border: 1px solid var(--border-sand, #E5E7EB);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted, #4B5563);
  cursor: pointer;
  transition: all 0.2s ease;
}

.req-sub-pill:hover {
  background: #F3F4F6;
  color: var(--text-mahogany, #111827);
}

.req-sub-pill.active {
  background: var(--primary-emerald, #064E3B);
  color: #ffffff;
  border-color: var(--primary-emerald, #064E3B);
  box-shadow: 0 2px 8px rgba(6, 78, 59, 0.2);
}

/* ==========================================================================
 * Student Management Action Modal (Base / Laptop / Desktop)
 * ========================================================================== */
.stu-mgmt-sub-pills-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1.5px solid var(--border-sand, #E5E7EB);
}

.mgmt-sub-pill,
.stu-mgmt-sub-pills-bar .req-sub-pill {
  flex: 1 1 auto;
  min-width: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 0.95rem;
  border-radius: 8px;
  border: 1.5px solid #E2E8F0;
  background: #FAF9F6;
  font-weight: 700;
  font-size: 0.82rem;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
  height: 38px;
  box-sizing: border-box;
}

.mgmt-sub-pill:hover,
.stu-mgmt-sub-pills-bar .req-sub-pill:hover {
  background: #F1F5F9;
  color: #0F172A;
  border-color: #CBD5E1;
}

.mgmt-sub-pill.active,
.stu-mgmt-sub-pills-bar .req-sub-pill.active {
  background: var(--primary-emerald, #064E3B) !important;
  color: #ffffff !important;
  border-color: var(--primary-emerald, #064E3B) !important;
  box-shadow: 0 2px 8px rgba(6, 78, 59, 0.25) !important;
}

/* Quick Presets Grid */
.mgmt-quick-presets-grid {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.btn-mgmt-quick-pay {
  padding: 0.45rem 0.95rem;
  border-radius: 6px;
  border: 1.5px solid #CBD5E1;
  background: #ffffff;
  color: #334155;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: 36px;
  box-sizing: border-box;
}

.btn-mgmt-quick-pay:hover {
  background: #F0FDF4;
  border-color: #10B981;
  color: #065F46;
  transform: translateY(-1px);
}

.btn-mgmt-quick-pay.btn-quick-partial-clear {
  background: #F8FAFC;
  border-color: #E2E8F0;
  color: #64748B;
}

.btn-mgmt-quick-pay.btn-quick-partial-clear:hover {
  background: #FEE2E2;
  border-color: #F87171;
  color: #991B1B;
}

/* Live Dues Calculator Summary */
.mgmt-calc-summary-grid {
  background: #F8FAFC;
  border: 1.5px dashed #CBD5E1;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.95rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  box-sizing: border-box;
}

.mgmt-calc-stat-box {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.mgmt-calc-stat-box .calc-stat-lbl {
  font-size: 0.8rem;
  color: #64748B;
  font-weight: 600;
  text-transform: uppercase;
}

.mgmt-calc-stat-box .calc-stat-val {
  font-size: 1.05rem;
  font-weight: 800;
}

/* Profile Edit Grid */
.mgmt-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.95rem;
  margin-bottom: 1.15rem;
  box-sizing: border-box;
}

.mgmt-profile-grid .col-span-2 {
  grid-column: span 2;
}

/* ==========================================================================
 * Admin Profile & Account Settings Master Styles (Desktop / Laptop / Base)
 * ========================================================================== */
.admin-settings-dash-card {
  background: #ffffff;
  border: 1.5px solid var(--border-sand, #E5E7EB);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.admin-profile-header-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 1.5px solid var(--border-sand, #E5E7EB);
  padding-bottom: 1.15rem;
}

.admin-profile-header-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.admin-profile-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(6, 78, 59, 0.1);
  color: var(--primary-emerald, #064E3B);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.admin-profile-title {
  font-size: 1.28rem;
  font-weight: 800;
  color: var(--text-mahogany, #1E1B18);
  margin: 0;
  line-height: 1.2;
}

.admin-profile-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted, #64748B);
  margin-top: 0.25rem;
}

.admin-profile-secure-badge {
  background: #ECFDF5;
  color: #065F46;
  border: 1.5px solid #A7F3D0;
  padding: 0.45rem 1rem;
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 1px 3px rgba(6, 95, 70, 0.1);
}

/* Master 2-Column Grid on Desktop / Laptop */
.admin-profile-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.35rem;
  margin-bottom: 1.5rem;
}

.admin-profile-card {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  padding: 1.35rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.admin-card-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.85rem;
  margin-bottom: 1.15rem;
  border-bottom: 1.5px solid #F1F5F9;
}

.admin-card-head-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.admin-card-head-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-mahogany, #1E1B18);
  line-height: 1.2;
}

.admin-card-head-desc {
  font-size: 0.8rem;
  color: #64748B;
  margin-top: 0.15rem;
}

/* Avatar Preview & Upload Inner Card */
.admin-avatar-card-inner {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  padding: 0.95rem 1.15rem;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  margin-bottom: 1.25rem;
  box-sizing: border-box;
}

.admin-avatar-preview-box {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #064E3B 0%, #047857 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(6, 78, 59, 0.25);
  border: 3px solid #34D399;
  overflow: hidden;
}

.admin-avatar-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-avatar-ctrls {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.btn-change-photo {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #FFFFFF;
  color: #0F172A;
  border: 1.5px solid #CBD5E1;
  padding: 0.45rem 0.95rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  user-select: none;
}

.btn-change-photo:hover {
  background: #F0FDF4;
  border-color: #10B981;
  color: #065F46;
  transform: translateY(-1px);
}

.admin-avatar-hint {
  font-size: 0.8rem;
  color: #64748B;
  line-height: 1.35;
}

/* Form Groups & Inputs */
.admin-form-group {
  margin-bottom: 0.95rem;
  width: 100%;
}

.admin-form-group:last-child {
  margin-bottom: 0;
}

.admin-form-group label {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-mahogany, #1E1B18);
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.req-star {
  color: #EF4444;
  font-weight: 800;
}

.admin-field-hint {
  font-size: 0.8rem;
  color: #64748B;
  margin-top: 0.25rem;
  line-height: 1.35;
}

/* Universal Input Wrapper with Left Icons & Right Eye Toggles */
.input-icon-wrap {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.input-icon-wrap i.input-left-icon {
  position: absolute !important;
  left: 0.95rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: #94A3B8 !important;
  font-size: 0.95rem !important;
  pointer-events: none !important;
  transition: color 0.15s ease !important;
  z-index: 2 !important;
}

.input-icon-wrap input:focus ~ i.input-left-icon {
  color: var(--primary-emerald, #064E3B) !important;
}

.input-icon-wrap input.portal-input {
  width: 100% !important;
  height: 44px !important;
  padding-left: 2.75rem !important;
  padding-right: 2.85rem !important;
  font-size: 0.92rem !important;
  border: 1.5px solid #CBD5E1 !important;
  border-radius: 8px !important;
  background: #FAFAFA !important;
  color: #0F172A !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
}

.input-icon-wrap input.portal-input:focus {
  border-color: var(--primary-emerald, #064E3B) !important;
  background: #FFFFFF !important;
  box-shadow: 0 0 0 3px rgba(6, 78, 59, 0.12) !important;
  outline: none !important;
}

.input-icon-wrap input.input-readonly {
  background: #F1F5F9 !important;
  color: #475569 !important;
  border-color: #E2E8F0 !important;
  cursor: not-allowed !important;
  opacity: 0.95 !important;
}

.btn-toggle-admin-pw {
  position: absolute !important;
  right: 6px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: transparent !important;
  border: none !important;
  color: #64748B !important;
  cursor: pointer !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 6px !important;
  font-size: 1rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: color 0.2s, background-color 0.2s !important;
  z-index: 5 !important;
  padding: 0 !important;
}

.btn-toggle-admin-pw:hover,
.btn-toggle-admin-pw:active {
  color: var(--primary-emerald, #064E3B) !important;
  background-color: rgba(6, 78, 59, 0.08) !important;
}

.security-hint {
  font-size: 0.8rem;
  color: #64748B;
  margin-top: 0.35rem;
  line-height: 1.35;
}

/* Security Verification Alert Box */
.admin-security-alert-box {
  background: #FEF2F2;
  border: 1.5px solid #FECACA;
  border-radius: 10px;
  padding: 0.95rem 1.15rem;
  margin-top: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  box-sizing: border-box;
}

.security-alert-icon {
  font-size: 1.25rem;
  color: #DC2626;
  flex-shrink: 0;
  margin-top: 2px;
}

.security-alert-body {
  width: 100%;
}

.security-alert-label {
  display: block;
  font-size: 0.83rem;
  font-weight: 800;
  color: #991B1B;
  margin-bottom: 0.45rem;
}

.security-auth-input {
  border-color: #FCA5A5 !important;
  background: #FFFFFF !important;
}

.security-alert-hint {
  font-size: 0.8rem;
  color: #B91C1C;
  margin-top: 0.35rem;
  line-height: 1.35;
}

/* Submit Action Button */
.admin-profile-submit-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

.btn-admin-settings-submit {
  background: linear-gradient(135deg, #064E3B 0%, #04382B 100%);
  color: #ffffff;
  padding: 0.85rem 2.25rem;
  font-size: 0.96rem;
  font-weight: 800;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  box-shadow: 0 4px 14px rgba(6, 78, 59, 0.25);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-admin-settings-submit:hover {
  background: linear-gradient(135deg, #047857 0%, #064E3B 100%);
  box-shadow: 0 6px 20px rgba(6, 78, 59, 0.35);
  transform: translateY(-1px);
}

.btn-admin-settings-submit:active {
  transform: scale(0.98);
}

/* Card 3: Multi-Device Session Security Card */
.admin-session-security-card {
  grid-column: 1 / -1;
  background: #FFF1F2 !important;
  border: 1.5px solid #FECDD3 !important;
  border-radius: 12px;
}

.admin-session-box {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.admin-session-status-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 0.85rem 1rem;
}

.session-status-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.admin-session-action-wrap {
  background: #FFFFFF;
  border: 1px solid #FECDD3;
  border-radius: 8px;
  padding: 1rem;
}

.btn-logout-all-devices {
  background: #DC2626;
  color: #FFFFFF !important;
  border: none;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.75rem 1.4rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
}

.btn-logout-all-devices:hover {
  background: #B91C1C;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-logout-all-devices:active {
  transform: scale(0.98);
}

/* --- Active Devices List & Security Cards --- */
.admin-device-list-wrap {
  margin-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.admin-devices-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.admin-device-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.admin-device-card.is-current {
  border-color: #A7F3D0;
  background: #F0FDF4;
}

.admin-device-card.is-remote:hover {
  border-color: #CBD5E1;
  background: #F8FAFC;
}

.device-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #F1F5F9;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.admin-device-card.is-current .device-icon-wrap {
  background: #DCFCE7;
  color: #059669;
}

.device-info-wrap {
  flex: 1;
  min-width: 0;
}

.device-title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.2rem;
}

.device-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: #0F172A;
}

.device-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
}

.device-badge-current {
  background: #DCFCE7;
  color: #15803D;
  border: 1px solid #86EFAC;
}

.device-badge-remote {
  background: #F1F5F9;
  color: #475569;
  border: 1px solid #E2E8F0;
}

.device-meta-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  color: #64748B;
  flex-wrap: wrap;
}

.device-action-wrap {
  flex-shrink: 0;
}

.btn-revoke-device {
  background: #FEF2F2;
  color: #DC2626 !important;
  border: 1px solid #FECDD3;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.btn-revoke-device:hover {
  background: #FEE2E2;
  border-color: #FDA4AF;
  color: #B91C1C !important;
  transform: translateY(-1px);
}

.device-current-pill {
  font-size: 0.76rem;
  font-weight: 600;
  color: #059669;
  background: rgba(5, 150, 105, 0.08);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}

.admin-device-loading {
  font-size: 0.86rem;
  color: #64748B;
  padding: 0.85rem;
  background: #F8FAFC;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-device-err {
  font-size: 0.84rem;
  color: #DC2626;
  background: #FEF2F2;
  padding: 0.6rem 0.85rem;
  border-radius: 6px;
}

@media (max-width: 600px) {
  .admin-device-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .device-action-wrap {
    width: 100%;
    margin-top: 0.4rem;
    display: flex;
    justify-content: flex-end;
  }
  .btn-revoke-device {
    width: 100%;
    justify-content: center;
    padding: 0.5rem;
  }
}

/* ==========================================================================
 * MASTER MOBILE & ANDROID RESPONSIVENESS SUITE (320px - 768px)
 * ========================================================================== */

@media (max-width: 768px) {
  /* 1. Modal Backdrops & Overlays (M3) — Zero Left-Clipping & Fluid Fit */
  .portal-overlay {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    width: 100dvw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    z-index: 9999 !important;
  }

  .portal-modal-card {
    width: 100vw !important;
    width: 100dvw !important;
    max-width: 100vw !important;
    max-width: 100dvw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    position: relative !important;
    background: var(--bg-surface-cream, #FDFBF7) !important;
  }

  .dashboard-wrapper {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 0 !important;
    min-height: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .dashboard-content-body {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    padding: 0.85rem 0.65rem calc(1.5rem + env(safe-area-inset-bottom, 0px)) 0.65rem !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }

  .tab-pane,
  .dash-tab-pane,
  .admin-tab-pane,
  .student-tab-pane {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Mobile Login Sizing & Responsive Padding */
  .login-container-wrapper {
    grid-template-columns: 1fr;
    min-height: auto;
    width: 100%;
  }

  .hidden-view,
  #loginViewContainer.hidden-view,
  #studentDashboardContainer.hidden-view,
  #adminDashboardContainer.hidden-view {
    display: none !important;
  }

  .login-branding-side {
    display: none !important;
  }

  .login-form-side {
    padding: 2.25rem 1.25rem 1.75rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
  }

  .role-switcher-tabs {
    margin-bottom: 1.35rem !important;
    gap: 0.35rem !important;
  }

  .role-tab-btn {
    padding: 0.65rem 0.75rem !important;
    font-size: 0.86rem !important;
    min-height: 42px !important;
  }

  .login-header-group {
    margin-bottom: 1.25rem !important;
  }

  .login-header-group h3 {
    font-size: 1.3rem !important;
  }

  .login-header-group p {
    font-size: 0.84rem !important;
  }

  .form-group-portal {
    margin-bottom: 1.15rem !important;
  }

  .portal-input {
    height: 46px !important;
    font-size: 0.95rem !important;
  }

  .login-submit-btn {
    height: 48px !important;
    font-size: 0.95rem !important;
    margin-top: 0.5rem !important;
  }

  .inner-modal-backdrop {
    padding: 0.35rem !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10000 !important;
  }

  .inner-modal-content {
    padding: 1.15rem 0.95rem !important;
    max-height: 90vh !important;
    max-height: 90dvh !important;
    width: 96vw !important;
    max-width: 540px !important;
    border-radius: 14px !important;
    margin: 0 auto !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box !important;
    padding-bottom: env(safe-area-inset-bottom, 0.75rem) !important;
  }

  /* Single Column Stacking for Inner Modal Form Grids on Mobile */
  .inner-modal-content form div[style*="grid-template-columns"],
  .inner-modal-content form div[style*="grid-template-columns: 1fr 1fr"],
  .inner-modal-content form div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  .inner-modal-content form div[style*="grid-column: span 2"],
  .inner-modal-content form div[style*="grid-column:span 2"] {
    grid-column: span 1 !important;
  }

  /* 2. Compact High-Density Header & Profile Banner */
  .dashboard-header-bar {
    flex-shrink: 0 !important;
    padding: 0.65rem 0.85rem !important;
    padding-top: max(0.65rem, env(safe-area-inset-top)) !important;
    padding-right: calc(44px + max(0.4rem, env(safe-area-inset-right))) !important;
    gap: 0.65rem !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    z-index: 30 !important;
  }

  .dashboard-user-info {
    gap: 0.65rem !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  .user-avatar-circle {
    width: 38px !important;
    height: 38px !important;
    font-size: 1.05rem !important;
    border-width: 2px !important;
    flex-shrink: 0 !important;
  }

  .user-text-details {
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .user-text-details h2 {
    font-size: 1.05rem !important;
    margin-bottom: 0.1rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .user-subline {
    font-size: 0.78rem !important;
    gap: 0.3rem !important;
    flex-wrap: wrap !important;
  }

  .user-badge-tag {
    font-size: 0.78rem !important;
    padding: 0.1rem 0.4rem !important;
  }

  .dashboard-header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    flex-shrink: 0 !important;
  }

  .btn-logout {
    padding: 0.35rem 0.65rem !important;
    font-size: 0.8rem !important;
    height: 30px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 6px !important;
  }

  #activeTeacherSelector {
    max-width: 100% !important;
    font-size: 0.8rem !important;
    padding: 0.25rem 0.45rem !important;
  }

  /* 3. Sleek Scrollable Tab Navigation (Admin & Student) */
  .portal-close-btn {
    position: absolute !important;
    top: max(0.45rem, env(safe-area-inset-top)) !important;
    right: max(0.45rem, env(safe-area-inset-right)) !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    font-size: 1rem !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.96) !important;
    color: #1F2937 !important;
    border: 1.5px solid rgba(0, 0, 0, 0.15) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 1000 !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
  }

  .dashboard-nav-tabs,
  .portal-nav-bar {
    flex-shrink: 0 !important;
    min-height: 46px !important;
    max-height: 48px !important;
    height: 46px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    background: #ffffff !important;
    border-bottom: 2px solid var(--border-sand, #E2E8F0) !important;
    padding: 0 0.6rem !important;
    gap: 0.4rem !important;
    z-index: 40 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06) !important;
    box-sizing: border-box !important;
    touch-action: pan-x !important;
  }

  .dashboard-nav-tabs::-webkit-scrollbar,
  .portal-nav-bar::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }

  .dash-tab-btn,
  .admin-tab-btn,
  .student-tab-btn {
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.35rem !important;
    padding: 0.35rem 0.75rem !important;
    height: 34px !important;
    min-height: 34px !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
    color: var(--text-muted, #64748B) !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    border-bottom: 2px solid transparent !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
    box-sizing: border-box !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    will-change: transform;
  }

  .dash-tab-btn:active,
  .admin-tab-btn:active,
  .student-tab-btn:active {
    transform: scale(0.96) !important;
  }

  .dash-tab-btn i,
  .admin-tab-btn i,
  .student-tab-btn i {
    font-size: 0.9rem !important;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  }

  .dash-tab-btn:hover,
  .admin-tab-btn:hover,
  .student-tab-btn:hover {
    color: var(--primary-emerald, #064E3B) !important;
    background: rgba(6, 78, 59, 0.04) !important;
  }

  .dash-tab-btn.active,
  .admin-tab-btn.active,
  .student-tab-btn.active {
    background-color: var(--primary-emerald-lighter, #ECFDF5) !important;
    color: var(--primary-emerald, #064E3B) !important;
    border: 1px solid #A7F3D0 !important;
    border-bottom: 2px solid var(--primary-emerald, #064E3B) !important;
    font-weight: 800 !important;
    box-shadow: 0 1px 3px rgba(6, 78, 59, 0.12) !important;
    transform: translateY(-1px) !important;
  }

  .dash-tab-btn.active i,
  .admin-tab-btn.active i,
  .student-tab-btn.active i {
    transform: scale(1.1) !important;
  }

  .badge-count,
  .tab-badge,
  .badge {
    font-size: 0.78rem !important;
    padding: 0.1rem 0.35rem !important;
    border-radius: 99px !important;
    margin-left: 0.2rem !important;
  }

  /* Admin Overview Stat Cards (Compact 2x2 Grid on Mobile) */
  .admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
    margin-bottom: 0.85rem !important;
  }

  .admin-stats-grid.hidden-stats,
  .admin-stats-grid[hidden],
  #adminOverviewStats[hidden],
  #adminOverviewStats.hidden-stats,
  .admin-stats-grid[style*="display: none"],
  #adminOverviewStats[style*="display: none"] {
    display: none !important;
  }

  .admin-stat-card {
    padding: 0.65rem 0.6rem !important;
    gap: 0.5rem !important;
    border-radius: 8px !important;
    min-height: auto !important;
  }

  .admin-icon-square {
    width: 36px !important;
    height: 36px !important;
    font-size: 1rem !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
  }

  .admin-stat-info h3 {
    font-size: 1.15rem !important;
    line-height: 1.1 !important;
    margin: 0 !important;
  }

  .admin-stat-info p {
    font-size: 0.72rem !important;
    margin: 0.1rem 0 0 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .stat-click-hint {
    font-size: 0.68rem !important;
    margin-top: 0.15rem !important;
  }

  /* 4. High-Density Dashboard Content & Cards */
  .dashboard-content-body {
    padding: 0.75rem 0.6rem !important;
  }

  .dash-card {
    padding: 0.95rem 0.85rem !important;
    margin-bottom: 0.85rem !important;
    border-radius: 10px !important;
    position: relative;
    z-index: 1;
    clear: both;
  }

  .dash-card-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.65rem !important;
    margin-bottom: 0.75rem !important;
    padding-bottom: 0.65rem !important;
  }

  .dash-card-header .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  .dash-card-title {
    font-size: 0.95rem !important;
    gap: 0.45rem !important;
    width: 100% !important;
  }

  .student-header-actions-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem !important;
    width: 100% !important;
  }

  .student-header-actions-row .btn {
    width: 100% !important;
    padding: 0.55rem 0.45rem !important;
    font-size: 0.8rem !important;
    height: 38px !important;
    box-sizing: border-box !important;
  }

  /* 5. Student Details Tab & Grid Layout */
  .profile-grid-layout {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .detail-items-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }

  .detail-box {
    padding: 0.55rem 0.65rem !important;
    border-radius: 6px !important;
  }

  .detail-label {
    font-size: 0.8rem !important;
    margin-bottom: 0.1rem !important;
  }

  .detail-val {
    font-size: 0.82rem !important;
    word-break: break-word;
  }

  /* 6. Mobile 3D VIP Student ID Card (Ergonomic Dimensions & Zero Collision - M7) */
  .metallic-card-3d-container {
    perspective: 1200px !important;
    width: 100% !important;
    max-width: 440px !important;
    margin: 0.4rem auto 2.25rem auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    position: relative !important;
    overflow: visible !important;
  }

  .metallic-card-3d {
    width: 100% !important;
    max-width: 100% !important;
    height: 420px !important;
    min-height: 400px !important;
    aspect-ratio: auto !important;
    border-radius: 18px !important;
    box-sizing: border-box !important;
    margin: 0 auto !important;
  }

  .card-face {
    padding: 0.95rem 1.15rem !important;
    border-radius: 18px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: 100% !important;
    min-height: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .metallic-id-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding-bottom: 0.3rem !important;
    margin-bottom: 0.2rem !important;
  }

  .metallic-id-logo {
    width: 28px !important;
    height: 28px !important;
  }

  .metallic-id-inst-name {
    font-size: 0.86rem !important;
    letter-spacing: 0.04em !important;
  }

  .metallic-id-inst-sub {
    font-size: 0.8rem !important;
  }

  .metallic-vip-crest,
  .metallic-hologram-seal {
    font-size: 0.8rem !important;
    padding: 0.18rem 0.5rem !important;
  }

  .metallic-id-body {
    display: flex !important;
    align-items: center !important;
    gap: 0.85rem !important;
    margin-block: 0.2rem !important;
  }

  .metallic-avatar-upload-wrap {
    width: 52px !important;
    height: 52px !important;
  }

  .metallic-emv-chip-row {
    gap: 0.45rem !important;
    margin-bottom: 0.15rem !important;
  }

  .metallic-emv-chip {
    width: 26px !important;
    height: 18px !important;
  }

  .metallic-nfc-wave {
    font-size: 0.8rem !important;
  }

  .metallic-id-info h3 {
    font-size: 1.05rem !important;
    margin-bottom: 0.15rem !important;
  }

  .metallic-id-chip {
    font-size: 0.8rem !important;
    padding: 0.12rem 0.45rem !important;
  }

  .metallic-class-tag {
    font-size: 0.8rem !important;
  }

  .metallic-id-details-row {
    font-size: 0.8rem !important;
    padding: 0.45rem 0.75rem !important;
    gap: 0.25rem 0.6rem !important;
    margin-block: 0.2rem !important;
    border-radius: 8px !important;
  }

  .metallic-credential-highlight-strip {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.5rem !important;
    padding: 0.38rem 0.65rem !important;
    margin-block: 0.15rem !important;
    border-radius: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .metallic-credential-strip-left {
    flex-shrink: 0 !important;
  }

  .metallic-credential-strip-right {
    flex-shrink: 0 !important;
    font-size: 0.78rem !important;
  }

  .metallic-credential-pill {
    font-size: 0.68rem !important;
    padding: 0.18rem 0.45rem !important;
    letter-spacing: 0.04em !important;
  }

  .metallic-strip-label {
    font-size: 0.7rem !important;
  }

  .metallic-strip-session-val {
    font-size: 0.82rem !important;
  }

  .metallic-id-barcode-wrap {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.65rem !important;
    padding: 0.35rem 0.65rem !important;
    margin-top: auto !important;
    border-radius: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .logical-barcode-container {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .logical-barcode-svg {
    width: 100% !important;
    height: 17px !important;
    display: block !important;
  }

  .logical-barcode-number {
    font-size: 0.8rem !important;
    letter-spacing: 0.1em !important;
  }

  .metallic-qr-placeholder {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    font-size: 0.8rem !important;
    padding: 0.18rem 0.48rem !important;
  }

  .back-card-content {
    gap: 0.45rem !important;
    font-size: 0.8rem !important;
    padding: 0.2rem 0 !important;
    justify-content: center !important;
  }

  .back-quote-box {
    padding: 0.7rem 0.85rem !important;
    border-radius: 10px !important;
  }

  .quote-icon-large {
    font-size: 1rem !important;
  }

  .quote-decor-tag {
    font-size: 0.62rem !important;
    padding: 0.1rem 0.45rem !important;
  }

  .quote-text-hero {
    font-size: 0.82rem !important;
    line-height: 1.4 !important;
  }

  .quote-author-hero {
    font-size: 0.7rem !important;
    margin-top: 0.35rem !important;
  }

  .back-creed-strip {
    padding: 0.4rem 0.65rem !important;
    border-radius: 8px !important;
    gap: 0.25rem !important;
  }

  .creed-item {
    font-size: 0.68rem !important;
    line-height: 1.3 !important;
  }

  .back-signatories-row {
    gap: 0.5rem !important;
  }

  .signature-script {
    font-size: 1.05rem !important;
  }

  .back-contact-help {
    font-size: 0.68rem !important;
    line-height: 1.25 !important;
    text-align: center !important;
  }

  /* 7. Student Batch Details & Schedule on Mobile */
  .profile-grid-layout {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .batch-overview-card .batch-info-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
  }

  .batch-overview-metrics-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.45rem !important;
  }

  .batch-metric-box {
    padding: 0.55rem 0.65rem !important;
    border-radius: 8px !important;
  }

  .batch-metric-label {
    font-size: 0.66rem !important;
  }

  .batch-metric-value {
    font-size: 1.05rem !important;
  }

  .student-timetable-header {
    padding-bottom: 0.5rem !important;
  }

  .schedule-day-tabs {
    display: flex !important;
    gap: 3px !important;
    background: #F1F5F9 !important;
    padding: 3px !important;
    border-radius: 8px !important;
    border: 1px solid #E2E8F0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    justify-content: space-between !important;
    overflow: hidden !important;
  }

  .schedule-day-tabs::-webkit-scrollbar {
    display: none !important;
  }

  .btn-day-tab {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    min-height: 32px !important;
    max-height: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    border: none !important;
    background: transparent !important;
    color: #64748B !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    box-shadow: none !important;
    margin: 0 !important;
    text-align: center !important;
    cursor: pointer !important;
  }

  .btn-day-tab.active {
    background: #047857 !important;
    color: #FFFFFF !important;
    font-weight: 800 !important;
    box-shadow: 0 1px 4px rgba(4, 120, 87, 0.25) !important;
  }

  .btn-day-tab.is-today-tab:not(.active) {
    color: #047857 !important;
    font-weight: 800 !important;
  }

  .schedule-row {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 0.85rem 1rem !important;
    gap: 0.65rem !important;
    border-radius: 12px !important;
    background: #FFFFFF !important;
    border: 1.5px solid #E2E8F0 !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }

  .schedule-row-left {
    width: 100% !important;
    gap: 0.75rem !important;
    align-items: flex-start !important;
  }

  .schedule-subject-icon {
    width: 38px !important;
    height: 38px !important;
    font-size: 1.05rem !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
  }

  .schedule-subject-details {
    flex: 1 !important;
    min-width: 0 !important;
  }

  .schedule-subject-title {
    font-size: 0.96rem !important;
    font-weight: 800 !important;
    color: #0F172A !important;
    line-height: 1.35 !important;
  }

  .schedule-subject-meta {
    font-size: 0.78rem !important;
    gap: 0.45rem !important;
    margin-top: 0.25rem !important;
  }

  .schedule-meta-chip {
    background: #F1F5F9 !important;
    border: 1px solid #E2E8F0 !important;
    padding: 0.2rem 0.55rem !important;
    border-radius: 6px !important;
    font-size: 0.76rem !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.3rem !important;
  }

  .schedule-row-right {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    border-top: 1px dashed #E2E8F0 !important;
    padding-top: 0.55rem !important;
    margin-top: 0.15rem !important;
  }

  .schedule-time {
    font-size: 0.8rem !important;
    font-weight: 800 !important;
    padding: 0.25rem 0.65rem !important;
    background: #D1FAE5 !important;
    color: #065F46 !important;
    border: 1px solid #6EE7B7 !important;
    border-radius: 99px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
  }

  .schedule-cancelled-pill {
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    background: #FEE2E2 !important;
    color: #991B1B !important;
    border: 1px solid #FCA5A5 !important;
    padding: 0.2rem 0.55rem !important;
    border-radius: 99px !important;
  }

  /* 8. Student Fee Tab & Clearance Radial on Mobile */
  .fee-pending-banner,
  .fee-adjustment-banner {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 0.85rem 1rem !important;
    gap: 0.65rem !important;
  }

  .fee-adjustment-banner-left {
    width: 100% !important;
  }

  .fee-radial-meter-container {
    flex-direction: column !important;
    text-align: center !important;
    gap: 0.85rem !important;
    padding: 1.15rem 0.95rem !important;
    border-radius: 12px !important;
    margin-bottom: 1.15rem !important;
  }

  .fee-radial-svg-wrap {
    margin: 0 auto !important;
  }

  .fee-radial-info h4 {
    font-size: 1.05rem !important;
    margin-bottom: 0.25rem !important;
  }

  .fee-radial-info p {
    font-size: 0.82rem !important;
    line-height: 1.4 !important;
  }

  .fee-summary-cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem !important;
    margin-bottom: 1.25rem !important;
  }

  .fee-stat-box {
    padding: 0.85rem 0.95rem !important;
    text-align: left !important;
    border-radius: 10px !important;
    min-height: 96px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
  }

  .fee-stat-box.fee-stat-box-hero {
    grid-column: span 2 !important;
    min-height: auto !important;
  }

  .fee-stat-label {
    font-size: 0.74rem !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    margin-bottom: 0.25rem !important;
  }

  .fee-stat-value {
    font-size: 1.35rem !important;
    font-weight: 800 !important;
  }

  .fee-stat-sub {
    font-size: 0.75rem !important;
  }

  .fee-table-desktop-wrap {
    display: none !important;
  }

  .fee-tx-mobile-list {
    display: flex !important;
  }

  .btn-dash-pay-online {
    width: 100% !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  /* 9. Admin Overview Stats */
  #adminOverviewStats {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
    margin-bottom: 0.75rem !important;
  }

  .admin-stat-card {
    padding: 0.75rem 0.65rem !important;
    gap: 0.45rem !important;
    border-radius: 8px !important;
  }

  .admin-icon-square {
    width: 36px !important;
    height: 36px !important;
    font-size: 0.95rem !important;
    border-radius: 6px !important;
  }

  .admin-stat-info h3 {
    font-size: 1.05rem !important;
    margin: 0 !important;
  }

  .admin-stat-info p {
    font-size: 0.8rem !important;
    margin: 0 !important;
  }

  /* 10. Admin Toolbar & Filter Buttons Fix */
  .admin-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.6rem !important;
  }

  .admin-toolbar .search-box-portal {
    min-width: 100% !important;
    width: 100% !important;
  }

  .admin-toolbar > div:last-child {
    display: flex !important;
    gap: 0.45rem !important;
    width: 100% !important;
  }

  .admin-toolbar > div:last-child > * {
    flex: 1 1 50% !important;
    height: 38px !important;
    font-size: 0.8rem !important;
    padding: 0.45rem 0.7rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  /* Admin Filter & Sorting Selects Bar */
  .admin-filter-bar,
  .dash-card > div[style*="background: #FAF9F6"],
  .dash-card > div[style*="background:#FAF9F6"] {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.45rem !important;
    padding: 0.65rem 0.75rem !important;
  }

  .admin-filter-bar > div,
  .dash-card > div[style*="background: #FAF9F6"] > div,
  .dash-card > div[style*="background:#FAF9F6"] > div {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.4rem !important;
    width: 100% !important;
  }

  #filterClassWise,
  #filterFeeStatus,
  #sortStudentOrder,
  .filter-select-mobile {
    width: 100% !important;
    min-width: 100% !important;
    height: 38px !important;
    font-size: 0.82rem !important;
    padding: 0.4rem 0.65rem !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
  }

  /* 11. Filter Chips, Sub-Pills & Action Buttons */
  .notice-filter-chip,
  .notice-admin-filter-chip,
  .batch-filter-btn,
  .req-sub-pill,
  .demo-chip-btn {
    padding: 0.35rem 0.65rem !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    height: 32px !important;
    border-radius: 99px !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
  }

  .req-sub-pill {
    border-radius: 6px !important;
    padding: 0.35rem 0.55rem !important;
    font-size: 0.8rem !important;
  }

  /* Standardized Submit & Action Buttons (Clean & Proportional) */
  button[type="submit"],
  .btn-submit-modal,
  .login-submit-btn,
  .btn-primary,
  .btn-emerald {
    font-size: 0.86rem !important;
    font-weight: 700 !important;
    padding: 0.6rem 1rem !important;
    min-height: 40px !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.45rem !important;
    box-sizing: border-box !important;
  }

  .btn-approve-request,
  .btn-decline-request,
  .btn-action-small,
  .btn-make-changes {
    padding: 0.4rem 0.7rem !important;
    font-size: 0.8rem !important;
    height: 34px !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.35rem !important;
    box-sizing: border-box !important;
  }

  .btn-delete-student {
    padding: 0.35rem 0.5rem !important;
    height: 34px !important;
    font-size: 0.9rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* 12. Tables & Horizontal Scrolling */
  .portal-table-wrap,
  .table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x pan-y !important;
    border-radius: 8px !important;
    margin-bottom: 0.5rem !important;
  }

  .portal-table th,
  .portal-table td {
    padding: 0.5rem 0.65rem !important;
    font-size: 0.8rem !important;
    white-space: nowrap !important;
  }

  /* 13. Form Inputs for Touch */
  .portal-input,
  .search-input-field,
  select.portal-input {
    font-size: 16px !important; /* Prevents auto-zoom on Android/iOS */
    padding: 0.55rem 0.75rem !important;
    border-radius: 8px !important;
    min-height: 40px !important;
    box-sizing: border-box !important;
  }

  .input-with-icon .portal-input {
    padding-left: 2.35rem !important;
  }

  .input-with-icon i {
    left: 0.75rem !important;
    font-size: 0.88rem !important;
  }
}

/* Specific Ultra-Compact Overrides for Small Android Devices (< 480px) */
@media (max-width: 480px) {
  .login-form-side {
    padding: 1.5rem 1rem !important;
  }

  .login-header-group h3 {
    font-size: 1.25rem !important;
  }

  .form-group-portal {
    margin-bottom: 0.95rem !important;
  }

  .floating-portal-btn {
    bottom: 0.65rem !important;
    right: 0.65rem !important;
    font-size: 0.8rem !important;
    padding: 0.4rem 0.7rem !important;
    height: 34px !important;
  }

  .pragyan-chat-widget {
    bottom: 0.65rem !important;
    left: 0.65rem !important;
  }

  .chat-toggle-btn {
    padding: 0.45rem 0.75rem !important;
    font-size: 0.8rem !important;
    height: 34px !important;
  }

  .fee-summary-cards-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.45rem !important;
  }

  .fee-stat-box {
    padding: 0.65rem 0.75rem !important;
    text-align: left !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    min-height: 84px !important;
  }

  .fee-stat-box.fee-stat-box-hero {
    grid-column: span 2 !important;
  }

  .fee-stat-value {
    font-size: 1.15rem !important;
  }
}

/* Android Touch Feel & Scrollbars */
* {
  -webkit-tap-highlight-color: transparent;
}

button, a, input, select, textarea {
  touch-action: manipulation;
}

.dashboard-nav-tabs::-webkit-scrollbar,
.portal-nav-bar::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.dashboard-nav-tabs,
.portal-nav-bar {
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}

/* ==========================================================================
 * RESPONSIVE UPGRADES (v82.7) - REQUEST MANAGER, AUDIT HISTORY & SETTINGS
 * ========================================================================== */

/* 1. Request Manager Form Grid (Student & Admin) */
.portal-form-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

@media (max-width: 640px) {
  .portal-form-grid-2col {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
  .portal-form-grid-2col > div[style*="grid-column"] {
    grid-column: span 1 !important;
  }
  .portal-form-grid-2col > div {
    width: 100% !important;
  }
}

/* 2. Request Manager Sub-Pills and Action Buttons */
.req-sub-pills-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--border-sand);
  padding-bottom: 0.75rem;
  flex-wrap: wrap;
}

.req-sub-pill {
  flex: 1 1 180px;
  min-width: 140px;
  text-align: center;
  justify-content: center;
  height: 38px;
  font-size: 0.8rem;
  border-radius: 8px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.req-action-buttons-wrap {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: stretch;
  margin-top: 0.65rem;
  width: 100%;
}

.req-action-buttons-wrap > * {
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .req-action-buttons-wrap > button,
  .req-action-buttons-wrap > div {
    width: 100% !important;
    flex: 1 1 100% !important;
  }
  .req-sub-pill {
    width: 100% !important;
    flex: 1 1 100% !important;
    font-size: 0.8rem !important;
    padding: 0.4rem 0.6rem !important;
  }
}

/* 3. Master Admin Audit History & Action Filters Responsive Suite */
.admin-audit-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.admin-audit-header-title {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-mahogany, #1E1B18);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-audit-header-desc {
  font-size: 0.82rem;
  color: var(--text-muted, #64748B);
  margin-top: 0.25rem;
  line-height: 1.4;
  max-width: 620px;
}

.admin-audit-filter-wrap {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
  max-width: 580px;
  justify-content: flex-end;
}

.admin-audit-educator-select {
  flex: 1 1 140px;
  min-width: 130px;
  max-width: 100%;
  font-size: 0.82rem;
  height: 38px;
  padding: 0.4rem 0.65rem;
  border-color: var(--primary-emerald, #064E3B);
  font-weight: 600;
  border-radius: 6px;
  background-color: #FFFFFF;
}

.admin-audit-search-input {
  flex: 1 1 140px;
  min-width: 130px;
  max-width: 100%;
  font-size: 0.82rem;
  height: 38px;
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
}

.btn-clear-all-audits {
  background: linear-gradient(135deg, #DC2626 0%, #991B1B 100%);
  color: #FFFFFF;
  border: 1px solid #7F1D1D;
  height: 38px;
  padding: 0 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
  cursor: pointer;
  white-space: nowrap;
  touch-action: manipulation;
  transition: all 0.15s ease;
}

.btn-clear-all-audits:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(220, 38, 38, 0.35);
}

.audit-educator-banner {
  background: #D1FAE5;
  border: 1px solid #10B981;
  border-radius: 8px;
  padding: 0.85rem 1.15rem;
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.audit-educator-title {
  font-weight: 700;
  color: #065F46;
  font-size: 0.95rem;
}

.audit-educator-desc {
  font-size: 0.82rem;
  color: #047857;
  margin-top: 0.2rem;
}

.audit-educator-amount {
  font-size: 1rem;
  color: #065F46;
}

.btn-clear-educator-filter {
  background: #065F46;
  color: #FFFFFF;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  touch-action: manipulation;
}

/* Horizontal Swipeable Chips Bar for Audit Filter */
.admin-audit-chips-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.admin-audit-log-card {
  border: 1px solid var(--border-sand, #E2E8F0);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

@media (max-width: 768px) {
  .admin-audit-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .admin-audit-chips-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding: 0.35rem 0.2rem;
    margin-bottom: 1rem;
    gap: 0.45rem;
  }

  .admin-audit-chips-bar::-webkit-scrollbar {
    display: none;
  }

  .admin-audit-chips-bar .notice-admin-filter-chip {
    flex-shrink: 0;
    min-height: 38px;
    padding: 0.4rem 0.85rem;
    font-size: 0.82rem;
    scroll-snap-align: start;
    display: inline-flex;
    align-items: center;
    touch-action: manipulation;
  }
}

@media (max-width: 640px) {
  .admin-audit-filter-wrap {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.55rem !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 0.5rem !important;
  }

  .admin-audit-educator-select,
  .admin-audit-search-input,
  .btn-clear-all-audits {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
    min-height: 42px !important;
    box-sizing: border-box !important;
    font-size: 0.88rem !important;
  }

  .btn-clear-all-audits {
    justify-content: center !important;
  }

  .audit-educator-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem 0.95rem;
  }

  .btn-clear-educator-filter {
    width: 100%;
    justify-content: center;
    min-height: 38px;
  }

  .admin-audit-log-card {
    padding: 0.85rem;
  }
}

/* 4. Admin Settings Profile Save Button */
.btn-admin-settings-submit {
  width: 100%;
  max-width: 340px;
  font-size: 0.88rem;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  box-sizing: border-box;
  text-align: center;
}

@media (max-width: 640px) {
  .btn-admin-settings-submit {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0.7rem 1rem !important;
    font-size: 0.85rem !important;
  }
}

/* ==========================================================================
   Desktop Site on Mobile Device Touch & Scaling Rules
   ========================================================================== */
@media (hover: none), (pointer: coarse) {
  .portal-modal-card {
    max-width: min(1100px, 96vw) !important;
    max-height: min(92dvh, 880px) !important;
    width: 96% !important;
    overscroll-behavior: contain;
  }

  .dashboard-content-body,
  .student-table-container,
  .ledger-table-wrap,
  .request-cards-grid {
    -webkit-overflow-scrolling: touch;
  }

  .dash-tab-btn,
  .role-tab-btn,
  .modal-tab-btn {
    min-height: 42px;
    touch-action: manipulation;
  }

  .metallic-card-3d {
    touch-action: manipulation;
  }
}

/* ==========================================================================
 * COMPREHENSIVE MOBILE & TABLET RESPONSIVE SYSTEM (v90.0)
 * ========================================================================== */

/* 1. Admin Email Campaign & Invoicing Grid */
.admin-email-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.admin-email-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-email-toggles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.admin-email-actions-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-sand);
  padding-top: 1rem;
}

@media (max-width: 640px) {
  .admin-email-metrics-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.6rem !important;
  }

  .admin-email-form-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  .admin-email-toggles-grid {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
  }

  .admin-email-actions-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.65rem !important;
  }

  .admin-email-actions-bar .admin-email-sub-actions {
    flex-direction: column !important;
    width: 100% !important;
  }

  .admin-email-actions-bar button {
    width: 100% !important;
    justify-content: center !important;
    height: 44px !important;
    font-size: 0.88rem !important;
  }

  /* 2. Radial Meter on Mobile */
  .fee-radial-meter-container {
    flex-direction: column !important;
    text-align: center !important;
    padding: 1rem 0.85rem !important;
    gap: 0.75rem !important;
  }

  .fee-radial-info h4 {
    font-size: 1rem !important;
  }

  .fee-radial-info p {
    font-size: 0.82rem !important;
  }

  /* 3. Student Details & Profile Box Grids */
  .detail-items-grid {
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
  }

  .detail-box[style*="grid-column"] {
    grid-column: span 1 !important;
  }

  .detail-box {
    padding: 0.8rem 0.95rem !important;
  }

  /* 4. Student Fee Cards Grid */
  .fee-summary-cards-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.55rem !important;
  }

  .fee-stat-box {
    padding: 0.75rem 0.8rem !important;
  }

  .fee-stat-box.fee-stat-box-hero {
    grid-column: span 2 !important;
  }

  .fee-stat-label {
    font-size: 0.7rem !important;
    letter-spacing: 0.02em !important;
  }

  .fee-stat-value {
    font-size: 1.2rem !important;
  }

  .fee-stat-box-hero .fee-stat-value {
    font-size: 1.45rem !important;
  }

  .fee-stat-sub {
    font-size: 0.72rem !important;
  }



  /* 6. Admin Profile & Account Settings Grid on Mobile */
  .admin-profile-cards-grid {
    grid-template-columns: 1fr !important;
    gap: 1.15rem !important;
  }

  .admin-form-row-2col {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }

  .admin-profile-card {
    padding: 1rem 0.85rem !important;
  }

  .admin-avatar-card-inner {
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.85rem !important;
    padding: 0.75rem !important;
  }

  .admin-avatar-preview-box {
    width: 54px !important;
    height: 54px !important;
    font-size: 1.4rem !important;
  }

  .admin-profile-submit-wrap {
    width: 100% !important;
  }

  .btn-admin-settings-submit {
    width: 100% !important;
    max-width: 100% !important;
    height: 46px !important;
    font-size: 0.92rem !important;
  }

  /* 7. Admin Analytics & Teacher Summary on Mobile */
  .admin-teacher-summary-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  .admin-billing-form-grid {
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
  }

  #adminTriggerBillingBtn {
    width: 100% !important;
    justify-content: center !important;
    height: 44px !important;
  }

  /* 8. Make Changes Control Modal & Sub-pills on Mobile */
  .stu-mgmt-sub-pills-bar {
    display: flex !important;
    gap: 0.45rem !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 0.5rem !important;
    margin-bottom: 1rem !important;
  }

  .stu-mgmt-sub-pills-bar::-webkit-scrollbar {
    display: none !important;
  }

  .mgmt-sub-pill,
  .stu-mgmt-sub-pills-bar .req-sub-pill {
    flex: 0 0 auto !important;
    width: auto !important;
    font-size: 0.8rem !important;
    padding: 0.45rem 0.85rem !important;
    height: 38px !important;
    white-space: nowrap !important;
  }

  .mgmt-quick-presets-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.45rem !important;
  }

  .btn-mgmt-quick-pay {
    width: 100% !important;
    height: 38px !important;
    font-size: 0.82rem !important;
  }

  .mgmt-calc-summary-grid {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
    padding: 0.75rem 0.85rem !important;
  }

  .mgmt-calc-stat-box {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding-bottom: 0.35rem !important;
    border-bottom: 1px dashed #E2E8F0 !important;
  }

  .mgmt-calc-stat-box:last-child {
    padding-bottom: 0 !important;
    border-bottom: none !important;
  }

  .mgmt-profile-grid {
    grid-template-columns: 1fr !important;
    gap: 0.8rem !important;
  }

  .mgmt-profile-grid .col-span-2 {
    grid-column: span 1 !important;
  }

  /* 9. Noticeboard Form & Batch Chks on Mobile */
  #noticeBatchOptionsGrid {
    grid-template-columns: 1fr !important;
    gap: 0.45rem !important;
  }

  /* 10. Large Mobile Textarea Workspace for Email Drafts & Invoices */
  #adminEmailBodyInput,
  .admin-email-textarea {
    min-height: 280px !important;
    height: auto !important;
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    padding: 0.9rem 1rem !important;
    box-sizing: border-box !important;
  }

  #noticeBodyInput {
    min-height: 180px !important;
    height: auto !important;
    font-size: 0.92rem !important;
    line-height: 1.55 !important;
    padding: 0.85rem !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 420px) {
  .admin-email-metrics-grid,
  #adminOverviewStats {
    grid-template-columns: 1fr !important;
  }

  .admin-avatar-card-inner {
    flex-direction: column !important;
    text-align: center !important;
    gap: 0.65rem !important;
  }

  .admin-avatar-ctrls label {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .metallic-card-3d {
    --card-scale: 1;
    min-height: 325px !important;
    height: 325px !important;
  }

  .card-face {
    padding: 0.85rem 1rem !important;
  }

  .metallic-id-inst-name {
    font-size: 0.8rem !important;
  }

  .metallic-id-body h3 {
    font-size: 0.92rem !important;
  }

  .dash-card {
    padding: 1.15rem 0.95rem !important;
    border-radius: 10px !important;
  }

  .dash-card-title {
    font-size: 1rem !important;
  }

  input.portal-input,
  .search-input-field,
  select.portal-input {
    font-size: 16px !important;
    height: 42px !important;
  }

  /* Ultra-mobile generous textarea drafting box */
  textarea.portal-input,
  .admin-email-textarea,
  #adminEmailBodyInput {
    height: auto !important;
    min-height: 280px !important;
    font-size: 16px !important;
    line-height: 1.55 !important;
    padding: 0.9rem 0.85rem !important;
    box-sizing: border-box !important;
    resize: vertical !important;
  }

  #noticeBodyInput {
    height: auto !important;
    min-height: 180px !important;
    font-size: 16px !important;
    line-height: 1.55 !important;
    padding: 0.9rem 0.85rem !important;
    box-sizing: border-box !important;
    resize: vertical !important;
  }
}

/* ==========================================================================
 * Student Account Security & Password Management Card
 * ========================================================================== */
.student-security-card {
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
  overflow: hidden;
  padding: 1.25rem 1.5rem;
}

.student-security-info-box {
  background: #F0F7FF;
  border: 1px solid #BFDBFE;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  box-sizing: border-box;
}

.student-password-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  box-sizing: border-box;
}

.student-pw-input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  width: 100%;
  box-sizing: border-box;
}

.form-group-security {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.security-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  white-space: normal;
  line-height: 1.3;
}

.security-input-wrap {
  position: relative !important;
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  display: block !important;
}

.security-input {
  width: 100% !important;
  min-width: 0 !important;
  height: 46px !important;
  padding: 0.65rem 2.85rem 0.65rem 0.95rem !important;
  font-size: 0.94rem !important;
  border: 1.5px solid #CBD5E1 !important;
  border-radius: 8px !important;
  background: #FAFAFA !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
  display: block !important;
}

.security-input:focus {
  border-color: #2563EB !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
  outline: none !important;
}

.btn-toggle-security-pw {
  position: absolute !important;
  right: 8px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: transparent !important;
  border: none !important;
  color: #64748B !important;
  cursor: pointer !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 6px !important;
  font-size: 1.05rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: color 0.2s, background-color 0.2s !important;
  z-index: 5 !important;
  box-sizing: border-box !important;
  padding: 0 !important;
  line-height: 1 !important;
}

.btn-toggle-security-pw:hover,
.btn-toggle-security-pw:active {
  color: #2563EB !important;
  background-color: rgba(37, 99, 235, 0.08) !important;
}

.security-hint {
  font-size: 0.8rem;
  color: #64748B;
  margin-top: 0.2rem;
  line-height: 1.35;
}

.student-pw-submit-row {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin-top: 0.25rem;
  box-sizing: border-box;
}

.btn-save-password {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 0.92rem !important;
  padding: 0.75rem 1.6rem !important;
  border-radius: 8px !important;
  border: none !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25) !important;
  transition: all 0.2s ease !important;
  height: 46px !important;
  box-sizing: border-box !important;
}

.btn-save-password:hover {
  background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35) !important;
}

.btn-save-password:active {
  transform: translateY(0) !important;
}

.student-password-success-banner {
  background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
  border: 1.5px solid #10B981;
  border-radius: 10px;
  padding: 0.85rem 1.15rem;
  color: #065F46;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  animation: fadeIn 0.3s ease;
  box-sizing: border-box;
}

.success-banner-icon {
  font-size: 1.35rem;
  color: #059669;
  flex-shrink: 0;
}

/* Specific Mobile Responsive Overrides for Security & Password Form */
@media (max-width: 768px) {
  .student-security-card {
    padding: 0.9rem !important;
    border-radius: 10px !important;
    margin-top: 1rem !important;
  }

  .student-security-card .dash-card-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.65rem !important;
    padding-bottom: 0.75rem !important;
  }

  .student-security-card .dash-card-header > div:last-child {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.4rem !important;
  }

  .student-security-info-box {
    padding: 0.75rem 0.85rem !important;
    margin-bottom: 1rem !important;
    font-size: 0.82rem !important;
  }

  .student-pw-input-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.95rem !important;
    width: 100% !important;
  }

  .form-group-security {
    width: 100% !important;
  }

  .security-input-wrap {
    width: 100% !important;
  }

  .security-input {
    width: 100% !important;
    font-size: 0.92rem !important;
    height: 46px !important;
  }

  .student-pw-submit-row {
    width: 100% !important;
    margin-top: 0.5rem !important;
  }

  .btn-save-password {
    width: 100% !important;
    height: 48px !important;
    font-size: 0.95rem !important;
    justify-content: center !important;
  }
}

/* ==========================================================================
 * MOBILE RESPONSIVE ENHANCEMENTS: NOTICEBOARD, BATCHES & TEACHER ANALYTICS
 * ========================================================================== */

@media (max-width: 768px) {
  /* 1. Noticeboard Admin Top Header & Search Bar */
  #adminTabPane-post-notice .dash-card-header,
  #adminTabPane-post-notice .dash-card > div:first-child {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
  }

  #adminTabPane-post-notice #adminNoticeSearchInput,
  #adminNoticeSearchInput {
    width: 100% !important;
    min-width: 100% !important;
  }

  /* 2. Notice Filter Chips Scroll Container */
  .notifications-filter-bar,
  #adminTabPane-post-notice div:has(> .notice-admin-filter-chip) {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 0.4rem !important;
    gap: 0.4rem !important;
    scrollbar-width: none !important;
  }

  .notifications-filter-bar::-webkit-scrollbar,
  #adminTabPane-post-notice div:has(> .notice-admin-filter-chip)::-webkit-scrollbar {
    display: none !important;
  }

  .notice-admin-filter-chip,
  .notice-filter-chip {
    flex-shrink: 0 !important;
    font-size: 0.8rem !important;
    padding: 0.35rem 0.65rem !important;
    white-space: nowrap !important;
  }

  /* 3. Notice Card Top Row & Action Buttons */
  .notice-item-card,
  #adminTabPane-post-notice .dash-card div[style*="border: 1.5px solid"] {
    padding: 0.95rem !important;
  }

  #adminTabPane-post-notice .btn-edit-notice,
  #adminTabPane-post-notice .btn-delete-notice {
    padding: 0.35rem 0.65rem !important;
    font-size: 0.8rem !important;
    height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* 4. Edit Notice Modal Mobile View */
  #editNoticeModal .inner-modal-content {
    max-width: 96% !important;
    margin: 0.5rem auto !important;
    border-radius: 12px !important;
  }

  #editNoticeModal form {
    padding: 1rem !important;
    gap: 0.85rem !important;
  }

  #editNoticeModal div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  #editNoticeModal button[type="submit"] {
    width: 100% !important;
    height: 44px !important;
  }

  /* 5. Batch-Wise Breakdown Mobile Optimization */
  .admin-billing-form-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  .admin-teacher-summary-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }

  #adminTabPane-analytics .dash-card {
    padding: 1rem 0.85rem !important;
  }
}

@media (max-width: 480px) {
  /* Ultra-compact screens (< 480px) */
  #adminPostNoticeForm div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  #noticeBatchOptionsGrid {
    grid-template-columns: 1fr !important;
    gap: 0.45rem !important;
  }

  #editNoticeModal .inner-modal-header h3 {
    font-size: 1rem !important;
  }

  #editNoticeModal .inner-modal-header {
    padding: 0.75rem 1rem !important;
  }
}


/* ============================================================================
   TOAST NOTIFICATIONS
   ----------------------------------------------------------------------------
   Built by showNotification() in js/portal.js. Two nodes exist — a polite
   role="status" one and an assertive role="alert" one — and only the one
   matching the message's urgency is shown, because a live region's politeness
   cannot be changed reliably after it is created.

   visibility, not just opacity: the previous inline-styled version faded to
   opacity 0 while staying hit-testable, so a fixed box over the bottom-right
   of the viewport swallowed taps for the rest of the session. pointer-events
   stays off even while visible — the toast carries no controls, so it has no
   business intercepting input at any point.
   ========================================================================= */
.pragyan-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999999;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(28rem, calc(100vw - 48px));
  padding: 0.75rem 1.35rem;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.4;
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.3s step-end;
  transform: translateY(120%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.pragyan-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* AA-compliant against white text at this weight and size: #059669 was 3.2:1
   and #F59E0B about 2.1:1, both under the 4.5:1 floor. */
.pragyan-toast.is-success { background: #047857; }  /* 5.5:1 */
.pragyan-toast.is-warning { background: #B45309; }  /* 4.8:1 */
.pragyan-toast.is-error   { background: #DC2626; }  /* 4.8:1 */

.pragyan-toast i {
  flex-shrink: 0;
  font-size: 1rem;
}

/* On a phone the toast spans the width instead of shrink-wrapping into a tall
   narrow column, and clears the thumb zone at the bottom edge. */
@media (max-width: 560px) {
  .pragyan-toast {
    left: 12px;
    right: 12px;
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
    max-width: none;
    font-size: 0.88rem;
    padding: 0.7rem 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pragyan-toast {
    transition: opacity 0.15s linear, visibility 0.15s step-end;
    transform: none;
  }
  .pragyan-toast.is-visible {
    transform: none;
  }
}


/* ==========================================================================
   PHASE 2 — COMPONENT POLISH & STATUS TAXONOMY (design-system upgrade)
   --------------------------------------------------------------------------
   Consumes the semantic tokens from variables.css. Appended last so these
   refinements win cascade ties against the legacy rules above without
   !important.
   ========================================================================== */

/* -- Layered elevation on the dashboard card families --------------------- */
.dash-card,
.fee-stat-box,
.admin-stat-card {
  background: linear-gradient(180deg, #ffffff 0%, #FDFDFB 100%);
  outline: 1px solid rgba(255, 255, 255, 0.7);
  outline-offset: -1px;
  box-shadow: var(--elevation-1);
}

.admin-stat-card:hover {
  box-shadow: var(--elevation-2), var(--shadow-emerald-glow);
}

/* -- Status pill taxonomy: six canonical states ----------------------------
    Every pill = tinted bg + AA fg + hairline border + leading state dot, so
    state never relies on hue alone. Tokens come from variables.css.        */
.status-badge {
  border: 1px solid transparent;
  gap: 0.45rem;
}
/* Leading state dot for non-color redundancy. Scoped to .status-badge:
   .fee-status-badge already ships its own FontAwesome glyph. */
.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
  flex-shrink: 0;
}

/* success — Paid / Verified */
.status-paid,
.fee-status-badge.status-cleared,
.status-badge.status-verified {
  background-color: var(--status-success-bg);
  color: var(--status-success-fg);
  border-color: var(--status-success-border);
}
.status-badge.status-verified::before {
  box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.18);
}

/* warning — Pending review */
.status-pending,
.status-badge.status-pending {
  background-color: var(--status-warning-bg);
  color: var(--status-warning-fg);
  border-color: var(--status-warning-border);
}

/* danger — Due / Rejected */
.fee-status-badge.status-due,
.status-badge.status-due,
.status-badge.status-rejected {
  background-color: var(--status-danger-bg);
  color: var(--status-danger-fg);
  border-color: var(--status-danger-border);
}

/* neutral — Adjusted / legacy rows */
.status-badge.status-adjusted {
  background-color: var(--status-neutral-bg);
  color: var(--status-neutral-fg);
  border-color: var(--status-neutral-border);
}

/* info — Billed (statement issued, awaiting payment) */
.status-badge.status-billed {
  background-color: var(--status-info-bg);
  color: var(--status-info-fg);
  border-color: var(--status-info-border);
}

/* -- Stream-coded batch card accents (public pricing grid) ------------------
    CSS-only via :has() on the price key; cards without a match simply show
    no accent, so unknown future batches degrade gracefully.               */
/* No overflow clip on the card: the popular-tag ribbon intentionally
   overhangs the top edge by -14px and must stay visible. */
.batch-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1.1rem;
  bottom: 1.1rem;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background-color: var(--border-sand-dark);
}
.batch-card:has([data-price-key^="class12pcm"])::before,
.batch-card:has([data-price-key^="class11pcm"])::before {
  background: linear-gradient(180deg, var(--primary-emerald) 0%, #059669 100%);
}
.batch-card:has([data-price-key^="class12pcb"])::before,
.batch-card:has([data-price-key^="class11pcb"])::before {
  background: linear-gradient(180deg, #BE123C 0%, #E11D48 100%);
}
.batch-card:has([data-price-key="class10"])::before,
.batch-card:has([data-price-key="class9"])::before {
  background: linear-gradient(180deg, var(--primary-terracotta) 0%, var(--gold-600) 100%);
}
.batch-card:has([data-price-key="class8"])::before,
.batch-card:has([data-price-key="class67"])::before {
  background: linear-gradient(180deg, var(--secondary-sage-text) 0%, var(--secondary-sage) 100%);
}
.batch-card:has([data-price-key="eng912"])::before,
.batch-card:has([data-price-key="eng68"])::before,
.batch-card:has([data-price-key="eng15"])::before {
  background: linear-gradient(180deg, var(--gold-600) 0%, var(--gold-500) 100%);
}
.batch-card:has([data-price-key="junior"])::before {
  background: linear-gradient(180deg, #0369A1 0%, #0EA5E9 100%);
}

/* -- Universal dialog entrance spring ---------------------------------------
    One motion spec for every overlay panel (portal overlay + injected
    backdrops). Reduced-motion users are covered by the global reset.       */
@keyframes modalSpringIn {
  0%   { opacity: 0; transform: translateY(14px) scale(0.97); }
  60%  { opacity: 1; transform: translateY(-2px) scale(1.005); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.portal-overlay.active .inner-modal-content,
.portal-overlay.active .modal-content,
.inner-modal-backdrop.active .inner-modal-content {
  animation: modalSpringIn 0.38s cubic-bezier(0.34, 1.45, 0.64, 1) both;
  will-change: transform, opacity;
}

/* ==========================================================================
   PHASE 3 — VIP ID PASS: PRINT STYLESHEET
   --------------------------------------------------------------------------
   Printing the dashboard previously produced a ink-heavy screenshot of the
   whole app. This isolates the ID pass, flattens it to a printer-safe CR80
   card (86 x 54 mm), strips glow/glimmer/shadows, and forces the front face.
   ========================================================================== */
@media print {
  @page { size: A4 portrait; margin: 14mm; }

  body * { visibility: hidden !important; }
  .metallic-card-3d-container,
  .metallic-card-3d-container * { visibility: visible !important; }

  .metallic-card-3d-container {
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    max-width: none;
    width: 86mm;
  }

  .card-flip-hint,
  .metallic-card-glimmer { display: none !important; }

  .metallic-card-3d,
  .card-face {
    transform: none !important;
    box-shadow: none !important;
    animation: none !important;
    outline: none !important;
    width: 86mm;
    min-height: 54mm;
    height: 54mm;
    border-radius: 3.18mm; /* CR80 corner radius */
  }

  /* Monochrome, high-contrast face: gradients and gold foil do not survive
     consumer printers; solid ink does. */
  .card-face {
    background: #ffffff !important;
    background-image: none !important;
    color: #0B1220 !important;
    border: 1pt solid #064E3B !important;
    backface-visibility: visible !important;
  }
  .card-face * {
    color: #0B1220 !important;
    text-shadow: none !important;
  }
}

/* ==========================================================================
   PHASE 4 — ADMIN & STUDENT PORTAL COMPREHENSIVE MOBILE RESPONSIVENESS
   --------------------------------------------------------------------------
   Guarantees clean, touch-friendly rendering across phones and tablets for
   admin dashboards, statistics grids, management dialogs, filter bars,
   and student fee tables.
   ========================================================================== */
@media (max-width: 768px) {
  .portal-overlay {
    padding: 0.5rem !important;
  }

  .portal-modal-card {
    max-height: 96dvh !important;
    border-radius: 14px !important;
    margin: 0 !important;
    width: 100% !important;
  }

  .portal-close-btn {
    top: 0.65rem !important;
    right: 0.65rem !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    font-size: 1.1rem !important;
  }

  .dashboard-header-bar {
    padding: 1rem 1.15rem !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.85rem !important;
  }

  .dashboard-user-info {
    width: 100% !important;
    gap: 0.85rem !important;
  }

  .user-avatar-circle {
    width: 48px !important;
    height: 48px !important;
    font-size: 1.3rem !important;
    flex-shrink: 0 !important;
  }

  .user-text-details h2 {
    font-size: 1.15rem !important;
  }

  .dashboard-header-actions {
    width: 100% !important;
    justify-content: space-between !important;
    padding-top: 0.5rem !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
  }



  .dashboard-content-body {
    padding: 1rem 0.75rem !important;
  }

  .dash-card {
    padding: 1.15rem 1rem !important;
    margin-bottom: 1rem !important;
  }

  .admin-profile-cards-grid,
  .mgmt-profile-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .mgmt-profile-grid .col-span-2 {
    grid-column: 1 !important;
  }

  .mgmt-calc-summary-grid {
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
    padding: 0.75rem !important;
  }

  .detail-items-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  .metallic-card-3d-container {
    max-width: 100% !important;
    padding: 0 0.25rem !important;
  }

  .metallic-card-3d {
    max-width: 100% !important;
    height: 420px !important;
    min-height: 400px !important;
  }

  .table-responsive,
  .portal-table-container,
  .ledger-table-wrap,
  .student-table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    display: block !important;
  }

  .admin-actions-bar,
  .filter-toolbar-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.65rem !important;
  }

  .admin-actions-bar .btn,
  .filter-toolbar-row .btn,
  .filter-toolbar-row select,
  .filter-toolbar-row input {
    width: 100% !important;
  }
}

/* ==========================================================================
   PHASE: ADMIN ARTICLES & BLOG MANAGER
   ========================================================================== */
.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-sand);
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface-pure);
  color: var(--text-heading);
  cursor: pointer;
  font-size: 0.85rem;
  transition: border-color var(--transition-fast), color var(--transition-fast),
              transform var(--transition-fast), box-shadow var(--transition-fast);
}
.btn-action:hover {
  border-color: var(--primary-emerald);
  color: var(--primary-emerald);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.btn-action:active { transform: scale(0.94); }

@media (pointer: coarse) {
  .btn-action {
    width: var(--tap-target);
    height: var(--tap-target);
  }
}

#blogCoverZone:hover,
#blogCoverZone:focus-visible {
  border-color: var(--primary-emerald) !important;
  background-color: var(--primary-emerald-lighter);
}
#blogCoverZone:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: 2px;
}

/* Admin Blog Editor Header & Action Bar Enhancements */
.blog-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1.5px solid var(--border-sand, #E2E8F0);
}

.blog-editor-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(6, 78, 59, 0.1);
  color: var(--primary-emerald, #064E3B);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.blog-editor-close-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  background: #F1F5F9 !important;
  color: #0F172A !important;
  border: 1.5px solid #CBD5E1 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
  font-size: 1.1rem !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  touch-action: manipulation !important;
  flex-shrink: 0 !important;
}

.blog-editor-close-btn:hover {
  background: #FEE2E2 !important;
  border-color: #FCA5A5 !important;
  color: #DC2626 !important;
  transform: rotate(90deg) scale(1.05) !important;
}

.blog-editor-close-btn:active {
  transform: scale(0.92) !important;
}

.blog-editor-actions-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  border-top: 1.5px solid var(--border-sand, #E2E8F0);
  padding-top: 1.1rem;
  margin-top: 1.25rem;
  background: #FFFFFF;
}

.btn-blog-publish-main {
  min-height: 44px;
  padding: 0.65rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 800;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(6, 78, 59, 0.25);
  transition: all 0.2s ease;
  touch-action: manipulation;
}

.btn-blog-publish-main:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(6, 78, 59, 0.35);
}

.btn-blog-save-draft {
  min-height: 44px;
  padding: 0.65rem 1.3rem;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  touch-action: manipulation;
}

.btn-blog-cancel {
  min-height: 44px;
  padding: 0.65rem 1.15rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  touch-action: manipulation;
}

/* --- Blog Markdown Studio Toolbar & Cheatsheet --- */
.blog-md-studio {
  border: 1.5px solid var(--border-sand, #CBD5E1);
  border-radius: var(--radius-md, 10px);
  background: #FFFFFF;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.blog-md-studio:focus-within {
  border-color: var(--primary-emerald, #064E3B);
  box-shadow: 0 0 0 3px rgba(6, 78, 59, 0.12);
}

.blog-md-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem 0.65rem;
  background: #F8FAFC;
  border-bottom: 1.5px solid var(--border-sand, #E2E8F0);
  user-select: none;
}

.blog-md-toolbar-group {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding-right: 0.4rem;
  margin-right: 0.35rem;
  border-right: 1.5px solid #CBD5E1;
}

.blog-md-toolbar-group:last-child {
  border-right: none;
  padding-right: 0;
  margin-right: 0;
}

.blog-md-btn {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  color: #334155;
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.blog-md-btn:hover {
  background: #EFF6FF;
  border-color: #93C5FD;
  color: #1D4ED8;
  transform: translateY(-1px);
}

.blog-md-btn:active {
  transform: scale(0.95);
}

.blog-md-btn-callout-tip {
  color: #065F46;
  background: #ECFDF5;
  border-color: #A7F3D0;
}
.blog-md-btn-callout-tip:hover {
  background: #D1FAE5;
  border-color: #34D399;
  color: #047857;
}

.blog-md-btn-callout-info {
  color: #1E40AF;
  background: #EFF6FF;
  border-color: #BFDBFE;
}
.blog-md-btn-callout-info:hover {
  background: #DBEAFE;
  border-color: #60A5FA;
  color: #1D4ED8;
}

.blog-md-btn-callout-warn {
  color: #92400E;
  background: #FFFBEB;
  border-color: #FDE68A;
}
.blog-md-btn-callout-warn:hover {
  background: #FEF3C7;
  border-color: #F59E0B;
  color: #B45309;
}

.blog-md-btn-template {
  color: #5B21B6;
  background: #F5F3FF;
  border-color: #DDD6FE;
  font-weight: 800;
}
.blog-md-btn-template:hover {
  background: #EDE9FE;
  border-color: #A78BFA;
  color: #4C1D95;
}

.blog-md-guide-panel {
  background: #FAF8F5;
  border-bottom: 1.5px solid #E2E8F0;
  padding: 0.85rem 1rem;
  font-size: 0.8rem;
  color: #334155;
  animation: fadeIn 0.2s ease-in-out;
}

.blog-md-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.blog-md-guide-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.blog-md-guide-card h5 {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 800;
  color: #0F172A;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.blog-md-syntax-badge {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.73rem;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  color: #0F172A;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 0.2rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.blog-md-syntax-badge:hover {
  background: #E0E7FF;
  border-color: #C7D2FE;
  color: #3730A3;
}

.blog-md-footer-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  background: #F8FAFC;
  border-top: 1px solid #E2E8F0;
  font-size: 0.75rem;
  color: #64748B;
  font-weight: 600;
}

@media (max-width: 767px) {
  #adminTabPane-blog .dash-card-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
  }
  #adminTabPane-blog .dash-card-header > div {
    flex-direction: column !important;
    width: 100% !important;
    gap: 0.6rem !important;
  }
  #blogAdminFilter,
  #btnNewBlogPost {
    width: 100% !important;
  }
  #blogEditorModal .inner-modal-content {
    padding: 1.15rem 0.95rem !important;
    max-height: 94vh !important;
    max-height: 94dvh !important;
    width: 98vw !important;
    max-width: 98vw !important;
    border-radius: 14px !important;
  }
  .blog-editor-header {
    margin-bottom: 0.95rem;
    padding-bottom: 0.75rem;
  }
  .blog-editor-title {
    font-size: 1.05rem !important;
  }
  .blog-editor-subtitle {
    font-size: 0.75rem !important;
  }
  .blog-editor-close-btn {
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    font-size: 1.2rem !important;
  }
  .blog-editor-actions-bar {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    position: sticky;
    bottom: -1px;
    background: #FFFFFF;
    padding: 0.85rem 0.5rem;
    margin: 1rem -0.95rem -0.95rem -0.95rem;
    border-top: 2px solid var(--border-sand, #E2E8F0);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.06);
    z-index: 20;
  }
  .btn-blog-publish-main {
    width: 100% !important;
    justify-content: center !important;
    min-height: 48px !important;
    font-size: 0.98rem !important;
    order: 1;
  }
  .btn-blog-save-draft {
    width: 100% !important;
    justify-content: center !important;
    min-height: 44px !important;
    order: 2;
  }
  .btn-blog-cancel {
    width: 100% !important;
    justify-content: center !important;
    min-height: 40px !important;
    order: 3;
  }
}

/* ==========================================================================
 * INSTANT PUSH NOTIFICATIONS & BROADCAST HUB STYLES
 * ========================================================================== */

.admin-push-hub {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.push-hub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  background: linear-gradient(135deg, #F0FDF4 0%, #ECFDF5 100%);
  border: 1px solid #A7F3D0;
  border-radius: var(--radius-md, 12px);
  padding: 1.25rem 1.5rem;
}

.push-hub-title {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-emerald, #064E3B);
  margin: 0 0 0.35rem 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.push-hub-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary, #475569);
  margin: 0;
  max-width: 680px;
  line-height: 1.45;
}

.push-hub-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  background: #FFFFFF;
  border: 1px solid #10B981;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #065F46;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.1);
}

.status-dot-pulse {
  width: 8px;
  height: 8px;
  background: #10B981;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.push-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.push-stats-grid .stat-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md, 12px);
  padding: 1.15rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.push-stats-grid .stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.push-stats-grid .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.stat-card-blue .stat-icon {
  background: #EFF6FF;
  color: #2563EB;
  border: 1px solid #DBEAFE;
}

.stat-card-emerald .stat-icon {
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
}

.stat-card-purple .stat-icon {
  background: #FAF5FF;
  color: #9333EA;
  border: 1px solid #E9D5FF;
}

.push-stats-grid .stat-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.push-stats-grid .stat-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.15rem;
}

.push-stats-grid .stat-value {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 1.65rem;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.1;
}

.push-stats-grid .stat-delta {
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.push-presets-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.push-presets-container .push-presets-bar {
  flex: 1;
  min-width: 280px;
}

.btn-register-device {
  background: linear-gradient(135deg, #064E3B 0%, #04382B 100%);
  color: #FFFFFF;
  border: none;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-md, 12px);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 2px 6px rgba(6, 78, 59, 0.2);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-register-device:hover {
  background: linear-gradient(135deg, #065F46 0%, #064E3B 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(6, 78, 59, 0.3);
}

.push-presets-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md, 12px);
  padding: 0.75rem 1.25rem;
}

.preset-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-mahogany, #1E1B18);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-preset {
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-preset:hover {
  background: #ECFDF5;
  border-color: #10B981;
  color: #065F46;
  transform: translateY(-1px);
}

.push-hub-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 991px) {
  .push-hub-grid {
    grid-template-columns: 1fr;
  }
  .push-simulator-col .push-card {
    position: static !important;
    top: auto !important;
  }
}

.push-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md, 12px);
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.push-card + .push-card {
  margin-top: 1.25rem;
}

.push-card-heading {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-mahogany, #1E1B18);
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid #F1F5F9;
}

.push-audience-options {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.push-radio-label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.88rem;
  color: #1E293B;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.push-radio-label:hover {
  background: #F8FAFC;
}

.push-radio-label input[type="radio"] {
  accent-color: var(--primary-emerald, #064E3B);
  width: 1.1rem;
  height: 1.1rem;
}

.push-subselector {
  margin-top: 0.85rem;
  padding: 0.85rem;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
}

.subselector-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 0.5rem;
}

.push-batch-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.push-chip {
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  border-radius: 99px;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.push-chip:hover {
  border-color: #064E3B;
  color: #064E3B;
}

.push-chip.active {
  background: #064E3B;
  border-color: #064E3B;
  color: #FFFFFF;
  box-shadow: 0 2px 4px rgba(6, 78, 59, 0.2);
}

.push-emoji-bar,
.push-vars-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.4rem 0 0.85rem 0;
  padding: 0.4rem 0.6rem;
  background: #F8FAFC;
  border: 1px solid #F1F5F9;
  border-radius: 6px;
}

.emoji-label,
.vars-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: #64748B;
  margin-right: 0.25rem;
}

.emoji-btn {
  background: transparent;
  border: none;
  font-size: 1.15rem;
  cursor: pointer;
  padding: 0.15rem 0.3rem;
  border-radius: 4px;
  transition: transform 0.15s ease, background 0.15s ease;
}

.emoji-btn:hover {
  background: #E2E8F0;
  transform: scale(1.2);
}

.btn-var-tag {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 4px;
  color: #1D4ED8;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-var-tag:hover {
  background: #DBEAFE;
  border-color: #3B82F6;
  transform: translateY(-1px);
}

/* Phone Mockup Frame */
.phone-mockup-frame {
  background: linear-gradient(180deg, #1E293B 0%, #0F172A 100%);
  border: 12px solid #334155;
  border-radius: 36px;
  padding: 1.5rem 1rem 2rem 1rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  color: #FFFFFF;
  position: relative;
  max-width: 320px;
  margin: 0 auto;
}

.phone-speaker-bar {
  width: 60px;
  height: 4px;
  background: #475569;
  border-radius: 99px;
  margin: 0 auto 1.25rem auto;
}

.phone-lockscreen-time {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 300;
  letter-spacing: -0.5px;
  color: #F8FAFC;
  line-height: 1;
}

.phone-lockscreen-date {
  text-align: center;
  font-size: 0.8rem;
  color: #94A3B8;
  margin: 0.25rem 0 1.5rem 0;
}

.phone-notif-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-radius: 14px;
  padding: 0.85rem;
  color: #0F172A;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: notifSlideDown 0.3s ease;
}

@keyframes notifSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.sim-notif-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.sim-notif-app {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.sim-app-icon {
  width: 16px;
  height: 16px;
  border-radius: 3px;
}

.sim-app-name {
  font-size: 0.68rem;
  font-weight: 800;
  color: #064E3B;
  letter-spacing: 0.5px;
}

.sim-notif-time {
  font-size: 0.68rem;
  color: #64748B;
}

.sim-notif-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 0.25rem;
  line-height: 1.25;
}

.sim-notif-body {
  font-size: 0.78rem;
  color: #334155;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.sim-notif-actions {
  display: flex;
  gap: 0.4rem;
  border-top: 1px solid #E2E8F0;
  padding-top: 0.45rem;
}

.sim-action-btn {
  flex: 1;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  padding: 0.35rem 0.5rem;
  font-size: 0.74rem;
  font-weight: 700;
  color: #064E3B;
  text-align: center;
}

/* Student In-Dashboard Prompt Card */
.student-push-prompt-card {
  background: linear-gradient(135deg, #ECFDF5 0%, #F0FDF4 100%);
  border: 1.5px solid #10B981;
  border-radius: var(--radius-md, 12px);
  padding: 1.15rem 1.35rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.push-prompt-header {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.push-prompt-icon {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
}

.push-prompt-title {
  font-size: 1rem;
  font-weight: 800;
  color: #064E3B;
  margin: 0 0 0.25rem 0;
}

.push-prompt-desc {
  font-size: 0.85rem;
  color: #334155;
  margin: 0;
  line-height: 1.4;
}

.push-prompt-actions {
  display: flex;
  gap: 0.65rem;
  margin-left: 2.45rem;
  flex-wrap: wrap;
}

.push-prompt-success {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #065F46;
}

@media (max-width: 640px) {
  .student-push-prompt-card {
    padding: 0.95rem 1rem;
  }
  .push-prompt-actions {
    margin-left: 0;
    width: 100%;
  }
  .push-prompt-actions .btn {
    flex: 1;
    min-height: 40px;
    justify-content: center;
  }
}

/* ==========================================================================
 * PUSH ALERTS & BROADCAST SUITE RESPONSIVE ENHANCEMENTS
 * ========================================================================== */

.push-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.95rem;
}

.push-sub-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.35rem;
}

.push-dispatch-wrap {
  margin-top: 1rem;
}

.btn-dispatch-push-main {
  width: 100%;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  font-size: 0.96rem;
  font-weight: 800;
  min-height: 48px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(6, 78, 59, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  touch-action: manipulation;
}

.btn-dispatch-push-main:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(6, 78, 59, 0.35);
}

.btn-dispatch-push-main:active {
  transform: scale(0.98);
}

.push-logs-desktop-wrap {
  display: block;
}

.push-logs-mobile-list {
  display: none;
}

.push-logs-scroll-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
  border: 1px solid #E2E8F0;
  background: #FFFFFF;
}

.push-logs-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

/* Mobile Push Log Card */
.push-log-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md, 12px);
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: all 0.2s ease;
}

.push-log-card:active {
  background: #F8FAFC;
}

.push-log-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.push-log-card-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.push-log-card-title {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: #0F172A;
  word-break: break-word;
  line-height: 1.3;
}

.push-log-card-time {
  font-size: 0.76rem;
  color: #64748B;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.push-log-card-body {
  font-size: 0.82rem;
  color: #334155;
  background: #F8FAFC;
  border: 1px solid #F1F5F9;
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  line-height: 1.45;
  word-break: break-word;
}

.push-log-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.78rem;
}

.push-log-card-sender {
  color: #64748B;
  font-size: 0.76rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.push-log-card-progress {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border-top: 1px dashed #E2E8F0;
  padding-top: 0.55rem;
}

.push-log-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: #475569;
}

.push-log-progress-pct {
  font-weight: 800;
  color: #065F46;
}

.push-log-progress-bar {
  width: 100%;
  height: 6px;
  background: #E2E8F0;
  border-radius: 99px;
  overflow: hidden;
}

.push-log-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10B981 0%, #059669 100%);
  border-radius: 99px;
  transition: width 0.3s ease;
}

.push-log-pruned-note {
  font-size: 0.72rem;
  color: #DC2626;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.15rem;
}

.student-search-item {
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  font-size: 0.84rem;
  border-bottom: 1px solid #F1F5F9;
  min-height: 44px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  transition: background 0.15s ease;
}

.student-search-item:hover,
.student-search-item:active {
  background: #ECFDF5;
  color: #065F46;
}

.push-student-dropdown {
  position: relative;
  z-index: 20;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Touch & Mobile Responsiveness for Push Alerts Hub */
@media (max-width: 768px) {
  .admin-push-hub {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .push-hub-header {
    padding: 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    border-radius: 12px;
  }

  .push-hub-title {
    font-size: 1.22rem;
    line-height: 1.3;
  }

  .push-hub-subtitle {
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .push-hub-status-badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: 99px;
  }

  /* Dual View: Hide table, show card list on mobile */
  .push-logs-desktop-wrap {
    display: none !important;
  }

  .push-logs-mobile-list {
    display: flex !important;
    flex-direction: column;
    gap: 0.75rem;
  }

  /* Presets Container & Registration Button on Mobile */
  .push-presets-container {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    padding: 0.85rem;
    background: #F8FAFC;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
  }

  .push-presets-container .push-presets-bar {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 0.5rem 0.65rem;
    overflow-x: auto;
    flex-wrap: nowrap;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 0.45rem;
    border: 1px solid #CBD5E1;
  }

  .push-presets-bar::-webkit-scrollbar {
    display: none;
  }

  .preset-label {
    flex-shrink: 0;
    font-size: 0.78rem;
  }

  .btn-preset {
    flex-shrink: 0;
    min-height: 38px;
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    scroll-snap-align: start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
  }

  .btn-preset:active {
    background: #D1FAE5;
    border-color: #059669;
    transform: scale(0.96);
  }

  .btn-register-device {
    width: 100%;
    justify-content: center;
    min-height: 44px;
    font-size: 0.88rem;
    border-radius: 8px;
  }

  /* Compact Stats Grid on Mobile */
  .push-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }

  .push-stats-grid .stat-card:last-child {
    grid-column: span 2;
  }

  .push-stats-grid .stat-card {
    padding: 0.8rem 0.85rem;
    gap: 0.65rem;
    border-radius: 10px;
  }

  .push-stats-grid .stat-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    font-size: 1.1rem;
    border-radius: 8px;
  }

  .push-stats-grid .stat-value {
    font-size: 1.25rem;
  }

  .push-stats-grid .stat-label {
    font-size: 0.7rem;
  }

  .push-stats-grid .stat-delta {
    font-size: 0.68rem;
  }

  .push-card {
    padding: 1rem 0.95rem;
    border-radius: 12px;
  }

  .push-card-heading {
    font-size: 0.98rem;
    margin-bottom: 0.85rem;
  }

  /* Audience Options with Touch-Friendly Hitboxes */
  .push-audience-options {
    gap: 0.5rem;
  }

  .push-radio-label {
    padding: 0.65rem 0.75rem;
    border: 1.5px solid #E2E8F0;
    border-radius: 8px;
    font-size: 0.84rem;
    min-height: 44px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    line-height: 1.35;
  }

  .push-radio-label:active {
    background: #ECFDF5;
    border-color: #10B981;
  }

  .push-radio-label input[type="radio"] {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
  }

  .push-chip {
    min-height: 38px;
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
  }

  /* Horizontal Swipe Bar for Emojis */
  .push-emoji-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 0.4rem 0.5rem;
    gap: 0.35rem;
  }

  .push-emoji-bar::-webkit-scrollbar {
    display: none;
  }

  .emoji-btn {
    min-width: 38px;
    min-height: 38px;
    font-size: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 6px;
  }

  .emoji-btn:active {
    background: #CBD5E1;
    transform: scale(1.25);
  }

  /* Audience Matrix & Composer Mobile Optimization */
  .push-radio-label {
    font-size: 0.84rem;
    padding: 0.55rem 0.65rem;
    word-break: break-word;
  }

  .push-batch-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    width: 100%;
  }

  .push-chip {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
  }

  .push-subselector {
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }

  .push-emoji-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    width: 100%;
    box-sizing: border-box;
  }

  .emoji-btn {
    min-width: 34px;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Dynamic Variables Bar */
  .push-vars-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    width: 100%;
    box-sizing: border-box;
    padding: 0.4rem 0.5rem;
  }

  .vars-label {
    width: 100%;
    display: block;
    margin-bottom: 2px;
  }

  .btn-var-tag {
    min-height: 34px;
    padding: 0.3rem 0.55rem;
    font-size: 0.76rem;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    touch-action: manipulation;
  }

  .btn-var-tag:active {
    background: #BFDBFE;
    transform: scale(0.96);
  }

  .push-grid-2col,
  .push-actions-grid,
  .push-options-grid {
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
    margin-bottom: 0.75rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .push-grid-2col > div,
  .push-actions-grid > div,
  .push-options-grid > div {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .push-grid-2col input,
  .push-grid-2col select,
  .push-actions-grid input,
  .push-options-grid select {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .push-dispatch-wrap {
    margin-top: 0.85rem;
    width: 100%;
  }

  .btn-dispatch-push-main {
    width: 100%;
    min-height: 48px;
    font-size: 0.95rem;
    justify-content: center;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
  }

  /* Lockscreen Mockup Fluid Scaling */
  .push-simulator-col {
    width: 100%;
    box-sizing: border-box;
  }

  .push-simulator-col .push-card {
    position: static !important;
    top: auto !important;
    margin-top: 0.5rem;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .phone-mockup-frame {
    width: 100% !important;
    max-width: min(280px, 100%) !important;
    box-sizing: border-box !important;
    margin: 0 auto !important;
    border-width: 6px !important;
    border-radius: 24px !important;
    padding: 1rem 0.65rem 1.25rem 0.65rem !important;
    overflow: hidden !important;
  }

  .phone-lockscreen-time {
    font-size: 1.85rem;
  }

  .phone-lockscreen-date {
    font-size: 0.75rem;
    margin-bottom: 1.15rem;
  }

  .phone-notif-card {
    padding: 0.65rem;
    border-radius: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    word-break: break-word;
    overflow: hidden;
  }

  .sim-notif-title {
    font-size: 0.8rem;
    word-break: break-word;
  }

  .sim-notif-body {
    font-size: 0.74rem;
    word-break: break-word;
  }

  .sim-notif-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.45rem;
  }

  .sim-action-btn {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    word-break: break-word;
  }

  .push-prompt-actions {
    margin-left: 0;
    width: 100%;
    flex-direction: column;
  }

  .push-prompt-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 42px;
  }
}

@media (max-width: 480px) {
  .push-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .push-stats-grid .stat-card:last-child {
    grid-column: span 2;
  }

  .push-stats-grid .stat-card {
    padding: 0.65rem 0.75rem;
    gap: 0.5rem;
  }

  .push-stats-grid .stat-value {
    font-size: 1.15rem;
  }

  .phone-mockup-frame {
    width: 100% !important;
    max-width: min(270px, 100%) !important;
    border-width: 6px;
    border-radius: 22px;
    padding: 1rem 0.6rem 1.25rem 0.6rem;
  }
}

/* ==========================================================================
 * DYNAMIC CLASS TIMETABLES & INSTITUTE HOLIDAYS MANAGEMENT STYLES
 * ========================================================================== */

.schedule-admin-hub {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.schedule-header-card {
  background: linear-gradient(135deg, #064E3B 0%, #065F46 55%, #0F766E 100%) !important;
  color: #FFFFFF !important;
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  border: 1.5px solid #047857;
  box-shadow: 0 8px 24px rgba(6, 78, 59, 0.16);
  position: relative;
  overflow: hidden;
}

.schedule-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.schedule-header-info {
  flex: 1;
  min-width: 260px;
}

.schedule-header-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.schedule-header-card .section-tag {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  font-weight: 800;
  backdrop-filter: blur(4px);
}

.schedule-header-card .pill-emerald {
  background: #D1FAE5 !important;
  color: #065F46 !important;
  font-weight: 800;
  border: 1px solid #6EE7B7 !important;
}

.schedule-header-title {
  font-size: clamp(1.18rem, 3vw, 1.45rem);
  font-weight: 800;
  color: #FFFFFF !important;
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.3;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.schedule-header-subtitle {
  color: #F1F5F9 !important;
  font-size: clamp(0.82rem, 2vw, 0.92rem);
  font-weight: 500;
  line-height: 1.5;
  margin: 0.35rem 0 0 0;
  max-width: 720px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.schedule-header-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  align-items: center;
}

.btn-schedule-action {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  touch-action: manipulation;
  white-space: nowrap;
}

/* Toolbar & Filters */
.schedule-toolbar {
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

.schedule-toolbar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.schedule-batch-selector-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.schedule-batch-selector-wrap label {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0F172A;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.schedule-batch-select {
  background: #F8FAFC !important;
  border: 1.5px solid #94A3B8 !important;
  color: #0F172A !important;
  font-weight: 800 !important;
  font-size: 0.95rem !important;
  padding: 0.55rem 0.85rem !important;
  border-radius: 8px !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  min-width: 240px;
  min-height: 42px;
}

.schedule-batch-select:focus {
  border-color: #047857 !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.2) !important;
}

.schedule-quick-actions-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.btn-repeat-week,
.btn-toggle-day-off {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  touch-action: manipulation;
  white-space: nowrap;
}

/* Days of the Week Bar */
.student-schedule-week-bar {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.5rem;
  background: #F1F5F9;
  border-radius: 10px;
  border: 1px solid #E2E8F0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}

.student-schedule-week-bar::-webkit-scrollbar {
  display: none;
}

.student-week-chip {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1.5px solid #CBD5E1;
  background: #FFFFFF;
  font-size: 0.85rem;
  font-weight: 800;
  color: #1E293B;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  scroll-snap-align: start;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  touch-action: manipulation;
  min-height: 40px;
}

.student-week-chip:hover {
  background: #E2E8F0;
  border-color: #94A3B8;
  color: #0F172A;
  transform: translateY(-1px);
}

.student-week-chip.active {
  background: linear-gradient(135deg, #065F46 0%, #047857 100%) !important;
  color: #FFFFFF !important;
  border-color: #047857 !important;
  box-shadow: 0 4px 12px rgba(4, 120, 87, 0.35);
  transform: translateY(-1px);
}

.day-chip-off {
  color: #DC2626;
  font-weight: 900;
}

/* Periods Grid & Cards */
.schedule-periods-section {
  margin-bottom: 1.5rem;
}

.schedule-periods-header {
  margin-bottom: 1.15rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.schedule-periods-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.35;
}

.schedule-count-pill {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0F172A;
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  white-space: nowrap;
}

.schedule-periods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.schedule-period-card {
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.schedule-period-card:hover {
  transform: translateY(-2px);
  border-color: #94A3B8;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.09);
}

.schedule-period-card.is-off {
  background: linear-gradient(135deg, #FFF5F5 0%, #FEF2F2 100%) !important;
  border: 1.5px solid #F87171 !important;
  border-left: 5px solid #DC2626 !important;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.08);
}

.period-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.period-number-badge {
  background: #D1FAE5;
  color: #065F46;
  border: 1.5px solid #6EE7B7;
  padding: 0.28rem 0.65rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.period-subject-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0F172A;
  margin: 0.45rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1.4;
  word-break: break-word;
}

.period-time-badge {
  background: #FEF3C7;
  color: #78350F;
  border: 1.5px solid #FCD34D;
  padding: 0.35rem 0.8rem;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.period-meta-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: #1E293B;
  border-top: 1.5px solid #E2E8F0;
  padding-top: 0.85rem;
}

.period-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #334155;
  font-weight: 600;
  word-break: break-word;
}

.period-meta-item strong {
  color: #0F172A;
  font-weight: 800;
  flex-shrink: 0;
}

.period-meta-item i {
  color: #047857;
  width: 18px;
  text-align: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.period-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  border-top: 1.5px solid #F1F5F9;
  padding-top: 0.85rem;
}

.btn-edit-period,
.btn-toggle-period-off,
.btn-delete-period {
  font-weight: 800;
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  touch-action: manipulation;
  min-height: 38px;
}

.btn-edit-period {
  background: #F1F5F9;
  border: 1.5px solid #94A3B8;
  color: #0F172A;
}

.btn-delete-period {
  background: #FFE4E6;
  border: 1.5px solid #FDA4AF;
  color: #BE123C;
}

/* Empty Timetable State */
.schedule-empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: #F8FAFC;
  border-radius: 12px;
  border: 2px dashed #CBD5E1;
  box-sizing: border-box;
}

.schedule-empty-icon {
  font-size: 2.6rem;
  color: #64748B;
  margin-bottom: 0.75rem;
  display: block;
}

.schedule-empty-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 0.35rem;
}

.schedule-empty-subtitle {
  color: #475569;
  font-size: 0.9rem;
  font-weight: 500;
  max-width: 480px;
  margin: 0 auto 1.25rem auto;
  line-height: 1.45;
}

.schedule-empty-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-empty-add-period {
  background: #10B981;
  color: #FFFFFF;
  font-weight: 800;
  padding: 0.55rem 1.2rem;
  border-radius: 8px;
  border: 1.5px solid #34D399;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.btn-empty-seed-default {
  background: #FFFFFF;
  border: 1.5px solid #047857;
  color: #047857;
  font-weight: 800;
  padding: 0.55rem 1.2rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

/* Holidays Section */
.schedule-holidays-section {
  margin-bottom: 1.25rem;
}

.schedule-holidays-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.schedule-holidays-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #78350F;
}

.schedule-holidays-subtitle {
  font-size: 0.86rem;
  color: #475569;
  font-weight: 500;
  margin-top: 0.2rem;
}

.schedule-holidays-empty {
  padding: 2rem 1.5rem;
  text-align: center;
  color: #475569;
  background: #F8FAFC;
  border-radius: 12px;
  border: 2px dashed #CBD5E1;
  margin-top: 1rem;
}

.holiday-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.15rem;
  margin-top: 1rem;
}

.holiday-item-card {
  background: linear-gradient(135deg, #FFFDF5 0%, #FEF9C3 100%);
  border: 1.5px solid #FCD34D;
  border-left: 5px solid #D97706;
  border-radius: 12px;
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.09);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.holiday-item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(217, 119, 6, 0.16);
}

.holiday-title {
  font-weight: 800;
  font-size: 1.08rem;
  color: #78350F;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.holiday-dates {
  font-size: 0.85rem;
  font-weight: 800;
  color: #92400E;
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.holiday-target-meta {
  font-size: 0.85rem;
  color: #334155;
  font-weight: 600;
  margin-top: 0.5rem;
}

.holiday-desc {
  font-size: 0.86rem;
  color: #1E293B;
  margin-top: 0.45rem;
  font-weight: 500;
  font-style: italic;
  line-height: 1.4;
}

.holiday-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  border-top: 1px dashed #FDE68A;
  padding-top: 0.65rem;
  margin-top: 0.65rem;
}

.btn-edit-holiday {
  background: #FEF3C7;
  color: #92400E;
  border: 1.5px solid #FCD34D;
  font-weight: 800;
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 36px;
}

.btn-delete-holiday {
  background: #FEE2E2;
  color: #991B1B;
  border: 1.5px solid #FCA5A5;
  font-weight: 800;
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 36px;
}

/* ==========================================================================
 * TIMETABLE & HOLIDAYS MOBILE BREAKPOINTS (< 768px, < 480px, < 360px)
 * ========================================================================== */

@media (max-width: 768px) {
  /* Admin Timetable Header */
  .schedule-header-card {
    padding: 1.15rem 1rem !important;
    border-radius: 12px !important;
  }

  .schedule-header-inner {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.95rem !important;
  }

  .schedule-header-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.6rem !important;
    width: 100% !important;
  }

  .schedule-header-actions .btn {
    width: 100% !important;
    justify-content: center !important;
    min-height: 44px !important;
    font-size: 0.86rem !important;
    padding: 0.6rem 0.75rem !important;
  }

  /* Admin Toolbar */
  .schedule-toolbar {
    padding: 1rem 0.85rem !important;
    border-radius: 12px !important;
  }

  .schedule-toolbar-top {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.85rem !important;
    margin-bottom: 0.85rem !important;
  }

  .schedule-batch-selector-wrap {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    gap: 0.4rem !important;
  }

  .schedule-batch-select {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 44px !important;
    box-sizing: border-box !important;
  }

  .schedule-quick-actions-bar {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.55rem !important;
    width: 100% !important;
  }

  .schedule-quick-actions-bar .btn {
    width: 100% !important;
    justify-content: center !important;
    min-height: 44px !important;
    font-size: 0.8rem !important;
    padding: 0.5rem 0.6rem !important;
    box-sizing: border-box !important;
  }

  /* Days Week Bar */
  .student-schedule-week-bar {
    padding: 0.4rem !important;
    gap: 0.4rem !important;
  }

  .student-week-chip {
    padding: 0.45rem 0.75rem !important;
    font-size: 0.8rem !important;
    min-height: 42px !important;
  }

  /* Periods Grid */
  .schedule-periods-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
  }

  .schedule-periods-title {
    font-size: 1.05rem !important;
  }

  .schedule-periods-grid {
    grid-template-columns: 1fr !important;
    gap: 0.95rem !important;
  }

  .schedule-period-card {
    padding: 1rem !important;
    border-radius: 12px !important;
    gap: 0.85rem !important;
  }

  .period-top-row {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 0.4rem !important;
  }

  .period-subject-title {
    font-size: 1.05rem !important;
    margin: 0.35rem 0 !important;
  }

  .period-meta-row {
    font-size: 0.84rem !important;
    gap: 0.45rem !important;
    padding-top: 0.75rem !important;
  }

  .period-card-actions {
    display: grid !important;
    grid-template-columns: 1fr 1.2fr auto !important;
    gap: 0.45rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .btn-edit-period,
  .btn-toggle-period-off,
  .btn-delete-period {
    min-height: 40px !important;
    font-size: 0.8rem !important;
    padding: 0.45rem 0.6rem !important;
  }

  /* Empty Periods State */
  .schedule-empty-state {
    padding: 2rem 1rem !important;
  }

  .schedule-empty-actions {
    flex-direction: column !important;
    gap: 0.65rem !important;
    width: 100% !important;
  }

  .schedule-empty-actions .btn {
    width: 100% !important;
    min-height: 44px !important;
    justify-content: center !important;
  }

  /* Holidays Section */
  .schedule-holidays-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
  }

  .btn-add-holiday-header {
    width: 100% !important;
    min-height: 42px !important;
    justify-content: center !important;
  }

  .holiday-list-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }

  .holiday-item-card {
    padding: 1rem !important;
    border-radius: 12px !important;
  }

  .holiday-card-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem !important;
    width: 100% !important;
  }

  .btn-edit-holiday,
  .btn-delete-holiday {
    width: 100% !important;
    min-height: 40px !important;
    justify-content: center !important;
    font-size: 0.82rem !important;
  }
}

@media (max-width: 480px) {
  .schedule-header-actions {
    grid-template-columns: 1fr !important;
  }

  .schedule-quick-actions-bar {
    grid-template-columns: 1fr !important;
  }

  .period-card-actions {
    grid-template-columns: 1fr 1.3fr auto !important;
  }

  .period-time-badge {
    font-size: 0.78rem !important;
    padding: 0.25rem 0.6rem !important;
  }

  .student-week-chip {
    padding: 0.4rem 0.65rem !important;
    font-size: 0.78rem !important;
  }
}

@media (max-width: 360px) {
  .period-card-actions {
    grid-template-columns: 1fr 1fr !important;
  }

  .btn-delete-period {
    grid-column: span 2 !important;
  }
}

/* ==========================================================================
 * ADMIN BATCHES & COURSE MASTER TAB STYLES
 * ========================================================================== */
.admin-batches-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.admin-batches-header {
  background: linear-gradient(135deg, #064E3B 0%, #047857 100%);
  color: #FFFFFF;
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: 0 10px 25px -5px rgba(6, 78, 59, 0.18);
}

.admin-batches-header-title {
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  letter-spacing: -0.02em;
}

.admin-batches-header-sub {
  font-size: 0.88rem;
  color: #D1FAE5;
  margin-top: 0.25rem;
  max-width: 680px;
  line-height: 1.4;
}

.admin-batches-header-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.admin-batches-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
}

.admin-batch-kpi-card {
  background: #FFFFFF;
  border: 1px solid var(--border-sand, #E2E8F0);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.admin-batch-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.07);
}

.admin-batch-kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.admin-batch-kpi-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted, #64748B);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-batch-kpi-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-mahogany, #2D1810);
  margin-top: 0.15rem;
  line-height: 1.1;
}

.admin-batches-toolbar {
  background: #FFFFFF;
  border: 1px solid var(--border-sand, #E2E8F0);
  border-radius: 12px;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.admin-batches-search-wrap {
  position: relative;
  flex: 1;
  min-width: 240px;
}

.admin-batches-search-wrap i {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted, #64748B);
  font-size: 0.9rem;
}

.admin-batches-search-input {
  width: 100%;
  padding: 0.55rem 0.85rem 0.55rem 2.4rem;
  border: 1.5px solid var(--border-sand, #E2E8F0);
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--text-mahogany, #2D1810);
  background: var(--bg-surface-cream, #FAF9F6);
  transition: all 0.15s ease;
}

.admin-batches-search-input:focus {
  outline: none;
  border-color: var(--primary-emerald, #064E3B);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(6, 78, 59, 0.1);
}

.admin-batches-filter-group {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.admin-batches-filter-select {
  padding: 0.55rem 0.85rem;
  border: 1.5px solid var(--border-sand, #E2E8F0);
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-mahogany, #2D1810);
  background: var(--bg-surface-cream, #FAF9F6);
  cursor: pointer;
  transition: all 0.15s ease;
}

.admin-batches-filter-select:focus {
  outline: none;
  border-color: var(--primary-emerald, #064E3B);
  background: #FFFFFF;
}

.admin-batches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 1.25rem;
}

.admin-batch-card {
  background: #FFFFFF;
  border: 1.5px solid var(--border-sand, #E2E8F0);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
}

.admin-batch-card:hover {
  transform: translateY(-3px);
  border-color: #059669;
  box-shadow: 0 10px 24px rgba(6, 78, 59, 0.08);
}

.admin-batch-card-top {
  padding: 1.25rem 1.25rem 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-sand, #F1F5F9);
}

.admin-batch-card-badges {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.admin-batch-code-badge {
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  background: #F0FDF4;
  color: #166534;
  border: 1px solid #BBF7D0;
  letter-spacing: 0.03em;
}

.admin-batch-stream-badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 99px;
  background: #EFF6FF;
  color: #1E40AF;
  border: 1px solid #BFDBFE;
}

.admin-batch-status-badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 99px;
}

.admin-batch-status-badge.active {
  background: #DCFCE7;
  color: #15803D;
  border: 1px solid #86EFAC;
}

.admin-batch-status-badge.upcoming {
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #FDE68A;
}

.admin-batch-status-badge.archived {
  background: #F1F5F9;
  color: #64748B;
  border: 1px solid #CBD5E1;
}

.admin-batch-card-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text-mahogany, #2D1810);
  line-height: 1.25;
}

.admin-batch-card-class {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted, #64748B);
  margin-top: 0.15rem;
}

.admin-batch-card-tagline {
  font-size: 0.8rem;
  color: #047857;
  background: #ECFDF5;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  margin-top: 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
}

.admin-batch-card-body {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.admin-batch-fee-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface-cream, #FAF9F6);
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border-sand, #E2E8F0);
}

.admin-batch-fee-val {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--primary-emerald, #064E3B);
}

.admin-batch-annual-fee {
  font-size: 0.78rem;
  color: var(--text-muted, #64748B);
  font-weight: 600;
}

.admin-batch-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.84rem;
  color: var(--text-mahogany, #2D1810);
}

.admin-batch-meta-item i {
  color: var(--primary-emerald, #064E3B);
  width: 16px;
  text-align: center;
  font-size: 0.88rem;
}

.admin-batch-occupancy-wrap {
  margin-top: 0.25rem;
}

.admin-batch-occupancy-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted, #64748B);
  margin-bottom: 0.3rem;
}

.admin-batch-occupancy-bar {
  height: 8px;
  border-radius: 99px;
  background: #E2E8F0;
  overflow: hidden;
}

.admin-batch-occupancy-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #10B981, #047857);
  transition: width 0.3s ease;
}

.admin-batch-subjects-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.admin-batch-subject-chip {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  background: #F8FAFC;
  color: #334155;
  border: 1px solid #E2E8F0;
}

.admin-batch-card-footer {
  padding: 0.75rem 1.25rem;
  background: #FAFAFA;
  border-top: 1px solid var(--border-sand, #F1F5F9);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.btn-batch-action {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-batch-edit {
  background: var(--primary-emerald, #064E3B);
  color: #FFFFFF;
  border: 1px solid var(--primary-emerald, #064E3B);
}

.btn-batch-edit:hover {
  background: #047857;
}

.btn-batch-view-stu {
  background: #F1F5F9;
  color: #334155;
  border: 1px solid #CBD5E1;
}

.btn-batch-view-stu:hover {
  background: #E2E8F0;
  color: #0F172A;
}

.btn-batch-delete {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECACA;
  padding: 0.4rem 0.6rem;
}

.btn-batch-delete:hover {
  background: #FEE2E2;
}

/* ==========================================================================
 * BATCHES & COURSE MASTER MODAL STYLING
 * ========================================================================== */
.batch-modal-content-box {
  background: #FFFFFF;
  border-radius: 14px;
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  border: 1.5px solid #047857;
  box-sizing: border-box;
}

.batch-modal-header-top {
  background: linear-gradient(135deg, #064E3B 0%, #047857 100%);
  color: #fff;
  padding: 1.25rem 1.5rem;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.batch-modal-form {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  box-sizing: border-box;
}

.batch-modal-label {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-mahogany, #2D1810);
  display: block;
  margin-bottom: 0.3rem;
}

.batch-modal-hint {
  font-weight: normal;
  color: var(--text-muted, #64748B);
  font-size: 0.78rem;
}

.batch-modal-input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  box-sizing: border-box;
  font-size: 0.9rem;
}

.batch-modal-input.fee-highlight {
  font-weight: 800;
  color: var(--primary-emerald, #064E3B);
}

.batch-modal-grid-2col-split {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1rem;
}

.batch-modal-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.batch-modal-fee-box {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  background: var(--bg-surface-cream, #F8FAFC);
  padding: 1rem;
  border-radius: 10px;
  border: 1.5px solid var(--border-sand, #E2E8F0);
}

.batch-modal-grid-3col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

.batch-modal-grid-tagline {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
}

.batch-modal-actions-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.5rem;
  border-top: 1px solid #E5E7EB;
  padding-top: 1.1rem;
}

.btn-batch-modal-cancel {
  background: #F3F4F6;
  color: var(--text-mahogany, #2D1810);
  font-weight: 700;
  border-radius: 8px;
  padding: 0.6rem 1.35rem;
  cursor: pointer;
  border: none;
  font-size: 0.88rem;
}

.btn-batch-modal-submit {
  background: var(--primary-emerald, #064E3B);
  color: #fff;
  font-weight: 800;
  border-radius: 8px;
  padding: 0.6rem 1.6rem;
  box-shadow: 0 4px 12px rgba(6, 78, 59, 0.2);
  cursor: pointer;
  border: none;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

@media (max-width: 768px) {
  .admin-batches-header {
    padding: 1.1rem 1rem;
    flex-direction: column;
    align-items: flex-start;
    border-radius: 12px;
  }
  .admin-batches-header-title {
    font-size: 1.22rem;
  }
  .admin-batches-header-sub {
    font-size: 0.82rem;
    line-height: 1.45;
  }
  .admin-batches-header-actions {
    width: 100%;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.85rem;
  }
  .admin-batches-header-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
    font-size: 0.88rem;
  }
  .admin-batches-kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }
  .admin-batch-kpi-card {
    padding: 0.75rem 0.85rem;
    gap: 0.65rem;
    border-radius: 10px;
  }
  .admin-batch-kpi-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    font-size: 1.05rem;
    border-radius: 8px;
  }
  .admin-batch-kpi-label {
    font-size: 0.68rem;
  }
  .admin-batch-kpi-value {
    font-size: 1.18rem;
  }
  .admin-batches-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }
  .admin-batches-search-wrap {
    width: 100%;
  }
  .admin-batches-search-input {
    width: 100%;
    min-height: 44px;
    font-size: 0.88rem;
    box-sizing: border-box;
  }
  .admin-batches-filter-group {
    width: 100%;
    flex-direction: column;
    gap: 0.5rem;
  }
  .admin-batches-filter-select {
    width: 100%;
    min-height: 44px;
    font-size: 0.85rem;
    box-sizing: border-box;
  }
  .admin-batches-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .admin-batch-card {
    border-radius: 12px;
  }
  .admin-batch-card-top {
    padding: 1rem 1rem 0.85rem;
  }
  .admin-batch-card-title {
    font-size: 1.15rem;
    line-height: 1.3;
  }
  .admin-batch-card-body {
    padding: 0.85rem 1rem;
    gap: 0.65rem;
  }
  .admin-batch-card-footer {
    padding: 0.75rem 1rem;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.45rem;
  }
  .btn-batch-action {
    flex: 1 1 auto;
    justify-content: center;
    min-height: 42px;
    font-size: 0.82rem;
    padding: 0.45rem 0.65rem;
    box-sizing: border-box;
  }
  .btn-batch-delete {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    flex: 0 0 42px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Modal Mobile Overrides */
  .batch-modal-content-box {
    max-height: 94vh;
    border-radius: 12px;
    margin: 0.5rem;
  }
  .batch-modal-header-top {
    padding: 1rem 1.15rem;
  }
  .batch-modal-form {
    padding: 1.15rem 1rem;
    gap: 0.9rem;
  }
  .batch-modal-grid-2col-split,
  .batch-modal-grid-2col,
  .batch-modal-grid-3col,
  .batch-modal-grid-tagline {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .batch-modal-fee-box {
    grid-template-columns: 1fr;
    padding: 0.85rem;
    gap: 0.75rem;
  }
  .batch-modal-actions-footer {
    flex-direction: column-reverse;
    gap: 0.5rem;
  }
  .btn-batch-modal-cancel,
  .btn-batch-modal-submit {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .admin-batches-kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .admin-batches-kpi-grid .admin-batch-kpi-card:last-child {
    grid-column: span 2;
  }
  .admin-batch-kpi-card {
    padding: 0.65rem 0.7rem;
    gap: 0.5rem;
  }
  .admin-batch-kpi-value {
    font-size: 1.08rem;
  }
}

/* ==========================================================================
 * NOTICEBOARD PERSONALIZATION TAGS COMPOSER
 * ========================================================================== */

.notice-tags-composer-box {
  background: linear-gradient(135deg, #ECFDF5 0%, #F0FDF4 100%);
  border: 1.5px dashed #10B981;
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  margin-bottom: 0.95rem;
  box-sizing: border-box;
}

.notice-tags-composer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.55rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.notice-tags-composer-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #065F46;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.notice-tags-composer-hint {
  font-size: 0.76rem;
  color: #047857;
  font-weight: 600;
}

.notice-tag-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.btn-insert-notice-tag {
  background: #ffffff;
  border: 1px solid #10B981;
  color: #065F46;
  padding: 0.28rem 0.65rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.btn-insert-notice-tag:hover {
  background: #059669;
  color: #ffffff;
  border-color: #059669;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(5,150,105,0.25);
}

.btn-insert-notice-tag:active {
  transform: translateY(0);
}

/* ==========================================================================
 * STUDENT BATCH OVERVIEW & TIMETABLE RESPONSIVE SUITE
 * ========================================================================== */

.batch-overview-card {
  border: 1.5px solid var(--border-sand, #E2E8F0);
  border-radius: 12px;
  background: #FFFFFF;
  padding: 1.25rem;
  box-sizing: border-box;
}

.batch-info-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.batch-title-tag {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary-emerald, #064E3B);
  margin-top: 0.25rem;
  word-break: break-word;
}

.batch-overview-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.batch-metric-box {
  background: var(--bg-surface-cream, #FAF9F6);
  border: 1px solid var(--border-sand, #E2E8F0);
  border-radius: 10px;
  padding: 0.75rem 0.5rem;
  text-align: center;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.batch-metric-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted, #64748B);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.batch-metric-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-mahogany, #1E1B18);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.batch-metric-value.fee-val {
  color: var(--primary-emerald, #064E3B);
}

/* Student Timetable Schedule Day Tabs (Segmented Control) */
.schedule-day-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #F1F5F9;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid #E2E8F0;
  width: 100%;
  box-sizing: border-box;
}
.schedule-day-tabs::-webkit-scrollbar {
  display: none;
}

.btn-day-tab {
  background: transparent;
  border: none;
  color: #64748B;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
  transition: all 0.15s ease;
  flex: 1 1 0;
  min-width: 0;
  justify-content: center;
  min-height: 32px;
  max-height: 34px;
  box-sizing: border-box;
}

.btn-day-tab:hover:not(.active) {
  background: #E2E8F0;
  color: #0F172A;
}

.btn-day-tab.active {
  background: var(--primary-emerald, #064E3B);
  color: #FFFFFF;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(6, 78, 59, 0.25);
}

.today-indicator-dot {
  width: 5px;
  height: 5px;
  background: #F59E0B;
  border-radius: 50%;
  display: inline-block;
}
.btn-day-tab.active .today-indicator-dot {
  background: #A7F3D0;
}

/* Student Schedule List & Rows */
.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.schedule-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: #FAF9F6;
  border: 1px solid var(--border-sand, #E2E8F0);
  border-radius: 10px;
  transition: all 0.15s ease;
  width: 100%;
  box-sizing: border-box;
}

.schedule-row:hover {
  background: #F0FDF4;
  border-color: #86EFAC;
}

.schedule-row-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

.schedule-subject-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #D1FAE5;
  color: #065F46;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.schedule-subject-icon.icon-cancelled {
  background: #FEE2E2;
  color: #DC2626;
}

.schedule-subject-details {
  min-width: 0;
  flex: 1;
}

.schedule-subject-title {
  font-size: 0.95rem;
  color: var(--text-mahogany, #1E1B18);
  line-height: 1.35;
  word-break: break-word;
}

.schedule-subject-title.cancelled-text {
  text-decoration: line-through;
  color: #94A3B8;
}

.schedule-subject-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.schedule-meta-chip {
  font-size: 0.76rem;
  font-weight: 600;
  color: #64748B;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.schedule-row-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
  flex-shrink: 0;
}

.schedule-time {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-emerald, #064E3B);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.schedule-time.time-cancelled {
  color: #DC2626;
  text-decoration: line-through;
}

.schedule-cancelled-pill {
  background: #FEE2E2;
  color: #991B1B;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .batch-overview-metrics-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.4rem !important;
  }
  .batch-metric-box {
    padding: 0.55rem 0.25rem !important;
  }
  .batch-metric-label {
    font-size: 0.65rem !important;
  }
  .batch-metric-value {
    font-size: 0.98rem !important;
  }
  .schedule-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.6rem !important;
    padding: 0.75rem 0.85rem !important;
  }
  .schedule-row-right {
    align-items: flex-start !important;
    width: 100% !important;
    border-top: 1px dashed #E2E8F0 !important;
    padding-top: 0.45rem !important;
  }
}

/* ==========================================================================
 * STUDENT FEE ACCOUNT & AUDITED LEDGER RESPONSIVE SUITE
 * ========================================================================== */

.fee-pending-banner {
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
  border: 1.5px solid #FCD34D;
  border-radius: 12px;
  padding: 0.9rem 1.15rem;
  margin-bottom: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.12);
}

.fee-pending-banner-text {
  flex: 1;
  min-width: 200px;
}

.fee-pending-banner-title {
  font-weight: 800;
  font-size: 0.92rem;
  color: #92400E;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.fee-pending-banner-desc {
  font-size: 0.82rem;
  color: #78350F;
  margin-top: 0.25rem;
  line-height: 1.4;
}

.fee-adjustment-banner {
  background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
  border: 1.5px solid #BAE6FD;
  border-radius: 12px;
  padding: 0.9rem 1.15rem;
  margin-bottom: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.1);
}

.fee-adjustment-banner-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 220px;
}

.fee-adjustment-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #0284C7;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.fee-adjustment-title {
  font-weight: 800;
  font-size: 0.9rem;
  color: #0369A1;
}

.fee-adjustment-desc {
  font-size: 0.8rem;
  color: #0C4A6E;
  margin-top: 0.15rem;
  line-height: 1.4;
}

.fee-adjustment-badge {
  background: #0284C7;
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 99px;
  white-space: nowrap;
}

.fee-radial-progress-banner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: linear-gradient(135deg, #ECFDF5 0%, #FFFFFF 100%);
  border: 1.5px solid #A7F3D0;
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  box-sizing: border-box;
}

.fee-summary-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  width: 100%;
  box-sizing: border-box;
}

.fee-stat-box {
  background: #FFFFFF;
  border: 1px solid var(--border-sand, #E2E8F0);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  box-sizing: border-box;
}

.fee-stat-box-hero {
  border: 1.5px solid #A7F3D0;
  background: #F0FDF4;
}

.fee-stat-box-hero.hero-dues-pending {
  border-color: #FCA5A5;
  background: #FEF2F2;
}

.fee-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.fee-hero-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  white-space: nowrap;
}

.fee-hero-badge.badge-due {
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FCA5A5;
}

.fee-hero-badge.badge-cleared {
  background: #D1FAE5;
  color: #065F46;
  border: 1px solid #6EE7B7;
}

.fee-stat-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted, #64748B);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fee-stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-mahogany, #1E1B18);
  margin: 0.2rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fee-stat-value.emerald {
  color: var(--primary-emerald, #064E3B);
}

.fee-stat-value.pending {
  color: #DC2626;
}

.fee-stat-sub {
  font-size: 0.75rem;
  color: var(--text-muted, #64748B);
  line-height: 1.35;
}

.btn-hero-pay {
  background: #064E3B;
  color: #FFFFFF;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-decoration: none;
  transition: all 0.15s ease;
  min-height: 38px;
}
.btn-hero-pay:hover {
  background: #04382A;
  color: #FFFFFF;
}

.fee-statement-dash-card {
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.fee-statement-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.fee-statement-ledger-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.15rem 0.55rem;
  border-radius: 99px;
  width: fit-content;
}

.btn-dash-pay-online {
  font-weight: 800;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.fee-tx-mobile-list {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  box-sizing: border-box;
}

.fee-tx-card {
  background: #FFFFFF;
  border: 1.5px solid var(--border-sand, #E2E8F0);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  box-sizing: border-box;
}

.fee-tx-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border-bottom: 1px dashed #E2E8F0;
  padding-bottom: 0.5rem;
}

.fee-tx-receipt-badge {
  font-family: monospace;
  font-size: 0.84rem;
  font-weight: 800;
  color: #064E3B;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  padding: 0.18rem 0.5rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.fee-tx-card-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  background: #F8FAFC;
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  border: 1px solid #F1F5F9;
}

.fee-tx-amount-label, .fee-tx-date-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.15rem;
}

.fee-tx-amount-val {
  font-size: 1.2rem;
  font-weight: 800;
  color: #064E3B;
}

.fee-tx-date-val {
  font-size: 0.84rem;
  font-weight: 700;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.fee-tx-card-details {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
}

.fee-tx-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.fee-tx-detail-key {
  color: #64748B;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.fee-tx-detail-val {
  color: #1E293B;
  font-weight: 700;
  text-align: right;
}

.fee-tx-detail-note {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FDE68A;
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  font-size: 0.76rem;
  font-weight: 600;
  margin-top: 0.2rem;
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  line-height: 1.35;
}

.fee-tx-card-action {
  margin-top: 0.25rem;
}

.btn-tx-download {
  width: 100% !important;
  min-height: 42px !important;
  font-size: 0.84rem !important;
  font-weight: 800 !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.4rem !important;
  color: #FFFFFF !important;
  border: none !important;
  cursor: pointer !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1) !important;
  transition: transform 0.15s ease, opacity 0.15s ease !important;
}

.btn-tx-download:active {
  transform: scale(0.98) !important;
}

.fee-tx-empty-state {
  text-align: center;
  padding: 2.25rem 1rem;
  background: #FAF9F6;
  border-radius: 12px;
  border: 1px dashed var(--border-sand);
}

.fee-tx-empty-icon {
  font-size: 2.2rem;
  color: #064E3B;
  margin-bottom: 0.5rem;
}

.fee-tx-empty-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-mahogany);
  margin-bottom: 0.35rem;
}

.fee-tx-empty-desc {
  font-size: 0.84rem;
  color: #64748B;
  line-height: 1.5;
  max-width: 360px;
  margin: 0 auto 1.25rem;
}

@media (max-width: 900px) {
  .fee-summary-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .fee-pending-banner, .fee-adjustment-banner {
    padding: 0.75rem 0.85rem !important;
    gap: 0.5rem !important;
  }

  .fee-radial-meter-container {
    flex-direction: row !important;
    text-align: left !important;
    padding: 0.85rem 1rem !important;
    gap: 0.85rem !important;
    border-radius: 12px !important;
  }

  .fee-radial-svg-wrap {
    width: 68px !important;
    height: 68px !important;
  }

  .fee-radial-text-center {
    font-size: 0.95rem !important;
  }

  .fee-radial-text-sub {
    font-size: 0.68rem !important;
  }

  .fee-radial-info h4 {
    font-size: 0.95rem !important;
  }

  .fee-radial-info p {
    font-size: 0.78rem !important;
    line-height: 1.35 !important;
  }

  .fee-summary-cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }

  .fee-stat-box {
    padding: 0.75rem 0.7rem !important;
    border-radius: 10px !important;
  }

  .fee-stat-value {
    font-size: 1.15rem !important;
  }

  .fee-stat-box-hero {
    grid-column: span 2 !important;
  }

  .btn-hero-pay {
    width: 100% !important;
    min-height: 42px !important;
    font-size: 0.88rem !important;
  }

  .fee-statement-card-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.65rem !important;
  }

  .fee-statement-header-action {
    width: 100% !important;
  }

  .btn-dash-pay-online {
    width: 100% !important;
    justify-content: center !important;
    min-height: 42px !important;
  }

  .fee-table-desktop-wrap {
    display: none !important;
  }

  .fee-tx-mobile-list {
    display: flex !important;
  }
}

@media (max-width: 480px) {
  .fee-radial-meter-container {
    flex-direction: column !important;
    text-align: center !important;
    padding: 0.85rem 0.75rem !important;
  }

  .fee-radial-info {
    text-align: center !important;
  }

  .fee-summary-cards-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.45rem !important;
  }

  .fee-stat-box {
    padding: 0.65rem 0.6rem !important;
  }

  .fee-stat-label {
    font-size: 0.68rem !important;
  }

  .fee-stat-value {
    font-size: 1.05rem !important;
  }

  .fee-stat-sub {
    font-size: 0.68rem !important;
  }

  .fee-stat-box-hero .fee-stat-value {
    font-size: 1.35rem !important;
  }

  .fee-tx-card {
    padding: 0.75rem 0.8rem !important;
  }

  .fee-tx-amount-val {
    font-size: 1.1rem !important;
  }
}





/* ── Stream Community Chat Responsive Design ─────────────────────────────── */
#adminTabPane-community.active,
#studentTabPane-community.active {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  box-sizing: border-box !important;
}

.stream-loading-card {
  width: 100% !important;
  max-width: 100% !important;
  min-height: clamp(440px, calc(100dvh - 200px), 720px) !important;
  background: #ffffff !important;
  border-radius: 12px !important;
  border: 1.5px solid var(--border-sand, #DDD5CD) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  padding: 3.5rem 2rem !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
}

.stream-chat-wrapper {
  display: flex;
  flex-direction: column;
  height: clamp(520px, calc(100dvh - 130px), 860px);
  background: #ffffff;
  border-radius: 12px;
  border: 1.5px solid var(--border-sand, #DDD5CD);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  width: 100%;
  box-sizing: border-box;
}

/* Fullscreen Mode & Ancestor Constraints Neutralization */
body.stream-body-fullscreen-lock,
body.stream-chat-is-fullscreen {
  overflow: hidden !important;
  position: static !important;
}

body.stream-body-fullscreen-lock .portal-overlay,
body.stream-chat-is-fullscreen .portal-overlay {
  padding: 0 !important;
  margin: 0 !important;
  filter: none !important;
  backdrop-filter: none !important;
  overflow: visible !important;
  transform: none !important;
  animation: none !important;
  contain: none !important;
  display: block !important;
  background: transparent !important;
}

body.stream-body-fullscreen-lock .portal-modal-card,
body.stream-chat-is-fullscreen .portal-modal-card {
  width: 100vw !important;
  width: 100dvw !important;
  max-width: 100vw !important;
  max-width: 100dvw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100vh !important;
  max-height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  overflow: visible !important;
  transform: none !important;
  animation: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  contain: none !important;
  background: transparent !important;
}

body.stream-body-fullscreen-lock .portal-close-btn,
body.stream-chat-is-fullscreen .portal-close-btn,
body.stream-body-fullscreen-lock .dashboard-header-bar,
body.stream-chat-is-fullscreen .dashboard-header-bar,
body.stream-body-fullscreen-lock .dashboard-nav-tabs,
body.stream-chat-is-fullscreen .dashboard-nav-tabs,
body.stream-body-fullscreen-lock #adminOverviewStats,
body.stream-chat-is-fullscreen #adminOverviewStats {
  display: none !important;
}

body.stream-body-fullscreen-lock .dashboard-wrapper,
body.stream-chat-is-fullscreen .dashboard-wrapper {
  padding: 0 !important;
  margin: 0 !important;
  width: 100vw !important;
  width: 100dvw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  overflow: visible !important;
  transform: none !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

body.stream-body-fullscreen-lock .dashboard-content-body,
body.stream-chat-is-fullscreen .dashboard-content-body {
  padding: 0 !important;
  margin: 0 !important;
  width: 100vw !important;
  width: 100dvw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  overflow: visible !important;
  transform: none !important;
}

body.stream-body-fullscreen-lock .tab-pane,
body.stream-chat-is-fullscreen .tab-pane {
  padding: 0 !important;
  margin: 0 !important;
  width: 100vw !important;
  width: 100dvw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  animation: none !important;
  transform: none !important;
}

body.stream-body-fullscreen-lock #stream-community-chat-app,
body.stream-chat-is-fullscreen #stream-community-chat-app {
  width: 100vw !important;
  width: 100dvw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  padding: 0 !important;
  margin: 0 !important;
}

.stream-chat-wrapper.stream-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  width: 100dvw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: none !important;
  max-width: none !important;
  min-height: 100% !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 999999 !important;
  z-index: 2147483647 !important;
  transform: none !important;
  animation: none !important;
  display: flex !important;
  flex-direction: column !important;
  background: #ffffff !important;
  box-sizing: border-box !important;
}

.btn-stream-fullscreen:hover {
  background: rgba(255, 255, 255, 0.22) !important;
  transform: translateY(-1px);
}

.btn-stream-fullscreen:active {
  transform: translateY(0);
}

.stream-ch-pill {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.stream-ch-pill:hover {
  background: rgba(255, 255, 255, 0.22) !important;
  transform: translateY(-1px);
}

.stream-ch-pill.active {
  background: #10B981 !important;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.45);
}

#stream-msg-list {
  scroll-behavior: smooth;
}

#stream-msg-list::-webkit-scrollbar {
  width: 6px;
}

#stream-msg-list::-webkit-scrollbar-thumb {
  background: var(--border-sand, #DDD5CD);
  border-radius: 3px;
}

#stream-msg-input:focus {
  border-color: var(--primary-emerald, #064E3B) !important;
  box-shadow: 0 0 0 3px rgba(6, 78, 59, 0.12) !important;
  outline: none;
}

.stream-msg-row.mine .stream-msg-bubble {
  border-bottom-right-radius: 2px !important;
}

.stream-msg-row.theirs .stream-msg-bubble {
  border-bottom-left-radius: 2px !important;
}

.stream-msg-row .stream-msg-actions {
  opacity: 0.65;
  transition: opacity 0.15s ease;
}

.stream-msg-row:hover .stream-msg-actions {
  opacity: 1;
}

.stream-ch-pill:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.stream-ch-pill:active {
  transform: translateY(0);
}

.stream-cat-pill:hover {
  border-color: var(--primary-emerald, #064E3B) !important;
  color: var(--primary-emerald, #064E3B) !important;
}

@media (min-width: 900px) {
  .desktop-banner-stats {
    display: block !important;
  }
}

/* ── Mobile Tablet & Phone Responsive Layout Rules (< 768px) ── */
@media (max-width: 768px) {
  /* Mobile edge-to-edge container styling for Community Tab */
  .portal-overlay.community-tab-active {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .portal-modal-card.community-tab-active {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 0 !important;
    min-height: 0 !important;
    position: relative !important;
  }

  #adminTabPane-community.active,
  #studentTabPane-community.active {
    display: block !important;
    width: 100% !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
  }

  #adminTabPane-community:not(.active),
  #studentTabPane-community:not(.active) {
    display: none !important;
  }

  #stream-community-chat-app {
    flex: 1 1 auto !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  /* Mobile Launch Gateway Card (Enter Chat Position) */
  .stream-mobile-launch-wrap {
    padding: 1.15rem 0.85rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 1 auto !important;
    min-height: clamp(380px, 60vh, 540px) !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .stream-mobile-launch-card {
    background: #FFFFFF !important;
    border: 1.5px solid var(--border-sand, #E2E8F0) !important;
    border-radius: 16px !important;
    padding: 1.5rem 1.15rem !important;
    max-width: 440px !important;
    width: 100% !important;
    box-shadow: 0 8px 28px rgba(6, 78, 59, 0.08) !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    position: relative !important;
    overflow: hidden !important;
    text-align: center !important;
  }

  .stream-mobile-card-top-stripe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 5px !important;
    background: linear-gradient(90deg, #064E3B, #10B981, #F59E0B) !important;
  }

  .stream-mobile-card-avatar {
    width: 58px !important;
    height: 58px !important;
    border-radius: 14px !important;
    background: linear-gradient(135deg, #064E3B 0%, #047857 100%) !important;
    color: #FFFFFF !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.85rem !important;
    margin-bottom: 0.75rem !important;
    box-shadow: 0 6px 18px rgba(6, 78, 59, 0.25) !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
  }

  .stream-mobile-live-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    background: #ECFDF5 !important;
    border: 1px solid #A7F3D0 !important;
    color: #065F46 !important;
    padding: 0.25rem 0.75rem !important;
    border-radius: 99px !important;
    font-size: 0.75rem !important;
    font-weight: 800 !important;
    margin-bottom: 0.75rem !important;
  }

  .stream-live-pulse-dot {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: #10B981 !important;
    display: inline-block !important;
    box-shadow: 0 0 8px #10B981 !important;
  }

  .stream-mobile-card-title {
    font-size: 1.25rem !important;
    font-weight: 900 !important;
    color: #064E3B !important;
    margin: 0 0 0.35rem 0 !important;
    letter-spacing: -0.01em !important;
    line-height: 1.25 !important;
  }

  .stream-mobile-card-subtitle {
    font-size: 0.82rem !important;
    color: #475569 !important;
    margin: 0 0 1.15rem 0 !important;
    line-height: 1.45 !important;
    max-width: 320px !important;
  }

  .stream-mobile-features-list {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
    margin-bottom: 1.35rem !important;
    text-align: left !important;
  }

  .stream-mobile-feature-row {
    display: flex !important;
    align-items: center !important;
    gap: 0.6rem !important;
    background: #F8FAFC !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: 8px !important;
    border: 1px solid #E2E8F0 !important;
    font-size: 0.78rem !important;
    color: #334155 !important;
  }

  .stream-mobile-feature-row span:first-child {
    font-size: 1.1rem !important;
    flex-shrink: 0 !important;
  }

  .stream-mobile-feature-row div strong {
    display: block !important;
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    color: #1E293B !important;
  }

  .stream-mobile-feature-row div p {
    margin: 0.1rem 0 0 0 !important;
    font-size: 0.72rem !important;
    color: #64748B !important;
    line-height: 1.3 !important;
  }

  .stream-launch-chat-btn {
    width: 100% !important;
    padding: 0.75rem 1.25rem !important;
    font-size: 0.95rem !important;
    font-weight: 900 !important;
    border-radius: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    box-shadow: 0 4px 16px rgba(6, 78, 59, 0.3) !important;
    border: none !important;
    cursor: pointer !important;
    background: linear-gradient(135deg, #064E3B 0%, #047857 100%) !important;
    color: #FFFFFF !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
  }

  .stream-launch-chat-btn:active {
    transform: scale(0.98) !important;
  }

  /* Community Chat: Mobile Fullscreen-Only Layout */
  .stream-chat-wrapper,
  .stream-chat-wrapper.stream-fullscreen {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 100vh !important;
    height: 100dvh !important;
    width: 100vw !important;
    width: 100dvw !important;
    max-height: 100dvh !important;
    max-width: 100dvw !important;
    box-sizing: border-box !important;
    z-index: 2147483647 !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: #FFFFFF !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  .stream-loading-card {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    margin: 0 !important;
    width: 100vw !important;
    width: 100dvw !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 2147483647 !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: #FFFFFF !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 2rem 1.5rem !important;
    box-sizing: border-box !important;
  }

  /* Dedicated top app bar on mobile with back button & live count */
  .stream-top-bar,
  .stream-chat-wrapper .stream-top-bar,
  .stream-chat-wrapper.stream-fullscreen .stream-top-bar {
    display: flex !important;
    padding: calc(0.35rem + env(safe-area-inset-top, 0px)) 0.65rem 0.35rem 0.65rem !important;
    min-height: 42px !important;
    height: auto !important;
    flex-shrink: 0 !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: #042E23 !important;
    color: #FFFFFF !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-sizing: border-box !important;
    gap: 0.45rem !important;
  }

  .btn-stream-fullscreen {
    padding: 0.22rem 0.55rem !important;
    font-size: 0.76rem !important;
    font-weight: 800 !important;
    background: rgba(255, 255, 255, 0.18) !important;
    color: #FFFFFF !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.3rem !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
  }

  .btn-stream-fullscreen span {
    display: inline !important;
  }

  /* Hide redundant category filter bar on small screens to conserve vertical space */
  .stream-cat-bar {
    display: none !important;
  }

  /* Horizontal channel bar with clear badges & smooth touch scrolling */
  .stream-channels-scroll-wrap {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.35rem !important;
    padding: 0.35rem 0.6rem !important;
    min-height: 38px !important;
    max-height: 38px !important;
    height: 38px !important;
    background: #F8FAFC !important;
    border-bottom: 1.5px solid #E2E8F0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
  }

  .stream-channels-scroll-wrap::-webkit-scrollbar {
    display: none !important;
  }

  .stream-ch-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.3rem !important;
    font-size: 0.75rem !important;
    font-weight: 800 !important;
    padding: 0.2rem 0.5rem !important;
    min-height: 26px !important;
    height: 26px !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
  }

  /* Active Channel Banner with Title & View Mode pills (Chat vs Media) */
  .stream-active-banner {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0.3rem 0.6rem !important;
    min-height: 36px !important;
    max-height: 38px !important;
    height: 36px !important;
    gap: 0.35rem !important;
    background: var(--primary-emerald, #064E3B) !important;
    color: #FFFFFF !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12) !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
  }

  .stream-active-banner .stream-banner-icon {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    font-size: 0.85rem !important;
    border-radius: 5px !important;
    background: rgba(255, 255, 255, 0.2) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }

  .stream-active-banner h3 {
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    color: #FFFFFF !important;
    margin: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: clamp(80px, 32vw, 150px) !important;
    line-height: 1.2 !important;
  }

  .stream-active-banner .stream-banner-cat-badge,
  .stream-banner-tagline {
    display: none !important;
  }

  .stream-active-banner .stream-view-toggle-wrap {
    display: inline-flex !important;
    align-items: center !important;
    background: rgba(0, 0, 0, 0.28) !important;
    padding: 2px !important;
    border-radius: 6px !important;
    height: 26px !important;
    flex-shrink: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
  }

  .stream-active-banner .stream-view-toggle-wrap .btn-view-mode {
    padding: 0.12rem 0.38rem !important;
    font-size: 0.7rem !important;
    font-weight: 800 !important;
    height: 22px !important;
    border-radius: 4px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.15rem !important;
    cursor: pointer !important;
  }

  .stream-active-banner .btn-clear-group-chat {
    padding: 0.12rem 0.38rem !important;
    font-size: 0.68rem !important;
    height: 24px !important;
    border-radius: 4px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.15rem !important;
    flex-shrink: 0 !important;
  }

  .stream-active-banner .btn-clear-group-chat span {
    display: none !important;
  }

  #stream-pinned-bar {
    padding: 0.25rem 0.6rem !important;
    font-size: 0.74rem !important;
    min-height: 28px !important;
    flex-shrink: 0 !important;
  }

  .pinned-preview-text {
    max-width: clamp(100px, 45vw, 220px) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  #stream-reply-bar {
    padding: 0.25rem 0.6rem !important;
    font-size: 0.74rem !important;
    min-height: 28px !important;
    flex-shrink: 0 !important;
  }

  /* Spacious, scrollable chat message feed */
  #stream-msg-list {
    padding: 0.5rem 0.6rem !important;
    flex: 1 1 0 !important;
    min-height: 0 !important;
    height: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    background: #FAF9F6 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.35rem !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }

  .stream-msg-row {
    margin-bottom: 0.35rem !important;
    gap: 0.35rem !important;
    display: flex !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .stream-avatar {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    font-size: 0.8rem !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
  }

  .stream-msg-bubble-col {
    max-width: 88% !important;
    box-sizing: border-box !important;
  }

  .stream-msg-bubble {
    font-size: 0.86rem !important;
    line-height: 1.4 !important;
    padding: 0.42rem 0.68rem !important;
    border-radius: 12px !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    box-sizing: border-box !important;
  }

  .stream-msg-quote-header {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 0.72rem !important;
    padding: 0.2rem 0.45rem !important;
  }

  .stream-media-gallery-wrap {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 0.65rem 0.65rem !important;
  }

  .stream-media-grid {
    grid-template-columns: 1fr !important;
    gap: 0.6rem !important;
  }

  .stream-media-card, .stream-pdf-card {
    max-width: 100% !important;
  }

  .stream-msg-actions {
    opacity: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
  }

  .stream-msg-actions button {
    min-height: 24px !important;
    min-width: 24px !important;
    padding: 0.15rem 0.35rem !important;
    font-size: 0.72rem !important;
    border-radius: 4px !important;
  }

  /* Spacious, bottom pinned chat composer */
  #stream-chat-form {
    padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom, 8px)) 0.5rem !important;
    gap: 0.35rem !important;
    flex-shrink: 0 !important;
    position: relative !important;
    width: 100% !important;
    background: #FFFFFF !important;
    border-top: 1.5px solid var(--border-sand, #E2E8F0) !important;
    z-index: 60 !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
  }

  #stream-msg-input {
    font-size: 16px !important;
    min-height: 38px !important;
    height: 38px !important;
    padding: 0.35rem 0.75rem !important;
    border-radius: 20px !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
    border: 1.5px solid #CBD5E1 !important;
    background: #F8FAFC !important;
    color: #1E293B !important;
    box-sizing: border-box !important;
  }

  #btn-quick-quest,
  #btn-quick-hg,
  #btn-stream-attach {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    font-size: 0.92rem !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  #btn-stream-send {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: var(--primary-emerald, #064E3B) !important;
    color: #FFFFFF !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
    border: none !important;
  }

  #btn-stream-send span {
    display: none !important;
  }

  #btn-stream-send i {
    font-size: 0.95rem !important;
    margin: 0 !important;
    display: inline-block !important;
  }

  #stream-autocomplete-box {
    left: 0.35rem !important;
    right: 0.35rem !important;
    max-height: 180px !important;
    bottom: calc(100% + 4px) !important;
    z-index: 99999 !important;
    border-radius: 8px !important;
  }
}

/* ── Ultra-Compact Phone Layout Rules (< 480px) ── */
@media (max-width: 480px) {
  .dashboard-wrapper.community-tab-active .dashboard-content-body {
    padding: 0 !important;
  }

  .btn-stream-fullscreen {
    padding: 0.2rem 0.45rem !important;
    font-size: 0.72rem !important;
  }

  .stream-active-banner h3 {
    font-size: 0.8rem !important;
    max-width: 110px !important;
  }

  .stream-msg-bubble-col {
    max-width: 90% !important;
  }

  .stream-msg-bubble {
    font-size: 0.84rem !important;
    padding: 0.38rem 0.65rem !important;
  }

  .pinned-preview-text {
    max-width: clamp(80px, 36vw, 160px) !important;
  }

  #btn-stream-send {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
  }
}

/* Stream Community Chat Mentions, Highlights & Pinned Styles */
.stream-mention-pill {
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.stream-mention-pill:hover {
  background: rgba(16, 185, 129, 0.25) !important;
  transform: translateY(-1px);
}

.stream-msg-important {
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(239, 68, 68, 0.18) !important;
}

.stream-msg-important::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: #EF4444;
}

.stream-msg-highlight {
  position: relative;
  overflow: hidden;
}

.stream-msg-highlight::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: #F59E0B;
}

.stream-msg-question {
  position: relative;
  overflow: hidden;
}

.stream-msg-question::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: #6366F1;
}

.stream-msg-pinned {
  animation: streamFadeIn 0.3s ease;
}

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

.auto-item:hover {
  background: #F0FDF4 !important;
}

#stream-pinned-bar {
  animation: streamSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes streamSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Stream Community Chat Media & PDF Gallery Styles ── */
.stream-media-card {
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease;
}

.stream-media-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08) !important;
}

.stream-pdf-card:hover {
  border-color: #EF4444 !important;
}

.stream-img-lightbox-trigger:hover img {
  transform: scale(1.02);
}

.stream-pdf-page1-preview-wrap {
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.stream-pdf-page1-preview-wrap:hover {
  background-color: #F1F5F9 !important;
  border-color: #94A3B8 !important;
}

.btn-read-pdf:hover {
  background: #B91C1C !important;
}

.btn-media-filter.active {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.stream-pdf-modal {
  animation: streamModalFadeIn 0.2s ease;
}

@keyframes streamModalFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

/* ── Stream Community Chat Reply & Quoted Message Styles ── */
.btn-reply-msg {
  transition: all 0.15s ease;
}

.btn-reply-msg:hover {
  background: rgba(0, 0, 0, 0.12) !important;
  color: #065F46 !important;
}

.stream-msg-quote-header {
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

.stream-msg-quote-header:hover {
  background: rgba(0, 0, 0, 0.12) !important;
  transform: translateX(2px);
}

#stream-reply-bar {
  border-left: 3.5px solid #059669;
}