:root,
[data-bs-theme="light"] {
    /* Brand Colors */
    --bs-blue: #70018b;
    --bs-indigo: #6610f2;
    --bs-purple: #70018b;
    --bs-pink: #d63384;
    --bs-red: #dc3545;
    --bs-orange: #fd7e14;
    --bs-yellow: #ffc107;
    --bs-green: #198754;
    --bs-teal: #20c997;
    --bs-cyan: #0dcaf0;
    --bs-black: #000;
    --bs-white: #fff;
    --bs-gray: #6c757d;
    --bs-gray-dark: #343a40;
    --bs-gray-100: #f8f9fa;
    --bs-gray-200: #e9ecef;
    --bs-gray-300: #dee2e6;
    --bs-gray-400: #ced4da;
    --bs-gray-500: #adb5bd;
    --bs-gray-600: #6c757d;
    --bs-gray-700: #495057;
    --bs-gray-800: #343a40;
    --bs-gray-900: #212529;

    /* Theme Colors */
    --bs-primary: #70018b;
    --bs-secondary: #6c757d;
    --bs-success: #198754;
    --bs-info: #0dcaf0;
    --bs-warning: #ffc107;
    --bs-danger: #dc3545;
    --bs-light: #f8f9fa;
    --bs-dark: #212529;

    /* RGB Values */
    --bs-primary-rgb: 112, 1, 139;
    --bs-secondary-rgb: 108, 117, 125;
    --bs-success-rgb: 25, 135, 84;
    --bs-info-rgb: 13, 202, 240;
    --bs-warning-rgb: 255, 193, 7;
    --bs-danger-rgb: 220, 53, 69;
    --bs-light-rgb: 248, 249, 250;
    --bs-dark-rgb: 33, 37, 41;

    /* Emphasis Colors */
    --bs-primary-text-emphasis: #3b0049;
    --bs-secondary-text-emphasis: #2b2f32;
    --bs-success-text-emphasis: #0a3622;
    --bs-info-text-emphasis: #055160;
    --bs-warning-text-emphasis: #664d03;
    --bs-danger-text-emphasis: #58151c;
    --bs-light-text-emphasis: #495057;
    --bs-dark-text-emphasis: #495057;

    /* Background Colors */
    --bs-primary-bg-subtle: #efd8f4;
    --bs-secondary-bg-subtle: #e2e3e5;
    --bs-success-bg-subtle: #d1e7dd;
    --bs-info-bg-subtle: #cff4fc;
    --bs-warning-bg-subtle: #fff3cd;
    --bs-danger-bg-subtle: #f8d7da;
    --bs-light-bg-subtle: #fcfcfd;
    --bs-dark-bg-subtle: #ced4da;

    /* Border Colors */
    --bs-primary-border-subtle: #d19add;
    --bs-secondary-border-subtle: #c4c8cb;
    --bs-success-border-subtle: #a3cfbb;
    --bs-info-border-subtle: #9eeaf9;
    --bs-warning-border-subtle: #ffe69c;
    --bs-danger-border-subtle: #f1aeb5;
    --bs-light-border-subtle: #e9ecef;
    --bs-dark-border-subtle: #adb5bd;

    /* Base Colors */
    --bs-white-rgb: 255, 255, 255;
    --bs-black-rgb: 0, 0, 0;

    /* Typography */
    --bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto,
        "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif,
        "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
        "Noto Color Emoji";
    --bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas,
        "Liberation Mono", "Courier New", monospace;

    --bs-gradient: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.15),
        rgba(255, 255, 255, 0)
    );

    /* Body */
    --bs-body-font-family: var(--bs-font-sans-serif);
    --bs-body-font-size: 1rem;
    --bs-body-font-weight: 400;
    --bs-body-line-height: 1.5;
    --bs-body-color: #212529;
    --bs-body-color-rgb: 33, 37, 41;
    --bs-body-bg: #fff;
    --bs-body-bg-rgb: 255, 255, 255;

    --bs-emphasis-color: #000;
    --bs-emphasis-color-rgb: 0, 0, 0;

    --bs-secondary-color: rgba(33, 37, 41, 0.75);
    --bs-secondary-color-rgb: 33, 37, 41;

    --bs-secondary-bg: #e9ecef;
    --bs-secondary-bg-rgb: 233, 236, 239;

    --bs-tertiary-color: rgba(33, 37, 41, 0.5);
    --bs-tertiary-color-rgb: 33, 37, 41;

    --bs-tertiary-bg: #f8f9fa;
    --bs-tertiary-bg-rgb: 248, 249, 250;

    --bs-heading-color: inherit;

    /* Links */
    --bs-link-color: #70018b;
    --bs-link-color-rgb: 112, 1, 139;
    --bs-link-decoration: underline;
    --bs-link-hover-color: #59006f;
    --bs-link-hover-color-rgb: 89, 0, 111;

    /* Code */
    --bs-code-color: #d63384;
    --bs-highlight-color: #212529;
    --bs-highlight-bg: #fff3cd;

    /* Borders */
    --bs-border-width: 1px;
    --bs-border-style: solid;
    --bs-border-color: #dee2e6;
    --bs-border-color-translucent: rgba(0, 0, 0, 0.175);

    --bs-border-radius: 0.375rem;
    --bs-border-radius-sm: 0.25rem;
    --bs-border-radius-lg: 0.5rem;
    --bs-border-radius-xl: 1rem;
    --bs-border-radius-xxl: 2rem;
    --bs-border-radius-2xl: var(--bs-border-radius-xxl);
    --bs-border-radius-pill: 50rem;

    /* Shadows */
    --bs-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --bs-box-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --bs-box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --bs-box-shadow-inset: inset 0 1px 2px rgba(0, 0, 0, 0.075);

    /* Focus */
    --bs-focus-ring-width: 0.25rem;
    --bs-focus-ring-opacity: 0.25;
    --bs-focus-ring-color: rgba(112, 1, 139, 0.25);

    /* Forms */
    --bs-form-valid-color: #198754;
    --bs-form-valid-border-color: #198754;
    --bs-form-invalid-color: #dc3545;
    --bs-form-invalid-border-color: #dc3545;
}


