:root {
  --navy: #0f2738;
  --navy-light: #183a52;
  --mint: #5ce0b8;
  --mint-soft: #e6f9f3;
  --teal: #087f79;
  --teal-hover: #066661;
  --teal-soft: #eaf6f5;
  --ink: #162e40;
  --ink-secondary: #435b6d;
  --muted: #6c8193;
  --line: #e2e9ef;
  --line-strong: #cbd7e1;
  --bg: #f3f6f9;
  --surface: #ffffff;
  --warning-bg: #fff8eb;
  --warning-text: #9a6700;
  --warning-border: #f5d68e;
  --danger-bg: #fff1f0;
  --danger-text: #b42318;
  --danger-border: #fecdca;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-xs: 0 1px 2px rgba(15, 39, 56, 0.04);
  --shadow-sm: 0 4px 16px rgba(15, 39, 56, 0.05);
  --shadow-md: 0 12px 32px rgba(15, 39, 56, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body,
.sweet-alert {
  margin: 0;
  font-family: 'Noto Sans Thai', system-ui, -apple-system, sans-serif !important;
  color: var(--ink);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--teal);
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

button,
input,
select,
textarea {
  font: inherit;
}

a,
button,
input,
select {
  outline-offset: 3px;
  -webkit-tap-highlight-color: transparent;
}

/* Top Progress Bar */
.page-progress {
  position: fixed;
  inset: 0 0 auto;
  height: 3px;
  z-index: 100000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  background: transparent;
}

.page-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #087f79, #5ce0b8);
  box-shadow: 0 0 12px rgba(92, 224, 184, 0.8);
  transition: width 0.35s ease;
}

.page-progress.is-loading {
  opacity: 1;
}

/* ==========================================================================
   LOGIN PAGE
   ========================================================================== */
.login-page {
  background: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(13, 148, 136, 0.18), transparent 60%),
    radial-gradient(circle at 10% 20%, rgba(20, 184, 166, 0.1) 0%, transparent 45%),
    radial-gradient(circle at 90% 85%, rgba(15, 76, 129, 0.1) 0%, transparent 50%),
    #f3f6f9;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
}

/* Hide global loading messages and progress bar on login page */
.login-page .global-loading-status,
.login-page .page-progress {
  display: none !important;
}

/* Top Navigation Bar */
.login-top-bar {
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 32px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.login-brand-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none !important;
}

.login-univ-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.1));
}

.login-brand-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
  display: block;
  letter-spacing: -0.2px;
}

.login-brand-sub {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-secondary);
  display: block;
  margin-top: 2px;
}

.system-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--navy);
  box-shadow: 0 2px 8px rgba(15, 39, 56, 0.04);
}

.status-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 rgba(8, 127, 121, 0.7);
  animation: pulseTealDot 2s infinite;
}

@keyframes pulseTealDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(8, 127, 121, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(8, 127, 121, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(8, 127, 121, 0); }
}

/* Main Login Stage */
.login-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px 32px;
  width: 100%;
}

.login-container {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(380px, 0.9fr);
  width: min(1160px, 100%);
  background: #ffffff;
  border-radius: 28px;
  box-shadow: 0 25px 60px -12px rgba(15, 39, 56, 0.16), 0 0 0 1px rgba(226, 232, 240, 0.85);
  overflow: hidden;
  min-height: 600px;
}

/* Left Showcase Panel */
.login-showcase {
  background: 
    radial-gradient(circle at 100% 0%, rgba(20, 184, 166, 0.28) 0%, transparent 55%),
    radial-gradient(circle at 0% 100%, rgba(13, 148, 136, 0.22) 0%, transparent 50%),
    linear-gradient(155deg, #091a2b 0%, #0d2c40 50%, #0a3d46 100%);
  color: #ffffff;
  padding: 52px 48px 40px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.showcase-brand-hero {
  display: flex;
  align-items: center;
  gap: 14px;
}

.showcase-snru-logo {
  height: 52px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.showcase-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: #5ce0b8;
  width: fit-content;
}

.showcase-heading {
  font-size: clamp(26px, 2.6vw, 36px);
  font-weight: 700;
  line-height: 1.35;
  margin: 22px 0 14px;
  letter-spacing: -0.6px;
  color: #ffffff;
}

.showcase-gradient-text {
  background: linear-gradient(135deg, #5ce0b8 0%, #a7f3d0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  margin-left: 6px;
}

.showcase-desc {
  font-size: 13.5px;
  color: #cbd5e1;
  line-height: 1.8;
  margin: 0 0 28px;
  max-width: 480px;
}

.showcase-feature-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.showcase-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 13px 18px;
  backdrop-filter: blur(10px);
  transition: all 0.25s ease;
}

.showcase-card:hover {
  background: rgba(255, 255, 255, 0.09);
  transform: translateX(4px);
  border-color: rgba(92, 224, 184, 0.3);
}

.feature-icon-badge {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 11px;
  background: rgba(92, 224, 184, 0.15);
  border: 1px solid rgba(92, 224, 184, 0.3);
  color: #5ce0b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.feature-card-content h3 {
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 2px;
}

.feature-card-content p {
  font-size: 12px;
  color: #94a3b8;
  margin: 0;
  line-height: 1.5;
}

.showcase-footer {
  margin-top: auto;
  font-size: 12px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Right Login Form Panel */
.login-form-panel {
  padding: 52px 46px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #ffffff;
}

.form-panel-header {
  margin-bottom: 24px;
}

.form-brand-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.form-snru-logo {
  height: 52px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.08));
}

.panel-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  letter-spacing: 0.5px;
  display: inline-block;
  margin-bottom: 6px;
}

.login-form-panel h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.5px;
  margin: 0 0 6px;
}

.panel-subtitle {
  font-size: 13.5px;
  color: var(--ink-secondary);
  margin: 0;
}

.login-field-group {
  margin-bottom: 18px;
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 7px;
}

.field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
}

.back-to-login-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none !important;
  margin-bottom: 14px;
  transition: all 0.15s ease;
}

.back-to-login-link:hover {
  color: var(--teal-hover);
  transform: translateX(-3px);
}

.forgot-pwd-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none !important;
  transition: color 0.15s ease;
}

.forgot-pwd-link:hover {
  color: var(--teal-hover);
  text-decoration: underline !important;
}

.field-input-box {
  position: relative;
  display: flex;
  align-items: center;
}

.field-input-box .field-icon {
  position: absolute;
  left: 16px;
  color: #94a3b8;
  font-size: 15px;
  pointer-events: none;
  transition: color 0.15s ease;
}

.field-input-box input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 44px;
  font-size: 14px;
  color: var(--ink);
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.field-input-box input:focus {
  background: #ffffff;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(8, 127, 121, 0.12);
  outline: none;
}

.field-input-box:focus-within .field-icon {
  color: var(--teal);
}

.field-input-box input::placeholder {
  color: #94a3b8;
}

.field-input-box select {
  width: 100%;
  height: 48px;
  padding: 0 40px 0 44px;
  font-size: 14px;
  color: var(--ink);
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  transition: all 0.2s ease;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.field-input-box select:focus {
  background: #ffffff;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(8, 127, 121, 0.12);
  outline: none;
}

.field-select-arrow {
  position: absolute;
  right: 16px;
  color: #94a3b8;
  pointer-events: none;
  font-size: 12px;
  transition: color 0.15s ease;
}

.field-input-box:focus-within .field-select-arrow {
  color: var(--teal);
}

.verified-identity-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  border-radius: 12px;
  margin-bottom: 20px;
}

