/* EduCore ERP — Premium Enterprise Design System v2.0 */

:root {
  --erp-font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  --erp-font-size-base: 14px;

  /* Essential typography variables for components */
  --erp-type-xs: 11px;
  --erp-type-sm: 14px;
  --erp-type-caption: 13px;
  --erp-type-body: 14px;
  --erp-type-body-emphasis: 15px;
  --erp-type-section-title: 16px;
  --erp-type-heading-small: 18px;
  --erp-type-heading-3: 20px;

  /* ── Primary Colors ── */
  --primary: #011A5A;
  --primary-dark: #00164A;
  --primary-light: #18307C;
  --primary-hover: #23408F;

  /* ── Secondary Colors ── */
  --secondary: #3CC7FF;
  --secondary-dark: #0EA5E9;
  --secondary-light: #B8F1FF;

  /* ── Text Colors ── */
  --text-white: #FFFFFF;
  --text-primary: #1F2937;
  --text-secondary: #B8C4E8;
  --heading: #8FA3D9;

  /* ── Background Colors ── */
  --body-bg: #F6F8FC;
  --card-bg: #FFFFFF;

  /* ── Border Colors ── */
  --divider: #1E3A8A;
  --border: #E8EEF9;

  /* ── Status Colors ── */
  --success: #22C55E;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #3B82F6;

  /* ── Legacy Variables (for compatibility) ── */
  --erp-primary: #18307C;
  --erp-primary-dark: #00164A;
  --erp-primary-light: #F0F4F8;
  --erp-primary-muted: rgba(24, 48, 124, .08);
  --erp-secondary: #011A5A;
  --erp-accent: #3CC7FF;

  --erp-success: #22C55E;
  --erp-success-light: #D1FAE5;
  --erp-warning: #F59E0B;
  --erp-warning-light: #FEF3C7;
  --erp-danger: #EF4444;
  --erp-danger-light: #FEE2E2;
  --erp-info: #3B82F6;

  /* ── Surfaces ── */
  --erp-bg: #F6F8FC;
  --erp-surface: #FFFFFF;
  --erp-sidebar: #011A5A;
  --erp-sidebar-hover: #23408F;
  --erp-sidebar-active: #18307C;
  --erp-submenu: #FFFFFF;

  /* ── Borders ── */
  --erp-border: #E8EEF9;
  --erp-border-strong: #D1D5DB;

  /* ── Text ── */
  --erp-text: #1F2937;
  --erp-text-muted: #6B7280;
  --erp-text-light: #9CA3AF;
  --erp-text-xlight: #D1D5DB;

  /* ── Sidebar Specific ── */
  --erp-sidebar-text: #FFFFFF;
  --erp-sidebar-icon: #FFFFFF;
  --erp-sidebar-secondary: #B8C4E8;
  --erp-sidebar-divider: #1E3A8A;
  --erp-sidebar-indicator: #3CC7FF;

  /* ── Shadows ── */
  --erp-shadow-xs: 0 1px 2px rgba(15, 23, 42, .04);
  --erp-shadow-sm: 0 1px 3px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04);
  --erp-shadow: 0 4px 16px rgba(15, 23, 42, .08), 0 1px 4px rgba(15, 23, 42, .05);
  --erp-shadow-md: 0 8px 28px rgba(15, 23, 42, .10), 0 2px 8px rgba(15, 23, 42, .06);
  --erp-shadow-lg: 0 20px 60px rgba(15, 23, 42, .14), 0 4px 20px rgba(15, 23, 42, .08);
  --erp-shadow-primary: 0 4px 18px rgba(10, 36, 114, .28);

  /* ── Dimensions ── */
  --erp-radius: 14px;
  --erp-radius-sm: 10px;
  --erp-radius-xs: 7px;
  --erp-radius-lg: 18px;
  --erp-header-h: 64px;
  --erp-sidebar-w: 264px;
  --erp-sidebar-collapsed: 72px;
  --erp-submenu-w: 244px;
  --erp-transition: .22s cubic-bezier(.4, 0, .2, 1);
  --erp-transition-slow: .35s cubic-bezier(.4, 0, .2, 1);
}

/* =========================================
   GLOBAL UI TYPOGRAPHY
   Use ONLY these 5 semantic classes - NO inline styles!
   ========================================= */

.ui-title {
    font-size: var(--erp-type-heading-3);  /* 20px */
    font-weight: 700;
    line-height: 1.25;
    color: #1E293B;
}

.ui-heading {
    font-size: var(--erp-type-heading-small);  /* 18px */
    font-weight: 600;
    line-height: 1.4;
    color: #1E293B;
    /* padding-bottom: 30px; */
}

.ui-label {
    font-size: var(--erp-type-body-emphasis);  /* 15px */
    font-weight: 500;
    line-height: 1.4;
    color: #64748B;
}

.ui-value {
    font-size: var(--erp-type-body);  /* 14px */
    font-weight: 500;
    line-height: 1.5;
    color: #334155;
}

.ui-table-header {
  --erp-type-body-emphasis: 15px;
    font-size: var( --erp-type-caption);  /* 15px */
    font-weight: 700;
    line-height: 1.4;
    color: #64748B;
    text-transform: uppercase;
}

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

html,
body {
  font-family: var(--erp-font-family);
}

body {
  background: var(--erp-bg);
  color: var(--erp-text);
  margin: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: var(--erp-font-size-base);
  font-weight: 400;
  line-height: 1.5;
}

button,
input,
select,
textarea,
optgroup,
.dropdown-menu,
.modal,
.popover,
.tooltip,
.select2-container,
.select2-dropdown,
.flatpickr-calendar {
  font-family: var(--erp-font-family);
  font-size: var(--erp-font-size-base);
}

html[data-theme="dark"],
body[data-theme="dark"],
[data-theme="dark"],
[data-bs-theme="dark"] {
  /* Surfaces & Elevation (Google Material 3 / Google Workspace standard) */
  --erp-bg: #0f1318;
  --erp-surface: #181e26;
  --erp-surface-subtle: #131821;
  --erp-surface-elevated: #222a36;
  --erp-sidebar: #0d1117;
  --erp-sidebar-hover: rgba(255, 255, 255, 0.06);
  --erp-sidebar-active: rgba(138, 180, 248, 0.16);
  --erp-submenu: #131821;
  --erp-border: rgba(255, 255, 255, 0.10);
  --erp-border-strong: rgba(255, 255, 255, 0.18);
  --erp-border-subtle: rgba(255, 255, 255, 0.05);

  /* Typography Colors (WCAG AAA/AA calibrated) */
  --erp-text: #f1f3f4;
  --erp-text-muted: #9aa0a6;
  --erp-text-light: #80868b;
  --erp-text-xlight: #5f6368;

  /* Global Compatibility Variables */
  --body-bg: #0f1318;
  --card-bg: #181e26;
  --text-white: #ffffff;
  --text-primary: #f1f3f4;
  --text-secondary: #9aa0a6;
  --heading: #8ab4f8;
  --divider: rgba(255, 255, 255, 0.10);
  --border: rgba(255, 255, 255, 0.10);

  /* Brand Accents (Google Material Blue 200/300) */
  --primary: #8ab4f8;
  --primary-dark: #1a73e8;
  --primary-light: rgba(138, 180, 248, 0.14);
  --primary-hover: #1e88e5;
  --secondary: #8ab4f8;
  --secondary-light: rgba(138, 180, 248, 0.20);
  --erp-primary: #8ab4f8;
  --erp-primary-fill: #1a73e8;
  --erp-primary-hover: #1e88e5;
  --erp-primary-dark: #174ea6;
  --erp-primary-light: rgba(138, 180, 248, 0.14);
  --erp-primary-muted: rgba(138, 180, 248, 0.08);
  --erp-secondary: #8ab4f8;
  --erp-accent: #8ab4f8;

  /* Status Colors */
  --erp-success: #81c995;
  --erp-success-light: rgba(129, 201, 149, 0.15);
  --erp-warning: #fdd663;
  --erp-warning-light: rgba(253, 214, 99, 0.15);
  --erp-danger: #f28b82;
  --erp-danger-light: rgba(242, 139, 130, 0.15);
  --erp-info: #78d9ec;

  /* Elevation Shadows */
  --erp-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --erp-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.4);
  --erp-shadow: 0 4px 16px rgba(0, 0, 0, 0.55), 0 1px 4px rgba(0, 0, 0, 0.45);
  --erp-shadow-md: 0 8px 28px rgba(0, 0, 0, 0.65), 0 2px 8px rgba(0, 0, 0, 0.5);
  --erp-shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.75), 0 4px 20px rgba(0, 0, 0, 0.6);
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--erp-border-strong);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--erp-text-light);
}

/* ══════════════════════════════════════════════════════
   HEADER — Floating Glass Enterprise
══════════════════════════════════════════════════════ */
.erp-header {
  position: fixed;
  top: 0;
  left: var(--erp-sidebar-collapsed);
  right: 0;
  z-index: 1050;
  height: var(--erp-header-h);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--erp-border);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .04);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 8px;
  transition: left var(--erp-transition-slow);
}



.erp-header .sidebar-toggle {
  width: 32px;
  height: 32px;
  border: none;
  background: #1E3A8A;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 16px;
}

.erp-header .sidebar-toggle i {
  font-size: var(--erp-type-sm);
  color: #FFFFFF;
}

.erp-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--erp-text);
  flex-shrink: 0;
}

.erp-brand-logo {
  height: 35px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  display: block;
}

.erp-brand-icon {
  width: 38px;
  height: 38px;
  background: var(--erp-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: var(--erp-type-body-emphasis);
  font-weight: 800;
  letter-spacing: -.02em;
  box-shadow: 0 4px 12px rgba(30, 58, 95, .24), inset 0 1px 0 rgba(255, 255, 255, .18);
}

.erp-brand-text {
  font-weight: 700;
  font-size: var(--erp-type-section-title);
  letter-spacing: -.03em;
  color: var(--erp-secondary);
}

.erp-brand-text span {
  color: var(--erp-secondary);
}

.erp-global-search {
  flex: 1;
  max-width: 440px;
  position: relative;
}

.erp-global-search input {
  width: 100%;
  height: 40px;
  border: 1.5px solid var(--erp-border);
  border-radius: 22px;
  padding: 0 16px 0 42px;
  font-size: var(--erp-type-caption);
  font-family: inherit;
  background: var(--erp-bg);
  color: var(--erp-text);
  transition: var(--erp-transition);
}

.erp-global-search input::placeholder {
  color: var(--erp-text-light);
}

.erp-global-search input:focus {
  outline: none;
  border-color: var(--erp-secondary);
  box-shadow: 0 0 0 4px rgba(30, 58, 95, .1);
  background: #fff;
}

.erp-global-search i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--erp-text-muted);
  font-size: var(--erp-type-body);
}

.erp-header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.erp-header-actions .dropdown {
  position: relative;
}

.erp-header-separator {
  width: 1px;
  height: 20px;
  background-color: var(--erp-border);
  display: inline-block;
}

.erp-header-select {
  height: auto;
  border: none;
  border-radius: 0;
  padding: 0;
  font-size: var(--erp-type-body);
  font-weight: 500;
  font-family: inherit;
  background: transparent;
  appearance: none;
  cursor: pointer;
  transition: var(--erp-transition);
  color: var(--erp-text);
  line-height: 1.5;
}

.erp-header-select:hover {
  color: var(--erp-secondary);
}

.erp-header-select:focus {
  outline: none;
  box-shadow: none;
}

.erp-period-picker-toggle,
.erp-school-picker-toggle {
  width: auto;
  text-align: left;
  white-space: nowrap;
  border: none;
  background: transparent;
  padding: 0;
  position: relative;
  font-size: var(--erp-type-body);
  font-weight: 500;
  color: var(--erp-text);
  line-height: 1.5;
  display: inline-block;
}

.erp-period-picker-toggle:hover,
.erp-school-picker-toggle:hover {
  color: var(--erp-secondary);
  background: transparent;
}

.erp-school-picker-menu {
  min-width: 280px;
  padding: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--erp-border);
}

.erp-school-picker-menu .dropdown-item {
  border-radius: var(--erp-radius-xs);
  transition: all 0.2s ease;
  background: transparent;
  position: relative;
}

.erp-school-picker-menu .dropdown-item:hover {
  background: var(--erp-primary-muted) !important;
  color: var(--erp-primary) !important;
}

.erp-school-picker-menu .dropdown-item.active {
  background: var(--erp-primary) !important;
  color: #ffffff !important;
}

.erp-school-picker-menu .dropdown-item.active:hover {
  background: var(--erp-primary) !important;
  color: #ffffff !important;
}

.erp-school-picker-menu .dropdown-item.active::after {
  content: '\f26b';
  font-family: 'bootstrap-icons';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color:#22c55e;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
}

.erp-school-search-wrap {
  position: relative;
  margin-bottom: 6px;
}

.erp-school-search-wrap .bi-search {
  position: absolute;
  top: 50%;
  left: 11px;
  color: var(--erp-text-muted);
  transform: translateY(-50%);
}

.erp-school-search {
  width: 100%;
  height: 38px;
  border: 1px solid var(--erp-border);
  border-radius: var(--erp-radius-sm);
  padding: 0 10px 0 34px;
  color: var(--erp-text);
  background: var(--erp-bg);
  font: inherit;
}

.erp-school-search:focus {
  outline: none;
  border-color: var(--erp-secondary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}

.erp-school-results {
  max-height: 260px;
  overflow-y: auto;
}

.erp-school-option {
  border-radius: var(--erp-radius-sm);
  white-space: normal;
  position: relative;
  padding: 10px 40px 10px 12px;
  font-size: var(--erp-type-body);
  transition: var(--erp-transition);
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  text-align: left;
}

.erp-school-option:hover {
  background: var(--erp-bg-secondary);
}

.erp-school-option.active {
  color: var(--erp-text);
  background: transparent;
}

.erp-school-option.active:hover {
  background: var(--erp-bg-secondary);
}

.erp-school-option.active::after {
  content: '\f26b';
  font-family: 'bootstrap-icons';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #22c55e;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
}

.erp-school-empty {
  display: none;
  padding: 12px;
  color: var(--erp-text-muted);
  font-size: var(--erp-type-caption);
  text-align: center;
}

.erp-header-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: var(--erp-radius-sm);
  color: var(--erp-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--erp-type-heading-small);
  cursor: pointer;
  position: relative;
  transition: var(--erp-transition);
}

.erp-header-btn:hover {
  background: var(--erp-primary-light);
  color: var(--erp-secondary);
}

.erp-header-btn .badge-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  background: var(--erp-danger);
  border-radius: 50%;
  border: 2px solid #fff;
  animation: pulseDot 2.5s ease infinite;
}

@keyframes pulseDot {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, .45);
  }

  50% {
    box-shadow: 0 0 0 5px rgba(239, 68, 68, 0);
  }
}

.erp-user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 4px;
  border-radius: var(--erp-radius-sm);
  cursor: pointer;
  transition: var(--erp-transition);
  border: none;
  background: transparent;
}

.erp-user-menu:hover {
  background: var(--erp-primary-light);
}

.erp-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--erp-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--erp-type-caption);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(30, 58, 95, .24);
}

.erp-user-info {
  display: none;
}

.erp-user-info .name {
  font-size: var(--erp-type-caption);
  font-weight: 600;
  color: var(--erp-text);
}

.erp-user-info .role {
  font-size: var(--erp-type-xs);
  color: var(--erp-text-muted);
}

/* Premium Bootstrap dropdown overrides */
.dropdown-menu.shadow.border-0 {
  border: 1px solid var(--erp-border) !important;
  border-radius: var(--erp-radius) !important;
  box-shadow: var(--erp-shadow-lg) !important;
  padding: 6px !important;
  min-width: 200px !important;
}

.dropdown-menu.shadow.border-0 .dropdown-item {
  border-radius: var(--erp-radius-xs);
  padding: 8px 12px !important;
  font-size: var(--erp-type-caption) !important;
  color: var(--erp-text) !important;
  transition: var(--erp-transition);
}

.dropdown-menu.shadow.border-0 .dropdown-item:hover {
  background: var(--erp-primary-muted) !important;
  color: var(--erp-secondary) !important;
}

.dropdown-menu.shadow.border-0 .dropdown-divider {
  border-color: var(--erp-border) !important;
  margin: 6px 0 !important;
}

.erp-dropdown-menu {
  border-radius: 10px;
  font-size: var(--erp-type-caption);
  min-width: 260px;
  max-width: 280px;
  z-index: 1050 !important;
}

/* Ensure header dropdown is positioned correctly */
.erp-header-actions .erp-dropdown-menu {
  position: absolute !important;
  top: 100% !important;
  right: 0 !important;
  left: auto !important;
  margin-top: 8px !important;
  transform: none !important;
}

/* Action Dropdown Menu Styles */
.erp-action-dropdown {
  min-width: 180px;
  border-radius: 6px;
  padding: 6px 0;
  border: 1px solid #E0E0E0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  position: absolute !important;
  z-index: 1050 !important;
}

.erp-action-item {
  padding: 9px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: background-color 0.15s ease;
  text-decoration: none;
  color: inherit;
}

.erp-action-item:hover {
  background-color: #F7F7F7;
  text-decoration: none;
}

.erp-action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.erp-action-icon i {
  color: #616161;
  font-size: var(--erp-type-section-title);
}

.erp-action-text {
  color: #424242;
  font-weight: 400;
  font-size: var(--erp-type-body);
  line-height: 1;
  display: flex;
  align-items: center;
}

.erp-action-divider {
  margin: 0;
  border-top: 1px solid #F0F0F0;
}

.erp-btn-icon-clean {
  border: none;
  background: none;
  padding: 4px;
  cursor: pointer;
}

.erp-btn-icon-clean i {
  font-size: var(--erp-type-heading-3);
  color: #424242;
}

.erp-btn-icon-clean:hover {
  opacity: 0.7;
}

.erp-btn-icon-rounded {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: none;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.erp-btn-icon-rounded:hover {
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.erp-btn-icon-rounded:focus,
.erp-btn-icon-rounded:active {
  outline: none;
  border: none;
  box-shadow: none;
}

.erp-btn-icon-rounded i {
  font-size: var(--erp-type-heading-small);
}

.erp-btn-icon-card {
  background: white;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  gap: 8px;
  color: #424242;
  text-decoration: none;
  font-size: var(--erp-type-body);
  font-weight: 500;
}

.erp-btn-icon-card i {
  font-size: var(--erp-type-heading-small);
  color: #424242;
}

.erp-btn-icon-card:hover {
  background: #F5F5F5;
  color: #424242;
  text-decoration: none;
}

.erp-btn-icon-card:focus,
.erp-btn-icon-card:active {
  outline: none;
  box-shadow: none;
  color: #424242;
  text-decoration: none;
}

.erp-user-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}

.erp-user-dropdown-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-light);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--erp-type-section-title);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(1, 26, 90, .24);
}

.erp-user-dropdown-info {
  flex: 1;
  min-width: 0;
}

.erp-user-dropdown-name {
  font-size: var(--erp-type-body);
  font-weight: 600;
  color: var(--erp-text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.erp-user-dropdown-email {
  font-size: var(--erp-type-sm);
  color: var(--erp-text-muted);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.erp-user-dropdown-campus {
  font-size: var(--erp-type-sm);
  color: var(--erp-text-light);
  word-break: break-word;
  line-height: 1.4;
}

.erp-icon-danger {
  color: var(--erp-danger);
}

.erp-surface-primary-soft {
  background: var(--erp-primary-light);
  color: var(--erp-secondary);
}

.erp-surface-success-soft {
  background: var(--erp-success-light);
  color: var(--erp-success);
}

.erp-surface-warning-soft {
  background: var(--erp-warning-light);
  color: var(--erp-warning);
}

.erp-surface-danger-soft {
  background: var(--erp-danger-light);
  color: var(--erp-danger);
}

.erp-dot-primary {
  background: var(--erp-primary);
}

.erp-dot-success {
  background: var(--erp-success);
}

.erp-dot-warning {
  background: var(--erp-warning);
}

.erp-dot-danger {
  background: var(--erp-danger);
}

.erp-avatar-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: var(--erp-type-heading-2);
  font-weight: 700;
  background: var(--erp-primary);
}

/* ══════════════════════════════════════════════════════
   LAYOUT
══════════════════════════════════════════════════════ */
.erp-layout {
  display: flex;
  padding-top: var(--erp-header-h);
  min-height: 100vh;
}

/* ══════════════════════════════════════════════════════
   SIDEBAR — Deep Navy Premium
══════════════════════════════════════════════════════ */
.erp-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  height: 100vh;
  width: var(--erp-sidebar-w);
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary) 55%, var(--primary-dark) 100%);
  transition: width .14s cubic-bezier(.2, .8, .2, 1), transform .14s cubic-bezier(.2, .8, .2, 1), box-shadow .14s ease;
  z-index: 1060;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, .04);
}

/* Top accent bar */
/* .erp-sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--erp-secondary) 40%, #6366F1 70%, transparent 100%);
  opacity: .6;
} */

.erp-sidebar.collapsed {
  width: var(--erp-sidebar-collapsed);
}

/* Move header when sidebar is expanded */
body.sidebar-expanded .erp-header {
  left: var(--erp-sidebar-w);
}

.erp-sidebar.collapsed.hover-expand {
  width: var(--erp-sidebar-w);
  box-shadow: 8px 0 40px rgba(0, 0, 0, .32);
  z-index: 1060;
}

.erp-sidebar.collapsed.hover-expand .erp-nav-label,
.erp-sidebar.collapsed.hover-expand .erp-sidebar-search {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.erp-sidebar.collapsed.hover-expand .erp-nav-module-btn:not(.active) {
  padding: 8px 14px;
  justify-content: flex-start;
}

/* Sidebar Search */
.erp-sidebar-search {
  padding: 16px 12px 8px;
  position: relative;
}

.erp-sidebar-search input {
  width: 100%;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--erp-radius-sm);
  background: rgba(255, 255, 255, .07);
  color: rgba(255, 255, 255, .9);
  padding: 0 12px 0 38px;
  font-size: var(--erp-type-caption);
  font-family: inherit;
  transition: var(--erp-transition);
}

.erp-sidebar-search input::placeholder {
  color: rgba(255, 255, 255, .28);
}

.erp-sidebar-search input:focus {
  outline: none;
  border-color: rgba(37, 99, 235, .55);
  background: rgba(255, 255, 255, .1);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

.erp-sidebar-search i {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-4px);
  color: rgba(255, 255, 255, .32);
  font-size: var(--erp-type-caption);
}

/* Sidebar Nav */
.erp-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-left: 10px;
  max-height: calc(100vh - 40px);
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.erp-sidebar-nav::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
  width: 0;
}

.erp-nav-module {
  margin-bottom: 8px;
  position: relative;
}

.erp-nav-module:first-child {
  margin-top: 56px;
}

