:root {
  --orange: #ff6b00;
  --orange-dark: #ed5f00;
  --orange-soft: #fff4ea;
  --green: #09b44d;
  --green-soft: #e9fff3;
  --red: #ef233c;
  --red-soft: #fff0f2;
  --blue: #126dff;
  --purple: #8b2cff;
  --ink: #111827;
  --text: #334155;
  --muted: #94a3b8;
  --line: #e5e7eb;
  --panel: #ffffff;
  --bg: #f4f5f7;
  --shadow: 0 8px 24px rgba(15, 23, 42, .10);
  --shadow-soft: 0 4px 12px rgba(15, 23, 42, .08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Compact selected lesson panel */
.lesson-panel {
  position: relative;
}
.lesson-panel header {
  padding: 16px 22px 14px;
  position: relative;
}
.lesson-panel h2 {
  margin: 10px 44px 0 0;
  font-size: 24px;
  line-height: 1.1;
}
.panel-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.panel-close svg {
  width: 20px;
  height: 20px;
}
.panel-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 48px;
  color: #0f172a;
}
.panel-body {
  padding: 18px 22px 22px;
  gap: 16px;
}
.badge {
  padding: 6px 11px;
}
.topic-button {
  min-height: 48px;
  justify-content: center;
  width: 100%;
}
.panel-actions {
  gap: 10px;
}
.panel-action {
  min-height: 68px;
  gap: 5px;
  background: #fff;
}
.panel-action svg {
  width: 22px;
  height: 22px;
}
.panel-body label {
  display: grid;
  gap: 8px;
}
.panel-body label strong {
  font-size: 14px;
  letter-spacing: 0;
}
.note-field {
  min-height: 82px;
  border-radius: 14px;
  padding: 14px 16px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
}
button, input, textarea, select {
  font: inherit;
}
button {
  border: 0;
  cursor: pointer;
  background: none;
  color: inherit;
}
.app-shell {
  min-height: 100vh;
  display: flex;
}
.sidebar {
  width: 322px;
  min-height: 100vh;
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
}
.brand {
  height: 46px;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  border-bottom: 1px solid var(--line);
}
.brand-mark, .assistant-bubble {
  display: grid;
  place-items: center;
  color: #111827;
  background: linear-gradient(145deg, #ff7a00, #ff9d3b);
  font-weight: 900;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.12);
}
.brand-mark {
  width: 30px;
  height: 24px;
  border-radius: 8px 8px 12px 12px;
}
.brand strong {
  color: #242424;
  font-size: 30px;
  line-height: 1;
}
.brand span { color: var(--orange); }
.nav-list {
  padding: 38px 14px 0;
  display: grid;
  gap: 12px;
}
.nav-item {
  height: 59px;
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 0 20px;
  border-radius: 15px;
  color: #667085;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
}
.nav-item svg { color: #98a2b3; }
.nav-item.active {
  color: var(--orange);
  background: var(--orange-soft);
}
.nav-item.active svg { color: var(--orange); }
.collapse-pill {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #f8fafc;
  margin: auto 22px 18px auto;
  color: #667085;
}
.account-card, .trial-card, .logout {
  margin-inline: 16px;
  border-radius: 14px;
}
.account-card {
  background: #f8fafc;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.avatar {
  width: 53px;
  height: 53px;
  border-radius: 999px;
  background: #fff0d8;
  color: var(--orange);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 22px;
}
.account-card strong {
  color: var(--ink);
  display: block;
  font-size: 18px;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-card small { color: #64748b; font-size: 16px; }
.account-card > svg { margin-left: auto; color: #94a3b8; }
.trial-card {
  margin-top: 22px;
  background: #f8fafc;
  padding: 16px;
}
.trial-card > div:first-child {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
}
.trial-card span { color: #667085; }
.trial-card strong { color: #00a241; }
.progress {
  height: 9px;
  border-radius: 999px;
  background: #e5e7eb;
  margin: 14px 0;
  overflow: hidden;
}
.progress i { display: block; height: 100%; width: 100%; background: #10b957; }
.logout {
  height: 54px;
  border: 1px solid var(--line);
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 800;
  color: #475569;
  text-decoration: none;
}
.main {
  width: calc(100% - 322px);
  margin-left: 322px;
  padding: 45px 44px;
}
.view { display: none; }
.view.active { display: block; }
.top-card, .calendar-toolbar {
  background: var(--panel);
  border-radius: 30px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(226,232,240,.8);
}
.top-card {
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 26px;
  margin-bottom: 44px;
}
.search-box {
  width: 297px;
  height: 64px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  box-shadow: inset 0 1px 2px rgba(15,23,42,.03), var(--shadow-soft);
}
.search-box input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 100%;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}
.search-box input::placeholder { color: #98a2b3; }
.student-tools, .toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.segmented {
  display: inline-flex;
  padding: 5px;
  border-radius: 14px;
  background: #f1f3f6;
  border: 1px solid var(--line);
  min-height: 54px;
}
.segmented button {
  min-width: 70px;
  padding: 0 17px;
  border-radius: 10px;
  font-weight: 800;
}
.segmented button.active {
  color: var(--orange);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}
.segmented.compact button { min-width: 66px; }
.ghost, .icon-button, .primary {
  min-height: 54px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  font-weight: 800;
}
.ghost, .icon-button {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.ghost.orange {
  color: var(--orange);
  background: var(--orange-soft);
  border-color: #fed7aa;
}
.icon-button {
  width: 60px;
  padding: 0;
}
.icon-button.active-orange {
  color: white;
  background: var(--orange);
  border-color: var(--orange);
}
.primary {
  background: var(--orange);
  color: white;
  box-shadow: 0 12px 22px rgba(255, 107, 0, .24);
}
.primary:hover { background: var(--orange-dark); }
.primary.small { width: 100%; min-height: 39px; }
.primary.large {
  height: 64px;
  border-radius: 32px;
  font-size: 22px;
  padding: 0 42px;
}
.list-header, .student-row {
  display: grid;
  grid-template-columns: 1.3fr 110px 1.8fr 160px 110px 180px 34px;
  align-items: center;
  gap: 12px;
}
.list-header {
  padding: 0 20px 18px;
  color: #98a2b3;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .04em;
}
.student-list {
  display: grid;
  gap: 12px;
}
.student-list.grid-cards {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.student-card {
  min-height: 255px;
  background: var(--panel);
  border-radius: 20px;
  padding: 23px;
  display: grid;
  gap: 18px;
  box-shadow: var(--shadow-soft);
}
.student-card header,
.student-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.student-card header strong {
  color: var(--ink);
  font-size: 22px;
}
.student-card .schedule-mini {
  grid-template-columns: repeat(7, 1fr) 22px;
}
.empty-mini {
  min-height: 160px;
  display: grid;
  place-items: center;
  color: #94a3b8;
  background: var(--panel);
  border: 1px dashed #dbe3ee;
  border-radius: 20px;
  font-weight: 800;
}
.student-row {
  min-height: 139px;
  background: var(--panel);
  border-radius: 20px;
  padding: 23px 20px;
}
.student-name {
  display: grid;
  gap: 5px;
}
.student-name strong {
  color: var(--ink);
  font-size: 24px;
}
.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--green);
  display: inline-block;
  margin-right: 10px;
  box-shadow: 0 0 0 4px #dcfce7;
}
.muted-line {
  color: #c3cad6;
  font-style: italic;
}
.link-button {
  display: inline-flex;
  width: max-content;
  padding: 0;
  text-align: left;
}
.dash-button {
  border: 1px dashed #cbd5e1;
  color: #94a3b8;
  border-radius: 8px;
  padding: 5px 12px;
  width: max-content;
  font-weight: 700;
}
.grade-pill {
  background: #f3f4f6;
  color: #64748b;
  border-radius: 6px;
  padding: 6px 11px;
  font-weight: 800;
}
.schedule-mini {
  display: grid;
  grid-template-columns: repeat(7, minmax(54px, 1fr)) 22px;
  gap: 4px;
  align-items: center;
}
.day-pill {
  min-height: 38px;
  border-radius: 8px;
  background: #f8fafc;
  color: #cbd5e1;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 12px;
}
.day-pill.active {
  background: #fff4ea;
  border: 1px solid #fdba74;
  color: var(--orange);
}
.money {
  color: #14213d;
  font-weight: 900;
  font-size: 18px;
}
.money small { color: #98a2b3; font-size: 14px; }
.monthly { color: #00a241; font-weight: 800; }
.parent-button {
  color: #ff1d4d;
  background: #fff4f5;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  min-height: 36px;
  padding: 0 14px;
  font-weight: 800;
}
.more-button { color: #94a3b8; }
.add-row {
  width: 100%;
  height: 73px;
  margin-top: 12px;
  border: 2px dashed #e2e8f0;
  border-radius: 22px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 18px;
  padding-left: 28px;
  font-size: 18px;
  font-weight: 800;
}
.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0;
  margin-bottom: 34px;
  background: transparent;
  box-shadow: none;
  border: 0;
}
.date-switch {
  display: flex;
  align-items: center;
  gap: 10px;
}
.date-switch strong {
  min-height: 48px;
  display: grid;
  place-items: center;
  padding: 0 20px;
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  color: #14213d;
}
.calendar-layout {
  display: grid;
  grid-template-columns: minmax(600px, 1fr);
  gap: 32px;
}
.calendar-layout.has-panel {
  grid-template-columns: minmax(600px, 1fr) 475px;
}
.week-board {
  height: 665px;
  border-radius: 14px;
  background: var(--panel);
  overflow: auto;
  box-shadow: var(--shadow-soft);
  position: relative;
}
.week-grid {
  min-width: 900px;
  display: grid;
  grid-template-columns: 76px repeat(7, 1fr);
  grid-template-rows: 102px;
  grid-auto-rows: 148px;
}
.week-cell, .time-cell, .day-head {
  border-right: 1px solid #eef2f7;
  border-bottom: 1px solid #eef2f7;
}
.week-cell {
  position: relative;
  overflow: hidden;
}
.day-head {
  text-align: center;
  padding-top: 18px;
  color: #667085;
  font-weight: 900;
}
.day-head b {
  display: block;
  color: var(--ink);
  font-size: 25px;
  margin-top: 6px;
}
.day-head small {
  display: block;
  margin-top: 3px;
  color: #98a2b3;
  font-size: 12px;
  font-weight: 800;
}
.day-head.today b {
  width: 43px;
  height: 43px;
  margin: 6px auto 0;
  border-radius: 999px;
  color: white;
  background: var(--orange);
  display: grid;
  place-items: center;
}
.time-cell {
  color: #94a3b8;
  font-weight: 800;
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
}
.lesson-card {
  height: calc(100% - 20px);
  min-height: 0;
  margin: 10px 8px;
  border-radius: 10px;
  border: 1px solid #fed7aa;
  background: #fff8f0;
  color: #562312;
  padding: 10px 14px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.lesson-card.done {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #14532d;
}
.lesson-card.cancelled {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #881337;
}
.lesson-card strong {
  color: inherit;
  display: block;
  font-size: 18px;
  line-height: 1.15;
  overflow-wrap: break-word;
  word-break: normal;
}
.lesson-card > span,
.lesson-card > small {
  flex: 0 0 auto;
}
.lesson-card > small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lesson-actions {
  border-top: 1px solid rgba(15,23,42,.06);
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 6px;
  width: 100%;
  min-width: 0;
}
.round-action {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  display: grid;
  place-items: center;
}
.round-action.green { color: var(--green); }
.round-action.orange { color: var(--orange); }
.round-action.red { color: var(--red); }
.lesson-action-chip {
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
}
.lesson-action-chip svg {
  width: 15px;
  height: 15px;
}
.lesson-panel {
  height: 665px;
  background: var(--panel);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  overflow: auto;
  display: none;
}
.lesson-panel.is-open {
  display: block;
}
.lesson-panel header {
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
}
.lesson-panel h2 {
  color: var(--ink);
  margin: 6px 0 0;
  font-size: 26px;
}
.panel-body {
  padding: 26px 28px;
  display: grid;
  gap: 26px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  font-weight: 900;
  background: var(--orange-soft);
  color: var(--orange-dark);
}
.panel-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.panel-action {
  min-height: 86px;
  border-radius: 13px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  gap: 8px;
  font-weight: 800;
}
.panel-action.green { color: var(--green); }
.panel-action.orange { color: var(--orange); }
.panel-action.red { color: var(--red); }
.note-field {
  min-height: 106px;
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #f8fafc;
  padding: 18px 20px;
  resize: vertical;
  outline: 0;
  color: var(--text);
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 48px;
}
.page-heading h1 {
  color: var(--ink);
  font-size: 42px;
  margin: 0 0 4px;
}
.page-heading p, .chart-card p {
  margin: 0;
  color: #64748b;
  font-size: 22px;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 32px;
}
.metric-card, .chart-card, .payments-card, .empty-state, .messages-card {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  border-radius: 18px;
}
.metric-card {
  min-height: 264px;
  padding: 26px;
  display: grid;
  align-content: start;
  gap: 18px;
}
.metric-icon, .soft-icon, .empty-icon {
  width: 55px;
  height: 55px;
  border-radius: 18px;
  display: grid;
  place-items: center;
}
.metric-icon.pink { color: #e11d48; background: #fff1f5; }
.metric-icon.orange { color: var(--orange); background: var(--orange-soft); }
.metric-icon.blue { color: var(--blue); background: #eff6ff; }
.metric-icon.purple { color: var(--purple); background: #faf5ff; }
.metric-icon.green { color: var(--green); background: #f0fdf4; }
.metric-card h3 {
  color: #64748b;
  font-size: 18px;
  margin: 0;
}
.metric-card strong {
  color: var(--ink);
  font-size: 34px;
}
.metric-card p {
  color: #64748b;
  margin: 0;
  font-weight: 700;
}
.finance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 42px;
}
.chart-card {
  min-height: 360px;
  padding: 36px 32px;
}
.chart-card header, .payments-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.chart-card h2, .payments-card h2 {
  color: var(--ink);
  margin: 0 0 8px;
  font-size: 26px;
}
.fake-chart, .hour-bars {
  height: 210px;
  margin-top: 24px;
  display: flex;
  align-items: end;
  gap: 14px;
  border-top: 1px dashed #e5e7eb;
  border-bottom: 1px dashed #e5e7eb;
}
.chart-bar-item {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto auto;
  align-items: end;
  gap: 4px;
  text-align: center;
}
.bar {
  width: 100%;
  min-height: 6px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, #ff9d3b, #ff6b00);
}
.hour-bars .bar {
  background: linear-gradient(180deg, #60a5fa, #2563eb);
}
.chart-bar-item strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}
.chart-bar-item span {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}
.payments-card {
  margin-top: 32px;
  padding: 26px;
  min-height: 270px;
}
.payments-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}
.payments-table th, .payments-table td {
  text-align: left;
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
}
.empty-state {
  min-height: 550px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  padding: 40px;
}
.empty-state h2, .message-empty h2 {
  color: var(--ink);
  margin: 18px 0 6px;
}
.empty-state p, .message-empty p {
  color: #94a3b8;
  font-size: 20px;
  max-width: 460px;
}
.empty-icon { background: #f8fafc; color: #cbd5e1; width: 72px; height: 72px; border-radius: 999px; }
.empty-icon.orange { background: var(--orange-soft); color: var(--orange); }
.messages-card {
  min-height: 748px;
  display: grid;
  grid-template-columns: 460px 1fr;
  overflow: hidden;
}
.messages-card aside {
  border-right: 1px solid var(--line);
  padding: 26px 24px;
}
.message-tools {
  display: flex;
  gap: 10px;
}
.small-search { width: 280px; }
.message-person {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px;
  border-radius: 14px;
}
.message-person:hover { background: #f8fafc; }
.message-person.selected { background: var(--orange-soft); }
.message-person strong { color: var(--ink); display: block; font-size: 18px; }
.message-person small { color: #64748b; }
.message-empty {
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
}
.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0,0,0,.78);
  display: none;
  place-items: center;
  padding: 20px;
}
.modal-layer.active { display: grid; }
.modal {
  width: min(904px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: var(--panel);
  border-radius: 30px;
  box-shadow: 0 30px 80px rgba(0,0,0,.28);
  position: relative;
}
.modal.narrow { width: min(565px, 100%); }
.modal-close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 45px;
  height: 45px;
  border-radius: 999px;
  background: #f1f3f6;
  color: #475569;
  z-index: 2;
}
.modal-content {
  padding: 36px 33px 32px;
}
.modal-content h1 {
  color: var(--ink);
  margin: 0 0 18px;
  font-size: 30px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field {
  display: grid;
  gap: 10px;
  color: #292929;
  font-weight: 900;
}
.field input, .field select, .field textarea {
  min-height: 64px;
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 18px;
  padding: 0 22px;
  outline: 0;
  color: #292929;
  font-size: 20px;
  box-shadow: var(--shadow-soft);
}
.field textarea {
  padding-top: 18px;
  min-height: 122px;
  resize: vertical;
}
.full { grid-column: 1 / -1; }
.choice-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.choice {
  min-height: 48px;
  border-radius: 14px;
  padding: 0 18px;
  font-weight: 900;
  background: #f1f3f6;
  color: #64748b;
}
.choice.active {
  color: white;
  background: var(--orange);
}
.modal-footer {
  border-top: 1px solid var(--line);
  padding: 28px 33px;
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  background: rgba(255,255,255,.94);
  position: sticky;
  bottom: 0;
}
.outline {
  min-height: 58px;
  border-radius: 14px;
  border: 2px solid #292929;
  padding: 0 32px;
  font-weight: 900;
  background: var(--panel);
}
.ai-box, .repeat-box, .info-box {
  border: 1px solid #fed7aa;
  background: #fffbf5;
  border-radius: 16px;
  padding: 16px 18px;
}
.ai-box {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  margin-bottom: 28px;
}
.ai-box svg { color: var(--orange); }
.tabs {
  display: inline-flex;
  background: #f1f3f6;
  padding: 5px;
  border-radius: 15px;
  margin-bottom: 20px;
}
.tabs button {
  min-height: 50px;
  border-radius: 10px;
  padding: 0 22px;
  font-weight: 900;
  color: #667085;
}
.tabs button.active { background: var(--panel); color: var(--orange); box-shadow: var(--shadow-soft); }
.upload-box {
  min-height: 128px;
  border: 2px dashed #dbe3ee;
  border-radius: 16px;
  display: grid;
  place-items: center;
  text-align: center;
  color: #64748b;
  margin-bottom: 24px;
}
.pill-info {
  background: #eff6ff;
  border: 1px solid #93c5fd;
  color: #0b5fff;
  border-radius: 9px;
  padding: 14px;
  margin: 18px 0;
}
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 30px;
}
.step {
  width: 58px;
  height: 58px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #e5e7eb;
  color: #64748b;
  font-weight: 900;
  font-size: 24px;
}
.step.active { background: var(--orange); color: white; box-shadow: 0 12px 28px rgba(255,107,0,.36); }
.step.done { background: var(--green); color: white; }
.step-line { width: 86px; height: 4px; border-radius: 99px; background: #e5e7eb; }
.confirm-modal {
  text-align: center;
  padding: 42px 46px;
}
.confirm-icon {
  width: 118px;
  height: 118px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  margin: 0 auto 22px;
  font-size: 46px;
}
.confirm-icon.green { color: var(--green); background: #d1fae5; }
.confirm-icon.red { color: var(--red); background: #ffe4e6; }
.confirm-modal h1 {
  font-size: 42px;
  margin: 0 0 14px;
  color: var(--ink);
}
.confirm-modal p {
  color: #667085;
  font-size: 24px;
  margin-bottom: 34px;
}
.toast-stack {
  position: fixed;
  right: 16px;
  bottom: 22px;
  display: grid;
  gap: 12px;
  z-index: 100;
}
.toast {
  min-width: 360px;
  max-width: 520px;
  min-height: 72px;
  border-radius: 18px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #1f2937;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  font-size: 20px;
  font-weight: 700;
}
.toast svg { color: var(--green); }
.assistant-bubble {
  position: fixed;
  right: 27px;
  bottom: 129px;
  width: 76px;
  height: 76px;
  border-radius: 999px;
  background: #fff2e7;
  border: 1px solid #fed7aa;
  z-index: 30;
}
.fab-wrap {
  position: fixed;
  right: 24px;
  bottom: 37px;
  z-index: 35;
}
.fab {
  width: 74px;
  height: 74px;
  border-radius: 999px;
  background: var(--orange);
  color: white;
  box-shadow: 0 14px 28px rgba(255,107,0,.34);
}
.fab svg { width: 36px; height: 36px; }
.fab-menu {
  display: none;
  position: absolute;
  right: 4px;
  bottom: 89px;
  width: 250px;
  gap: 10px;
}
.fab-menu.active { display: grid; }
.fab-menu button {
  min-height: 86px;
  background: var(--panel);
  border-radius: 22px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 22px;
  font-weight: 900;
  color: #334155;
  border: 1px solid transparent;
}
.fab-menu button:hover {
  border-color: #fdba74;
  color: var(--orange);
}
.mobile-nav { display: none; }

@media (max-width: 1260px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .calendar-layout { grid-template-columns: 1fr; }
  .lesson-panel { display: none; }
  .list-header { display: none; }
  .student-row {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width: 820px) {
  .sidebar { display: none; }
  .main {
    width: 100%;
    margin-left: 0;
    padding: 24px 14px 118px;
  }
  .top-card {
    display: grid;
    border-radius: 24px;
    margin-bottom: 22px;
  }
  .search-box, .small-search { width: 100%; }
  .student-tools, .toolbar-actions { justify-content: flex-start; }
  .calendar-toolbar { display: grid; }
  .calendar-layout { display: block; }
  .week-board { height: 620px; }
  .metric-grid, .finance-grid, .messages-card {
    grid-template-columns: 1fr;
  }
  .messages-card aside { border-right: 0; border-bottom: 1px solid var(--line); }
  .page-heading {
    display: grid;
    gap: 18px;
  }
  .page-heading h1 { font-size: 34px; }
  .primary.large { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .assistant-bubble { right: 16px; bottom: 170px; width: 66px; height: 66px; }
  .fab-wrap { right: 19px; bottom: 93px; }
  .mobile-nav {
    position: fixed;
    inset: auto 0 0;
    height: 82px;
    background: var(--panel);
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    z-index: 50;
  }
  .mobile-nav .nav-item {
    height: 82px;
    padding: 0;
    border-radius: 0;
    display: grid;
    justify-items: center;
    gap: 3px;
    font-size: 12px;
    background: transparent;
  }
  .mobile-nav .nav-item svg { width: 24px; height: 24px; }
  .toast { min-width: 0; width: calc(100vw - 32px); font-size: 16px; }
}

/* Compact Ajanda density */
body {
  font-size: 14px;
}
.sidebar {
  width: 318px;
}
.brand {
  height: 42px;
}
.brand strong {
  font-size: 28px;
}
.nav-list {
  padding-top: 32px;
  gap: 8px;
}
.nav-item {
  height: 58px;
  gap: 14px;
  padding: 0 18px;
  border-radius: 14px;
  font-size: 16px;
}
.nav-item svg {
  width: 22px;
  height: 22px;
}
.collapse-pill {
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
}
.account-card {
  padding: 14px;
  gap: 12px;
}
.avatar {
  width: 50px;
  height: 50px;
  font-size: 20px;
}
.account-card strong {
  font-size: 16px;
}
.account-card small {
  font-size: 14px;
}
.logout {
  height: 50px;
  margin-top: 14px;
  font-size: 15px;
}
.main {
  width: calc(100% - 318px);
  margin-left: 318px;
  padding: 44px 36px 30px;
}
.top-card {
  min-height: 88px;
  border-radius: 26px;
  gap: 14px;
  padding: 16px 22px;
  margin-bottom: 38px;
}
.search-box {
  width: 296px;
  height: 58px;
  border-radius: 16px;
  gap: 12px;
  padding: 0 18px;
}
.search-box svg {
  width: 24px;
  height: 24px;
}
.search-box input {
  font-size: 18px;
}
.student-tools,
.toolbar-actions {
  gap: 8px;
}
.segmented {
  min-height: 50px;
  padding: 4px;
  border-radius: 13px;
}
.segmented button {
  min-width: 64px;
  padding: 0 14px;
  border-radius: 9px;
  font-size: 14px;
}
.segmented.compact button {
  min-width: 62px;
}
.ghost,
.icon-button,
.primary {
  min-height: 50px;
  border-radius: 13px;
  gap: 8px;
  padding: 0 17px;
  font-size: 14px;
}
.icon-button {
  width: 56px;
}
.ghost svg,
.icon-button svg,
.primary svg {
  width: 20px;
  height: 20px;
}
.primary.large {
  height: 58px;
  border-radius: 18px;
  font-size: 18px;
  padding: 0 34px;
}
.list-header,
.student-row {
  grid-template-columns: 1.28fr 100px 1.75fr 145px 95px 164px 28px;
  gap: 10px;
}
.list-header {
  padding: 0 20px 16px;
  font-size: 13px;
}
.student-list {
  gap: 11px;
}
.student-row {
  min-height: 138px;
  border-radius: 20px;
  padding: 22px 20px;
}
.student-name strong {
  font-size: 22px;
}
.muted-line,
.dash-button,
.grade-pill,
.parent-button,
.monthly,
.money small {
  font-size: 14px;
}
.dash-button {
  padding: 4px 10px;
}
.grade-pill {
  padding: 5px 10px;
}
.schedule-mini {
  grid-template-columns: repeat(7, minmax(50px, 1fr)) 20px;
  gap: 4px;
}
.day-pill {
  min-height: 36px;
  border-radius: 8px;
  font-size: 12px;
}
.money {
  font-size: 17px;
}
.parent-button {
  min-height: 34px;
  padding: 0 12px;
}
.add-row {
  height: 70px;
  border-radius: 21px;
  gap: 16px;
  padding-left: 26px;
  font-size: 17px;
}
.calendar-toolbar {
  gap: 14px;
  margin-bottom: 32px;
}
.date-switch {
  gap: 8px;
}
.date-switch strong {
  min-height: 48px;
  padding: 0 18px;
  font-size: 15px;
}
.calendar-layout {
  grid-template-columns: minmax(600px, 1fr);
  gap: 30px;
}
.calendar-layout.has-panel {
  grid-template-columns: minmax(600px, 1fr) 475px;
}
.week-board,
.lesson-panel {
  height: 665px;
}
.week-grid {
  grid-template-columns: 76px repeat(7, 1fr);
  grid-template-rows: 102px;
  grid-auto-rows: 148px;
}
.day-head {
  padding-top: 17px;
  font-size: 15px;
}
.day-head b {
  font-size: 24px;
}
.day-head.today b {
  width: 42px;
  height: 42px;
}
.time-cell {
  padding: 9px 12px;
  font-size: 14px;
}
.lesson-card {
  height: calc(100% - 18px);
  min-height: 0;
  margin: 9px 8px;
  padding: 9px 13px;
  font-size: 13px;
}
.lesson-card strong {
  font-size: 17px;
}
.lesson-actions {
  margin-top: 8px;
  padding-top: 7px;
  gap: 6px;
}
.round-action {
  width: 32px;
  height: 32px;
}
.lesson-action-chip {
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
}
.lesson-panel header {
  padding: 17px 26px;
}
.lesson-panel h2 {
  font-size: 24px;
}
.panel-body {
  padding: 24px 26px;
  gap: 22px;
}
.badge {
  padding: 6px 12px;
  font-size: 13px;
}
.panel-actions {
  gap: 10px;
}
.panel-action {
  min-height: 84px;
  font-size: 14px;
}
.note-field {
  min-height: 104px;
  border-radius: 15px;
  padding: 16px 18px;
  font-size: 14px;
}
.page-heading {
  margin-bottom: 44px;
}
.page-heading h1 {
  font-size: 40px;
}
.page-heading p,
.chart-card p {
  font-size: 20px;
}
.metric-grid {
  gap: 30px;
}
.metric-card {
  min-height: 252px;
  padding: 24px;
  gap: 16px;
}
.metric-icon,
.soft-icon {
  width: 54px;
  height: 54px;
}
.metric-card h3 {
  font-size: 17px;
}
.metric-card strong {
  font-size: 32px;
}
.metric-card p {
  font-size: 15px;
}
.finance-grid {
  gap: 30px;
  margin-top: 40px;
}
.chart-card {
  min-height: 350px;
  padding: 34px 30px;
}
.chart-card h2,
.payments-card h2 {
  font-size: 24px;
}
.payments-card {
  margin-top: 30px;
  padding: 24px;
}
.empty-state {
  min-height: 520px;
  padding: 36px;
}
.empty-state p,
.message-empty p {
  font-size: 18px;
}
.messages-card {
  min-height: 720px;
  grid-template-columns: 455px 1fr;
}
.messages-card aside {
  padding: 24px 22px;
}
.message-person {
  margin-top: 20px;
  gap: 14px;
}
.message-person strong {
  font-size: 17px;
}
.message-person small {
  font-size: 14px;
}
.modal {
  border-radius: 28px;
}
.modal.narrow {
  width: min(540px, 100%);
}
.modal-close {
  width: 42px;
  height: 42px;
}
.modal-content {
  padding: 34px 32px 30px;
}
.modal-content h1 {
  font-size: 28px;
  margin-bottom: 17px;
}
.form-grid {
  gap: 16px;
}
.field {
  gap: 9px;
  font-size: 15px;
}
.field input,
.field select,
.field textarea {
  min-height: 58px;
  border-radius: 16px;
  padding: 0 20px;
  font-size: 18px;
}
.field textarea {
  min-height: 112px;
  padding-top: 16px;
}
.choice {
  min-height: 46px;
  border-radius: 13px;
  padding: 0 16px;
  font-size: 15px;
}
.ai-box,
.repeat-box,
.info-box {
  padding: 15px 17px;
}
.ai-box {
  margin-bottom: 24px;
}
.tabs button {
  min-height: 48px;
  padding: 0 20px;
}
.upload-box {
  min-height: 120px;
}
.modal-footer {
  padding: 24px 32px;
  gap: 14px;
}
.outline {
  min-height: 54px;
  border-radius: 13px;
  padding: 0 28px;
}
.step {
  width: 54px;
  height: 54px;
  font-size: 22px;
}
.confirm-modal {
  padding: 38px 42px;
}
.confirm-icon {
  width: 108px;
  height: 108px;
}
.confirm-modal h1 {
  font-size: 38px;
}
.confirm-modal p {
  font-size: 22px;
}
.toast {
  min-height: 66px;
  border-radius: 16px;
  padding: 12px 18px;
  font-size: 18px;
}
.assistant-bubble {
  width: 70px;
  height: 70px;
  right: 27px;
  bottom: 124px;
}
.fab {
  width: 70px;
  height: 70px;
}
.fab svg {
  width: 34px;
  height: 34px;
}
.fab-menu {
  bottom: 84px;
  width: 250px;
  gap: 9px;
}
.fab-menu button {
  min-height: 82px;
  border-radius: 20px;
  padding: 0 20px;
  font-size: 15px;
}

@media (max-width: 820px) {
  body {
    font-size: 13px;
  }
  .main {
    width: 100%;
    margin-left: 0;
    padding: 18px 10px 104px;
  }
  .top-card {
    min-height: 0;
    border-radius: 22px;
    padding: 14px;
    margin-bottom: 18px;
    gap: 12px;
  }
  .search-box,
  .small-search {
    height: 54px;
  }
  .student-row {
    min-height: 0;
    padding: 18px;
    gap: 14px;
  }
  .student-name strong {
    font-size: 22px;
  }
  .schedule-mini {
    grid-template-columns: repeat(7, minmax(42px, 1fr)) 20px;
  }
  .calendar-toolbar {
    gap: 10px;
    margin-bottom: 18px;
  }
  .week-board {
    height: 610px;
  }
  .week-grid {
    min-width: 760px;
    grid-template-columns: 70px repeat(7, 1fr);
  }
  .mobile-nav {
    height: 74px;
  }
  .mobile-nav .nav-item {
    height: 74px;
    font-size: 11px;
  }
  .assistant-bubble {
    width: 62px;
    height: 62px;
    bottom: 154px;
  }
  .fab-wrap {
    bottom: 86px;
  }
  .fab {
    width: 66px;
    height: 66px;
  }
}

/* Final compact selected lesson panel */
.calendar-layout.has-panel {
  grid-template-columns: minmax(600px, 1fr) 390px;
  gap: 20px;
}
.lesson-panel {
  position: relative;
}
.lesson-panel header {
  padding: 14px 18px 12px;
  position: relative;
}
.lesson-panel h2 {
  margin: 8px 42px 0 0;
  font-size: 22px;
  line-height: 1.1;
}
.panel-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.panel-close svg {
  width: 19px;
  height: 19px;
}
.panel-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-right: 42px;
  color: #0f172a;
  font-size: 14px;
}
.badge {
  padding: 5px 10px;
  gap: 5px;
  font-size: 13px;
}
.badge svg {
  width: 18px;
  height: 18px;
}
.panel-body {
  padding: 16px 18px 18px;
  gap: 14px;
}
.topic-button {
  min-height: 44px;
  width: 100%;
  justify-content: center;
}
.panel-actions {
  gap: 6px;
}
.panel-action {
  min-height: 52px;
  gap: 2px;
  padding: 6px 4px;
  background: #fff;
  font-size: 12px;
}
.panel-action svg {
  width: 19px;
  height: 19px;
}
.panel-body label {
  display: grid;
  gap: 7px;
}
.panel-body label strong {
  font-size: 13px;
  letter-spacing: 0;
}
.note-field {
  min-height: 72px;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
}

/* Parent modal polish */
.modal.parent-modal {
  width: min(620px, calc(100vw - 28px));
  overflow: hidden;
}
.parent-modal-content {
  padding: 30px 32px 32px;
  overflow: hidden;
}
.parent-modal-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 54px 24px 0;
}
.parent-modal-head .soft-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  flex: 0 0 auto;
}
.parent-modal-head h1 {
  margin: 0 0 4px;
  font-size: 28px;
  line-height: 1.1;
}
.parent-modal-head p {
  margin: 0;
  color: #64748b;
  font-weight: 700;
  line-height: 1.35;
}
.parent-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .82fr);
  gap: 14px;
}
.parent-form-grid .field {
  min-width: 0;
}
.parent-form-grid .field input {
  width: 100%;
  min-width: 0;
  min-height: 56px;
  border-radius: 16px;
  padding: 0 18px;
  font-size: 18px;
  background: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65);
}
.parent-form-grid .field span {
  font-size: 14px;
}
.parent-save {
  width: 100%;
  margin-top: 22px;
  min-height: 58px;
  border-radius: 18px;
  justify-content: center;
  gap: 8px;
}
.parent-save svg {
  width: 20px;
  height: 20px;
}

/* Student row schedule polish */
.list-header,
.student-row {
  grid-template-columns: minmax(170px, 1.25fr) 92px minmax(330px, 1.45fr) 136px 92px 128px 22px;
  gap: 9px;
}
.student-row {
  align-items: center;
  min-height: 116px;
  padding: 18px 16px;
}
.student-name strong {
  line-height: 1.18;
  font-size: 20px;
}
.schedule-mini {
  grid-template-columns: repeat(7, minmax(36px, 1fr)) 30px;
  gap: 5px;
  align-items: center;
  width: 100%;
}
.day-pill {
  min-height: 38px;
  border-radius: 9px;
  line-height: 1.05;
  font-size: 12px;
}
.day-pill span,
.day-pill small {
  display: block;
}
.day-pill.active {
  box-shadow: inset 0 0 0 1px #fdba74;
  border: 0;
}
.schedule-edit {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #f8fafc;
  color: #94a3b8;
  cursor: pointer;
}
.schedule-edit:hover {
  color: var(--orange);
  background: var(--orange-soft);
}
.schedule-edit svg {
  width: 16px;
  height: 16px;
}
.grade-pill {
  padding: 5px 9px;
  white-space: nowrap;
}
.money {
  font-size: 16px;
  white-space: nowrap;
}
.monthly {
  white-space: nowrap;
}
.parent-button {
  min-height: 32px;
  padding: 0 9px;
  max-width: 122px;
  width: 100%;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
}
.parent-button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
.more-button {
  min-width: 22px;
}
.main {
  padding-left: 24px;
  padding-right: 24px;
}
.top-card {
  margin-bottom: 26px;
}
.list-header {
  padding-left: 16px;
  padding-right: 16px;
}
.student-list {
  gap: 10px;
}
.student-row > div:nth-child(4),
.student-row > div:nth-child(5),
.student-row > div:nth-child(6) {
  justify-self: center;
}

/* Fit student list into the available desktop viewport */
.list-header,
.student-row {
  grid-template-columns: minmax(150px, 1fr) 76px minmax(260px, 1.15fr) 118px 76px 96px 18px;
  gap: 6px;
}
.student-row {
  min-width: 0;
  padding: 16px 12px;
}
.list-header {
  padding-left: 12px;
  padding-right: 12px;
}
.student-name,
.student-row > div,
.list-header > span {
  min-width: 0;
}
.student-name strong {
  font-size: 19px;
}
.muted-line,
.dash-button {
  max-width: 100%;
}
.schedule-mini {
  grid-template-columns: repeat(7, minmax(30px, 1fr)) 28px;
  gap: 4px;
}
.day-pill {
  min-height: 34px;
  font-size: 11px;
}
.schedule-edit {
  width: 28px;
  height: 28px;
}
.schedule-edit svg {
  width: 15px;
  height: 15px;
}
.money {
  font-size: 15px;
}
.money small,
.monthly,
.muted,
.parent-button {
  font-size: 12px;
}
.parent-button {
  max-width: 92px;
  min-height: 30px;
  padding: 0 7px;
}
.parent-button svg {
  width: 16px;
  height: 16px;
}
.more-button {
  width: 18px;
  min-width: 18px;
}

@media (max-width: 700px) {
  .parent-form-grid {
    grid-template-columns: 1fr;
  }
  .parent-modal-content {
    padding: 28px 22px;
  }
}

/* Refined compact application scale */
body { font-size: 13px; }
.sidebar { width: 252px; box-shadow: 3px 0 18px rgba(15, 23, 42, .025); }
.brand { height: 44px; gap: 9px; }
.brand-mark { width: 26px; height: 21px; font-size: 12px; }
.brand strong { font-size: 24px; }
.nav-list { padding: 24px 10px 0; gap: 4px; }
.nav-item { height: 48px; gap: 12px; padding: 0 14px; border-radius: 10px; font-size: 14px; font-weight: 700; }
.nav-item svg { width: 20px; height: 20px; flex: 0 0 auto; }
.collapse-pill { width: 34px; height: 34px; margin: auto 12px 12px auto; }
.collapse-pill svg { width: 17px; height: 17px; }
.account-card, .logout { margin-inline: 10px; border-radius: 10px; }
.account-card { min-height: 62px; padding: 10px; gap: 9px; }
.avatar { width: 40px; height: 40px; font-size: 16px; }
.account-card strong { font-size: 13px; }
.account-card small { max-width: 120px; font-size: 11px; }
.account-card > span[data-icon] { width: 29px; height: 29px; border-radius: 8px; }
.account-card > span[data-icon] svg { width: 16px; height: 16px; }
.logout { height: 42px; margin-top: 9px; margin-bottom: 10px; gap: 8px; font-size: 12px; }
.logout svg { width: 18px; height: 18px; }
.main { width: calc(100% - 252px); margin-left: 252px; padding: 28px 24px 24px; }
.page-heading { margin-bottom: 22px; }
.page-heading h1 { font-size: 30px; line-height: 1.15; }
.page-heading p, .chart-card p { font-size: 14px; }
.top-card { min-height: 72px; padding: 11px 16px; margin-bottom: 22px; border-radius: 18px; }
.search-box { width: 260px; height: 46px; padding: 0 14px; border-radius: 12px; }
.search-box input { font-size: 14px; }
.search-box svg { width: 20px; height: 20px; }
.segmented { min-height: 42px; border-radius: 10px; }
.segmented button { min-width: 56px; padding: 0 11px; font-size: 12px; }
.ghost, .icon-button, .primary { min-height: 42px; padding: 0 13px; border-radius: 10px; font-size: 12px; }
.icon-button { width: 44px; }
.ghost svg, .icon-button svg, .primary svg { width: 18px; height: 18px; }
.primary.large { height: 48px; padding: 0 22px; border-radius: 13px; font-size: 15px; }
.list-header { padding-bottom: 10px; font-size: 11px; }
.student-list { gap: 8px; }
.student-row { min-height: 112px; padding: 13px 12px; border-radius: 14px; }
.student-name strong { font-size: 18px; }
.muted-line, .dash-button, .grade-pill, .parent-button, .monthly, .money small { font-size: 11px; }
.day-pill { min-height: 32px; font-size: 10px; }
.money { font-size: 14px; }
.add-row { height: 56px; border-radius: 14px; font-size: 14px; }
.calendar-toolbar { margin-bottom: 20px; }
.date-switch strong { min-height: 42px; font-size: 13px; }
.modal { border-radius: 18px; }
.modal-close { top: 13px; right: 14px; width: 36px; height: 36px; }
.modal-close svg { width: 18px; height: 18px; }
.modal-content { padding: 22px 24px 20px; }
.modal-content h1 { margin-right: 44px; margin-bottom: 12px; font-size: 22px; }
.modal-content > p { margin-bottom: 12px; font-size: 12px; }
.form-grid { gap: 10px; }
.field { gap: 5px; font-size: 12px; }
.field input, .field select, .field textarea { min-height: 44px; padding: 0 13px; border-radius: 10px; font-size: 14px; }
.field textarea { min-height: 82px; padding-top: 11px; }
.modal-footer { padding-top: 14px; gap: 8px; }
.metric-card h3 { font-size: 13px; }
.metric-card p { font-size: 11px; }
.chart-card h2, .payments-card h2, .reconciliation-card > header h2 { font-size: 18px; }
#view-finance .page-heading h1 { font-size: 28px; }
#view-finance .page-heading p { font-size: 13px; }

.google-calendar-box {
  border-color: rgba(66, 133, 244, .22);
  background: #fbfdff;
}

.google-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: #e9f8ef;
  color: #0aa84f;
  font-weight: 800;
  font-size: 13px;
}

.profile-notice.warning {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}
.calendar-layout.has-panel .week-grid.mode-weekly{min-width:100%}.calendar-layout.has-panel .week-grid.mode-weekly .lesson-card{margin:4px 3px;padding:6px 5px}.calendar-layout.has-panel .week-grid.mode-weekly .lesson-action-chip{width:20px;min-width:20px;height:20px}.calendar-layout.has-panel .week-grid.mode-weekly .lesson-actions{gap:2px}.calendar-layout.has-panel .week-grid.mode-weekly .lesson-card strong{font-size:11px}.calendar-layout.has-panel .week-grid.mode-weekly .lesson-card>span,.calendar-layout.has-panel .week-grid.mode-weekly .lesson-card>small{font-size:9px}
.day-head.holiday{background:#fff7ed;color:#ea580c}.day-head.holiday small{color:#ea580c;max-width:100%;padding:0 3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.calendar-note-dot{position:absolute;right:7px;top:7px;width:6px;height:6px;border-radius:50%;background:#3b82f6}

/* Ajanda calendar parity */
.calendar-toolbar{margin-bottom:14px;gap:10px}.toolbar-actions{gap:8px}.calendar-range{height:42px;padding:0 15px;border:1px solid #e5e7eb;border-radius:9px;background:#fff;box-shadow:0 2px 5px rgba(15,23,42,.07);font-weight:800;color:#1e293b}.calendar-modes{height:42px}.calendar-modes button{min-height:36px;padding:0 14px;font-size:13px}.calendar-toolbar .icon-button,.calendar-toolbar .ghost,.calendar-add-button{height:42px;min-height:42px;border-radius:9px;font-size:13px}.calendar-add-button{padding:0 16px}.calendar-popover-wrap{position:relative}.calendar-popover{display:none;position:absolute;right:0;top:48px;z-index:70;width:210px;padding:8px;border:1px solid #e5e7eb;border-radius:10px;background:#fff;box-shadow:0 14px 35px rgba(15,23,42,.14)}.calendar-popover.active{display:grid}.filter-popover{gap:3px}.filter-popover>strong{padding:7px 8px;color:#64748b;font-size:11px;text-transform:uppercase}.filter-popover label{display:flex;align-items:center;gap:9px;min-height:36px;padding:0 8px;border-radius:7px;font-weight:700;cursor:pointer}.filter-popover label:hover{background:#f8fafc}.filter-dot{width:8px;height:8px;border-radius:50%}.filter-dot.planned{background:#fb923c}.filter-dot.done{background:#22c55e}.filter-dot.noshow{background:#f59e0b}.filter-dot.cancelled{background:#ef4444}.add-popover{width:235px}.add-popover button{display:flex;align-items:center;gap:11px;padding:10px;border-radius:8px;text-align:left}.add-popover button:hover{background:#fff7ed;color:#ea580c}.add-popover svg{width:20px}.add-popover span:last-child{display:grid;gap:2px}.add-popover small{color:#94a3b8;font-size:11px}.routine-print{display:none}
.calendar-layout{gap:14px}.calendar-layout.has-panel{grid-template-columns:minmax(600px,1fr) 340px}.week-board,.lesson-panel{height:calc(100vh - 126px);min-height:590px;border-radius:10px}.week-grid{min-width:920px}.week-grid.mode-daily{min-width:620px}.day-head{padding-top:11px;font-size:12px;background:#fff}.day-head b{font-size:19px;margin-top:3px}.day-head small{font-size:10px;margin-top:1px}.day-head.today b{width:34px;height:34px;margin-top:3px}.time-cell{padding:7px 9px;font-size:12px}.week-cell{min-height:0}.slot-add{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:3px;opacity:0;color:#f97316;font-size:11px;font-weight:800}.slot-add svg{width:13px;height:13px}.week-cell:hover>.slot-add{opacity:1;background:rgba(255,247,237,.72)}.week-cell:has(.lesson-card)>.slot-add{display:none}.lesson-card{z-index:2;height:calc(100% - 10px);margin:5px;padding:7px 8px;border-radius:8px;box-shadow:0 2px 6px rgba(15,23,42,.08);font-size:11px}.lesson-card strong{font-size:13px;line-height:1.15}.lesson-card>span,.lesson-card>small{font-size:10px}.lesson-card>p{margin:4px 0 0;font-size:10px;font-weight:800}.lesson-actions{padding-top:4px;margin-top:auto;gap:4px}.lesson-action-chip{width:24px;min-width:24px;height:24px}.lesson-action-chip svg{width:12px;height:12px}.lesson-card.noshow{background:#fffbeb;border-color:#fde68a;color:#92400e}.routine-card{background:#f8fafc;border-color:#cbd5e1;color:#334155}.week-grid.mode-daily .lesson-card strong{font-size:15px}.week-grid.mode-daily .lesson-card{padding:10px 12px}.week-grid.mode-daily .lesson-actions{justify-content:flex-start}
.lesson-panel{border-radius:10px}.lesson-panel header{position:relative;padding:14px 16px}.lesson-panel h2{margin:5px 0 0;font-size:20px}.panel-head-actions{position:absolute;right:10px;top:10px;display:flex;gap:3px}.panel-head-actions button{width:32px;height:32px;border-radius:8px;background:#f8fafc;display:grid;place-items:center;color:#64748b}.panel-head-actions svg{width:17px;height:17px}.panel-meta{display:flex;align-items:center;gap:8px;padding-right:72px;font-size:12px}.badge{padding:5px 8px;font-size:11px}.status-done{background:#dcfce7;color:#15803d}.status-noshow{background:#ffedd5;color:#c2410c}.status-cancelled{background:#ffe4e6;color:#be123c}.panel-body{padding:14px 16px;gap:14px}.panel-body>label{display:grid;gap:5px}.panel-body>label strong{font-size:10px;letter-spacing:.03em;color:#475569}.topic-action{width:100%;min-height:38px;border:1px solid #fed7aa;border-radius:8px;background:#fff7ed;color:#ea580c;display:flex;align-items:center;justify-content:center;gap:6px;font-weight:800}.topic-action svg{width:16px}.panel-actions{gap:6px}.panel-action{min-height:62px;border-radius:8px;gap:4px;font-size:11px}.panel-action svg{width:18px}.panel-action.green.selected{background:#ecfdf5;border-color:#a7f3d0}.panel-action.orange.selected{background:#fff7ed;border-color:#fed7aa}.panel-action.red.selected{background:#fff1f2;border-color:#fecdd3}.previous-lesson{padding:10px;border:1px solid #e5e7eb;border-radius:8px;background:#f8fafc}.previous-lesson span{display:block;color:#94a3b8;font-size:10px;font-weight:800}.previous-lesson strong{font-size:12px}.previous-lesson p{margin:4px 0 0;color:#64748b;font-size:11px}.note-field{min-height:72px;border-radius:8px;padding:10px 11px;font-size:12px}.lesson-fee-box{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:10px;border:1px solid #e5e7eb;border-radius:8px;background:#f8fafc}.lesson-fee-box label,.lesson-fee-box>div{display:grid;gap:4px}.lesson-fee-box span{color:#64748b;font-size:10px;font-weight:800}.lesson-fee-box input{width:100%;height:34px;padding:0 8px;border:1px solid #dbe1e8;border-radius:7px;background:#fff}.payment-state{font-size:12px;color:#dc2626}.payment-state.paid{color:#16a34a}.lesson-fee-box .payment-action{grid-column:1/-1;min-height:36px;border-radius:7px;background:#ff6b00;color:#fff;font-size:12px}.delete-lesson{justify-self:center;display:inline-flex;align-items:center;gap:5px;color:#dc2626;font-size:11px;font-weight:800}.delete-lesson svg{width:14px}
@media(max-width:1260px){.calendar-layout.has-panel{grid-template-columns:1fr}.lesson-panel.is-open{display:block;position:fixed;z-index:90;right:12px;top:12px;bottom:12px;width:min(340px,calc(100vw - 24px));height:auto;min-height:0}.week-board{height:calc(100vh - 135px)}}

/* Dynamic calendar positioning */
.week-cell { overflow: visible; }
.week-grid { overflow: visible; }
.lesson-card {
  position: absolute;
  left: 5px;
  right: 5px;
  min-height: 58px;
  margin: 0;
}
.calendar-layout.has-panel .week-grid.mode-weekly .lesson-card {
  left: 3px;
  right: 3px;
  margin: 0;
}
.week-cell:has(.current-time-line) { overflow: visible; }
.current-time-line {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 5;
  height: 2px;
  background: #ef4444;
  pointer-events: none;
}
.current-time-line::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  transform: translateY(-50%);
}
.current-time-line span {
  position: absolute;
  left: 8px;
  top: -11px;
  padding: 2px 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(239,68,68,.22);
}

body.sidebar-collapsed .sidebar { width: 72px; }
body.sidebar-collapsed .main { width: calc(100% - 72px); margin-left: 72px; }
body.sidebar-collapsed .brand { gap: 0; }
body.sidebar-collapsed .brand strong,
body.sidebar-collapsed .account-card > div:not(.avatar),
body.sidebar-collapsed .account-card > span[data-icon] { display: none; }
body.sidebar-collapsed .nav-item { justify-content: center; padding: 0; font-size: 0; }
body.sidebar-collapsed .collapse-pill { margin-right: 19px; transform: rotate(180deg); }
body.sidebar-collapsed .account-card { justify-content: center; padding: 8px; }
body.sidebar-collapsed .avatar { width: 36px; height: 36px; }
body.sidebar-collapsed .logout { gap: 0; font-size: 0; }

@media (max-width: 820px) {
  .sidebar, body.sidebar-collapsed .sidebar { display: none; }
  .main, body.sidebar-collapsed .main { width: 100%; margin-left: 0; padding: 18px 12px 100px; }
  .page-heading h1 { font-size: 26px; }
  .top-card { margin-bottom: 16px; }
}

/* Compact modal system */
.modal-layer {
  padding: 12px;
}
.modal {
  width: min(820px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  border-radius: 24px;
  overflow: auto;
}
.modal.narrow {
  width: min(520px, calc(100vw - 24px));
}
.modal-close {
  top: 16px;
  right: 18px;
  width: 42px;
  height: 42px;
}
.modal-close svg {
  width: 22px;
  height: 22px;
}
.modal-content {
  padding: 28px 30px 26px;
}
.modal-content h1 {
  font-size: 26px;
  line-height: 1.12;
  margin: 0 52px 16px 0;
}
.modal-content > p {
  margin: -8px 0 16px;
  color: #475569;
  font-size: 14px;
}
.form-grid {
  gap: 14px;
}
.field {
  gap: 7px;
  font-size: 14px;
}
.field input,
.field select,
.field textarea {
  min-height: 50px;
  border-radius: 14px;
  padding: 0 16px;
  font-size: 16px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .05);
}
.field textarea {
  min-height: 92px;
  padding-top: 13px;
}
.ai-box,
.repeat-box,
.info-box {
  padding: 12px 14px;
  border-radius: 13px;
}
.ai-box {
  margin-bottom: 18px;
  gap: 10px;
}
.tabs {
  margin-bottom: 14px;
}
.tabs button {
  min-height: 40px;
  padding: 0 16px;
}
.upload-box {
  min-height: 96px;
  margin-bottom: 16px;
}
.pill-info {
  padding: 11px 12px;
  margin: 14px 0;
  font-size: 14px;
}
.modal-footer {
  padding: 18px 30px;
  gap: 12px;
}
.outline,
.primary.large {
  min-height: 48px;
  border-radius: 13px;
  padding: 0 24px;
  font-size: 16px;
}
.confirm-modal {
  padding: 32px 34px;
}
.stepper {
  gap: 12px;
  margin-bottom: 22px;
}
.step {
  width: 46px;
  height: 46px;
  font-size: 18px;
}
.step-line {
  width: 58px;
}
.confirm-icon {
  width: 86px;
  height: 86px;
  margin-bottom: 18px;
}
.confirm-modal h1 {
  font-size: 30px;
}
.confirm-modal p {
  font-size: 18px;
  margin-bottom: 24px;
}

.detail-modal {
  width: min(780px, calc(100vw - 24px));
}
.detail-modal-content {
  padding: 28px 30px 0;
}
.detail-head h1 {
  margin-bottom: 10px;
}
.detail-head p {
  margin: 0 0 16px;
  color: #0f172a;
  font-size: 14px;
}
.detail-balance,
.detail-cards > section {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .05);
}
.detail-balance {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  align-items: end;
  padding: 20px 24px;
}
.detail-balance h3,
.detail-cards h3 {
  margin: 0 0 12px;
  color: #64748b;
  font-size: 15px;
}
.detail-balance strong {
  display: block;
  font-size: 30px;
  color: var(--ink);
}
.detail-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.detail-stats span {
  display: grid;
  gap: 3px;
  color: #475569;
  font-size: 14px;
}
.detail-stats b {
  color: var(--ink);
  font-size: 16px;
}
.detail-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}
.detail-cards > section {
  min-height: 130px;
  padding: 20px 24px;
}
.detail-cards p {
  margin: 0 0 12px;
  color: #64748b;
  font-weight: 700;
}
.orange-text {
  color: var(--orange);
  font-weight: 800;
}
.detail-footer {
  margin: 20px -30px 0;
}
.student-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}
.student-edit-grid .field {
  min-width: 0;
}
.editable-student-detail .detail-cards {
  margin-top: 12px;
}
.editable-student-detail .detail-cards > section {
  min-height: 104px;
}
.editable-student-detail .detail-footer {
  gap: 10px;
}

@media (max-width: 760px) {
  .form-grid,
  .detail-balance,
  .detail-cards,
  .student-edit-grid {
    grid-template-columns: 1fr;
  }
  .modal-content,
  .detail-modal-content {
    padding-left: 20px;
    padding-right: 20px;
  }
  .detail-footer {
    margin-left: -20px;
    margin-right: -20px;
  }
}

/* Compact finance page */
#view-finance .page-heading {
  margin-bottom: 22px;
  align-items: center;
}
#view-finance .page-heading h1 {
  font-size: 32px;
  line-height: 1.1;
  margin-bottom: 3px;
}
#view-finance .page-heading p {
  font-size: 15px;
}
#view-finance .page-heading .primary.large {
  min-height: 50px;
  border-radius: 18px;
  padding: 0 22px;
  font-size: 16px;
}
#view-finance .metric-grid {
  gap: 14px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
#view-finance .metric-card {
  min-height: 154px;
  padding: 16px;
  gap: 9px;
  border-radius: 14px;
}
#view-finance .metric-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
}
#view-finance .metric-icon svg {
  width: 22px;
  height: 22px;
}
#view-finance .metric-card h3 {
  font-size: 14px;
  line-height: 1.2;
}
#view-finance .metric-card strong {
  font-size: 25px;
  line-height: 1.05;
}
#view-finance .metric-card p {
  font-size: 13px;
  line-height: 1.25;
}
#view-finance .finance-grid {
  gap: 16px;
  margin-top: 18px;
}
#view-finance .chart-card {
  min-height: 250px;
  padding: 20px;
  border-radius: 14px;
}
#view-finance .chart-card header,
#view-finance .payments-card header {
  gap: 10px;
}
#view-finance .chart-card h2,
#view-finance .payments-card h2 {
  font-size: 20px;
  margin-bottom: 4px;
}
#view-finance .chart-card p {
  font-size: 14px;
}
#view-finance .chart-card .ghost,
#view-finance .payments-card .ghost {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 14px;
}
#view-finance .soft-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
}
#view-finance .fake-chart,
#view-finance .hour-bars {
  height: 150px;
  margin-top: 16px;
  gap: 9px;
}
#view-finance .payments-card {
  margin-top: 16px;
  padding: 18px 20px;
  min-height: 190px;
  border-radius: 14px;
}
#view-finance .payments-card header > div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
#view-finance .payments-table {
  margin-top: 12px;
  font-size: 14px;
}
#view-finance .payments-table th,
#view-finance .payments-table td {
  padding: 10px 8px;
}
#view-finance #paymentHistory .empty-state {
  min-height: 190px !important;
  padding: 18px;
}
#view-finance #paymentHistory .empty-icon {
  width: 56px;
  height: 56px;
}
#view-finance #paymentHistory h2 {
  font-size: 22px;
  margin: 10px 0 6px;
}
#view-finance #paymentHistory p {
  font-size: 15px;
  margin: 0 0 14px;
}
.reconciliation-card {
  margin-top: 16px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .05);
}
.reconciliation-card > header h2 {
  margin: 0 0 3px;
  font-size: 20px;
}
.reconciliation-card > header p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}
.reconciliation-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}
.reconciliation-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.25fr) repeat(4, minmax(92px, .72fr)) minmax(145px, 1fr);
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #22c55e;
  border-radius: 10px;
  background: #fff;
}
.reconciliation-row.debt { border-left-color: #ef4444; }
.reconciliation-row.credit { border-left-color: #2563eb; }
.reconciliation-student,
.reconciliation-stat,
.reconciliation-state {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}
.reconciliation-student strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reconciliation-student span,
.reconciliation-stat span,
.reconciliation-state small {
  color: #64748b;
  font-size: 11px;
}
.reconciliation-stat strong {
  font-size: 14px;
}
.finance-state-badge {
  display: inline-flex;
  width: fit-content;
  padding: 5px 8px;
  border-radius: 7px;
  color: #15803d;
  background: #ecfdf3;
  font-size: 12px;
  font-weight: 800;
}
.debt .finance-state-badge { color: #b91c1c; background: #fff1f2; }
.credit .finance-state-badge { color: #1d4ed8; background: #eff6ff; }
.unpaid-lessons {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-top: 9px;
  border-top: 1px dashed #e5e7eb;
}
.unpaid-lessons b {
  flex: 0 0 auto;
  color: #475569;
  font-size: 11px;
}
.unpaid-lessons > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.lesson-payment-date,
.no-completed-lesson {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 6px;
  color: #b91c1c;
  background: #fff1f2;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.lesson-payment-date.paid { color: #15803d; background: #ecfdf3; }
.lesson-payment-date.unpaid { color: #b91c1c; background: #fff1f2; }
.no-completed-lesson { color: #64748b; background: #f8fafc; }
.lesson-payment-date svg {
  display: block;
  flex: 0 0 13px;
  width: 13px;
  height: 13px;
  margin: 0;
  stroke-width: 2.5;
}

/* Finance allocations, multiple schedules, parents and notification queue */
.payments-table td:first-child small{display:block;margin-top:3px;color:#94a3b8;font-size:11px}.payment-distribution,.payment-cancelled{display:inline-flex;padding:5px 8px;border-radius:7px;background:#ecfdf3;color:#15803d;font-size:11px;font-weight:800}.payment-cancelled{background:#fff1f2;color:#be123c}.payments-table .cancelled-row{opacity:.58}.table-action{border:0;background:#f8fafc;color:#475569;padding:7px 9px;border-radius:7px;font-size:11px;font-weight:800;cursor:pointer}.split-footer{justify-content:space-between!important}.split-footer>div{display:flex;gap:8px}.danger-outline{min-height:42px;border:1px solid #fecdd3;background:#fff1f2;color:#be123c;border-radius:10px;padding:0 14px;font-weight:800;cursor:pointer}
.schedule-modal-content{max-width:850px}.schedule-form-head{display:flex;align-items:center;justify-content:space-between;margin:16px 0 10px;padding-bottom:10px;border-bottom:1px solid #eef1f4}.schedule-form-head strong{font-size:12px;color:#475569}.schedule-form-head button{display:inline-flex;align-items:center;gap:5px}.schedule-form-head svg{width:16px;height:16px}.schedule-form-row{display:grid;grid-template-columns:1fr 1fr 1fr 1fr 36px;gap:8px;align-items:end;padding:10px;margin-bottom:8px;border:1px solid #e5e7eb;border-radius:10px;background:#fafbfc}.schedule-form-row label{display:flex;flex-direction:column;gap:5px;min-width:0}.schedule-form-row label span{font-size:11px;color:#64748b;font-weight:800}.schedule-form-row input,.schedule-form-row select{width:100%;min-width:0;height:40px;border:1px solid #dfe3e8;border-radius:8px;background:#fff;padding:0 9px;font:inherit}.schedule-remove{display:grid;place-items:center;width:36px;height:40px;border:0;border-radius:8px;background:#fff1f2;color:#e11d48;cursor:pointer}.schedule-remove svg{width:17px;height:17px}.schedule-summary{display:flex;justify-content:space-between;margin-top:10px;padding:11px 13px;border:1px solid #fed7aa;border-radius:9px;background:#fffaf5;color:#475569;font-size:13px}.schedule-summary strong{color:#f97316}
.parent-record-list{display:grid;gap:7px;max-height:190px;overflow:auto;margin:14px 0}.parent-record{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 11px;border:1px solid #e5e7eb;border-radius:9px;background:#fafbfc}.parent-record>div:first-child{display:flex;flex-direction:column;gap:3px}.parent-record strong{font-size:13px}.parent-record span{color:#64748b;font-size:11px}.parent-record-actions{display:flex;gap:5px}.parent-record-actions button{border:0;border-radius:7px;background:#fff;padding:7px 8px;color:#475569;font-size:11px;font-weight:800;cursor:pointer}.parent-record-actions .red-text{color:#dc2626}.compact-empty{padding:14px;border:1px dashed #dbe1e8;border-radius:9px;color:#94a3b8;text-align:center;font-size:12px}.form-section-title{margin:15px 0 9px;font-size:14px}.check-field{display:flex;align-items:center;gap:8px;padding:10px 12px;border:1px solid #e5e7eb;border-radius:9px;color:#475569;font-size:12px;font-weight:700}.check-field input{width:17px;height:17px;accent-color:#ff6500}
.recipient-box{display:grid;gap:6px;margin:14px 0;padding:11px;border:1px solid #e5e7eb;border-radius:10px;background:#fafbfc}.recipient-box>strong{margin-bottom:3px;font-size:12px}.recipient-box label{display:flex;align-items:center;gap:8px;padding:7px 8px;border-radius:7px;background:#fff;font-size:12px;font-weight:700}.recipient-box input{width:17px;height:17px;accent-color:#ff6500}.recipient-box small{margin-left:auto;color:#94a3b8;font-weight:500}.notification-meta{display:flex;align-items:center;justify-content:space-between;gap:8px}.notification-status{padding:4px 7px;border-radius:6px;font-size:10px;font-weight:800}.notification-status.pending{background:#fff7ed;color:#c2410c}.notification-status.sent{background:#ecfdf3;color:#15803d}.notification-status.failed{background:#fff1f2;color:#be123c}.notification-error{display:block;margin-top:6px;color:#be123c;font-size:11px}
@media(max-width:760px){.schedule-form-row{grid-template-columns:1fr 1fr}.schedule-remove{grid-column:2;justify-self:end}.split-footer{align-items:stretch}.split-footer,.split-footer>div{flex-direction:column}.parent-record{align-items:flex-start;flex-direction:column}.parent-record-actions{width:100%;justify-content:flex-end}}
.finance-empty { padding: 22px; color: #64748b; text-align: center; }
@media (max-width: 1050px) {
  .reconciliation-row { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
}
@media (max-width: 680px) {
  .reconciliation-card { padding: 14px; }
  .reconciliation-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reconciliation-student,
  .reconciliation-state { grid-column: 1 / -1; }
  .unpaid-lessons { flex-direction: column; gap: 7px; }
}

/* Profile entry and profile page */
.account-card {
  text-decoration: none;
  color: inherit;
  min-height: 76px;
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.account-card:hover,
.account-card.active {
  background: #fff4ea;
  box-shadow: 0 4px 14px rgba(255, 107, 0, .12);
}
.account-card > div:not(.avatar) {
  min-width: 0;
  flex: 1;
}
.account-card strong {
  max-width: 100%;
}
.account-card small {
  display: block;
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-card > span[data-icon] {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #fff;
  color: #64748b;
  flex: 0 0 auto;
}
.account-card:hover > span[data-icon],
.account-card.active > span[data-icon] {
  color: var(--orange);
}
.account-card > span[data-icon] svg {
  width: 19px;
  height: 19px;
}

.profile-page {
  max-width: 860px;
}
.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.profile-avatar {
  width: 66px;
  height: 66px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: #fff0d8;
  color: var(--orange);
  font-size: 26px;
  font-weight: 900;
}
.profile-header h1 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 32px;
}
.profile-header p {
  margin: 0;
  color: #64748b;
  font-weight: 700;
}
.profile-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  padding: 24px;
}
.profile-notice {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  margin-bottom: 14px;
  padding: 0 16px;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  background: #f0fdf4;
  color: #15803d;
  font-weight: 800;
}
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.profile-options {
  display: grid;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.calendar-feed-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #fed7aa;
  background: #fff7ed;
  border-radius: 16px;
}
.calendar-feed-copy {
  grid-column: 1 / -1;
  display: grid;
  gap: 3px;
}
.calendar-feed-copy strong {
  color: var(--ink);
  font-size: 16px;
}
.calendar-feed-copy span {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}
.calendar-feed-field input {
  background: #fff;
  font-size: 14px;
}
.calendar-feed-link {
  white-space: nowrap;
  min-height: 50px;
}
.profile-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #334155;
  font-weight: 800;
}
.profile-options input {
  width: 18px;
  height: 18px;
  accent-color: var(--orange);
}
.profile-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
}
.profile-actions .outline,
a.outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--ink);
  line-height: 1;
}
.profile-actions .outline:hover,
a.outline:hover {
  color: var(--ink);
  background: #f8fafc;
}

@media (max-width: 760px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }
  .calendar-feed-box {
    grid-template-columns: 1fr;
  }
  .profile-header {
    align-items: flex-start;
  }
}

@media (max-width: 1200px) {
  #view-finance .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  #view-finance .metric-grid,
  #view-finance .finance-grid {
    grid-template-columns: 1fr;
  }
}

/* Ajanda-style functional finance dashboard */
#view-finance { max-width: 1540px; margin: 0 auto; }
#view-finance .finance-heading { margin-bottom: 16px; }
.finance-heading-actions { display: flex; align-items: center; gap: 10px; }
.finance-period-control {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(15,23,42,.04);
  color: #475569;
}
.finance-period-control svg { width: 18px; height: 18px; }
.finance-period-control select { border: 0; outline: 0; background: transparent; color: #334155; font: inherit; font-weight: 800; }
#view-finance .metric-grid { gap: 12px; }
#view-finance .metric-card { min-height: 142px; padding: 14px; gap: 8px; }
#view-finance .metric-card strong { font-size: 23px; }

.monthly-finance-summary {
  display: grid;
  grid-template-columns: 1.15fr repeat(3, 1fr);
  align-items: stretch;
  margin-top: 14px;
  border: 1px solid #fed7aa;
  border-radius: 16px;
  background: linear-gradient(105deg, #fffaf5 0%, #fff 76%);
  box-shadow: 0 4px 14px rgba(15,23,42,.04);
  overflow: hidden;
}
.month-summary-title,
.month-summary-stat { min-width: 0; padding: 17px 20px; }
.month-summary-title { display: flex; align-items: center; gap: 9px; }
.month-summary-title .metric-icon { width: 38px; height: 38px; border-radius: 11px; }
.month-summary-title strong { color: #334155; font-size: 15px; }
.month-summary-title > span:last-child { color: #64748b; font-size: 12px; }
.month-summary-stat { display: flex; flex-direction: column; justify-content: center; gap: 4px; border-left: 1px solid #f1f5f9; }
.month-summary-stat span { color: #64748b; font-size: 12px; }
.month-summary-stat strong { color: #0f172a; font-size: 24px; }
.month-summary-stat.estimate strong { color: #f97316; }
.month-summary-stat small { color: #15803d; font-weight: 800; }

.finance-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, .75fr);
  gap: 14px;
  margin-top: 14px;
}
#view-finance .finance-dashboard-grid .chart-card { min-height: 286px; padding: 18px; }
.income-chart-card { grid-row: span 1; }
.chart-legend { display: flex; align-items: center; gap: 7px; color: #64748b; font-size: 11px; font-weight: 800; }
.chart-legend span { width: 18px; height: 3px; border-radius: 99px; }
.chart-legend .earned { background: #ff6b00; }
.chart-legend .collected { background: #16a34a; margin-left: 6px; }
.income-line-chart { height: 218px; margin-top: 8px; }
.income-line-chart svg { width: 100%; height: 100%; overflow: visible; }
.chart-grid line { stroke: #e8edf3; stroke-dasharray: 4 5; }
.chart-grid text, .income-line-chart .month-label { fill: #94a3b8; font-size: 10px; font-weight: 700; }
.earned-line, .collected-line { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.earned-line { stroke: #ff6b00; }
.collected-line { stroke: #16a34a; }
.earned-dot { fill: #fff; stroke: #ff6b00; stroke-width: 3; }
.collected-dot { fill: #fff; stroke: #16a34a; stroke-width: 3; }

.balance-total { display: flex; align-items: flex-end; justify-content: space-between; margin: 16px 0 12px; padding-bottom: 11px; border-bottom: 1px solid #eef2f6; }
.balance-total span { color: #64748b; font-size: 12px; }
.balance-total strong { color: #b91c1c; font-size: 22px; }
.finance-bar-list { display: grid; gap: 12px; margin-top: 16px; }
.finance-bar-row { display: grid; gap: 5px; }
.finance-bar-row > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.finance-bar-row strong { overflow: hidden; color: #334155; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.finance-bar-row span { flex: 0 0 auto; color: #64748b; font-size: 11px; font-weight: 800; }
.finance-bar-row i { height: 8px; overflow: hidden; border-radius: 99px; background: #f1f5f9; }
.finance-bar-row i b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #fb7185, #ef4444); }
.finance-bar-list.earnings .finance-bar-row i b { background: linear-gradient(90deg, #fdba74, #ff6b00); }
.chart-empty { min-height: 188px; display: grid; place-items: center; align-content: center; gap: 7px; text-align: center; color: #94a3b8; }
.chart-empty svg { width: 32px; height: 32px; padding: 7px; border-radius: 12px; color: #16a34a; background: #ecfdf3; box-sizing: content-box; }
.chart-empty strong { color: #334155; font-size: 14px; }
.chart-empty small { max-width: 240px; }
.weekly-hours-card .hour-bars { height: 185px !important; margin-top: 12px !important; }
.student-earnings-card .finance-bar-list { margin-top: 20px; }
#view-finance .reconciliation-card { margin-top: 14px; }
#view-finance .payments-card { margin-top: 14px; }
#view-finance .payments-card header > div:first-child p { margin: 0; color: #64748b; font-size: 12px; }
.payment-list-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 8px 2px; color: #64748b; font-size: 12px; }
.payment-list-summary > div { display: flex; align-items: center; gap: 10px; }
.payment-list-summary small { color: #94a3b8; }
.payment-list-summary strong { color: #0f172a; font-size: 17px; }

@media (max-width: 1180px) {
  .monthly-finance-summary { grid-template-columns: 1fr 1fr; }
  .month-summary-stat:nth-child(3) { border-left: 0; border-top: 1px solid #f1f5f9; }
  .month-summary-stat:nth-child(4) { border-top: 1px solid #f1f5f9; }
  .finance-dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .finance-heading-actions { align-items: stretch; flex-direction: column; }
  .finance-period-control { justify-content: center; }
  .monthly-finance-summary { grid-template-columns: 1fr; }
  .month-summary-stat { border-top: 1px solid #f1f5f9; border-left: 0; }
  .month-summary-title { flex-wrap: wrap; }
  .chart-legend { display: none; }
  .income-line-chart { height: 190px; overflow-x: auto; }
  .income-line-chart svg { min-width: 620px; }
}

/* Login and membership */
.auth-body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  background: #f3f4f6;
  color: var(--ink);
}
.auth-shell {
  width: min(440px, calc(100vw - 32px));
}
.auth-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.auth-brand strong {
  font-size: 28px;
  letter-spacing: 0;
}
.auth-brand span {
  color: var(--orange);
}
.auth-card h1 {
  margin: 0 0 6px;
  font-size: 30px;
}
.auth-card p {
  margin: 0 0 20px;
  color: #64748b;
  font-weight: 700;
}
.auth-card form {
  display: grid;
  gap: 14px;
}
.auth-submit {
  width: 100%;
  margin-top: 4px;
}
.auth-switch {
  margin-top: 18px;
  text-align: center;
  color: #64748b;
  font-weight: 800;
}
.auth-switch a {
  color: var(--orange);
  text-decoration: none;
}
.auth-error {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  font-weight: 800;
}

/* Lesson panel payment and completed states */
.payment-action {
  width: 100%;
  min-height: 44px;
  border: 1px solid #86efac;
  border-radius: 14px;
  background: #16a34a;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(22, 163, 74, .18);
}
.payment-action svg {
  width: 19px;
  height: 19px;
}
.badge.status-done {
  background: #dcfce7;
  color: #15803d;
}
.badge.status-done svg {
  color: #16a34a;
}
.badge.status-cancelled {
  background: #fee2e2;
  color: #dc2626;
}
.badge.status-postponed {
  background: #ffedd5;
  color: var(--orange);
}
.panel-action.green.selected,
.panel-action.green.completed {
  background: #ecfdf5;
  border-color: #86efac;
  color: #16a34a;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, .12), 0 10px 22px rgba(22, 163, 74, .08);
}
.panel-action.orange.selected {
  background: #fff7ed;
  border-color: #fdba74;
  color: var(--orange);
  box-shadow: inset 0 0 0 1px rgba(249, 115, 22, .12), 0 10px 22px rgba(249, 115, 22, .08);
}
.panel-action.red.selected {
  background: #fff1f2;
  border-color: #fda4af;
  color: var(--red);
  box-shadow: inset 0 0 0 1px rgba(244, 63, 94, .12), 0 10px 22px rgba(244, 63, 94, .08);
}
.panel-action.green.selected svg,
.panel-action.green.completed svg,
.panel-action.orange.selected svg,
.panel-action.red.selected svg {
  color: currentColor;
}

/* Lesson completion flow */
.complete-flow-modal {
  width: min(760px, calc(100vw - 32px));
}
.complete-flow {
  padding: 24px 34px 28px;
}
.complete-stepper .step {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  font-size: 15px;
}
.complete-stepper .step svg {
  width: 16px;
  height: 16px;
}
.complete-stepper {
  gap: 10px;
  margin-bottom: 16px;
}
.complete-stepper .step-line {
  width: 54px;
  height: 3px;
}
.step-line.done {
  background: #22c55e;
}
.complete-flow .confirm-icon {
  width: 70px;
  height: 70px;
  margin-bottom: 14px;
  font-size: 28px;
  box-shadow: none;
}
.complete-flow .confirm-icon svg {
  width: 28px;
  height: 28px;
}
.confirm-icon.orange {
  color: var(--orange);
  background: #fff7ed;
}
.complete-flow h1 {
  font-size: 28px;
  margin-bottom: 8px;
  letter-spacing: 0;
}
.complete-flow p {
  max-width: 620px;
  margin: 0 auto 18px;
  font-size: 15px;
  line-height: 1.4;
}
.complete-payment-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
  max-width: 520px;
  margin: 0 auto 14px;
}
.payment-choice {
  min-height: 68px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #334155;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}
.payment-choice svg {
  width: 21px;
  height: 21px;
}
.payment-choice.taken {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #16a34a;
}
.payment-choice.not-taken {
  border-color: #fecaca;
  background: #fff1f2;
  color: #e11d48;
}
.payment-choice.postpone-choice {
  border-color: #fed7aa;
  background: #fff7ed;
  color: var(--orange);
}
.complete-back {
  color: #64748b;
  font-weight: 900;
}
.cancel-choice-actions {
  max-width: 626px;
}
.cancel-stepper .step.active {
  background: var(--red);
  box-shadow: 0 10px 22px rgba(225, 29, 72, .22);
}
.cancel-flow-form {
  text-align: center;
}
.compact-flow-grid {
  max-width: 560px;
  margin: 0 auto 6px;
  text-align: left;
}
.flow-footer {
  justify-content: center;
  padding: 10px 0 0;
}
.complete-result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-width: 650px;
  margin: 0 auto 18px;
}
.complete-result-grid > div {
  min-height: 76px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  text-align: left;
}
.complete-result-grid span {
  display: block;
  margin-bottom: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.complete-result-grid strong {
  color: #0f172a;
  font-size: 16px;
}
.complete-result-grid .debt {
  background: #fff1f2;
  border-color: #fecdd3;
}
.complete-result-grid .credit,
.complete-result-grid .clear {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.complete-result-grid .debt strong {
  color: #be123c;
}
.complete-result-grid .credit strong,
.complete-result-grid .clear strong {
  color: #15803d;
}

@media (max-width: 720px) {
  .complete-flow {
    padding: 24px 16px 26px;
  }
  .complete-flow h1 { font-size: 24px; }
  .complete-flow p { font-size: 14px; }
  .complete-payment-actions,
  .complete-result-grid {
    grid-template-columns: 1fr;
  }
  .payment-choice { min-height: 58px; }
}

/* Compact notifications page */
#view-messages .messages-card {
  height: calc(100vh - 92px);
  min-height: 560px;
  grid-template-columns: 360px minmax(0, 1fr);
}
#view-messages .messages-sidebar {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
}
#view-messages .message-tools {
  gap: 8px;
}
#view-messages .small-search {
  width: auto;
  flex: 1;
  min-width: 0;
}
#view-messages .small-search input {
  font-size: 15px;
}
#view-messages .message-tools .primary {
  min-height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  font-size: 14px;
}
.message-count {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.message-student-list {
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}
#view-messages .message-person {
  width: 100%;
  margin-top: 0;
  margin-bottom: 6px;
  padding: 9px;
  border-radius: 12px;
  gap: 10px;
  text-align: left;
}
#view-messages .message-person .avatar {
  width: 42px;
  height: 42px;
  min-width: 42px;
  font-size: 15px;
}
#view-messages .message-person strong {
  font-size: 15px;
  line-height: 1.15;
}
#view-messages .message-person small {
  display: block;
  font-size: 12px;
  margin-top: 3px;
}
.message-list-empty {
  padding: 18px 10px;
  color: #94a3b8;
  font-weight: 800;
  text-align: center;
}
.message-detail {
  min-width: 0;
  padding: 24px;
  overflow-y: auto;
}
.message-detail header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.message-detail h2 {
  margin: 0 0 4px;
  font-size: 24px;
}
.message-detail p {
  margin: 0;
  color: #64748b;
  font-weight: 700;
}
.notification-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.notification-list article {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: #fff;
}
.notification-list strong {
  color: var(--orange);
  font-size: 13px;
}
.notification-list p {
  margin-top: 6px;
  color: #334155;
}
.message-empty.compact {
  min-height: 360px;
}

@media (max-width: 900px) {
  #view-messages .messages-card {
    height: auto;
    grid-template-columns: 1fr;
  }
  #view-messages .message-student-list {
    max-height: 320px;
  }
}

/* Compact floating add button */
.assistant-bubble {
  display: none !important;
}
.fab-wrap {
  right: 26px;
  bottom: 34px;
}
.fab {
  width: 58px;
  height: 58px;
  min-width: 58px;
  min-height: 58px;
  box-shadow: 0 14px 28px rgba(255, 106, 0, .24);
}
.fab svg {
  width: 28px;
  height: 28px;
}
.fab-menu {
  bottom: 72px;
}

@media (max-width: 700px) {
  .fab-wrap {
    right: 18px;
    bottom: 88px;
  }
  .fab {
    width: 54px;
    height: 54px;
    min-width: 54px;
    min-height: 54px;
  }
  .fab svg {
    width: 26px;
    height: 26px;
  }
}

/* Final density overrides */
#view-finance .page-heading h1 { font-size: 28px; }
#view-finance .page-heading p { font-size: 13px; }
