/* ==========================================================================
   INDRAGANESAN COLLEGE OF ENGINEERING
   ACADEMIC MONITORING & ACCOUNTABILITY PLATFORM
   Modern Institutional SaaS Design System (Inspired by Reference Dashboards)
   Fully Responsive for Mobile (320px+), Tablet (768px+), Desktop (1024px+), TV (1920px+)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Outfit:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */
:root {
  /* Brand Theme Colors (Light ERP Palette) */
  --brand-primary:      #4f46e5; /* Indigo */
  --brand-primary-hover:#4338ca;
  --brand-accent:       #2563eb; /* Royal Blue */
  --brand-accent-hover: #1d4ed8;
  --brand-lavender:     #f3effc;
  --brand-lavender-text:#5b46e5;
  --brand-purple:       #7c3aed;

  /* 5-Status Academic Palette (Refined Soft Pastels) */
  --status-green:        #10b981;
  --status-green-bg:     #ecfdf5;
  --status-green-border: #a7f3d0;
  --status-green-text:   #065f46;

  --status-yellow:        #f59e0b;
  --status-yellow-bg:     #fffbeb;
  --status-yellow-border: #fde68a;
  --status-yellow-text:   #92400e;

  --status-red:        #ef4444;
  --status-red-bg:     #fef2f2;
  --status-red-border: #fecaca;
  --status-red-text:   #991b1b;

  --status-blue:        #3b82f6;
  --status-blue-bg:     #eff6ff;
  --status-blue-border: #bfdbfe;
  --status-blue-text:   #1e40af;

  --status-gray:        #6b7280;
  --status-gray-bg:     #f9fafb;
  --status-gray-border: #e5e7eb;
  --status-gray-text:   #374151;

  /* Surfaces & Backgrounds (Exact Bishop Heber College Soft Canvas) */
  --bg-page:    #f8f9fd;
  --bg-card:    #ffffff;
  --bg-muted:   #f3f4f8;
  --bg-surface: #ffffff;

  /* Borders */
  --border-subtle: #e5e7eb;
  --border-card:   #eef0f5;
  --border-focus:  #4f46e5;

  /* Text Colors */
  --text-main:      #111827;
  --text-muted:     #4b5563;
  --text-dim:       #9ca3af;
  --text-inverse:   #ffffff;
  --text-secondary: #374151;

  /* Elevation Shadows */
  --shadow-xs:   0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-sm:   0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-md:   0 4px 12px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.02);
  --shadow-lg:   0 10px 24px rgba(0, 0, 0, 0.06), 0 4px 8px rgba(0, 0, 0, 0.03);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body:    'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Dimensions */
  --sidebar-width: 255px;
  --topbar-height: 60px;
  --content-max:   1600px;

  /* Radii */
  --radius-xs:   4px;
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-full: 9999px;

  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   2. BASE RESET & GLOBAL STYLES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.25;
}

a {
  color: var(--brand-accent);
  text-decoration: none;
  transition: color var(--transition);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

/* ==========================================================================
   3. APP SHELL & LEFT SIDEBAR
   ========================================================================== */
.app-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
  position: relative;
}

/* Mobile Sidebar Backdrop (Mobile/Tablet only < 1024px) */
@media (max-width: 1023px) {
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(7, 13, 30, 0.6);
    z-index: 999;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
  }
  .sidebar-overlay.active { display: block; }
}
@media (min-width: 1024px) {
  .sidebar-overlay,
  .sidebar-overlay.active {
    display: none !important;
  }
}

/* Left Sidebar (Docked / Pinned by Default on Desktop, Unpinnable to Collapsed) */
.app-sidebar {
  width: 255px;
  background: #ffffff;
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  box-shadow: 1px 0 4px rgba(0, 0, 0, 0.04);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #e5e7eb transparent;
  transition: transform 0.24s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
}

/* 1. PINNED STATE (Default on Desktop >= 1024px) */
.app-shell.sidebar-pinned .app-sidebar {
  transform: translateX(0) !important;
  box-shadow: 1px 0 3px rgba(0, 0, 0, 0.04) !important;
}
.app-shell.sidebar-pinned .app-sidebar::after {
  display: none !important;
}

/* 2. UNPINNED STATE (Off-canvas, toggles ONLY via hamburger button or pin) */
.app-shell:not(.sidebar-pinned) .app-sidebar {
  transform: translateX(-100%) !important;
  box-shadow: 4px 0 25px rgba(0, 0, 0, 0.15) !important;
  z-index: 9999 !important;
}
.app-shell:not(.sidebar-pinned) .app-sidebar.open {
  transform: translateX(0) !important;
}
.app-shell:not(.sidebar-pinned) .app-sidebar::after {
  display: none !important;
}

.app-sidebar::-webkit-scrollbar { width: 4px; }
.app-sidebar::-webkit-scrollbar-thumb {
  background: #e5e7eb;
  border-radius: var(--radius-full);
}

/* Sidebar Institutional Branding Card */
.sidebar-brand-card {
  margin: 0.85rem 0.85rem 0.5rem;
  padding: 0.65rem 0.75rem;
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
}

.sidebar-brand-content {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  min-width: 0;
}

.sidebar-pin-btn {
  display: none !important;
}

