:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #6b7280;
  --quiet: #8a9099;
  --line: rgba(17, 24, 39, 0.09);
  --surface: rgba(255, 255, 255, 0.78);
  --solid-surface: #ffffff;
  --page: #f5f5f7;
  --nav: rgba(255, 255, 255, 0.66);
  --nav-soft: rgba(17, 24, 39, 0.06);
  --blue: #0071e3;
  --blue-soft: #e8f2ff;
  --green: #34c759;
  --green-deep: #1f8f3a;
  --green-soft: #edf9f0;
  --amber: #9a6700;
  --amber-soft: #fff6df;
  --red: #b42318;
  --red-soft: #fff0ef;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
  --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, #fbfbfd 0%, var(--page) 48%, #f0f2f5 100%);
  letter-spacing: 0;
  overflow-x: hidden;
}

.login-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-shell {
  width: min(460px, 100%);
}

.login-card {
  display: grid;
  gap: 22px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(1.55);
}

.login-brand {
  min-height: auto;
}

.login-form {
  grid-template-columns: 1fr;
}

.login-form button {
  width: 100%;
}

.sidebar {
  position: fixed;
  inset: 18px auto 18px 18px;
  width: 236px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  color: var(--ink);
  background: var(--nav);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(24px) saturate(1.6);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #ffffff;
  background: #111827;
  font-weight: 800;
}

.brand strong,
.brand small,
.metrics span,
.metrics small,
.panel-heading span,
.list-item small,
.empty {
  display: block;
}

.brand strong {
  font-weight: 760;
  letter-spacing: 0;
}

.brand small {
  margin-top: 2px;
  color: var(--quiet);
}

nav {
  display: grid;
  gap: 6px;
  margin-top: 34px;
}

nav a {
  padding: 11px 12px;
  border-radius: 14px;
  color: #4b5563;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

nav a.active,
nav a:hover {
  color: var(--ink);
  background: var(--nav-soft);
}

.workspace {
  width: min(1240px, calc(100% - 292px));
  margin-left: 272px;
  padding: 30px 34px 46px;
}

.topbar {
  position: relative;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.topbar-actions {
  position: relative;
  z-index: 420;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.org-switcher {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 6px 8px 6px 14px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 12px 30px rgba(15, 23, 42, 0.07);
}

.org-switcher span {
  color: var(--quiet);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.org-switcher select {
  min-height: 34px;
  padding: 0 34px 0 12px;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background:
    linear-gradient(45deg, transparent 50%, #6b7280 50%) calc(100% - 18px) 14px / 6px 6px no-repeat,
    linear-gradient(135deg, #6b7280 50%, transparent 50%) calc(100% - 12px) 14px / 6px 6px no-repeat,
    rgba(245, 245, 247, 0.96);
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--quiet);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 760;
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  font-size: 18px;
  font-weight: 720;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(0, 113, 227, 0.18);
  border-radius: 999px;
  color: #ffffff;
  background: var(--blue);
  box-shadow: 0 10px 24px rgba(0, 113, 227, 0.18);
  font-weight: 700;
  text-decoration: none;
}

.secondary-action {
  border-color: rgba(17, 24, 39, 0.08);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.primary-action:hover {
  background: #0066cc;
}

.secondary-action:hover {
  background: rgba(245, 245, 247, 0.98);
}

.period-switcher {
  position: relative;
  z-index: 430;
  display: inline-grid;
  grid-template-columns: repeat(4, minmax(0, auto));
  gap: 4px;
  margin: 0;
  padding: 4px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    var(--soft-shadow);
  backdrop-filter: blur(18px) saturate(1.35);
}

.period-switcher a,
.period-switcher summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  font-weight: 760;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
}

.period-switcher summary::-webkit-details-marker {
  display: none;
}

.period-switcher summary:focus,
.toolbar-month-picker summary:focus {
  outline: 0;
}

.period-switcher summary:focus-visible,
.toolbar-month-picker summary:focus-visible {
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.14);
}

.period-switcher a.active,
.period-switcher summary.active {
  color: #ffffff;
  background: #111827;
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.16);
}

.period-switcher a:hover:not(.active),
.period-switcher summary:hover:not(.active) {
  color: var(--ink);
  background: rgba(17, 24, 39, 0.06);
}

.month-picker {
  display: inline-block;
  position: relative;
  z-index: 10;
}

.month-picker-panel {
  position: static;
  z-index: 1;
  margin-top: 10px;
  width: min(100%, 430px);
  padding: 14px;
  border: 1px solid rgba(17, 24, 39, 0.14);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.14);
  backdrop-filter: none;
}

.month-picker-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 2px 12px;
}

.month-picker-head strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  text-align: center;
}