.erp-nav-module-btn {
  /* Keep the row at its expanded width so icons never re-centre while hovering. */
  width: calc(var(--erp-sidebar-w) - 20px);
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 10px 14px;
  height:40px;
  border: none;
  background: transparent;
  color: var(--erp-sidebar-text);
  border-radius: 0;
  font-size: var(--erp-type-body-emphasis);
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color 0.15s ease;
  text-align: left;
  position: relative;
  justify-content: flex-start;
  will-change: auto;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.erp-nav-label {
  display: inline-block;
  flex-shrink: 1;
  flex-grow: 1;
  min-width: 0;
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  white-space: nowrap;
  transition: opacity .1s ease, transform .14s cubic-bezier(.2, .8, .2, 1), visibility 0s;
}

.erp-nav-module-btn .chevron,
.erp-nav-module-btn .bi-chevron-right {
  display: inline-block;
  margin-left: auto !important;
  font-size: 14px !important;
  font-weight: 600;
  opacity: 0.6;
  min-width: 12px !important;
  width: 12px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  -webkit-text-stroke: 0.5px currentColor;
  text-stroke: 0.5px currentColor;
}

/* Rotate chevron when expanded */
.erp-nav-module.expanded .chevron,
.erp-nav-module.expanded .bi-chevron-right {
  transform: rotate(90deg);
}


.erp-nav-module-btn:hover:not(.active)::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background: var(--primary-hover);
  z-index: -1;
  border-radius: 0;
}

.erp-nav-module-btn.active {
  background: transparent;
  color: var(--text-white);
  z-index: 1;
  padding-left:9px;
}

.erp-nav-module-btn.active::after {
  content: '';
  position: absolute;
  left: -10px;
  right: -10px;
  top: 0;
  bottom: 0;
  background: var(--primary-light);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .08);
  z-index: -1;
}

.erp-nav-module-btn.active::before {
  content: '';
  position: absolute;
  left:-9px;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #FFFFFF;
  border-radius: 0;
  z-index: 1;
}

.erp-nav-module-btn i {
  font-size: 18px;
  min-width: 24px;
  max-width: 24px;
  width: 24px;
  text-align: center;
  opacity: 1;
  color: var(--erp-sidebar-icon);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.erp-nav-module-btn i:first-child {
  flex-shrink: 0;
  margin: 0;
}

/* Make Font Awesome icons appear thinner to match Bootstrap Icons */
.erp-nav-module-btn i.fa-solid {
  font-weight: 400;
}

.erp-nav-module-btn.active i {
  opacity: 1;
  color: var(--erp-sidebar-text);
}


.erp-nav-subitems {
  display: none;
  padding-left: 0;
  margin-top: 4px;
  position: relative;
}

/* Show subitems ONLY when expanded (accordion behavior - one at a time) */
.erp-nav-module.expanded .erp-nav-subitems {
  display: block;
}

/* Show connecting line when expanded */
.erp-nav-module.expanded .erp-nav-subitems::before {
  content: '';
  position: absolute;
  left: 28px;
  top: 0;
  bottom: 0;
  width: 1.5px;
  background: #FFFFFF;
  opacity: 0.3;
  z-index: 0;
}

.erp-nav-subitem {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 44px;
  color: #FFFFFF;
  font-size: var(--erp-type-body);
  cursor: pointer;
  border-radius: 0;
  transition: background-color 0.15s ease, opacity 0.15s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  position: relative;
  opacity: 0.9;
}

.erp-nav-subitem:hover {
  background: rgba(255, 255, 255, .05);
  color: #FFFFFF;
  opacity: 1;
}

.erp-nav-subitem.active {
  color: var(--text-white);
  background: var(--primary-light);
  font-weight: 600;
}

.erp-nav-subgroup-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 14px 8px 44px;
  color: #FFFFFF;
  opacity: 0.75;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.erp-nav-subgroup-btn:hover {
  opacity: 1;
}

.erp-nav-subgroup-btn .chevron {
  font-size: 10px;
  transition: transform 0.15s ease;
}

.erp-nav-subgroup.expanded > .erp-nav-subgroup-btn .chevron {
  transform: rotate(90deg);
}

.erp-nav-subgroup-items {
  display: none;
}

.erp-nav-subgroup.expanded > .erp-nav-subgroup-items {
  display: block;
}

.erp-nav-subgroup-items .erp-nav-subitem {
  padding-left: 56px;
}

.erp-nav-subgroup-items .erp-nav-subitem::before {
  left: 38px;
}

.erp-nav-subitem::before {
  content: '';
  position: absolute;
  left: 26px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-secondary);
  flex-shrink: 0;
  z-index: 1;
}

.erp-nav-subitem.active::before {
  background: var(--secondary);
  width: 7px;
  height: 7px;
}

/* When sidebar is expanded - ensure labels are visible */
.erp-sidebar:not(.collapsed) .erp-nav-label {
  display: inline-block;
}

.erp-sidebar:not(.collapsed) .chevron,
.erp-sidebar:not(.collapsed) .bi-chevron-right {
  display: inline-block;
}

/* When sidebar is collapsed - hide labels and subitems by default */
.erp-sidebar.collapsed .erp-nav-label,
.erp-sidebar.collapsed .erp-sidebar-search {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-4px);
  pointer-events: none;
}

.erp-sidebar.collapsed .chevron,
.erp-sidebar.collapsed .bi-chevron-right {
  display: none;
}

/* When sidebar is collapsed BUT hovering (hover-expand) - show labels */
.erp-sidebar.collapsed.hover-expand .erp-nav-label,
.erp-sidebar.collapsed.hover-expand .erp-sidebar-search {
  display: inline-block;
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
}

.erp-sidebar.collapsed.hover-expand .chevron,
.erp-sidebar.collapsed.hover-expand .bi-chevron-right {
  display: inline-block !important;
}

.erp-sidebar.collapsed .erp-nav-subitems {
  display: none;
}

/* When sidebar is hover-expanded, show subitems only on click (expanded class) */
.erp-sidebar.collapsed.hover-expand .erp-nav-module.expanded .erp-nav-subitems {
  display: block !important;
  position: relative;
  background: transparent;
  box-shadow: none;
  padding-left: 0;
  border: none;
  margin-left: 0;
  margin-top: 4px;
}

/* Restore normal subitem styling in hover-expand mode */
.erp-sidebar.collapsed.hover-expand .erp-nav-subitem {
  padding: 8px 14px 8px 44px;
  color: #FFFFFF;
  background: none;
  opacity: 0.9;
}

.erp-sidebar.collapsed.hover-expand .erp-nav-subitem::before {
  content: '';
  position: absolute;
  left: 26px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-secondary);
  z-index: 1;
}

.erp-sidebar.collapsed.hover-expand .erp-nav-subitem:hover {
  background: rgba(255, 255, 255, .05);
  color: #FFFFFF;
  opacity: 1;
}

.erp-sidebar.collapsed.hover-expand .erp-nav-subitem.active {
  color: var(--text-white);
  background: var(--primary-light);
  font-weight: 600;
}

.erp-sidebar.collapsed.hover-expand .erp-nav-subitem.active::before {
  background: var(--secondary);
  width: 7px;
  height: 7px;
}

/* Show connecting line in hover-expand mode only when expanded */
.erp-sidebar.collapsed.hover-expand .erp-nav-module.expanded .erp-nav-subitems::before {
  content: '';
  position: absolute;
  left: 28px;
  top: 0;
  bottom: 0;
  width: 1.5px;
  background: #FFFFFF;
  opacity: 0.3;
  z-index: 0;
}

/* When sidebar is collapsed WITHOUT hover-expand, show floating panel */
.erp-sidebar.collapsed:not(.hover-expand) .erp-nav-module {
  position: relative;
}

.erp-sidebar.collapsed:not(.hover-expand) .erp-nav-module.expanded .erp-nav-subitems {
  position: absolute;
  left: 100%;
  top: 0;
  background: var(--erp-submenu);
  border-radius: var(--erp-radius);
  box-shadow: var(--erp-shadow-lg);
  padding: 12px 8px;
  min-width: 220px;
  z-index: 1050;
  border: 1px solid var(--erp-border);
  margin-top: 0;
  margin-left: 4px;
}

/* Hide the connecting line in floating panel mode */
.erp-sidebar.collapsed:not(.hover-expand) .erp-nav-module.expanded .erp-nav-subitems::before {
  display: none;
}

/* Adjust subitem styling in floating panel mode */
.erp-sidebar.collapsed:not(.hover-expand) .erp-nav-subitem {
  padding: 10px 16px;
  color: var(--erp-text);
}

.erp-sidebar.collapsed:not(.hover-expand) .erp-nav-subitem::before {
  display: none;
}

.erp-sidebar.collapsed:not(.hover-expand) .erp-nav-subitem:hover {
  background: var(--erp-primary-muted);
  color: var(--erp-secondary);
}

.erp-sidebar.collapsed .erp-nav-module-btn {
  justify-content: center;
  gap: 10px;
}

.erp-sidebar.collapsed .erp-nav-module-btn:not(.active) {
  padding: 9px;
}

.erp-sidebar.collapsed .erp-nav-module-btn i {
  margin: 0;
}

/* ══════════════════════════════════════════════════════
   SUBMENU PANEL
══════════════════════════════════════════════════════ */
.erp-submenu-panel {
  display: none !important;
}

.erp-sidebar.collapsed~.erp-submenu-panel,
body.sidebar-collapsed .erp-submenu-panel {
  left: var(--erp-sidebar-collapsed);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-10px);
}

.erp-sidebar.collapsed.hover-expand~.erp-submenu-panel,
body.sidebar-collapsed.sidebar-hover-expand .erp-submenu-panel {
  left: var(--erp-sidebar-w);
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.erp-submenu-panel.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-10px);
}

.erp-submenu-title {
  padding: 0 20px 14px;
  font-size: var(--erp-type-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--erp-secondary);
  border-bottom: 1px solid var(--erp-border);
  margin-bottom: 8px;
}

.erp-submenu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  font-size: var(--erp-type-body-emphasis);
  color: var(--erp-text);
  cursor: pointer;
  transition: background-color 0.15s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  position: relative;
  text-decoration: none;
  font-weight: 500;
}

.erp-submenu-item:hover {
  background: var(--erp-primary-muted);
}

.erp-submenu-item.active {
  background: var(--primary-light);
  color: var(--text-white);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(1, 26, 90, .2);
}

.erp-submenu-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--secondary);
  border-radius: 0;
}

.erp-submenu-item i {
  font-size: var(--erp-type-body-emphasis);
  opacity: .8;
  flex-shrink: 0;
  color: var(--erp-text-muted);
}

.erp-submenu-item.active i {
  opacity: 1;
  color: #FFFFFF;
}

/* ══════════════════════════════════════════════════════
   MAIN CONTENT
══════════════════════════════════════════════════════ */
.erp-main {
  margin-left: var(--erp-sidebar-w);
  flex: 1;
  padding: 24px 28px 32px;
  margin-top: 0 !important;
  transition: margin-left var(--erp-transition-slow);
  min-width: 0;
}

/* Remove extra spacing from first child elements */
.erp-main > :first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
  font-size: 15px;
}

.erp-sidebar.collapsed ~ .erp-main,
body.sidebar-collapsed .erp-main {
  margin-left: var(--erp-sidebar-collapsed);
}

/* Hover expansion overlays the page; it must not push or resize page content. */
body.sidebar-collapsed.sidebar-hover-expand .erp-main {
  margin-left: var(--erp-sidebar-collapsed);
}

/* ══════════════════════════════════════════════════════
   BREADCRUMB
══════════════════════════════════════════════════════ */
.erp-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 0 !important;
  margin-bottom: 18px;
  padding-top: 0 !important;
  font-size: var(--erp-type-body);
  flex-wrap: wrap;
}

.erp-breadcrumb a {
  color: var(--erp-text-muted);
  text-decoration: none;
  transition: var(--erp-transition);
  font-weight: 500;
}

.erp-breadcrumb a:hover {
  color: var(--erp-secondary);
}

.erp-breadcrumb .sep {
  color: var(--erp-text-muted);
  font-size: var(--erp-type-sm);
  font-weight: 700;
}

.erp-breadcrumb .current {
  color: var(--erp-text);
  font-weight: 600;
}

.erp-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.erp-page-subtitle {
  margin: 6px 0 0;
}

/* ══════════════════════════════════════════════════════
   CARDS
══════════════════════════════════════════════════════ */
.erp-card {
  background: var(--erp-surface);
  border-radius: var(--erp-radius);
  border: 1px solid var(--erp-border);
  box-shadow: var(--erp-shadow-sm);
  transition: box-shadow var(--erp-transition), transform var(--erp-transition);
  overflow: visible;
}


.erp-card-header {
  padding: 12px 20px;
  border-bottom: 1px solid var(--erp-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.erp-card-title {
  font-size: var(--erp-type-heading-4);
  font-weight: 600;
  color: var(--erp-text);
  margin: 0;
}

.erp-card-body {
  padding: 16px;
}

.erp-card-body table td {
  /* Typography handled by ui-value class */
}

/* ══════════════════════════════════════════════════════
   STAT CARDS — Executive KPI
══════════════════════════════════════════════════════ */
.erp-stat-card {
  background: var(--erp-surface);
  border-radius: var(--erp-radius);
  border: 1px solid var(--erp-border);
  padding: 24px;
  box-shadow: var(--erp-shadow-sm);
  transition: all var(--erp-transition);
  position: relative;
  overflow: hidden;
}

.erp-stat-card::after {
  content: '';
  position: absolute;
  bottom: -24px;
  right: -24px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, .04) 0%, transparent 70%);
  pointer-events: none;
}

.erp-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--erp-shadow-md);
  border-color: var(--erp-border-strong);
}

.erp-stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--erp-type-heading-3);
  margin-bottom: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

.erp-stat-card .stat-value {
  letter-spacing: -.05em;
  line-height: 1;
}

.erp-stat-card .stat-label {
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.erp-stat-card .stat-change {
  font-size: var(--erp-type-sm);
  font-weight: 700;
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 10px;
  border-radius: 20px;
}

.erp-stat-card .stat-change.up {
  color: #059669;
  background: var(--erp-success-light);
}

.erp-stat-card .stat-change.down {
  color: #DC2626;
  background: var(--erp-danger-light);
}

/* ══════════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════════ */
.erp-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: var(--erp-radius-sm);
  font-size: var(--erp-type-caption);
  font-weight: 600;
  font-family: inherit;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: var(--erp-transition);
  line-height: 1.4;
  text-decoration: none;
  letter-spacing: -.01em;
  white-space: nowrap;
}

.erp-btn-primary {
  background: var(--primary-light);
  color: #fff;
  border-color: var(--primary-light);
  box-shadow: 0 1px 3px rgba(1, 26, 90, .2);
}

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

.erp-btn-outline {
  background: #fff;
  border-color: var(--erp-border);
  color: var(--erp-text);
  box-shadow: var(--erp-shadow-xs);
}

.erp-btn-outline:hover {
  border-color: var(--erp-border);
  color: var(--erp-text);
  background: #fff;
}

.erp-btn-success {
  background: var(--erp-success);
  color: #fff;
  border-color: var(--erp-success);
}

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

.erp-btn-sm {
  padding: 6px 14px;
  font-size: var(--erp-type-sm);
  border-radius: 8px;
}

.erp-btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  justify-content: center;
  border-radius: 8px;
}

/* ══════════════════════════════════════════════════════
   TABLE — Enterprise Grade
══════════════════════════════════════════════════════ */
.erp-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  position: relative;
  max-width: 100%;
}

/* erp-report-scroll used to cap the table at 500px with its own internal
   vertical scrollbar, which also fought with .erp-grand-total's sticky
   bottom positioning below it (two competing "stick to the bottom of my
   scroll box" elements) and hid the grand total behind/under the table.
   Tables now simply flow with the page, one scrollbar, grand total always
   visible right after the last row. */

.erp-table {
  width: 100%;
  table-layout: auto;
}

/* Fix dropdown positioning in page header */
.erp-page-header .dropdown-menu {
  position: absolute !important;
  inset: 0 0 auto auto !important;
  margin: 0 !important;
  transform: none !important;
  top: 100% !important;
  right: 0 !important;
  left: auto !important;
  margin-top: 0.5rem !important;
}

.erp-page-header .dropdown-menu-end {
  --bs-position: end;
  right: 0 !important;
  left: auto !important;
}

.erp-table-loading-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, .6);
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.erp-table-loading > .erp-table-loading-overlay {
  display: flex;
}

.erp-table-loading-overlay .erp-spinner {
  margin: 0;
}

.erp-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--erp-type-caption);
}

.erp-table thead th {
  background: var(--erp-bg);
  padding: 10px 14px;
  border-bottom: 2px solid var(--erp-border);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 5;
}

.erp-table thead th:first-child {
  padding-left: 16px;
}

.erp-table thead th:last-child {
  padding-right: 16px;
}

/* Tables whose header spans 2 or 3 rows (a grouping row above the plain
   column labels, e.g. Ledger name -> Fee Head name -> Allotted/Concession/
   Paid/Due, or Old/New/Total above each metric). The default rule above
   pins every header row to the same top:0, which only works for a
   single-row header - with more than one row they'd all try to stick to
   the same position instead of stacking underneath each other. Each row
   after the first needs to start below the ones above it. */
.erp-table-multi-header thead tr:nth-child(2) th {
  top: 41px;
}

.erp-table-multi-header thead tr:nth-child(3) th {
  top: 82px;
}

.erp-sort-icon {
  font-size: var(--erp-type-micro);
  line-height: 4px;
  cursor: pointer;
}

.erp-floating-chat-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--erp-primary);
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(24, 48, 124, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: all 0.3s ease;
}

.erp-floating-chat-btn:hover {
  background: var(--erp-primary-dark);
  box-shadow: 0 6px 16px rgba(24, 48, 124, 0.4);
  transform: scale(1.05);
}

.erp-floating-chat-btn i {
  font-size: var(--erp-type-heading-2);
}

.erp-chat-modal {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 350px;
  height: 500px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.erp-chat-header {
  background: var(--erp-primary);
  color: white;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.erp-chat-title {
  font-size: var(--erp-type-heading-small);
  font-weight: 600;
  margin: 0;
}

.erp-chat-header-btn {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.erp-chat-header-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.erp-chat-header-btn i {
  font-size: var(--erp-type-section-title);
}

.erp-chat-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.erp-chat-search {
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  gap: 10px;
}

.erp-chat-search i {
  color: #9ca3af;
  font-size: var(--erp-type-section-title);
}

.erp-chat-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: var(--erp-type-body);
  color: #1f2937;
}

.erp-chat-search-input::placeholder {
  color: #9ca3af;
}

.erp-chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.erp-chat-empty-icon {
  width: 80px;
  height: 80px;
  background: #f3f4f6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.erp-chat-empty-icon i {
  font-size: var(--erp-type-display-large);
  color: #9ca3af;
}

.erp-chat-empty-text {
  font-size: var(--erp-type-body);
  color: #6b7280;
  margin: 0;
}

.erp-empty-state {
  text-align: center;
  padding: 40px 40px;
}

.erp-empty-state-icon {
  width: 80px;
  height: 80px;
  background: #f3f4f6;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.erp-empty-state-icon i {
  font-size: var(--erp-type-display-large);
  color: #9ca3af;
}

.erp-empty-state-title {
  margin-bottom: 8px;
}

.erp-empty-state-text {
  margin-bottom: 0;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.erp-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--erp-border);
  vertical-align: top;
  max-width: 250px;
  text-overflow: ellipsis;
  position: static;
}

.erp-table tbody td:first-child {
  padding-left: 16px;
}

.erp-table tbody td:last-child {
  padding-right: 16px;
  overflow: visible !important;
}

.erp-table tbody tr {
  transition: background var(--erp-transition);
  position: relative;
}

.erp-table tbody tr:nth-child(even) {
  background: rgba(248, 250, 252, .6);
}

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

.erp-table-phone {
  color: var(--erp-text-muted);
  font-size: var(--erp-type-body);
  margin-top: 4px;
}

.erp-table-phone i {
  margin-right: 4px;
}

.erp-table tfoot td {
  padding: 12px 14px;
  border-top: 2px solid var(--erp-border);
  background: var(--erp-bg);
  font-weight: 600;
  color: var(--erp-text);
}

.erp-table tfoot td:first-child {
  padding-left: 16px;
}

.erp-table tfoot td:last-child {
  padding-right: 16px;
}

.erp-table tfoot tr {
  background: rgba(248, 250, 252, .8);
}

/* ══════════════════════════════════════════════════════
   BADGES
══════════════════════════════════════════════════════ */
.erp-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: var(--erp-type-xs);
  font-weight: 700;
  letter-spacing: .03em;
}

.erp-badge-success {
  background: var(--erp-success-light);
  color: #059669;
}

.erp-badge-warning {
  background: var(--erp-warning-light);
  color: #D97706;
}

.erp-badge-danger {
  background: var(--erp-danger-light);
  color: #DC2626;
}

.erp-badge-info {
  background: var(--erp-primary-light);
  color: var(--erp-secondary);
}

.erp-badge-secondary {
  background: #F1F5F9;
  color: var(--erp-text-muted);
}

.erp-badge-primary {
  background: var(--primary);
  color: var(--text-white);
}

/* ══════════════════════════════════════════════════════
   FORMS — Oracle Fusion Level
══════════════════════════════════════════════════════ */
.erp-form-group {
  margin-bottom: 16px;
}

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

.erp-detail-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

.erp-detail-title {
  font-size: var(--erp-type-heading-3);
  font-weight: 600;
  color: #1F2937;
  margin-bottom: 16px;
}

.erp-show-title {
  font-size: var(--erp-type-page-title);
  font-weight: 700;
  color: #1F2937;
  margin-bottom: 24px;
}
.erp-detail-subtitle {
  margin-top: 4px;
  margin-bottom: 0;
}

.erp-config-title {
  margin-bottom: 20px;
}

.erp-detail-divider {
  border: none;
  border-top: 1px solid #E5E7EB;
  margin: 16px 0 24px 0;
}

.erp-badge-pill {
  display: inline-block;
  padding: 6px 16px;
  background: #1E40AF;
  color: white;
  border-radius: 20px;
  font-size: var(--erp-type-body);
  font-weight: 500;
}

/* Edit Page Header */
.erp-edit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

/* Toggle Switch */
.erp-toggle-wrapper {
  margin-top: 8px;
}

.erp-toggle-input {
  display: none;
}

.erp-toggle-label {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
  background-color: #E5E7EB;
  border-radius: 24px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.erp-toggle-label::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.erp-toggle-input:checked + .erp-toggle-label {
  background-color: #1E40AF;
}

.erp-toggle-input:checked + .erp-toggle-label::after {
  transform: translateX(24px);
}

/* Form Footer */
.erp-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 24px;
}

/* Secondary Button */
.erp-btn-secondary {
  background-color: #F3F4F6;
  color: #4B5563;
  border: 1px solid #D1D5DB;
}

.erp-btn-secondary:hover {
  background-color: #E5E7EB;
  color: #374151;
}