.verified-card-icon {
  font-size: 26px;
  color: #16a34a;
  flex: 0 0 auto;
}

.verified-card-content {
  flex: 1 1 auto;
}

.verified-card-name {
  font-size: 15px;
  font-weight: 700;
  color: #14532d;
  margin-bottom: 2px;
}

.verified-card-meta {
  font-size: 12.5px;
  color: #15803d;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.pwd-toggle-btn {
  position: absolute;
  right: 8px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 8px;
  color: #64748b;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.pwd-toggle-btn:hover {
  background: #f1f5f9;
  color: var(--navy);
}

.login-alert-box {
  padding: 11px 15px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 13px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-alert-box[hidden],
.login-alert-box:empty {
  display: none !important;
}

.login-submit-btn {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--teal) 0%, #0d9488 100%);
  border: none;
  color: #ffffff !important;
  font-size: 14.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(8, 127, 121, 0.32);
  cursor: pointer;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.login-submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--teal-hover) 0%, #0f766e 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(8, 127, 121, 0.42);
  color: #ffffff !important;
}

.login-submit-btn:disabled {
  opacity: 0.75;
  cursor: wait;
  transform: none;
}

.login-submit-btn .login-spinner,
.login-spinner {
  display: inline-block;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-left: 10px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  -webkit-animation: login-spin 0.8s linear infinite;
  animation: login-spin 0.8s linear infinite;
  box-sizing: border-box;
  vertical-align: middle;
}

@-webkit-keyframes login-spin {
  0% { -webkit-transform: rotate(0deg); }
  100% { -webkit-transform: rotate(360deg); }
}

@keyframes login-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.login-support-note {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 12px;
}

.support-badge-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 10px;
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.support-note-text {
  font-size: 12px;
  color: var(--ink-secondary);
  line-height: 1.5;
}

.support-note-text strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
}

.session-active-card {
  text-align: center;
  padding: 24px 16px;
}

.session-active-card .session-icon {
  font-size: 44px;
  color: var(--teal);
  margin-bottom: 14px;
}

.session-active-card h4 {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.session-active-card p {
  font-size: 13.5px;
  color: var(--ink-secondary);
  margin-bottom: 24px;
}

/* Footer */
.login-footer {
  padding: 16px 24px 24px;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  font-size: 12px;
  color: var(--ink-muted);
}

.login-footer-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  text-align: center;
}

/* Responsive */
@media (max-width: 960px) {
  .login-container {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .login-showcase {
    padding: 36px 30px;
  }
  .login-form-panel {
    padding: 36px 30px;
  }
  .login-top-bar {
    padding: 18px 20px 8px;
  }
  .login-footer {
    padding: 14px 20px 20px;
  }
}

/* ==========================================================================
   SIDEBAR & TOP NAVBAR
   ========================================================================== */
.main-sidebar {
  background: linear-gradient(180deg, var(--navy) 0%, #0b1d2a 100%) !important;
  box-shadow: 4px 0 24px rgba(15, 39, 56, 0.08) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.brand-link {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 18px 16px !important;
  font-size: 16px !important;
  display: flex !important;
  align-items: center;
  gap: 10px;
  text-align: left !important;
}

.brand-link .brand-text {
  font-weight: 700 !important;
  letter-spacing: 0.4px;
  color: #ffffff !important;
  line-height: 1.25;
}

.brand-link .brand-subtext {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: var(--mint);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.sidebar {
  padding: 0 10px !important;
}

.sidebar .user-panel {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 10px !important;
  margin-top: 12px !important;
  margin-bottom: 14px !important;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  align-items: center;
}

.sidebar .user-panel .image img {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border: 2px solid rgba(92, 224, 184, 0.4);
}

.sidebar .user-panel .info {
  padding: 0 0 0 10px !important;
  overflow: hidden;
}

.sidebar .user-panel .user-fullname {
  font-size: 12.5px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar .user-panel .user-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--mint);
  background: rgba(92, 224, 184, 0.12);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 500;
}

.nav-header {
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #7c97aa !important;
  padding: 10px 12px 6px !important;
  margin: 6px 0 2px !important;
}

.nav-sidebar > .nav-item {
  margin: 3px 0;
}

.nav-sidebar .nav-link {
  border-radius: 10px !important;
  padding: 11px 12px !important;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active {
  background: var(--mint) !important;
  color: #0b2e2d !important;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(92, 224, 184, 0.25) !important;
}

.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active .nav-icon {
  color: #0b2e2d !important;
}

.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link:not(.active) {
  color: #c5d4df;
}

.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link:not(.active):hover {
  background: rgba(255, 255, 255, 0.07) !important;
  color: #ffffff !important;
}

.sidebar .nav-icon {
  font-size: 15px !important;
  margin-right: 10px !important;
  width: 20px;
  text-align: center;
}

.nav-item-logout {
  margin-top: 16px !important;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-dark-primary .nav-sidebar > .nav-item.nav-item-logout > .nav-link:not(.active) {
  color: #f9a8a8;
}

.sidebar-dark-primary .nav-sidebar > .nav-item.nav-item-logout > .nav-link:hover {
  background: rgba(240, 68, 56, 0.16) !important;
  color: #ffd1d1 !important;
}

/* Main Top Navbar */
.main-header.navbar {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  min-height: 64px;
  padding: 8px 20px;
  box-shadow: var(--shadow-xs) !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.main-header.navbar .navbar-nav {
  align-items: center;
}

.main-header.navbar .nav-link {
  color: var(--ink-secondary) !important;
  border-radius: 8px;
  padding: 6px 10px;
  height: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.main-header.navbar .nav-link:hover {
  color: var(--teal) !important;
  background: var(--teal-soft);
}

.navbar-brand-context {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 6px;
}

.navbar-system-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

.navbar-divider {
  color: var(--line-strong);
  font-size: 14px;
}

.navbar-page-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  background: var(--teal-soft);
  border: 1px solid #cce8e5;
  padding: 3px 10px;
  border-radius: 999px;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.navbar-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #f5f8fa;
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-secondary);
}

.navbar-user-chip strong {
  color: var(--ink);
  font-weight: 600;
}

.btn-nav-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-secondary);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none !important;
  transition: all 0.15s ease;
}

.btn-nav-action:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-soft);
}

.btn-nav-logout:hover {
  border-color: #f4b4ae;
  color: var(--danger-text);
  background: var(--danger-bg);
}

/* ==========================================================================
   CONTENT LAYOUT & PAGE HEADERS
   ========================================================================== */
.content-wrapper {
  background: var(--bg) !important;
  padding: 20px 24px 36px;
}

.content-header {
  padding: 4px 0 12px !important;
}

.page-header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.page-header-titles {
  min-width: 0;
}

.breadcrumb-trail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.breadcrumb-trail a {
  color: var(--teal);
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.breadcrumb-trail a:hover {
  text-decoration: underline;
}

.breadcrumb-sep {
  color: #b0c0cd;
  font-size: 11px;
}

.content-wrapper h1 {
  font-size: clamp(20px, 2.2vw, 25px) !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  color: var(--navy) !important;
  margin: 0 !important;
  letter-spacing: -0.3px;
}

.report-intro {
  font-size: 13px;
  color: var(--muted);
  margin: 6px 0 0;
  line-height: 1.6;
}

.report-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-secondary);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 5px 12px;
  border-radius: 999px;
  box-shadow: var(--shadow-xs);
}

.meta-pill i {
  color: var(--teal);
}

.meta-pill strong {
  color: var(--navy);
  font-weight: 600;
}

