:root {
  color-scheme: light;
  --bg: #dde5df;
  --panel: rgba(255, 255, 255, .82);
  --ink: #132019;
  --muted: #5d6b62;
  --line: rgba(25, 39, 31, .10);
  --green: #2b7b57;
  --green-dark: #1c5d40;
  --blue: #2d5f9b;
  --amber: #b57912;
  --danger: #b23939;
  --shadow: 0 26px 70px rgba(10, 18, 13, .14);
  --shadow-soft: 0 14px 34px rgba(10, 18, 13, .10);
  --sidebar-width: 284px;
  --sidebar-collapsed: 88px;
}

* { box-sizing: border-box; }

html {
  width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(141, 214, 172, .22), transparent 24%),
    radial-gradient(circle at bottom right, rgba(25, 45, 35, .10), transparent 28%),
    linear-gradient(180deg, #eef3ef 0%, var(--bg) 50%, #d6dfd8 100%);
  font-family: Arial, Helvetica, sans-serif;
}

button, input, select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
}

label {
  display: grid;
  gap: 7px;
  color: #314139;
  font-size: 13px;
  font-weight: 700;
}

input, select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 13px;
  background: rgba(255,255,255,.74);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45);
}

input:focus, select:focus {
  border-color: var(--green);
  outline: 3px solid rgba(31, 122, 77, .14);
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(rgba(10, 24, 17, .55), rgba(10, 24, 17, .4)),
    url("https://images.unsplash.com/photo-1595435934249-5df7ed86e1c0?auto=format&fit=crop&w=1600&q=80") center/cover;
}

.login-panel {
  width: min(470px, 100%);
  padding: 36px;
  border-radius: 20px;
  background: rgba(246, 249, 247, .82);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.48);
  backdrop-filter: blur(18px);
}

.login-panel h1 {
  margin: 0 0 10px;
  font-size: 34px;
  line-height: 1.06;
}

.stack {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.login-phone-choice {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.login-phone-choice legend {
  margin-bottom: 8px;
  color: #314139;
  font-size: 13px;
  font-weight: 800;
}

.login-phone-options {
  display: grid;
  gap: 8px;
}

.login-phone-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.64);
  color: var(--ink);
}

.login-phone-option input {
  width: 18px;
  height: 18px;
  box-shadow: none;
}

.login-phone-option span {
  font-weight: 850;
}

.login-phone-choice.is-locked {
  opacity: .66;
}

.primary, .secondary, .ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 12px;
  padding: 0 16px;
  font-weight: 800;
}