.month-picker-head button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(17, 24, 39, 0.055);
  font-size: 12px;
  font-family: inherit;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.month-picker-head button:hover {
  background: rgba(0, 113, 227, 0.1);
  color: var(--blue);
}

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

.month-grid a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 14px;
  background: rgba(245, 245, 247, 0.9);
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.month-grid a.active {
  color: #ffffff;
  background: var(--blue);
  box-shadow: 0 10px 22px rgba(0, 113, 227, 0.18);
}

.hero-grid,
.content-grid,
.bottom-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
}

.hero-grid {
  grid-template-columns: 1.1fr 0.9fr;
}

.content-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
  margin-top: 16px;
}

.bottom-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero-panel,
.panel,
.metrics article,
.capacity-panel {
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(1.45);
}

.hero-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 206px;
  padding: 30px;
}

.hero-panel.accent-green {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(244, 255, 247, 0.8));
}

.hero-panel span,
.metrics span {
  color: var(--quiet);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.hero-panel.accent-green span {
  color: var(--green-deep);
}

.hero-panel strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(42px, 6vw, 68px);
  font-weight: 760;
  line-height: 0.95;
}

.hero-panel p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
}

.ring {
  --value: 0;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 136px;
  height: 136px;
  border-radius: 50%;
  background:
    radial-gradient(circle closest-side, rgba(255, 255, 255, 0.96) 70%, transparent 71%),
    conic-gradient(var(--green) calc(var(--value) * 1%), #e6e8ec 0);
}

.ring span {
  color: var(--ink);
  font-size: 21px;
  font-weight: 760;
}

.finance-panel {
  display: grid;
  align-content: center;
}

.collection-bar,
.progress {
  overflow: hidden;
  height: 9px;
  border-radius: 999px;
  background: #e7e9ee;
}

.collection-bar {
  margin-top: 24px;
}

.collection-bar i,
.progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #30d158);
}

.capacity-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 16px;
  border-color: rgba(180, 186, 196, 0.55);
  background: rgba(180, 186, 196, 0.55);
  box-shadow: none;
  backdrop-filter: none;
}

.capacity-panel div {
  min-height: 118px;
  padding: 19px;
  background: #e5e7eb;
}

.capacity-panel span {
  display: block;
  color: #6a707a;
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.capacity-panel strong {
  display: block;
  margin-top: 8px;
  color: #535a64;
  font-size: 31px;
  font-weight: 720;
}

.capacity-panel small {
  display: block;
  margin-top: 7px;
  color: #727983;
}

.finance-reconcile {
  margin-top: 16px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(246, 251, 255, 0.78));
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(1.45);
}

.reconcile-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.reconcile-head span,
.reconcile-grid span {
  display: block;
  color: #005bb8;
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.reconcile-head h2 {
  margin-top: 5px;
}

.reconcile-head > strong {
  color: #111827;
  font-size: 34px;
  font-weight: 760;
}

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

.reconcile-grid article {
  min-height: 118px;
  padding: 16px;
  border: 1px solid rgba(17, 24, 39, 0.07);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
}

.reconcile-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  font-weight: 740;
}