/* ==========================================================================
   OVERVIEW / KPI CARDS
   ========================================================================== */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.overview-tile {
  background: var(--surface);
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  min-width: 0;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.overview-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.overview-tile:first-child {
  background: radial-gradient(circle at 95% 10%, rgba(92, 224, 184, 0.22), transparent 55%),
              linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: white;
  border-color: var(--navy);
}

.overview-tile .tile-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.overview-tile:first-child .tile-label {
  color: #bfe0dc;
}

.overview-tile .tile-label span {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 14px;
  flex-shrink: 0;
}

.overview-tile:first-child .tile-label span {
  background: rgba(92, 224, 184, 0.16);
  color: var(--mint);
}

.tile-value {
  font-size: clamp(20px, 2vw, 27px);
  font-weight: 700;
  margin: 12px 0 6px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  letter-spacing: -0.5px;
  color: var(--navy);
}

.overview-tile:first-child .tile-value {
  color: #ffffff;
}

.tile-foot {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.overview-tile:first-child .tile-foot {
  color: #a9c6d2;
}

/* ==========================================================================
   CARDS, FILTER TOOLBARS & FORMS
   ========================================================================== */
.content .card {
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-sm) !important;
  background: var(--surface);
  overflow: hidden;
  margin-top: 0;
  margin-bottom: 20px;
}

.card .card-header {
  background: var(--surface) !important;
  color: var(--ink) !important;
  padding: 18px 24px !important;
  border-bottom: 1px solid var(--line) !important;
  font-size: 14px !important;
  line-height: 1.6;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card .card-header i {
  color: var(--teal);
  margin-right: 6px;
}

.card-header-total-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--mint-soft);
  color: #085d47;
  border: 1px solid #b5ebd9;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.card-body {
  padding: 22px 24px !important;
}

/* Filter Toolbar inside Card */
.report-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin-bottom: 18px;
}

.report-toolbar .form-group {
  margin-bottom: 0;
}

.report-toolbar .toolbar-field {
  min-width: 240px;
  flex: 0 1 320px;
}

.report-toolbar .toolbar-field-wide {
  flex: 1 1 420px;
}

.report-toolbar .toolbar-hint {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.date-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.btn-preset {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink-secondary);
  border-radius: 999px;
  padding: 3px 11px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-preset:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-soft);
}

.card .form-control {
  border-radius: 9px;
  border: 1.5px solid #d5e0e8;
  min-height: 42px;
  font-size: 13.5px;
  color: var(--ink);
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.card .form-control:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(8, 127, 121, 0.12);
}

.card .input-group-text {
  background: #f1f5f9;
  border: 1.5px solid #d5e0e8;
  color: var(--ink-secondary);
  font-size: 13px;
  font-weight: 500;
}