.primary { background: var(--green); color: #fff; }
.primary:hover { background: var(--green-dark); }
.secondary { background: #e8f0ea; color: var(--green-dark); }
.ghost { background: rgba(255,255,255,.05); color: #dfe8e2; border: 1px solid rgba(255,255,255,.14); }

.message {
  min-height: 18px;
  margin: 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
}

.app-shell {
  min-height: 100vh;
  width: 100%;
}

.sidebar {
  position: fixed;
  inset: 18px auto 18px 18px;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 18px 16px;
  border-radius: 24px;
  background: linear-gradient(180deg, #18271f 0%, #101a15 100%);
  color: #fff;
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 24px 60px rgba(10, 18, 13, .34);
  transition: width .24s ease, transform .24s ease;
  z-index: 12;
  overflow: hidden;
}

.sidebar-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

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

.brand span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #d6f36d;
  color: #14231b;
  font-weight: 900;
  flex: 0 0 auto;
}

.brand-copy {
  min-width: 0;
}

.brand strong {
  display: block;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: #b9c8be;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  color: #eff6f1;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.icon-button:hover {
  background: rgba(255,255,255,.12);
}

nav {
  display: grid;
  gap: 8px;
  overflow-y: auto;
  padding-right: 2px;
}

.nav-item,
.logout-button {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #e5ece8;
  background: transparent;
  font-weight: 700;
  transition: background .18s ease, color .18s ease;
}

.nav-item i,
.logout-button i,
.icon-button i {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.nav-item.active,
.nav-item:hover {
  background: linear-gradient(180deg, rgba(255,255,255,.13), rgba(255,255,255,.08));
  color: #fff;
}

.nav-item.active {
  box-shadow: inset 0 0 0 1px rgba(214, 243, 109, .14);
}

.sidebar .ghost {
  margin-top: auto;
}

.content {
  min-width: 0;
  width: calc(100% - var(--sidebar-width) - 54px);
  margin-left: calc(var(--sidebar-width) + 36px);
  padding: 24px 24px 28px 0;
  transition: margin-left .24s ease;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 20px 22px;
  border: 1px solid rgba(255,255,255,.44);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(250,252,250,.76), rgba(236,242,238,.68));
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
}

.topbar h2 {
  margin: 0;
  font-size: 28px;
}

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

.mobile-sidebar-toggle {
  display: none;
}

.mobile-menu-fab {
  display: none;
}

.view { display: none; }
.view.active { display: block; width: 100%; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.cards {
  align-items: start;
}

.panel, .table-panel, .card, .slot-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
}

.panel { padding: 20px; }

.cards .card {
  padding: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(246,249,247,.78));
}

.teacher-slot-card {
  display: grid;
  gap: 18px;
}

.teacher-slot-card-canceled {
  background: linear-gradient(180deg, rgba(255, 241, 241, .96), rgba(250, 228, 228, .9)) !important;
  border-color: rgba(178, 57, 57, .18);
}

.teacher-slot-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.teacher-slot-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.slot-occupancy {
  display: inline-flex;
  margin-top: 6px;
}

.slot-occupancy-copy {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 800;
}

.slot-occupancy-copy strong {
  color: var(--ink);
  font-size: 1rem;
}

.slot-add-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.teacher-student-list {
  display: grid;
  gap: 12px;
}

.teacher-student-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(25, 39, 31, .08);
}

.teacher-student-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.teacher-student-main strong {
  display: block;
  margin-bottom: 4px;
}

.student-contact-button {
  display: inline;
  min-width: 0;
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  text-align: left;
  box-shadow: none;
}

.student-contact-button:hover {
  color: var(--green-dark);
  text-decoration: underline;
}

.disabled-link {
  pointer-events: none;
  opacity: .55;
}

.teacher-student-side {
  display: grid;
  justify-items: end;
  gap: 4px;
  color: var(--muted);
}

.teacher-student-side span {
  font-weight: 800;
  color: var(--ink);
}

.teacher-student-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.teacher-student-status {
  display: grid;
  gap: 4px;
  justify-items: end;
}

.confirmation-focus-card {
  padding: 24px;
  display: grid;
  gap: 18px;
}

.confirmation-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.confirmation-days {
  display: flex;
  gap: 8px;
  margin: -4px 0 18px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  -webkit-overflow-scrolling: touch;
}

.confirmation-day {
  flex: 0 0 54px;
  min-width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  gap: 1px;
  padding: 6px 4px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.72);
  color: var(--muted);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.42);
}

.confirmation-day strong {
  font-size: 16px;
  line-height: 1;
}

.confirmation-day span {
  font-size: 11px;
  font-weight: 900;
}

.confirmation-day.is-pending {
  background: #f7e3e3;
  border-color: rgba(178, 57, 57, .24);
  color: #9a3f3f;
}

.confirmation-day.is-confirmed {
  background: #e4f6ea;
  border-color: rgba(43, 123, 87, .24);
  color: var(--green-dark);
}

.confirmation-day.active {
  outline: 3px solid rgba(43, 123, 87, .18);
  border-color: rgba(43, 123, 87, .48);
  transform: translateY(-1px);
}

.confirmation-loading-card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 118px;
  width: min(420px, calc(100vw - 40px));
  padding: 24px;
}

.confirmation-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 28, 22, .42);
  backdrop-filter: blur(4px);
}

.loading-spinner {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 4px solid rgba(43, 123, 87, .16);
  border-top-color: var(--green);
  animation: spin 0.8s linear infinite;
}

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

.confirmation-row {
  padding-block: 16px;
}

.slot-hidden-banner {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.waiting-card {
  display: grid;
  gap: 12px;
}

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

.waiting-card-actions {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.inline-form-action {
  display: flex;
  align-items: end;
}

.inline-form-action .secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.status-confirmed {
  color: var(--green);
}

.status-canceled {
  color: var(--danger);
}

.status-pending {
  color: var(--amber);
}

.card h3, .slot-card h4, .lesson-card h3 {
  margin: 0 0 8px;
}

.card p, .slot-card p, .lesson-card p {
  margin: 5px 0;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(43, 123, 87, .10);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.42);
}

.badge-confirmed {
  background: #e4f6ea;
}

.badge-warning {
  background: #fff2d9;
  color: #8a5c00;
}

.badge-canceled {
  background: #f7e3e3;
  color: #9a3f3f;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
  align-items: end;
}

.waiting-form {
  grid-template-columns: minmax(160px, 210px) minmax(240px, 1fr) minmax(240px, 1fr);
}

.waiting-form .span-2 {
  grid-column: span 2;
}

.waiting-form .primary {
  width: 100%;
}

.waiting-form .message {
  grid-column: 1 / -1;
}

.student-toolbar-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(180px, 240px);
  gap: 14px;
  align-items: stretch;
  margin-bottom: 18px;
}