.erp-btn-white {
  background-color: white;
  color: #424242;
  border: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.erp-btn-white:hover {
  background-color: #F5F5F5;
  color: #424242;
  border: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Danger Button */
.erp-btn-danger {
  background-color: #DC2626;
  color: white;
  border: none;
}

.erp-btn-danger:hover {
  background-color: #B91C1C;
  color: white;
}

/* Keep Adding Checkbox */
.erp-keep-adding {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin: 0;
}

.erp-keep-adding input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.erp-keep-adding span {
  font-size: var(--erp-type-body);
  color: #4B5563;
  font-weight: 500;
}

.erp-form-label {
  display: block;
  font-size: var(--erp-type-body);
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--erp-text);
  letter-spacing: 0;
}

.erp-form-label .req {
  color: var(--erp-danger);
  margin-left: 2px;
}

.erp-form-link {
  display: inline-block;
  font-size: var(--erp-type-body);
  color: #0066cc;
  text-decoration: none;
  font-weight: 500;
}

.erp-form-link:hover {
  text-decoration: underline;
  color: #0052a3;
}

.erp-form-control {
  width: 100%;
  height: 42px;
  border: 1.5px solid var(--erp-border);
  border-radius: var(--erp-radius-sm);
  padding: 0 14px;
  font-size: var(--erp-type-body);
  transition: var(--erp-transition);
  background: #fff;
  color: var(--erp-text);
}

.erp-form-control:hover:not(:focus) {
  border-color: var(--erp-border-strong);
}

.erp-form-control:focus {
  outline: none;
  border-color: var(--erp-secondary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .1);
}

textarea.erp-form-control {
  height: auto;
  padding: 12px 14px;
  resize: vertical;
}

.erp-form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
  cursor: pointer;
}

.erp-filter-select-wrap {
  position: relative;
}

.erp-filter-date-wrap {
  position: relative;
}

.erp-filter-date-wrap .erp-form-control {
  padding-right: 2.75rem;
}

.erp-filter-date-wrap .erp-filter-select-clear {
  right: .75rem;
}

.erp-filter-select-wrap .select2-container {
  width: 100% !important;
}

.erp-filter-select-wrap .select2-selection__clear {
  display: none !important;
}

/* Keep one clear action in filters even if Select2 initialized before the
   shared filter wrapper was created. */
.erp-filter-panel .select2-selection__clear {
  display: none !important;
}

.erp-filter-select-wrap .erp-form-select {
  padding-right: 3.75rem;
}

.erp-filter-select-clear {
  position: absolute;
  top: 50%;
  right: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  color: var(--erp-text-muted, #64748b);
  border: 0;
  background: transparent;
  transform: translateY(-50%);
  z-index: 3;
  cursor: pointer;
}

.erp-filter-select-clear:hover {
  color: var(--erp-text, #1e293b);
}

.erp-file-upload {
  border: 2px dashed var(--erp-border);
  border-radius: var(--erp-radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--erp-transition);
  background: var(--erp-bg);
}

.erp-file-upload:hover {
  border-color: var(--erp-secondary);
  background: var(--erp-primary-light);
}

.erp-file-upload i {
  font-size: var(--erp-type-page-title);
  color: var(--erp-secondary);
  margin-bottom: 8px;
  display: block;
}

.erp-file-upload p {
  margin: 0 0 4px;
  font-size: var(--erp-type-caption);
  color: var(--erp-text);
  font-weight: 500;
}

/* ══════════════════════════════════════════════════════
   MODAL
══════════════════════════════════════════════════════ */
.erp-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.erp-modal-overlay.show {
  display: flex;
}

.erp-modal {
  background: #fff;
  border-radius: var(--erp-radius-lg);
  box-shadow: var(--erp-shadow-lg);
  width: 100%;
  max-width: 520px;
  border: 1px solid var(--erp-border);
  animation: modalIn .28s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(.92) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.erp-modal-header {
  padding: 22px 28px;
  border-bottom: 1px solid var(--erp-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}


.erp-modal-body {
  padding: 28px;
}

.erp-modal-body p {
  color: var(--erp-text-muted);
  margin: 0;
  line-height: 1.6;
}

.erp-modal-footer {
  padding: 18px 28px;
  border-top: 1px solid var(--erp-border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ══════════════════════════════════════════════════════
   LOADING & EMPTY
══════════════════════════════════════════════════════ */
.erp-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--erp-border);
  border-top-color: var(--erp-secondary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 40px auto;
}

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

.erp-loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  /* background: rgba(248, 250, 252, .75);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px); */
  align-items: center;
  justify-content: center;
}

body[data-theme="dark"] .erp-loader {
  background: rgba(15, 23, 42, .75);
}

.custom-loader {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--primary, #0d6efd);
  border-radius: 50%;
  animation: loader-spin 1s linear infinite;
}

.loader-icon {
  position: relative;
  width: 48px;
  height: 48px;
  z-index: 1;
}

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

body[data-theme="dark"] .loader-ring {
  border-color: rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary, #0d6efd);
}

/* ══════════════════════════════════════════════════════
   FILTER PANEL — reusable collapsible filter block
══════════════════════════════════════════════════════ */
.erp-filter-panel {
  display: none;
}

.erp-filter-panel.show {
  display: block;
  animation: fadeIn .25s ease;
}

.erp-filter-panel .erp-card-body {
  padding: 14px 16px;
}

.erp-filter-panel .row.g-3 {
  --bs-gutter-x: .65rem;
  --bs-gutter-y: .65rem;
}

.erp-filter-panel .erp-form-group {
  margin-bottom: 0;
}

.erp-filter-panel .erp-form-label {
  font-size: .78rem;
  margin-bottom: .25rem;
  min-height: 0;
}

.erp-filter-panel .erp-form-control {
  height: 36px;
  font-size: .85rem;
}

/* ══════════════════════════════════════════════════════
   CONFIG PANEL — configuration settings panel
══════════════════════════════════════════════════════ */
.erp-config-panel {
  display: none;
  margin-bottom: 1.5rem;
}

.erp-config-header {
  margin-bottom: 1rem;
}

.erp-config-title {
  font-size: var(--erp-type-h3);
  font-weight: 700;
  color: var(--erp-text-dark);
}

.erp-config-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.erp-config-label {
  margin-bottom: 0;
}

.erp-radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.erp-radio-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  margin-bottom: 0;
}

.erp-radio-input {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--erp-primary);
}

.erp-radio-text {
  font-size: var(--erp-type-body);
  color: var(--erp-text-normal);
}

/* ══════════════════════════════════════════════════════
   TOGGLE SWITCH — standard toggle switch
══════════════════════════════════════════════════════ */
.erp-toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
  margin-bottom: 0;
}

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

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

.erp-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

.erp-toggle-switch input:checked + .erp-toggle-slider {
  background-color: var(--erp-primary);
}

.erp-toggle-switch input:focus + .erp-toggle-slider {
  box-shadow: 0 0 1px var(--erp-primary);
}

.erp-toggle-switch input:checked + .erp-toggle-slider:before {
  transform: translateX(24px);
}

/* ══════════════════════════════════════════════════════
   DEFAULT BADGE — badge for default items
══════════════════════════════════════════════════════ */
.erp-default-badge {
  display: inline-block;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  margin-top: 0.25rem;
  line-height: 1;
}

.erp-empty {
  text-align: center;
  padding: 60px 24px;
}

.erp-empty i {
  font-size: var(--erp-type-hero);
  color: var(--erp-text-xlight);
  margin-bottom: 16px;
  display: block;
}


.erp-empty p {
  color: var(--erp-text-muted);
  font-size: var(--erp-type-body);
  margin: 0;
}

/* ══════════════════════════════════════════════════════
   ACTIVITY & QUICK ACTIONS
══════════════════════════════════════════════════════ */
.erp-activity-item {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--erp-border);
}

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

.erp-activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 7px;
  flex-shrink: 0;
}

.erp-activity-text {
  font-size: var(--erp-type-caption);
  line-height: 1.5;
  color: var(--erp-text);
}

.erp-activity-time {
  font-size: var(--erp-type-sm);
  color: var(--erp-text-muted);
  margin-top: 3px;
}

.erp-quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 12px;
  border-radius: var(--erp-radius-sm);
  border: 1.5px solid var(--erp-border);
  cursor: pointer;
  transition: var(--erp-transition);
  text-align: center;
  background: #fff;
  text-decoration: none;
  color: var(--erp-text);
}

.erp-quick-action:hover {
  border-color: var(--erp-secondary);
  background: var(--erp-primary-light);
  color: var(--erp-secondary);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(30, 58, 95, .12);
}

.erp-quick-action i {
  font-size: var(--erp-type-heading-3);
  color: var(--erp-secondary);
}

.erp-quick-action span {
  font-size: var(--erp-type-sm);
  font-weight: 600;
}

.erp-chart-placeholder {
  height: 240px;
  background: linear-gradient(180deg, rgba(30, 58, 95, .06) 0%, #F8FAFC 100%);
  border-radius: var(--erp-radius-sm);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 24px;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.erp-chart-placeholder::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--erp-border);
}

.erp-chart-bar {
  flex: 1;
  max-width: 40px;
  min-width: 20px;
  background: linear-gradient(180deg, var(--erp-primary) 0%, rgba(30, 58, 95, .35) 100%);
  border-radius: 6px 6px 0 0;
  opacity: .8;
  transition: opacity var(--erp-transition);
}

.erp-chart-bar:hover {
  opacity: 1;
}

.erp-chart-placeholder::after {
  content: 'Enrollment Trend — Chart.js Ready';
  position: absolute;
  top: 14px;
  left: 20px;
  font-size: var(--erp-type-xs);
  color: var(--erp-text-muted);
  font-weight: 600;
  letter-spacing: .02em;
}

/* ══════════════════════════════════════════════════════
   FILTERS BAR
══════════════════════════════════════════════════════ */
.erp-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--erp-border);
}

.erp-filters .erp-form-control,
.erp-filters .erp-form-select {
  height: 38px;
  font-size: var(--erp-type-caption);
  width: auto;
  min-width: 140px;
}

.erp-search-inline {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}

.erp-search-inline input {
  padding-left: 38px;
}

.erp-search-inline i {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--erp-text-muted);
  font-size: var(--erp-type-body);
}

/* ══════════════════════════════════════════════════════
   PAGINATION
══════════════════════════════════════════════════════ */
.erp-pagination {
  display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 6px;
    padding: 12px 16px;
    overflow-x: auto;
}

#pageNumbers {
  display: flex;
  align-items: center;
  gap: 6px;
}

.erp-pagination-btns {
 display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    flex-shrink: 0;
}

.erp-page-btn {
  min-width: 34px;
  height: 34px;
  border: 1.5px solid var(--erp-border);
  background: #fff;
  border-radius: var(--erp-radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  font-family: inherit;
  font-weight: 500;
  line-height: 1.5;
  transition: var(--erp-transition);
  padding: 0 8px;
  color: #334155;
  text-decoration: none;
}
.erp-page-dots {
    padding: 0 6px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    color: #334155;
    user-select: none;
}
.erp-page-btn:hover {
  border-color: var(--erp-secondary);
  color: var(--erp-secondary);
  background: var(--erp-primary-light);
}

.erp-page-btn.active {
  background: var(--primary-light);
  color: #fff;
  border-color: var(--primary-light);
  box-shadow: 0 2px 8px rgba(1, 26, 90, .3);
}

.erp-pagination .d-flex.align-items-center.gap-2 {
    flex-wrap: nowrap;
    flex-shrink: 0;
}

/* This is the actual fix — target the text itself */
.erp-pagination .d-flex.align-items-center.gap-2 span {
    white-space: nowrap;
}

.erp-pagination .erp-form-select {
    min-width: 64px;
    flex-shrink: 0;
}

/* Pagination Wrapper */
.erp-pagination-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  border-top: 1px solid #E5E7EB;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--erp-surface);
}

.erp-pagination-info {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  color: #334155;
}

.erp-pagination-btn {
  min-width: 26px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid #E5E7EB;
  background: white;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.erp-pagination-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  font-size: 13px;
  color: #64748b;
}

.erp-pagination-btn:hover:not(:disabled) {
  background: #F9FAFB;
  border-color: var(--primary-light);
  color: var(--primary-light);
}

.erp-pagination-btn.active {
  background: var(--primary-light);
  color: white;
  border-color: var(--primary-light);
}

.erp-pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Footer */
.erp-footer {
  text-align: center;
  padding: 10px;
  margin-top: 16px;
}

.erp-footer p {
  margin: 4px 0;
  font-size: var(--erp-type-body);
  color: #6B7280;
}

/* Table Name and Subtitle */
.erp-table-name {
  font-weight: 400;
  color: #1F2937;
  margin-bottom: 2px;
}

.erp-table-subtitle {
  font-size: var(--erp-type-caption);
  color: #6B7280;
}

/* Help Icon */
.erp-help-icon {
  color: #6B7280;
  font-size: var(--erp-type-body);
  cursor: help;
  margin-left: 4px;
}

.erp-help-icon:hover {
  color: #1E40AF;
}

/* Sort Arrows */
.erp-sort-arrows {
  display: inline-flex;
  flex-direction: column;
  margin-left: 4px;
  vertical-align: middle;
}

.erp-sort-arrows i {
  font-size: var(--erp-type-micro);
  line-height: 0.4;
  color: #9CA3AF;
}

.erp-sort-arrows i:hover {
  color: #1E40AF;
}

/* ══════════════════════════════════════════════════════
   VIEW DETAIL
══════════════════════════════════════════════════════ */
.erp-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.erp-detail-item label {
  font-size: var(--erp-type-xs);
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--erp-text-light);
  font-weight: 700;
  display: block;
  margin-bottom: 5px;
}

.erp-detail-item p {
  margin: 0;
  font-size: var(--erp-type-body);
  font-weight: 600;
  color: var(--erp-text);
}

.erp-detail-section {
  margin-bottom: 32px;
}

.erp-detail-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.erp-detail-group .erp-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}


/* ══════════════════════════════════════════════════════
   SPA SCREEN VISIBILITY
══════════════════════════════════════════════════════ */
.erp-screen {
  display: none;
  animation: fadeIn .3s ease;
}

.erp-screen.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

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

/* ══════════════════════════════════════════════════════
   TOOLTIP (collapsed sidebar)
══════════════════════════════════════════════════════ */
.erp-tooltip-custom {
  position: fixed;
  background: var(--erp-secondary);
  color: #fff;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: var(--erp-type-sm);
  font-weight: 600;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity .15s;
  white-space: nowrap;
  box-shadow: var(--erp-shadow-md);
  letter-spacing: .01em;
}

.erp-tooltip-custom.show {
  opacity: 1;
}

/* ══════════════════════════════════════════════════════
   MOBILE OVERLAY
══════════════════════════════════════════════════════ */
.erp-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  z-index: 1035;
  backdrop-filter: blur(2px);
}

.erp-overlay.show {
  display: block;
}

/* Shared helpers */
.erp-surface-muted {
  background: var(--erp-bg);
}

.erp-text-strong {
  color: var(--erp-text);
}

.erp-text-soft {
  color: var(--erp-text-muted);
}

.erp-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: var(--erp-type-sm);
  font-weight: 700;
  letter-spacing: .02em;
  border: 1px solid var(--erp-border);
  background: #fff;
  color: var(--erp-text-muted);
}

.erp-btn-loading {
  position: relative;
  pointer-events: none;
  opacity: .88;
}

.erp-btn-loading::after {
  content: '';
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  animation: spin .8s linear infinite;
}

.erp-btn-loading.erp-btn-outline::after {
  border-color: rgba(30, 58, 95, .22);
  border-top-color: var(--erp-secondary);
}

.erp-validation {
  display: none;
  margin-top: 6px;
  font-size: var(--erp-type-sm);
  color: var(--erp-danger);
}

.erp-invalid .erp-form-control,
.erp-invalid .erp-form-select {
  border-color: var(--erp-danger);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, .08);
}

.erp-invalid .erp-validation {
  display: block;
}

.erp-valid .erp-form-control,
.erp-valid .erp-form-select {
  border-color: var(--erp-success);
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════ */
@media (max-width: 1199px) {
  .erp-header-select.branch-select,
  .erp-school-picker.branch-select {
    display: none;
  }
}

@media (max-width: 991px) {
  .erp-sidebar {
    transform: translateX(-100%);
    width: var(--erp-sidebar-w) !important;
  }

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

  .erp-submenu-panel {
    left: 0 !important;
    transform: translateX(-100%);
    width: 280px;
    z-index: 1045;
    box-shadow: var(--erp-shadow-lg);
  }

  .erp-submenu-panel.mobile-open {
    transform: translateX(0);
  }

  .erp-main {
    margin-left: 0 !important;
    padding: 20px 20px 28px !important;
  }

  .erp-header {
    left: 0 !important;
  }

  .erp-global-search {
    max-width: none;
  }

  .erp-user-info {
    display: none;
  }
}

/* ══════════════════════════════════════════════════════
   CONFIG SIDEBAR MENU
══════════════════════════════════════════════════════ */
.erp-sidebar-menu {
  background: var(--erp-surface);
  border-radius: var(--erp-radius);
  padding: 1.5rem;
  box-shadow: var(--erp-shadow-sm);
}

.erp-sidebar-section {
  margin-bottom: 1.5rem;
}

.erp-sidebar-section:last-child {
  margin-bottom: 0;
}

.erp-sidebar-title {
  font-size: var(--erp-type-sm);
  font-weight: 700;
  color: var(--erp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
  padding: 0 0.5rem;
}

.erp-sidebar-nav {
  list-style: none;
  margin: 0;
}

.erp-sidebar-item {
  margin-bottom: 0.25rem;
}

.erp-sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--erp-radius-xs);
  color: var(--erp-text);
  text-decoration: none;
  font-size: var(--erp-type-body);
  font-weight: 500;
  transition: var(--erp-transition);
}

.erp-sidebar-link i {
  font-size: var(--erp-type-section-title);
  color: var(--erp-text-muted);
  transition: var(--erp-transition);
}

.erp-sidebar-link:hover {
  background: var(--erp-bg);
  color: var(--erp-primary);
}

.erp-sidebar-link:hover i {
  color: var(--erp-primary);
}

.erp-sidebar-item.active .erp-sidebar-link {
  background: var(--erp-primary);
  color: white;
}

.erp-sidebar-item.active .erp-sidebar-link i {
  color: white;
}

/* ══════════════════════════════════════════════════════
   PERMISSION MATRIX
══════════════════════════════════════════════════════ */
.permission-matrix-card {
  background: var(--erp-surface);
  border-radius: var(--erp-radius);
  padding: 2rem;
  box-shadow: var(--erp-shadow-sm);
}

.permission-section-header {
  margin-bottom: 1.5rem;
}

.permission-section-title {
  font-size: var(--erp-type-heading-3);
  font-weight: 600;
  color: var(--erp-text);
  margin-bottom: 0.25rem;
}

.permission-section-subtitle {
  font-size: var(--erp-type-body);
  color: var(--erp-text-muted);
}

.permission-matrix-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.permission-matrix-table th {
  background: var(--erp-bg);
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: var(--erp-text-muted);
  font-size: var(--erp-type-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  border-bottom: 2px solid var(--erp-border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.permission-matrix-table th:first-child {
  text-align: left;
  min-width: 200px;
}

.permission-matrix-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--erp-border);
  text-align: center;
}

.permission-matrix-table td:first-child {
  font-weight: 500;
  color: var(--erp-text);
  text-align: left;
}

.permission-matrix-table tbody tr:hover {
  background: var(--erp-bg);
}

.permission-checkbox {
  width: 0.875rem;
  height: 0.875rem;
  cursor: pointer;
  accent-color: var(--erp-primary);
}

.permission-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
}

@media (max-width: 575px) {
  .erp-main {
    padding: 16px;
  }

  .erp-page-title {
    font-size: var(--erp-type-heading-2);
  }

  .erp-header-select {
    display: none;
  }

  .erp-card-body {
    padding: 16px;
  }

  .erp-card-header {
    padding: 14px 16px;
  }
}

/* ── Detail View Styles ── */
.detail-group {
  margin-bottom: 16px;
}

.detail-table td {
  font-size: var(--erp-type-caption);
  padding: 8px 12px !important;
  vertical-align: top;
}

.detail-table td:first-child {
  font-weight: 500;
}

.erp-card-footer {
  padding: 16px 24px;
  background-color: #fff;
  border-top: 1px solid #dee2e6;
}

/* ── Fee Concession Styles ── */
.fee-concession-item {
  margin-bottom: 24px;
}

.fee-fieldset {
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 0 16px 16px 16px;
  margin: 0 0 16px 0;
  background-color: #fff;
}

.fee-legend {
  float: none;
  width: auto;
  padding: 6px 16px;
  margin: 0 0 0 16px;
  font-size: var(--erp-type-body);
  font-weight: 500;
  color: oklch(21% .034 264.665);
  border: 1px solid #dee2e6;
  border-radius: 4px;
  background-color: #fff;
  line-height: 1.5;
}

.fee-concession-label {
  font-weight: 500;
  color: oklch(21% .034 264.665);
  font-size: var(--erp-type-body);
}

.fee-concession-item .form-check-input:focus {
  box-shadow: none;
  border-color: #dee2e6;
}

.fee-concession-item input[type="number"]:focus {
  outline: none;
  box-shadow: none;
  border-bottom: 1px solid #dee2e6 !important;
}

.fee-concession-item * {
  transition: none !important;
}

.fee-fieldset:hover {
  border-color: #dee2e6 !important;
  box-shadow: none !important;
}

.fee-fieldset .row {
  margin-left: 0;
  margin-right: 0;
  margin-top: 12px;
}

/* ── Approval Actions Section ── */
.approval-actions-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.approval-actions-header {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  align-items: center;
}

.approval-select-link {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
  transition: color 0.2s;
}

.approval-select-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.approval-actions-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.erp-badge-outline {
  border: 1.5px solid var(--primary);
  background: transparent;
  color: var(--primary);
  border-radius: 20px;
  padding: 8px 16px;
}

.approval-action-btn {
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  min-width: 95px;
}

.approval-action-btn:hover {
  background: var(--erp-primary-muted);
}

.approval-action-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text-white);
}

.approval-action-btn .bi-check-circle-fill {
  font-size: 14px;
  display: none;
}

.approval-action-btn.active .bi-check-circle-fill {
  display: inline-block;
}

/* ── Employee Scope Toggle ── */
.scope-toggle-btn {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  padding: 0;
  margin-left: 8px;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  transition: all 0.2s;
  position: relative;
}

.scope-toggle-btn:hover {
  opacity: 0.7;
  transform: scale(1.1);
}

.scope-toggle-btn i {
  font-size: 10px;
  transition: all 0.2s;
}

.scope-toggle-btn .bi-circle-fill {
  color: var(--primary);
}

.scope-toggle-btn .bi-globe {
  font-size: 12px;
  color: var(--primary);
}

/* Tooltip */
.scope-toggle-btn::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
  pointer-events: none;
  z-index: 1000;
}

/* Tooltip arrow */
.scope-toggle-btn::after {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #333;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
  pointer-events: none;
  z-index: 1000;
}

.scope-toggle-btn:hover::before,
.scope-toggle-btn:hover::after {
  opacity: 1;
  visibility: visible;
}

/* ── Remove Level Button ── */
.remove-level {
  padding: 0 !important;
  font-size: 18px !important;
  line-height: 1 !important;
  min-width: auto !important;
  border: none !important;
  background: none !important;
  color: #dc2626 !important;
}

.remove-level:hover {
  background: none !important;
  opacity: 0.7 !important;
}

.remove-level i {
  font-size: 18px;
  line-height: 1;
  color: #dc2626;
}

/* ── Add Level Button ── */
#addLevel {
  padding: 8px 16px !important;
  font-size: 14px !important;
}

#addLevel i {
  font-size: 14px;
}

/* ── Config Section ── */
.config-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.config-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.config-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0;
}

/* ── Toggle Switch ── */
.toggle-switch {
  position: relative;
  display: inline-block;
}

.toggle-input {
  display: none;
}

