@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  --bg: #fff8f2;
  --panel: rgba(255, 255, 255, 0.96);
  --panel-strong: #ffffff;
  --panel-contrast: #ffffff;
  --line: rgba(214, 184, 156, 0.55);
  --line-strong: rgba(244, 124, 32, 0.22);
  --text: #2f2418;
  --muted: #7b6b5a;
  --primary: #f47c20;
  --secondary: #fff1e2;
  --danger: #d9534f;
  --success: #2d9b62;
  --shadow-soft: 0 20px 50px rgba(161, 112, 67, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(244, 124, 32, 0.12), transparent 24%),
    radial-gradient(circle at bottom right, rgba(255, 185, 113, 0.18), transparent 24%),
    linear-gradient(180deg, #fffdfa 0%, #fff6ed 46%, #fffaf6 100%);
}

a {
  text-decoration: none;
}

.app-chrome {
  display: flex;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  padding-top: 4.5rem; /* Space for top nav */
}

.ambient {
  position: absolute;
  border-radius: 50%;
  filter: blur(16px);
  opacity: 0.7;
  pointer-events: none;
}

.ambient-one {
  width: 24rem;
  height: 24rem;
  background: rgba(244, 124, 32, 0.12);
  top: -6rem;
  right: -6rem;
}

.ambient-two {
  width: 18rem;
  height: 18rem;
  background: rgba(255, 206, 154, 0.28);
  bottom: 2rem;
  left: -4rem;
}

.shell-nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 18rem;
  padding: 1.75rem;
  background: rgba(255, 255, 255, 0.92);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  z-index: 1001;
  box-shadow: 12px 0 32px rgba(180, 128, 79, 0.06);
  overflow-y: auto;
}

.top-nav {
  position: fixed;
  top: 0;
  left: 18rem;
  right: 0;
  height: 4.5rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(180, 128, 79, 0.04);
}

.top-nav__search {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #fdf6ee;
  border: 1px solid var(--line);
  padding: 0.5rem 1.25rem;
  border-radius: 2rem;
  width: min(400px, 100%);
}

.top-nav__search input {
  background: transparent;
  border: 0;
  outline: none;
  font-size: 0.9rem;
  width: 100%;
}

.user-profile-trigger {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
  padding: 0.35rem 0.35rem 0.35rem 1rem;
  border-radius: 3rem;
  background: #fff;
  border: 1px solid var(--line);
  transition: all 0.2s ease;
}

.user-profile-trigger:hover {
  background: var(--secondary);
  border-color: var(--primary);
}

.user-profile-avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--secondary);
  background: #fff;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  padding: 0.5rem 0;
}