.reconcile-grid small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.35;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.room-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.room-summary article {
  min-height: 112px;
  padding: 19px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(22px) saturate(1.45);
}

.room-summary span,
.room-card-head span,
.bed-space span {
  display: block;
  color: var(--quiet);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.room-summary strong {
  display: block;
  margin-top: 10px;
  font-size: 32px;
  font-weight: 740;
}

.floor-section {
  margin-top: 18px;
}

.floor-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 12px;
}

.floor-heading span {
  color: var(--quiet);
  font-size: 13px;
  font-weight: 650;
}

.room-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.room-card {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(22px) saturate(1.45);
}

.room-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.room-card-head strong {
  display: block;
  margin-top: 4px;
  font-size: 30px;
  font-weight: 760;
}

.room-card-head small {
  flex: 0 0 auto;
  color: var(--muted);
  font-weight: 700;
}

.bed-space-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.bed-space {
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.68);
  text-decoration: none;
}

.bed-space:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.bed-space strong {
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 760;
}

.bed-space small {
  color: var(--muted);
  font-weight: 700;
}

.bed-space.available {
  border-color: rgba(52, 199, 89, 0.18);
  background: var(--green-soft);
}

.bed-space.available strong,
.bed-space.available span {
  color: var(--green-deep);
}

.bed-space.occupied {
  border-color: rgba(0, 113, 227, 0.18);
  background: var(--blue-soft);
}

.bed-space.occupied strong,
.bed-space.occupied span {
  color: #005bb8;
}

.bed-space.vacating-soon {
  border-color: rgba(255, 204, 0, 0.26);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 251, 226, 0.92));
}

.bed-space.vacating-soon strong,
.bed-space.vacating-soon span {
  color: #6f5200;
}

.bed-space.vacating-soon small {
  color: #8a6700;
}

.bed-space.maintenance {
  border-color: rgba(154, 103, 0, 0.16);
  background: var(--amber-soft);
}

.bed-space.maintenance strong,
.bed-space.maintenance span {
  color: var(--amber);
}

.student-toolbar {
  position: relative;
  z-index: 1200;
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(22px) saturate(1.45);
  overflow: visible;
}

.toolbar-month-picker {
  display: inline-block;
  position: relative;
  z-index: 10;
  width: auto;
  justify-self: start;
}

.toolbar-month-picker .month-picker-panel {
  margin-top: 12px;
}