/* Siddhi Capital LMS */
/* Session countdown in navbar */
.session-timer-fixed {
  position: static;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0.55rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}
.session-timer-fixed-label {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.session-timer-fixed-value {
  font-weight: 700;
  font-size: 0.95rem;
  min-width: 3.25ch;
}
/* Choices dropdown inside Bootstrap modal (avoid clipping / wrong stacking) */
#paymentModal .modal-body {
  overflow: visible;
}
#paymentModal .choices__list--dropdown,
#paymentModal .choices__list[aria-expanded='true'] {
  z-index: 2000;
}

.table td, .table th { vertical-align: middle; }
.table thead th { text-align: center; }
.table td.amt, .table th.amt { text-align: right; }

.td-row-paid-today { background-color: #d1e7dd !important; }
.td-row-unpaid-dpd { background-color: #f8d7da !important; }
.star-rating .btn-link { padding: 0 2px; text-decoration: none; font-size: 1.25rem; }
.empty-row td { text-align: center; color: #6c757d; font-style: italic; }
.invalid-feedback { display: block; }

.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1rem;
}
@media (min-width: 768px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 992px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}


/* —— Today's Due: modern redesign —— */
.td-page-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.td-page-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.td-page-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--app-primary-soft);
  color: var(--app-primary);
  flex-shrink: 0;
}

.td-page-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: #212529;
}

.td-page-subtitle {
  font-size: 0.85rem;
  color: #6c757d;
  margin: 0.15rem 0 0;
}

.td-shortcut-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--app-primary-dark);
  background: var(--app-primary-soft);
  border: 1px solid rgba(112, 1, 139, 0.18);
  border-radius: 0.6rem;
  padding: 0.4rem 0.7rem;
  white-space: nowrap;
}

.td-shortcut-hint kbd {
  background: var(--app-primary);
  color: #fff;
  border-radius: 0.35rem;
  padding: 0.1rem 0.45rem;
  font-size: 0.72rem;
  font-family: var(--bs-font-sans-serif);
  box-shadow: none;
}