.toggle-label {
  display: block;
  width: 48px;
  height: 26px;
  background-color: #cbd5e1;
  border-radius: 26px;
  position: relative;
  cursor: pointer;
  transition: background-color 0.3s;
}

.toggle-label::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  background-color: #fff;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: transform 0.3s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-input:checked + .toggle-label {
  background-color: var(--primary);
}

.toggle-input:checked + .toggle-label::after {
  transform: translateX(22px);
}

/* ── Fee Structure Styles ── */
.fee-installment-fieldset {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0;
  margin: 0;
  background-color: #ffffff;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.installment-legend {
  float: none;
  width: auto;
  padding: 8px 16px;
  margin: 0 0 0 20px;
  font-size: var(--erp-type-caption);
  font-weight: 600;
  color: #1f2937;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background-color: #ffffff;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-delete-installment {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: var(--erp-type-heading-small);
  line-height: 1;
  margin-left: 8px;
}

.btn-add-installment {
  background: var(--primary-light);
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  font-size: var(--erp-type-caption);
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}

.btn-add-installment:hover {
  background: var(--primary-hover);
  color: #ffffff;
}

.btn-add-installment i {
  font-size: var(--erp-type-body);
}

.installment-content {
  padding: 20px;
  background: #fafbfc;
}

.fee-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

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

.fee-field-basic {
  /* Title and Due Date fields - no special styling needed */
}

.fee-field {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  transition: border-color 0.2s;
  min-width: 0;
}

.fee-field:hover {
  border-color: #d1d5db;
}

.fee-label {
  display: block;
  font-size: var(--erp-type-sm);
  font-weight: 500;
  color: #374151;
  margin-bottom: 8px;
}

.fee-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: var(--erp-type-body);
  background-color: #f9fafb;
  transition: all 0.2s;
}

.fee-input:focus {
  outline: none;
  border-color: var(--primary-light);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(1, 26, 90, 0.1);
}

.date-input-wrapper {
  position: relative;
  width: 100%;
}

.date-input-wrapper i {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
  font-size: var(--erp-type-section-title);
}

/* Fee Group Section Styling */
.fee-group-section {
  margin-bottom: 40px;
}


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

/* Responsive Grid */
@media (max-width: 1200px) {
  .fee-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .fee-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .fee-row-basic {
    grid-template-columns: 1fr;
  }
}

.amount-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.amount-input-wrapper .currency {
  font-size: var(--erp-type-section-title);
  font-weight: 600;
  color: #6b7280;
  flex-shrink: 0;
}

.amount-input-wrapper .fee-input {
  flex: 1;
  text-align: right;
}

.fee-icons {
  display: flex;
  gap: 8px;
  font-size: var(--erp-type-body);
  color: #6c757d;
}

.fee-icons i {
  cursor: pointer;
  transition: color 0.2s;
}

.fee-icons i:hover {
  color: #495057;
}

.fee-icons .bi-check-circle-fill {
  color: #28a745;
}

.fee-icons .bi-person-fill {
  color: #007bff;
}

.fee-icons .bi-people-fill {
  color: #6f42c1;
}

/* ── Fee Structure Show Styles ── */
.fee-structure-table {
  width: 100%;
}

.fee-table-header {
  display: grid;
  grid-template-columns: 2fr 1fr 3fr 1fr 60px;
  gap: 16px;
  padding: 12px 16px;
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
  font-size: var(--erp-type-xs);
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fee-section {
  border-bottom: 1px solid #e9ecef;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background-color: #fff;
}

.btn-expand {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: var(--erp-type-heading-3);
  color: #6f42c1;
}

.fee-row {
  display: grid;
  grid-template-columns: 2fr 1fr 3fr 1fr 60px;
  gap: 16px;
  padding: 20px 16px;
  border-bottom: 1px solid #e9ecef;
  align-items: start;
}

.col-title {
  font-size: var(--erp-type-body);
  font-weight: 500;
  color: #212529;
}

.col-due-date {
  font-size: var(--erp-type-body);
  color: #495057;
}

.col-fee {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fee-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}

.fee-icons i {
  color: #212529;
}

.fee-name {
  font-size: var(--erp-type-body);
  color: #495057;
}

.fee-amount {
  font-size: var(--erp-type-body);
  font-weight: 500;
  color: #212529;
  text-align: right;
}

.col-total {
  font-size: var(--erp-type-body-emphasis);
  font-weight: 600;
  color: #212529;
  text-align: right;
}

.col-actions {
  display: flex;
  justify-content: flex-end;
}

/* ── Tax Component Styles ── */
.tax-component-item {
  margin-bottom: 20px;
}

.tax-component-fieldset {
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 0;
  margin: 0;
  background-color: #fff;
}

.tax-component-legend {
  float: none;
  width: auto;
  padding: 8px 20px;
  margin: 0 0 0 20px;
  font-size: var(--erp-type-body);
  font-weight: 500;
  color: oklch(21% .034 264.665);
  border: 1px solid #dee2e6;
  border-radius: 4px;
  background-color: #fff;
  line-height: 1.5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.btn-delete-component {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: var(--erp-type-section-title);
  line-height: 1;
  display: flex;
  align-items: center;
}

.btn-delete-component:hover {
  opacity: 0.8;
}

.component-content {
  padding: 24px;
}

/* ══════════════════════════════════════════════════════════════════════════════
   SELECT2 DROPDOWN STYLES
   ══════════════════════════════════════════════════════════════════════════════ */


/* ══════════════════════════════════════════════════════════════════════════════
   CUSTOM SEARCHABLE DROPDOWN
   ══════════════════════════════════════════════════════════════════════════════ */

.custom-searchable-dropdown {
    position: relative;
    width: 100%;
}

.search-dropdown-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    font-size: var(--erp-type-body);
}

.search-dropdown-input:focus {
    outline: none;
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.dropdown-list-container {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    margin-top: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 300px;
    overflow: hidden;
}

.dropdown-list-container.show {
    display: block;
}

.dropdown-label {
    padding: 12px 16px;
    font-size: var(--erp-type-body);
    color: #6c757d;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.dropdown-options {
    max-height: 250px;
    overflow-y: auto;
}

.dropdown-option {
    padding: 10px 16px;
    cursor: pointer;
    font-size: var(--erp-type-body);
    color: #212529;
    border-bottom: 1px solid #f1f3f5;
}

.dropdown-option:hover {
    background-color: #e9ecef;
}

.dropdown-option.selected {
    background-color: #0d6efd;
    color: white;
}

.dropdown-option:last-child {
    border-bottom: none;
}

.dropdown-option.hidden {
    display: none;
}

/* ══════════════════════════════════════════════════════════════════════════════
   FEE ICON TOOLTIPS
   ══════════════════════════════════════════════════════════════════════════════ */

.fee-icon-tooltip {
    position: relative;
    cursor: pointer;
}

.fee-icon-tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    background-color: #333;
    color: white;
    font-size: var(--erp-type-sm);
    white-space: nowrap;
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    pointer-events: none;
    z-index: 1000;
    margin-bottom: 5px;
}

.fee-icon-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    pointer-events: none;
    z-index: 1000;
}

.fee-icon-tooltip:hover::before,
.fee-icon-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ══════════════════════════════════════════════════════════════════════════════
   FEE ICONS VISIBILITY
   ══════════════════════════════════════════════════════════════════════════════ */

.fee-icons {
    display: flex;
    gap: 6px;
    align-items: center;
}

.fee-icons i {
    font-size: var(--erp-type-body);
    color: #6c757d;
}

.fee-icons .bi-check-circle-fill {
    color: #22c55e;
}

.fee-icons .bi-circle {
    color: #94a3b8;
}

.fee-icons .bi-mortarboard-fill {
    color: #3b82f6;
}

.fee-icons .bi-people-fill {
    color: #8b5cf6;
}

/* ══════════════════════════════════════════════════════════════════════════════
   FEE ICONS - BLACK COLOR WITH TOOLTIPS
   ══════════════════════════════════════════════════════════════════════════════ */

/* Override previous icon colors - all black */
.fee-icons i {
    color: #000000 !important;
    font-size: var(--erp-type-section-title);
    font-weight: 900;
    cursor: pointer;
    position: relative;
}

/* Custom tooltip styling */
.has-tooltip {
    position: relative;
}

.has-tooltip:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    background-color: #000;
    color: #fff;
    font-size: var(--erp-type-sm);
    white-space: nowrap;
    border-radius: 4px;
    margin-bottom: 5px;
    z-index: 1000;
    font-family: var(--erp-font-family);
}

.has-tooltip:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #000;
    z-index: 1000;
}

/* Remove default browser tooltip */
.has-tooltip[title] {
    pointer-events: auto;
}

/* ══════════════════════════════════════════════════════════════════════════════
   FEE ICONS - STABLE ON HOVER WITH TOOLTIPS
   ══════════════════════════════════════════════════════════════════════════════ */

/* Reset previous tooltip styles */
.has-tooltip:hover::after,
.has-tooltip:hover::before,
.fee-icon-tooltip::before,
.fee-icon-tooltip::after {
    display: none !important;
}

/* Icon wrapper for stable tooltips */
.icon-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.icon-wrapper i {
    color: #000000;
    font-size: var(--erp-type-section-title);
    font-weight: 900;
    display: block;
    pointer-events: none;
}

/* Tooltip on wrapper - doesn't affect icon */
.icon-wrapper::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    background-color: #1a1a1a;
    color: #ffffff;
    font-size: var(--erp-type-xs);
    white-space: nowrap;
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 1000;
    pointer-events: none;
    font-family: var(--erp-font-family);
    font-weight: 400;
}

.icon-wrapper::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 3px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1a1a1a;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 1000;
    pointer-events: none;
}

.icon-wrapper:hover::after,
.icon-wrapper:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Ensure fee-icons container spacing */
.fee-icons {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

/* ══════════════════════════════════════════════════════════════════════════════
   FEE STRUCTURE TABLE HEADER - REDUCED SIZE
   ══════════════════════════════════════════════════════════════════════════════ */

.fee-table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 3fr 1fr;
    gap: 16px;
    padding: 12px 16px;
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    font-size: var(--erp-type-xs);
    letter-spacing: 0.5px;
    color: #6c757d;
    text-transform: uppercase;
}

.fee-table-header > div {
    font-size: var(--erp-type-xs);
    font-weight: 600;
}

/* ══════════════════════════════════════════════════════════════════════════════
   ADD FEE INSTALLMENT MODAL
   ══════════════════════════════════════════════════════════════════════════════ */

.fee-heads-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.fee-head-item {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px;
    background: #f8f9fa;
}

.fee-head-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.fee-head-name {
    font-size: var(--erp-type-caption);
    font-weight: 500;
    color: #212529;
    flex: 1;
    line-height: 1.4;
}

.fee-head-icons {
    display: flex;
    gap: 6px;
    align-items: center;
}

.fee-head-icons i {
    font-size: var(--erp-type-section-title);
    font-weight: 900;
    color: #000000;
    cursor: pointer;
    transition: color 0.2s;
}

.icon-toggle {
    cursor: pointer;
    position: relative;
    font-size: var(--erp-type-section-title);
    font-weight: 900;
    color: #000000;
}

.icon-toggle.active {
    color: #000000;
}

.fee-head-amount {
    display: flex;
    align-items: center;
    gap: 8px;
}

.currency-symbol {
    font-size: var(--erp-type-body);
    font-weight: 600;
    color: #6c757d;
}

.amount-input {
    flex: 1;
    padding: 6px 10px;
    font-size: var(--erp-type-body);
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.amount-input:focus {
    outline: none;
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

@media (max-width: 1200px) {
    .fee-heads-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .fee-heads-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================================
   FOOTER STYLES
   ============================================================================ */

.erp-footer {
    margin-top: auto;
    padding: 10px 0;
}

.erp-footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: var(--erp-type-body);
    color: #000000;
}

.erp-footer-divider {
    color: #000000;
}

.erp-footer-content .text-danger {
    color: var(--danger) !important;
    font-size: var(--erp-type-sm);
}

@media (max-width: 576px) {
    .erp-footer-content {
        flex-direction: column;
        gap: 8px;
    }

    .erp-footer-divider {
        display: none;
    }
}

/* ============================================================================
   FIELDSET STYLES
   ============================================================================ */

.erp-fieldset {
    border: 1.5px solid #E5E7EB !important;
    border-radius: 8px;
    padding: 20px;
    margin: 0;
    min-width: 0;
}

.erp-legend {
    float: none;
    width: auto;
    padding: 0 10px;
    margin: 0 0 0 -5px;
    font-size: var(--erp-type-body);
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    border: none;
    background: #ffffff;
}

/* Remove underlines from form elements */
.erp-fieldset input,
.erp-fieldset textarea,
.erp-fieldset select {
    text-decoration: none;
}

/* ── View Toggle Button Active State ── */
.erp-btn-icon-rounded.active {
    background-color: var(--erp-primary, #0066cc);
    color: white;
}

.erp-btn-icon-rounded.active i {
    color: white;
}

/* ── Column Visibility Checkbox Styling ── */
.column-toggle:checked {
    background-color: var(--erp-primary, #18307C);
    border-color: var(--erp-primary, #18307C);
}

.column-toggle:focus {
    border-color: var(--erp-primary, #18307C);
    box-shadow: 0 0 0 0.25rem rgba(24, 48, 124, 0.25);
}

/* ══════════════════════════════════════════════════════
   STUDENT PROFILE
══════════════════════════════════════════════════════ */
.student-profile-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 20px;
    align-items: stretch;
}

.student-profile-nav,
.student-profile-content {
    background: #fff;
    border: 1px solid #e1e7ee;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(28, 45, 67, .04);
}

.student-profile-nav {
    overflow: hidden;
    border: 0;
    border-radius: 7px;
    background: #050505;
    color: #fff;
    max-width: 220px;
    min-width: 220px;
    width: 220px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: flex;
    flex-direction: column;
}

.student-profile-cover {
    height: 180px;
    background: url('/img/user-cover.jpeg') center center/cover no-repeat;
    position: relative;
}

.student-profile-avatar {
    width: 130px;
    height: 130px;
    position: absolute;
    left: 50%;
    bottom: -65px;
    transform: translateX(-50%);
    border: 8px solid #fff;
    border-radius: 50%;
    background: #f1eafb;
    font-size: var(--erp-type-display);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.student-profile-avatar img {
    border-radius: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.student-profile-info {
    padding: 80px 20px 20px;
    text-align: center;
    background: #050505;
}

.student-profile-name,
.erp-title {
    margin: 0 0 10px;
    font-size: var(--erp-type-body-emphasis);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

.student-profile-class,
.erp-subtitle {
    margin: 0 0 8px;
    font-size: var(--erp-type-caption);
    font-weight: 500;
    line-height: 1.4;
    white-space: normal;
    overflow: visible;
}

.student-profile-code {
    margin: 0 0 10px;
    color: #fff;
    line-height: 1.55;
    font-size: var(--erp-type-body);
    font-weight: 400;
}

.student-profile-phone,
.erp-text {
    margin: 0;
    font-size: var(--erp-type-caption);
    font-weight: 400;
    line-height: 1.5;
}

.student-profile-phone i {
    margin-right: 6px;
}

.student-profile-wallet {
    margin: 8px 0 0;
    color: #34d399;
    font-size: var(--erp-type-body-emphasis);
    font-weight: 700;
    line-height: 1.5;
}

.student-profile-menu {
    padding: 12px 18px 18px;
    overflow: visible;
}

.student-profile-menu a {
    border-radius: 0;
    background: transparent;
    color: #fff;
    padding: 12px 4px;
    font-size: var(--erp-type-body-emphasis);
    font-weight: 400;
    display: flex;
    justify-content: space-between;
    align-items: center;
    line-height: 1.5;
    text-decoration: none;
    transition: all 0.2s ease;
}

.student-profile-menu a:hover {
    color: #fff;
}

.student-profile-menu a.active {
    font-weight: 600;
    color: #fff;
}

.student-profile-menu i {
    color: #ffffff;
    margin-left: auto;
    opacity: 1;
    font-size: 18px;
}

/* Fix for accordion/card elements inside sidebar - prevent expansion */
.student-profile-nav .accordion,
.student-profile-nav .card,
.student-profile-nav .accordion-item,
.student-profile-nav .accordion-button,
.student-profile-nav .accordion-body {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
}

.student-profile-nav * {
    box-sizing: border-box;
}

.student-profile-content {
    min-height: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.student-profile-content .erp-breadcrumb {
    margin: 0 0 18px;
    padding: 0;
    background: transparent;
    font-size: var(--erp-type-body);
}

.student-profile-header {
    min-height: 56px;
    padding: 0 0 14px;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}


.student-profile-header p {
    display: none;
}

.student-profile-body {
    min-height: auto;
    padding: 16px;
    border-radius: 9px;
    background: #fff;
}

.profile-section + .profile-section {
    margin-top: 23px;
    padding-top: 21px;
    border-top: 1px solid #edf0f4;
}

.profile-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    color: #294866;
    font-size: var(--erp-type-sm);
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    line-height: 1.4;
}

.profile-section-title:after {
    content: '';
    height: 1px;
    flex: 1;
    background: #edf0f4;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 19px 24px;
}

.profile-field label {
    display: block;
    color: #6f7b8e;
    font-size: 15px;
    text-transform: none;
    font-weight: 600;
    line-height: 1.4;
}

.profile-field label .bi-pencil-square {
    color: var(--erp-primary);
    font-size: var(--erp-type-body);
    transition: color 0.2s ease;
}

.profile-field label .btn-link:hover .bi-pencil-square {
    color: var(--erp-primary-dark);
}

.profile-field p {
    margin: 3px 0 0;
    color: #202a3a;
    font-size: var(--erp-type-body-emphasis);
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.profile-field.wide {
    grid-column: span 2;
}

.profile-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 14px;
    background: #eaf4ef;
    color: #187450;
    font-size: var(--erp-type-micro);
    font-weight: 700;
}

.old-profile-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 24px;
}

.contact-profile-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px 38px;
}

.profile-full {
    grid-column: 1 / -1;
}

.profile-form-grid,
.profile-address-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px 26px;
}

.profile-form-wide {
    grid-column: span 2;
}

.profile-name-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.profile-form-field > label {
    display: block;
    margin-bottom: 7px;
    color: #374357;
    font-size: var(--erp-type-caption);
    font-weight: 600;
    line-height: 1.4;
}

.fee-amount-input {
    display: flex;
    align-items: center;
    height: 42px;
    border: 1.5px solid var(--erp-border);
    border-radius: var(--erp-radius-sm);
    background: #fff;
    padding: 0 14px;
    gap: 4px;
    transition: var(--erp-transition);
}

.fee-amount-input:focus-within {
    border-color: var(--erp-secondary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .1);
}

.fee-amount-input:has(> input.is-invalid) {
    border-color: #dc3545;
}

.fee-amount-input > span {
    color: var(--erp-text-muted);
    font-size: var(--erp-type-body);
}

.fee-amount-input > input.erp-form-control {
    height: 100%;
    border: none;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.fee-amount-input > input.erp-form-control:focus {
    outline: none;
    box-shadow: none;
}

.profile-radio-list {
    display: flex;
    gap: 18px;
    min-height: 36px;
    align-items: center;
    font-size: var(--erp-type-body);
    line-height: 1.5;
}

.profile-address-fieldset {
    margin-top: 26px;
    padding: 14px 10px 10px;
    border: 1px solid #dce2e9;
    border-radius: 6px;
}

.profile-address-fieldset legend {
    float: none;
    width: auto;
    margin: 0;
    padding: 0 8px;
    color: #26344a;
    font-size: var(--erp-type-caption);
    font-weight: 650;
    line-height: 1.4;
}

.same-address-toggle {
    display: flex;
    max-width: 480px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    font-size: var(--erp-type-caption);
    line-height: 1.5;
}

.profile-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 28px;
}

.student-table-card {
    border: 1px solid #e3e9f0;
    border-radius: 10px;
    overflow: hidden;
}

.student-table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    border-bottom: 1px solid #e7edf2;
}


.student-data-table {
    width: 100%;
    border-collapse: collapse;
}

.student-data-table th {
    background: #f7f9fb;
    padding: 11px 14px;
    text-align: left;
    line-height: 1.4;
}

.student-data-table td {
    border-top: 1px solid #edf1f5;
    padding: 12px 14px;
}

.student-empty {
    display: grid;
    min-height: 265px;
    place-items: center;
    padding: 25px;
    text-align: center;
}

.student-empty i {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    margin: 0 auto 11px;
    border-radius: 15px;
    background: #eef3f8;
    color: #61758b;
    font-size: var(--erp-type-heading-2);
}


.student-empty p {
    color: #8390a0;
    font-size: var(--erp-type-caption);
    margin: 5px 0 0;
    line-height: 1.5;
}

.student-note {
    padding: 11px 13px;
    border: 1px solid #dce8f4;
    border-radius: 8px;
    background: #f2f8fe;
    color: #4a6784;
    font-size: var(--erp-type-caption);
    line-height: 1.5;
}

.field-error {
    display: block;
    margin-top: 4px;
    color: #dc3545;
    font-size: var(--erp-type-sm);
    line-height: 1.4;
}

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

    .student-profile-nav {
        position: static;
    }

    .student-profile-menu {
        display: flex;
        max-height: none;
        overflow-x: auto;
    }

    .student-profile-menu a {
        white-space: nowrap;
    }
}

@media (max-width: 700px) {
    .profile-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .student-profile-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-field.wide {
        grid-column: span 2;
    }

    .old-profile-grid,
    .contact-profile-grid,
    .profile-form-grid,
    .profile-address-grid,
    .profile-name-grid {
        grid-template-columns: 1fr;
    }

    .profile-form-wide {
        grid-column: auto;
    }
}

/* ===================================
   Filter Panel Styles
   =================================== */

.erp-filter-panel {
    font-size: var(--erp-type-body);
}

.erp-filter-label {
    font-size: var(--erp-type-body);
    margin-bottom: 0.5rem;
}

.erp-filter-input,
.erp-filter-select {
    font-size: var(--erp-type-body);
    height: 38px;
}

.erp-filter-btn-cancel {
    background-color: #dc2626;
    color: white;
    border: 1px solid #dc2626;
    font-size: var(--erp-type-body);
}

.erp-filter-btn-cancel:hover {
    background-color: #b91c1c;
    border-color: #b91c1c;
}

.erp-filter-btn-primary {
    font-size: var(--erp-type-body);
}

.erp-filter-hidden {
    display: none !important;
}

.erp-filter-visible {
    display: block !important;
}

/* ── Enquiry Detail Section ── */
.erp-enquiry-detail-section {
    background-color: #f8f9fa;
}

.erp-enquiry-field {
    margin-bottom: 1.5rem;
}

.erp-enquiry-field-label {
    color: #6c757d;
    font-size: var(--erp-type-body);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.erp-enquiry-field-value {
    color: #212529;
    font-size: var(--erp-type-body-emphasis);
    font-weight: 400;
}

.erp-enquiry-guardian-box {
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: white;
}

.erp-enquiry-guardian-header {
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.erp-enquiry-guardian-title {
    color: #212529;
    font-size: var(--erp-type-body-emphasis);
    font-weight: 600;
}

.erp-enquiry-guardian-legend {
    background-color: #f8f9fa;
    padding: 0.5rem 1rem;
    font-size: var(--erp-type-body-emphasis);
    font-weight: 600;
    color: #212529;
    width: auto;
    margin-left: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

/* ── Guardian Fieldset Style ── */
.erp-enquiry-guardian-fieldset {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 0;
    background: white;
}

.erp-enquiry-guardian-legend {
    background-color: white;
    padding: 0 0.75rem;
    font-size: var(--erp-type-section-title);
    font-weight: 600;
    color: #212529;
    width: auto;
    float: none;
}

/* ── Enquiry Detail Page Styles ── */
.erp-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #dee2e6;
}

.erp-detail-row:last-child {
    border-bottom: 1px solid #dee2e6;
}

.erp-detail-row .label {
    font-size: var(--erp-type-caption);
    color: #6c757d;
    font-weight: 500;
    line-height: 1.4;
}

.erp-detail-row .value {
    font-size: var(--erp-type-body);
    color: #212529;
    font-weight: 400;
    text-align: right;
    line-height: 1.4;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

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

.erp-collapse-toggle {
    background: none;
    border: none;
    padding: 0;
    color: var(--erp-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--erp-type-section-title);
    font-weight: 600;
    transition: all 0.2s;
}

.erp-collapse-toggle:hover {
    color: var(--erp-primary);
}

.erp-collapse-toggle i {
    font-size: var(--erp-type-section-title);
    transition: transform 0.2s;
}

.erp-collapse-toggle[aria-expanded="true"] i {
    transform: rotate(90deg);
}


.erp-card-body {
    padding: 1rem;
}


/* ===========================
   Assign Program Incharge - Redesigned to Match Old ERP
   =========================== */

/* Main Container */
.erp-assign-container {
  background: white;
  border-radius: var(--erp-radius);
  padding: 2rem;
  box-shadow: var(--erp-shadow-sm);
}

/* Top Header Section */
.erp-assign-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--erp-border);
}

.erp-assign-main-title {
  font-size: var(--erp-type-heading-2);
  font-weight: 600;
  color: var(--erp-text);
  margin: 0;
}

.erp-assign-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.erp-assign-datepicker {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 1rem;
  border: 1px solid var(--erp-border);
  border-radius: 8px;
  background: white;
}

.erp-assign-datepicker i {
  color: var(--erp-text-muted);
  font-size: var(--erp-type-heading-small);
}

.erp-assign-datepicker-input {
  border: none;
  outline: none;
  font-size: var(--erp-type-body);
  color: var(--erp-text);
  background: transparent;
  width: 110px;
  cursor: pointer;
}

/* Grid Layout for Two Sections */
.erp-assign-grid {
  display: grid;
  grid-template-columns: 2.2fr 1px 1fr;
  gap: 2rem;
}

.erp-assign-divider {
  background: var(--erp-border);
  width: 1px;
}

/* Section Styles */
.erp-assign-section {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--erp-border);
  border-radius: 10px;
  padding: 1.25rem;
  background: white;
}

.erp-assign-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.erp-assign-section-title {
  font-size: var(--erp-type-heading-small);
  font-weight: 600;
  color: var(--erp-text);
  margin: 0 0 0.25rem 0;
}

.erp-assign-section-subtitle {
  font-size: var(--erp-type-caption);
  color: var(--erp-text-muted);
  margin: 0;
}

.erp-assign-visibility-btn {
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  border-radius: 6px;
  color: var(--erp-text-light);
  transition: all 0.2s ease;
  font-size: var(--erp-type-heading-small);
}

.erp-assign-visibility-btn:hover {
  background: var(--erp-primary-muted);
  color: var(--erp-primary);
}

/* Search Box */
.erp-assign-search-box {
  position: relative;
  margin-bottom: 1.25rem;
}

.erp-assign-search-box i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--erp-text-muted);
  font-size: var(--erp-type-body);
}

.erp-assign-search-box input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border: 1px solid var(--erp-border);
  border-radius: 8px;
  font-size: var(--erp-type-body);
  color: var(--erp-text);
  background: white;
  transition: all 0.2s ease;
}