.toolbar-month-picker summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 170px;
  min-height: 44px;
  padding: 0 38px 0 16px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 999px;
  color: var(--ink);
  background:
    linear-gradient(45deg, transparent 50%, #6b7280 50%) calc(100% - 22px) 20px / 6px 6px no-repeat,
    linear-gradient(135deg, #6b7280 50%, transparent 50%) calc(100% - 16px) 20px / 6px 6px no-repeat,
    rgba(255, 255, 255, 0.86);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 10px 28px rgba(15, 23, 42, 0.07);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
  width: auto;
}

.toolbar-month-picker summary::-webkit-details-marker {
  display: none;
}

.toolbar-month-picker[open] summary,
.toolbar-month-picker summary:hover {
  background:
    linear-gradient(45deg, transparent 50%, #111827 50%) calc(100% - 22px) 20px / 6px 6px no-repeat,
    linear-gradient(135deg, #111827 50%, transparent 50%) calc(100% - 16px) 20px / 6px 6px no-repeat,
    rgba(255, 255, 255, 0.98);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 16px 34px rgba(15, 23, 42, 0.1);
}

.student-toolbar form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}

.student-toolbar label {
  display: grid;
  gap: 7px;
  color: var(--quiet);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.student-toolbar select,
.student-toolbar input[type="month"] {
  min-width: 170px;
  min-height: 44px;
  padding: 0 42px 0 14px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 16px;
  color: var(--ink);
  background-color: rgba(255, 255, 255, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 22px rgba(15, 23, 42, 0.05);
  font: inherit;
  font-weight: 680;
  outline: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.student-toolbar select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #6b7280 50%),
    linear-gradient(135deg, #6b7280 50%, transparent 50%);
  background-position:
    calc(100% - 21px) 19px,
    calc(100% - 15px) 19px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.student-toolbar input[type="month"] {
  padding-right: 14px;
}

.student-toolbar select:hover,
.student-toolbar input[type="month"]:hover {
  background-color: rgba(255, 255, 255, 0.94);
}

.student-toolbar select:focus,
.student-toolbar input[type="month"]:focus {
  border-color: rgba(0, 113, 227, 0.36);
  box-shadow:
    0 0 0 4px rgba(0, 113, 227, 0.12),
    0 10px 26px rgba(15, 23, 42, 0.07);
}

.student-toolbar button,
.student-toolbar form > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 760;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.student-toolbar button {
  color: #ffffff;
  background: var(--blue);
  box-shadow: 0 10px 24px rgba(0, 113, 227, 0.18);
  cursor: pointer;
}

.student-toolbar form > a {
  color: var(--muted);
  background: rgba(17, 24, 39, 0.06);
}

.student-toolbar button:hover,
.student-toolbar form > a:hover {
  transform: translateY(-1px);
}

.student-toolbar button:focus-visible,
.student-toolbar form > a:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
}

.filter-group {
  display: grid;
  gap: 8px;
}

.filter-group > span,
.option-field {
  color: var(--quiet);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.choice-pills,
.radio-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.scroll-pills {
  overflow: visible;
  flex-wrap: wrap;
  padding-bottom: 0;
}

.choice-pills a,
.radio-pills span,
.clear-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(17, 24, 39, 0.07);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
  font-size: 14px;
  font-weight: 760;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.scroll-pills a {
  min-width: 118px;
}

.choice-pills a.active,
.radio-pills input:checked + span {
  border-color: #111827;
  color: #ffffff;
  background: #111827;
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.14);
}

.choice-pills a:hover:not(.active),
.clear-filter:hover,
.radio-pills label:hover span {
  color: var(--ink);
  background: rgba(17, 24, 39, 0.06);
}

.radio-pills label {
  margin: 0;
}

.radio-pills input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.clear-filter {
  justify-self: start;
  color: var(--blue);
  background: rgba(232, 242, 255, 0.82);
}

.expense-entry {
  display: grid;
  gap: 14px;
  margin: 18px 0;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(22px) saturate(1.45);
}

.expense-entry form {
  display: grid;
  grid-template-columns: minmax(150px, 0.45fr) minmax(240px, 0.8fr) minmax(280px, 1fr) auto;
  align-items: end;
  gap: 16px;
}

.expense-entry label,
.option-field {
  display: grid;
  gap: 7px;
  color: var(--quiet);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.expense-entry .option-field:first-of-type {
  grid-column: 1 / -1;
}

.expense-entry .wide-field {
  min-width: 0;
}

.expense-entry input,
.expense-entry select {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 16px;
  color: var(--ink);
  background-color: rgba(255, 255, 255, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 22px rgba(15, 23, 42, 0.05);
  font: inherit;
  font-weight: 680;
  outline: 0;
}

.expense-entry .radio-pills {
  gap: 6px;
}

.expense-entry .radio-pills span {
  min-height: 36px;
  padding: 0 11px;
  font-size: 13px;
}

.expense-entry select {
  padding-right: 42px;
  background-image:
    linear-gradient(45deg, transparent 50%, #6b7280 50%),
    linear-gradient(135deg, #6b7280 50%, transparent 50%);
  background-position:
    calc(100% - 21px) 19px,
    calc(100% - 15px) 19px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  appearance: none;
}

.expense-entry button {
  justify-self: start;
  min-width: 96px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: var(--blue);
  box-shadow: 0 10px 24px rgba(0, 113, 227, 0.18);
  font: inherit;
  font-weight: 760;
  cursor: pointer;
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.category-strip article {
  min-height: 96px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px) saturate(1.35);
}

.category-strip span {
  display: block;
  color: var(--quiet);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.category-strip strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
  font-weight: 740;
}

.letter-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.letter-filter a {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  min-height: 34px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  font-weight: 760;
  text-decoration: none;
}

.letter-filter a.active,
.letter-filter a:hover {
  color: #ffffff;
  background: #111827;
}

.student-list-panel {
  display: grid;
  gap: 10px;
}

.student-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  padding: 15px 18px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 20px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--soft-shadow);
  text-decoration: none;
  backdrop-filter: blur(18px) saturate(1.35);
}

.student-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.student-row strong,
.student-row small {
  display: block;
}

.student-row strong {
  font-size: 17px;
  font-weight: 760;
}

.student-row small {
  margin-top: 5px;
  color: var(--muted);
}

.student-row span {
  flex: 0 0 auto;
  color: var(--quiet);
  font-size: 14px;
  font-weight: 760;
}

.notice-stack {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.notice,
.owner-note {
  padding: 13px 16px;
  border: 1px solid rgba(52, 199, 89, 0.18);
  border-radius: 18px;
  color: var(--green-deep);
  background: var(--green-soft);
  font-weight: 700;
}

.notice.error {
  border-color: rgba(180, 35, 24, 0.18);
  color: var(--red);
  background: var(--red-soft);
}

.notice.success {
  border-color: rgba(52, 199, 89, 0.18);
  color: var(--green-deep);
  background: var(--green-soft);
}

.owner-note {
  border-color: rgba(154, 103, 0, 0.16);
  color: var(--amber);
  background: var(--amber-soft);
}

.month-note {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 18px 0;
}

.month-note strong,
.month-note span,
.month-note a {
  display: inline-flex;
}

.month-note span {
  color: #6f5200;
  font-weight: 650;
}

.month-note a {
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.68);
  text-decoration: none;
}

.invoice-list-panel {
  display: grid;
  gap: 10px;
}

.deposit-section {
  margin-top: 18px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin: 4px 0 2px;
}

.section-heading span {
  color: var(--quiet);
  font-size: 13px;
  font-weight: 650;
}

.invoice-row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(150px, 0.45fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 78px;
  padding: 15px 18px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px) saturate(1.35);
  scroll-margin-top: 24px;
}

.invoice-row.notice-row {
  grid-template-columns: minmax(0, 1.15fr) minmax(180px, 0.5fr) minmax(150px, 0.35fr) auto;
}

.invoice-row strong,
.invoice-row small {
  display: block;
}

.invoice-row > div > strong {
  font-size: 17px;
  font-weight: 760;
}

.invoice-row small {
  margin-top: 5px;
  color: var(--muted);
}

.invoice-amount {
  text-align: right;
}

.notice-release {
  text-align: right;
}

.notice-release strong,
.notice-release small {
  display: block;
}

.notice-release strong {
  font-size: 16px;
  font-weight: 760;
}

.notice-release small {
  margin-top: 5px;
  color: var(--muted);
}

.invoice-amount strong {
  font-size: 20px;
  font-weight: 760;
}

.invoice-row form {
  margin: 0;
}

.invoice-row button,
.paid-pill,
.pending-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 760;
  white-space: nowrap;
}

.invoice-row button {
  color: #ffffff;
  background: var(--green);
  cursor: pointer;
}

.paid-pill {
  color: var(--green-deep);
  background: var(--green-soft);
}

.pending-pill {
  color: var(--amber);
  background: var(--amber-soft);
}

.invoice-row.paid {
  border-color: rgba(52, 199, 89, 0.14);
}

.invoice-row.overdue {
  border-color: rgba(180, 35, 24, 0.14);
  background: var(--red-soft);
}

.invoice-row.deposit-due {
  border-color: rgba(154, 103, 0, 0.16);
  background: rgba(255, 250, 237, 0.82);
}

.invoice-row.notice-row {
  border-color: rgba(0, 113, 227, 0.14);
  background: rgba(242, 247, 255, 0.82);
}

.metrics article {
  min-height: 126px;
  padding: 19px;
  box-shadow: var(--soft-shadow);
}

.metrics article.metric-good {
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.84), rgba(241, 255, 245, 0.82));
}

.metrics article.metric-wide {
  grid-column: span 2;
}

.metrics article.metric-good span {
  color: var(--green-deep);
}

.metrics article.metric-good strong {
  color: #166534;
}

.metrics strong {
  display: block;
  margin-top: 10px;
  font-size: 29px;
  font-weight: 740;
}

.metrics small {
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.35;
}

.metrics small a {
  color: var(--blue);
  font-weight: 760;
  text-decoration: none;
}

.panel {
  padding: 22px;
  box-shadow: var(--soft-shadow);
}

.panel.wide {
  min-height: 320px;
}

.panel-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.panel-heading span {
  color: var(--quiet);
  font-size: 13px;
  font-weight: 650;
}

.hostel-list,
.list {
  display: grid;
  gap: 10px;
}

.hostel-row,
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.64);
}

a.list-item {
  color: var(--ink);
  text-decoration: none;
}

.hostel-row small,
.list-item small {
  margin-top: 5px;
  color: var(--muted);
}

.progress-wrap {
  display: grid;
  grid-template-columns: 46px 160px;
  align-items: center;
  gap: 10px;
}

.progress-wrap span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.list-item b {
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 14px;
  font-weight: 720;
}

.list-item.danger {
  border-color: rgba(180, 35, 24, 0.14);
  background: var(--red-soft);
}

.list-item.danger b {
  color: var(--red);
}

.list-item.warning {
  border-color: rgba(154, 103, 0, 0.16);
  background: var(--amber-soft);
}

.list-item.warning b {
  color: var(--amber);
}

.list-item.success {
  border-color: rgba(52, 199, 89, 0.18);
  background: var(--green-soft);
}

.list-item.success b {
  color: var(--green-deep);
}

.list-item.outgoing {
  border-color: rgba(255, 59, 48, 0.16);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 241, 240, 0.9));
}