.card .form-group label,
.report-toolbar label {
  font-size: 12.5px;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.card .form-group label i,
.report-toolbar label i {
  color: var(--teal);
}

/* Buttons */
.btn {
  border-radius: 9px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 9px 16px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all 0.15s ease !important;
}

.btn-sm {
  padding: 5px 11px !important;
  font-size: 12px !important;
  border-radius: 7px !important;
}

.btn-primary {
  background: var(--teal) !important;
  border-color: var(--teal) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(8, 127, 121, 0.18);
}

.btn-primary:hover {
  background: var(--teal-hover) !important;
  border-color: var(--teal-hover) !important;
  transform: translateY(-1px);
}

.btn-secondary,
.btn-back {
  background: var(--surface) !important;
  color: var(--ink) !important;
  border: 1px solid var(--line-strong) !important;
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover,
.btn-back:hover {
  background: #f5f8fa !important;
  border-color: var(--teal) !important;
  color: var(--teal) !important;
}

.btn-info {
  background: var(--teal-soft) !important;
  color: var(--teal) !important;
  border: 1px solid #bfe3df !important;
}

.btn-info:hover {
  background: var(--teal) !important;
  color: #ffffff !important;
  border-color: var(--teal) !important;
}

.btn-warning {
  background: var(--warning-bg) !important;
  color: var(--warning-text) !important;
  border: 1px solid var(--warning-border) !important;
}

.btn-warning:hover {
  background: #f59e0b !important;
  color: #ffffff !important;
  border-color: #f59e0b !important;
}

/* ==========================================================================
   TABLES & DATATABLES
   ========================================================================== */
.table {
  font-size: 13px;
  color: var(--ink) !important;
  margin-top: 8px !important;
  margin-bottom: 8px !important;
  border-collapse: separate !important;
  border-spacing: 0;
}

table.table thead th,
table.table thead th.table-active {
  background: #f3f7fa !important;
  color: #3e5668 !important;
  border-bottom: 2px solid #dce5ec !important;
  border-top: 1px solid #e5edf2 !important;
  border-color: #e3ebf0 !important;
  font-weight: 600 !important;
  vertical-align: middle !important;
  padding: 13px 12px !important;
  line-height: 1.45;
  box-shadow: none !important;
}

table.table thead th small {
  color: var(--muted);
  font-weight: 500;
  font-size: 11px;
}

.table tbody td {
  padding: 13px 12px !important;
  border-color: #edf1f5 !important;
  vertical-align: middle !important;
  font-variant-numeric: tabular-nums;
}

.table-sm tbody td {
  padding: 10px 10px !important;
}

.table-bordered {
  border: 1px solid var(--line) !important;
  border-radius: 10px;
  overflow: hidden;
}

.table-hover tbody tr {
  transition: background-color 0.12s ease;
}

.table-hover tbody tr:hover {
  background: #f2fbf8 !important;
}

/* Highlight total/summary row in tables */
.table tbody tr.is-total-row td,
.table tfoot tr td,
.table tfoot tr th {
  background: #eef7f5 !important;
  color: var(--navy) !important;
  font-weight: 700 !important;
  border-top: 2px solid #b9dfd9 !important;
  font-size: 13.5px;
}

.table a:not(.btn) {
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.table a:not(.btn):hover {
  color: var(--navy);
  text-decoration: underline;
}

.table a:not(.btn)::after {
  content: '↗';
  font-size: 11px;
  opacity: 0.65;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.table a:not(.btn):hover::after {
  transform: translate(2px, -2px);
  opacity: 1;
}

/* DataTables Controls (Buttons, Search, Pagination, Processing) */
.dataTables_wrapper {
  padding-top: 4px;
}

.dataTables_wrapper .dt-buttons {
  float: left;
  margin-bottom: 12px;
  display: flex;
  gap: 8px;
}

.dataTables_wrapper .dt-button,
.dataTables_wrapper button.dt-button,
.dataTables_wrapper a.dt-button {
  background: var(--teal-soft) !important;
  color: var(--teal) !important;
  border: 1px solid #bfe3df !important;
  border-radius: 8px !important;
  padding: 7px 14px !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: none !important;
  background-image: none !important;
  transition: all 0.15s ease;
}

.dataTables_wrapper .dt-button:hover {
  background: var(--teal) !important;
  color: #ffffff !important;
  border-color: var(--teal) !important;
}

.dataTables_wrapper .dataTables_filter {
  float: right;
  margin-bottom: 12px;
}

.dataTables_wrapper .dataTables_filter label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-secondary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}

.dataTables_wrapper .dataTables_filter input {
  border: 1.5px solid #d5e0e8 !important;
  border-radius: 8px !important;
  padding: 6px 12px !important;
  font-size: 13px !important;
  min-width: 220px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dataTables_wrapper .dataTables_filter input:focus {
  border-color: var(--teal) !important;
  box-shadow: 0 0 0 3px rgba(8, 127, 121, 0.12);
}

.dataTables_wrapper .dataTables_info {
  font-size: 12px;
  color: var(--muted);
  padding-top: 14px !important;
}

.dataTables_wrapper .dataTables_paginate {
  padding-top: 10px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 7px !important;
  padding: 5px 11px !important;
  margin: 0 2px !important;
  font-size: 12.5px !important;
  border: 1px solid transparent !important;
  color: var(--ink-secondary) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: var(--teal) !important;
  color: #ffffff !important;
  border-color: var(--teal) !important;
  font-weight: 600;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.current):not(.disabled) {
  background: var(--teal-soft) !important;
  color: var(--teal) !important;
  border-color: #bfe3df !important;
}

.dataTables_wrapper .dataTables_processing {
  background: rgba(255, 255, 255, 0.96) !important;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--teal);
  font-weight: 600;
  box-shadow: var(--shadow-md);
  z-index: 10;
  padding: 14px 20px !important;
  height: auto !important;
}

/* ==========================================================================
   STUDENT PROFILE CARD (person-pay.php) & EMPTY STATES
   ========================================================================== */
.student-summary-card {
  background: linear-gradient(135deg, #ffffff 0%, #f6fbfa 100%);
  border: 1px solid #cce6e1;
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  box-shadow: var(--shadow-xs);
}

.student-profile-main {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.student-avatar-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--navy);
  color: var(--mint);
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}

.student-info-details h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 8px;
}

.student-meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  font-size: 13px;
  color: var(--ink-secondary);
}

.student-meta-item strong {
  color: var(--ink);
  font-weight: 600;
}

.student-total-box {
  background: var(--navy);
  color: #ffffff;
  padding: 16px 22px;
  border-radius: 14px;
  text-align: right;
  min-width: 210px;
}

.student-total-box .total-label {
  font-size: 11.5px;
  color: #a9c7d3;
  display: block;
  margin-bottom: 4px;
}

.student-total-box .total-amount {
  font-size: 24px;
  font-weight: 700;
  color: var(--mint);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.empty-state-box {
  text-align: center;
  padding: 40px 20px;
  background: #f9fbfd;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--muted);
}

.empty-state-box i {
  font-size: 32px;
  color: var(--teal);
  opacity: 0.75;
  margin-bottom: 10px;
  display: block;
}

.empty-state-box h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 4px;
}

.empty-state-box p {
  font-size: 13px;
  margin: 0;
}

/* Report Banner / Callout */
.callout.callout-info,
.report-range-banner {
  background: var(--teal-soft) !important;
  border: 1px solid #cce8e5 !important;
  border-left: 4px solid var(--teal) !important;
  border-radius: 10px !important;
  padding: 12px 18px !important;
  color: var(--ink) !important;
  margin-bottom: 16px !important;
  width: 100%;
  box-shadow: none !important;
}

.callout.callout-info h5,
.report-range-banner h5 {
  font-size: 13.5px;
  margin: 0;
  font-weight: 500;
  color: var(--ink);
}

.report-error {
  padding: 14px 18px;
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid var(--danger-border);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  margin: 14px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Modal Polish */
.modal-content {
  border: 0 !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 60px rgba(15, 39, 56, 0.2) !important;
  overflow: hidden;
}

.modal-header {
  background: #f8fafc;
  border-bottom: 1px solid var(--line) !important;
  padding: 16px 22px !important;
}

.modal-title {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-body {
  padding: 24px 22px !important;
  font-size: 14px;
  color: var(--ink-secondary);
}

.modal-footer {
  border-top: 1px solid var(--line) !important;
  padding: 14px 22px !important;
  background: #fbfcfd;
}

/* Footer */
.main-footer {
  font-size: 12px;
  padding: 18px 24px;
  color: var(--muted);
  background: var(--surface) !important;
  border-top: 1px solid var(--line);
}

.print-only {
  display: none;
}

/* ==========================================================================
   RESPONSIVE & PRINT
   ========================================================================== */
@media (max-width: 1000px) {
  .login-story {
    padding: 44px 32px;
  }
  .login-card {
    padding: 44px 32px;
  }
  .top-caption {
    display: none;
  }
  .login-layout {
    width: 92%;
  }
  .navbar-user-chip {
    display: none;
  }
}

@media (max-width: 768px) {
  .login-top {
    padding: 20px 5%;
  }
  .login-layout {
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: 92%;
    margin: 8px auto 24px;
    border-radius: 20px;
  }
  .login-story {
    padding: 28px 26px;
  }
  .login-story h1 {
    font-size: 27px;
    margin-top: 16px;
  }
  .story-description {
    font-size: 12.5px;
  }
  .story-features,
  .story-bottom {
    display: none;
  }
  .login-card {
    padding: 32px 26px 34px;
  }
  .login-card h2 {
    font-size: 25px;
  }
  .login-footer {
    flex-direction: column;
    align-items: center;
    font-size: 10px;
  }
  .content-wrapper {
    padding: 14px 12px 24px;
  }
  .overview-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .overview-tile {
    padding: 16px 18px;
  }
  .tile-value {
    margin: 8px 0 4px;
    font-size: 23px;
  }
  .card-body {
    padding: 16px !important;
  }
  .report-toolbar {
    padding: 14px;
  }
  .report-toolbar .toolbar-field,
  .report-toolbar .toolbar-field-wide {
    min-width: 100%;
    flex: 1 1 100%;
  }
  .student-summary-card {
    grid-template-columns: 1fr;
  }
  .student-total-box {
    text-align: left;
    width: 100%;
  }
  .dataTables_wrapper .dt-buttons,
  .dataTables_wrapper .dataTables_filter {
    float: none;
    width: 100%;
    justify-content: flex-start;
  }
  .dataTables_wrapper .dataTables_filter input {
    width: 100%;
  }
  .table {
    white-space: nowrap;
  }
  .main-footer {
    padding: 16px;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

@media print {
  .main-sidebar,
  .main-header,
  .main-footer,
  .page-progress,
  .btn,
  .dt-buttons,
  .dataTables_filter,
  .dataTables_paginate,
  .report-toolbar,
  .date-presets {
    display: none !important;
  }
  .content-wrapper {
    margin: 0 !important;
    padding: 0 !important;
    background: white !important;
  }
  .table-responsive {
    overflow: visible !important;
  }
  .card {
    box-shadow: none !important;
    border: 0 !important;
  }
  .overview-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
  }
  .overview-tile,
  .overview-tile:first-child {
    background: white !important;
    color: black !important;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
  }
}

.global-loading-status{position:fixed;top:15px;right:20px;z-index:99999;display:flex;align-items:center;gap:10px;max-width:calc(100vw - 32px);padding:12px 18px;border-radius:12px;background:#122c40;color:#fff;box-shadow:0 6px 25px #122c4025;font-size:12px;pointer-events:none}.global-loading-status[hidden]{display:none}.status-spinner{height:16px;width:16px;flex:0 0 16px;border:2px solid #ffffff55;border-top-color:#65e0bd;border-radius:50%;animation:login-spin .8s linear infinite}.account-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.account-heading .report-intro{margin-bottom:0}.account-stats{display:flex;gap:26px;font-size:13px;color:#708291}.account-stats strong{color:#193448;margin:0 5px}.account-badge{display:inline-block;padding:5px 11px;border-radius:20px;font-size:11px}.account-badge.is-active{background:#e4f7ee;color:#176649}.account-badge.is-inactive{background:#eff2f5;color:#728391}.account-self{font-size:10px;padding:2px 7px;background:#e8f4f6;border-radius:5px;color:#087f79}.account-fields>div{margin-bottom:19px}.account-fields label{display:block;font-size:12px;font-weight:500;margin-bottom:7px}.account-fields label span{color:#b74747}.account-fields small,.account-note{font-size:11px;color:#7a8e9d;line-height:1.8}.account-fields .form-control{min-height:43px;border-radius:8px;border:1px solid #dce5ec}.account-section-title{font-size:15px;font-weight:600;margin:0}.account-form-message{padding:13px 16px;border-radius:9px;background:#fff1ee;color:#a23e31;font-size:12px;margin-top:14px}.account-form-actions{text-align:right;padding:5px 0 25px}.account-form-actions .btn{padding:12px 26px;border-radius:8px}.profile-summary{text-align:center}.profile-avatar{width:74px;height:74px;border-radius:22px;background:#dff4eb;color:#137465;display:grid;place-items:center;font-size:32px;margin:8px auto 20px}.profile-summary h2{font-size:18px;font-weight:600;line-height:1.6}.profile-summary>p{font-size:12px;color:#7a8e9d}.profile-summary dl{text-align:left;border-top:1px solid #e2e9ee;padding-top:20px;margin-top:24px}.profile-summary dt{font-size:11px;color:#7a8e9d;font-weight:400}.profile-summary dd{font-size:13px;margin:5px 0 18px}#user-modal .modal-title{font-size:19px}#user-modal .modal-content{border:0;border-radius:16px}#user-modal .modal-header,#user-modal .modal-body,#user-modal .modal-footer{padding:22px 26px}#users-table_wrapper .dataTables_filter input{min-height:38px}@media(max-width:700px){.account-heading{align-items:flex-start;flex-direction:column}.account-stats{gap:15px;font-size:12px}.global-loading-status{right:16px;top:12px;font-size:11px}}@media(prefers-reduced-motion:reduce){.status-spinner{animation:none}}


/* Helper Utilities */
.is-hidden {
  display: none !important;
}

/* ==========================================================================
   ENHANCED SEARCH & MODERN RECEIPT PRESENTATION
   ========================================================================== */
.person-search-box {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-bottom: 20px;
}

.person-search-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.person-search-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.person-search-row .search-box-composite {
  flex: 1 1 auto;
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
}

.person-search-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.person-search-actions .btn-action-h44 {
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 20px;
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 9px;
}

.person-search-box .search-hints-row {
  margin-top: 10px;
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .person-search-row {
    flex-direction: column;
    align-items: stretch;
  }
  .person-search-row .search-box-composite {
    flex-wrap: wrap;
  }
  .person-search-actions {
    width: 100%;
  }
  .person-search-actions .btn-action-h44 {
    flex: 1 1 50%;
  }
}

.search-box-composite {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}

.search-box-composite .search-type-select {
  flex: 0 0 200px;
  min-width: 170px;
  border-radius: 9px;
  border: 1.5px solid #d5e0e8;
  height: 44px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  background: #fdfefe;
}

.search-box-composite .search-input-wrap {
  flex: 1 1 280px;
  position: relative;
}

.search-box-composite .search-input-wrap .form-control {
  height: 44px;
  border-radius: 9px;
  padding-left: 38px;
  font-size: 13.5px;
}

.search-box-composite .search-input-wrap .search-icon {
  position: absolute;
  left: 13px;
  top: 13px;
  color: var(--muted);
  pointer-events: none;
  font-size: 14px;
}

.search-hints-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.search-hint-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.search-hint-pill:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-soft);
}

/* Matching Students Cards */
.students-match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 16px;
  margin-bottom: 24px;
}

.student-match-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-xs);
  transition: all 0.18s ease;
}