.td-legend {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: #fff;
  border: 1px solid rgba(33, 37, 41, 0.08);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.82rem;
  color: #565a5f;
}

.td-legend i {
  color: var(--app-primary);
  font-size: 1.05rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.td-kpi-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

@media (min-width: 768px) {
  .td-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.td-kpi-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  background: #fff;
  border: 1px solid rgba(33, 37, 41, 0.07);
  border-radius: 0.9rem;
  padding: 1.1rem 1.25rem;
  box-shadow: 0 1px 2px rgba(33, 37, 41, 0.04), 0 10px 24px -18px rgba(33, 37, 41, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.td-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(33, 37, 41, 0.06), 0 16px 28px -18px rgba(33, 37, 41, 0.4);
}

.td-kpi-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
}

.td-kpi-card--primary::before { background: var(--app-primary); }
.td-kpi-card--danger::before { background: var(--bs-danger); }
.td-kpi-card--success::before { background: var(--bs-success); }
.td-kpi-card--warning::before { background: var(--bs-warning); }
.td-kpi-card--info::before { background: var(--bs-info); }
.td-kpi-card--secondary::before { background: #6c757d; }

.td-kpi-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.td-kpi-card--primary .td-kpi-icon { background: var(--app-primary-soft); color: var(--app-primary); }
.td-kpi-card--danger .td-kpi-icon { background: rgba(220, 53, 69, 0.12); color: var(--bs-danger); }
.td-kpi-card--success .td-kpi-icon { background: rgba(25, 135, 84, 0.12); color: var(--bs-success); }
.td-kpi-card--warning .td-kpi-icon { background: rgba(255, 193, 7, 0.18); color: #97730a; }
.td-kpi-card--info .td-kpi-icon { background: rgba(13, 202, 240, 0.14); color: #067b96; }
.td-kpi-card--secondary .td-kpi-icon { background: rgba(108, 117, 125, 0.14); color: #6c757d; }

.loan-kpi-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1rem;
}

@media (min-width: 768px) {
  .loan-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .loan-kpi-grid .loan-kpi-status {
    grid-column: span 2;
  }
}

@media (min-width: 1200px) {
  .loan-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .loan-kpi-grid .loan-kpi-status {
    grid-column: span 3;
  }
}

.td-kpi-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #8a8f98;
}

.td-kpi-value {
  font-size: 1.55rem;
  font-weight: 700;
  color: #212529;
  line-height: 1.2;
  margin: 0.1rem 0 0.15rem;
}

.td-kpi-hint {
  font-size: 0.74rem;
  color: #98a0a8;
}

.td-section {
  background: #fff;
  border: 1px solid rgba(33, 37, 41, 0.07);
  border-radius: 0.9rem;
  box-shadow: 0 1px 2px rgba(33, 37, 41, 0.04);
  margin-bottom: 1.75rem;
  overflow: hidden;
}

.td-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(33, 37, 41, 0.06);
  background: linear-gradient(180deg, rgba(33, 37, 41, 0.015), transparent);
}

.td-section-icon {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.td-section--active .td-section-icon { background: var(--app-primary-soft); color: var(--app-primary); }
.td-section--gold .td-section-icon { background: rgba(255, 193, 7, 0.18); color: #97730a; }
.td-section--group .td-section-icon { background: rgba(13, 202, 240, 0.16); color: #067b96; }
.td-section--npa .td-section-icon { background: rgba(220, 53, 69, 0.12); color: var(--bs-danger); }

.td-section-titles { display: flex; flex-direction: column; }

.td-section-title {
  font-size: 1.02rem;
  font-weight: 700;
  margin: 0;
  color: #212529;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.td-section-sub {
  font-size: 0.75rem;
  color: #8a8f98;
}

.td-section-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-left: auto;
}

.td-section-note {
  padding: 0.65rem 1.25rem;
  font-size: 0.79rem;
  color: #6c757d;
  background: #f8f9fb;
  border-bottom: 1px solid rgba(33, 37, 41, 0.06);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.td-section-note i {
  color: #adb5bd;
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.td-input-icon {
  position: relative;
}

.td-input-icon > i {
  position: absolute;
  left: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  color: #adb5bd;
  font-size: 0.9rem;
  pointer-events: none;
}

.td-input-icon .form-control {
  padding-left: 1.9rem;
}

.td-table {
  margin: 0;
}

.td-table thead th {
  background: #f8f9fb;
  border-bottom: 2px solid rgba(33, 37, 41, 0.08);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6c757d;
  font-weight: 700;
  white-space: nowrap;
}

.td-table tbody tr {
  transition: background 0.12s ease;
}

.td-table tbody tr:hover td {
  background: rgba(112, 1, 139, 0.035);
}

.td-table td,
.td-table th {
  border-color: rgba(33, 37, 41, 0.06);
}

.td-table .td-totals-row td {
  background: #f8f9fb !important;
  border-top: 2px solid rgba(33, 37, 41, 0.09);
  font-weight: 700;
}

.td-row-paid-today {
  box-shadow: inset 3px 0 0 var(--bs-success);
  background: rgba(25, 135, 84, 0.12) !important;
}

.td-row-unpaid-dpd {
  box-shadow: inset 3px 0 0 var(--bs-danger);
  background: rgba(220, 53, 69, 0.11) !important;
}

.td-table tbody tr.td-row-paid-today:hover td,
.td-table tbody tr.td-row-unpaid-dpd:hover td {
  background: rgba(33, 37, 41, 0.03) !important;
}

.td-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  margin-right: 0.4rem;
}

.td-dot--success { background: var(--bs-success); }
.td-dot--danger { background: var(--bs-danger); }
.td-dot--muted { background: #ced4da; }

.td-pay-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* —— App shell: primary sidebar + topbar —— */
:root {
  --app-sidebar-width: 16.5rem;
  --app-primary: #70018b;
  --app-primary-dark: #56006b;
  --app-primary-darker: #3b0049;
  --app-primary-soft: rgba(112, 1, 139, 0.12);
  --app-radius: 0.9rem;
  --app-radius-sm: 0.6rem;
  --app-shadow-sm: 0 1px 2px rgba(20, 15, 25, 0.05);
  --app-shadow-md: 0 6px 16px -8px rgba(20, 15, 25, 0.18);
  --app-shadow-lg: 0 16px 32px -18px rgba(20, 15, 25, 0.28);
}

* { scrollbar-width: thin; }

.app-body {
  min-height: 100vh;
  background: #f3f2f7;
}

.app-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1035;
  background: rgba(15, 10, 20, 0.5);
  backdrop-filter: blur(1px);
}

.app-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1040;
  width: var(--app-sidebar-width);
  height: 100vh;
  background: linear-gradient(190deg, var(--app-primary) 0%, var(--app-primary-darker) 130%);
  color: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 20px rgba(30, 0, 40, 0.22);
  transition: transform 0.22s ease;
}

.app-sidebar-brand {
  padding: 1.1rem 1.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  min-height: 4.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.app-sidebar-brand-link {
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  min-width: 0;
}

.app-sidebar-brand-link:hover {
  color: #fff;
  opacity: 0.92;
}

.app-sidebar-mark {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.app-sidebar-logo {
  height: 34px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.app-sidebar-title {
  font-size: 1.05rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-sidebar-close {
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.app-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.85rem 0.75rem 1rem;
}

.app-sidebar-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.app-sidebar-group-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
  padding: 0.9rem 0.7rem 0.35rem;
}

.app-sidebar-menu li:first-child .app-sidebar-group-label {
  padding-top: 0.15rem;
}

.app-sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--app-radius-sm);
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
  position: relative;
}

.app-sidebar-link-icon {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.app-sidebar-link-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-sidebar-link-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: #ffc107;
  flex-shrink: 0;
}

.app-sidebar-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.app-sidebar-link.is-active {
  background: #fff;
  color: var(--app-primary);
  font-weight: 700;
  box-shadow: var(--app-shadow-md);
}

.app-sidebar-link.is-active .app-sidebar-link-icon {
  background: var(--app-primary-soft);
  color: var(--app-primary);
}

.app-sidebar-foot {
  padding: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.app-sidebar-link-logout {
  color: rgba(255, 255, 255, 0.7);
}

.app-main {
  margin-left: var(--app-sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1.25rem;
  background: #fff;
  color: #212529;
  border-bottom: 1px solid rgba(33, 37, 41, 0.08);
  box-shadow: 0 1px 3px rgba(20, 15, 25, 0.03);
}

.app-sidebar-toggle-btn {
  border: 1px solid rgba(33, 37, 41, 0.12);
  color: var(--app-primary);
  background: #fff;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.app-sidebar-toggle-btn:hover {
  background: var(--app-primary-soft);
}

.app-topbar-page {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.app-topbar-page-icon {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.6rem;
  background: var(--app-primary-soft);
  color: var(--app-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.app-topbar-page-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #212529;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-topbar-spacer {
  flex: 1;
}

.app-topbar-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  justify-content: flex-end;
}

.app-topbar-clock {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  border-radius: 0.55rem;
  background: #f4f2f7;
  color: #565a5f;
  font-size: 0.82rem;
}

.app-topbar-clock i {
  color: var(--app-primary);
  font-size: 0.95rem;
}

.app-topbar-ist-label {
  color: #8a8f98;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.app-topbar-datetime {
  font-weight: 600;
  font-size: 0.85rem;
  color: #212529;
  white-space: nowrap;
}

.session-timer-fixed {
  background: var(--app-primary-soft);
  color: var(--app-primary-dark);
}

.session-timer-fixed i {
  font-size: 0.95rem;
}

.session-timer-fixed-label {
  color: var(--app-primary-dark);
  opacity: 0.75;
}

.app-content {
  flex: 1;
  padding: 1.15rem 1.35rem 2rem;
}

@media (max-width: 991.98px) {
  .app-sidebar {
    transform: translateX(-105%);
  }
  body.sidebar-open .app-sidebar {
    transform: translateX(0);
  }
  body.sidebar-open .app-sidebar-backdrop {
    display: block;
  }
  .app-main {
    margin-left: 0;
  }
  .app-topbar-page-title {
    max-width: 40vw;
  }
}

/* —— Global design-system polish (applies across every page) —— */
body.app-body {
  font-size: 0.945rem;
}

.app-content h1.h3,
.app-content h1 {
  font-weight: 700;
  color: #212529;
  letter-spacing: -0.01em;
}

.app-content .card {
  border: 1px solid rgba(33, 37, 41, 0.07);
  border-radius: var(--app-radius);
  box-shadow: var(--app-shadow-sm);
}

.app-content .card .card-body {
  padding: 1.1rem 1.25rem;
}

.app-content .card-title {
  font-weight: 700;
}

.app-content .btn {
  border-radius: var(--app-radius-sm);
  font-weight: 500;
  transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.app-content .btn-primary {
  background: var(--app-primary);
  border-color: var(--app-primary);
  box-shadow: 0 2px 6px -1px rgba(112, 1, 139, 0.4);
}

.app-content .btn-primary:hover,
.app-content .btn-primary:focus {
  background: var(--app-primary-dark);
  border-color: var(--app-primary-dark);
}

.app-content .btn:active {
  transform: translateY(1px);
}

.app-content .btn-sm {
  border-radius: 0.5rem;
}

.app-content .form-control,
.app-content .form-select {
  border-radius: 0.55rem;
  border-color: rgba(33, 37, 41, 0.14);
}

.app-content .form-control:focus,
.app-content .form-select:focus {
  border-color: var(--app-primary);
  box-shadow: 0 0 0 0.2rem var(--app-primary-soft);
}

.app-content .form-label {
  font-weight: 600;
  color: #495057;
}

.app-content .table {
  --bs-table-bg: transparent;
}

.app-content .table thead th {
  background: #f8f9fb;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #6c757d;
  font-weight: 700;
  border-bottom-width: 2px;
}

.app-content .table-responsive {
  border-radius: var(--app-radius);
  border: 1px solid rgba(33, 37, 41, 0.12);
  overflow: hidden;
  background: #fff;
}

.app-content .table-responsive > .table {
  margin-bottom: 0;
}

.app-content .table-responsive > .table.table-bordered {
  border: 0 !important;
}

.app-content .table-responsive > .table.table-bordered > :not(caption) > * > * {
  border-width: 1px;
  border-color: rgba(33, 37, 41, 0.1);
}

.app-content .table-responsive > .table.table-bordered > :not(caption) > * > *:first-child {
  border-left-width: 0;
}

.app-content .table-responsive > .table.table-bordered > :not(caption) > * > *:last-child {
  border-right-width: 0;
}

.app-content .table-responsive > .table.table-bordered > thead > tr:first-child > *,
.app-content .table-responsive > .table.table-bordered > tbody:first-child > tr:first-child > *,
.app-content .table-responsive > .table.table-bordered > thead:first-child > tr:first-child > * {
  border-top-width: 0;
}

.app-content .table-responsive > .table.table-bordered > :last-child > tr:last-child > * {
  border-bottom-width: 0;
}

.app-content .card > .table-responsive,
.app-content .card > .card-body > .table-responsive.border-0,
.app-content .td-section > .table-responsive {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.app-content .td-section > .table-responsive {
  border-radius: 0 0 0.9rem 0.9rem;
  overflow: hidden;
  border-top: 1px solid rgba(33, 37, 41, 0.06);
}

.app-content .card > .card-body > .table-responsive {
  border: 1px solid rgba(33, 37, 41, 0.12);
  border-radius: var(--app-radius-sm);
}

.app-content .card > .table-responsive:first-child table,
.app-content .card > .table-responsive:last-child table {
  margin-bottom: 0;
}

.app-content .badge {
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 0.4rem;
}

.app-content .alert {
  border-radius: var(--app-radius-sm);
  border: 1px solid transparent;
}

.app-content .nav-tabs .nav-link {
  border-radius: 0.55rem 0.55rem 0 0;
  font-weight: 600;
  color: #6c757d;
}

.app-content .nav-tabs .nav-link.active {
  color: var(--app-primary);
  border-color: rgba(33, 37, 41, 0.1) rgba(33, 37, 41, 0.1) #fff;
}

.app-content a:not(.btn):not(.nav-link):not(.page-link) {
  text-decoration: none;
  color: var(--app-primary);
}

.app-content a:not(.btn):not(.nav-link):not(.page-link):hover {
  text-decoration: underline;
  color: var(--app-primary-dark);
}

.dashboard-kpi-grid .card {
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-kpi-grid .card:hover {
  transform: translateY(-2px);
  box-shadow: var(--app-shadow-md);
}

.dashboard-kpi-grid .card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--bs-secondary);
}

.dashboard-kpi-grid .card.border-primary::before { background: var(--app-primary); }
.dashboard-kpi-grid .card.border-info::before { background: var(--bs-info); }
.dashboard-kpi-grid .card.border-success::before { background: var(--bs-success); }
.dashboard-kpi-grid .card.border-danger::before { background: var(--bs-danger); }
.dashboard-kpi-grid .card.border-warning::before { background: var(--bs-warning); }
.dashboard-kpi-grid .card.border-dark::before { background: var(--bs-dark); }

.dashboard-kpi-grid .card .card-body {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.dashboard-kpi-icon {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  background: rgba(33, 37, 41, 0.06);
}

.dashboard-kpi-grid .card.border-primary .dashboard-kpi-icon { background: var(--app-primary-soft); color: var(--app-primary); }
.dashboard-kpi-grid .card.border-info .dashboard-kpi-icon { background: rgba(13, 202, 240, 0.14); color: #067b96; }
.dashboard-kpi-grid .card.border-success .dashboard-kpi-icon { background: rgba(25, 135, 84, 0.14); color: var(--bs-success); }
.dashboard-kpi-grid .card.border-danger .dashboard-kpi-icon { background: rgba(220, 53, 69, 0.13); color: var(--bs-danger); }
.dashboard-kpi-grid .card.border-warning .dashboard-kpi-icon { background: rgba(255, 193, 7, 0.18); color: #97730a; }
.dashboard-kpi-grid .card.border-dark .dashboard-kpi-icon { background: rgba(33, 37, 41, 0.1); color: #212529; }


tr {
    border-color: #00000010;
}