.brand-logo {
  width: 2.8rem;
  height: 2.8rem;
  background: linear-gradient(135deg, var(--primary), #ffb067);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(244, 124, 32, 0.2);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.4rem;
  letter-spacing: -0.04em;
  line-height: 1;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.brand-name .text-primary {
  color: var(--primary) !important;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: lowercase;
  opacity: 0.9;
}

.shell-nav__meta {
  padding: 1rem 1.05rem;
  background: linear-gradient(180deg, #fff7ee 0%, #ffffff 100%);
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.shell-nav__role,
.eyebrow {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
}

.shell-nav__links {
  display: grid;
  gap: 0.7rem;
}

.shell-nav__link,
.mini-tab {
  color: #5d4f43;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  border: 1px solid #efe2d6;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(173, 123, 75, 0.04);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.shell-nav__link:hover,
.mini-tab:hover,
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(173, 123, 75, 0.1);
}

.shell-nav__link.is-active,
.mini-tab.is-active {
  color: #9a4c10;
  background: linear-gradient(135deg, #fff1e4 0%, #ffffff 100%);
  border-color: rgba(244, 124, 32, 0.32);
  box-shadow: 0 14px 26px rgba(244, 124, 32, 0.12);
}

/* Unique Menu Colors */
.nav-item--dashboard { border-left: 4px solid #6366f1 !important; }
.nav-item--dashboard i { color: #6366f1; }

.nav-item--school { border-left: 4px solid #f43f5e !important; }
.nav-item--school i { color: #f43f5e; }

.nav-item--academic { border-left: 4px solid #10b981 !important; }
.nav-item--academic i { color: #10b981; }

.nav-item--finance { border-left: 4px solid #f59e0b !important; }
.nav-item--finance i { color: #f59e0b; }

.nav-item--student { border-left: 4px solid #8b5cf6 !important; }
.nav-item--student i { color: #8b5cf6; }

.nav-item--transport { border-left: 4px solid #ef4444 !important; }
.nav-item--transport i { color: #ef4444; }

.nav-item--attendance { border-left: 4px solid #0ea5e9 !important; }
.nav-item--attendance i { color: #0ea5e9; }

.nav-item--admin { border-left: 4px solid #64748b !important; }
.nav-item--admin i { color: #64748b; }

.shell-nav__link i {
  margin-right: 0.75rem;
  font-size: 1.1rem;
}

.shell-nav__dropdown {
  position: relative;
}

.shell-nav__dropdown-toggle {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.shell-nav__dropdown-toggle::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-top: -0.25rem;
  transition: transform 0.2s ease;
}

.shell-nav__dropdown.show .shell-nav__dropdown-toggle::after {
  transform: rotate(-135deg);
  margin-top: 0.25rem;
}

.shell-nav__dropdown-menu {
  display: none;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.5rem 0 0.5rem 1rem;
  list-style: none;
  margin: 0;
}

.shell-nav__dropdown.show .shell-nav__dropdown-menu {
  display: flex;
}

.shell-nav__dropdown-item {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0.6rem 1rem;
  border-radius: 0.75rem;
  transition: all 0.2s ease;
}

.shell-nav__dropdown-item:hover {
  color: var(--primary);
  background: var(--secondary);
}

.shell-nav__dropdown-item.is-active {
  color: #ffffff;
  font-weight: 600;
  background: var(--primary);
  box-shadow: 0 4px 12px rgba(244, 124, 32, 0.25);
}

.shell-nav__link:active {
  transform: scale(0.98);
}

.logout-button,
.primary-button,
.secondary-button {
  border: 0;
  border-radius: 1rem;
  padding: 0.95rem 1.3rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.logout-button {
  width: 100%;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 20px rgba(173, 123, 75, 0.06);
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, #f47c20 0%, #ff9d4d 100%);
  box-shadow: 0 16px 30px rgba(244, 124, 32, 0.22);
}

.secondary-button {
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 20px rgba(173, 123, 75, 0.05);
}

.secondary-button--danger {
  color: #9e352f;
}

.secondary-button--small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  border-radius: 0.85rem;
  font-size: 0.9rem;
  min-width: 120px;
}

.logout-button:hover,
.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
}

.table-link--danger {
  color: #ff9a9a;
  background: transparent;
  border: 0;
  padding: 0;
  font-weight: 600;
}

.switch-link {
  color: #c76114;
  font-weight: 500;
}

.app-main {
  flex: 1;
  position: relative;
  z-index: 1;
  min-width: 0;
}

.app-main--authed {
  padding: 2.5rem;
  margin-left: 18rem;
  width: calc(100% - 18rem);
  max-width: calc(100% - 18rem);
  min-width: 0;
  box-sizing: border-box;
}

.app-main--guest {
  padding: 2rem;
  display: grid;
  place-items: center;
}

.page-host {
  width: 100%;
}

.floating-alert {
  margin-bottom: 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: 1.1rem;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(173, 123, 75, 0.08);
}

.floating-alert--danger {
  border-color: rgba(217, 83, 79, 0.35);
  background: #fff4f3;
}

.auth-shell {
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.8rem;
  align-items: stretch;
}

.auth-panel,
.surface-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
}

.auth-copy {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.9rem;
}

.auth-copy--admin {
  background:
    radial-gradient(circle at top right, rgba(244, 124, 32, 0.14), transparent 32%),
    linear-gradient(145deg, #fff8f1, #ffffff);
}

.auth-copy--school {
  background:
    radial-gradient(circle at bottom left, rgba(255, 185, 113, 0.18), transparent 30%),
    linear-gradient(145deg, #fffaf6, #ffffff);
}

.auth-copy h1,
.panel-topline h2 {
  margin: 0.35rem 0 0;
  font-size: clamp(2rem, 3vw, 3.2rem);
  color: #2f2418;
}

.auth-copy p,
.feature-card p,
.empty-panel,
.helper-text {
  color: var(--muted);
}

.auth-stat-row,
.school-auth-tiles {
  display: grid;
  gap: 0.9rem;
}

.auth-stat-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.school-auth-tiles {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.auth-stat,
.school-auth-tile {
  padding: 1rem 1.1rem;
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(244, 124, 32, 0.1);
  display: grid;
  gap: 0.35rem;
  box-shadow: 0 10px 22px rgba(173, 123, 75, 0.05);
}

.auth-stat span,
.school-auth-tile span,
.table-subtext {
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-form-panel {
  padding: 2rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-form__header {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.workspace-grid,
.dashboard-stack {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.mini-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.workspace-main,
.dashboard-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.content-grid {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 1.5rem;
}

.content-grid.single-column {
  grid-template-columns: 1fr;
}

.content-grid--wide {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
}

.school-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  gap: 1.6rem;
  align-items: start;
}

.school-form-panel,
.school-table-panel {
  min-height: 100%;
}

.school-form-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.panel {
  padding: 1.7rem;
}

.panel-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.metric-inline,
.metric-card strong {
  font-size: 1.35rem;
  font-weight: 700;
}

.stats-grid,
.feature-grid,
.form-grid,
.detail-grid {
  display: grid;
  gap: 1.15rem;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-grid--school {
  margin-bottom: 1rem;
}

.feature-card,
.metric-card,
.empty-panel {
  border-radius: 1.2rem;
  border: 1px solid var(--line);
  background: var(--panel-strong);
}

.feature-card {
  padding: 1.35rem;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  transition: transform 180ms ease, border-color 180ms ease;
  box-shadow: 0 14px 26px rgba(173, 123, 75, 0.06);
}

.feature-card__tag {
  width: 2rem;
  height: 2rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #fff1e2;
  color: #c76114;
}

.metric-card {
  padding: 1.1rem;
  display: grid;
  gap: 0.35rem;
  box-shadow: 0 12px 24px rgba(173, 123, 75, 0.05);
}

.metric-card span {
  color: var(--muted);
  font-size: 0.88rem;
}

.stack-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.field-group--full {
  grid-column: 1 / -1;
}

.modern-input,
.modern-textarea {
  background: #ffffff;
  border: 1px solid #e6d8ca;
  color: var(--text);
  border-radius: 0.95rem;
  padding: 0.95rem 1rem;
  box-shadow: inset 0 1px 2px rgba(73, 42, 15, 0.02);
}

.modern-input:focus,
.modern-textarea:focus {
  background: #ffffff;
  color: var(--text);
  border-color: rgba(244, 124, 32, 0.55);
  box-shadow: 0 0 0 0.2rem rgba(244, 124, 32, 0.12);
}



.modern-input::placeholder,
.modern-textarea::placeholder {
  color: rgba(104, 84, 64, 0.52);
}

select.modern-input,
select.form-select.modern-input {
  color: var(--text);
  background-color: #ffffff;
}

select.modern-input option,
select.form-select.modern-input option {
  color: #0b1420;
  background: #f7fbff;
}

.modern-textarea {
  min-height: 120px;
}

.validation-block {
  color: #c34d49;
  font-size: 0.92rem;
}

.table-shell {
  overflow-x: auto;
  border-radius: 1.1rem;
  border: 1px solid var(--line);
  background: var(--panel-contrast);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.app-table {
  --bs-table-bg: transparent;
  --bs-table-striped-bg: #fffbf7;
  --bs-table-hover-bg: #fff3e8;
  color: var(--text);
  margin: 0;
}

.app-table thead th {
  color: #5d4b38;
  background: #fff4e8;
  border-bottom-color: #ead6c2;
  font-weight: 600;
  padding: 1.05rem 1rem;
}

.app-table td {
  color: var(--text);
  border-color: #f1e4d8;
  vertical-align: middle;
  padding: 1rem;
}

.app-table td strong,
.app-table td a,
.app-table td span,
.app-table td div,
.app-table td form,
.app-table td button {
  color: inherit;
}

.app-table tbody tr {
  background: #ffffff;
}

.table-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.table-link {
  color: #c76114;
  font-weight: 600;
  background: transparent;
  border: 0;
  padding: 0;
}

.inline-area-card {
  padding: 1.1rem;
  border: 1px dashed rgba(244, 124, 32, 0.28);
  border-radius: 1.1rem;
  background: #fffaf5;
}

.helper-card,
.form-section-title {
  border-radius: 1rem;
}

.helper-card {
  padding: 1rem 1.1rem;
  border: 1px solid rgba(244, 124, 32, 0.15);
  background: #fff7ef;
  color: var(--muted);
}

.form-section-title {
  padding: 0.9rem 1rem;
  background: #fff4e8;
  border: 1px solid #f1ddc7;
  color: var(--text);
  font-weight: 600;
}

.inline-area-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 0.75rem;
  margin-top: 0.8rem;
}

.single-preview {
  grid-template-columns: minmax(120px, 180px);
}

.preview-image,
.hero-logo {
  width: 100%;
  border-radius: 1rem;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #ffffff;
}

.preview-image {
  aspect-ratio: 1 / 1;
}

.hero-logo {
  max-width: 220px;
  aspect-ratio: 1 / 1;
  margin-top: 1.2rem;
}

.detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.empty-panel {
  padding: 1.6rem;
  display: grid;
  place-items: center;
  min-height: 120px;
  text-align: center;
  box-shadow: 0 12px 24px rgba(173, 123, 75, 0.05);
}

.empty-panel--large {
  min-height: 240px;
}

.ledger-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.soft-badge {
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: #fff2e4;
  border: 1px solid var(--line);
  color: #8c4b13;
  font-size: 0.85rem;
}

.badge-pill {
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.bg-soft-success { background-color: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.bg-soft-danger { background-color: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.bg-soft-info { background-color: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.bg-soft-warning { background-color: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

.text-danger {
  color: #c34d49 !important;
}

.page-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  align-items: center;
}

.page-actions--separate {
  margin-top: 1rem;
}

.filter-toolbar,
.fee-editor-toolbar {
  display: grid;
  gap: 1rem;
}

.filter-toolbar {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1.25rem;
}

.filter-toolbar--compact {
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 1.25rem;
}

.fee-editor-toolbar {
  grid-template-columns: minmax(0, 1fr) minmax(180px, 220px) auto;
  align-items: end;
}

.fee-editor-toolbar__action {
  justify-content: flex-end;
}

.fee-total-card {
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid rgba(244, 124, 32, 0.2);
  background: #fff7ef;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.table-empty-cell {
  text-align: center;
  color: var(--muted);
}

.empty-panel--compact {
  min-height: auto;
  margin-top: 1rem;
}

.ts-wrapper {
  width: 100%;
}

.ts-control,
.ts-dropdown {
  border: 1px solid #e6d8ca;
  background: #ffffff;
  color: var(--text);
  box-shadow: none;
}

.ts-control {
  min-height: 52px;
  border-radius: 0.95rem;
  padding: 0.75rem 0.95rem;
}

.ts-control,
.ts-control input,
.ts-control .item,
.ts-control .option,
.ts-dropdown,
.ts-dropdown .option,
.ts-dropdown .item {
  color: var(--text) !important;
}

.ts-control input {
  background: transparent !important;
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
}

.ts-control input::placeholder {
  color: rgba(104, 84, 64, 0.55) !important;
}

.ts-wrapper.single .ts-control .item {
  color: var(--text) !important;
}

.ts-dropdown {
  border-radius: 0.95rem;
  overflow: hidden;
  margin-top: 0.35rem;
  box-shadow: 0 18px 30px rgba(173, 123, 75, 0.12);
}

.ts-dropdown .option,
.ts-dropdown .active {
  color: var(--text) !important;
  background: transparent;
}

.ts-dropdown .option {
  padding: 0.8rem 0.95rem;
}

.ts-dropdown .active,
.ts-dropdown .option:hover {
  background: #fff4e8;
}

.ts-wrapper.single .ts-control:after {
  border-color: #cf7b34 transparent transparent transparent;
}

.school-workspace--stacked {
  grid-template-columns: 1fr;
}

@media (max-width: 1100px) {
  .auth-shell,
  .content-grid,
  .content-grid--wide,
  .feature-grid,
  .stats-grid,
  .detail-grid,
  .school-workspace,
  .school-auth-tiles,
  .auth-stat-row {
    grid-template-columns: 1fr;
  }

  .shell-nav {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .app-chrome {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .app-main--authed,
  .app-main--guest,
  .shell-nav,
  .panel,
  .auth-copy,
  .auth-form-panel {
    padding: 1.15rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid--three {
    grid-template-columns: 1fr;
  }

  .filter-toolbar,
  .fee-editor-toolbar {
    grid-template-columns: 1fr;
  }

  .inline-area-grid {
    grid-template-columns: 1fr;
  }

  .panel-topline,
  .school-form-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Premium Modal System */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(47, 36, 24, 0.45);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  width: min(500px, 90%);
  background: var(--panel-strong);
  border-radius: 1.5rem;
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px rgba(161, 112, 67, 0.25);
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.modal-overlay.is-open .modal-container {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #fffcf9 0%, #ffffff 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.modal-body {
  padding: 1.75rem;
  color: var(--muted);
  line-height: 1.6;
}

.modal-footer {
  padding: 1.25rem 1.75rem;
  background: #fafafa;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.modal-close {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: var(--primary);
}

/* Fee Settings Styles */
.settings-group {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.settings-group:last-of-type {
  border-bottom: 0;
  margin-bottom: 0;
}

.group-header {
  margin-bottom: 1.5rem;
}

.group-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.group-header p {
  font-size: 0.9rem;
  color: var(--muted);
}

.input-with-help {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.help-text {
  font-size: 0.85rem;
  color: var(--primary);
  opacity: 0.8;
}

.info-alert {
  background: var(--surface-subtle);
  border-left: 4px solid var(--primary);
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-top: 1rem;
  border-radius: 4px;
}

.alert-icon {
  font-size: 1.2rem;
}

.alert-content {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.badge--success { background: #e6f4ea; color: #1e7e34; }
.badge--info { background: #e8f0fe; color: #1a73e8; }
.badge--warning { background: #fef7e0; color: #b06000; }
.badge--secondary { background: #f1f3f4; color: #5f6368; }
.badge--danger { background: #fce8e6; color: #d93025; }
@media print {
  .shell-nav, .top-nav, .no-print, .floating-alert, .modal, .modal-backdrop {
    display: none !important;
  }
  .app-chrome {
    display: block !important;
    overflow: visible !important;
    padding-top: 0 !important;
    min-height: auto !important;
    height: auto !important;
    position: static !important;
  }
  .app-main, .app-main--authed {
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
    overflow: visible !important;
    position: static !important;
  }
  .page-host {
    display: block !important;
    overflow: visible !important;
  }
  .workspace-grid {
    display: block !important;
    overflow: visible !important;
    padding: 0 !important;
  }
  .workspace-main {
    display: block !important;
    overflow: visible !important;
  }
  body {
    background: #fff !important;
    overflow: visible !important;
    height: auto !important;
    min-height: auto !important;
    position: static !important;
  }
  .surface-panel, .panel {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
  .table-shell {
    overflow: visible !important;
  }
}

/* Session Selector Styling */
.session-pill {
    border-radius: 2rem !important;
    padding: 0.4rem 1.2rem !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    border: 1px solid var(--line) !important;
    background-color: white !important;
    min-width: 160px;
    transition: all 0.2s ease;
}

.session-pill:hover {
    border-color: var(--primary) !important;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1) !important;
}

.session-selector-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
/* Dashboard v2 */
.dash-card {
    border: 0;
    border-radius: 1.5rem;
    background: #fff;
    box-shadow: 0 10px 30px rgba(180, 128, 79, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.dash-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(180, 128, 79, 0.1);
}

.dash-stat-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
}

.dash-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.dash-menu-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 1.25rem;
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--text);
}

.dash-menu-item:hover {
    background: var(--secondary);
    border-color: var(--primary);
    transform: translateX(5px);
}

.dash-menu-item i {
    font-size: 1.5rem;
    color: var(--primary);
}

/* Global Action Buttons - Squircle Design */
.btn-delete, .btn-edit {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 2px solid transparent;
    font-size: 1.2rem;
    position: relative;
    overflow: hidden;
    padding: 0;
}

.btn-delete {
    background: #fee2e2;
    color: #dc2626;
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.1);
}

.btn-delete:hover {
    background: #dc2626;
    color: #ffffff;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.3);
}

.btn-edit {
    background: #e0f2fe;
    color: #0284c7;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.1);
}

.btn-edit:hover {
    background: #0284c7;
    color: #ffffff;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.3);
}

/* Tooltip style for buttons */
.btn-delete::after, .btn-edit::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    background: #1e293b;
    color: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
}

.btn-delete:hover::after, .btn-edit:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-10px);
}
/* Responsive Layout Overrides */
@media (max-width: 991.98px) {
  .shell-nav {
    left: -100%;
    width: 16rem;
    transition: left 0.3s ease;
    box-shadow: 20px 0 50px rgba(0,0,0,0.15);
  }

  .shell-nav.is-open {
    left: 0;
  }

  .top-nav {
    left: 0;
    padding: 0 1rem;
  }

  .app-main--authed {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
    padding: 1.5rem 1rem;
  }

  .dash-card {
    padding: 1.5rem !important;
  }

  .dash-card p-5 {
    padding: 1.5rem !important;
  }

  .content-grid, 
  .content-grid--wide,
  .school-workspace,
  .stats-grid,
  .feature-grid,
  .form-grid,
  .form-grid--three,
  .auth-stat-row,
  .school-auth-tiles,
  .detail-grid {
    grid-template-columns: 1fr !important;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .dash-menu-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
  }

  .header-logic h1 {
    font-size: 1.75rem;
  }
}

/* Sidebar Toggle Overlay */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
}

.sidebar-overlay.is-active {
  display: block;
}