.student-match-card:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.student-match-card .match-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 6px;
}

.student-match-card .match-meta {
  font-size: 12.5px;
  color: var(--ink-secondary);
  line-height: 1.6;
  margin-bottom: 14px;
}

/* View Mode Switcher */
.receipt-view-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 20px 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.receipt-view-tabs {
  display: inline-flex;
  background: #ebf0f4;
  padding: 3px;
  border-radius: 10px;
  gap: 3px;
}

.receipt-tab-btn {
  border: 0;
  background: transparent;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.receipt-tab-btn.active {
  background: var(--surface);
  color: var(--teal);
  box-shadow: 0 2px 6px rgba(15, 39, 56, 0.08);
}

/* Receipt Slips */
.receipt-slips-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 10px;
}

.receipt-slip {
  background: var(--surface);
  border: 1px solid #d5e2ec;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: relative;
  transition: box-shadow 0.15s ease;
}

.receipt-slip:hover {
  box-shadow: var(--shadow-md);
}

.receipt-slip-header {
  background: linear-gradient(135deg, #f7fafc 0%, #edf3f7 100%);
  border-bottom: 1.5px dashed #cbd8e2;
  padding: 16px 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.receipt-number-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.receipt-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--navy);
  color: var(--mint);
  display: grid;
  place-items: center;
  font-size: 16px;
}

.receipt-number-badge h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.receipt-number-badge .receipt-date {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  display: block;
  margin-top: 2px;
}

.receipt-header-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.receipt-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--mint-soft);
  color: #0b5c46;
  border: 1px solid #b5ebd9;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}

.receipt-slip-body {
  padding: 16px 22px;
}

.receipt-table {
  width: 100%;
  margin: 0 !important;
  font-size: 13px;
}

.receipt-table thead th {
  background: #f9fbfd !important;
  color: var(--ink-secondary) !important;
  border-bottom: 1px solid var(--line) !important;
  font-size: 12px !important;
  padding: 10px 12px !important;
}

.receipt-table tbody td {
  padding: 11px 12px !important;
  border-bottom: 1px solid #f0f4f8 !important;
}