.student-search-card {
  display: grid;
  align-items: end;
}

.student-create-card {
  display: flex;
  min-height: 116px;
  align-items: stretch;
}

.student-create-button {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 100%;
  font-size: 1.02rem;
}

.student-create-button svg {
  width: 30px;
  height: 30px;
  stroke-width: 2.4;
}

.slot-create-card {
  display: flex;
  min-height: 96px;
  align-items: stretch;
  margin-bottom: 18px;
}

.slot-create-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.slots-horizontal-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(520px, 620px);
  gap: 24px;
  overflow-x: auto;
  padding: 18px 8px 2px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  transform: rotateX(180deg);
  margin-top: 10px;
}

.slots-horizontal-scroll::-webkit-scrollbar {
  height: 18px;
}

.slots-horizontal-scroll::-webkit-scrollbar-track {
  background: rgba(20, 35, 27, .08);
  border-radius: 999px;
}

.slots-horizontal-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--green), var(--lime));
  border: 4px solid rgba(249,251,249,.92);
  border-radius: 999px;
}

.slots-horizontal-scroll {
  scrollbar-color: var(--green) rgba(20, 35, 27, .08);
  scrollbar-width: auto;
}

.slots-weekday-card {
  scroll-snap-align: start;
  display: grid;
  align-content: start;
  gap: 16px;
  transform: rotateX(180deg);
  padding: 24px;
}

.slots-weekday-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}

.slots-weekday-header h3 {
  margin: 0;
}

.slots-weekday-lines {
  display: grid;
  gap: 10px;
}

.slot-line {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 58px auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(25, 39, 31, .08);
  overflow: hidden;
}

