/* ============================================================
   NTSI Licensing Web App — Main Stylesheet
   Design: Soft gradient, white cards, NTSI green accents
   Responsive across all devices
   ============================================================ */

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

/* ── CSS Variables ────────────────────────────────────────── */
:root {
  /* Brand (NTSI vivid green per Figma rgba(30,172,60)) */
  --ntsi-green: #1EAC3C;
  --ntsi-green-light: #2BC44E;
  --ntsi-green-dark: #168F32;
  --ntsi-green-faint: #DCFCE7;
  --ntsi-green-soft: rgba(30, 172, 60, 0.42);

  /* Figma 250deg dashboard gradient: lavender -> white -> peach */
  --bg-gradient: linear-gradient(250deg,
      rgba(205, 175, 235, 1) 0%,
      rgba(250, 245, 255, 1) 50%,
      rgba(248, 180, 154, 1) 100%);

  /* Sidebar widths (thin / expanded) */
  --sidebar-w: 96px;
  --sidebar-w-expanded: 260px;
  --sidebar-bg: rgba(255, 255, 255, 0.55);
  --sidebar-border: rgba(255, 255, 255, 0.7);

  /* Glass card preset (Figma) */
  --glass-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.33) 100%);

  /* Cards */
  --card-bg: #ffffff;
  --card-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
  --card-radius: 16px;

  /* Tile color tokens (Figma) */
  --tile-blue: #A8D5FF;
  --tile-purple: #E5D7FB;
  --tile-pink: #FBD3F5;

  /* Typography */
  --text-primary: #1F1F1F;
  --text-secondary: #515151;
  --text-muted: #797979;

  /* Status colours */
  --status-pending: #f59e0b;
  --status-approved: #16a34a;
  --status-rejected: #ef4444;
  --status-scheduled: #3b82f6;
  --status-in-test: #8b5cf6;
  --status-completed: #10b981;
  --status-paid: #0ea5e9;
  --status-pass: #16a34a;
  --status-fail: #ef4444;

  /* Transitions */
  --transition: 0.2s ease;
}

/* ── Reset & Base ─────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

/* ── App Layout ───────────────────────────────────────────── */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar (thin / expandable, Figma) ───────────────────── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--sidebar-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 100;
  transition: width var(--transition);
  overflow: hidden;
  padding: 22px 0 18px;
}

body.sidebar-expanded .sidebar {
  width: var(--sidebar-w-expanded);
  align-items: stretch;
  padding: 22px 18px 18px;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  justify-content: center;
  margin-bottom: 28px;
  min-height: 52px;
  background: transparent;
}

body.sidebar-expanded .sidebar-logo {
  justify-content: flex-start;
  padding: 0 2px;
}

.sidebar-logo img,
.sidebar-logo .sidebar-logo-img {
  /* width: 48px; */
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
}

/* Show triangular SVG only when sidebar is collapsed (icon-only) */
.sidebar-logo .sidebar-logo-collapsed {
  display: block;
  width: 48px;
  height: 48px;
}

.sidebar-logo .sidebar-logo-expanded {
  display: none;
}

/* Show full banner PNG only when sidebar is expanded */
body.sidebar-expanded .sidebar-logo .sidebar-logo-expanded {
  display: block;
}

body.sidebar-expanded .sidebar-logo .sidebar-logo-collapsed {
  display: none;
}

.sidebar-logo .logo-text {
  display: none;
  flex-direction: column;
  line-height: 1.15;
}

body.sidebar-expanded .sidebar-logo .logo-text {
  display: flex;
}

.sidebar-logo .logo-text .logo-main {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--ntsi-green-dark);
  white-space: nowrap;
}

.sidebar-logo .logo-text .logo-sub {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Navigation */
.sidebar-nav {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 0;
}

body.sidebar-expanded .sidebar-nav {
  align-items: stretch;
  gap: 6px;
}

.nav-section-label {
  display: none;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 14px 6px 4px;
}

body.sidebar-expanded .nav-section-label {
  display: block;
}

/* Each nav item is a circle when collapsed, a pill when expanded */
.nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: var(--text-secondary);
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  background: transparent;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  position: relative;
  white-space: nowrap;
  flex-shrink: 0;
}

body.sidebar-expanded .nav-link {
  width: 100%;
  height: 44px;
  border-radius: 14px;
  justify-content: flex-start;
  gap: 12px;
  padding: 0 14px;
}

.nav-link .nav-label {
  display: none;
}

body.sidebar-expanded .nav-link .nav-label {
  display: inline;
}

.nav-link:hover {
  background: var(--ntsi-green-faint);
  color: var(--ntsi-green-dark);
}

.nav-link.active {
  background: var(--ntsi-green);
  color: #fff;
  box-shadow: 0 6px 14px rgba(30, 172, 60, 0.28);
}

.nav-link.active:hover {
  background: var(--ntsi-green-dark);
  color: #fff;
}

.nav-link svg,
.nav-link .nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Sidebar bottom (collapse chevron + user) */
.sidebar-bottom {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--sidebar-border);
  margin-top: 8px;
}

body.sidebar-expanded .sidebar-bottom {
  align-items: stretch;
}

/* Gradient pill-toggle (Figma reference: green->blue diagonal track, large soft-shadow thumb) */
.ios-toggle {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  outline: none;
}

.ios-toggle-track {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(120deg, #5DE0A6 0%, #58B2DC 60%, #4F9EE0 100%);
  transition: filter 240ms ease, box-shadow 240ms ease;
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.10),
    inset 0 -1px 1px rgba(255, 255, 255, 0.20);
  /* off (collapsed) state: desaturate the gradient */
  filter: grayscale(0.55) brightness(1.04);
}

.ios-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.22),
    0 1px 2px rgba(0, 0, 0, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.04);
  transition: transform 280ms cubic-bezier(.4, .0, .2, 1);
}

body.sidebar-expanded .ios-toggle-track {
  filter: none;
}

body.sidebar-expanded .ios-toggle-thumb {
  transform: translateX(32px);
}

.ios-toggle:hover .ios-toggle-thumb {
  box-shadow:
    0 6px 14px rgba(0, 0, 0, 0.26),
    0 1px 2px rgba(0, 0, 0, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.04);
}

.ios-toggle:focus-visible .ios-toggle-track {
  box-shadow:
    0 0 0 3px rgba(88, 178, 220, 0.30),
    inset 0 1px 2px rgba(0, 0, 0, 0.10),
    inset 0 -1px 1px rgba(255, 255, 255, 0.20);
}