.erp-assign-search-box input:focus {
  outline: none;
  border-color: var(--erp-primary);
  box-shadow: 0 0 0 3px var(--erp-primary-muted);
}

/* List Wrapper */
.erp-assign-list-wrapper {
  flex: 1;
  overflow-y: auto;
  max-height: 500px;
  padding-right: 0.25rem;
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
.erp-assign-list-wrapper::-webkit-scrollbar {
  width: 6px;
}

.erp-assign-list-wrapper::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 10px;
}

.erp-assign-list-wrapper::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 10px;
  transition: background 0.2s ease;
}

.erp-assign-list-wrapper::-webkit-scrollbar-thumb:hover {
  background: #9CA3AF;
}

/* Firefox */
.erp-assign-list-wrapper {
  scrollbar-width: thin;
  scrollbar-color: #D1D5DB transparent;
}

/* Program Item Styles */
.erp-program-item {
  margin-bottom: 0.75rem;
}

.erp-program-fieldset {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 0;
  margin: 0;
  background-color: #fff;
}

.erp-program-legend {
  float: none;
  width: auto;
  padding: 6px 16px;
  margin: 0 0 0 16px;
  font-size: var(--erp-type-body);
  font-weight: 600;
  color: var(--erp-text);
  border: 1px solid #dee2e6;
  border-radius: 6px;
  background-color: #fff;
}

.erp-drop-area {
  border: 2px dashed #D1D5DB;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  background: #FAFBFC;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  text-align: center;
  transition: all 0.2s ease;
  margin: 0.75rem;
  min-height: 70px;
}

.erp-drop-area i {
  font-size: var(--erp-type-heading-2);
  color: #D1D5DB;
  margin-bottom: 0;
}

.erp-drop-text {
  font-weight: 500;
  color: var(--erp-text-muted);
  font-size: var(--erp-type-caption);
  line-height: 1.2;
}

.erp-drop-hint {
  font-size: var(--erp-type-xs);
  color: var(--erp-text-light);
  line-height: 1.2;
}

.erp-drop-area.erp-drop-active {
  border-color: var(--erp-primary);
  border-style: solid;
  background: var(--erp-primary-muted);
}

/* Assigned Display Styles */
.erp-assigned-display {
  padding: 0.875rem;
  margin: 0.75rem;
  background: linear-gradient(135deg, rgba(24, 48, 124, 0.05) 0%, rgba(60, 199, 255, 0.05) 100%);
  border: 2px solid var(--erp-primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  position: relative;
}

.erp-assigned-employee {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.erp-assigned-avatar-wrapper img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.erp-assigned-info {
  flex: 1;
}

.erp-assigned-name {
  font-weight: 600;
  color: var(--erp-text);
  font-size: var(--erp-type-body-emphasis);
  margin-bottom: 0.25rem;
}

.erp-assigned-meta {
  font-size: var(--erp-type-caption);
  color: var(--erp-text-muted);
  line-height: 1.4;
}

.erp-assigned-remove {
  background: white;
  border: none;
  color: var(--erp-danger);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  font-size: var(--erp-type-body);
}

.erp-assigned-remove:hover {
  background: var(--erp-danger);
  color: white;
}

/* Employee Item Styles */
.erp-employee-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: white;
  border: 1px solid var(--erp-border);
  border-radius: 10px;
  margin-bottom: 1rem;
  cursor: grab;
  transition: all 0.2s ease;
}

.erp-employee-item:active {
  cursor: grabbing;
}

.erp-employee-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.erp-employee-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.erp-employee-info {
  flex: 1;
}

.erp-employee-name {
  font-weight: 600;
  color: var(--erp-text);
  font-size: var(--erp-type-body);
  margin-bottom: 0.25rem;
}

.erp-employee-id {
  font-weight: 400;
  color: var(--erp-text-muted);
  margin-left: 0.25rem;
}

.erp-employee-meta {
  font-size: var(--erp-type-sm);
  color: var(--erp-text-muted);
  line-height: 1.4;
}

.erp-employee-drag {
  color: var(--erp-text-light);
  font-size: var(--erp-type-heading-small);
  flex-shrink: 0;
}

/* Assigned Box Styles */
.erp-assigned-box {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  flex: 1;
}

.erp-assigned-box .erp-program-badge {
  background: white;
  border: 1px solid var(--erp-border);
  border-radius: 8px;
  padding: 0.875rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  max-width: 120px;
  flex-shrink: 0;
}

.erp-assigned-wrapper {
  border: 2px solid var(--erp-primary);
  border-radius: 8px;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
  flex: 1;
  display: flex;
  align-items: center;
  position: relative;
  min-height: 120px;
}

.erp-assigned-content {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.erp-assigned-avatar-wrapper {
  flex-shrink: 0;
}

.erp-assigned-avatar-wrapper img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.erp-assigned-details {
  flex: 1;
}

.erp-assigned-name {
  font-weight: 600;
  color: var(--erp-text);
  font-size: var(--erp-type-body);
  margin-bottom: 0.25rem;
}

.erp-assigned-meta {
  font-size: var(--erp-type-caption);
  color: var(--erp-text-muted);
  line-height: 1.4;
}

.erp-assigned-remove {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: white;
  border: none;
  color: var(--erp-danger);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.erp-assigned-remove i {
  font-size: var(--erp-type-sm);
}

.erp-assigned-remove:hover {
  background: var(--erp-danger);
  color: white;
}

/* Responsive */
@media (max-width: 991px) {
  .erp-assign-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .erp-assign-divider {
    display: none;
  }

  .erp-assign-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

/* Employee Edit Form Styling */
.erp-form-section {
  padding: 1.5rem;
  border-bottom: 1px solid var(--erp-border);
}

.erp-form-section:last-of-type {
  border-bottom: none;
}

.erp-form-section-title {
  font-size: var(--erp-type-section-title);
  font-weight: 600;
  color: var(--erp-text);
  margin-bottom: 1.25rem;
}

.erp-form-actions {
  padding: 1.5rem;
  background: var(--erp-bg);
  border-top: 1px solid var(--erp-border);
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--erp-primary);
  box-shadow: 0 0 0 0.2rem rgba(24, 48, 124, 0.1);
}

.form-check-input:checked {
  background-color: var(--erp-primary);
  border-color: var(--erp-primary);
}

.form-check-input:focus {
  border-color: var(--erp-primary);
  box-shadow: 0 0 0 0.2rem rgba(24, 48, 124, 0.1);
}

/* Increase toggle button size */
.form-switch .form-check-input {
  width: 3.5em;
  height: 1.75em;
  min-width: 3.5em;
}

/* ============================================
   Permission Module Dropdown Styles
   ============================================ */

/* Module Dropdown Styling */
#moduleDropdown {
    min-width: 280px;
    max-height: 450px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    left: 0 !important;
    right: auto !important;
    padding: 0;
    overflow: hidden;
}

/* Search wrapper - fixed at top */
.dropdown-search-wrapper {
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.dropdown-search {
    position: relative;
    display: flex;
    align-items: center;
}

.dropdown-search i {
    position: absolute;
    left: 12px;
    color: #9ca3af;
    font-size: var(--erp-type-body);
}

.dropdown-search input {
    padding-left: 36px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: var(--erp-type-body);
}

.dropdown-search input:focus {
    border-color: var(--erp-primary);
    box-shadow: 0 0 0 3px var(--erp-primary-muted);
    outline: none;
}

/* Scrollable module list */
#moduleListContainer {
    max-height: 320px;
    overflow-y: auto;
}

#moduleListContainer::-webkit-scrollbar {
    width: 6px;
}

#moduleListContainer::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

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

#moduleListContainer::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.dropdown-divider {
    margin: 0;
}

.no-results {
    padding: 20px;
}

#moduleDropdown .dropdown-item {
    padding: 10px 16px;
    font-size: var(--erp-type-body);
    color: #374151;
    transition: all 0.2s ease;
    cursor: pointer;
}

#moduleDropdown .dropdown-item:hover {
    background: var(--erp-primary-muted);
    color: var(--erp-primary);
}

#moduleDropdown .dropdown-item.active {
    background: var(--erp-primary);
    color: #ffffff;
    font-weight: 500;
}

#moduleDropdown .dropdown-item.active:hover {
    background: var(--erp-primary-dark);
    color: #ffffff;
}

/* Selected Module Button Styling */
.erp-btn-icon-card.dropdown-toggle {
    min-width: 150px;
    justify-content: space-between;
    display: flex;
    align-items: center;
    gap: 8px;
}

.erp-btn-icon-card.dropdown-toggle #selectedModule {
    flex: 1;
    text-align: left;
}

.erp-btn-icon-card.dropdown-toggle::after {
    margin-left: auto;
}
/* ============================================
   Header Avatar Styles
   ============================================ */

.erp-user-avatar-img,
.erp-user-dropdown-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* ============================================
   Profile Page - Exact UI Match
   ============================================ */

/* Profile Page Title */
.profile-page-title {
    font-size: var(--erp-type-page-title);
    font-weight: 700;
    color: #111827;
    margin: 0 0 24px 0;
}

/* Profile Header Wrapper */
.profile-header-wrapper {
    background: #ffffff;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 0;
}

/* Cover Image */
.profile-cover-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.profile-cover-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Black Bar with Avatar, User Info, and Tabs */
.profile-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #000000;
    padding: 16px 32px;
    position: relative;
}

.profile-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Avatar Large */
.profile-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #ffffff;
    border: 4px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    flex-shrink: 0;
    margin-top: -60px;
}

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

/* User Info on Black Bar */
.profile-user-info {
    padding-top: 20px;
}

.profile-user-name {
    font-size: var(--erp-type-heading-3);
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.profile-user-email {
    font-size: var(--erp-type-body);
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    font-weight: 400;
}

/* Tabs on Black Bar */
.profile-tabs-bar {
    display: flex;
    gap: 4px;
    align-items: center;
}

.profile-tab-btn {
    padding: 10px 20px;
    border: none;
    background: #000000;
    color: #ffffff;
    font-size: var(--erp-type-body);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 6px;
    white-space: nowrap;
}

.profile-tab-btn:hover:not(.active) {
    background: #1a1a1a;
}

.profile-tab-btn.active {
    background: #f3f4f6;
    color: #111827;
}

/* Profile Content Area */
.profile-content-area {
    padding: 0;
    background: transparent;
}

.profile-tab-content {
    display: none;
}

.profile-tab-content.active {
    display: block;
}

/* Single Card Container */
.profile-single-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

/* Two Column Layout - Single Card */
.profile-two-column {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 0;
    padding: 0;
    background: #ffffff;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    border-top: none;
    overflow: hidden;
}

@media (max-width: 968px) {
    .profile-two-column {
        grid-template-columns: 1fr;
    }
}

/* Left Column - Plain Text Display with Divider */
.profile-info-display {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
}

.profile-info-row-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.profile-info-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-info-row label {
    font-size: var(--erp-type-sm);
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.profile-info-row p {
    font-size: var(--erp-type-body-emphasis);
    color: #111827;
    margin: 0;
    font-weight: 500;
}

/* Right Column - Edit Form */
.profile-edit-form {
    background: #ffffff;
    padding: 32px;
}

.profile-form-group {
    margin-bottom: 20px;
}

.profile-form-group label {
    display: block;
    font-size: var(--erp-type-body);
    font-weight: 500;
    color: #374151;
    margin-bottom: 10px;
}

/* Clean Input Style */
.profile-input-underline {
    width: 100%;
    padding: 10px 14px;
    font-size: var(--erp-type-body-emphasis);
    color: #111827;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-family: inherit;
    outline: none;
    box-shadow: none;
}

.profile-input-underline:focus {
    background: #ffffff;
    border-color: #18307C;
    outline: none;
    box-shadow: none;
}

.profile-input-underline::placeholder {
    color: #9ca3af;
}

/* Password Fields Row */
.password-fields-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 968px) {
    .password-fields-row {
        grid-template-columns: 1fr;
    }
}

.password-field-group {
    display: flex;
    flex-direction: column;
}

.password-field-group label {
    font-size: var(--erp-type-body);
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-icon-left {
    position: absolute;
    left: 12px;
    color: #9ca3af;
    font-size: var(--erp-type-section-title);
    pointer-events: none;
}

.password-input-field {
    width: 100%;
    padding: 10px 40px 10px 38px;
    font-size: var(--erp-type-body-emphasis);
    color: #111827;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-family: inherit;
    outline: none;
}

.password-input-field:focus {
    background: #ffffff;
    border-color: #18307C;
}

.password-toggle-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: var(--erp-type-section-title);
    cursor: pointer;
    transition: color 0.2s ease;
}

.password-toggle-icon:hover {
    color: #6b7280;
}

/* Form Actions */
.profile-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    padding-top: 24px;
}

/* Empty State */
.profile-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.profile-empty-state p {
    font-size: var(--erp-type-body-emphasis);
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-page-title {
        font-size: var(--erp-type-heading-2);
        margin-bottom: 16px;
    }

    .profile-header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 16px 20px;
    }

    .profile-header-left {
        width: 100%;
    }

    .profile-avatar-large {
        width: 90px;
        height: 90px;
        margin-top: -45px;
    }

    .profile-user-name {
        font-size: var(--erp-type-heading-small);
    }

    .profile-user-email {
        font-size: var(--erp-type-caption);
    }

    .profile-tabs-bar {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .profile-tab-btn {
        padding: 9px 16px;
        font-size: var(--erp-type-caption);
    }

    .profile-info-row-group {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .profile-info-display {
        padding: 24px;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }

    .profile-edit-form {
        padding: 24px;
    }

    .profile-form-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .profile-form-actions > div {
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }

    .profile-form-actions > div:first-child {
        justify-content: flex-start;
    }
}

/* ══════════════════════════════════════════════════════
   DASHBOARD
══════════════════════════════════════════════════════ */

/* Dashboard Grid Layout */
.dashboard-grid {
    display: grid;
    gap: 24px;
    padding: 0;
}

/* Dashboard Cards */
.dashboard-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

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

.dashboard-card-title {
    font-size: var(--erp-type-section-title);
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

/* Statistics Card */
.stats-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.stat-left {
    flex: 1;
}

.stat-number {
    font-size: var(--erp-type-display);
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
}

.stat-label {
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.stat-new {
    /* Typography removed - use ui-value class */
}

.stat-icon-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon-circle.green {
    background: #d1fae5;
    color: #10b981;
}

.stat-icon-circle.blue {
    background: #dbeafe;
    color: #3b82f6;
}

.stat-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0;
}

/* Progress Bars */
.progress-item {
    margin-bottom: 16px;
}

.progress-item:last-child {
    margin-bottom: 0;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: var(--erp-type-body);
}

.progress-label-left {
    color: #374151;
    font-weight: 500;
}

.progress-label-right {
    color: #6b7280;
}

.progress-bar-container {
    height: 8px;
    background: #f3f4f6;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
}

.progress-bar-fill.cyan {
    background: linear-gradient(90deg, var(--erp-primary) 0%, var(--erp-primary-dark) 100%);
}

.progress-bar-fill.blue {
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
}

/* Welcome Card Tabs */
.welcome-tabs {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
    border-bottom: 2px solid #f3f4f6;
}

.welcome-tab {
    padding: 12px 0;
    font-size: var(--erp-type-body);
    font-weight: 500;
    color: #6b7280;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.welcome-tab:hover {
    color: #1f2937;
}

.welcome-tab.active {
    color: var(--erp-primary);
    border-bottom-color: var(--erp-primary);
}

.welcome-content {
    display: none;
}

.welcome-content.active {
    display: block;
}

.feed-item {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid #f3f4f6;
}

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

.feed-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #6b7280;
    flex-shrink: 0;
}

.feed-text {
    flex: 1;
}


.feed-text p {
    font-size: var(--erp-type-caption);
    color: #6b7280;
    margin: 0;
}

.feed-time {
    font-size: var(--erp-type-sm);
    color: #9ca3af;
}

/* Calendar */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.calendar-month {
    font-size: var(--erp-type-section-title);
    font-weight: 600;
    color: #1f2937;
}

.calendar-nav {
    display: flex;
    gap: 8px;
}

.calendar-nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.calendar-nav-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

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

.calendar-day-header {
    text-align: center;
    font-size: var(--erp-type-sm);
    font-weight: 600;
    color: #6b7280;
    padding: 8px 0;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--erp-type-caption);
    color: #374151;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.calendar-day:hover {
    background: #f9fafb;
}

.calendar-day.other-month {
    color: #d1d5db;
}

.calendar-day.today {
    background: var(--erp-primary);
    color: white;
    font-weight: 600;
}

.calendar-day.has-event {
    position: relative;
}

.calendar-day.has-event::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--erp-primary);
}

/* Responsive Grid */
@media (min-width: 768px) {
    .dashboard-grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

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

/* ══════════════════════════════════════════════════════
   CAMPUS SELECTOR MODAL
══════════════════════════════════════════════════════ */
.campus-selector-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: flex-start;
    justify-content: center;
    z-index: 9999;
    padding-top: 100px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.campus-selector-overlay.active {
    display: flex;
    opacity: 1;
}

.campus-selector-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 32px;
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.campus-selector-overlay.active .campus-selector-modal {
    transform: scale(1);
}


.campus-selector-header p {
    font-size: var(--erp-type-body);
    color: #6b7280;
    margin: 0 0 24px 0;
}

.campus-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

/* Minimal View Styles */
.minimal-view {
    overflow-y: auto;
}

.minimal-layout {
    margin-left: 0 !important;
    padding-top: 0 !important;
}

.minimal-view .erp-main {
    max-width: 100%;
    padding: 20px;
    margin: 0;
}

/* Campus Selector Page Styles */
body.campus-selector-page {
    margin: 0;
    padding: 0;
    font-family: var(--erp-font-family);
    min-height: 100vh;
}

.campus-selector-container {
    width: 100%;
    max-width: 1400px;
    padding: 60px 40px;
    margin: 0 auto;
}

.campus-selector-header {
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.shortcut-page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 600px;
}

.shortcut-back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    padding: 8px 12px;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    color: #334155;
    background: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.shortcut-back-button:hover,
.shortcut-back-button:focus-visible {
    border-color: var(--erp-primary);
    color: var(--erp-primary);
    background: #f8fafc;
    outline: none;
}

.shortcut-back-button kbd {
    padding: 2px 6px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    color: inherit;
    background: #f1f5f9;
    box-shadow: 0 1px 0 #cbd5e1;
    font: inherit;
    font-size: var(--erp-type-xs);
}

.campus-search-wrapper {
    position: relative;
    margin-bottom: 24px;
    max-width: 400px;
}

.campus-search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: var(--erp-font-size-base);
    font-family: inherit;
    color: #1f2937;
    background: white;
    transition: border-color 0.2s ease;
}

.campus-search-input:focus {
    outline: none;
    border-color: #d1d5db;
}

.campus-search-input::placeholder {
    color: #9ca3af;
}


.campus-selector-header p {
    font-size: var(--erp-type-page-title);
    font-weight: 600;
    margin: 0;
    color: #1f2937;
}

.campus-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 30px;
}

.campus-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px 16px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.campus-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.campus-card:focus {
    outline: none !important;
    border: 2px solid var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(1, 26, 90, 0.1) !important;
}

.campus-card:active {
    outline: none;
    border: 1px solid #e5e7eb;
    box-shadow: none;
}

.campus-card-check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #10b981;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.campus-card.active .campus-card-check {
    display: flex;
}

.campus-card-name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #1f2937;
    line-height: 1.3;
    flex: 1;
}

@media (max-width: 1200px) {
    .campus-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .campus-selector-container {
        padding: 40px 20px;
    }

    .campus-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .campus-card {
        padding: 16px;
    }

    .campus-selector-header p {
        font-size: var(--erp-type-heading-2);
    }
}

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