.list-item.outgoing b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 34px;
  border-radius: 999px;
  color: #b42318;
  background: rgba(255, 59, 48, 0.12);
}

.outgoing-panel {
  border-color: rgba(255, 59, 48, 0.14);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 245, 244, 0.78));
}

.outgoing-panel .panel-heading h2 {
  color: #b42318;
}

.outgoing-panel .panel-heading span {
  color: #d92d20;
}

.outgoing-panel .list-item.outgoing strong {
  color: #7a271a;
}

.free-soon-panel {
  border-color: rgba(255, 204, 0, 0.24);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(255, 251, 226, 0.86));
}

.free-soon-panel .panel-heading h2 {
  color: #8a6700;
}

.free-soon-panel .panel-heading span {
  color: #a77c00;
}

.list-item.free-soon {
  border-color: rgba(255, 204, 0, 0.24);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(255, 251, 226, 0.9));
}

.list-item.free-soon strong {
  color: #6f5200;
}

.list-item.free-soon b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 34px;
  border-radius: 999px;
  color: #8a6700;
  background: rgba(255, 204, 0, 0.18);
}

.empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.6);
}

.warden-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.warden-form label {
  display: grid;
  gap: 7px;
  color: var(--quiet);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.warden-form .wide-field {
  grid-column: 1 / -1;
}

.warden-form input,
.warden-form select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 16px;
  color: var(--ink);
  background-color: rgba(255, 255, 255, 0.84);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 22px rgba(15, 23, 42, 0.05);
  font: inherit;
  font-weight: 680;
  outline: 0;
}