.brand-crest-box {
  width: 36px;
  height: 36px;
  min-width: 36px;
  background: linear-gradient(135deg, #4f46e5, #3b82f6);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.95rem;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

.brand-text-wrap {
  line-height: 1.2;
  min-width: 0;
}

.brand-main-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.82rem;
  color: #111827;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-badge-pill {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--brand-lavender-text);
  background: var(--brand-lavender);
  padding: 0.12rem 0.45rem;
  border-radius: var(--radius-full);
  margin-top: 0.2rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Sidebar Search Box */
.sidebar-search-box {
  margin: 0.5rem 1rem 0.75rem;
  position: relative;
}

.sidebar-search-input {
  width: 100%;
  padding: 0.48rem 0.75rem 0.48rem 2.1rem;
  background: #f9fafb;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: #111827;
  outline: none;
  transition: all var(--transition);
}

.sidebar-search-input:focus {
  background: #ffffff;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.sidebar-search-icon {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
}

/* Sidebar Menu */
.sidebar-menu {
  padding: 0 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1;
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.nav-section-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #9ca3af;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.65rem 0.15rem;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.52rem 0.75rem;
  border-radius: 8px;
  color: #4b5563;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
  text-decoration: none;
  line-height: 1.3;
}

.sidebar-nav-item:hover {
  color: #111827;
  background: #f8f9fd;
}

/* Active Menu Item: Exact Bishop Heber College Soft Lavender Pill */
.sidebar-nav-item.active {
  color: var(--brand-lavender-text);
  background: var(--brand-lavender);
  font-weight: 600;
}

.sidebar-nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  min-width: 18px;
  color: inherit;
}

.sidebar-nav-badge {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.12rem 0.45rem;
  border-radius: var(--radius-full);
  line-height: 1.3;
}
.sidebar-nav-badge.red    { background: #fee2e2; color: #dc2626; }
.sidebar-nav-badge.yellow { background: #fef3c7; color: #d97706; }
.sidebar-nav-badge.blue   { background: #e0e7ff; color: #4338ca; }

/* Sidebar User Footer */
.sidebar-footer {
  padding: 0.75rem 0.85rem;
  border-top: 1px solid var(--border-card);
  background: #ffffff;
  margin-top: auto;
  flex-shrink: 0;
}

.sidebar-user-pill {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  background: #f8f9fd;
  border: 1px solid var(--border-card);
  cursor: pointer;
  transition: all var(--transition);
}

.sidebar-user-pill:hover {
  background: #f1effc;
  border-color: #ddd6fe;
}

.sidebar-avatar-wrapper {
  position: relative;
  width: 32px;
  height: 32px;
  min-width: 32px;
}

.sidebar-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.avatar-status-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid #ffffff;
}

.sidebar-user-details {
  line-height: 1.2;
  min-width: 0;
  flex: 1;
}

.sidebar-user-fullname {
  font-size: 0.8rem;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.sidebar-user-designation {
  font-size: 0.68rem;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  margin-top: 0.1rem;
}

.sidebar-user-chevron {
  color: #9ca3af;
  flex-shrink: 0;
}

.sidebar-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  color: #0f172a;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.sidebar-toggle-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #1d4ed8;
}

/* ==========================================================================
   4. TOP NAVBAR & APP HEADER
   ========================================================================== */
.app-main-layout {
  margin-left: 255px;
  width: calc(100% - 255px);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
  transition: margin-left 0.24s cubic-bezier(0.4, 0, 0.2, 1), width 0.24s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-shell.sidebar-pinned .app-main-layout {
  margin-left: 255px !important;
  width: calc(100% - 255px) !important;
}

.app-shell:not(.sidebar-pinned) .app-main-layout {
  margin-left: 0 !important;
  width: 100% !important;
}

.top-navbar {
  height: var(--topbar-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  gap: 0.75rem;
  box-shadow: var(--shadow-xs);
}

.top-navbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.breadcrumb-area {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.breadcrumb-area strong {
  color: var(--text-main);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.top-navbar-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

/* Search Box */
.search-pill-box { position: relative; }
.search-pill-input {
  width: 220px;
  padding: 0.45rem 0.85rem 0.45rem 2.1rem;
  background: var(--bg-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--text-main);
  outline: none;
  transition: all var(--transition);
}
.search-pill-input:focus {
  background: #fff;
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  width: 280px;
}
.search-pill-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  color: var(--text-dim);
}

/* Topbar Alerts Icon */
.topbar-alerts-badge {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  text-decoration: none;
  transition: all var(--transition);
}
.topbar-alerts-badge:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}
.topbar-alerts-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 6px #ef4444;
}

/* Topbar Corporate Identity */
.topbar-portal-identity {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  white-space: nowrap;
}
.portal-identity-trust {
  font-weight: 800;
  color: #0f172a !important;
  font-size: 0.96rem;
  letter-spacing: -0.01em;
}
.portal-identity-sep {
  color: #cbd5e1;
  font-size: 0.85rem;
  font-weight: 300;
}
.portal-identity-sub {
  color: #475569;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Corporate User Card & Direct Sign Out */
.topbar-corp-user-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: #f8f9fd;
  border: 1px solid var(--border-subtle);
  padding: 0.25rem 0.6rem 0.25rem 0.35rem;
  border-radius: var(--radius-full);
}
.topbar-corp-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  border: 1px solid #4338ca;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}
.topbar-corp-info {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  line-height: 1.15;
}
.topbar-corp-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
}
.topbar-corp-signout-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #fef2f2;
  border: 1px solid #fee2e2;
  color: #dc2626;
  padding: 0.28rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  margin-left: 0.35rem;
}
.topbar-corp-signout-btn:hover {
  background: #fee2e2;
  color: #b91c1c;
}

/* Executive Operational Options Grid (In Hero Banner) */
.executive-operational-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  width: 100%;
  margin-top: 1.1rem;
}
.exec-card-metric {
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  position: relative;
  box-shadow: var(--shadow-xs);
}
.exec-card-metric:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
}
.exec-card-metric.events  { border-top: 3px solid #3b82f6; }
.exec-card-metric.absent  { border-top: 3px solid #ef4444; }
.exec-card-metric.faculty { border-top: 3px solid #f59e0b; }
.exec-card-metric.fees    { border-top: 3px solid #8b5cf6; }

.exec-card-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.exec-card-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.exec-card-dot.blue   { background: #3b82f6; box-shadow: 0 0 6px #3b82f6; }
.exec-card-dot.red    { background: #ef4444; box-shadow: 0 0 6px #ef4444; }
.exec-card-dot.amber  { background: #f59e0b; box-shadow: 0 0 6px #f59e0b; }
.exec-card-dot.purple { background: #a855f7; box-shadow: 0 0 6px #a855f7; }

.exec-card-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  font-weight: 700;
  white-space: nowrap;
}
.exec-card-val {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0.15rem 0;
  white-space: nowrap;
  color: #111827;
}
.exec-card-val.blue   { color: #2563eb; }
.exec-card-val.red    { color: #dc2626; }
.exec-card-val.amber  { color: #d97706; }
.exec-card-val.purple { color: #7c3aed; }

.exec-card-sub {
  font-size: 0.72rem;
  color: #9ca3af;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

@media (max-width: 1200px) {
  .executive-operational-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 680px) {
  .executive-operational-grid {
    grid-template-columns: 1fr;
  }
  .topbar-portal-identity {
    display: none;
  }
}

/* Live Clock Badge */
.live-clock-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-muted);
  padding: 0.38rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* ==========================================================================
   5. APP CONTENT BODY & PAGE HEADERS
   ========================================================================== */
.app-content-body {
  padding: 1.5rem;
  flex: 1;
  max-width: var(--content-max);
  width: 100%;
  margin: 0 auto;
  align-self: stretch;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.page-head-title h2 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.2;
}

.page-head-sub {
  display: none !important;
}

.page-head-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   6. CARDS & KPI METRIC GRIDS
   ========================================================================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.card-body { padding: 1.25rem; }

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.2rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border-left: 3px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition);
}
.kpi-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

.kpi-card.green  { border-left-color: var(--status-green); }
.kpi-card.blue   { border-left-color: var(--status-blue); }
.kpi-card.yellow { border-left-color: var(--status-yellow); }
.kpi-card.red    { border-left-color: var(--status-red); }
.kpi-card.purple { border-left-color: #8b5cf6; }

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.kpi-value {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
  letter-spacing: -0.03em;
}

.kpi-subtext {
  font-size: 0.72rem;
  color: var(--text-dim);
  line-height: 1.4;
}

/* ==========================================================================
   7. FORM CONTROLS & FILTER BAR ALIGNMENTS (Pixel-Perfect Clean Row)
   ========================================================================== */
.filter-bar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-card);
}

.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
  width: 100%;
}

.filter-inputs-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  flex: 1;
}

.filter-field {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.filter-field-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.filter-select, .filter-input, .filter-date {
  padding: 0.42rem 0.75rem;
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
  transition: all var(--transition);
  height: 34px;
}
.filter-select:hover, .filter-date:hover {
  border-color: #cbd5e1;
}
.filter-select:focus, .filter-input:focus, .filter-date:focus {
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* General Form Elements */
.form-group { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1rem; }
.form-group:last-child { margin-bottom: 0; }

.form-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.form-label.required::after { content: '*'; color: var(--status-red); margin-left: 0.15rem; }

.form-control {
  width: 100%;
  padding: 0.52rem 0.85rem;
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-main);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  line-height: 1.5;
}
.form-control:focus {
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-help {
  font-size: 0.7rem;
  color: var(--text-dim);
  line-height: 1.4;
}

.form-row-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

/* ==========================================================================
   8. BUTTONS & BADGES
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.48rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1.3;
  text-decoration: none;
  height: 34px;
}
.btn:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 2px; }

.btn-primary {
  background: var(--brand-accent);
  color: #ffffff;
  border-color: var(--brand-accent);
}
.btn-primary:hover { background: var(--brand-accent-hover); border-color: var(--brand-accent-hover); }

.btn-outline {
  background: #ffffff;
  color: var(--text-main);
  border-color: var(--border-card);
}
.btn-outline:hover { background: var(--bg-muted); border-color: #cbd5e1; }

.btn-success { background: var(--status-green); color: #fff; border-color: var(--status-green); }
.btn-success:hover { background: #047857; }

.btn-danger { background: var(--status-red); color: #fff; border-color: var(--status-red); }
.btn-danger:hover { background: #b91c1c; }

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.75rem; height: 30px; }
.btn-xs { padding: 0.22rem 0.55rem; font-size: 0.7rem; height: 24px; }

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-full);
  line-height: 1.4;
  white-space: nowrap;
}
.badge-green  { background: var(--status-green-bg);  color: var(--status-green-text);  border: 1px solid var(--status-green-border); }
.badge-yellow { background: var(--status-yellow-bg); color: var(--status-yellow-text); border: 1px solid var(--status-yellow-border); }
.badge-red    { background: var(--status-red-bg);    color: var(--status-red-text);    border: 1px solid var(--status-red-border); }
.badge-blue   { background: var(--status-blue-bg);   color: var(--status-blue-text);   border: 1px solid var(--status-blue-border); }
.badge-gray   { background: var(--status-gray-bg);   color: var(--status-gray-text);   border: 1px solid var(--status-gray-border); }

/* ==========================================================================
   9. DATA TABLES & MONITORING MATRIX
   ========================================================================== */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  min-width: 600px;
}

.data-table thead {
  background: var(--bg-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.data-table th {
  padding: 0.7rem 0.9rem;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  white-space: nowrap;
}

.data-table td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
  color: var(--text-main);
  line-height: 1.45;
}

.data-table tbody tr:hover { background: #f8fafc; }
.data-table tbody tr:last-child td { border-bottom: none; }

/* Period Monitoring Matrix */
.matrix-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-card);
  background: var(--bg-card);
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}

.matrix-table thead {
  background: #f8fafc;
  border-bottom: 2px solid var(--border-subtle);
}

.matrix-table th {
  padding: 0.8rem 0.65rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #4b5563;
  white-space: nowrap;
  border-right: 1px solid var(--border-subtle);
}
.matrix-table th:first-child {
  text-align: left;
  padding-left: 1rem;
  min-width: 150px;
}

.matrix-table td {
  padding: 0.5rem 0.45rem;
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}
.matrix-table td:first-child { padding-left: 1rem; }

.matrix-row-header {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 140px;
}
.matrix-row-header strong { font-size: 0.8rem; font-weight: 700; }

.matrix-dept-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.62rem;
  font-weight: 700;
  background: var(--brand-lavender);
  color: var(--brand-lavender-text);
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-xs);
  margin-right: 0.3rem;
}

.matrix-cell-chip {
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.5rem;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  min-width: 90px;
  border: 1px solid transparent;
}
.matrix-cell-chip:hover { transform: scale(1.03); box-shadow: var(--shadow-md); z-index: 1; position: relative; }

.matrix-cell-chip.green  { background: var(--status-green-bg);  border-color: var(--status-green-border); }
.matrix-cell-chip.blue   { background: var(--status-blue-bg);   border-color: var(--status-blue-border); }
.matrix-cell-chip.yellow { background: var(--status-yellow-bg); border-color: var(--status-yellow-border); }
.matrix-cell-chip.red    { background: var(--status-red-bg);    border-color: var(--status-red-border); }
.matrix-cell-chip.gray   { background: var(--status-gray-bg);   border-color: var(--status-gray-border); }

.cell-subject {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
  line-height: 1.3;
}

.cell-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.2rem;
  font-size: 0.65rem;
  color: var(--text-muted);
  gap: 0.25rem;
}

.cell-status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}
.cell-status-dot.green  { background: var(--status-green); }
.cell-status-dot.blue   { background: var(--status-blue); }
.cell-status-dot.yellow { background: var(--status-yellow); }
.cell-status-dot.red    { background: var(--status-red); }
.cell-status-dot.gray   { background: var(--status-gray); }

/* ==========================================================================
   10. MODALS & DIALOGS
   ========================================================================== */
.modal-backdrop, .modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(7, 13, 30, 0.65);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal-backdrop.active, .modal-overlay.active { display: flex !important; }

.modal-container, .modal-dialog {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25), 0 8px 20px rgba(0, 0, 0, 0.15);
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  animation: modalIn 0.2s ease-out;
  border: 1px solid #cbd5e1;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  gap: 0.75rem;
}

.modal-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  font-family: var(--font-heading);
}

.modal-close-btn {
  background: var(--bg-muted);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}
.modal-close-btn:hover { background: var(--border-subtle); color: var(--text-main); }

.modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-muted);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  flex-shrink: 0;
}