.slot-line-online {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.slot-line-online svg {
  width: 20px;
  height: 20px;
}

.online-open {
  background: rgba(27, 112, 76, .12);
  color: var(--green-dark);
}

.online-closed {
  background: rgba(178, 57, 57, .12);
  color: var(--danger);
}

.slot-line-open {
  border-color: rgba(27, 112, 76, .42);
  box-shadow: inset 4px 0 0 rgba(27, 112, 76, .72);
}

.slot-line-closed {
  border-color: rgba(178, 57, 57, .34);
  box-shadow: inset 4px 0 0 rgba(178, 57, 57, .62);
}

.slot-line-main strong,
.slot-line-main span,
.slot-line-main small,
.slot-line-capacity strong,
.slot-line-capacity span {
  display: block;
}

.slot-line-main span,
.slot-line-capacity span {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.slot-line-main strong {
  white-space: nowrap;
}

.slot-line-main small {
  margin-top: 2px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.15;
}

.slot-line-capacity strong {
  margin-top: 2px;
  color: var(--ink);
}

.slot-line-capacity {
  text-align: center;
}

.slot-line-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.slot-line-actions .icon-button {
  width: 38px;
  height: 38px;
  background: rgba(27, 112, 76, .10);
  color: var(--green-dark);
}

.slot-line-actions .icon-danger {
  background: rgba(178, 57, 57, .12);
  color: var(--danger);
}

.span-2 { grid-column: span 2; }

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

.checkbox-field {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--muted);
  font-weight: 700;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.form-grid > button,
.form-grid > .message,
.form-grid > .inline-form-action {
  min-width: 0;
}

.table-panel {
  overflow: auto;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

.slots-day-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.slots-day-card {
  min-height: 100%;
  padding: 22px;
  gap: 20px;
}

.slots-day-header {
  align-items: flex-start;
  margin-bottom: 8px;
}

.slots-day-header h3 {
  margin: 0 0 8px;
  font-size: 24px;
}

.slots-day-list {
  gap: 14px;
}

.slot-item {
  align-items: center;
  min-height: 120px;
  padding: 18px 18px;
  border-radius: 18px;
}

.slot-item-main {
  min-width: 0;
}

.slot-item-main strong {
  font-size: 20px;
  line-height: 1.15;
}

.slot-item-main p {
  margin-top: 8px;
  font-size: 18px;
  line-height: 1.2;
}

.slots-day-card > .muted,
.slots-day-list > .muted {
  font-size: 18px;
  line-height: 1.35;
}

.slots-day-header .badge,
.slot-item .badge {
  padding-inline: 14px;
  min-height: 38px;
  font-size: 14px;
}

.slot-item strong {
  display: block;
  margin-bottom: 4px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th, td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: #44564b;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: rgba(239,244,240,.85);
}

td {
  background: rgba(255,255,255,.18);
}

tfoot td {
  background: #f8fafc;
  color: var(--ink);
  font-weight: 900;
}

.finance-total-value {
  text-align: right;
}

.schedule-layout {
  display: none;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.schedule-layout.active {
  display: grid;
}

.schedule-students-panel {
  display: grid;
  gap: 14px;
  min-height: 0;
}

.schedule-panel-header h3 {
  margin: 0;
}

.schedule-board-panel {
  display: grid;
  gap: 14px;
}

.schedule-day-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.schedule-day-chip {
  position: relative;
}

.schedule-day-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.schedule-day-chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(25, 39, 31, .08);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.schedule-day-chip input:checked + span {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.schedule-day-button {
  min-height: 38px;
  border-radius: 999px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.72);
  color: var(--green-dark);
  font-weight: 900;
}

.schedule-day-button.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.schedule-day-button.schedule-day-available {
  background: rgba(27, 112, 76, .14);
  border-color: rgba(27, 112, 76, .42);
  color: var(--green-dark);
}

.schedule-day-button.schedule-day-available.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.student-request-grid {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.student-request-group-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(27, 112, 76, .22);
  border-radius: 14px;
  background: rgba(232, 245, 238, .78);
  color: var(--green-dark);
}

.student-request-group-card span {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.student-request-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(160px, 1.5fr) 132px 118px;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(25, 39, 31, .08);
  border-radius: 14px;
  background: rgba(255,255,255,.74);
}

.student-request-row-head {
  background: rgba(235, 242, 237, .92);
  color: var(--muted);
  font-size: .76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.student-request-row > button {
  min-width: 108px;
  justify-content: center;
}

.student-request-row > strong {
  display: grid;
  gap: 4px;
  line-height: 1.2;
}

.student-request-row strong small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 800;
  line-height: 1.2;
}

.student-request-spots {
  text-align: center;
  justify-self: center;
  width: 132px;
}

.student-request-free-seat {
  background: rgba(27, 112, 76, .12);
  border-color: rgba(27, 112, 76, .34);
  color: var(--green-dark);
}

.student-request-free-seat strong {
  color: var(--green-dark);
}

.student-request-empty {
  display: grid;
  gap: 8px;
  padding: 22px 24px;
  border: 1px solid rgba(25, 39, 31, .08);
  border-radius: 14px;
  background: rgba(255,255,255,.74);
}

.student-request-empty h3,
.student-request-empty p {
  margin: 0;
}

.schedule-search {
  margin: 0;
}

.student-pool {
  display: grid;
  gap: 10px;
  align-content: start;
}

.student-pool-scroll {
  max-height: min(70vh, 720px);
  overflow-y: auto;
  padding-right: 4px;
}

.student-chip, .assigned-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  border-radius: 12px;
  padding: 8px 10px;
  background: rgba(255,255,255,.84);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 800;
  box-shadow: var(--shadow-soft);
}

.student-chip { cursor: grab; }
.student-chip.selected {
  background: #e4f6ea;
  border-color: rgba(43, 123, 87, .34);
  box-shadow: 0 0 0 3px rgba(43, 123, 87, .12), var(--shadow-soft);
}

.schedule-assign-button {
  width: 100%;
  margin-bottom: 12px;
  justify-content: center;
}

.student-chip-main {
  min-width: 0;
  display: grid;
}

.student-schedule-count {
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(43, 123, 87, .10);
  color: var(--green-dark);
  font-weight: 900;
  border: 1px solid rgba(43, 123, 87, .16);
  flex: 0 0 auto;
}

.student-schedule-count:hover {
  background: rgba(43, 123, 87, .18);
}

.assigned-chip { background: #edf6ff; border-color: #c9ddf3; }
.assigned-chip button {
  min-width: 28px;
  height: 28px;
  border-radius: 8px;
  background: transparent;
  color: var(--danger);
  font-weight: 900;
}

.schedule-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.slot-card {
  position: relative;
  min-height: 170px;
  padding: 16px;
}

.schedule-slot-closed-lock {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(178, 57, 57, .13);
  color: var(--danger);
}

.schedule-slot-closed-lock svg {
  width: 14px;
  height: 14px;
  stroke-width: 3;
}

.slot-card.drop-target {
  outline: 3px solid rgba(40, 102, 177, .22);
}

.slot-students {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.finance-filter {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-bottom: 18px;
}

.finance-search-field {
  flex: 1 1 320px;
}

.finance-table th:nth-child(7),
.finance-table th:nth-child(8),
.finance-center-cell {
  text-align: center;
}

.finance-center-cell .secondary,
.finance-center-cell .finance-reverse-button {
  margin-inline: auto;
}

.finance-reverse-button {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 10px;
  background: rgba(178, 57, 57, .08);
  color: var(--danger);
  border: 1px solid rgba(178, 57, 57, .12);
}

.finance-reverse-button:hover {
  background: rgba(178, 57, 57, .14);
  border-color: rgba(178, 57, 57, .2);
}

.finance-reverse-button svg {
  width: 17px;
  height: 17px;
  stroke-width: 3;
}

.generate-finance-footer {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
}

.generate-finance-groups {
  display: grid;
  gap: 14px;
}

.generate-finance-group {
  display: grid;
  gap: 14px;
}

.generate-finance-group.empty {
  padding: 4px 0;
}

.generate-finance-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.generate-finance-group-header h3 {
  margin: 2px 0 0;
}

.generate-finance-summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.generate-finance-summary strong {
  color: var(--ink);
  font-size: 15px;
}

.generate-finance-groups-table th,
.generate-finance-groups-table td {
  padding-inline: 18px;
}

.generate-finance-groups-table th:nth-child(2),
.generate-finance-groups-table th:nth-child(3),
.generate-finance-groups-table th:nth-child(4),
.generate-finance-groups-table td:nth-child(2),
.generate-finance-groups-table td:nth-child(3),
.generate-finance-groups-table td:nth-child(4) {
  text-align: center;
}

.generate-finance-groups-table td:last-child {
  width: 150px;
}

.generate-finance-groups-table .secondary {
  margin-left: auto;
}

.generate-finance-detail {
  display: grid;
  gap: 0;
}

.generate-finance-detail-header {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 22px 18px 18px;
  border-bottom: 1px solid var(--line);
}

.generate-finance-detail-header .secondary {
  flex: 0 0 auto;
  min-width: 104px;
  min-height: 42px;
  padding-inline: 18px;
}

.generate-finance-detail-header h3 {
  margin: 6px 0 0;
}

.generate-finance-detail-header > div {
  min-width: 0;
}

.generate-finance-detail table th,
.generate-finance-detail table td {
  padding-block: 15px;
}

.generate-finance-detail table th:nth-child(2),
.generate-finance-detail table th:nth-child(3),
.generate-finance-detail table th:nth-child(4),
.generate-finance-detail table td:nth-child(2),
.generate-finance-detail table td:nth-child(3),
.generate-finance-detail table td:nth-child(4) {
  text-align: center;
}

.generate-finance-detail table td:nth-child(4) .secondary {
  margin-inline: auto;
}

#financeLessonDaysModalList {
  margin-top: 14px;
  max-height: min(62vh, 620px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

#financeLessonDaysModalList th:nth-child(2),
#financeLessonDaysModalList th:nth-child(3),
#financeLessonDaysModalList td:nth-child(2),
#financeLessonDaysModalList td:nth-child(3) {
  text-align: center;
}

#financeLessonDaysModal .modal-card {
  max-height: calc(100dvh - 40px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#financeLessonDaysModal .modal-actions {
  flex: 0 0 auto;
  margin-top: 16px;
}

#financeLessonDaysModalList table {
  min-width: 0;
}

#financeLessonDaysModalList th,
#financeLessonDaysModalList td {
  white-space: nowrap;
}

#financeLessonDaysModalList th:nth-child(1),
#financeLessonDaysModalList td:nth-child(1) {
  width: 26%;
}

#financeLessonDaysModalList th:nth-child(2),
#financeLessonDaysModalList td:nth-child(2) {
  width: 28%;
}

#financeLessonDaysModalList th:nth-child(3),
#financeLessonDaysModalList td:nth-child(3) {
  width: 46%;
}