.user-card-mini {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

body.sidebar-expanded .user-card-mini {
  justify-content: flex-start;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ntsi-green-faint);
  color: var(--ntsi-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-info {
  flex: 1;
  min-width: 0;
  display: none;
}

body.sidebar-expanded .user-info {
  display: block;
}

.user-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'Poppins', sans-serif;
}

.user-role {
  font-size: 10.5px;
  color: var(--text-muted);
}

.logout-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}

body.sidebar-expanded .logout-btn {
  display: inline-flex;
}

.logout-btn:hover {
  background: #fee2e2;
  color: #ef4444;
}

/* ── Main Content ─────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--transition);
}

body.sidebar-expanded .main-content {
  margin-left: var(--sidebar-w-expanded);
}

/* Top Navbar (Figma) */
.top-navbar {
  position: sticky;
  position: static;
  top: 0;
  background: transparent;
  padding: 22px 28px 14px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(280px, 420px) auto;
  align-items: center;
  gap: 18px;
  z-index: 90;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.navbar-mid {
  display: flex;
  align-items: center;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.breadcrumb .crumb-current {
  color: var(--ntsi-green);
  font-weight: 600;
}

.breadcrumb svg {
  width: 12px;
  height: 12px;
  opacity: 0.6;
}

.page-title {
  font-family: 'Poppins', sans-serif;
  font-size: 25px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.page-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}

.title-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

/* Search pill (Figma 51px radius) */
.search-bar {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 51px;
  padding: 10px 18px;
  gap: 10px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.search-bar input {
  border: none;
  background: none;
  outline: none;
  font-family: 'Poppins', sans-serif;
  font-size: 13.5px;
  color: var(--text-primary);
  width: 100%;
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

.search-bar svg {
  color: var(--text-muted);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Welcome card (right side of navbar) */
.welcome-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--glass-bg);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  padding: 10px 16px 10px 14px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  min-width: 220px;
}

.welcome-card .welcome-text {
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.25;
}

.welcome-card .welcome-text strong {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 13.5px;
}

.welcome-card .welcome-text .welcome-greet {
  display: block;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 400;
}

/* Round icon buttons in navbar */
.nav-icon-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid rgba(255, 255, 255, 0.7);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav-icon-btn:hover {
  background: #fff;
  color: var(--ntsi-green);
}

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

/* ── Page Content Area ────────────────────────────────────── */
.page-content {
  padding: 28px;
  flex: 1;
}

/* App footer (admin portal) */
.app-footer {
  padding: 14px 28px 18px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid var(--sidebar-border);
  background: transparent;
}

.app-footer a {
  color: var(--ntsi-green-dark);
  font-weight: 600;
  text-decoration: none;
  margin-left: 4px;
  letter-spacing: 0.4px;
}

.app-footer a:hover {
  text-decoration: underline;
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  border: none;
}

.card-header {
  background: none;
  border-bottom: 1px solid #f1f5f9;
  padding: 18px 22px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.card-body {
  padding: 22px;
}

/* Stat Cards */
.stat-card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 22px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  color: var(--text-primary);
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}

/* ── Tables ───────────────────────────────────────────────── */
.table-wrapper {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.table {
  margin: 0;
  font-size: 13.5px;
}

.table thead th {
  background: #f8fafc;
  border-bottom: 1px solid #e9ecef;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  padding: 12px 16px;
  white-space: nowrap;
}

.table tbody td {
  padding: 12px 16px;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text-primary);
}

.table tbody tr:hover {
  background: #f8fafc;
}

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

/* ── Status Badges ────────────────────────────────────────── */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-pending {
  background: #fef3c7;
  color: #92400e;
}

.status-approved {
  background: var(--ntsi-green-faint);
  color: var(--ntsi-green-dark);
}

.status-rejected {
  background: #fee2e2;
  color: #991b1b;
}

.status-scheduled {
  background: #dbeafe;
  color: #1e40af;
}

.status-in-test {
  background: #ede9fe;
  color: #5b21b6;
}

.status-completed {
  background: #d1fae5;
  color: #065f46;
}

.status-paid {
  background: #e0f2fe;
  color: #0c4a6e;
}

.status-pass {
  background: var(--ntsi-green-faint);
  color: var(--ntsi-green-dark);
}

.status-fail {
  background: #fee2e2;
  color: #991b1b;
}

.status-checked-in {
  background: #fef9c3;
  color: #713f12;
}

.status-assigned {
  background: #ede9fe;
  color: #5b21b6;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 13.5px;
  border-radius: 10px;
  padding: 8px 18px;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  cursor: pointer;
}

.btn-primary {
  background: var(--ntsi-green);
  border-color: var(--ntsi-green);
  color: #fff;
}

.btn-primary:hover {
  background: var(--ntsi-green-dark);
  border-color: var(--ntsi-green-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.btn-outline-primary {
  border: 1.5px solid var(--ntsi-green);
  color: var(--ntsi-green);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--ntsi-green-faint);
  color: var(--ntsi-green-dark);
}

.btn-light {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: var(--text-secondary);
}

.btn-light:hover {
  background: #f1f5f9;
}

.btn-danger {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12.5px;
  border-radius: 8px;
}

.btn-lg {
  padding: 12px 28px;
  font-size: 15px;
  border-radius: 12px;
}

/* Icon button */
.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

/* ── Forms ────────────────────────────────────────────────── */
.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.form-control,
.form-select {
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 13.5px;
  color: var(--text-primary);
  background: #ffffff;
  transition: border-color var(--transition), box-shadow var(--transition);
  font-family: 'Inter', sans-serif;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--ntsi-green);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
  outline: none;
}

.form-control.is-invalid {
  border-color: #ef4444;
}

.form-control.is-valid {
  border-color: var(--ntsi-green);
}

.invalid-feedback {
  font-size: 12px;
  color: #ef4444;
}

/* ── File Upload Zone ─────────────────────────────────────── */
.upload-zone {
  border: 2px dashed #d1d5db;
  border-radius: 16px;
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  background: #fafafa;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--ntsi-green);
  background: var(--ntsi-green-faint);
}

.upload-zone .upload-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  background: var(--ntsi-green-faint);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ntsi-green);
}

.upload-zone .upload-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.upload-zone .upload-sub {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Upload Progress */
.upload-progress-bar {
  height: 6px;
  border-radius: 10px;
  background: #e9ecef;
  overflow: hidden;
}

.upload-progress-bar .progress-fill {
  height: 100%;
  background: var(--ntsi-green);
  border-radius: 10px;
  transition: width 0.4s ease;
}

/* ── Alerts & Toasts ──────────────────────────────────────── */
.alert {
  border-radius: 12px;
  border: none;
  padding: 14px 18px;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success {
  background: var(--ntsi-green-faint);
  color: var(--ntsi-green-dark);
}

.alert-danger {
  background: #fee2e2;
  color: #991b1b;
}

.alert-warning {
  background: #fef3c7;
  color: #92400e;
}

.alert-info {
  background: #dbeafe;
  color: #1e40af;
}

/* Toast notifications */
.toast-container-custom {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast-item {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  animation: slideIn 0.3s ease;
  border-left: 4px solid;
}

.toast-success {
  border-color: var(--ntsi-green);
}

.toast-error {
  border-color: #ef4444;
}

.toast-warning {
  border-color: #f59e0b;
}

@keyframes slideIn {
  from {
    transform: translateX(120%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ── Modals ───────────────────────────────────────────────── */
.modal-content {
  border: none;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.modal-header {
  border-bottom: 1px solid #f1f5f9;
  padding: 20px 24px;
  border-radius: 18px 18px 0 0;
}

.modal-title {
  font-weight: 700;
  font-size: 16px;
}

.modal-footer {
  border-top: 1px solid #f1f5f9;
  padding: 16px 24px;
}

/* ── Calendar / Schedule ──────────────────────────────────── */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 6px;
  border-radius: 8px;
  cursor: pointer;
  background: #f8fafc;
  transition: background var(--transition);
  font-size: 12px;
}

.calendar-day:hover {
  background: var(--ntsi-green-faint);
}

.calendar-day.has-tests {
  background: #dbeafe;
}

.calendar-day.today {
  background: var(--ntsi-green-faint);
  font-weight: 700;
  color: var(--ntsi-green);
}

.calendar-day.selected {
  background: var(--ntsi-green);
  color: #fff;
}

.day-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ntsi-green);
  margin-top: 3px;
}

/* ── Exam Form Evaluation ─────────────────────────────────── */
.eval-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}

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

.eval-label {
  font-size: 13.5px;
  font-weight: 500;
}

.eval-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.eval-radio-group {
  display: flex;
  gap: 8px;
}

.radio-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all var(--transition);
  background: #fff;
}

.radio-btn input {
  display: none;
}

.radio-btn.pass-btn:has(input:checked) {
  background: var(--ntsi-green-faint);
  border-color: var(--ntsi-green);
  color: var(--ntsi-green);
}

.radio-btn.fail-btn:has(input:checked) {
  background: #fee2e2;
  border-color: #ef4444;
  color: #ef4444;
}

.radio-btn:hover {
  border-color: #94a3b8;
}

/* ── Student Avatar Row ───────────────────────────────────── */
.avatar-stack {
  display: flex;
}

.avatar-stack .student-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ntsi-green-faint);
  color: var(--ntsi-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  border: 2px solid #fff;
  margin-left: -8px;
}

.avatar-stack .student-avatar:first-child {
  margin-left: 0;
}

/* ── Page Header ──────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.page-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.breadcrumb-custom {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

.breadcrumb-custom a {
  color: var(--ntsi-green);
  text-decoration: none;
}

/* ── Filter Bar ───────────────────────────────────────────── */
.filter-bar {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}

/* ── Login Page ───────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  background: var(--bg-gradient);
  background-attachment: fixed;
  display: flex;
  align-items: stretch;
}

.login-hero {
  flex: 1;
  background: linear-gradient(135deg, #064e3b 0%, #065f46 50%, #166534 100%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 48px;
  position: relative;
  overflow: hidden;
}

.login-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/static/images/login-hero.jpg') center/cover no-repeat;
  opacity: 0.25;
}

.login-hero-content {
  position: relative;
  color: #fff;
}

.login-hero h1 {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
}

.login-hero p {
  font-size: 15px;
  opacity: 0.8;
  max-width: 380px;
}

.login-form-panel {
  width: 420px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 48px;
}

.login-logo {
  width: 72px;
  margin-bottom: 28px;
}

.login-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 4px;
}

.login-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
  text-align: center;
}

/* ── Pending Payments (driving school) ────────────── */

/* Amber tile (4th dashboard tile) */
.ds-tile.tile-amber {
  background: linear-gradient(160deg, #FFE9B0 0%, #FFD37A 100%);
}

.ds-tile.tile-amber .tile-icon {
  color: #B45309;
}

/* Inline numeric badge inside tile-title */
.ds-tile .tile-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  margin-left: 6px;
  border-radius: 11px;
  background: #B45309;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}

/* Sidebar nav-link badge (red pill on right edge of pill nav) */
.nav-link .nav-badge {
  display: none;
}

body.sidebar-expanded .nav-link .nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  border-radius: 10px;
  background: #ef4444;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.nav-link.active .nav-badge {
  background: #fff;
  color: var(--ntsi-green-dark);
}

/* Pending Payments list page */
.pp-wrap {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pp-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--glass-bg);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  padding: 18px 22px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

.pp-summary-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(160deg, #FFE9B0 0%, #FFD37A 100%);
  color: #B45309;
}

.pp-summary-icon svg {
  width: 24px;
  height: 24px;
}

.pp-summary-text {
  min-width: 0;
}

.pp-summary-title {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.pp-summary-sub {
  font-size: 13px;
  color: var(--text-secondary);
}

.pp-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pp-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pp-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pp-batch-ref {
  min-width: 0;
}

.pp-ref-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.pp-ref-val {
  font-family: 'Poppins', sans-serif;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.pp-status {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  white-space: nowrap;
}

.pp-status-approved {
  background: #DCFCE7;
  color: #166534;
}

.pp-status-scheduled_payment_pending {
  background: #FEF3C7;
  color: #92400E;
}

.pp-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 22px;
}

.pp-cell-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}

.pp-cell-val {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.pp-cell-val.pp-amount {
  color: var(--ntsi-green-dark);
  font-weight: 700;
  font-size: 15px;
}

.pp-cell-val .muted {
  color: var(--text-muted);
  font-weight: 400;
}

.pp-card-foot {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding-top: 14px;
}

.pp-pay-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ntsi-green);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 12px;
  padding: 11px 18px;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 14px rgba(30, 172, 60, 0.25);
}

.pp-pay-btn:hover {
  background: var(--ntsi-green-dark);
  transform: translateY(-1px);
  color: #fff;
  box-shadow: 0 6px 18px rgba(30, 172, 60, 0.32);
}

.pp-pay-disabled {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #f3f4f6;
  color: var(--text-muted);
  font-family: 'Poppins', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  border-radius: 10px;
  padding: 9px 14px;
}

.pp-empty {
  text-align: center;
  background: var(--glass-bg);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  padding: 52px 28px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.pp-empty-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ntsi-green-faint);
  color: var(--ntsi-green);
  border-radius: 50%;
}