.modal-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.7rem 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
  margin-bottom: -1px;
}
.modal-tab-btn:hover { color: var(--text-main); }
.modal-tab-btn.active {
  color: var(--brand-accent);
  border-bottom-color: var(--brand-accent);
  background: var(--bg-card);
}

.modal-body {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.25rem;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

.modal-footer {
  padding: 0.9rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* ==========================================================================
   11. VERIFICATION SUMMARY & SCENARIO CARDS
   ========================================================================== */
.truth-model-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-card);
}

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

.truth-layer-col {
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  border: 1px solid transparent;
}
.truth-layer-col.planned  { background: var(--status-blue-bg);   border-color: var(--status-blue-border); }
.truth-layer-col.reported { background: #f5f3ff; border-color: #ddd6fe; }
.truth-layer-col.verified { background: var(--status-green-bg);  border-color: var(--status-green-border); }

.truth-layer-badge {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.truth-layer-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.truth-item-list { list-style: none; display: flex; flex-direction: column; gap: 0.3rem; }

.truth-item-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  gap: 0.5rem;
}

.truth-item-key { color: var(--text-muted); font-weight: 500; flex-shrink: 0; }
.truth-item-val { color: var(--text-main);  font-weight: 600; text-align: right; }

.scenario-launcher {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  color: var(--text-main);
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-sm);
}