.warden-form select {
  padding-right: 42px;
  background-image:
    linear-gradient(45deg, transparent 50%, #6b7280 50%),
    linear-gradient(135deg, #6b7280 50%, transparent 50%);
  background-position:
    calc(100% - 21px) 20px,
    calc(100% - 15px) 20px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  appearance: none;
}

.warden-form button,
.approval-actions button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: var(--blue);
  box-shadow: 0 10px 24px rgba(0, 113, 227, 0.18);
  font: inherit;
  font-weight: 760;
  cursor: pointer;
}

.warden-form button {
  justify-self: start;
}

.approval-row {
  grid-template-columns: minmax(0, 1.25fr) minmax(190px, 0.45fr) auto;
}

.approval-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.approval-actions .secondary-button {
  color: var(--red);
  background: var(--red-soft);
  box-shadow: none;
}

.review-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px) saturate(1.35);
}

.review-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.review-card-head strong,
.review-card-head small {
  display: block;
}

.review-card-head strong {
  font-size: 17px;
  font-weight: 760;
}

.review-card-head small {
  margin-top: 5px;
  color: var(--muted);
}

.review-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.review-detail-grid div {
  min-height: 92px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
}

.review-detail-grid span,
.review-detail-grid strong,
.review-detail-grid small {
  display: block;
}