/* Global Search Page Styles */
.global-search-page {
    max-width: 1400px;
    margin: 0 auto;
}

.global-search-header {
    margin-bottom: 32px;
}

.search-results-title {
    font-size: var(--erp-type-heading-2);
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
}

.shortcut-page-heading .search-results-title {
    margin-bottom: 0;
}

.search-query {
    color: #000000;
    font-weight: 600;
}

.global-search-input-wrapper {
    max-width: 600px;
    position: relative;
}

.global-search-input {
    width: 100%;
    padding: 12px 46px 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: var(--erp-font-size-base);
    font-family: inherit;
    color: #1f2937;
    background: white;
    transition: border-color 0.2s ease;
}

.global-search-clear {
    position: absolute;
    top: 50%;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #64748b;
    background: transparent;
    transform: translateY(-50%);
    cursor: pointer;
}

.global-search-clear:hover {
    color: #1f2937;
    background: #f1f5f9;
}

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

.search-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.search-column {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 16px;
}

.search-column-title {
    font-size: var(--erp-type-heading-small);
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 16px 0;
    padding-bottom: 0;
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-result-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 10px 12px;
    display: flex;
    gap: 12px;
}

.search-result-card.is-selected {
    background: var(--erp-primary-muted);
    border-color: var(--erp-primary);
}

.search-card-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: white;
}

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

.search-card-content {
    flex: 1;
    min-width: 0;
}

.search-card-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.3;
}

.search-external-link {
    text-decoration: none;
    color: #374151;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s ease;
}

.search-external-link:hover {
    color: var(--erp-primary);
}

.search-external-link i {
    font-size: var(--erp-type-body);
    font-weight: 700;
    -webkit-text-stroke: 0.5px currentColor;
}

.search-card-class {
    font-size: 0.8125rem;
    color: #6b7280;
    margin: 0 0 3px 0;
    line-height: 1.3;
}

.search-card-parent {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 4px;
    line-height: 1.3;
}

.search-card-parent i,
.search-card-class i {
    font-size: var(--erp-type-sm);
    color: #9ca3af;
}

.search-card-actions {
    display: flex;
    gap: 6px;
}

.search-card-actions a.is-selected,
.search-card-actions button.is-selected {
    outline: 2px solid var(--erp-primary);
    outline-offset: 1px;
}

.search-no-result {
    background: #dbeafe;
    border: 1px solid #93c5fd;
    border-radius: 8px;
    padding: 16px;
    color: #1e40af;
    font-size: var(--erp-type-body-emphasis);
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-no-result i {
    font-size: var(--erp-type-heading-3);
    flex-shrink: 0;
}

@media (max-width: 1024px) {
    .search-two-column {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .search-result-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .search-card-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .search-btn {
        flex: 1;
    }
}

.is-invalid + .select2-container .select2-selection,
.select2-container .select2-selection.is-invalid {
    border-color: #ef4444;
}

/* ==================== Select2 Searchable Dropdown Styles ==================== */

/* Main Select Field */
.select2-container--default .select2-selection--single {
    height: 42px !important;
    border: 1.5px solid var(--erp-border) !important;
    border-radius: var(--erp-radius-sm) !important;
    padding: 0 14px !important;
    background: #fff !important;
    font-size: var(--erp-font-size-base) !important;
    font-family: inherit !important;
}

.select2-container--default .select2-selection--single:hover {
    border-color: var(--erp-border-strong) !important;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--erp-primary) !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 40px !important;
    color: var(--erp-text) !important;
    /* Keep selected text clear of both the reset control and dropdown arrow. */
    padding: 0 58px 0 0 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 42px !important;
    width: 28px !important;
    right: 4px !important;
}

/* Select2 renders allowClear as a plain floating multiplication sign. Treat it
   as a proper icon control and align it consistently in every enhanced select. */
.select2-container--default .select2-selection--single .select2-selection__clear {
    position: absolute !important;
    top: 50% !important;
    right: 32px !important;
    z-index: 1;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin: 0 !important;
    padding: 0 !important;
    transform: translateY(-50%);
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--erp-text-muted);
    font-family: Arial, sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
}

.select2-container--default .select2-selection--single .select2-selection__clear:hover,
.select2-container--default .select2-selection--single .select2-selection__clear:focus-visible {
    background: var(--erp-primary-light);
    color: var(--erp-primary);
    outline: none;
}

/* Dropdown */
.select2-dropdown {
    border: 1.5px solid var(--erp-border) !important;
    border-radius: var(--erp-radius-sm) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Search */
.select2-search--dropdown {
    padding: 8px !important;
}

.select2-search--dropdown .select2-search__field {
    border: 1.5px solid var(--erp-border) !important;
    border-radius: var(--erp-radius-sm) !important;
    padding: 6px 10px !important;
    font-size: var(--erp-type-caption) !important;
}

.select2-search--dropdown .select2-search__field:focus {
    border-color: var(--erp-primary) !important;
}

/* Options */
.select2-results__option {
    padding: 8px 12px !important;
    font-size: var(--erp-type-caption) !important;
}

.select2-results__option--highlighted,
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #18307C !important;
    color: #fff !important;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #f1f5f9 !important;
}

.select2-container--default .select2-results__option[aria-selected=true].select2-results__option--highlighted {
    background-color: #18307C !important;
    color: #fff !important;
}

/* Validation */
.is-invalid + .select2-container .select2-selection {
    border-color: #ef4444 !important;
}


/* ===============================================
   Finance Reports Grid
   =============================================== */

.reports-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.reports-hero-text {
    flex: 1;
    min-width: 220px;
}

.reports-hero-subtitle {
    color: var(--erp-text-muted, #6B7280);
    margin: 4px 0 0;
    font-size: var(--erp-type-body);
}

.reports-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.reports-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 240px;
    padding: 9px 16px;
    background: #ffffff;
    border: 1px solid #E8EEF9;
    border-radius: 999px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.reports-search i {
    color: var(--erp-text-muted, #6B7280);
}

.reports-search input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    font-size: var(--erp-type-body);
    background: transparent;
}

#reportsFilterSelect + .select2-container {
    width: 190px !important;
}

#reportsFilterSelect + .select2-container .select2-selection--single {
    border-radius: 999px;
    border-color: #E8EEF9;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    height: 40px;
}

#reportsFilterSelect + .select2-container .select2-selection__rendered {
    line-height: 40px;
    font-weight: 600;
    font-size: .85rem;
}

#reportsFilterSelect + .select2-container .select2-selection__arrow {
    height: 40px;
}

@media (max-width: 640px) {
    .reports-search {
        width: 100%;
    }
}

.finance-reports-section {
    margin-bottom: 36px;
}

.finance-reports-section-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    /* border-bottom: 1px solid #E8EEF9; */
}

.finance-reports-section-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #EEF2FF;
    color: var(--erp-primary, #1E3A8A);
    font-size: 1.1rem;
}

.finance-reports-section-icon--info {
    background: #DBEAFE;
    color: #1D4ED8;
}

.finance-reports-section-icon--success {
    background: #D1FAE5;
    color: #15803D;
}

.finance-reports-section-title {
    font-size: var(--erp-type-heading-4, 1.05rem);
    font-weight: 700;
    color: var(--text-primary);
}

.finance-reports-section-subtitle {
    font-size: .82rem;
    color: var(--erp-text-muted, #6B7280);
    margin-top: 2px;
}

.reports-empty-search {
    text-align: center;
    padding: 48px 0;
    color: var(--erp-text-muted, #6B7280);
}

.reports-empty-search i {
    font-size: 1.8rem;
    display: block;
    margin-bottom: 8px;
}

.finance-reports-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    padding: 0;
}

@media (max-width: 1200px) {
    .finance-reports-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .finance-reports-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.finance-report-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px 20px;
    background: #ffffff;
    border: 1px solid #E8EEF9;
    border-radius: 14px;
    text-decoration: none;
    color: var(--text-primary);
    min-height: 110px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    position: relative;
    overflow: hidden;
}

.finance-report-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.finance-report-card::after {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(30, 58, 138, .05) 0%, transparent 70%);
    pointer-events: none;
}

.finance-report-card[data-accent="info"]::after {
    background: radial-gradient(circle, rgba(59, 130, 246, .06) 0%, transparent 70%);
}

.finance-report-card[data-accent="success"]::after {
    background: radial-gradient(circle, rgba(34, 197, 94, .06) 0%, transparent 70%);
}

a.finance-report-card {
    cursor: pointer;
}

.finance-report-card-disabled {
    background: #F5F7FA;
    border-color: #E4E8EF;
    cursor: not-allowed;
    opacity: 0.52;
    filter: grayscale(1);
    user-select: none;
}

.finance-report-card-disabled .finance-report-icon {
    background: #7A8494;
}

.finance-report-card-disabled .finance-report-name,
.finance-report-card-disabled .finance-report-arrow {
    color: #6B7280;
}

.finance-report-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2447b0, #16255c);
    border-radius: 10px;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(30, 58, 138, .18);
    transition: transform .15s ease;
}

.finance-report-icon--info {
    background: linear-gradient(135deg, #3B82F6, #1D4ED8);
    box-shadow: 0 2px 8px rgba(59, 130, 246, .22);
}

.finance-report-icon--success {
    background: linear-gradient(135deg, #22C55E, #15803D);
    box-shadow: 0 2px 8px rgba(34, 197, 94, .22);
}

.finance-report-icon i {
    font-size: 1.05rem;
}

.finance-report-name {
    font-size: var(--erp-type-body-emphasis);
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}

.finance-report-description {
    font-size: .8rem;
    color: var(--erp-text-muted, #6B7280);
    line-height: 1.4;
}

.finance-report-arrow {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    /* width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #F1F4FD; */
    color: #374151;
    font-weight: 700;
    transition: transform .15s ease, color .15s ease;
}

.finance-report-arrow i {
    /* font-size: .82rem; */
}

/* ===============================================
   Biometric Attendance Styles
   =============================================== */

.biometric-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 20px;
}

.biometric-title {
    font-size: var(--erp-type-page-title);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px;
}

.biometric-subtitle {
    font-size: var(--erp-type-body);
    color: #6B7280;
    margin: 0;
}

.biometric-institution-select {
    min-width: 280px;
}


.biometric-upload-card {
    background: #ffffff;
    border: 1px solid #E8EEF9;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
}

.biometric-upload-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.biometric-upload-title {
    font-size: var(--erp-type-section-title);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 2px;
}

.biometric-upload-subtitle {
    font-size: var(--erp-type-sm);
    color: #6B7280;
    margin: 0;
}

.biometric-upload-area {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.biometric-upload-zone {
    flex: 1;
    border: 2px dashed #D1D5DB;
    border-radius: 8px;
    padding: 16px 24px;
    text-align: center;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.biometric-upload-zone:hover {
    border-color: var(--primary-light);
    background: #F9FAFB;
}

.biometric-upload-icon {
    font-size: var(--erp-type-display);
    color: #9CA3AF;
    margin-bottom: 8px;
}

.biometric-upload-text {
    font-size: var(--erp-type-caption);
    color: var(--text-primary);
    margin: 0 0 2px;
}

.biometric-upload-hint {
    font-size: var(--erp-type-xs);
    color: #9CA3AF;
    margin: 0;
}

.biometric-upload-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.biometric-upload-actions .erp-btn {
    min-width: 100px;
    padding: 8px 16px;
    font-size: var(--erp-type-caption);
}
.biometric-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

@media (max-width: 1200px) {
    .biometric-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .biometric-stats-grid {
        grid-template-columns: 1fr;
    }
}

.biometric-stat-card {
    background: #ffffff;
    border: 1px solid #E8EEF9;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.biometric-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--erp-type-heading-2);
    flex-shrink: 0;
}

.biometric-stat-present .biometric-stat-icon {
    background: #D1FAE5;
    color: #059669;
}

.biometric-stat-ontime .biometric-stat-icon {
    background: #DBEAFE;
    color: #2563EB;
}

.biometric-stat-late .biometric-stat-icon {
    background: #FEF3C7;
    color: #D97706;
}

.biometric-stat-absent .biometric-stat-icon {
    background: #FEE2E2;
    color: #DC2626;
}

.biometric-stat-content {
    flex: 1;
}

.biometric-stat-label {
    font-size: var(--erp-type-xs);
    font-weight: 600;
    color: #6B7280;
    margin: 0 0 4px;
    letter-spacing: 0.5px;
}

.biometric-stat-value {
    font-size: var(--erp-type-display);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1;
}

.biometric-stat-date {
    font-size: var(--erp-type-sm);
    color: #9CA3AF;
    margin: 4px 0 0;
}

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

.biometric-content-title-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.biometric-content-title {
    font-size: var(--erp-type-heading-3);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.biometric-date-input {
    max-width: 160px;
}

.biometric-filter-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
}

.biometric-tabs {
    display: flex;
    gap: 8px;
}

.biometric-tab {
    padding: 8px 20px;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    background: #ffffff;
    color: #6B7280;
    font-size: var(--erp-type-body);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.biometric-tab:hover {
    border-color: var(--primary-light);
    color: var(--primary-light);
}

.biometric-tab.active {
    background: var(--primary-light);
    border-color: var(--primary-light);
    color: #ffffff;
}

.biometric-search-section {
    display: flex;
    gap: 10px;
}

.biometric-search-input {
    min-width: 250px;
}

.biometric-table {
    font-size: var(--erp-type-caption);
}

.biometric-employee-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.biometric-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-light);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--erp-type-caption);
    font-weight: 600;
    flex-shrink: 0;
}

.biometric-employee-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.biometric-employee-id {
    font-size: var(--erp-type-sm);
    color: #9CA3AF;
}

.biometric-shift {
    font-size: var(--erp-type-sm);
    color: #6B7280;
}

.biometric-punch-times {
    display: flex;
    gap: 12px;
}

.biometric-punch-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--erp-type-caption);
}

.biometric-punch-icon {
    font-size: var(--erp-type-section-title);
}

.biometric-punch-in {
    color: #059669;
}

.biometric-punch-out {
    color: #DC2626;
}

.biometric-status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: var(--erp-type-sm);
    font-weight: 500;
    display: inline-block;
}

.biometric-status-on-time {
    background: #D1FAE5;
    color: #065F46;
}

.biometric-status-late {
    background: #FEF3C7;
    color: #92400E;
}

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

.biometric-leave-balance {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.biometric-leave-item {
    font-size: var(--erp-type-sm);
    color: #6B7280;
}

.biometric-actions {
    display: flex;
    gap: 8px;
}

.biometric-action-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    background: #ffffff;
    color: #6B7280;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.biometric-action-btn:hover {
    border-color: var(--primary-light);
    color: var(--primary-light);
}

.biometric-action-delete:hover {
    border-color: #DC2626;
    color: #DC2626;
}

@media (max-width: 768px) {
    .biometric-header {
        flex-direction: column;
    }
    
    .biometric-institution-select {
        width: 100%;
    }
    
    .biometric-upload-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .biometric-upload-area {
        flex-direction: column;
    }
    
    .biometric-content-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .biometric-filter-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .biometric-search-section {
        width: 100%;
    }
    
    .biometric-search-input {
        width: 100%;
        min-width: auto;
    }
}

/* Remove blue focus border from form controls */
.select2-container--default .select2-search--dropdown .select2-search__field {
    outline: none !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: none !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    outline: none !important;
    border-color: #cbd5e1 !important;
    box-shadow: none !important;
}

/* Remove blue outline from all form controls on focus */
.erp-form-control:focus,
.erp-form-select:focus,
input[type="text"]:focus,
input[type="search"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    outline: none !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 0 0 3px rgba(203, 213, 225, 0.1) !important;
}

/* Read-only form display */
.form-control-plaintext {
    padding: 0.375rem 0.75rem;
    background-color: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    font-size: var(--erp-type-body);
}

/* Info badges for status display */
.info-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: var(--erp-type-caption);
    font-weight: 500;
}

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

.info-badge.success {
    background: #dcfce7;
    color: #166534;
}

.info-badge.secondary {
    background: #f1f5f9;
    color: #475569;
}

/* ══════════════════════════════════════════════════════
   TYPOGRAPHY STANDARD
══════════════════════════════════════════════════════ */

/* Print and PDF views use their own standalone typography. */
body { font-size: 14px; }

.erp-nav-module-btn,
.erp-nav-subitem,
.erp-submenu-item,
.erp-sidebar-link,
.dropdown-item,
.erp-action-text,
.erp-btn,
.btn,
.erp-form-label,
.form-label,
.erp-form-control,
.form-control,
.form-select,
button,
input,
select,
textarea,
.select2-container,
.select2-dropdown,
.flatpickr-calendar { font-size: var(--erp-type-body) !important; }

.erp-table,

.erp-page-subtitle,
.erp-table-subtitle,
.form-text,
.field-error,
.invalid-feedback,
.text-muted.small,
small { font-size: var(--erp-type-sm) !important; }


.erp-badge,
.badge {
  font-size: var(--erp-type-xs) !important;
  padding: 4px 10px !important;
  border-radius: 4px !important;
}

/* Detail pages previously used two different class families. Keep both on
   one scale so legacy and newer modules render identically. */
.erp-detail-title,
.detail-title {
    font-size: var(--erp-type-heading-3) !important;
    line-height: 1.3;
}

.erp-detail-label,
.detail-label {
    font-size: var(--erp-type-sm) !important;
    line-height: 1.4;
    font-weight: 500;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.erp-detail-value,
.detail-value {
    font-size: var(--erp-type-body-emphasis) !important;
    line-height: 1.5;
    color: #1F2937;
}

/* Biometric Module Utility Classes */

/* Hide page header in certain contexts */
.shift-assign-show .erp-page-header {
    display: none;
}

/* Avatar inner circle */
.profile-avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
}

/* Hidden section utility */
.section-hidden {
    display: none;
}

/* Employee list container with scroll */
.employee-list-container {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
}

/* Biometric Config Styles */
.config-section {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.config-section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1f2937;
}

.config-section-subtitle {
    background: #e0f2fe;
    color: #0369a1;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 16px;
}

.pattern-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 6px;
}

.pattern-badge {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.pattern-badge.al {
    background: #dbeafe;
    color: #1e40af;
}

.pattern-badge.lop {
    background: #fee2e2;
    color: #991b1b;
}

.leave-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.leave-table thead th {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    padding: 8px 12px;
    text-align: left;
    letter-spacing: 0.5px;
}

.leave-table tbody tr {
    background: #fff;
}

.leave-table tbody td {
    padding: 8px 12px;
}

.leave-table input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
}

.leave-table input:focus {
    outline: none;
    border-color: #3b82f6;
}

.delete-btn {
    color: #dc2626;
    cursor: pointer;
    font-size: 18px;
}

.delete-btn:hover {
    color: #991b1b;
}

/* Hide page header in config layout */
.student-profile-layout .erp-page-header {
    display: none;
}

/* ====================================
   Student Fee Styles
   ==================================== */

/* Fee head print buttons */
.fee-head-print-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-left: 4px;
    border-radius: 5px;
    color: #fff;
    text-decoration: none;
}

.fee-head-print-button:hover {
    color: #fff;
    filter: brightness(.92);
}

.fee-head-print-button.is-latest {
    background: #5b9cf6;
}

.fee-head-print-button.is-all {
    background: #2ecf91;
}

/* Fee summary grid */
.fee-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.fee-summary-item {
    padding: 14px 16px;
    border: 1px solid #e3e9f0;
    border-radius: 10px;
    background: #fff;
}

.fee-summary-item span {
    display: block;
    margin-bottom: 4px;
    color: #7e8b9d;
    font-size: var(--erp-type-sm);
    font-weight: 700;
    text-transform: uppercase;
}

.fee-summary-item strong {
    color: #26384e;
    font-size: var(--erp-type-section-title);
}

.fee-summary-item.is-paid strong {
    color: #138a60;
}

.fee-paid-text {
    color: #159467 !important;
    font-weight: 650;
}

.enquiry-registration-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    color: var(--erp-text);
    text-decoration: none;
    transition: color .15s ease, background-color .15s ease;
}

.enquiry-registration-link:hover,
.enquiry-registration-link:focus-visible {
    color: var(--erp-primary);
    background: var(--erp-primary-light);
    outline: none;
}

.enquiry-registration-link i {
    font-size: 16px;
    line-height: 1;
}

.fee-summary-item.is-balance strong {
    color: #c2413b;
}

/* Fee table toolbar */
.fee-table-toolbar p {
    margin: 3px 0 0;
    color: #7e8b9d;
    font-size: var(--erp-type-sm);
}

.payment-history-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 10px 0 12px;
    border: 1px solid #d8e1ee;
    border-radius: 12px;
    background: #f8fafc;
    color: var(--erp-text);
    font-size: 13px;
    font-weight: 600;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.payment-history-filter:focus-within {
    border-color: #7894d4;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(28, 63, 145, .1);
}

.payment-history-filter > i {
    color: var(--erp-primary);
    font-size: 14px;
}

.payment-history-filter > span {
    color: #728096;
    font-weight: 500;
}

.payment-history-status-filter {
    width: 104px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--erp-text);
    font: inherit;
    cursor: pointer;
}

.payment-history-status-filter:disabled {
    cursor: wait;
    opacity: .7;
}

.fee-select-column {
    width: 54px;
}

.fee-head-check-target {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    width: 40px;
    height: 40px;
    margin: -8px;
    border-radius: 8px;
    cursor: pointer;
}

.fee-head-check-target:hover {
    background: #eef4fb;
}

.fee-head-selector {
    width: 18px;
    height: 22px;
    margin: 0;
    accent-color: var(--erp-primary);
    cursor: pointer;
}

.fee-head-check-target:has(.fee-head-selector:disabled) {
    cursor: not-allowed;
    opacity: .55;
}

.fee-head-selector:disabled {
    cursor: not-allowed;
}

.fee-head-table td strong,
.fee-head-table td small {
    display: block;
}

.fee-head-table td small {
    margin-top: 2px;
    color: #8592a3;
    font-size: var(--erp-type-sm);
}

.fee-head-amount {
    vertical-align: middle;
    line-height: 39px;
    min-width: 125px;
}


.fee-head-amount-error:empty {
    display: none;
}

.fee-row-settled {
    background: #fafcfb;
}

#selectedFeeHeadTotal {
    font-weight: 700;
}

/* Selected fee summary */
.selected-fee-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.selected-fee-chip {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 7px 10px;
    border-radius: 8px;
    background: #eef4fb;
    color: #24456d;
    font-size: var(--erp-type-sm);
}

.student-empty-compact {
    min-height: 170px;
}

.student-note-danger {
    border-color: #f3c2c2;
    background: #fff1f1;
    color: #a72727;
}

/* Fee payments container */
#feePaymentsContainer {
    width: 100%;
    max-width: 100%;
    grid-column: 1 / -1;
}

/* Payment wrapper */
.fee-payment-wrapper {
    margin-top: 30px;
    width: 100%;
    position: relative;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    background: #fff;
}

.fee-payment-header-line {
    display: none;
}

.fee-payment-label-box {
    position: absolute;
    left: 20px;
    top: -18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
}

.fee-payment-content {
    padding: 10px 0 0 0;
}

.fee-payment-content > .row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px 12px;
    margin: 0;
}

.fee-payment-content > .row > [class*="col-"] {
    width: auto;
    max-width: none;
    padding: 0;
    align-self: start;
}