#teacherStudentCreditsList th:nth-child(2),
#teacherStudentCreditsList th:nth-child(3),
#teacherStudentCreditsList td:nth-child(2),
#teacherStudentCreditsList td:nth-child(3) {
  text-align: center;
}

#teacherStudentCreditModalSummary {
  margin: 14px 0;
}

.teacher-credit-modal-filter {
  margin: 16px 0 0;
}

.teacher-credit-summary-card {
  cursor: pointer;
  transition: border-color .2s ease, transform .2s ease;
}

.teacher-credit-summary-card.active {
  border-color: rgba(43, 123, 87, .5);
  transform: translateY(-1px);
}

#teacherStudentCreditModalList th:nth-child(2),
#teacherStudentCreditModalList th:nth-child(3),
#teacherStudentCreditModalList td:nth-child(2),
#teacherStudentCreditModalList td:nth-child(3) {
  text-align: center;
}

#teacherStudentCreditModal .modal-card {
  max-height: calc(100dvh - 40px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#teacherStudentCreditModalList {
  max-height: min(48vh, 460px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

#teacherStudentCreditModalList table {
  min-width: 0;
  table-layout: fixed;
}

#teacherStudentCreditModalList th,
#teacherStudentCreditModalList td {
  padding: 10px 8px;
  overflow-wrap: anywhere;
}