.scenario-launcher-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.scenario-launcher-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: #f1f5f9;
}

.scenario-launcher-hint {
  font-size: 0.68rem;
  color: #64748b;
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.65rem;
}

.scenario-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
  text-align: left;
  color: #94a3b8;
  cursor: pointer;
  transition: all var(--transition);
  display: block;
  width: 100%;
}
.scenario-btn:hover {
  background: rgba(37, 99, 235, 0.25);
  border-color: #60a5fa;
  color: #fff;
  transform: translateY(-1px);
}

.scenario-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.scenario-desc {
  font-size: 0.7rem;
  color: #64748b;
  line-height: 1.45;
}

/* ==========================================================================
   12. TOASTS, BANNERS & UTILITIES
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  max-width: min(380px, calc(100vw - 2rem));
}

.toast {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0, 0, 0, 0.05);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  pointer-events: auto;
  border-left: 3px solid var(--brand-accent);
  font-size: 0.8rem;
  line-height: 1.45;
  animation: toastIn 0.25s ease-out;
}

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

.toast-icon {
  display: flex;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.toast-icon svg { width: 16px; height: 16px; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.toast.success { border-left-color: var(--status-green); }
.toast.success .toast-icon svg { stroke: var(--status-green); }
.toast.error   { border-left-color: var(--status-red); }
.toast.error   .toast-icon svg { stroke: var(--status-red); }
.toast.warning { border-left-color: var(--status-yellow); }
.toast.warning .toast-icon svg { stroke: var(--status-yellow); }
.toast.info    { border-left-color: var(--status-blue); }
.toast.info    .toast-icon svg { stroke: var(--status-blue); }

.attendance-sum-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 0.5rem;
  gap: 0.5rem;
}
.attendance-sum-banner.valid   { background: var(--status-green-bg);  color: var(--status-green-text);  border: 1px solid var(--status-green-border); }
.attendance-sum-banner.invalid { background: var(--status-red-bg);    color: var(--status-red-text);    border: 1px solid var(--status-red-border); }

.admin-tab-panel { display: block; }

.auditor-banner {
  background: #0f172a;
  color: #f59e0b;
  padding: 0.4rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
  border-bottom: 2px solid #d97706;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  z-index: 1500;
}
.auditor-banner svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }

/* Global Utilities */
.text-muted     { color: var(--text-muted) !important; }
.text-dim       { color: var(--text-dim) !important; }
.text-success   { color: var(--status-green) !important; }
.text-danger    { color: var(--status-red) !important; }
.text-warning   { color: var(--status-yellow) !important; }
.fw-700         { font-weight: 700 !important; }
.fw-600         { font-weight: 600 !important; }
.font-mono      { font-family: var(--font-mono) !important; }
.d-flex         { display: flex; }
.align-center   { align-items: center; }
.justify-between{ justify-content: space-between; }
.gap-2          { gap: 0.5rem; }
.gap-3          { gap: 0.75rem; }
.mt-1           { margin-top: 0.25rem; }
.mt-2           { margin-top: 0.5rem; }
.mt-3           { margin-top: 0.75rem; }
.mb-2           { margin-bottom: 0.5rem; }
.mb-3           { margin-bottom: 0.75rem; }
.mb-4           { margin-bottom: 1.25rem; }

