:root{
  --g1:#0ea5e9;
  --g2:#8b5cf6;
  --g3:#22c55e;
  --glass: rgba(255,255,255,.10);
  --glass2: rgba(255,255,255,.16);
}
.bg-app{
  min-height:100vh;
  background:
    radial-gradient(1200px 600px at 10% 10%, rgba(14,165,233,.35), transparent 60%),
    radial-gradient(1200px 600px at 90% 20%, rgba(139,92,246,.35), transparent 60%),
    radial-gradient(1200px 600px at 40% 90%, rgba(34,197,94,.25), transparent 60%),
    linear-gradient(135deg, #0b1220 0%, #0b1020 40%, #070b14 100%);
  color:#e8edf7;
}
.nav-glass{
  backdrop-filter: blur(14px);
  background: rgba(10,14,30,.65);
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.brand-dot{
  display:inline-block;
  width:10px;height:10px;border-radius:50%;
  background: linear-gradient(135deg,var(--g1),var(--g2),var(--g3));
  margin-right:8px;
}
.card-glass{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(12px);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.22);
}
.btn-grad{
  border:0;
  background: linear-gradient(135deg,var(--g1),var(--g2));
  color:#fff;
  box-shadow: 0 10px 18px rgba(0,0,0,.22);
}
.btn-grad:hover{ filter: brightness(1.05); }
.badge-soft{
  background: rgba(255,255,255,.14)!important;
  color:#fff!important;
  border:1px solid rgba(255,255,255,.16);
}
.table-modern{
  --bs-table-bg: transparent;
  --bs-table-color: #e8edf7;
  --bs-table-border-color: rgba(255,255,255,.10);
}
.table-modern thead th{
  background: rgba(255,255,255,.08);
  border-bottom:1px solid rgba(255,255,255,.10)!important;
  position: sticky;
  top: 58px;
  z-index: 1;
}
.table-modern td, .table-modern th{
  padding: .75rem .75rem;
  vertical-align: middle;
}
.table-modern tbody tr{
  background: rgba(255,255,255,.04);
}
.table-modern tbody tr:hover{
  background: rgba(255,255,255,.07);
}
.filter-bar{
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  padding: 12px;
}
.form-control, .form-select{
  background: rgba(255,255,255,.08);
  color:#fff;
  border:1px solid rgba(255,255,255,.12);
}
.form-control:focus, .form-select:focus{
  background: rgba(255,255,255,.10);
  color:#fff;
  border-color: rgba(14,165,233,.55);
  box-shadow: 0 0 0 .25rem rgba(14,165,233,.20);
}
.form-control::placeholder{ color: rgba(255,255,255,.55); }
a{ color: #a7ddff; }
a:hover{ color: #d6efff; }
.hr-soft{ border-color: rgba(255,255,255,.10); }
.kpi{
  border-radius:18px;
  background: linear-gradient(135deg, rgba(14,165,233,.18), rgba(139,92,246,.18));
  border:1px solid rgba(255,255,255,.10);
  padding:14px;
}


/* ===== v11 UI Polish ===== */

/* Global spacing */
.container, .container-fluid {
  padding-left: 16px;
  padding-right: 16px;
}

/* Card polish */
.card-glass {
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

/* Tables */
.table-modern th, .table-modern td {
  padding: 14px 14px;
  vertical-align: middle;
  white-space: nowrap;
}

.table-modern thead th {
  position: sticky;
  top: 0;
  background: rgba(20,20,30,.85);
  backdrop-filter: blur(6px);
  z-index: 1;
}

/* Responsive tables */
@media (max-width: 768px) {
  .table-responsive {
    border-radius: 14px;
    overflow: auto;
  }
  .table-modern th, .table-modern td {
    padding: 10px 10px;
    font-size: 13px;
  }
}

/* Buttons */
.btn {
  border-radius: 12px;
}
.btn-grad {
  padding: 10px 18px;
}

/* Forms */
.form-control, .form-select {
  border-radius: 12px;
  padding: 10px 12px;
}

/* Navbar */
.navbar {
  padding: 10px 16px;
}
.navbar .nav-link {
  padding: 8px 12px;
}

/* Mobile sidebar spacing */
@media (max-width: 576px) {
  .navbar .nav-link {
    padding: 10px 14px;
    font-size: 15px;
  }
  h4, .h4 {
    font-size: 1.1rem;
  }
  .btn {
    width: 100%;
  }
}

/* Dashboard cards */
.dashboard-card {
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Print */
@media print {
  .navbar, .btn, .no-print {
    display: none !important;
  }
}

/* ===== v12.1 Fixes (from video) ===== */
/* Prevent header transparency from showing empty-row text behind sticky headers */
.table-modern thead th{
  background: rgba(20,20,30,.98) !important;
}

/* Ensure action buttons are never clipped in Leads list */
.td-actions{min-width:240px;}
.td-actions .btn{white-space:nowrap;}


/* v12.2 fix: select dropdown options visible */
select.form-select option, select.form-select optgroup {
  color: #111 !important;
  background: #fff !important;
}


/* ===== Fees Create (Year-wise Fee Heads) UI fixes ===== */

/* Apply on fees_create page */
body.fees-create .years-row,
.fees-create .years-row{
  display:flex;
  align-items:center;
  gap:.5rem;
  flex-wrap:wrap;
  margin:.25rem 0 .75rem;
}
body.fees-create .years-row label,
.fees-create .years-row label{
  margin:0;
  font-weight:600;
  color:#dbe7ff;
}
body.fees-create input[type="number"],
.fees-create input[type="number"]{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  color: #eef3ff;
  border-radius: 10px;
  padding: .4rem .55rem;
  line-height: 1.1;
}
body.fees-create input[type="number"]:focus,
.fees-create input[type="number"]:focus{
  outline:none;
  border-color: rgba(14,165,233,.55);
  box-shadow: 0 0 0 .2rem rgba(14,165,233,.18);
}

body.fees-create .fees-matrix-wrap,
.fees-create .fees-matrix-wrap{
  overflow-x:auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
}
body.fees-create table.fees-matrix,
.fees-create table.fees-matrix{
  width: 100%;
  min-width: 920px; /* allow horizontal scroll on small screens */
  border-collapse: separate;
  border-spacing: 0;
}
body.fees-create table.fees-matrix th,
body.fees-create table.fees-matrix td,
.fees-create table.fees-matrix th,
.fees-create table.fees-matrix td{
  white-space: nowrap;
}
body.fees-create table.fees-matrix td input,
.fees-create table.fees-matrix td input{
  width: 140px;
  max-width: 160px;
}
body.fees-create .btn-primary,
.fees-create .btn-primary{
  border-radius: 12px;
  padding: .55rem .9rem;
}

/* === Fees Create page: Deep fix for Bootstrap table default colors (v12.4.39) === */
body.fees-create .fee-matrix-wrap{
  overflow-x:auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  background: rgba(0,0,0,.18);
}
body.fees-create table.fee-matrix{
  width:100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
}

/* Override Bootstrap .table variables just for this page */
body.fees-create table.fee-matrix.table{
  --bs-table-color: #e8edf7;
  --bs-table-bg: transparent;
  --bs-table-striped-color: #e8edf7;
  --bs-table-striped-bg: rgba(255,255,255,.02);
  --bs-table-border-color: rgba(255,255,255,.08);
  --bs-table-hover-color: #e8edf7;
  --bs-table-hover-bg: rgba(255,255,255,.03);
}

body.fees-create table.fee-matrix th,
body.fees-create table.fee-matrix td{
  color:#e8edf7 !important;
  border-bottom:1px solid rgba(255,255,255,.08);
  padding:12px 14px;
  vertical-align: middle;
}

body.fees-create table.fee-matrix thead th{
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(10px);
  font-weight: 800;
}

body.fees-create table.fee-matrix th:first-child,
body.fees-create table.fee-matrix td:first-child{
  position: sticky;
  left: 0;
  z-index: 6;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(10px);
  font-weight: 800;
  white-space: nowrap;
}

body.fees-create table.fee-matrix input[type=number],
body.fees-create table.fee-matrix input[type=text]{
  width: 170px;
  max-width: 170px;
  padding:10px 12px;
  border-radius: 12px;
  border:1px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.38);
  color:#fff;
}

body.fees-create table.fee-matrix input::placeholder{ color: rgba(255,255,255,.55); }
body.fees-create table.fee-matrix input:focus{
  outline:none;
  border-color: rgba(255,255,255,.45);
  box-shadow: 0 0 0 3px rgba(255,255,255,.10);
}

/* ===== Fees Create: Improve readability for muted/help text ===== */
body.fees-create .text-muted,
body.fees-create .form-text,
body.fees-create .text-secondary,
body.fees-create .small.text-muted{
  color: rgba(232,237,247,.72) !important;
}

/* Make year-total badges clearer on dark background */
body.fees-create .badge.bg-secondary{
  background: rgba(255,255,255,.16) !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  color: #fff !important;
}

/* Slightly stronger label contrast */
body.fees-create .form-label{
  color: rgba(232,237,247,.92);
  font-weight: 700;
}
/* ===== Fees Create: dark native dropdown + Grand Total visibility (v12.x) ===== */

/* Ask browser for dark UI controls (helps Chrome/Edge dropdown list) */
body.fees-create{ color-scheme: dark; }

/* Make the select itself match glass theme */
body.fees-create .form-select{
  background-color: rgba(0,0,0,.35);
  background-image: linear-gradient(135deg, rgba(255,255,255,.10), rgba(255,255,255,.04));
  color: #f8fbff;
  border: 1px solid rgba(255,255,255,.18);
}
body.fees-create .form-select:focus{
  border-color: rgba(255,255,255,.35);
  box-shadow: 0 0 0 .2rem rgba(255,255,255,.12);
}

/* Override earlier global rule that forces options white */
body.fees-create select.form-select option,
body.fees-create select.form-select optgroup{
  background: rgba(9, 15, 27, 0.98) !important;
  color: #f3f7ff !important;
}

/* Grand Total – make label readable + badge strong */
body.fees-create .grand-total-wrap{
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: .6rem;
  width: 100%;
}
body.fees-create .grand-total-label{
  color: rgba(255,255,255,.92);
  font-weight: 800;
  letter-spacing: .2px;
}
body.fees-create .grand-total-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .32rem .72rem;
  min-width: 112px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.22);
  backdrop-filter: blur(10px);
  color: #fff;
  font-weight: 900;
}