#teacherStudentCreditModalList th:nth-child(1),
#teacherStudentCreditModalList td:nth-child(1) {
  width: 34%;
}

#teacherStudentCreditModalList th:nth-child(2),
#teacherStudentCreditModalList td:nth-child(2) {
  width: 38%;
}

#teacherStudentCreditModalList th:nth-child(3),
#teacherStudentCreditModalList td:nth-child(3) {
  width: 28%;
}

#teacherStudentCreditModal .modal-actions {
  flex: 0 0 auto;
}

.section-stack {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.student-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tab-button {
  min-height: 40px;
  border-radius: 12px;
  padding: 0 14px;
  background: rgba(255,255,255,.58);
  color: #385046;
  font-weight: 800;
  border: 1px solid rgba(21, 32, 25, .07);
}

.tab-button.active {
  background: var(--green);
  color: #fff;
}

.student-hero {
  background: linear-gradient(135deg, rgba(255,255,255,.82), rgba(226,236,230,.78));
}

.lesson-list {
  display: grid;
  gap: 16px;
}

.lesson-card {
  display: grid;
  gap: 14px;
}

.lesson-meta {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.lesson-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

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

.lesson-actions-copy {
  display: grid;
  gap: 6px;
}

.text-warning {
  color: var(--amber);
  font-size: 12px;
  font-weight: 700;
}

.text-danger {
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
}

.danger-button {
  min-height: 44px;
  border-radius: 12px;
  padding: 0 16px;
  background: rgba(178, 57, 57, .12);
  color: var(--danger);
  font-weight: 800;
  border: 1px solid rgba(178, 57, 57, .22);
}

.danger-button:hover {
  background: #f4d7d7;
}

.warning-button {
  min-height: 44px;
  border-radius: 12px;
  padding: 0 16px;
  background: rgba(181, 121, 18, .12);
  color: #8a5c00;
  font-weight: 800;
  border: 1px solid rgba(181, 121, 18, .22);
}

.warning-button:hover {
  background: #f7e7c5;
}

.visible-action {
  min-width: 154px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.danger-button:disabled {
  opacity: .95;
  background: rgba(178, 57, 57, .08);
  color: #9e5b5b;
  border-color: rgba(178, 57, 57, .16);
  cursor: not-allowed;
}

button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 35, 27, .52);
  z-index: 20;
}

.modal-card {
  width: min(420px, 100%);
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(249,251,249,.92);
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.modal-card h3 {
  margin: 0 0 10px;
}

#studentForm {
  margin-top: 18px;
}

.modal-large {
  width: min(680px, 100%);
}

.modal-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.floating-menu {
  position: fixed;
  z-index: 30;
  width: min(230px, calc(100vw - 24px));
  display: grid;
  gap: 6px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(249,251,249,.98);
  box-shadow: var(--shadow);
}

.floating-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  text-align: left;
}

.floating-menu button:hover {
  background: rgba(27, 112, 76, .10);
}

.floating-menu svg {
  width: 18px;
  height: 18px;
}

.search-results {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  max-height: 380px;
  overflow: auto;
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(25, 39, 31, .08);
}

.search-result-item strong {
  display: block;
  margin-bottom: 4px;
}

.modal-actions {
  display: flex;
  justify-content: end;
  gap: 10px;
  margin-top: 18px;
}

.modal-actions-danger-first {
  flex-direction: row-reverse;
}

.student-form-actions {
  display: flex;
  justify-self: end;
  width: auto;
  min-width: 0;
}

.status-paid { color: var(--green-dark); font-weight: 900; }
.status-open { color: var(--amber); font-weight: 900; }
.status-overdue { color: var(--danger); font-weight: 900; }

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 22, 17, .46);
  z-index: 11;
}

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

