/* ============================================================
   NSAS Premium Theme — Nachiappa Swamigal Smart Attendance
   Modern, dark-mode-ready design system
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ─── CSS Custom Properties ─────────────────────────────── */
:root {
  --font: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;

  /* Brand Palette — Midnight Blue (#102552) & Electric Blue Accents */
  --midnight-blue: #102552;
  --midnight-alt:  #173775;
  --midnight-dark: #09152e;
  --primary:       #102552;
  --primary-light: #2563eb;
  --primary-dark:  #09152e;
  --primary-glow:  rgba(37, 99, 235, 0.25);
  --accent:        #3b82f6;
  --accent-light:  #60a5fa;
  --accent-glow:   rgba(59, 130, 246, 0.25);
  --success:       #10b981;
  --success-glow:  rgba(16, 185, 129, 0.2);
  --warning:       #f59e0b;
  --warning-glow:  rgba(245, 158, 11, 0.2);
  --danger:        #ef4444;
  --danger-glow:   rgba(239, 68, 68, 0.2);
  --info:          #2563eb;

  /* Neutrals & Clean White Surfaces */
  --bg:            #f8fafc;
  --bg-card:       #ffffff;
  --bg-sidebar:    #102552;
  --bg-sidebar-alt:#173775;
  --text:          #0f172a;
  --text-muted:    #64748b;
  --text-sidebar:  #cbd5e1;
  --border:        #e2e8f0;

  /* Shadows & Glass */
  --shadow-sm:     0 2px 4px rgba(16, 37, 82, 0.04), 0 1px 2px rgba(16, 37, 82, 0.06);
  --shadow:        0 8px 24px -4px rgba(16, 37, 82, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg:     0 25px 60px -8px rgba(16, 37, 82, 0.25), 0 8px 16px -4px rgba(15, 23, 42, 0.08);
  --glass-bg:      rgba(255, 255, 255, 0.85);
  --glass-border:  rgba(255, 255, 255, 0.6);
  --glass-blur:    blur(16px);

  /* Layout */
  --sidebar-w:     260px;
  --topbar-h:      64px;

  /* Micro-Transitions */
  --tr:            all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --tr-bounce:     all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ─── Global Reset / Base ────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 0.9375rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ─── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c7d2fe; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ─── Layout Shell ───────────────────────────────────────── */
#wrapper { display: flex; min-height: 100vh; }

/* ─── Sidebar ────────────────────────────────────────────── */
/* ─── Sidebar ────────────────────────────────────────────── */
.nsas-sidebar {
  width: var(--sidebar-w);
  height: calc(100vh - 32px);
  min-height: auto;
  background: linear-gradient(145deg, #0b1938 0%, #102552 50%, #1e3a70 100%);
  background-image: 
    radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(145deg, #0b1938 0%, #102552 50%, #1e3a70 100%);
  background-size: 24px 24px, 100% 100%;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 16px; 
  left: 16px;
  z-index: 1000;
  border-radius: 28px;
  box-shadow: 0 20px 50px rgba(9, 21, 46, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.12);
  transition: transform .3s cubic-bezier(0.4, 0, 0.2, 1), width .3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: visible;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 22px 10px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand-img {
  width: 96px; height: 96px;
  border-radius: 16px;
  object-fit: contain;
  background: #ffffff;
  padding: 2px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.sidebar-brand-text {
  display: none !important;
}

.sidebar-nav {
  flex: 1;
  padding: 14px 10px;
  overflow-y: auto;
}

.sidebar-section-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #818cf8;
  padding: 14px 14px 6px;
  opacity: 0.85;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  color: var(--text-sidebar);
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: 16px;
  transition: var(--tr);
  position: relative;
  margin: 3px 0;
}

.sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
  transform: translateX(2px);
}

.sidebar-nav a.active {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.sidebar-nav a.active::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 22px;
  background: #ffffff;
  border-radius: 0 6px 6px 0;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
}

.sidebar-nav a i {
  width: 22px;
  text-align: center;
  font-size: 0.95rem;
  opacity: 0.9;
}

.sidebar-nav a:hover i,
.sidebar-nav a.active i { opacity: 1; }

.sidebar-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 10px 12px;
}

/* Sidebar submenu */
.sidebar-submenu {
  display: none;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 14px;
  margin: 4px 0;
  padding: 4px 0;
}
.sidebar-submenu.open { display: block; }
.sidebar-submenu a {
  padding-left: 44px;
  font-size: 0.83rem;
  font-weight: 500;
  color: #cbd5e1;
  border-radius: 12px;
}
.sidebar-submenu a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

.sidebar-toggle-btn {
  display: none;
  position: fixed;
  top: 14px;
  left: 12px;
  z-index: 1100;
  width: 40px; height: 40px;
  border: none;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
}
/* ─── Pinned Sidebar Footer (Logout at Bottom) ───────────── */
.sidebar-footer {
  padding: 12px 10px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: auto;
}

.sidebar-logout-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  color: #fca5a5;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 16px;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.25);
  transition: var(--tr);
}

.sidebar-logout-btn:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.4);
  transform: translateY(-1px);
}