.pp-empty h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.pp-empty p {
  font-size: 13.5px;
  color: var(--text-secondary);
  max-width: 360px;
  margin: 0 auto 18px;
}

.pp-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--ntsi-green);
  color: #fff;
  border-radius: 10px;
  padding: 10px 18px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.pp-back-btn:hover {
  background: var(--ntsi-green-dark);
  color: #fff;
}

/* Responsive overrides for pending payments page */
@media (max-width: 767px) {
  .pp-card-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
  }

  .pp-card {
    padding: 16px;
  }

  .pp-summary {
    padding: 14px 16px;
  }

  .pp-summary-icon {
    width: 40px;
    height: 40px;
  }

  .pp-summary-icon svg {
    width: 20px;
    height: 20px;
  }

  .pp-summary-title {
    font-size: 14.5px;
  }

  .pp-summary-sub {
    font-size: 12.5px;
  }

  .pp-card-foot {
    justify-content: stretch;
  }

  .pp-pay-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .pp-card-grid {
    grid-template-columns: 1fr;
  }

  .pp-card-head {
    flex-wrap: wrap;
  }
}

/* ── Shared NTSI components ───────────────────────────── */

/* Glass page card / section panel */
.np-card {
  background: var(--glass-bg);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  padding: 22px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
  margin-bottom: 18px;
}