.review-detail-grid span {
  color: var(--quiet);
  font-size: 11px;
  font-weight: 780;
  text-transform: uppercase;
}

.review-detail-grid strong {
  margin-top: 7px;
  font-size: 14px;
  font-weight: 760;
  line-height: 1.35;
}

.review-detail-grid small {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.35;
}

.review-note {
  margin: 0;
  padding: 12px;
  border-radius: 16px;
  color: var(--muted);
  background: rgba(17, 24, 39, 0.04);
  font-weight: 650;
}

@media (max-width: 860px) {
  .sidebar {
    position: static;
    width: auto;
    margin: 14px;
  }

  nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .workspace {
    width: auto;
    margin-left: 0;
    padding: 18px 18px 34px;
  }

  .hero-grid,
  .content-grid,
  .bottom-grid,
  .capacity-panel,
  .reconcile-grid {
    grid-template-columns: 1fr;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics article.metric-wide {
    grid-column: span 2;
  }

  .room-summary,
  .room-grid,
  .category-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .expense-entry form {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .expense-entry .option-field:first-of-type,
  .expense-entry .wide-field {
    grid-column: 1 / -1;
  }

  .expense-entry button {
    justify-self: start;
  }

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

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

  .warden-form {
    grid-template-columns: 1fr;
  }

  .warden-form .wide-field {
    grid-column: auto;
  }

  .approval-actions {
    justify-content: flex-start;
  }

  .review-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .invoice-amount {
    text-align: left;
  }

  .notice-release {
    text-align: left;
  }
}

@media (max-width: 620px) {
  nav {
    grid-template-columns: 1fr;
  }

  .topbar,
  .hero-panel,
  .reconcile-head,
  .hostel-row,
  .list-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .primary-action {
    width: 100%;
  }

  .topbar-actions,
  .period-switcher {
    width: 100%;
  }

  .period-switcher {
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .month-picker-panel {
    width: min(430px, calc(100vw - 48px));
  }

  .month-picker-head {
    grid-template-columns: 1fr;
  }

  .month-picker-head button {
    width: 100%;
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .metrics article.metric-wide {
    grid-column: span 1;
  }

  .room-summary,
  .room-grid,
  .bed-space-grid,
  .category-strip {
    grid-template-columns: 1fr;
  }

  .expense-entry form {
    grid-template-columns: 1fr;
  }

  .expense-entry .option-field:first-of-type,
  .expense-entry .wide-field {
    grid-column: auto;
  }

  .progress-wrap {
    width: 100%;
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .student-toolbar form,
  .student-toolbar label,
  .student-toolbar input[type="month"],
  .student-toolbar button,
  .student-toolbar form > a {
    width: 100%;
  }

  .review-card-head {
    flex-direction: column;
  }

  .review-detail-grid {
    grid-template-columns: 1fr;
  }
}