/* ==========================================================================
   13. RESPONSIVE BREAKPOINTS (Mobile, Tablet, Desktop, TV/4K)
   ========================================================================== */

/* ── Mobile Phone: 320–479px ─────────────────────────────────────── */
@media (max-width: 479px) {
  html { font-size: 13px; }

  :root {
    --topbar-height: 54px;
    --sidebar-width: 280px;
  }

  .app-sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width);
    box-shadow: none;
  }
  .app-sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.35);
  }

  .app-main-layout { margin-left: 0; }
  .sidebar-toggle-btn { display: flex; }
  .app-content-body { padding: 0.85rem; }

  .page-head { flex-direction: column; gap: 0.5rem; }
  .page-head-title h2 { font-size: 1.1rem; }
  .page-head-actions { width: 100%; justify-content: flex-start; }

  .filter-row { flex-direction: column; align-items: stretch; gap: 0.65rem; }
  .filter-inputs-group { flex-direction: column; align-items: stretch; gap: 0.5rem; }
  .filter-field { display: flex; justify-content: space-between; width: 100%; }
  .filter-select, .filter-input, .filter-date { width: 60%; }
  .filter-actions { width: 100%; justify-content: flex-start; }

  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
  .kpi-value { font-size: 1.45rem; }

  .role-pills-wrapper { display: none; }
  .role-pill-label    { display: none; }
  .search-pill-box    { display: none; }
  .live-clock-badge   { display: none; }

  .breadcrumb-area { font-size: 0.75rem; }
  .breadcrumb-area strong { max-width: 180px; }

  .scenario-grid { grid-template-columns: 1fr; }
  .truth-layers-grid { grid-template-columns: 1fr; }
  .form-row-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }

  .modal-container { max-height: 95vh; border-radius: var(--radius-md); }
  .modal-body { padding: 0.9rem; }
  .modal-header { padding: 0.85rem 0.9rem; }
  .modal-footer { padding: 0.75rem 0.9rem; }

  .data-table { font-size: 0.75rem; }
  .data-table th, .data-table td { padding: 0.55rem 0.6rem; }

  .top-navbar { padding: 0 0.85rem; gap: 0.5rem; }
}

/* ── Small Mobile / Phablet: 480–767px ──────────────────────────────────── */
@media (min-width: 480px) and (max-width: 767px) {
  html { font-size: 13.5px; }

  :root {
    --topbar-height: 56px;
    --sidebar-width: 280px;
  }

  .app-sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width);
  }
  .app-sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.3);
  }

  .app-main-layout { margin-left: 0; }
  .sidebar-toggle-btn { display: flex; }
  .app-content-body { padding: 1rem; }

  .page-head { flex-direction: column; }
  .page-head-title h2 { font-size: 1.15rem; }

  .filter-row { flex-direction: column; align-items: stretch; gap: 0.65rem; }
  .filter-inputs-group { flex-wrap: wrap; gap: 0.5rem; }
  .filter-actions { width: 100%; justify-content: flex-start; }

  .kpi-grid { grid-template-columns: repeat(2, 1fr); }

  .role-pills-wrapper { display: none; }
  .search-pill-box    { display: none; }
  .live-clock-badge   { display: none; }

  .scenario-grid { grid-template-columns: repeat(2, 1fr); }
  .truth-layers-grid { grid-template-columns: 1fr; }
  .form-row-grid { grid-template-columns: repeat(2, 1fr); }

  .top-navbar { padding: 0 1rem; }
}