.np-card.solid {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  backdrop-filter: none;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.04);
  max-width: 100%;
}

.np-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.np-card-head h2,
.np-card-head h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.np-card-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Stat card grid */
.np-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.np-stat {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.04);
}

.np-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.np-stat-icon.green {
  background: var(--ntsi-green-faint);
  color: var(--ntsi-green);
}

.np-stat-icon.blue {
  background: #DBEAFE;
  color: #1d4ed8;
}

.np-stat-icon.amber {
  background: #FEF3C7;
  color: #B45309;
}

.np-stat-icon.purple {
  background: #EDE9FE;
  color: #6d28d9;
}

.np-stat-icon.pink {
  background: #FCE7F3;
  color: #BE185D;
}

.np-stat-icon.red {
  background: #FEE2E2;
  color: #B91C1C;
}

.np-stat-icon.cyan {
  background: #CFFAFE;
  color: #0E7490;
}

.np-stat-val {
  font-family: 'Poppins', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}

.np-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 3px;
}

/* Filter / toolbar bar */
.np-toolbar {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.np-toolbar .np-input,
.np-toolbar .np-select {
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  padding: 0 12px;
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  color: var(--text-primary);
  outline: none;
  min-width: 140px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.np-toolbar .np-input:focus,
.np-toolbar .np-select:focus {
  border-color: var(--ntsi-green);
  box-shadow: 0 0 0 3px rgba(30, 172, 60, 0.15);
}

.np-toolbar .np-input.np-search {
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%23797979' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>") 12px center no-repeat;
  padding-left: 36px;
}

.np-toolbar .np-grow {
  flex: 1;
  min-width: 180px;
}

/* Date range / segmented filter */
.np-segmented {
  display: inline-flex;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}

.np-segmented a {
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 8px;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.np-segmented a.active {
  background: var(--ntsi-green);
  color: #fff;
  box-shadow: 0 2px 6px rgba(30, 172, 60, 0.25);
}

.np-segmented a:hover:not(.active) {
  background: #e2e8f0;
  color: var(--text-primary);
}

/* Pretty data table */
.np-table-wrap {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.04);
}

.np-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  color: var(--text-primary);
}

.np-table thead th {
  background: #FAFAFC;
  font-family: 'Poppins', sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  padding: 13px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  white-space: nowrap;
}

.np-table tbody td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  vertical-align: middle;
}

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

.np-table tbody tr:hover {
  background: rgba(30, 172, 60, 0.04);
}

.np-table tbody tr.is-selected {
  background: var(--ntsi-green-faint);
}

.np-table .np-td-strong {
  font-weight: 600;
  color: var(--text-primary);
}

.np-table .np-td-muted {
  color: var(--text-muted);
  font-size: 12.5px;
}

.np-table .np-td-num {
  font-variant-numeric: tabular-nums;
}

.np-table .np-td-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  white-space: nowrap;
}

/* Status pills */
.np-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  white-space: nowrap;
  line-height: 1.4;
}

.np-pill-pending {
  background: #FEF3C7;
  color: #92400E;
}

.np-pill-review {
  background: #DBEAFE;
  color: #1d4ed8;
}

.np-pill-approved {
  background: #DCFCE7;
  color: #166534;
}

.np-pill-rejected {
  background: #FEE2E2;
  color: #991B1B;
}

.np-pill-partial {
  background: #FED7AA;
  color: #9A3412;
}

.np-pill-paypending {
  background: #FEF3C7;
  color: #92400E;
}

.np-pill-paid {
  background: #CFFAFE;
  color: #0E7490;
}

.np-pill-completed {
  background: #D1FAE5;
  color: #065F46;
}

.np-pill-scheduled {
  background: #DBEAFE;
  color: #1d4ed8;
}

.np-pill-checkedin {
  background: #E0E7FF;
  color: #4338CA;
}

.np-pill-assigned {
  background: #EDE9FE;
  color: #6d28d9;
}

.np-pill-intest {
  background: #FCE7F3;
  color: #BE185D;
}

.np-pill-pass {
  background: #D1FAE5;
  color: #065F46;
}

.np-pill-fail {
  background: #FEE2E2;
  color: #991B1B;
}

.np-pill-absent {
  background: #F3F4F6;
  color: #4B5563;
}

.np-pill-cancelled {
  background: #F3F4F6;
  color: #4B5563;
}

.np-pill-neutral {
  background: #F3F4F6;
  color: #4B5563;
}

/* Action buttons */
.np-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: #f1f5f9;
  color: var(--text-secondary);
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
  white-space: nowrap;
}

.np-btn:hover {
  background: #e2e8f0;
  color: var(--text-primary);
}

.np-btn.np-btn-primary {
  background: var(--ntsi-green);
  color: #fff;
  box-shadow: 0 4px 12px rgba(30, 172, 60, 0.25);
}

.np-btn.np-btn-primary:hover {
  background: var(--ntsi-green-dark);
  color: #fff;
  transform: translateY(-1px);
}

.np-btn.np-btn-success {
  background: #10B981;
  color: #fff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.np-btn.np-btn-success:hover {
  background: #059669;
  color: #fff;
}

.np-btn.np-btn-danger {
  background: #EF4444;
  color: #fff;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.np-btn.np-btn-danger:hover {
  background: #DC2626;
  color: #fff;
}