.receipt-slip-footer {
  background: #f9fbfc;
  border-top: 1.5px dashed #cbd8e2;
  padding: 14px 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.receipt-slip-footer .receipt-notes {
  font-size: 11.5px;
  color: var(--muted);
}

.receipt-total-display {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.receipt-total-display .total-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.receipt-total-display .total-val {
  font-size: 19px;
  font-weight: 700;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.btn-receipt-print {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 12px !important;
  padding: 5px 12px !important;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-receipt-print:hover {
  background: var(--teal-soft);
  color: var(--teal);
  border-color: var(--teal);
}

/* ==========================================================================
   OFFICIAL PRINT STYLES (High-fidelity A4 document presentation)
   ========================================================================== */
.print-official-header {
  display: none;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }

  html,
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt !important;
    line-height: 1.35 !important;
    margin: 0 !important;
    padding: 10mm 14mm 12mm 14mm !important;
    width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .wrapper,
  .content-wrapper,
  .content,
  .container-fluid,
  .row,
  .col-12,
  .col-md-12,
  .card,
  .card-body {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    overflow: visible !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    position: static !important;
    width: 100% !important;
    float: none !important;
  }

  /* Hide screen chrome & controls */
  .main-sidebar,
  .main-header,
  .main-footer,
  .page-header-bar,
  .person-search-box,
  .receipt-view-header,
  .btn,
  .btn-receipt-print,
  .search-hints-row,
  .empty-state-box,
  .callout,
  .page-progress,
  .dt-buttons,
  .dataTables_filter,
  .dataTables_info,
  .dataTables_paginate,
  .dataTables_length,
  .report-toolbar,
  .date-presets,
  .global-loading-status,
  .breadcrumb-trail,
  .report-intro {
    display: none !important;
  }

  .table-responsive {
    overflow: visible !important;
  }

  /* Formal University Header in Print */
  .print-official-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    border-bottom: 2px solid #222 !important;
    padding-bottom: 12px !important;
    margin-bottom: 16px !important;
  }

  .print-header-content {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
  }

  .print-header-logo {
    width: 52px !important;
    height: 52px !important;
    object-fit: contain !important;
  }

  .print-header-text .print-header-univ {
    font-size: 15pt !important;
    font-weight: 700 !important;
    color: #111 !important;
    margin: 0 0 2px !important;
  }

  .print-header-text .print-header-title {
    font-size: 12.5pt !important;
    font-weight: 600 !important;
    color: #222 !important;
    margin: 0 0 2px !important;
  }

  .print-header-text .print-header-sub {
    font-size: 9pt !important;
    color: #666 !important;
    margin: 0 !important;
  }

  .print-header-meta {
    text-align: right !important;
    font-size: 9.5pt !important;
    color: #444 !important;
    white-space: nowrap !important;
  }

  /* Student Summary Card in Print */
  .student-summary-card {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    border: 1.5px solid #222 !important;
    border-radius: 6px !important;
    padding: 12px 18px !important;
    margin-bottom: 18px !important;
    background: #fbfbfb !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    box-shadow: none !important;
  }

  .student-summary-card .student-avatar-icon {
    display: none !important;
  }

  .student-summary-card .student-info-details h3 {
    font-size: 14pt !important;
    font-weight: 700 !important;
    color: #000 !important;
    margin: 0 0 8px !important;
  }

  .student-summary-card .student-meta-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px 24px !important;
    font-size: 10pt !important;
    color: #111 !important;
  }

  .student-summary-card .student-meta-item i {
    color: #333 !important;
  }

  .student-summary-card .student-total-box {
    background: transparent !important;
    border: none !important;
    border-left: 2px solid #222 !important;
    border-radius: 0 !important;
    padding: 0 0 0 24px !important;
    text-align: right !important;
    min-width: 220px !important;
    color: #000000 !important;
    box-shadow: none !important;
  }

  .student-summary-card .student-total-box .total-label {
    font-size: 10pt !important;
    color: #333333 !important;
    font-weight: 600 !important;
    display: block !important;
    margin-bottom: 2px !important;
  }

  .student-summary-card .student-total-box .total-amount {
    font-size: 18pt !important;
    font-weight: 800 !important;
    color: #000000 !important;
    margin: 3px 0 !important;
    display: block !important;
    line-height: 1.2 !important;
  }

  .student-summary-card .student-total-box .student-total-sub {
    font-size: 9.5pt !important;
    color: #444444 !important;
    display: block !important;
  }

  /* Receipt Slips Container & Cards */
  .receipt-slips-container {
    display: block !important;
    position: static !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .receipt-slip {
    display: block !important;
    border: 1.5px solid #222 !important;
    border-radius: 6px !important;
    margin-bottom: 18px !important;
    background: #ffffff !important;
    box-shadow: none !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .receipt-slip-header {
    background: #f0f0f0 !important;
    border-bottom: 1.5px solid #333 !important;
    padding: 8px 14px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .receipt-slip-header h4 {
    font-size: 12pt !important;
    font-weight: 700 !important;
    color: #000 !important;
    margin: 0 0 2px !important;
  }

  .receipt-slip-header .receipt-date {
    font-size: 9.5pt !important;
    color: #333 !important;
  }

  .receipt-slip-header .receipt-icon-box {
    display: none !important;
  }

  .receipt-slip-header .receipt-status-pill {
    border: 1px solid #222 !important;
    color: #000 !important;
    background: transparent !important;
    font-size: 9pt !important;
    font-weight: 600 !important;
    padding: 2px 8px !important;
  }

  .receipt-slip-body {
    padding: 10px 14px !important;
  }

  .receipt-table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 0 !important;
    font-size: 10pt !important;
  }

  .receipt-table th,
  .receipt-table td {
    border: 1px solid #444 !important;
    padding: 5px 8px !important;
    color: #000 !important;
  }

  .receipt-table thead th {
    background: #e8e8e8 !important;
    font-weight: 700 !important;
    text-align: center !important;
    font-size: 9.5pt !important;
  }

  .receipt-slip-footer {
    background: #fafafa !important;
    border-top: 1.5px solid #444 !important;
    padding: 8px 14px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .receipt-slip-footer .receipt-notes {
    font-size: 8.5pt !important;
    color: #555 !important;
  }

  .receipt-total-display .total-text {
    font-size: 10pt !important;
    font-weight: 700 !important;
    color: #000 !important;
  }

  .receipt-total-display .total-val {
    font-size: 13pt !important;
    font-weight: 700 !important;
    color: #000 !important;
  }

  /* Single Slip Print Mode */
  body.print-single-mode .receipt-slip {
    display: none !important;
  }

  body.print-single-mode .receipt-slip.print-target {
    display: block !important;
  }

  /* Consolidated Table View Print */
  #datatable-person {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 9.5pt !important;
  }

  #datatable-person th,
  #datatable-person td {
    border: 1px solid #444 !important;
    padding: 5px 8px !important;
    color: #000 !important;
  }

  #datatable-person thead th,
  #datatable-person tfoot th {
    background: #e8e8e8 !important;
    font-weight: 700 !important;
  }
}


/* ==========================================================================
   EXTRACTED UTILITY & COMPONENT STYLES (No inline style requirement)
   ========================================================================== */

/* Spacing and Flex helpers */
.gap-1 { gap: 4px !important; }
.gap-2 { gap: 8px !important; }
.gap-3 { gap: 12px !important; }
.gap-4 { gap: 16px !important; }

/* Fixed Heights */
.btn-action-h44 { height: 44px !important; }

/* Font utilities */
.font-11   { font-size: 11px !important; }
.font-11-5 { font-size: 11.5px !important; }
.font-12   { font-size: 12px !important; }
.font-13   { font-size: 13px !important; }
.font-14   { font-size: 14px !important; }

/* Text & Display */
.no-underline { text-decoration: none !important; }
.d-none { display: none !important; }
.bg-white { background-color: #ffffff !important; }
.dot-icon-sm { font-size: 6px !important; }
.brand-logo-img { max-height: 36px; width: auto; }

/* Student search & receipt styles */
.student-total-sub {
  font-size: 11px;
  color: #a3c4cf;
  margin-top: 4px;
}
.receipt-print-wrapper {
  padding: 20px;
}

/* Table Column Width Utilities */
.w-col-6  { width: 6% !important; }
.w-col-8  { width: 8% !important; }
.w-col-10 { width: 10% !important; }
.w-col-11 { width: 11% !important; }
.w-col-12 { width: 12% !important; }
.w-col-14 { width: 14% !important; }
.w-col-15 { width: 15% !important; }
.w-col-16 { width: 16% !important; }
.w-col-18 { width: 18% !important; }
.w-col-20 { width: 20% !important; }
.w-col-22 { width: 22% !important; }
.w-col-25 { width: 25% !important; }
.w-col-28 { width: 28% !important; }
.w-col-30 { width: 30% !important; }
.w-col-32 { width: 32% !important; }
.w-col-34 { width: 34% !important; }
.w-col-39 { width: 39% !important; }
.w-col-40 { width: 40% !important; }
.w-col-43 { width: 43% !important; }
.w-col-48 { width: 48% !important; }

/* Error Page (bootstrap.php fn_fail) */
.error-page-body {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  min-height: 100vh !important;
  padding: 24px !important;
}
.error-card {
  max-width: 460px !important;
  width: 100% !important;
  padding: 36px 32px !important;
  border-radius: 20px !important;
  background: #ffffff !important;
  border: 1px solid #e2e9ef !important;
  box-shadow: 0 20px 50px rgba(15, 39, 56, .08) !important;
  text-align: center !important;
}
.error-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #fff1f0;
  color: #b42318;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 700;
  margin: 0 auto 16px;
}
.error-title {
  font-size: 20px;
  margin: 0 0 8px;
  color: #0f2738;
}
.error-desc {
  font-size: 13px;
  color: #6c8193;
  margin: 0 0 24px;
}
.error-btn {
  margin-top: 0 !important;
  justify-content: center !important;
  gap: 8px !important;
}

/* Initially hidden elements for jQuery manipulation */
.init-hidden {
  display: none;
}


/* Department management components */
.overview-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 1024px) {
  .overview-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 575px) {
  .overview-grid-4 {
    grid-template-columns: 1fr;
  }
}