/* ── Tablet: 768–1023px ───────────────────────────────────────────────── */
@media (min-width: 768px) and (max-width: 1023px) {
  :root {
    --sidebar-width: 220px;
    --topbar-height: 58px;
  }

  .app-content-body { padding: 1.25rem; }
  .page-head-title h2 { font-size: 1.25rem; }
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }

  .filter-inputs-group { gap: 0.5rem; }
  .filter-field { gap: 0.3rem; }

  .role-pill-label  { display: none; }
  .role-pill-btn    { padding: 0.28rem 0.55rem; font-size: 0.7rem; }
  .search-pill-input { width: 175px; }
  .search-pill-input:focus { width: 220px; }
  .live-clock-badge { display: none; }

  .scenario-grid { grid-template-columns: repeat(2, 1fr); }
  .truth-layers-grid { grid-template-columns: 1fr; }
  .form-row-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Desktop: 1024–1439px ─────────────────────────────────────────────── */
@media (min-width: 1024px) {
  :root {
    --sidebar-width: 250px;
    --topbar-height: 60px;
  }

  /* Desktop Sidebar Pinned vs Unpinned Layout */
  .app-shell.sidebar-pinned .app-sidebar {
    transform: translateX(0) !important;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--sidebar-width, 255px) !important;
    box-shadow: 1px 0 3px rgba(0, 0, 0, 0.04) !important;
    z-index: 1000 !important;
  }
  .app-shell.sidebar-pinned .app-main-layout {
    margin-left: var(--sidebar-width, 255px) !important;
    width: calc(100% - var(--sidebar-width, 255px)) !important;
  }

  .app-shell:not(.sidebar-pinned) .app-sidebar {
    transform: translateX(-100%) !important;
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.15) !important;
    z-index: 9999 !important;
  }
  .app-shell:not(.sidebar-pinned) .app-sidebar.open {
    transform: translateX(0) !important;
  }
  .app-shell:not(.sidebar-pinned) .app-main-layout {
    margin-left: 0 !important;
    width: 100% !important;
  }

  /* Desktop never shows dark mobile overlay */
  .sidebar-overlay,
  .sidebar-overlay.active {
    display: none !important;
  }
  .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
  .scenario-grid { grid-template-columns: repeat(4, 1fr); }
  .truth-layers-grid { grid-template-columns: repeat(3, 1fr); }
  .search-pill-input { width: 220px; }
}

/* ── Large Desktop: 1440–1919px ──────────────────────────────────────── */
@media (min-width: 1440px) {
  :root {
    --sidebar-width: 265px;
    --topbar-height: 64px;
    --content-max: 1600px;
  }

  html { font-size: 15px; }
  .app-content-body { padding: 1.75rem 2rem; }
  .kpi-value { font-size: 2rem; }
  .search-pill-input { width: 250px; }
  .search-pill-input:focus { width: 320px; }
}

/* ── 4K / TV Screens: 1920px+ ─────────────────────────────────────────── */
@media (min-width: 1920px) {
  :root {
    --sidebar-width: 290px;
    --topbar-height: 68px;
    --content-max: 1800px;
  }

  html { font-size: 16px; }
  .app-content-body { padding: 2rem 2.5rem; }
  .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
  .kpi-value { font-size: 2.2rem; }
  .data-table { font-size: 0.9rem; }
  .data-table th { font-size: 0.78rem; }
  .data-table td { padding: 0.9rem 1.1rem; }
  .matrix-table { font-size: 0.85rem; }
  .matrix-cell-chip { min-width: 110px; padding: 0.55rem 0.65rem; }
  .cell-subject { font-size: 0.8rem; max-width: 120px; }
}

/* ── Ultra-Wide 2560px+ ──────────────────────────────────────────────── */
@media (min-width: 2560px) {
  :root { --content-max: 2200px; }
  html { font-size: 17px; }
}

/* ==========================================================================
   14. PRINT STYLES
   ========================================================================== */
@media print {
  .app-sidebar, .top-navbar, .sidebar-toggle-btn, .sidebar-overlay,
  .btn, .role-pills-wrapper, .search-pill-box, .modal-backdrop { display: none !important; }

  .app-main-layout { margin-left: 0 !important; }
  .app-content-body { padding: 0 !important; max-width: 100% !important; }
  .card { box-shadow: none !important; border: 1px solid #ccc !important; }
  .data-table { font-size: 10pt; }
}

/* ==========================================================================
   15. 7-ROLE ARCHITECTURE & EXECUTIVE PULSE STYLES
   ========================================================================== */

/* Role Badges (Monochromatic Corporate Styling) */
.role-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: #f8fafc;
  color: #0f172a;
  border: 1px solid #cbd5e1;
}

.badge-superadmin,
.badge-secretary,
.badge-md,
.badge-registrar,
.badge-principal,
.badge-hod,
.badge-professor {
  background: #f8fafc !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: none !important;
}

/* Executive Pulse Banner */
.executive-banner {
  background: linear-gradient(90deg, #0b1329 0%, #1e293b 60%, #1e40af 100%);
  color: #ffffff;
  padding: 0.65rem 1.25rem;
  font-size: 0.82rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.pulse-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-ring 1.8s infinite;
}

@keyframes pulse-ring {
  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 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Executive Pulse Cards with 1-Click Drill-Down */
.executive-pulse-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.executive-pulse-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-accent);
  box-shadow: var(--shadow-md);
}

.executive-pulse-card .drilldown-hint {
  font-size: 0.75rem;
  color: var(--brand-accent);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.drilldown-header-card {
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-muted);
}
.drilldown-header-card.critical, .drilldown-header-card.red {
  background: #fef2f2;
  border-color: #fecaca;
}
.drilldown-header-card.medium, .drilldown-header-card.yellow {
  background: #fffbeb;
  border-color: #fde68a;
}
.drilldown-header-card.blue {
  background: #eff6ff;
  border-color: #bfdbfe;
}