.np-btn.np-btn-warning {
  background: #F59E0B;
  color: #fff;
}

.np-btn.np-btn-warning:hover {
  background: #D97706;
  color: #fff;
}

.np-btn.np-btn-outline {
  background: transparent;
  border-color: rgba(0, 0, 0, 0.1);
  color: var(--text-secondary);
}

.np-btn.np-btn-outline:hover {
  background: #fff;
  color: var(--ntsi-green);
  border-color: var(--ntsi-green);
}

.np-btn.np-btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.np-btn.np-btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  justify-content: center;
}

.np-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.np-btn svg {
  width: 15px;
  height: 15px;
}

/* Empty state */
.np-empty {
  text-align: center;
  background: var(--glass-bg);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  padding: 52px 28px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.np-empty .np-empty-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ntsi-green-faint);
  color: var(--ntsi-green);
  border-radius: 50%;
}

.np-empty h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
}

.np-empty p {
  font-size: 13.5px;
  color: var(--text-secondary);
  max-width: 380px;
  margin: 0 auto;
}

/* Page header (small label + title) */
.np-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.np-page-head .np-page-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Avatar circle for tables */
.np-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ntsi-green-faint);
  color: var(--ntsi-green-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  flex-shrink: 0;
}

.np-avatar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.np-avatar-row .np-name {
  font-weight: 600;
  color: var(--text-primary);
}

.np-avatar-row .np-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Form cards */
.np-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 18px;
}

.np-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.np-field label {
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.np-field input,
.np-field select,
.np-field textarea {
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.10);
  background: #fff;
  padding: 0 12px;
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.np-field textarea {
  height: auto;
  padding: 10px 12px;
  resize: vertical;
  min-height: 80px;
}

.np-field input:focus,
.np-field select:focus,
.np-field textarea:focus {
  border-color: var(--ntsi-green);
  box-shadow: 0 0 0 3px rgba(30, 172, 60, 0.15);
}

.np-field-full {
  grid-column: 1 / -1;
}

.np-form-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Sticky bottom action bar (used in reception assign flow) */
.np-action-bar {
  position: sticky;
  bottom: 0;
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
  border-radius: 0 0 16px 16px;
  z-index: 10;
}

.np-action-bar .np-counter {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Responsive overrides for shared components */
@media (max-width: 767px) {
  .np-card {
    padding: 16px;
    border-radius: 14px;
  }

  .np-stat {
    padding: 14px;
    gap: 10px;
  }

  .np-stat-val {
    font-size: 18px;
  }

  .np-toolbar {
    padding: 12px;
    gap: 8px;
  }

  .np-toolbar .np-input,
  .np-toolbar .np-select {
    min-width: 0;
    flex: 1 1 100%;
  }

  .np-segmented {
    width: 100%;
    justify-content: space-between;
  }

  .np-segmented a {
    flex: 1;
    text-align: center;
    padding: 6px 8px;
    font-size: 12px;
  }

  .np-table thead th {
    padding: 10px 12px;
    font-size: 11px;
  }

  .np-table tbody td {
    padding: 11px 12px;
  }

  .np-form-grid {
    grid-template-columns: 1fr;
  }

  .np-action-bar {
    padding: 12px 14px;
  }
}

@media (max-width: 480px) {
  .np-table {
    font-size: 12.5px;
  }

  .np-pill {
    font-size: 10.5px;
    padding: 3px 8px;
  }
}

/* ── Responsive ─────────────────────────────── */

/* Mobile hamburger button (hidden on desktop) */
.nav-hamburger {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--glass-bg);
  border: 1px solid rgba(255, 255, 255, 0.7);
  color: var(--text-secondary);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background var(--transition), color var(--transition);
}

.nav-hamburger:hover {
  background: #fff;
  color: var(--ntsi-green);
}

.nav-hamburger svg {
  width: 20px;
  height: 20px;
}

/* Sidebar overlay (mobile drawer scrim) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* === Tablet / small laptop (≤ 1023px) === */
@media (max-width: 1023px) {
  .top-navbar {
    grid-template-columns: 1fr auto;
    padding: 18px 22px 12px;
    gap: 14px;
  }

  .navbar-mid {
    display: none;
  }

  .welcome-card {
    min-width: 0;
    padding: 8px 14px;
  }

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

  .page-title {
    font-size: 22px;
  }
}

/* === Mobile / tablet portrait (≤ 767px) === */
@media (max-width: 767px) {

  /* Sidebar becomes off-canvas drawer */
  .sidebar {
    width: var(--sidebar-w-expanded) !important;
    align-items: stretch !important;
    padding: 22px 18px 18px !important;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), width 0s;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  /* Always show expanded labels in mobile drawer */
  .sidebar .nav-label,
  .sidebar .logo-text,
  .sidebar .user-info {
    display: inline;
  }

  .sidebar .sidebar-logo .logo-text {
    display: flex;
  }

  /* Mobile drawer is always expanded width — show banner logo there */
  .sidebar .sidebar-logo .sidebar-logo-expanded {
    display: block;
  }

  .sidebar .sidebar-logo .sidebar-logo-collapsed {
    display: none;
  }

  .sidebar .nav-link {
    width: 100%;
    height: 44px;
    border-radius: 14px;
    justify-content: flex-start;
    gap: 12px;
    padding: 0 14px;
  }

  .sidebar .sidebar-logo {
    justify-content: flex-start;
    padding: 0 4px;
  }

  /* Main content claims full width */
  .main-content,
  body.sidebar-expanded .main-content {
    margin-left: 0;
  }

  /* Hamburger visible */
  .nav-hamburger {
    display: inline-flex;
  }

  /* Top navbar tightens */
  .top-navbar {
    grid-template-columns: 1fr auto;
    padding: 14px 16px 10px;
    gap: 10px;
    background-color: #fff;
    width: 100%;
  }

  .breadcrumb {
    font-size: 11px;
  }

  .page-title {
    font-size: 18px;
  }

  .navbar-left {
    gap: 10px;
  }

  .navbar-right {
    gap: 8px;
  }

  /* Hide search and welcome card on mobile */
  .navbar-mid,
  .welcome-card {
    display: none !important;
  }

  /* Smaller round nav buttons */
  .nav-icon-btn {
    width: 36px;
    height: 36px;
  }

  .nav-icon-btn svg {
    width: 17px;
    height: 17px;
  }

  /* Page padding */
  .page-content {
    padding: 14px;
  }

  /* Dashboard tiles single column, tighter cards */
  .ds-upload-card {
    padding: 18px;
  }

  .ds-upload-card-title {
    font-size: 16px;
    margin-bottom: 12px;
  }

  .ds-tiles {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .ds-tile {
    padding: 18px;
    gap: 12px;
  }

  .ds-tile .tile-icon {
    width: 44px;
    height: 44px;
  }

  .ds-tile .tile-title {
    font-size: 14.5px;
  }

  .ds-tile .tile-desc {
    font-size: 12.5px;
  }

  /* Active batch card stacks 2-col with full-width button */
  .ds-batch-card {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px;
    padding: 14px;
  }

  .ds-batch-card .pb-btn {
    grid-column: 1 / -1;
    justify-self: stretch;
    text-align: center;
  }

  /* Payment banner stacks vertically */
  .ds-payment-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
  }

  .ds-payment-banner .pb-btn {
    width: 100%;
    text-align: center;
  }

  /* Slide-in upload panel takes full screen */
  .upload-panel {
    width: 100vw;
    max-width: 100vw;
    border-left: none;
  }

  .upload-panel-head {
    padding: 16px 18px 12px;
  }

  .upload-panel-head h3 {
    font-size: 16px;
  }

  .upload-panel-body {
    padding: 16px 18px;
    gap: 14px;
  }

  .up-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .upload-panel-foot {
    padding: 14px 18px;
    flex-wrap: wrap;
    gap: 10px;
  }

  .upload-panel-foot .btn {
    flex: 1 1 calc(50% - 5px);
    min-width: 0;
    padding: 11px 14px;
    font-size: 13px;
  }

  /* Login responsive */
  .login-hero {
    display: none;
  }

  .login-form-panel {
    width: 100%;
    padding: 40px 24px;
  }

  /* Generic helpers */
  .stat-card {
    padding: 16px;
  }

  .stat-value {
    font-size: 22px;
  }

  .filter-bar {
    padding: 12px;
  }

  .table-wrapper {
    overflow-x: auto;
  }

  .page-header {
    flex-direction: column;
  }

  .sidebar {
    background: rgb(255 255 255);
  }

  .adm-main {
    width: 100% !important;
  }
}

/* === Small phones (≤ 480px) === */
@media (max-width: 480px) {
  .top-navbar {
    padding: 12px 14px 8px;
  }

  .page-content {
    padding: 12px;
  }

  .breadcrumb {
    font-size: 10.5px;
  }

  .page-title {
    font-size: 16px;
  }

  .nav-icon-btn {
    width: 34px;
    height: 34px;
  }

  .nav-icon-btn svg {
    width: 16px;
    height: 16px;
  }

  .nav-hamburger {
    width: 36px;
    height: 36px;
  }

  .ds-upload-card {
    padding: 14px;
  }

  .ds-upload-card-title {
    font-size: 15px;
  }

  .ds-tile {
    padding: 14px;
  }

  .ds-tile .tile-icon {
    width: 40px;
    height: 40px;
  }

  .ds-tile .tile-icon svg,
  .ds-tile .tile-icon i {
    width: 22px;
    height: 22px;
    font-size: 22px;
  }

  .ds-batch-card {
    grid-template-columns: 1fr !important;
  }

  .ds-batch-card .pb-btn {
    grid-column: 1;
  }

  .upload-panel-head h3 {
    font-size: 15px;
  }

  .upload-panel-body {
    padding: 14px 16px;
  }

  .upload-panel-foot {
    padding: 12px 16px;
  }

  .upload-panel-foot .btn {
    flex: 1 1 100%;
  }

  .login-form-panel {
    padding: 32px 20px;
  }

  .login-title {
    font-size: 19px;
  }

  .btn-lg {
    padding: 10px 20px;
    font-size: 14px;
  }
}

/* ── Utility ──────────────────────────────────────────────── */
.text-green {
  color: var(--ntsi-green);
}

.text-muted {
  color: var(--text-muted) !important;
}

.bg-green-faint {
  background: var(--ntsi-green-faint);
}

.fw-600 {
  font-weight: 600;
}

.fw-700 {
  font-weight: 700;
}

.fs-12 {
  font-size: 12px;
}

.fs-13 {
  font-size: 13px;
}

.gap-2 {
  gap: 8px;
}

/* Loading spinner */
.spinner-ntsi {
  width: 22px;
  height: 22px;
  border: 3px solid var(--ntsi-green-faint);
  border-top-color: var(--ntsi-green);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================================
   Driving School Dashboard tiles + Upload slide-in panel
   ============================================================ */

/* Glass section card holding the 3 tiles (Figma frame-22) */
.ds-upload-card {
  background: var(--glass-bg);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  padding: 24px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.05);
  max-width: 1080px;
}

.ds-upload-card-title {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 18px;
}

.ds-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

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

/* Each tile (Figma blue/purple/pink) */
.ds-tile {
  position: relative;
  border-radius: 18px;
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 200px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}

.ds-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
}