/* Department Table Specific Styles */
.table-departments {
  width: 100% !important;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #eef2f6;
  border-radius: 8px;
  overflow: hidden;
}
.table-departments thead th {
  background: #f8fafc;
  color: #475569;
  font-size: 12.5px;
  font-weight: 600;
  border-top: 0;
  border-bottom: 1.5px solid #e2e8f0;
  padding: 13px 10px;
  vertical-align: middle;
  white-space: nowrap;
}
.table-departments tbody td {
  padding: 12px 10px;
  vertical-align: middle;
  border-top: 1px solid #f1f5f9;
  font-size: 13px;
  color: #1e293b;
}
.table-departments tbody tr:hover td {
  background-color: #f8fbfb;
}

/* Department Column Widths */
.th-dept-no { width: 45px; min-width: 40px; }
.th-dept-name { min-width: 220px; }
.th-dept-level { width: 85px; min-width: 75px; }
.th-dept-program { width: 140px; min-width: 120px; }
.th-dept-pay { width: 250px; min-width: 200px; }
.th-dept-users { width: 85px; min-width: 75px; }
.th-dept-status { width: 95px; min-width: 85px; }
.th-dept-action { width: 145px; min-width: 135px; }

.action-btn-group {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Department Chips & Badges */
.dept-name-cell {
  font-size: 13.5px;
  color: #0f172a;
  line-height: 1.4;
}
.dept-no-pill {
  display: inline-block;
  min-width: 32px;
  padding: 2px 8px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-weight: 700;
  font-size: 12px;
  text-align: center;
}
.chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.chip-sm {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  white-space: nowrap;
  line-height: 1.4;
}
.chip-level {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}
.chip-program {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}
.chip-pay {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.chip-dept {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.chip-dept-more {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  cursor: help;
  transition: all 0.15s ease;
}
.chip-dept-more:hover {
  background: #e2e8f0;
  color: #1e293b;
  border-color: #94a3b8;
}
.chip-more {
  background: #f8fafc;
  color: #64748b;
  border: 1px dashed #cbd5e1;
  cursor: help;
  transition: all 0.15s ease;
}
.chip-more:hover {
  background: #e2e8f0;
  color: #1e293b;
  border-color: #94a3b8;
}
.badge-central {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  background: #e6fffa;
  color: #0d9488;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid #99f6e4;
  margin-left: 6px;
}
.badge-dept-users {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  background: #f0fdf4;
  color: #166534;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid #bbf7d0;
}
.dept-status-toggle {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.dept-status-toggle.is-active {
  background: #e6f9ed;
  color: #15803d;
}
.dept-status-toggle.is-active:hover {
  background: #dcfce7;
  transform: translateY(-1px);
}
.dept-status-toggle.is-inactive {
  background: #f1f5f9;
  color: #64748b;
}
.dept-status-toggle.is-inactive:hover {
  background: #e2e8f0;
  transform: translateY(-1px);
}

/* ==========================================================================
   SYSTEM LOGS / AUDIT TRAIL
   ========================================================================== */
.log-filter-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #edf2f7;
}
.log-filter-label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}
.log-filter-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.log-pill {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}
.log-pill:hover {
  background: #f1f5f9;
  color: #1e293b;
}
.log-pill.active {
  background: var(--teal);
  color: #ffffff;
  border-color: var(--teal);
  box-shadow: 0 2px 6px rgba(8, 127, 121, 0.25);
}

.table-logs {
  width: 100% !important;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #eef2f6;
  border-radius: 8px;
  overflow: hidden;
}
.table-logs thead th {
  background: #f8fafc;
  color: #475569;
  font-size: 12.5px;
  font-weight: 600;
  border-top: 0;
  border-bottom: 1.5px solid #e2e8f0;
  padding: 13px 10px;
  vertical-align: middle;
  white-space: nowrap;
}
.table-logs tbody td {
  padding: 12px 10px;
  vertical-align: middle;
  border-top: 1px solid #f1f5f9;
  font-size: 13px;
  color: #1e293b;
}
.table-logs tbody tr:hover td {
  background-color: #f8fbfb;
}

.th-log-no { width: 50px; min-width: 45px; }
.th-log-time { width: 140px; min-width: 125px; }
.th-log-user { width: 170px; min-width: 140px; }
.th-log-action { width: 130px; min-width: 110px; }
.th-log-detail { min-width: 200px; }
.th-log-ip { width: 170px; min-width: 140px; }
.th-log-status { width: 85px; min-width: 75px; }

.log-date {
  display: block;
  font-weight: 600;
  color: #1e293b;
  font-size: 12.5px;
}
.log-time {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}
.log-user-name {
  font-size: 13px;
  color: #0f172a;
}
.log-user-sub {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.log-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.log-badge-login { background: #e6f9ed; color: #15803d; border: 1px solid #bbf7d0; }
.log-badge-logout { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }
.log-badge-user { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.log-badge-dept { background: #e6fffa; color: #0d9488; border: 1px solid #99f6e4; }
.log-badge-auth { background: #f3e8ff; color: #7e22ce; border: 1px solid #e9d5ff; }
.log-badge-danger { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.log-badge-default { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }

.log-detail-text {
  font-size: 12.5px;
  color: #334155;
  line-height: 1.4;
}

.log-ip-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.log-ip-chip {
  font-family: monospace;
  font-size: 11px;
  color: #475569;
  background: #f8fafc;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
  display: inline-block;
  width: fit-content;
}
.log-device-text {
  font-size: 11px;
  color: #64748b;
}

.log-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.log-status-badge.is-success {
  background: #ecfdf5;
  color: #059669;
}
.log-status-badge.is-failed {
  background: #fef2f2;
  color: #dc2626;
}

.code-chip {
  display: inline-block;
  background: #f1f5f9;
  color: #334155;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 11.5px;
  border: 1px solid #e2e8f0;
}
.tag-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  background: rgba(15, 39, 56, 0.06);
  color: #1e3a52;
  margin: 1px;
}
.btn-action-group {
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
}
.form-help-text {
  display: block;
  font-size: 11.5px;
  color: #64748b;
  margin-top: 4px;
  line-height: 1.4;
}


/* Department Visibility Toggle Styles */
.btn-outline-teal {
  color: var(--teal) !important;
  background-color: transparent !important;
  border-color: var(--teal) !important;
  font-weight: 500 !important;
}
.btn-outline-teal:hover,
.btn-outline-teal:focus {
  color: #ffffff !important;
  background-color: var(--teal) !important;
  border-color: var(--teal) !important;
}

/* Export Button Animations & States */
.btn-export-excel,
.dt-button.buttons-excel {
  transition: all 0.25s ease-in-out !important;
  position: relative;
  overflow: hidden;
}

.btn-export-excel.is-exporting,
.dt-button.buttons-excel.is-exporting {
  pointer-events: none;
  opacity: 0.92;
  background-color: var(--teal-soft) !important;
  color: var(--teal) !important;
  border-color: var(--teal) !important;
  transform: scale(0.98);
}

.btn-export-excel.is-exporting i,
.dt-button.buttons-excel.is-exporting i {
  display: inline-block;
  animation: export-spin 0.8s linear infinite;
}

.btn-export-excel.is-success,
.dt-button.buttons-excel.is-success {
  background-color: #10b981 !important;
  border-color: #10b981 !important;
  color: #ffffff !important;
  transform: scale(1.02);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  animation: export-pulse 0.4s ease-out;
}

@keyframes export-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes export-pulse {
  0% { transform: scale(0.98); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1.02); }
}

.toolbar-actions {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.dept-vis-search {
  margin-bottom: 12px;
}

.dept-vis-list {
  max-height: 420px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.dept-vis-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
}

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

.dept-vis-item:hover {
  background: #f8fafc;
}

.dept-vis-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.dept-vis-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--teal-dark);
}

.dept-vis-sub {
  font-size: 11px;
  color: #64748b;
}

.dept-vis-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Custom UI Toggle Switch */
.ui-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  margin: 0;
  flex-shrink: 0;
}

.ui-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.ui-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .2s ease;
  border-radius: 24px;
}

.ui-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: .2s ease;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.ui-switch input:checked + .ui-slider {
  background-color: var(--teal);
}

.ui-switch input:checked + .ui-slider:before {
  transform: translateX(20px);
}

.ui-switch input:disabled + .ui-slider {
  opacity: 0.45;
  cursor: not-allowed;
}

.vis-status-text {
  font-size: 11.5px;
  font-weight: 600;
  width: 58px;
  text-align: right;
}

.vis-status-text.is-active {
  color: var(--teal);
}

.vis-status-text.is-inactive {
  color: #94a3b8;
}


/* Toastr Notification Modern Polish */
#toast-container {
  z-index: 999999 !important;
}
#toast-container > div {
  opacity: 0.98 !important;
  border-radius: 12px !important;
  box-shadow: 0 12px 32px rgba(15, 39, 56, 0.22) !important;
  padding: 16px 20px 16px 50px !important;
  font-family: inherit !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
}
#toast-container > .toast-success {
  background-color: #0f766e !important;
  background-image: none !important;
  position: relative;
}
#toast-container > .toast-success:before {
  content: "✓";
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  font-weight: 700;
  color: #5ce0b8;
}
#toast-container > .toast-error {
  background-color: #b91c1c !important;
}
#toast-container > .toast-info {
  background-color: #0369a1 !important;
}
.toast-progress {
  background-color: rgba(255, 255, 255, 0.4) !important;
}