/* User Management Table Styles (Monochromatic Corporate Styling) */
.user-avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.76rem;
  flex-shrink: 0;
}

.permission-pill {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 3px;
  font-size: 0.7rem;
  color: #334155;
  font-weight: 500;
  margin: 0.12rem;
}

.user-status-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  cursor: pointer;
}

.user-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.user-status-dot.active { background: var(--status-green); }
.user-status-dot.suspended { background: var(--status-red); }

/* Modern User Directory Styles (Professional SaaS) */
.u-role-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}
.u-role-purple { background: #f3e8ff; color: #7e22ce; }
.u-role-indigo { background: #e0e7ff; color: #3730a3; }
.u-role-blue { background: #dbeafe; color: #1e40af; }
.u-role-amber { background: #fef3c7; color: #92400e; }
.u-role-slate { background: #f1f5f9; color: #475569; }

.u-campus-tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
}

.u-status-active {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #16a34a;
  font-size: 0.78rem;
  font-weight: 600;
}
.u-status-active .u-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.u-status-suspended {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #dc2626;
  font-size: 0.78rem;
  font-weight: 600;
}
.u-status-suspended .u-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.u-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.78rem;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}

/* Quick Action Banner */
.action-alert-banner {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  line-height: 1.5;
  transition: all 0.2s ease;
}
.action-alert-banner.red {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}
.action-alert-banner.yellow {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}
.action-alert-banner:hover {
  filter: brightness(0.97);
}

/* ==========================================================================
   MULTI-INSTITUTION GOVERNANCE STYLES (SECRETARY, MD & PRINCIPAL VIEWS)
   ========================================================================== */

.institution-filter-wrapper {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.5rem;
  margin-left: 0.5rem;
}

.inst-filter-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

.inst-filter-select {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 0.25rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
  max-width: 280px;
  transition: all 0.2s ease;
}

.inst-filter-select:focus {
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.institution-locked-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.25);
  color: var(--brand-accent);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

/* Multi-College Grid for Secretary & MD */
.trust-colleges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.trust-college-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.trust-college-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.trust-college-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--card-accent-color, var(--brand-accent));
}

.college-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.college-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.college-card-type {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.college-card-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.5rem;
  margin-bottom: 0.85rem;
  text-align: center;
}

.college-stat-item {
  display: flex;
  flex-direction: column;
}

.college-stat-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  font-family: var(--font-heading);
}

.college-stat-lbl {
  font-size: 0.64rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.college-progress-row {
  margin-top: 0.5rem;
}

.college-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.college-progress-bar {
  height: 6px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.college-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.college-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.72rem;
}

/* Executive Trust Summary Header Banner (Light ERP Style) */
.trust-pulse-header-banner {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  color: var(--text-main);
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-sm);
}

.trust-banner-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.15rem;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 0.85rem;
}

.trust-banner-title-group h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #111827;
  margin: 0 0 0.25rem 0;
  letter-spacing: -0.02em;
}

.trust-banner-title-group p {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
}

.trust-kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

.trust-kpi-block {
  background: #f8fafc;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
}

.trust-kpi-block-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.trust-kpi-block-val {
  font-size: 1.3rem;
  font-weight: 800;
  color: #111827;
  margin-top: 0.2rem;
  font-family: var(--font-heading);
}

.trust-kpi-block-sub {
  font-size: 0.68rem;
  color: var(--brand-primary);
  margin-top: 0.15rem;
  font-weight: 500;
}

/* ==========================================================================
   16. DYNAMIC SCOPE TOGGLE BARS (Colleges, Departments, Classes)
   ========================================================================== */

.scope-toggle-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.scope-toggle-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.scope-toggle-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.scope-toggle-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: var(--bg-muted);
  color: var(--text-dim);
}

.scope-toggle-pills {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-subtle) transparent;
}

.scope-toggle-pills::-webkit-scrollbar {
  height: 4px;
}

.scope-toggle-pills::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 4px;
}

.scope-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease-in-out;
  user-select: none;
}