.ds-tile.tile-blue {
  background: linear-gradient(160deg, #BBDEFF 0%, #A8D5FF 100%);
}

.ds-tile.tile-purple {
  background: linear-gradient(160deg, #EFE4FE 0%, #E5D7FB 100%);
}

.ds-tile.tile-pink {
  background: linear-gradient(160deg, #FCE0F7 0%, #FBD3F5 100%);
}

.ds-tile .tile-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.5) inset, 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ds-tile .tile-icon svg,
.ds-tile .tile-icon i {
  width: 28px;
  height: 28px;
  font-size: 26px;
}

.ds-tile.tile-blue .tile-icon {
  color: #1f6fb8;
}

.ds-tile.tile-purple .tile-icon {
  color: #6d28d9;
}

.ds-tile.tile-pink .tile-icon {
  color: #c026a8;
}

.ds-tile .tile-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 15.5px;
  color: var(--text-primary);
  line-height: 1.25;
}

.ds-tile .tile-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.ds-tile .tile-arrow {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: transform var(--transition);
}

.ds-tile:hover .tile-arrow {
  transform: translateX(2px);
}

/* Pending payment banner inside dashboard */
.ds-payment-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(180deg, #FEF3C7 0%, #FDE68A 100%);
  border: 1px solid #FCD34D;
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 20px;
}

.ds-payment-banner .pb-text {
  font-family: 'Poppins', sans-serif;
  font-size: 13.5px;
  color: #78350F;
}

.ds-payment-banner .pb-text strong {
  font-weight: 600;
}

.ds-payment-banner .pb-btn {
  background: #F59E0B;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 13px;
  padding: 9px 18px;
  border-radius: 10px;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--transition);
}

.ds-payment-banner .pb-btn:hover {
  background: #D97706;
  color: #fff;
}