.w-col-24 { width: 24% !important; }


/* Forgot Password & Login Enhancements */
.password-label {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-top: 20px;
}
.forgot-link {
  font-size: 12.5px;
  color: var(--teal);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}
.forgot-link:hover {
  color: var(--teal-dark);
  text-decoration: underline;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--teal);
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 16px;
  transition: color 0.15s ease;
}
.back-link:hover {
  color: var(--teal-dark);
  text-decoration: underline;
}
.verified-box {
  background: rgba(92, 224, 184, 0.12);
  border: 1px solid rgba(92, 224, 184, 0.4);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.verified-icon {
  width: 36px;
  height: 36px;
  background: var(--teal);
  color: #ffffff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: bold;
  flex-shrink: 0;
}
.verified-info {
  flex: 1;
}
.verified-name {
  font-size: 14px;
  font-weight: 600;
  color: #0f2738;
}
.verified-sub {
  font-size: 12px;
  color: #4b6375;
}
.form-select-login {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid #d4e0e8;
  border-radius: 12px;
  background-color: #ffffff;
  font-size: 14px;
  color: #0f2738;
  margin-top: 6px;
  margin-bottom: 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  appearance: auto;
}
.form-select-login:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
  outline: none;
}
.login-input-spacing {
  margin-top: 6px;
  margin-bottom: 16px;
}

/* ==========================================================================
   Custom Searchable Department Multi-Picker
   ========================================================================== */
.dept-picker-container {
  position: relative;
  width: 100%;
}
.dept-picker-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  cursor: pointer;
  background-color: #ffffff;
  border: 1.5px solid #d8e2e0;
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  height: auto;
  min-height: 42px;
  font-size: 0.925rem;
  font-family: inherit;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.dept-picker-btn:hover {
  border-color: #0d685c;
}
.dept-picker-btn:focus,
.dept-picker-container.is-open .dept-picker-btn {
  border-color: #0d685c;
  box-shadow: 0 0 0 0.2rem rgba(13, 104, 92, 0.18);
  outline: none;
}
.dept-picker-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #2d3748;
}
.dept-picker-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #0d685c;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
  margin-left: 0.5rem;
  margin-right: 0.5rem;
  display: none;
}
.dept-picker-badge.is-visible {
  display: inline-flex;
}
.dept-picker-arrow {
  color: #718096;
  transition: transform 0.2s ease;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.dept-picker-container.is-open .dept-picker-arrow {
  transform: rotate(180deg);
  color: #0d685c;
}
.dept-picker-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 1060;
  background: #ffffff;
  border: 1px solid #d8e2e0;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.dept-picker-container.is-open .dept-picker-menu {
  display: flex;
}
.dept-picker-search-bar {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #edf2f0;
  background: #f8faf9;
}
.dept-picker-search-icon {
  color: #718096;
  margin-right: 0.5rem;
  font-size: 0.85rem;
}
.dept-picker-search-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.875rem;
  font-family: inherit;
  color: #2d3748;
}
.dept-picker-search-clear {
  border: none;
  background: transparent;
  color: #a0aec0;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
  display: none;
}
.dept-picker-search-clear.is-visible {
  display: block;
}
.dept-picker-search-clear:hover {
  color: #e53e3e;
}
.dept-picker-toolbar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid #edf2f0;
  background: #fafbfc;
}
.dept-picker-stat {
  margin-left: auto;
  font-size: 0.78rem;
  color: #718096;
}
.dept-picker-list {
  max-height: 220px;
  overflow-y: auto;
  padding: 0.25rem 0;
  scrollbar-width: thin;
}
.dept-picker-item {
  display: flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  margin: 0;
  cursor: pointer;
  font-weight: normal;
  font-size: 0.88rem;
  color: #2d3748;
  transition: background 0.12s ease;
  user-select: none;
}
.dept-picker-item.is-hidden {
  display: none !important;
}
.dept-picker-item:hover {
  background-color: #f0f7f5;
}
.dept-picker-item.is-selected {
  background-color: #e6f3f0;
  color: #0d685c;
  font-weight: 500;
}
.dept-picker-check {
  margin-right: 0.65rem;
  width: 16px;
  height: 16px;
  accent-color: #0d685c;
  cursor: pointer;
  flex-shrink: 0;
}
.dept-picker-name {
  flex: 1;
  line-height: 1.35;
}
.dept-picker-empty {
  padding: 1rem;
  text-align: center;
  color: #a0aec0;
  font-size: 0.85rem;
}
.dept-picker-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}
.dept-chip {
  display: inline-flex;
  align-items: center;
  background-color: #e6f3f0;
  color: #0d685c;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  border: 1px solid #bce1da;
  line-height: 1.25;
}
.dept-chip-remove {
  margin-left: 0.4rem;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  color: #0d685c;
  opacity: 0.6;
  transition: opacity 0.15s ease;
}
.dept-chip-remove:hover {
  opacity: 1;
  color: #b91c1c;
}