.app-shell.sidebar-collapsed .content {
  width: calc(100% - var(--sidebar-collapsed) - 54px);
  margin-left: calc(var(--sidebar-collapsed) + 36px);
}

.app-shell.sidebar-collapsed .brand-copy,
.app-shell.sidebar-collapsed .nav-item span,
.app-shell.sidebar-collapsed .logout-button span {
  display: none;
}

.app-shell.sidebar-collapsed .sidebar-top {
  flex-direction: column;
  align-items: center;
}

.app-shell.sidebar-collapsed .brand {
  flex-direction: column;
  justify-content: center;
}

.app-shell.sidebar-collapsed .nav-item,
.app-shell.sidebar-collapsed .logout-button {
  justify-content: center;
  padding-inline: 0;
}

@media (max-width: 900px) {
  body {
    background:
      linear-gradient(180deg, #eef3ef 0%, var(--bg) 56%, #d6dfd8 100%);
  }

  .sidebar {
    inset: 0 auto 0 0;
    width: min(320px, 86vw);
    max-height: 100dvh;
    border-radius: 0 22px 22px 0;
    transform: translateX(calc(-100% - 20px));
    padding-bottom: max(18px, env(safe-area-inset-bottom));
  }

  .app-shell.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .content,
  .app-shell.sidebar-collapsed .content {
    width: 100%;
    margin-left: 0;
    padding: 12px;
  }

  .mobile-sidebar-toggle {
    display: inline-flex;
  }

  .mobile-menu-fab {
    position: fixed;
    right: 16px;
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 10;
    display: inline-flex;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: var(--green);
    color: #fff;
    box-shadow: 0 16px 34px rgba(10, 18, 13, .22);
  }

  .app-shell.hidden ~ .mobile-menu-fab,
  .app-shell.sidebar-open ~ .mobile-menu-fab {
    display: none;
  }

  .sidebar-toggle {
    display: none;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 8;
    padding: 14px;
    border-radius: 0 0 18px 18px;
    margin: -12px -12px 18px;
  }

  .topbar h2 {
    font-size: 24px;
  }

  .grid,
  .schedule-board {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .slots-day-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .form-grid { grid-template-columns: 1fr 1fr; }
  .schedule-layout.active { grid-template-columns: 1fr; }

  .schedule-students-panel {
    position: sticky;
    top: 86px;
    z-index: 7;
  }

  .student-pool-scroll {
    max-height: 220px;
  }
}

@media (max-width: 620px) {
  :root {
    --shadow: 0 18px 44px rgba(10, 18, 13, .14);
    --shadow-soft: 0 10px 24px rgba(10, 18, 13, .09);
  }

  html:has(#loginView:not(.hidden)),
  body:has(#loginView:not(.hidden)) {
    width: 100%;
    height: 100%;
    min-height: 100dvh;
    overflow: hidden;
    background:
      linear-gradient(rgba(10, 24, 17, .55), rgba(10, 24, 17, .4)),
      url("https://images.unsplash.com/photo-1595435934249-5df7ed86e1c0?auto=format&fit=crop&w=1600&q=80") center/cover no-repeat;
  }

  .login-shell {
    position: fixed;
    inset: 0;
    isolation: isolate;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: max(18px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
    place-items: center;
    overflow: hidden;
    background:
      linear-gradient(rgba(10, 24, 17, .55), rgba(10, 24, 17, .4)),
      url("https://images.unsplash.com/photo-1595435934249-5df7ed86e1c0?auto=format&fit=crop&w=1600&q=80") center/cover no-repeat;
  }

  .content {
    padding: 12px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    padding: 14px;
    gap: 12px;
  }

  .topbar h2 {
    font-size: 22px;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: 48px 1fr;
    width: 100%;
  }

  .topbar-actions > *:not(.mobile-sidebar-toggle) {
    width: 100%;
  }

  .mobile-sidebar-toggle {
    width: 48px;
  }

  .grid,
  .cards,
  .schedule-board {
    grid-template-columns: 1fr;
  }

  .slots-day-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .slots-horizontal-scroll {
    grid-auto-columns: minmax(300px, 86vw);
  }

  .slot-line {
    grid-template-columns: 42px minmax(0, 1fr) 56px;
  }

  .slot-line-actions {
    grid-column: 1 / -1;
  }

  .panel,
  .cards .card,
  .slot-card,
  .table-panel {
    border-radius: 16px;
  }

  .panel {
    padding: 16px;
  }

  .cards .card {
    padding: 16px;
  }

  .form-grid,
  .waiting-form,
  .student-toolbar-grid,
  .finance-filter {
    grid-template-columns: 1fr;
    display: grid;
    gap: 12px;
  }

  .waiting-form .span-2 {
    grid-column: auto;
  }

  .span-2 { grid-column: auto; }

  .login-panel {
    width: min(420px, 100%);
    padding: 22px;
    border-radius: 18px;
  }
  .login-panel h1 {
    font-size: 28px;
  }
  .lesson-meta, .lesson-actions { flex-direction: column; align-items: stretch; }
  .teacher-student-row,
  .teacher-student-main {
    align-items: stretch;
  }

  .teacher-student-row {
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    border-radius: 14px;
  }

  .teacher-student-side { justify-items: start; }
  .teacher-student-status { justify-items: start; }
  .teacher-slot-header,
  .teacher-slot-actions,
  .lesson-actions-buttons,
  .slot-item {
    flex-direction: column;
    align-items: stretch;
  }
  .teacher-slot-actions > *,
  .lesson-actions-buttons > *,
  .inline-form-action > * {
    width: 100%;
  }

  .teacher-student-actions,
  .teacher-student-actions > button {
    width: 100%;
  }

  .slot-add-button,
  .secondary,
  .primary,
  .danger-button,
  .warning-button {
    justify-content: center;
  }
  .confirmation-progress { justify-content: flex-start; }
  .slot-hidden-banner,
  .waiting-card-head { flex-direction: column; align-items: stretch; }
  .waiting-card-actions { justify-items: start; }
  .student-chip {
    align-items: center;
  }
  .schedule-day-filters {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .schedule-day-filters::-webkit-scrollbar {
    display: none;
  }

  .schedule-day-chip span {
    min-width: 54px;
  }

  .student-request-row,
  .student-request-row-head {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .student-request-row-head {
    display: none;
  }

  .student-request-row > button {
    width: 100%;
  }

  .schedule-students-panel {
    top: 104px;
  }

  .schedule-panel-header {
    display: grid;
    gap: 10px;
  }

  .student-pool {
    grid-auto-flow: column;
    grid-auto-columns: minmax(190px, 76vw);
    overflow-x: auto;
    padding: 2px 2px 8px;
    scrollbar-width: none;
  }

  .student-pool::-webkit-scrollbar {
    display: none;
  }

  .student-pool-scroll {
    max-height: none;
    overflow-y: visible;
  }

  .student-chip {
    min-height: 52px;
    white-space: normal;
  }

  .slot-card {
    min-height: 0;
    padding: 15px;
  }

  .assigned-chip {
    align-items: flex-start;
  }

  .assigned-chip button {
    min-width: 36px;
    height: 36px;
  }

  .slots-day-card {
    padding: 18px;
    gap: 18px;
  }
  .slots-day-header h3,
  .slot-item-main strong {
    font-size: 20px;
  }
  .slot-item-main p,
  .slots-day-card > .muted,
  .slots-day-list > .muted {
    font-size: 16px;
  }
  .modal-card,
  .modal-large {
    width: 100%;
    max-height: calc(100dvh - 24px);
    overflow: auto;
    padding: 20px;
  }
  .modal-actions { flex-direction: column; }
  .modal-actions > * { width: 100%; }

  .generate-finance-group-header,
  .generate-finance-summary {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .generate-finance-group-header {
    flex-direction: column;
  }

  .generate-finance-detail-header {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 18px 14px 16px;
  }

  .table-panel {
    overflow: visible;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  table,
  thead,
  tbody,
  tfoot,
  tr,
  th,
  td {
    display: block;
    width: 100%;
  }

  table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 12px;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  tbody {
    display: grid;
    gap: 12px;
  }

  tfoot {
    display: grid;
    margin-top: 12px;
  }

  tr {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,.82);
    box-shadow: var(--shadow-soft);
  }

  td {
    display: grid;
    grid-template-columns: minmax(96px, 38%) minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 34px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(25, 39, 31, .08);
    background: transparent;
    overflow-wrap: anywhere;
  }

  td:last-child {
    border-bottom: 0;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
  }

  td .secondary,
  td .primary {
    width: 100%;
  }

  .finance-total-label,
  .finance-total-spacer {
    display: none;
  }

  .finance-total-value {
    text-align: left;
  }
}

@media (min-width: 1400px) {
  .content {
    width: calc(100% - var(--sidebar-width) - 64px);
    padding-right: 32px;
  }

  .grid.cards {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }

  .schedule-board {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
}