/* Active batch card */
.ds-batch-card {
  background: var(--glass-bg);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  padding: 18px 22px;
  margin-bottom: 22px;
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 14px;
  align-items: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.ds-batch-card .b-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ds-batch-card .b-value {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

@media (max-width: 800px) {
  .ds-batch-card {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── Slide-in Upload Panel ──────────────────────────────── */
.upload-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(2px);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}

.upload-panel-overlay.open {
  opacity: 1;
  visibility: visible;
}

.upload-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 480px;
  max-width: 92vw;
  height: 100vh;
  background: #FAFAFC;
  border-left: 1px solid rgba(0, 0, 0, 0.05);
  z-index: 210;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -16px 0 40px rgba(0, 0, 0, 0.08);
}

.upload-panel.open {
  transform: translateX(0);
}

.upload-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.upload-panel-head h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.upload-panel-head .up-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.04);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition);
}

.upload-panel-head .up-close:hover {
  background: #fee2e2;
  color: #ef4444;
}

.upload-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Stage / gear selectors */
.up-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.up-field label {
  font-family: 'Poppins', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
}

.up-field select,
.up-field input[type="text"] {
  width: 100%;
  height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0 14px;
  font-size: 13.5px;
  background: #fff;
  font-family: inherit;
  color: var(--text-primary);
  outline: none;
  transition: border var(--transition), box-shadow var(--transition);
}

.up-field select:focus,
.up-field input:focus {
  border-color: var(--ntsi-green);
  box-shadow: 0 0 0 3px var(--ntsi-green-faint);
}

.up-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Excel attachment area */
.up-dropzone {
  border: 1.5px dashed #CBD5E1;
  border-radius: 14px;
  background: #fff;
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  min-height: 150px;
}

.up-dropzone:hover,
.up-dropzone.drag {
  border-color: var(--ntsi-green);
  background: var(--ntsi-green-faint);
}

.up-dropzone .dz-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: var(--ntsi-green-faint);
  color: var(--ntsi-green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.up-dropzone .dz-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--text-primary);
}

.up-dropzone .dz-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.up-dropzone input[type="file"] {
  display: none;
}

/* Selected file pill */
.up-file-pill {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.up-file-pill.show {
  display: flex;
}

.up-file-pill .fp-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #DCFCE7;
  color: var(--ntsi-green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.up-file-pill .fp-meta {
  flex: 1;
  min-width: 0;
}

.up-file-pill .fp-name {
  font-family: 'Poppins', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.up-file-pill .fp-size {
  font-size: 11.5px;
  color: var(--text-muted);
}

.up-file-pill .fp-remove {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.up-file-pill .fp-remove:hover {
  background: #fee2e2;
  color: #ef4444;
}

/* Progress / status */
.up-progress {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.up-progress.show {
  display: flex;
}

.up-progress .upp-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  color: var(--text-primary);
}

.up-progress .upp-bar {
  height: 6px;
  background: var(--ntsi-green-faint);
  border-radius: 4px;
  overflow: hidden;
}

.up-progress .upp-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--ntsi-green) 0%, var(--ntsi-green-light) 100%);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.up-progress.indeterminate .upp-fill {
  width: 40%;
  animation: upp-marquee 1.2s ease-in-out infinite;
}

@keyframes upp-marquee {
  0% {
    margin-left: -40%;
    width: 40%;
  }

  50% {
    margin-left: 30%;
    width: 50%;
  }

  100% {
    margin-left: 100%;
    width: 40%;
  }
}

/* Result blocks */
.up-result {
  display: none;
  padding: 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  align-items: flex-start;
  gap: 10px;
}

.up-result.show {
  display: flex;
}

.up-result .ur-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.up-result.success {
  background: #DCFCE7;
  color: #166534;
  border: 1px solid #BBF7D0;
}

.up-result.error {
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FECACA;
  flex-direction: column;
  align-items: stretch;
}

.up-result.error .ur-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 13.5px;
}

.up-error-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
}

.up-error-list li {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  gap: 10px;
  font-size: 12.5px;
  color: #7F1D1D;
}

.up-error-list li .err-row {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  background: #fee2e2;
  color: #991B1B;
  padding: 1px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Footer actions */
.upload-panel-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 24px 22px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  background: #fff;
}

.upload-panel-foot .btn {
  font-family: 'Poppins', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 10px;
  padding: 11px 22px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background var(--transition), color var(--transition), opacity var(--transition);
}

.upload-panel-foot .btn-secondary {
  background: #f1f5f9;
  color: var(--text-secondary);
}

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

.upload-panel-foot .btn-primary {
  background: var(--ntsi-green);
  color: #fff;
  box-shadow: 0 4px 12px rgba(30, 172, 60, 0.28);
}

.upload-panel-foot .btn-primary:hover {
  background: var(--ntsi-green-dark);
}

.upload-panel-foot .btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* ── Global filter-select style ──────────────────────────────
   Applies to every portal: curved edges, green focus ring,
   and green option highlight instead of the OS-default blue.
   ─────────────────────────────────────────────────────────── */

/* Any <select> inside a recognised filter wrapper gets curved edges + green accent */
.sc-sel-wrap select,
.bf-sel-wrap select,
.fi-sel-wrap select,
[class*="sel-wrap"] select,
[class*="filter"] select,
.np-toolbar .np-select,
select.ntsi-select {
  border-radius: 12px !important;
  accent-color: #16a34a;
}

/* Override the browser-blue option highlight across all engines.
   The linear-gradient trick works in Firefox where background alone is ignored. */