.sidebar-logout-btn i {
  width: 22px;
  text-align: center;
  font-size: 0.95rem;
}

/* ─── Sidebar Collapse Toggle Button (Inside Footer) ──────── */
.sidebar-collapse-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  cursor: pointer;
  transition: var(--tr);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.sidebar-collapse-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.sidebar-collapse-btn i {
  width: 22px;
  text-align: center;
  font-size: 0.95rem;
}

/* Collapsed Icon-Only State */
.nsas-sidebar.collapsed {
  width: 72px;
}

#content-wrapper.collapsed-margin {
  margin-left: 104px;
}

.nsas-sidebar.collapsed .sidebar-brand {
  justify-content: center;
  padding: 18px 6px;
}

.nsas-sidebar.collapsed .sidebar-brand-img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  padding: 1px;
}

.nsas-sidebar.collapsed .sidebar-brand-text,
.nsas-sidebar.collapsed .sidebar-section-label,
.nsas-sidebar.collapsed .sidebar-nav a span,
.nsas-sidebar.collapsed .sidebar-nav a .fa-chevron-down {
  display: none !important;
}

.nsas-sidebar.collapsed .sidebar-nav a {
  width: 46px;
  height: 46px;
  margin: 6px auto;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
}

.nsas-sidebar.collapsed .sidebar-nav a i {
  width: auto;
  font-size: 1.2rem;
  margin: 0;
}

.nsas-sidebar.collapsed .sidebar-submenu {
  display: none !important;
}

.nsas-sidebar.collapsed .sidebar-nav a.active::before {
  display: none !important;
}