.fee-payment-content .erp-form-label {
    display: block;
    min-height: 21px;
    margin-bottom: 7px;
}

.fee-payment-content .field-error {
    display: block;
    margin-top: 5px;
    line-height: 1.25;
}

@media (max-width: 1199.98px) {
    .fee-payment-content > .row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575.98px) {
    .fee-payment-content > .row { grid-template-columns: 1fr; }
}

.btn-remove-payment {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: #dc3545;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-remove-payment:hover {
    color: #bb2d3b;
}

.currency-symbol-input {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-weight: 500;
    pointer-events: none;
    z-index: 1;
}

.fee-payment-method-row,
.fee-payment-amount-row {
    min-width: 0;
}

/* Media queries */
@media (min-width: 768px) {
    #studentFeePaymentForm .profile-form-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    
    .fee-payment-method-row {
        grid-column: span 1;
    }
    
    .fee-payment-amount-row {
        grid-column: span 1;
    }
}

@media (max-width: 991px) {
    .fee-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .fee-payment-split-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575px) {
    .fee-summary-grid {
        grid-template-columns: 1fr;
    }
    
    .fee-payment-split-grid {
        grid-template-columns: 1fr;
    }
}

/* Registration Show Page Styles */
.registration-show {
    --show-primary: var(--erp-primary, #37105f);
}

.show-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.show-card {
    border: 1px solid #e1e5eb;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(27, 38, 58, .035);
    overflow: hidden;
}

.show-card+.show-card {
    margin-top: 16px;
}

.show-fieldset {
    min-width: 0;
    padding: 12px 16px;
    border: 1px solid #dfe4eb;
    border-radius: 8px;
}

.show-fieldset legend {
    width: auto;
    float: none;
    padding: 0 8px;
    margin: 0;
    color: #26344a;
    font-size: 0.9rem;
    font-weight: 650;
}

.show-card-header {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #e8ebef;
}

.show-card-header h5,
.show-card-header h6 {
    color: #202b3d;
    font-size: var(--erp-type-body);
    font-weight: 650;
    margin: 0;
}

.show-card-header .erp-text {
    font-size: 1.1rem;
    font-weight: 700;
}

.show-card-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-toggle {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #596579;
    transition: background .2s, color .2s;
}

.section-toggle:hover {
    background: #f2eef6;
    color: var(--show-primary);
}

.section-toggle i {
    transition: transform .2s ease;
}

.section-toggle[aria-expanded="false"] i {
    transform: rotate(180deg);
}

.show-card-body {
    padding: 18px;
}

.profile-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border-bottom: 1px solid #e8ebef;
    background: #faf9fc;
}

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

.profile-avatar {
    display: inline-flex;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #eee8f4;
    color: var(--show-primary);
    font-size: var(--erp-type-body);
    font-weight: 700;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.profile-main h5 {
    color: #1f2a3c;
    font-size: var(--erp-type-section-title);
    margin: 0 0 4px;
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #7c8798;
    font-size: 0.85rem;
}

.profile-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #dad1e4;
    border-radius: 999px;
    background: #f4f0f7;
    color: var(--show-primary);
    font-size: 0.85rem;
    font-weight: 650;
    padding: 6px 10px;
    text-transform: capitalize;
    white-space: nowrap;
}

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

.detail-section+.detail-section {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid #edf0f3;
}

.detail-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #3a465a;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: .035em;
    margin-bottom: 14px;
    text-transform: uppercase;
}

.detail-section-title i {
    color: var(--show-primary);
}

.show-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px 24px;
}

.show-detail-item label {
    display: block;
    color: #8892a1;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.show-detail-item p {
    color: #273348;
    font-size: 0.95rem;
    line-height: 1.45;
    margin: 0;
    overflow-wrap: anywhere;
}

.approved-status-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
    padding: 12px 14px;
    border-radius: 7px;
    background: #32cf99;
    color: #fff;
    font-size: var(--erp-type-body);
    font-weight: 650;
}

.approved-status-banner i {
    font-size: var(--erp-type-section-title);
}

.approved-status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 56px;
    row-gap: 28px;
}

.approved-status-item span,
.approved-status-item strong {
    display: block;
}

.approved-status-item span {
    margin-bottom: 5px;
    color: #727d8f;
    font-size: 0.9rem;
    font-weight: 650;
}

.approved-status-item strong {
    color: #202b3d;
    font-size: 0.95rem;
    font-weight: 400;
}

.approved-status-admission { grid-column: 1; grid-row: 1; }
.approved-status-student { grid-column: 2; grid-row: 1; }
.approved-status-date { grid-column: 1; grid-row: 2; }
.approved-status-batch { grid-column: 1; grid-row: 3; }
.approved-status-admitted { grid-column: 1; grid-row: 4; }
.approved-status-created { grid-column: 2; grid-row: 4; }
.approved-status-updated { grid-column: 1; grid-row: 5; }

@media (max-width: 767.98px) {
    .approved-status-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .approved-status-item {
        grid-column: 1 !important;
        grid-row: auto !important;
    }
}

.guardian-panel {
    border: 1px solid #e0e4ea;
    border-radius: 8px;
    background: #fcfcfd;
    padding: 14px;
}

.guardian-panel+.guardian-panel {
    margin-top: 10px;
}

.guardian-name {
    color: #253146;
    font-size: 0.95rem;
    font-weight: 650;
}

.guardian-relation {
    color: #7c8798;
    font-size: 0.8rem;
    text-transform: capitalize;
}

.guardian-data {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 12px;
}

.summary-list {
    margin: 0;
}

.summary-row {
    display: grid;
    grid-template-columns: 42% 58%;
    padding: 10px 16px;
    border-bottom: 1px solid #edf0f3;
}

.summary-row:last-child {
    border-bottom: 0;
}

.summary-row dt {
    color: #7d8797;
    font-size: 0.9rem;
    font-weight: 600;
}

.summary-row dd {
    color: #293549;
    font-size: 0.95rem;
    margin: 0;
    overflow-wrap: anywhere;
}

.payment-state {
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 650;
    padding: 4px 7px;
}

.payment-state.unpaid {
    background: #fff0f0;
    color: #c83d43;
}

.payment-state.paid,
.summary-status.approved {
    background: #d9f8eb;
    color: #13855f;
}

.payment-state.not-applicable,
.summary-status.pending,
.summary-status.verified {
    background: #eef2ff;
    color: #4759a6;
}

.summary-status.rejected {
    background: #fff0f0;
    color: #c83d43;
}

.summary-status {
    display: inline-flex;
    align-items: center;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 650;
    padding: 4px 7px;
    text-transform: capitalize;
}

.attachment-empty {
    border: 1px dashed #ccd3dd;
    border-radius: 8px;
    color: #788496;
    font-size: 0.9rem;
    padding: 18px;
    text-align: center;
}

.attachment-empty i {
    display: block;
    color: #a0a9b7;
    font-size: var(--erp-type-heading-3);
    margin-bottom: 5px;
}

.fee-layout {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.fee-layout .erp-form-group:last-child {
    grid-column: 1 / -1;
}

.fee-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    border: 1px solid #e3dcec;
    border-radius: 7px;
    background: #faf8fc;
    color: #665875;
    font-size: 0.9rem;
    margin-bottom: 16px;
    padding: 10px 12px;
}

.show-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #edf0f3;
}

.payment-field[hidden] {
    display: none !important;
}

.field-error {
    display: block;
    color: #c83d43;
    font-size: 0.8rem;
    margin-top: 4px;
}

.ledger-balance {
    color: #20ad78;
    font-size: 0.8rem;
    margin-top: 4px;
}

.transaction-table {
    width: 100%;
    border-collapse: collapse;
}

.transaction-table th {
    background: #fafbfc;
    color: #7b8697;
    font-size: 0.85rem;
    font-weight: 650;
    padding: 10px 14px;
    text-align: left;
    text-transform: uppercase;
}

.transaction-table td {
    border-top: 1px solid #edf0f3;
    color: #2d394d;
    font-size: 0.9rem;
    padding: 11px 14px;
}

.transaction-total td {
    font-weight: 650;
}

.assign-fee-check {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #455166;
    font-size: 0.9rem;
    margin-top: 15px;
}

.assign-fee-layout .erp-form-group:last-child {
    grid-column: auto;
}

.opted-fee-title {
    display: block;
    color: #455166;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.opted-fee-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 24px;
}

.opted-fee-option {
    display: inline-flex;
    min-width: 0;
    align-items: flex-start;
    gap: 9px;
    color: #344054;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.4;
}

.opted-fee-option input {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    appearance: none;
    border: 1px solid #8d73a7;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    margin: 0;
}

.opted-fee-option input:checked {
    border-color: var(--show-primary);
    background-color: var(--show-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m3.5 8 3 3 6-7'/%3E%3C/svg%3E");
}

@media (max-width: 1199.98px) {
    .show-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .show-detail-grid,
    .guardian-data,
    .fee-layout {
        grid-template-columns: 1fr;
    }

    .fee-layout .erp-form-group:last-child {
        grid-column: auto;
    }

    .opted-fee-grid {
        grid-template-columns: 1fr;
    }

    .profile-strip {
        align-items: flex-start;
    }

    .summary-row {
        grid-template-columns: 1fr;
        gap: 3px;
    }
}

@media print {
    .erp-breadcrumb,
    .show-actions,
    .erp-sidebar,
    .erp-header,
    .show-form-actions {
        display: none !important;
    }

    .show-card {
        break-inside: avoid;
        box-shadow: none;
    }
}

/* Registration Create Page Styles */
.erp-form-control.is-invalid {
    border-color: #dc3545;
}

.erp-form-group {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.erp-form-label {
    min-height: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.erp-form-control.erp-form-date {
    padding-right: 40px;
}

.erp-form-control.erp-form-date::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.8;
    filter: invert(0.35) sepia(1) saturate(4) hue-rotate(190deg);
}

.erp-card-header .erp-text {
    font-size: 1.1rem;
    font-weight: 700;
}

.erp-page-subtitle {
    font-size: 0.95rem;
}

.form-check-label {
    font-size: 0.9rem;
}

/* Team Sync Toggle Styles */
#syncRole, #syncPermission {
    width: 3.5rem;
    height: 1.75rem;
    cursor: pointer;
}

#syncRole:checked, #syncPermission:checked {
    background-color: #0d6efd;
}

/* Scroll to Top/Bottom Buttons */
/* Scroll to Top/Bottom Buttons */
.erp-scroll-btn {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: var(--text-white);
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 1000;
}

.erp-scroll-btn.show {
    display: flex !important;
}

.erp-scroll-btn:hover {
    background-color: var(--primary-hover);
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.erp-scroll-btn:active {
    transform: translateX(-50%) translateY(0);
}

.erp-scroll-top {
    bottom: 90px;
}

.erp-scroll-bottom {
    bottom: 30px;
}

.erp-scroll-btn i {
    pointer-events: none;
}

/* Teams Page Scroll Buttons - Side by Side */
.teams-scroll-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 1000;
}

.teams-scroll-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: var(--text-white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.teams-scroll-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.teams-scroll-btn:active {
    transform: translateY(0);
}

.teams-scroll-btn i {
    pointer-events: none;
}

/* ── Concession Approval Styles ── */
.erp-file-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.erp-file-upload-area:hover {
    border-color: #0d6efd;
    background-color: #f0f7ff;
}

.erp-card-footer {
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.file-item .bi-x-circle {
    cursor: pointer;
    color: #dc3545;
}

.attachment-thumb {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 4px;
}

.erp-file-upload-area {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Force dropdown menus in tables to display properly */
.erp-table .dropdown {
  position: static !important;
}

.erp-table .dropdown-menu {
  position: fixed !important;
  z-index: 9999 !important;
  will-change: transform;
}

.erp-table tbody td:last-child {
  position: static !important;
}

/* Alert Styles */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
}

.alert-danger {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c2c7;
}

.alert ul {
    margin-bottom: 0;
    padding-left: 1.5rem;
}

.alert li {
    margin-top: 0.25rem;
}

/* Field Error Styles */
.field-error {
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    min-height: 1.25rem;
}

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

.erp-form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* ══════════════════════════════════════════════════════
   DIVISION DETAIL PAGE STYLES
══════════════════════════════════════════════════════ */
.division-section-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.division-course-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
    color: #1f2937;
}

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

.division-info-row {
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.division-info-label {
    color: #6b7280;
    font-size: 0.9375rem;
}

.division-info-value {
    color: #1f2937;
    font-weight: 500;
    font-size: 0.9375rem;
    text-align: right;
    flex: 1;
    margin-left: 1rem;
}

.division-period-btn {
    border-radius: 6px;
    padding: 6px 16px;
    font-size: 0.875rem;
}

.division-period-history-item {
    padding: 0.5rem 0;
    color: #1f2937;
    font-size: 0.875rem;
}

.division-description-label {
    font-size: 0.9375rem;
    color: #6b7280;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.division-description-text {
    color: #1f2937;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.division-period-btn.btn-primary {
    background: var(--primary-light);
    border-color: var(--primary-light);
    color: #fff;
}

.division-period-btn.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.division-period-btn.btn-outline-secondary {
    border-color: #d1d5db;
    color: #6b7280;
}

.division-period-btn.btn-outline-secondary:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #374151;
}

.erp-help-icon {
    cursor: help;
    font-size: 0.875rem;
    color: #6b7280;
    margin-left: 0.25rem;
}

/* Course Show Page Styles */
.erp-table-header {
    background-color: #f3f4f6;
    font-weight: 600;
}

.erp-enrollment-input {
    width: 120px;
    text-align: center;
}

.erp-selected-period {
    font-size: 1rem;
    color: #374151;
    font-weight: 500;
}

/* Subject Type Color Picker Styles */
.color-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 6px 10px;
    height: 44px;
}

.color-preview-box {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    flex-shrink: 0;
    border: 1px solid #e5e7eb;
}

.color-hex-input {
    flex: 1;
    border: none !important;
    padding: 0 !important;
    font-weight: 500;
    font-size: 14px;
    color: #1f2937;
    text-transform: uppercase;
    background: transparent !important;
}

.color-hex-input:focus {
    outline: none;
    box-shadow: none !important;
}

.color-picker-btn {
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 16px;
    cursor: pointer;
    padding: 2px;
    transition: color 0.2s;
    line-height: 1;
}

.color-picker-btn:hover {
    color: #6b7280;
}

.color-picker-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    padding: 12px;
    width: 260px;
    z-index: 1000;
}

.color-picker-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.color-preview-large {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
}

.color-hex-display {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.preset-colors-section {
    margin-bottom: 12px;
}

.preset-colors-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 6px;
}

.preset-color-swatch {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.15s;
}

.preset-color-swatch:hover {
    transform: scale(1.05);
}

.preset-color-swatch.active {
    border-color: #1f2937;
}

.custom-color-section {
    margin-bottom: 10px;
}

.custom-color-picker {
    width: 100%;
    height: 50px;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    padding: 3px;
}

.custom-color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.custom-color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 2px;
}

.clear-color-btn {
    width: 100%;
    padding: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    color: #6b7280;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.clear-color-btn:hover {
    background: #f3f4f6;
}

/* Number fields are typed values; browser spinner controls are intentionally disabled. */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Asset Upload Card */
.asset-upload-card {
    border: 1px solid var(--erp-border);
    border-radius: var(--erp-radius);
    background: #fff;
    overflow: hidden;
}

.asset-upload-header {
    padding: 16px;
    border-bottom: 1px solid var(--erp-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.asset-upload-title {
    font-size: 0.875rem;
    font-weight: 700;
    margin: 0;
    color: var(--erp-text);
}

.asset-upload-size {
    font-size: 0.75rem;
    color: var(--erp-text-muted);
    font-weight: 600;
}

.asset-upload-preview {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--erp-surface-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.asset-upload-preview.dark-bg {
    background: #1a1a1a;
}

.asset-upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.asset-upload-placeholder {
    font-size: 3rem;
    color: var(--erp-text-muted);
    opacity: 0.3;
}

.asset-upload-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.asset-upload-preview:hover .asset-upload-actions {
    opacity: 1;
}

.asset-upload-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: none;
}

.asset-upload-btn:hover {
    background: #d1d5db;
    color: #374151;
    transform: scale(1.05);
}

.asset-upload-preview img {
    display: none;
}

.asset-upload-preview img[src]:not([src=""]) {
    display: block;
}

/* Employee Grid Card Styles */
.employee-grid-card:hover,
.employee-grid-card:focus-visible {
    border-color: var(--erp-primary) !important;
    box-shadow: 0 3px 10px rgba(0,0,0,.1) !important;
    outline: none;
}

/* Utility: Full Height and Width */
.h-100 {
    height: 100% !important;
    width: 100% !important;
}

/* Search Loading Skeleton */
.search-loading-skeleton {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 0;
}

.skeleton-card {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 8px;
    height: 120px;
    width: 100%;
}

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

/* Segmented Control Tabs - Global */
.erp-segmented {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px;
    background: var(--erp-bg);
    border: 1px solid var(--erp-border);
    border-radius: var(--erp-radius);
}

.erp-segmented-option {
    border: none;
    background: transparent;
    padding: 8px 18px;
    border-radius: var(--erp-radius-sm);
    font-size: var(--erp-type-body);
    font-weight: 500;
    color: var(--erp-text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: var(--erp-transition);
}

.erp-segmented-option:hover {
    color: var(--erp-primary);
}

.erp-segmented-option.active {
    background: var(--erp-surface);
    color: var(--erp-primary);
    font-weight: 600;
    box-shadow: var(--erp-shadow-sm);
}

/* Bootstrap's default .fade transition (opacity .15s linear) is fast enough
   that switching between already-loaded tab panes (e.g. the report tabs
   toggled by .erp-segmented-option) reads as a hard cut rather than a
   transition. Slow it down and ease it so the swap feels smooth instead of
   looking like the page reloaded. */
.tab-pane.fade {
    transition: opacity .3s ease;
}

/* Bootstrap only gives one tab-pane `display: block` at a time, so the
   outgoing pane disappears a frame before the incoming one appears -
   a blank flash ("flick") between them. Stacking every pane in the same
   grid cell keeps both in the layout during the crossfade, so the opacity
   transition has something to fade between instead of a gap. */
#dayBookReport .tab-content {
    display: grid;
}

#dayBookReport .tab-content > .tab-pane {
    grid-area: 1 / 1;
    display: block;
    opacity: 0;
    pointer-events: none;
}

#dayBookReport .tab-content > .tab-pane.active {
    opacity: 1;
    pointer-events: auto;
}

.report-multi-options .dropdown-item:hover {
    background-color: #f5f5f5;
    color: #262626;
}

.report-multi-options .dropdown-item:active {
    background-color: #e9ecef;
}

.report-multi-options .dropdown-item.is-hidden {
    display: none !important;
}

.report-multi-options .form-check-input {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    margin: 0;
    border: 1px solid #aaa;
    border-radius: 0;
    cursor: pointer;
    background-color: #fff;
}

.report-multi-options .form-check-input:checked {
    background-color: #5897fb;
    border-color: #5897fb;
}

.report-multi-options .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(88, 151, 251, 0.25);
    border-color: #5897fb;
    outline: none;
}

.report-multi-options .dropdown-item span {
    color: #444;
    font-size: 14px;
    line-height: 1.42857143;
}

.report-multi-menu .btn-link {
    color: #5897fb;
    text-decoration: none;
    font-size: 12px;
    padding: 0;
    line-height: 1.42857143;
}

.report-multi-menu .btn-link:hover {
    color: #3875d7;
    text-decoration: underline;
}

.report-multi-menu .small {
    font-size: 12px;
}

.report-multi-menu .gap-3 {
    gap: 12px !important;
}

/* Scrollbar styling for dropdown */
.report-multi-options::-webkit-scrollbar {
    width: 6px;
}

.report-multi-options::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.report-multi-options::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.report-multi-options::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.report-multi-options .form-check-input:checked {
    background-color: #5897fb;
    border-color: #5897fb;
}

.report-multi-options .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(88, 151, 251, 0.25);
    border-color: #5897fb;
}

.report-multi-options .dropdown-item span {
    color: #444;
    font-size: 14px;
    line-height: 1.42857143;
}

.report-multi-menu .btn-link {
    color: #5897fb;
    text-decoration: none;
    font-size: 13px;
    padding: 0;
}

.report-multi-menu .btn-link:hover {
    color: #3875d7;
    text-decoration: underline;
}

.report-multi-menu .small {
    font-size: 13px;
}

/* Scrollbar styling for dropdown */
.report-multi-options::-webkit-scrollbar {
    width: 6px;
}

.report-multi-options::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.report-multi-options::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.report-multi-options::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ===============================================
   Grand Total - Finance Reports
   =============================================== */
.erp-grand-total {
    display: flex;
    align-items: stretch;
    background: var(--erp-surface);
    border-top: 1px solid var(--erp-border);
    box-shadow: 0 -2px 8px rgba(15, 23, 42, .05);
    flex-wrap: wrap;
    /* Pinned to the bottom of the screen while its table is still in view, so
       the total stays visible instead of requiring a scroll past every row
       (e.g. Payment Method Wise with "All" branches). The table itself no
       longer scrolls internally, so this sticks to the real page scroll. */
    position: sticky;
    bottom: 0;
    z-index: 2;
}

.erp-grand-total-label {
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .9rem 1.35rem;
    font-size: .72rem;
    font-weight: 700;
    color: var(--erp-text-muted);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: .06em;
    background: var(--erp-page-bg, rgba(15, 23, 42, .025));
    border-right: 1px solid var(--erp-border);
}

.erp-grand-total-label::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--erp-primary);
    flex-shrink: 0;
}

.erp-grand-total-items {
    display: flex;
    align-items: stretch;
    flex: 1;
    /* A report with many payment-method columns (Day Book's 9, say) simply
       does not fit on one line at any real screen width - wrapping onto a
       second line keeps every figure fully visible, instead of forcing them
       onto one cramped line with a hidden horizontal scrollbar that just
       looks like the total got cut off at the edge. */
    flex-wrap: wrap;
    min-width: 0;
}

.erp-grand-total-item {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    padding: .7rem 1.25rem;
    flex-shrink: 0;
    border-right: 1px solid var(--erp-border);
}

.erp-grand-total-item span {
    font-size: .66rem;
    color: var(--erp-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    white-space: nowrap;
}

.erp-grand-total-item strong {
    font-size: 1rem;
    color: var(--erp-text);
    font-weight: 700;
    white-space: nowrap;
}

.erp-grand-total-item:last-child {
    border-right: none;
}

/* Day Book Report Styles */

/* Total column gets a subtly darker shade down its full length so it stands
   out from the other payment-method columns at a glance. */
#dayBookTable td[data-col="total_amount"],
#dayBookTable th[data-col="total_amount"] {
    background: var(--erp-bg);
    font-weight: 700;
}

/* Day Book table wrap - no max-height to allow natural table growth */

#dayBookTable td,
#dayBookTable th {
    white-space: nowrap;
    max-width: none;
}

/* Not scoped to #dayBookReport - the day-book-pivot-table partial these
   rows come from is also reused by the standalone Payment Method Wise
   Report.
   Plain by design: no added colour anywhere here. Hierarchy is carried
   entirely by weight, size, letter-spacing and indentation, with a plain
   border to separate one branch's section from the next. */