.sc-sel-wrap select option:checked,
.bf-sel-wrap select option:checked,
.fi-sel-wrap select option:checked,
[class*="sel-wrap"] select option:checked,
[class*="filter"] select option:checked,
.np-toolbar .np-select option:checked,
select.ntsi-select option:checked {
  background: linear-gradient(#dcfce7, #dcfce7) !important;
  color: #166534 !important;
}

.sc-sel-wrap select option:hover,
.bf-sel-wrap select option:hover,
.fi-sel-wrap select option:hover,
[class*="sel-wrap"] select option:hover,
[class*="filter"] select option:hover,
.np-toolbar .np-select option:hover,
select.ntsi-select option:hover {
  background: #f0fdf4 !important;
  color: #166534 !important;
}

/*=======new changes TABVIEW=========*/

@media (max-width:991px) {

  table {
    width: 100%;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table thead {
    white-space: nowrap;
  }

  table tbody {
    white-space: nowrap;
  }

  table th,
  table td {
    white-space: nowrap;
    vertical-align: middle;
  }


}

@media (max-width:768px) {
  .page-content {
    max-width: 100% !important;
    width: 100%;
  }

  /*=Instructors==*/
  .rpt-table-wrap {
    width: 100% !important;
    overflow-x: auto !important;
  }

  .rpt-table-wrap {
    width: 100% !important;
    overflow-x: auto !important;
  }

  .main-content,
  body.sidebar-expanded .main-content {
    margin-left: 0;
    max-width: 100% !important;
  }
}

/*==Instructors end==*/
/* COMMON RESPONSIVE TABLE CSS */

@media (max-width:768px) {
  .np-table-wrap {
    width: 100% !important;
  }

  table {
    width: 100%;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table thead {
    white-space: nowrap;
  }

  table tbody {
    white-space: nowrap;
  }

  table th,
  table td {
    white-space: nowrap;
    vertical-align: middle;
  }



  table::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
  }
}

.rpt-table-wrap {
  width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  border-radius: 14px !important;
}

.rpt-table-wrap::-webkit-scrollbar {
  height: 6px !important;
}

.rpt-table-wrap::-webkit-scrollbar-thumb {
  background: #cbd5e1 !important;
  border-radius: 10px !important;
}

.rpt-table {
  width: 100% !important;
  min-width: 1100px !important;
  border-collapse: collapse !important;
}

.clear-btn:hover {
  background: #1e3a5f;
  color: #ffff;
}

.mobile-filter-btn:hover {
  background-color: #f8fffa;
}

@media (max-width: 768px) {

  .rpt-table-wrap {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
  }

  .rpt-table {
    width: max-content !important;
    min-width: 950px !important;
  }

  .rpt-table th,
  .rpt-table td {
    white-space: nowrap !important;
    font-size: 13px !important;
    padding: 12px 10px !important;
  }

  .name-cell {
    min-width: 220px !important;
  }

  .action-btns {
    display: flex !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
  }

  .action-btn {
    padding: 6px 10px !important;
    white-space: nowrap !important;
  }

  .breadcrumb {
    margin-bottom: 5px;
  }
}

/*==popup==*/
.mobile-search-input {
  width: 100%;
  height: 52px;
  border: 1px solid #dbe1ea;
  border-radius: 14px;
  padding: 0 16px;
  font-size: 16px;
  outline: none;
}

.mobile-search-input:focus {
  border-color: #16a34a;
}

.mobile-filter-bar {
  display: none;
}

@media(max-width:768px) {

  .mobile-filter-bar {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
    margin-bottom: 18px;
  }

  .mobile-filter-bar::-webkit-scrollbar {
    display: none;
  }

  .mobile-filter-btn {
    height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #dbe1ea;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }

}

/* MOBILE FILTERS */
.mobile-filter-bar {
  display: none;
}

.filter-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  z-index: 999;
}

.filter-sheet-overlay.active {
  opacity: 1;
  visibility: visible;
}

.filter-sheet {
  position: fixed;
  left: 0;
  bottom: -100%;
  width: 100%;
  background: #fff;
  border-radius: 22px 22px 0 0;
  z-index: 1000;
  transition: 0.35s ease;
  padding: 18px;
  max-height: 85vh;
  overflow: auto;
}

.filter-sheet.active {
  bottom: 0;
}

.sheet-handle {
  width: 60px;
  height: 5px;
  background: #d1d5db;
  border-radius: 20px;
  margin: 0 auto 18px;
}

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

.sheet-header h4 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.sheet-close {
  border: none;
  background: none;
  font-size: 20px;
}

.status-option {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
  cursor: pointer;
  transition: 0.25s ease;
  background: #fff;
}

.status-option.active {
  border-color: #16a34a;
  background: #f0fdf4;
}

.status-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.status-left span {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

.status-radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  position: relative;
  transition: 0.25s;
}

.status-option.active .status-radio {
  border-color: #16a34a;
}

.status-option.active .status-radio::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #16a34a;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.date-field {
  margin-bottom: 18px;
}

.date-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
}

.date-field input {
  width: 100%;
  height: 48px;
  border: 1px solid #dbe1ea;
  border-radius: 12px;
  padding: 0 14px;
}

.sheet-footer {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.sheet-btn {
  flex: 1;
  height: 48px;
  border: none;
  border-radius: 12px;
  font-weight: 700;
}

.clear-btn {
  background: #f3f4f6;
}

.apply-btn {
  background: #16a34a;
  color: #fff;
}

.np-table-wrap.scroll_wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

body.sidebar-expanded .main-content {
  overflow: hidden !important;
}

.ec-mobile-filter-trigger button {
  color: #000;
}

button {
  color: #000;
}

@media(max-width:768px) {

  form.np-toolbar.desktop-filter {
    display: none;
  }

  .mobile-filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
  }

  .mobile-filter-btn {
    flex: 1;
    height: 46px;
    border: 1px solid #dbe1ea;
    background: #fff;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 125px;
  }

  .sheet-body {
    max-height: 65vh;
    overflow: auto;
    width: 100%;
  }

  .desktop-filter {
    display: none !important;
  }

  .inst-stat-row {
    gap: 7px;
  }

  select.np-select.s-none {
    display: none;
  }

  .sr-form-grid {
    max-width: 100%;
    display: flex !important;
    flex-direction: column;
    width: 100%;
  }

  .sr-form-grid .np-card.solid {
    max-width: 100%;
    width: 100%;
  }

  .rep-grid {
    width: 100%;
    display: flex !important;
    flex-wrap: wrap;
  }

  .rep-tab {
    padding: 9px 6px !important;
    margin-bottom: 15px !important;
  }

  .np-btn.np-btn-sm {
    margin-bottom: 15px !important;
  }

  .rep-grid {
    display: flex !important;
    flex-wrap: wrap;
  }

  .np-card.solid {
    width: 100%;
  }

  .auth-field input {
    font-size: 16px !important;
  }

  .ss-input,
  .ss-select {
    font-size: 16px !important;
  }

  input select,
  textarea {
    font-size: 16px !important;
  }

  .sr-form-grid select,
  .sr-form-grid input[type="number"],
  .sr-form-grid input[type="date"],
  .sr-form-grid input[type="text"] {
    font-size: 16px !important;
  }

  .auth-field input {
    font-size: 16px !important;
  }
  .form-control, .form-select {
    font-size: 16px !important;
  }
  input[type="text"], input[type="number"], input[type="date"] {
    font-size: 16px !important;
  }
  .mobile-search-input { font-size: 16px !important;}
  .sidebar-nav {
        max-height: 70vh;
}
.ios-toggle {
        justify-content: start;
}
}