.nsas-sidebar.collapsed .sidebar-nav a.active {
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.nsas-sidebar.collapsed .sidebar-footer {
  padding: 12px 4px 16px;
}

.nsas-sidebar.collapsed .sidebar-logout-btn {
  width: 46px;
  height: 46px;
  margin: 0 auto;
  padding: 0;
  justify-content: center;
  border-radius: 14px;
}

.nsas-sidebar.collapsed .sidebar-collapse-btn {
  width: 46px;
  height: 46px;
  margin: 0 auto 8px;
  padding: 0;
  justify-content: center;
  border-radius: 14px;
}

.nsas-sidebar.collapsed .sidebar-collapse-btn span {
  display: none !important;
}

.nsas-sidebar.collapsed .sidebar-collapse-btn i {
  margin: 0;
  font-size: 1.2rem;
}

.nsas-sidebar.collapsed .sidebar-logout-btn span {
  display: none !important;
}

.nsas-sidebar.collapsed .sidebar-logout-btn i {
  margin: 0;
  font-size: 1.2rem;
}

/* ─── Main Content Wrapper ───────────────────────────────── */
#content-wrapper {
  margin-left: calc(var(--sidebar-w) + 32px);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left .3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Topbar ─────────────────────────────────────────────── */
.nsas-topbar,
header.nsas-topbar {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  height: var(--topbar-h, 64px);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border, #e2e8f0);
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-title {
  flex: 1;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-avatar {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 6px 12px 6px 6px;
  border-radius: 40px;
  transition: var(--tr);
  background: transparent;
  border: 1.5px solid var(--border);
  position: relative;
}

.topbar-avatar:hover { background: var(--bg); }

.topbar-avatar img {
  width: 34px; height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.topbar-avatar .user-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.topbar-avatar .user-role {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1;
}

.topbar-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  min-width: 180px;
  z-index: 999;
  overflow: hidden;
}
.topbar-avatar:focus-within .topbar-dropdown,
.topbar-avatar.open .topbar-dropdown { display: block; }

.topbar-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 0.875rem;
  color: var(--text);
  transition: var(--tr);
}
.topbar-dropdown a:hover { background: var(--bg); }
.topbar-dropdown a.danger { color: var(--danger); }
.topbar-dropdown .dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* ─── Page Content ───────────────────────────────────────── */
.page-content {
  flex: 1;
  padding: 28px 28px 40px;
}

.page-header {
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.page-header .breadcrumb-nsas,
.breadcrumb {
  display: none !important;
}

/* ─── Stat Cards & Dashboard Grid ──────────────────────── */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.125rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: #ffffff;
  border-radius: 1.25rem;
  padding: 1.25rem 1.125rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 10px 25px rgba(9, 21, 46, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  border-left: 5px solid var(--card-color, var(--primary));
  border-top: 1px solid rgba(255, 255, 255, 0.8);
  border-right: 1px solid rgba(0, 0, 0, 0.04);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  transition: var(--tr);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  display: none;
}

.stat-card:hover {
  box-shadow: 0 16px 36px rgba(9, 21, 46, 0.12);
  transform: translateY(-4px);
}

.stat-icon {
  width: clamp(44px, 10vw, 54px);
  height: clamp(44px, 10vw, 54px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--card-color, var(--primary)) 0%, var(--card-color2, var(--accent)) 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.stat-body {
  flex: 1;
  min-width: 0; /* Enable flex child text truncation / wrapping */
}

.stat-label {
  font-size: clamp(0.7rem, 2.2vw, 0.76rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 4px;
  word-break: break-word;
  line-height: 1.2;
}

.stat-value {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 850;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.stat-sub {
  font-size: clamp(0.7rem, 2vw, 0.78rem);
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Dashboard Grid Layout (Chart + Quick Actions) */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.25rem;
  align-items: start;
}

/* Mobile Sidebar Backdrop */
.nsas-sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1045;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nsas-sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* ─── Cards ──────────────────────────────────────────────── */
.nsas-card {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(9, 21, 46, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.05);
  overflow: hidden;
  margin-bottom: 24px;
}

.nsas-card-header {
  padding: 18px 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(0, 0, 0, 0.01);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.nsas-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}

.nsas-card-body { padding: 24px; }

/* ─── Buttons ─────────────────────────────────────────────── */
.btn-nsas {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: var(--tr);
  font-family: var(--font);
  line-height: 1;
}

.btn-nsas:hover {
  opacity: 0.95;
  transform: translateY(-2px);
}

.btn-nsas:active {
  transform: translateY(0);
}

.btn-primary-nsas {
  background: linear-gradient(135deg, #102552 0%, #1e3a8a 100%);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(16, 37, 82, 0.25);
}

.btn-success-nsas {
  background: linear-gradient(135deg, var(--success), #34d399);
  color: #fff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-danger-nsas {
  background: linear-gradient(135deg, var(--danger), #f87171);
  color: #fff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
}

.btn-outline-nsas {
  background: rgba(30, 58, 138, 0.02);
  color: #1e3a8a;
  border: 1.5px solid rgba(30, 58, 138, 0.15);
}

.btn-outline-nsas:hover {
  background: linear-gradient(135deg, #102552 0%, #1e3a8a 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(16, 37, 82, 0.25);
}

.btn-sm-nsas { padding: 7px 18px; font-size: 0.82rem; border-radius: 10px; }

/* ─── Tables ──────────────────────────────────────────────── */
.nsas-table-wrap { overflow-x: auto; border-radius: 0 0 14px 14px; }

.nsas-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.nsas-table th {
  background: var(--bg);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.nsas-table td {
  padding: 13px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text);
  vertical-align: middle;
}

.nsas-table tbody tr:last-child td { border-bottom: none; }

.nsas-table tbody tr:hover td { background: #f8f9ff; }

/* ─── Badges ──────────────────────────────────────────────── */
.badge-nsas {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-success { background: #d1fae5; color: #065f46; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info    { background: #dbeafe; color: #1e40af; }
.badge-primary { background: #ede9fe; color: #4c1d95; }
.badge-gray    { background: #f1f5f9; color: var(--text-muted); }

/* ─── Forms ───────────────────────────────────────────────── */
.nsas-form-group { margin-bottom: 20px; }

.nsas-form-group label {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 7px;
}

.nsas-input,
.nsas-select {
  width: 100%;
  padding: 11px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 0.92rem;
  font-family: var(--font);
  color: var(--text);
  background: #ffffff;
  transition: var(--tr);
  outline: none;
}

.nsas-input:focus,
.nsas-select:focus {
  border-color: #5b5bf7;
  box-shadow: 0 0 0 4px rgba(91, 91, 247, 0.12);
}

.nsas-input::placeholder { color: #b0b8cc; }

.nsas-input:-webkit-autofill,
.nsas-input:-webkit-autofill:hover, 
.nsas-input:-webkit-autofill:focus, 
.nsas-select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px #ffffff inset !important;
  -webkit-text-fill-color: #0f172a !important;
}

/* ─── Alerts ──────────────────────────────────────────────── */
.nsas-alert {
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.nsas-alert-danger  { background: #fef2f2; color: #991b1b; border-left: 4px solid var(--danger); }
.nsas-alert-success { background: #f0fdf4; color: #14532d; border-left: 4px solid var(--success); }
.nsas-alert-info    { background: #eff6ff; color: #1e40af; border-left: 4px solid var(--info); }
.nsas-alert-warning { background: #fffbeb; color: #78350f; border-left: 4px solid var(--warning); }

/* ─── Loading Overlay ────────────────────────────────────── */
.nsas-loading {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.55);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.nsas-loading.active { display: flex; }

.nsas-spinner {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.15);
  border-top-color: var(--primary-light);
  animation: nsas-spin 0.8s linear infinite;
}

@keyframes nsas-spin { to { transform: rotate(360deg); } }

/* ─── Billowing Smoke Cloud Rocket Login ───────────────────── */
.smoke-login-wrapper {
  display: flex;
  width: 100%;
  min-height: 100vh;
  background: #ffffff;
  position: relative;
  overflow-x: hidden;
}

/* Left Deep Space Panel */
.smoke-hero-panel {
  flex: 1.1;
  min-width: 320px;
  background: linear-gradient(135deg, #0b1938 0%, #102552 50%, #1e3a70 100%);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 48px;
  color: #ffffff;
  z-index: 1;
  overflow: hidden;
}

.smoke-stars-bg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.25) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

/* Center Big Logo Hero Branding */
.smoke-hero-center-brand {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 440px;
  margin: auto 0;
  padding: 20px 10px;
}

.smoke-big-logo-container {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: #ffffff;
  padding: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 0 5px rgba(255, 255, 255, 0.3);
  position: relative;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: logoFloat 4s ease-in-out infinite alternate;
}

@keyframes logoFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

.smoke-big-logo-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: contain;
}

.logo-pulse-ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 2px solid rgba(147, 197, 253, 0.45);
  animation: ringPulse 2.5s linear infinite;
  pointer-events: none;
}

@keyframes ringPulse {
  0% { transform: scale(0.9); opacity: 0.85; }
  100% { transform: scale(1.25); opacity: 0; }
}

.smoke-college-name-big {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.15;
  color: #ffffff;
  margin: 0 0 6px 0;
  letter-spacing: -0.01em;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.smoke-college-sub-big {
  font-size: 1.05rem;
  color: #93c5fd;
  margin: 0 0 22px 0;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.smoke-system-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.smoke-system-tag i {
  color: #60a5fa;
  font-size: 1.1rem;
}

.smoke-left-footer {
  position: relative;
  z-index: 10;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.75);
}

.smoke-left-footer a {
  color: rgba(255, 255, 255, 0.9);
  transition: var(--tr);
}
.smoke-left-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Billowing Puffy Cloud Smoke SVG Divider */
.smoke-cloud-divider {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 50%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

.smoke-cloud-divider svg {
  width: 100%;
  height: 100%;
}

/* Right Form Panel (Sits over White Cloud Area) */
.smoke-form-panel {
  flex: 1;
  max-width: 620px;
  min-width: 320px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 36px;
  position: relative;
  z-index: 10;
}

.smoke-form-card {
  width: 100%;
  max-width: 480px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 28px;
  padding: 38px 34px;
  box-shadow: 0 25px 65px -10px rgba(16, 37, 82, 0.18), 0 4px 20px rgba(0, 0, 0, 0.03), 0 0 0 1px rgba(226, 232, 240, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.9);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.smoke-form-card:hover {
  box-shadow: 0 30px 75px -12px rgba(16, 37, 82, 0.24), 0 6px 24px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(37, 99, 235, 0.2);
}

.smoke-avatar-badge {
  width: 66px;
  height: 66px;
  border-radius: 20px;
  background: linear-gradient(135deg, #102552 0%, #2563eb 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  margin: 0 auto 18px;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.38);
  position: relative;
}

.smoke-avatar-badge::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 23px;
  border: 2px solid rgba(37, 99, 235, 0.25);
  pointer-events: none;
}

.smoke-form-header {
  margin-bottom: 26px;
  text-align: center;
}

.smoke-form-header h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 0;
  background: linear-gradient(135deg, #0f172a 0%, #102552 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.smoke-form-header p {
  font-size: 0.9rem;
  color: #64748b;
  margin-top: 5px;
  font-weight: 500;
}

.dept-batch-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.nsas-form-group {
  margin-bottom: 20px;
}

.nsas-form-group label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 7px;
}

.label-icon-badge {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.nsas-form-group:focus-within .label-icon-badge {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

/* Sleek Form Inputs */
.smoke-field-input {
  width: 100%;
  background: #f8fafc !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 12px !important;
  padding: 11px 15px !important;
  font-size: 0.925rem !important;
  color: #0f172a !important;
  font-weight: 500 !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02) !important;
}

/* Custom Floating Select Dropdown Component */
.custom-select-wrapper {
  position: relative;
  width: 100%;
  user-select: none;
}

.custom-select-trigger {
  width: 100%;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 11px 15px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.custom-select-trigger:hover {
  border-color: #3b82f6;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.custom-select-wrapper.open .custom-select-trigger {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16), 0 4px 14px rgba(37, 99, 235, 0.1);
}

.custom-select-arrow {
  font-size: 0.8rem;
  color: #2563eb;
  transition: transform 0.25s ease;
}

.custom-select-wrapper.open .custom-select-arrow {
  transform: rotate(180deg);
}

.custom-select-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  box-shadow: 0 16px 36px -6px rgba(16, 37, 82, 0.22), 0 4px 12px rgba(0, 0, 0, 0.06);
  padding: 6px;
  z-index: 9999;
  max-height: 220px;
  overflow-y: auto;
  display: none;
}

.custom-select-wrapper.open .custom-select-options {
  display: block;
  animation: selectMenuFade 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes selectMenuFade {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.custom-select-option {
  padding: 9px 13px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.15s ease;
}

.custom-select-option:hover {
  background: #f0f5fd;
  color: #2563eb;
}

.custom-select-option.selected {
  background: #eff6ff;
  color: #2563eb;
  font-weight: 700;
}

.custom-select-option.selected::after {
  content: '✓';
  font-size: 0.85rem;
  font-weight: 800;
  color: #2563eb;
}

.smoke-pwd-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  font-size: 0.95rem;
  transition: color 0.2s ease, transform 0.2s ease;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.smoke-pwd-toggle:hover {
  color: #2563eb;
  transform: translateY(-50%) scale(1.1);
}

.smoke-submit-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  border-radius: 16px;
  margin-top: 10px;
  position: relative;
  overflow: hidden;
  
  /* Glassmorphism Surface */
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.88) 0%, rgba(16, 37, 82, 0.92) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  cursor: pointer;
  
  /* Glassmorphism Inner Light Highlight & Glowing Drop Shadow */
  box-shadow: 
    0 12px 30px -4px rgba(37, 99, 235, 0.45),
    0 4px 14px rgba(16, 37, 82, 0.25),
    inset 0 1.5px 1.5px rgba(255, 255, 255, 0.65),
    inset 0 -1.5px 1.5px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Glass Shine Reflection Sweep Overlay */
.smoke-submit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 70%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-22deg);
  transition: left 0.75s ease;
  pointer-events: none;
}

.smoke-submit-btn:hover::before {
  left: 150%;
}

.smoke-submit-btn:hover {
  transform: translateY(-2.5px);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.96) 0%, rgba(23, 55, 117, 0.96) 100%);
  border-color: rgba(255, 255, 255, 0.75);
  box-shadow: 
    0 16px 38px -4px rgba(37, 99, 235, 0.55),
    0 6px 18px rgba(16, 37, 82, 0.35),
    inset 0 2px 2px rgba(255, 255, 255, 0.85),
    inset 0 -1.5px 1.5px rgba(0, 0, 0, 0.15);
}

.smoke-submit-btn:active {
  transform: translateY(0);
  box-shadow: 
    0 6px 18px -2px rgba(37, 99, 235, 0.35),
    inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.smoke-test-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #334155;
  background: #f1f5f9;
  border: 1.5px dashed #cbd5e1;
  border-radius: 14px;
  margin-top: 12px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.smoke-test-btn:hover {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #2563eb;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.14);
  transform: translateY(-1.5px);
}

.smoke-pills-footer {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed #e2e8f0;
}

.smoke-pill {
  font-size: 0.8rem;
  font-weight: 700;
  color: #102552;
  padding: 7px 16px;
  border-radius: 99px;
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.smoke-pill:hover {
  background: #102552;
  color: #ffffff;
  border-color: #102552;
  box-shadow: 0 6px 16px rgba(16, 37, 82, 0.25);
  transform: translateY(-1.5px);
}

/* Hide blue hero section on small laptops, tablets, and mobile devices */
@media (max-width: 1024px) {
  .smoke-hero-panel,
  .smoke-cloud-divider {
    display: none !important;
  }
  .smoke-login-wrapper {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    height: auto;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 24px 16px;
    overflow-y: auto;
  }
  .smoke-form-panel {
    width: 100%;
    max-width: 500px;
    padding: 0;
    transform: none;
    background: transparent;
  }
  .smoke-form-card {
    width: 100%;
    max-width: 500px;
    padding: 36px 28px;
    box-shadow: 0 20px 50px rgba(16, 37, 82, 0.12);
  }
  .dept-batch-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (max-width: 540px) {
  .smoke-login-wrapper {
    padding: 16px 12px;
  }
  .smoke-form-card {
    padding: 28px 18px;
    border-radius: 22px;
  }
  .smoke-form-header h2 {
    font-size: 1.4rem;
  }
  .smoke-avatar-badge {
    width: 54px;
    height: 54px;
    font-size: 1.35rem;
    margin-bottom: 14px;
  }
}

/* Form Inputs with Lavender-Blue Soft Tint */
.spacer-input {
  background: #f0f5fd !important;
  border: 1.5px solid #dbe6fb !important;
  border-radius: 12px !important;
  padding: 11px 16px !important;
  font-size: 0.9rem !important;
  color: #0f172a !important;
  transition: var(--tr) !important;
}

.spacer-input:focus {
  background: #ffffff !important;
  border-color: #1d69d8 !important;
  box-shadow: 0 0 0 4px rgba(29, 105, 216, 0.14) !important;
}

.spacer-pwd-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  font-size: 0.9rem;
  transition: var(--tr);
}
.spacer-pwd-toggle:hover { color: #1d69d8; }

/* Primary Submit Button */
.spacer-submit-btn {
  width: 100%;
  justify-content: center;
  padding: 13px;
  font-size: 0.98rem;
  font-weight: 700;
  border-radius: 12px;
  margin-top: 8px;
  background: linear-gradient(180deg, #1d69d8 0%, #1553b4 100%);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(29, 105, 216, 0.32);
}

.spacer-submit-btn:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 12px 28px rgba(29, 105, 216, 0.4);
}

/* Quick Switch Divider & Pills */
.spacer-social-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0 14px;
  color: #94a3b8;
  font-size: 0.76rem;
  font-weight: 600;
}

.spacer-social-divider::before,
.spacer-social-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}

.spacer-social-divider span {
  padding: 0 10px;
}

.spacer-portal-pills {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.spacer-pill-link {
  font-size: 0.78rem;
  font-weight: 700;
  color: #1d69d8;
  padding: 6px 14px;
  border-radius: 99px;
  background: #f0f5fd;
  border: 1.5px solid #dbe6fb;
  transition: var(--tr);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.spacer-pill-link:hover {
  background: #1d69d8;
  color: #ffffff;
  border-color: #1d69d8;
  box-shadow: 0 4px 14px rgba(29, 105, 216, 0.25);
  transform: translateY(-1px);
}

/* Responsive Scaling */
@media (max-width: 820px) {
  .spacer-login-container {
    overflow-y: auto;
    height: auto;
    min-height: 100vh;
    padding: 16px;
  }
  .spacer-login-card {
    flex-direction: column;
    max-width: 440px;
    min-height: auto;
  }
  .spacer-card-left {
    padding: 32px 24px;
  }
  .cloud-divider-wrap { display: none; }
  .spacer-card-right {
    padding: 28px 24px;
  }
}

/* ─── Camera / Face Recognition UI ──────────────────────── */
.face-scan-container {
  position: relative;
  background: #090d16;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 4/3;
  max-width: 560px;
  margin: 0 auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 0 2px rgba(6, 182, 212, 0.3);
}

.face-scan-container video,
.face-scan-container canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.face-scan-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 60%, rgba(9, 13, 22, 0.4) 100%);
}

.scan-corner {
  position: absolute;
  width: 36px; height: 36px;
  border-color: var(--accent-light);
  border-style: solid;
  opacity: 0.9;
  filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.6));
}
.scan-corner.tl { top: 16px; left: 16px; border-width: 3.5px 0 0 3.5px; border-radius: 8px 0 0 0; }
.scan-corner.tr { top: 16px; right: 16px; border-width: 3.5px 3.5px 0 0; border-radius: 0 8px 0 0; }
.scan-corner.bl { bottom: 16px; left: 16px; border-width: 0 0 3.5px 3.5px; border-radius: 0 0 0 8px; }
.scan-corner.br { bottom: 16px; right: 16px; border-width: 0 3.5px 3.5px 0; border-radius: 0 0 8px 0; }

.scan-line {
  position: absolute;
  left: 8%; right: 8%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-light), #818cf8, transparent);
  box-shadow: 0 0 16px var(--accent-light);
  animation: scan-sweep 2.2s ease-in-out infinite;
  border-radius: 99px;
}

@keyframes scan-sweep {
  0%   { top: 8%; opacity: 0.4; }
  50%  { top: 92%; opacity: 1; }
  100% { top: 8%; opacity: 0.4; }
}

.face-status-badge {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  border-radius: 99px;
  padding: 8px 20px;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ─── Attendance Status Chip ─────────────────────────────── */
.att-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--tr);
  border: 1.5px solid transparent;
}

.att-chip.present { background: #d1fae5; color: #065f46; }
.att-chip.absent  { background: #fee2e2; color: #991b1b; }
.att-chip.od      { background: #fef3c7; color: #78350f; }
.att-chip.none    { background: #f1f5f9; color: var(--text-muted); border-style: dashed; border-color: var(--border); }

/* ─── Footer ──────────────────────────────────────────────── */
.nsas-footer {
  display: none !important;
}

/* ─── Responsive Sidebar & Layout (Mobile & Tablet) ─────── */
@media (max-width: 900px) {
  .sidebar-collapse-btn {
    display: none !important;
  }

  .sidebar-toggle-btn {
    display: flex !important;
  }

  .nsas-sidebar {
    transform: translateX(-120%);
    top: 16px;
    left: 16px;
    bottom: 16px;
    height: calc(100vh - 32px);
    width: 260px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  }

  .nsas-sidebar.collapsed .sidebar-section-label,
  .nsas-sidebar.collapsed .sidebar-nav a span,
  .nsas-sidebar.collapsed .sidebar-nav a .fa-chevron-down,
  .nsas-sidebar.collapsed .sidebar-logout-btn span {
    display: flex !important;
  }

  .nsas-sidebar.open {
    transform: translateX(0) !important;
  }

  #content-wrapper,
  #content-wrapper.collapsed-margin {
    margin-left: 0 !important;
    padding-top: 50px;
  }

  .page-content {
    padding: 16px 14px 32px;
  }

  .stat-cards {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .page-content {
    padding: 12px 10px 24px;
  }
  .stat-cards {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
}

/* ─── DataTables Override ─────────────────────────────────── */
.dataTables_wrapper .dataTables_filter input {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  font-family: var(--font);
  font-size: 0.875rem;
  outline: none;
  transition: var(--tr);
}
.dataTables_wrapper .dataTables_filter input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.dataTables_wrapper .dataTables_length select {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
  font-family: var(--font);
}
.dataTables_paginate .paginate_button {
  border-radius: 6px !important;
  font-family: var(--font) !important;
  font-size: 0.8rem !important;
}
.dataTables_paginate .paginate_button.current {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}

/* ─── Responsive Tables & Containers ──────────────────────── */
.table-responsive,
.dataTables_wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ─── Utilities ───────────────────────────────────────────── */
.text-muted-nsas { color: var(--text-muted); }
.fw-700 { font-weight: 700; }
.gap-8  { gap: 8px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

/* ─── Quick Actions Tiles Grid ───────────────────────────── */
.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.action-tile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #ffffff;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 15px rgba(9, 21, 46, 0.02);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none !important;
  position: relative;
  overflow: hidden;
}

.action-tile-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(9, 21, 46, 0.08);
  border-color: rgba(30, 58, 138, 0.1);
}

.tile-icon-wrapper {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--tile-color);
  background: var(--tile-bg);
  flex-shrink: 0;
  transition: transform 0.25s;
}

.action-tile-card:hover .tile-icon-wrapper {
  transform: scale(1.08) rotate(3deg);
}

.tile-content {
  flex: 1;
}

.tile-content h3 {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 3px 0;
  letter-spacing: -0.01em;
}

.tile-content p {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin: 0;
  font-weight: 500;
  line-height: 1.3;
}

.tile-arrow {
  font-size: 0.76rem;
  color: #cbd5e1;
  transition: all 0.25s;
}

.action-tile-card:hover .tile-arrow {
  color: #1e3a8a;
  transform: translateX(3px);
}

/* ─── Glassmorphism Button ───────────────────────────────── */
.btn-glass-primary {
  background: rgba(30, 58, 138, 0.75) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 32px rgba(16, 37, 82, 0.12) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  transition: var(--tr);
}

.btn-glass-primary:hover:not(:disabled) {
  background: rgba(30, 58, 138, 0.88) !important;
  box-shadow: 0 12px 36px rgba(16, 37, 82, 0.22) !important;
  border-color: rgba(255, 255, 255, 0.38) !important;
  transform: translateY(-2px);
}

.btn-glass-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ============================================================
   RESPONSIVE DESIGN SYSTEM & MOBILE OPTIMIZATIONS
   ============================================================ */

/* Touch Target Minimum Dimensions for Accessibility */
button,
select,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="submit"],
.btn-nsas,
.nsas-input,
.nsas-select,
.smoke-field-input,
.btn {
  min-height: 2.75rem; /* 44px touch target */
}

/* Fluid Layout & Container Overflows Guard */
body, #wrapper, #content-wrapper, main {
  max-width: 100vw;
  overflow-x: hidden;
}

/* ─── Media Query: Desktop & Laptops (> 1024px) ───────────── */
@media (min-width: 1025px) {
  .sidebar-toggle-btn {
    display: none !important;
  }
}

/* ─── Media Query: Laptops & Tablets (<= 1024px) ──────────── */
@media (max-width: 1024px) {
  :root {
    --sidebar-w: 240px;
  }

  .nsas-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    border-radius: 0;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
  }

  .nsas-sidebar.active,
  .nsas-sidebar.show,
  .nsas-sidebar.open {
    transform: translateX(0);
  }

  #content-wrapper {
    margin-left: 0 !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    width: 100% !important;
  }

  .sidebar-toggle-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    background: #ffffff;
    color: var(--primary);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    font-size: 1.1rem;
    margin-right: 0.75rem;
  }

  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 1rem;
  }

  .action-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr));
    gap: 1rem;
  }
}

/* ─── Media Query: Mobile & Small Tablets (<= 768px) ───────── */
@media (max-width: 768px) {
  /* Dynamic Typography Scaling */
  html {
    font-size: 14px;
  }

  .page-header h1, h1 {
    font-size: clamp(1.25rem, 4vw, 1.75rem);
  }

  .page-content {
    padding: 1rem 0.75rem !important;
  }

  .dashboard-grid {
    grid-template-columns: 1fr !important;
  }

  /* Form Controls & Layout Grids */
  .form-row,
  .form-group.row,
  .dept-batch-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.875rem !important;
  }

  .col-xl-6, .col-lg-6, .col-md-6, .col-sm-12, .col-12 {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
  }

  .nsas-card-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.75rem;
  }

  .d-sm-flex {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
  }

  /* DataTables & Table Wrappers */
  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter {
    text-align: left !important;
    float: none !important;
    margin-bottom: 0.75rem !important;
    width: 100% !important;
  }

  .dataTables_wrapper .dataTables_filter input {
    width: 100% !important;
    margin-left: 0 !important;
    margin-top: 0.25rem;
  }

  .dataTables_paginate {
    float: none !important;
    text-align: center !important;
    margin-top: 0.75rem !important;
    display: flex !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 0.25rem !important;
  }

  .nsas-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -0.5rem;
    padding: 0 0.5rem;
  }

  .nsas-table th, .nsas-table td {
    padding: 0.625rem 0.75rem !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }

  /* Login Portal Mobile Layout */
  .smoke-login-wrapper {
    flex-direction: column !important;
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100vh !important;
  }

  .smoke-hero-panel {
    width: 100% !important;
    min-height: auto !important;
    padding: 2.5rem 1.25rem 2rem 1.25rem !important;
    flex: none !important;
  }

  .smoke-big-logo-container {
    width: 110px !important;
    height: 110px !important;
    margin-bottom: 12px !important;
  }

  .smoke-college-name-big {
    font-size: 1.4rem !important;
  }

  .smoke-college-sub-big {
    font-size: 0.9rem !important;
    margin-bottom: 14px !important;
  }

  .smoke-system-tag {
    font-size: 0.8rem !important;
    padding: 6px 16px !important;
  }

  .smoke-form-panel {
    width: 100% !important;
    max-width: 100% !important;
    padding: 1.5rem 1rem 2.5rem 1rem !important;
    background: #ffffff !important;
  }

  .smoke-form-card {
    max-width: 100% !important;
  }

  .smoke-cloud-divider {
    display: none !important;
  }
}

/* ─── Media Query: Extra Small Mobile Screens (<= 576px) ───── */
@media (max-width: 576px) {
  html {
    font-size: 13.5px;
  }

  .stat-cards {
    grid-template-columns: 1fr !important;
    gap: 0.875rem !important;
  }

  .stats-grid,
  .action-grid {
    grid-template-columns: 1fr !important;
  }

  .btn-nsas, .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  .d-flex.gap-2 {
    flex-direction: column !important;
    width: 100% !important;
  }
}

/* Camera & Video Feed Responsiveness Guard */
video, #video, #photo, canvas, #canvas, .video-container {
  max-width: 100% !important;
  height: auto !important;
}