.day-book-group td {
    background: var(--erp-surface);
    border-top: 2px solid var(--erp-border-strong);
    color: var(--erp-text);
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    padding-top: 1rem;
    padding-bottom: .85rem;
}

.day-book-ledger-group td {
    background: var(--erp-surface);
    color: var(--erp-text-muted);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    padding-left: 1.15rem;
}

.day-book-subtotal td,
.total-row td {
    background: var(--erp-bg);
    border-top: 1px solid var(--erp-border);
    color: var(--erp-text);
    font-weight: 700;
}

.day-book-ledger-subtotal td {
    background: var(--erp-bg);
    color: var(--erp-text-muted);
    font-weight: 600;
    padding-left: 1.5rem;
}

/* Shared by Day Book's own pivot tabs (Payment/Cashier/Ledger Wise) and any
   other report reusing the same day-book-pivot-table partial (e.g. the
   standalone Payment Method Wise Report) - not scoped to #dayBookReport, so
   it renders correctly wherever that partial is included. */
.day-book-summary {
    display: flex;
    flex-wrap: nowrap;
    gap: .75rem;
    padding: 1rem;
    border-bottom: 1px solid var(--erp-border);
    overflow-x: auto;
}

.day-book-summary-item {
    background: var(--erp-surface);
    border: 1px solid var(--erp-border);
    border-radius: .8rem;
    padding: .7rem .85rem;
    box-shadow: var(--erp-shadow-xs);
    flex: 0 0 auto;
    min-width: 135px;
}

.day-book-summary-item span {
    color: var(--erp-text-muted);
    display: block;
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.day-book-summary-item strong {
    color: var(--erp-text);
    display: block;
    font-size: 1.05rem;
    margin-top: .3rem;
}

.day-book-summary-item.variant-is-total {
    background: var(--erp-primary);
    border-color: var(--erp-primary);
}

.day-book-summary-item.variant-is-total span,
.day-book-summary-item.variant-is-total strong {
    color: var(--erp-sidebar-text);
}

.day-book-summary-item.variant-wallet {
    background: var(--erp-success-light);
}

/* The wallet column used to fill every single row's cell with a flat colour,
   which reads as noisy/dated once a table has more than a few rows. Instead,
   the header carries a small rounded chip (the way Gmail/Workspace label
   tags look, not a solid-filled cell) and each value is just coloured,
   medium-weight text - identifiable at a glance without repeating a
   background down the whole column. */
th.wallet-column {
    background: transparent;
}

.wallet-chip {
    display: inline-block;
    background: var(--erp-success-light);
    color: var(--erp-success);
    padding: .2rem .6rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: none;
}

td.wallet-column {
    color: var(--erp-success);
    font-weight: 600;
}

/* Day Book Grand Total uses global .erp-grand-total class */

/* Day Book table footer Grand Total styling */
#dayBookReport tfoot th:first-child {
    font-size: var(--erp-type-heading-4);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Bill Wise Collection Report Styles */
#billWiseReport .bill-wise-summary {
    display: flex;
    flex-wrap: nowrap;
    gap: .85rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    padding-bottom: .15rem;
}

#billWiseReport .bill-wise-summary-item {
    background: var(--erp-surface);
    border: 1px solid var(--erp-border);
    border-radius: .7rem;
    flex: 0 0 auto;
    min-width: 118px;
    padding: .65rem .85rem;
    box-shadow: var(--erp-shadow-xs);
    transition: transform .15s ease, box-shadow .15s ease;
}

#billWiseReport .bill-wise-summary-item:hover {
    box-shadow: var(--erp-shadow-sm, 0 4px 10px rgba(0, 0, 0, .08));
    transform: translateY(-2px);
}

#billWiseReport .bill-wise-summary-item span,
#billWiseReport .bill-wise-toolbar small {
    color: var(--erp-text-muted);
    display: block;
    font-size: .66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
}

#billWiseReport .bill-wise-summary-item strong {
    color: var(--erp-text);
    display: block;
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: -.01em;
    margin-top: .25rem;
}

#billWiseReport .bill-wise-summary-item.is-total {
    background: var(--erp-primary);
    border-color: var(--erp-primary);
}

#billWiseReport .bill-wise-summary-item.is-total span,
#billWiseReport .bill-wise-summary-item.is-total strong {
    color: var(--erp-sidebar-text);
}

#billWiseReport .bill-wise-summary-item.is-wallet {
    background: var(--erp-success-light);
    border-color: var(--erp-success);
}

#billWiseReport .bill-wise-summary-item.is-wallet small {
    background: rgba(255, 255, 255, .55);
    border-radius: 999px;
    color: var(--erp-success);
    display: inline-block;
    font-size: .58rem;
    font-weight: 700;
    letter-spacing: .03em;
    margin-top: .3rem;
    padding: .1rem .45rem;
    text-transform: uppercase;
}

#billWiseReport .bill-wise-toolbar {
    align-items: center;
    border-bottom: 1px solid var(--erp-border);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
}

.bill-wise-table td,
.bill-wise-table th {
    white-space: nowrap;
}

.bill-wise-table tbody tr {
    cursor: pointer;
}

.bill-wise-table tfoot td {
    background: var(--erp-primary-light);
    color: var(--erp-secondary);
    font-weight: 700;
}

/* Bill Wise Report table wrap - no max-height to allow natural table growth */

.bill-wise-table {
    border-collapse: separate;
    border-spacing: 0;
}

.bill-wise-table thead th {
    background: #f5f7fb !important;
    position: sticky;
    top: 0;
    z-index: 3;
}

.bill-wise-table th:first-child,
.bill-wise-table td:first-child {
    left: 0;
    min-width: 4.8rem;
    position: sticky;
    text-align: center;
    width: 4.8rem;
}

.bill-wise-table th:first-child {
    background: #f5f7fb !important;
    box-shadow: 3px 0 7px rgba(15, 23, 42, .1);
    z-index: 6;
}

.bill-wise-table tbody td:first-child {
    background: #fff !important;
    box-shadow: 3px 0 7px rgba(15, 23, 42, .1);
    z-index: 4;
}

.bill-wise-table td.bill-wise-reference,
.bill-wise-table td.bill-wise-bank {
    max-width: 18rem;
    min-width: 12rem;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.4;
}

.bill-wise-table tfoot td {
    bottom: 0;
    position: sticky;
    z-index: 3;
}

.bill-wise-table tfoot td:first-child {
    background: #eff6ff !important;
    z-index: 5;
}

@media (max-width: 767px) {
    #billWiseReport .bill-wise-summary {
        grid-template-columns: repeat(2, minmax(130px, 1fr));
    }
    
    #billWiseReport .bill-wise-toolbar {
        padding: .85rem;
    }
    
    .bill-wise-summary-item {
        min-width: 0;
    }
}

/* Registration Report Styles */
.registration-summary {
    display: grid;
    gap: .85rem;
    grid-template-columns: repeat(5, minmax(140px, 1fr));
    margin-bottom: 1rem;
    overflow-x: auto;
    padding-bottom: .15rem;
}

.registration-summary-item {
    background: var(--erp-surface);
    border: 1px solid var(--erp-border);
    border-radius: .8rem;
    min-width: 140px;
    padding: .85rem 1rem;
    box-shadow: var(--erp-shadow-xs);
}

.registration-summary-item span,
#registrationReport .registration-toolbar small {
    color: var(--erp-text-muted);
    display: block;
    font-size: var(--erp-type-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.registration-summary-item strong {
    color: var(--erp-text);
    display: block;
    font-size: var(--erp-type-section-title);
    margin-top: .3rem;
}

.registration-summary-item.variant-wallet {
    background: var(--erp-success-light);
}

#registrationReport .registration-toolbar {
    align-items: center;
    border-bottom: 1px solid var(--erp-border);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    flex-wrap: wrap;
}

#registrationReport .registration-per-page {
    align-items: center;
    display: flex;
    gap: .5rem;
    font-size: var(--erp-type-sm);
    color: var(--erp-text-muted);
}

#registrationReport .registration-per-page select {
    width: auto;
}

.registration-table td,
.registration-table th {
    white-space: nowrap;
    padding: 0.75rem 1rem;
}

.registration-table {
    table-layout: auto !important;
    width: auto !important;
    min-width: 100%;
}

.registration-table td {
    max-width: none !important;
    overflow: visible !important;
}

/* Registration Report table wrap - no max-height to allow natural table growth */

.registration-table thead th {
    background: #f5f7fb !important;
    position: sticky;
    top: 0;
    z-index: 3;
}

.registration-table th:first-child,
.registration-table td:first-child {
    left: 0;
    min-width: 3.5rem;
    position: sticky;
    text-align: center;
    width: 3.5rem;
}

.registration-table th:first-child {
    background: #f5f7fb !important;
    box-shadow: 3px 0 7px rgba(15, 23, 42, .1);
    z-index: 6;
}

.registration-table tbody td:first-child {
    background: #fff !important;
    box-shadow: 3px 0 7px rgba(15, 23, 42, .1);
    z-index: 4;
}

.registration-loader {
    align-items: center;
    background: rgba(255, 255, 255, .9);
    display: flex;
    flex-direction: column;
    gap: .75rem;
    inset: 0;
    justify-content: center;
    position: absolute;
    z-index: 7;
    color: #1e3a8a;
    font-size: .88rem;
    font-weight: 600;
}

@media (max-width: 767px) {
    .registration-summary {
        grid-template-columns: repeat(2, minmax(130px, 1fr));
    }
    
    #registrationReport .registration-toolbar {
        padding: .85rem;
    }
    
    .registration-summary-item {
        min-width: 0;
    }
}

/* Fee Collection APD Report Styles */
#apdReport .apd-summary {
    display: grid;
    gap: .85rem;
    grid-template-columns: repeat(6, minmax(150px, 1fr));
    margin-bottom: 1rem;
}

.apd-summary-item {
    background: var(--erp-surface);
    border: 1px solid var(--erp-border);
    border-radius: .8rem;
    padding: .85rem 1rem;
}

.apd-summary-item span,
.apd-toolbar small {
    color: var(--erp-text-muted);
    display: block;
    font-size: .73rem;
    font-weight: 600;
    text-transform: uppercase;
}

.apd-summary-item strong {
    display: block;
    font-size: 1.05rem;
    margin-top: .3rem;
    color: var(--erp-text);
}

.apd-summary-item.concession {
    background: var(--erp-warning-light);
}

.apd-summary-item.concession strong {
    color: var(--erp-warning);
}

.apd-summary-item.paid {
    background: var(--erp-success-light);
}

.apd-summary-item.paid strong {
    color: var(--erp-success);
}

.apd-summary-item.due {
    background: var(--erp-danger-light);
    border-color: var(--erp-danger-light);
}

.apd-summary-item.due strong {
    color: var(--erp-danger);
}

.apd-toolbar {
    align-items: center;
    border-bottom: 1px solid var(--erp-border);
    display: flex;
    justify-content: space-between;
    padding: 1rem 1.25rem;
}

/* APD Report table wrap - no max-height to allow natural table growth */

.apd-table {
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto !important;
    width: auto !important;
    min-width: 100%;
}

.apd-table th,
.apd-table td {
    white-space: nowrap;
    padding: 0.75rem 1rem;
}

.apd-table td {
    max-width: none !important;
    overflow: visible !important;
}

.apd-table thead th {
    background: #f5f7fb !important;
    position: sticky;
    top: 0;
    z-index: 3;
}

/* Each fee head's (or, when grouped, each ledger's) own block of Allotted/
   Concession/Paid/Due columns alternates a subtle tint against its
   neighbours, so with this many repeating 4-column groups side by side you
   can tell at a glance where one fee head ends and the next begins. */
.apd-table thead th.apd-shade-b {
    background: #e9edf5 !important;
}

.apd-table tbody td.apd-shade-b {
    background-color: rgba(100, 116, 139, 0.08);
}

.apd-table tbody tr {
    cursor: pointer;
}

.apd-table tbody tr:hover {
    background-color: #f8f9fa;
}

.apd-table tfoot td {
    background: var(--erp-primary-light);
    color: var(--erp-secondary);
    font-weight: 700;
    position: sticky;
    bottom: 0;
}

.apd-table .apd-group {
    background: var(--erp-primary-light);
    font-weight: 700;
}

.apd-table .apd-subtotal td {
    background: var(--erp-bg);
    font-weight: 600;
}

/* Enquiry & Admission Report Styles */
/* Enquiry Admission tables - no max-height to allow natural table growth */

.enquiry-admission-summary {
    display: grid;
    gap: .85rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 1rem;
}

.enquiry-admission-summary-item {
    background: var(--erp-surface);
    border: 1px solid var(--erp-border);
    border-radius: .8rem;
    padding: .85rem 1rem;
    box-shadow: var(--erp-shadow-xs);
}

.enquiry-admission-summary-item span {
    color: var(--erp-text-muted);
    display: block;
    font-size: .73rem;
    font-weight: 600;
    text-transform: uppercase;
}

.enquiry-admission-summary-item strong {
    color: var(--erp-text);
    display: block;
    font-size: 1.05rem;
    margin-top: .3rem;
}

/* Wallet Report Styles */
.wallet-summary {
    display: grid;
    gap: .85rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 1rem;
}

.wallet-summary-item {
    background: var(--erp-surface);
    border: 1px solid var(--erp-border);
    border-radius: .8rem;
    padding: .85rem 1rem;
    box-shadow: var(--erp-shadow-xs);
}

.wallet-summary-item span {
    color: var(--erp-text-muted);
    display: block;
    font-size: .73rem;
    font-weight: 600;
    text-transform: uppercase;
}

.wallet-summary-item strong {
    color: var(--erp-text);
    display: block;
    font-size: 1.05rem;
    margin-top: .3rem;
}

/* ===============================================
   Report Summary Card Variants - shared
   Every report builds its summary row with its own "<report>-summary-item"
   class, but "success"/"warning"/"info"/"danger" must mean the same colour
   everywhere - one report's "Approved" card and another's "Paid" card both
   read as green at a glance, without each report re-declaring (or, as
   before, forgetting to declare) its own copy of these colours.
   =============================================== */
.day-book-summary-item.variant-success,
.bill-wise-summary-item.variant-success,
.registration-summary-item.variant-success,
.enquiry-admission-summary-item.variant-success,
.wallet-summary-item.variant-success {
    background: var(--erp-success-light);
}

.day-book-summary-item.variant-success strong,
.bill-wise-summary-item.variant-success strong,
.registration-summary-item.variant-success strong,
.enquiry-admission-summary-item.variant-success strong,
.wallet-summary-item.variant-success strong {
    color: var(--erp-success);
}

.day-book-summary-item.variant-warning,
.bill-wise-summary-item.variant-warning,
.registration-summary-item.variant-warning,
.enquiry-admission-summary-item.variant-warning,
.wallet-summary-item.variant-warning {
    background: var(--erp-warning-light);
}

.day-book-summary-item.variant-warning strong,
.bill-wise-summary-item.variant-warning strong,
.registration-summary-item.variant-warning strong,
.enquiry-admission-summary-item.variant-warning strong,
.wallet-summary-item.variant-warning strong {
    color: var(--erp-warning);
}

.day-book-summary-item.variant-danger,
.bill-wise-summary-item.variant-danger,
.registration-summary-item.variant-danger,
.enquiry-admission-summary-item.variant-danger,
.wallet-summary-item.variant-danger {
    background: var(--erp-danger-light);
}

.day-book-summary-item.variant-danger strong,
.bill-wise-summary-item.variant-danger strong,
.registration-summary-item.variant-danger strong,
.enquiry-admission-summary-item.variant-danger strong,
.wallet-summary-item.variant-danger strong {
    color: var(--erp-danger);
}

.day-book-summary-item.variant-info,
.bill-wise-summary-item.variant-info,
.registration-summary-item.variant-info,
.enquiry-admission-summary-item.variant-info,
.wallet-summary-item.variant-info {
    background: var(--erp-info-light, rgba(59, 130, 246, .12));
}

.day-book-summary-item.variant-info strong,
.bill-wise-summary-item.variant-info strong,
.registration-summary-item.variant-info strong,
.enquiry-admission-summary-item.variant-info strong,
.wallet-summary-item.variant-info strong {
    color: var(--erp-info);
}

/* Flatpickr Calendar Z-index */
.flatpickr-calendar {
    z-index: 11000 !important;
}
/* Updated: Thu Sep 10 00:47:12 IST 2026 */
/* Force reload: 1788981681 */
/* Reload: 1788982074 */

/* Fee Edit Styles */
.fee-edit-card {
    padding: 26px;
}

.fee-edit-card .profile-form-actions {
    border-top: none;
    padding-top: 0;
    margin-top: 24px;
}

.fee-concession-type-row {
    margin-bottom: 20px;
}

.fee-concession-type-row .profile-form-field {
    max-width: 410px;
}

.fee-edit-group-title {
    font-size: var(--erp-type-heading-3);
    font-weight: 700;
    color: #263449;
    margin: 16px 0 14px;
}

.fee-edit-installment {
    border: 1px solid #d8e0ea;
    border-radius: 7px;
    padding: 15px 12px 13px;
    margin: 0 0 18px;
    background: #fff;
}

.fee-edit-installment legend {
    float: none;
    width: auto;
    padding: 8px 9px;
    margin: 0;
    font-size: var(--erp-type-body-emphasis);
    font-weight: 700;
    color: #35445a;
    border: 1px solid #d8e0ea;
    border-radius: 4px;
    background: #fff;
}

.fee-installment-status {
    font-size: var(--erp-type-body);
}

.fee-installment-status.is-unpaid {
    color: #ef4444;
}

.fee-installment-status.is-partially-paid {
    color: #d97706;
}

.fee-installment-status.is-paid {
    color: #159467;
}

.fee-installment-status.is-not-applicable {
    color: #566578;
}

.fee-edit-meta {
    margin: 0 0 5px;
}

.fee-edit-records {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 14px;
    row-gap: 18px;
}

.fee-edit-records .erp-form-group.is-disabled {
    opacity: 0.72;
}

.fee-field-note {
    display: block;
    margin-top: 4px;
    color: #7c8798;
    font-size: 13px;
}

.fee-direction-field[hidden],
.fee-late-fields[hidden] {
    display: none;
}

.fee-late-rule {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    padding-top: 18px;
    margin-top: 12px;
    border-top: 1px solid #e8edf3;
}

.fee-late-toggle {
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 550;
    white-space: nowrap;
    padding-bottom: 12px;
}

.fee-late-fields {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(270px, 1fr);
    gap: 14px;
    flex: 1;
}

.fee-late-charge {
    display: flex;
    gap: 8px;
}

.fee-late-charge select {
    max-width: 125px;
}

@media (max-width: 1100px) {
    .fee-edit-records {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .fee-edit-card {
        padding: 15px;
    }

    .fee-edit-records {
        grid-template-columns: 1fr;
    }

    .fee-edit-installment {
        padding: 11px;
    }

    .fee-late-rule,
    .fee-late-fields {
        display: block;
    }

    .fee-late-fields .profile-form-field {
        margin-top: 10px;
    }
}

.org-overview-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

#orgOverviewOrgFilter + .select2-container,
#orgOverviewSchoolFilter + .select2-container,
#orgOverviewTypeFilter + .select2-container {
    width: 220px !important;
}

.org-overview-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--erp-primary);
}

.org-overview-group-title i {
    color: var(--erp-primary);
}

.org-overview-badge {
    font-weight: 600;
    font-size: .75rem;
    padding: 5px 10px;
    border-radius: 999px;
}

.org-overview-badge--core {
    background: #e2e8f0;
    color: #1f2937;
}

.org-overview-permission-chip {
    display: inline-block;
    margin: 3px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(24, 48, 124, .08);
    color: var(--erp-primary);
    font-weight: 600;
    font-size: .75rem;
}

.org-overview-permissions-panel {
    margin-top: 8px;
    max-width: 420px;
}

.org-overview-page-numbers {
    display: flex;
    align-items: center;
    gap: 6px;
}

.org-overview-card-header {
    flex-wrap: wrap;
    gap: 12px;
}

.org-overview-school-search {
    max-width: 260px;
    flex: 1 1 220px;
    margin: 0;
}

.org-overview-badge--assigned {
      background: #e2e8f0;
      color: #212529;
      white-space: normal;
      word-wrap: break-word;
      display: inline-block;
      max-width: 100%;
      line-height: 1.4;
}

.org-overview-view-permissions {
    background: var(--primary-light);
    color: var(--text-white);
    cursor: pointer;
}

.org-overview-toggle-panel {
    background: var(--primary-light);
    color: var(--text-white);
    cursor: pointer;
}

@media (min-width: 768px) {
    .erp-filter-col-5 {
        flex: 0 0 20%;
        max-width: 20%;
    }
}

/* Concession Request Status Stepper */
.concession-status-stepper {
    position: relative;
}

.concession-status-step {
    flex: 1;
    z-index: 1;
}

.concession-status-circle {
    width: 32px;
    height: 32px;
}

.concession-status-line {
    position: absolute;
    top: 16px;
    left: calc(16.66% + 16px);
    right: calc(83.33% - 16px);
    height: 2px;
    background: #D1D5DB;
}

.concession-status-line.active {
    background: #10B981;
}

.concession-status-label {
    font-weight: 600;
    color: #1F2937;
}

.concession-status-date {
    color: #6B7280;
}

/* Concession Request Information Cards */
.concession-info-card {
    border-left-width: 4px;
    border-left-style: solid;
}

.concession-info-card.requested {
    background: #EFF6FF;
    border-left-color: #3B82F6;
}

.concession-info-card.approved {
    background: #F0FDF4;
    border-left-color: #10B981;
}

.concession-info-card.rejected {
    background: #FEF2F2;
    border-left-color: #EF4444;
}

.concession-info-card.pending {
    background: #FEF3C7;
    border-left-color: #F59E0B;
}

.concession-info-header {
    text-transform: uppercase;
    font-weight: 600;
}

.concession-info-header.requested {
    color: #1E40AF;
}

.concession-info-header.approved {
    color: #065F46;
}

.concession-info-header.rejected {
    color: #991B1B;
}

.concession-info-header.pending {
    color: #92400E;
}

.concession-info-name {
    font-weight: 600;
    color: #1F2937;
}

.concession-info-date {
    color: #6B7280;
}

.concession-info-ip {
    color: #6B7280;
}

.concession-info-divider.approved {
    border-top: 1px solid #D1FAE5;
}

.concession-info-divider.rejected {
    border-top: 1px solid #FEE2E2;
}

.concession-info-remarks {
    color: #4B5563;
}

.concession-card-header {
    color: #6B7280;
    text-transform: uppercase;
    font-weight: 600;
}

.concession-card-value {
    font-weight: 600;
    color: #1F2937;
}

/* Concession Request Table Column Colors */
.concession-table-existing {
    color: #F59E0B;
}

.concession-table-requested {
    color: #3B82F6;
}

.concession-table-paid {
    color: #10B981;
}

.concession-table-balance {
    color: #10B981;
}

.concession-table-wallet {
    color: #F59E0B;
}

.approved-concession-input {
    max-width: 150px;
    display: inline-block;
    font-weight: 600;
}

.wallet-adjustment-input {
    max-width: 150px;
    display: inline-block;
}

.concession-adjustment-table {
    border: none;
}

.concession-adjustment-table thead th,
.concession-adjustment-table tbody td {
    border: none;
}

.concession-adjustment-table thead th {
    border-bottom: 1px solid #e5e7eb;
}