.scope-toggle-btn:hover {
  color: var(--text-main);
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.scope-toggle-btn.active {
  background: var(--brand-primary, #2563eb);
  color: #ffffff;
  border-color: var(--brand-primary, #2563eb);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.scope-toggle-btn.active:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

/* Institution Theme Specific Active Colors */
.scope-toggle-btn[data-inst="ALL"].active { background: #0f172a; border-color: #0f172a; }
.scope-toggle-btn[data-inst="IGCE"].active { background: #1e40af; border-color: #1e40af; }
.scope-toggle-btn[data-inst="IGCAS"].active { background: #065f46; border-color: #065f46; }
.scope-toggle-btn[data-inst="IGCP"].active { background: #7c2d12; border-color: #7c2d12; }
.scope-toggle-btn[data-inst="IGCN"].active { background: #831843; border-color: #831843; }
.scope-toggle-btn[data-inst="IGCPT"].active { background: #155e75; border-color: #155e75; }
.scope-toggle-btn[data-inst="IGSMC"].active { background: #365314; border-color: #365314; }
.scope-toggle-btn[data-inst="SIGNYS"].active { background: #581c87; border-color: #581c87; }
.scope-toggle-btn[data-inst="SIGIMS"].active { background: #701a75; border-color: #701a75; }
.scope-toggle-btn[data-inst="IGCEd"].active { background: #78350f; border-color: #78350f; }

/* ==========================================================================
   17. SECRETARY EXECUTIVE VIGILANCE PORTAL (Strict Monochromatic + Limited Blue)
   ========================================================================== */
.secretary-vigilance-portal {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.vigilance-header-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.vigilance-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #f1f3f5;
}

.vigilance-office-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #1d4ed8;
  margin-bottom: 0.25rem;
}

.vigilance-main-heading {
  font-size: 1.6rem;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem 0;
  line-height: 1.2;
}

.vigilance-sub-text {
  display: none !important;
}

/* 7-Metric Vigilance Strip */
.vigilance-kpi-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.75rem;
  margin-top: 1.25rem;
}

@media (max-width: 1400px) {
  .vigilance-kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .vigilance-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.vigilance-kpi-card {
  background: #ffffff;
  border: 1px solid var(--border-card, #eef0f5);
  border-radius: var(--radius-md, 12px);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
}

.vigilance-kpi-card:hover {
  border-color: #cbd5e1;
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.vigilance-kpi-card.active {
  border-color: var(--brand-primary, #4f46e5);
  background: #ffffff;
  box-shadow: 0 0 0 1.5px var(--brand-primary, #4f46e5), 0 4px 12px rgba(79, 70, 229, 0.1);
}

.vigilance-kpi-card.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #4f46e5, #3b82f6);
}

.vigilance-kpi-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  white-space: nowrap;
}

.vigilance-kpi-value {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
  margin: 0.1rem 0;
  font-variant-numeric: tabular-nums;
}

.vigilance-kpi-value.blue {
  color: #2563eb;
}

.vigilance-kpi-sub {
  font-size: 0.73rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Vigilance Tab Navigation Bar ("The Above Toggle") */
.vigilance-tabs-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #ffffff;
  border: 1px solid var(--border-card, #eef0f5);
  border-radius: var(--radius-md, 12px);
  padding: 0.35rem 0.45rem;
  overflow-x: auto;
  margin: 1.25rem 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.vigilance-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  padding: 0.55rem 0.95rem;
  border-radius: 8px;
  font-size: 0.83rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  user-select: none;
}

.vigilance-tab-btn:hover {
  background: #f8fafc;
  color: #0f172a;
}

.vigilance-tab-btn.active {
  background: #0f172a;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
}

.vigilance-tab-count {
  font-size: 0.7rem;
  padding: 0.12rem 0.45rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
  font-weight: 700;
}

.vigilance-tab-btn:not(.active) .vigilance-tab-count {
  background: #f1f5f9;
  color: #64748b;
}

/* Layout & Utility Classes */
.d-flex { display: flex; }
.d-block { display: block; }
.flex-column { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.w-full { width: 100%; }

/* Vigilance Content Container - STRICT SINGLE FULL-WIDTH PANEL */
.vigilance-panel {
  width: 100%;
  max-width: 100%;
  display: block;
  clear: both;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.vigilance-panel-header {
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  background: #fafbfc;
}

.vigilance-panel-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.01em;
  margin: 0;
}

.vigilance-panel-desc {
  display: none !important;
}

/* Tables */
.vigilance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  text-align: left;
}

.vigilance-table thead th {
  background: #f8f9fa;
  color: #374151;
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}

.vigilance-table tbody td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #f1f3f5;
  color: #111827;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}

.vigilance-table tbody tr:hover {
  background: #fbfcfd;
}

.vigilance-table tbody tr:last-child td {
  border-bottom: none;
}

/* Monochromatic & Subtle Blue Tags */
.v-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

.v-tag-dark {
  background: #111827;
  color: #ffffff;
}

.v-tag-gray {
  background: #f1f3f5;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.v-tag-blue {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #dbeafe;
}

.v-tag-alert {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fee2e2;
  font-weight: 700;
}

.v-code {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: #4b5563;
  background: #f8f9fa;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  border: 1px solid #e5e7eb;
}

.reason-box {
  background: #f8f9fa;
  border: 1px solid #e5e7eb;
  border-left: 3px solid #111827;
  border-radius: 4px;
  padding: 0.45rem 0.65rem;
  font-size: 0.78rem;
  color: #374151;
  line-height: 1.4;
}

.reliever-box {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 4px;
  padding: 0.25rem 0.55rem;
  font-size: 0.76rem;
  color: #1d4ed8;
  font-weight: 600;
}

/* Bulk Upload Dropzone (Super Admin) */
.upload-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s ease;
}
.upload-dropzone:hover {
  border-color: #2563eb;
  background: #eff6ff;
}

/* ==========================================================================
   MODERN ROLES & PERMISSIONS MASTER-DETAIL STYLES
   ========================================================================== */
.roles-layout-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.25rem;
  align-items: start;
}

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

.role-nav-card {
  background: #ffffff;
  border: 1px solid var(--border-card, #e2e8f0);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.role-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.role-nav-item:last-child {
  border-bottom: none;
}

.role-nav-item:hover {
  background: #f8fafc;
}

.role-nav-item.active {
  background: #f0f4ff;
  border-left: 3px solid var(--brand-primary, #4f46e5);
}

.role-nav-item.active .role-nav-title {
  color: var(--brand-primary, #4f46e5);
  font-weight: 700;
}

.perm-category-box {
  margin-bottom: 1.25rem;
}

.perm-category-header {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.perm-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.5rem;
}

.perm-toggle-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.82rem;
  color: #1e293b;
  user-select: none;
}

.perm-toggle-card:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.perm-toggle-card.checked {
  background: #f5f3ff;
  border-color: #c4b5fd;
  color: #5b21b6;
  font-weight: 600;
}

.perm-toggle-card input[type="checkbox"] {
  accent-color: #6366f1;
  width: 16px;
  height: 16px;
  cursor: pointer;
}


