:root {
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --color-bg: #f5f3ef;
  --color-bg-elevated: #f1eee8;
  --color-bg-soft: #faf8f4;
  --color-surface: #ffffff;
  --color-surface-muted: #fbfaf7;
  --color-surface-strong: #f4f1ea;

  --color-text: #2f2c28;
  --color-text-soft: #4c4741;
  --color-text-muted: #8a847c;
  --color-text-faint: #b3ada5;

  --color-border: #e6e0d7;
  --color-border-soft: #eee9e1;
  --color-border-strong: #d8d1c7;

  --color-primary: #6c9dcf;
  --color-primary-hover: #5b8fbe;
  --color-primary-soft: #eef5fc;
  --color-primary-soft-strong: #ddebf8;

  --color-success: #92c95f;
  --color-success-soft: #eff8e6;
  --color-warning: #d7a146;
  --color-warning-soft: #fff6e7;
  --color-danger: #d76558;
  --color-danger-soft: #fff1ef;

  --color-overlay: rgba(40, 34, 29, 0.34);
  --color-shadow-xs: rgba(57, 45, 32, 0.03);
  --color-shadow-sm: rgba(57, 45, 32, 0.06);
  --color-shadow-md: rgba(57, 45, 32, 0.1);
  --color-shadow-lg: rgba(57, 45, 32, 0.14);

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-2xl: 34px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px var(--color-shadow-xs);
  --shadow-sm: 0 6px 16px var(--color-shadow-sm);
  --shadow-md: 0 18px 42px var(--color-shadow-md);
  --shadow-lg: 0 30px 80px var(--color-shadow-lg);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-9: 36px;
  --space-10: 40px;
  --space-12: 48px;

  --text-xs: 12px;
  --text-sm: 14px;
  --text-md: 15px;
  --text-lg: 18px;
  --text-xl: 24px;
  --text-2xl: 32px;
  --text-3xl: 42px;

  --line-xs: 1.3;
  --line-sm: 1.4;
  --line-md: 1.5;
  --line-lg: 1.6;
  --line-xl: 1.16;

  --control-xs: 34px;
  --control-sm: 40px;
  --control-md: 48px;
  --control-lg: 54px;
  --control-xl: 60px;

  --container: 1240px;
  --content: 980px;

  --focus-ring: 0 0 0 4px rgba(108, 157, 207, 0.14);

  --cal-shell-border: #e6e0d7;
  --cal-grid-bg: #f4f0ea;
  --cal-grid-soft: #f8f5f0;
  --cal-grid-cell: #eeebe5;
  --cal-grid-line: #ddd6cc;
  --cal-grid-line-soft: #ece6dd;
  --cal-chip-bg: #f3efe9;
  --cal-chip-bg-hover: #ece7df;
  --cal-muted: #8a847c;
  --cal-success: #95cd56;
  --cal-success-soft: #edf8ef;
  --cal-danger-soft: #fff1ef;
  --cal-busy-a: #d7d0c7;
  --cal-busy-b: #efeae3;
  --cal-booked: #7ebf55;
  --cal-selected: #dce8f5;
  --cal-event-primary: #6c9dcf;
  --cal-event-secondary: #8d7a69;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: var(--line-lg);
  color: var(--color-text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.8), transparent 28%),
    linear-gradient(180deg, #f8f5f0 0%, #f5f3ef 100%);
  text-rendering: optimizeLegibility;
}


.app-shell--hidden {
  opacity: 0;
  visibility: hidden;
}

.app-shell--visible {
  opacity: 1;
  visibility: visible;
  transition: opacity .16s ease;
}



.app-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--color-bg);

  opacity: 1;
  visibility: visible;
  transition: opacity .16s ease, visibility .16s ease;
}

.app-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}



.app-loader__brand {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text);
  opacity: .6;
}













button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

input::placeholder,
textarea::placeholder {
  color: var(--color-text-faint);
}

:focus-visible {
  outline: none;
}

.is-hidden {
  display: none !important;
}

.ui-container {
  width: 100%;
  max-width: calc(var(--container) + var(--space-6) * 2);
  margin: 0 auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

.ui-page {
  padding-top: var(--space-8);
  padding-bottom: var(--space-10);
}

.ui-page__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.ui-page__head-meta {
  display: grid;
  gap: var(--space-2);
}

.ui-section {
  margin-bottom: var(--space-8);
}

.ui-stack {
  display: grid;
  gap: var(--space-4);
}

.ui-stack--xs {
  gap: var(--space-2);
}

.ui-stack--sm {
  gap: var(--space-3);
}

.ui-stack--lg {
  gap: var(--space-6);
}

.ui-grid {
  display: grid;
  gap: var(--space-4);
}

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

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

.ui-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.ui-row--between {
  justify-content: space-between;
}

.ui-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.ui-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.ui-divider {
  width: 100%;
  height: 1px;
  background: var(--color-border-soft);
}

.ui-h1 {
  font-size: var(--text-3xl);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--color-text);
}

.ui-h2 {
  font-size: var(--text-xl);
  line-height: var(--line-xl);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--color-text);
}

.ui-h3 {
  font-size: var(--text-lg);
  line-height: 1.28;
  font-weight: 700;
  color: var(--color-text);
}

.ui-text {
  font-size: var(--text-md);
  line-height: var(--line-lg);
  color: var(--color-text-soft);
}

.ui-text-sm {
  font-size: var(--text-sm);
  line-height: var(--line-md);
  color: var(--color-text-soft);
}

.ui-text-xs {
  font-size: var(--text-xs);
  line-height: var(--line-sm);
  color: var(--color-text-muted);
}

.ui-text-muted {
  font-size: var(--text-sm);
  line-height: var(--line-md);
  color: var(--color-text-muted);
}

.ui-label {
  display: inline-block;
  font-size: var(--text-sm);
  line-height: var(--line-sm);
  font-weight: 700;
  color: var(--color-text-soft);
}

.ui-help {
  font-size: var(--text-xs);
  line-height: var(--line-sm);
  color: var(--color-text-muted);
}

.ui-link {
  color: var(--color-primary);
  font-weight: 700;
  transition: color .18s ease;
}

.ui-link:hover {
  color: var(--color-primary-hover);
}

.ui-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}

.ui-card__body {
  padding: var(--space-6);
}

.ui-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-6);
  border-bottom: 1px solid var(--color-border-soft);
}

.ui-card__title {
  font-size: var(--text-lg);
  line-height: 1.3;
  font-weight: 700;
  color: var(--color-text);
}

.ui-card__text {
  margin-top: var(--space-1);
  font-size: var(--text-sm);
  line-height: var(--line-md);
  color: var(--color-text-muted);
}

.ui-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-width: 0;
  height: var(--control-md);
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  line-height: 1;
  font-weight: 700;
  white-space: nowrap;
  transition:
    background-color .18s ease,
    border-color .18s ease,
    color .18s ease,
    box-shadow .18s ease,
    transform .18s ease,
    opacity .18s ease;
}

.ui-btn:hover {
  transform: translateY(-1px);
}

.ui-btn:active {
  transform: translateY(0);
}

.ui-btn:focus-visible {
  box-shadow: var(--focus-ring);
}

.ui-btn:disabled,
.ui-btn.is-disabled {
  opacity: .58;
  cursor: default;
  pointer-events: none;
  transform: none;
}

.ui-btn--primary {
  color: #fff;
  background: var(--color-primary);
  box-shadow: 0 10px 24px rgba(108, 157, 207, 0.2);
}

.ui-btn--primary:hover {
  background: var(--color-primary-hover);
}

.ui-btn--secondary {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--color-border);
  box-shadow: 0 2px 8px rgba(57, 45, 32, 0.03);
}

.ui-btn--secondary:hover {
  background: var(--color-surface-muted);
  border-color: var(--color-border-strong);
}

.ui-btn--ghost {
  color: var(--color-text-muted);
  background: transparent;
}

.ui-btn--ghost:hover {
  background: var(--color-surface-muted);
  color: var(--color-text);
}

.ui-btn--danger {
  color: #fff;
  background: var(--color-danger);
  box-shadow: 0 10px 24px rgba(215, 101, 88, 0.18);
}

.ui-btn--danger:hover {
  background: #c95548;
}

.ui-btn--sm {
  height: var(--control-sm);
  padding: 0 14px;
}

.ui-btn--lg {
  height: var(--control-lg);
  padding: 0 22px;
}

.ui-field {
  display: grid;
  gap: var(--space-2);
}

.ui-input,
.ui-select,
.ui-textarea {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--color-text);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.ui-input,
.ui-select {
  height: var(--control-md);
  padding: 0 16px;
}

.ui-textarea {
  min-height: 132px;
  padding: 14px 16px;
  resize: vertical;
}

.ui-input:hover,
.ui-select:hover,
.ui-textarea:hover {
  border-color: var(--color-border-strong);
}

.ui-input:focus,
.ui-select:focus,
.ui-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: var(--focus-ring);
}

.ui-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  line-height: 1;
  font-weight: 700;
}

.ui-badge--neutral {
  background: var(--color-bg-soft);
  color: var(--color-text-soft);
}

.ui-badge--success {
  background: var(--color-success-soft);
  color: #60913a;
}

.ui-badge--warning {
  background: var(--color-warning-soft);
  color: #ba8427;
}

.ui-badge--danger {
  background: var(--color-danger-soft);
  color: var(--color-danger);
}

.ui-table-wrap {
  overflow-x: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: 22px;
  box-shadow: var(--shadow-xs);
}

.ui-table {
  width: 100%;
  min-width: 720px;
}

.ui-table th,
.ui-table td {
  padding: 16px 18px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--color-border-soft);
  font-size: var(--text-sm);
}

.ui-table th {
  font-weight: 700;
  color: var(--color-text-muted);
  background: #fcfaf7;
}

.ui-table td {
  color: var(--color-text-soft);
}

.ui-table tbody tr:last-child td {
  border-bottom: 0;
}

.ui-table tbody tr:hover td {
  background: #fdfbf8;
}

.ui-empty {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-8);
  text-align: center;
  background: #fcfaf7;
  border: 1px dashed var(--color-border-strong);
  border-radius: 24px;
}

.ui-empty__title {
  font-size: var(--text-lg);
  line-height: 1.3;
  font-weight: 700;
  color: var(--color-text);
}

.ui-empty__text {
  font-size: var(--text-sm);
  line-height: var(--line-md);
  color: var(--color-text-muted);
}

.ui-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--color-overlay);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.ui-modal {
  width: 100%;
  max-width: 560px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--color-border-soft);
  border-radius: 30px;
  box-shadow: var(--shadow-lg);
}

.ui-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-6);
}

.ui-modal__body {
  padding: 0 var(--space-6) var(--space-6);
}

.ui-modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  padding: 0 var(--space-6) var(--space-6);
}

.platform-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 245, 240, 0.86);
  border-bottom: 1px solid var(--color-border-soft);
  backdrop-filter: blur(16px);
}

.platform-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.platform-header__brand {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.platform-header__right {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.platform-header__select {
  min-width: 90px;
}

.platform-header__user {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-soft);
}

.tp-auth-screen,
.student-auth-screen {
  padding: 56px 0 72px;
}

.tp-auth-wrap,
.student-auth-wrap {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.tp-auth-header,
.student-auth-header {
  width: 100%;
}

.tp-auth-brand {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--color-text);
  letter-spacing: 0.03em;
}

.tp-auth-submit,
.student-auth-submit {
  width: 100%;
}

.tp-auth-footer {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  justify-content: center;
}

.tp-auth-footer--inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tp-auth-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.tp-auth-steps__item {
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: #e7e1d8;
  color: transparent;
  overflow: hidden;
  font-size: 0;
}

.tp-auth-steps__item.is-active {
  background: var(--color-text);
}

.tp-auth-alert {
  padding: 14px 15px;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  font-size: var(--text-sm);
  line-height: var(--line-md);
}

.tp-auth-alert--error {
  background: var(--color-danger-soft);
  border-color: #f1cbc7;
  color: #b54b40;
}

.tp-auth-alert--success {
  background: var(--color-success-soft);
  border-color: #d9edc9;
  color: #64963d;
}

.tp-auth-domain {
  padding: 18px;
  border: 1px solid var(--color-border-soft);
  border-radius: 22px;
  background: #fcfaf7;
}

.tp-auth-domain__value {
  font-size: var(--text-lg);
  line-height: 1.35;
  font-weight: 700;
  color: var(--color-text);
  word-break: break-word;
}

.dashboard-shell__head {
  margin-bottom: var(--space-6);
}

.dashboard-shell__layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: var(--space-5);
  align-items: start;
}

.dashboard-shell__sidebar {
  position: sticky;
  top: var(--space-6);
}

.dashboard-shell__nav {
  display: grid;
  gap: 10px;
}

.dashboard-shell__nav-btn {
  width: 100%;
  min-height: 50px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  border: 1px solid var(--color-border-soft);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: 700;
  box-shadow: var(--shadow-xs);
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.dashboard-shell__nav-btn:hover {
  background: var(--color-surface-muted);
  border-color: var(--color-border);
  transform: translateY(-1px);
}

.dashboard-shell__nav-btn:focus-visible {
  box-shadow: var(--focus-ring);
}

.dashboard-shell__nav-btn.is-active {
  background: var(--color-primary-soft);
  border-color: #cfe0f2;
  color: var(--color-primary-hover);
  box-shadow: inset 0 0 0 1px rgba(108, 157, 207, 0.05);
}

.dashboard-shell__content {
  min-width: 0;
}

.dashboard-shell__domain {
  margin-top: 8px;
  max-width: 100%;
}

.dashboard-shell__domain-text {
  display: inline-block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-calendar {
  width: 100%;
}

.dashboard-calendar__modal,
.dashboard-calendar__groups-card,
.dashboard-calendar__booking-modal-card,
.dashboard-calendar-modal,
.teacher-calendar-overlay__dialog {
  background: #fff;
}

.dashboard-calendar__modal {
  border: 1px solid var(--cal-shell-border);
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(57, 45, 32, 0.08);
  overflow: hidden;
}

.dashboard-calendar__modal-head {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  min-height: 72px;
  padding: 0 20px;
  border-bottom: 1px solid var(--color-border-soft);
}

.dashboard-calendar__modal-title {
  text-align: center;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-text);
}

.dashboard-calendar__modal-side {
  min-width: 48px;
  min-height: 1px;
}

.dashboard-calendar__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px 12px;
  flex-wrap: wrap;
}

.dashboard-calendar__legend,
.dashboard-calendar__toolbar-right,
.dashboard-calendar__range-nav,
.dashboard-calendar__booking-row,
.dashboard-calendar-modal__foot-actions {
  display: flex;
  align-items: center;
}

.dashboard-calendar__legend {
  gap: 18px;
  flex-wrap: wrap;
}

.dashboard-calendar__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cal-muted);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 500;
}

.dashboard-calendar__legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex: 0 0 auto;
  display: inline-block;
  border: 1px solid var(--color-border-strong);
}

.dashboard-calendar__legend-dot.is-available {
  background: var(--cal-success);
  border-color: var(--cal-success);
}

.dashboard-calendar__legend-dot.is-unavailable {
  background: #efebe5;
  border-color: #e2dcd2;
}

.dashboard-calendar__legend-dot.is-busy {
  background: repeating-linear-gradient(45deg, var(--cal-busy-a) 0, var(--cal-busy-a) 2px, #f4f1eb 2px, #f4f1eb 6px);
  border-color: var(--cal-busy-a);
}

.dashboard-calendar__legend-dot.is-booked {
  background: repeating-linear-gradient(45deg, var(--cal-booked) 0, var(--cal-booked) 2px, #eff8e8 2px, #eff8e8 6px);
  border-color: var(--cal-booked);
}

.dashboard-calendar__toolbar-right {
  gap: 14px;
  margin-left: auto;
  flex-wrap: wrap;
}

.dashboard-calendar__today-chip,
.dashboard-calendar__range-arrow,
.dashboard-calendar__booking-close,
.dashboard-calendar-modal__close {
  background: var(--cal-chip-bg);
  color: var(--color-text-soft);
}

.dashboard-calendar__today-chip {
  height: 40px;
  padding: 0 16px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dashboard-calendar__today-chip:hover,
.dashboard-calendar__range-arrow:hover:not(:disabled),
.dashboard-calendar__booking-close:hover,
.dashboard-calendar-modal__close:hover {
  background: var(--cal-chip-bg-hover);
}

.dashboard-calendar__today-chip-icon {
  width: 16px;
  height: 16px;
}

.dashboard-calendar__range-nav {
  gap: 12px;
}

.dashboard-calendar__range-arrow {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  font-size: 24px;
  line-height: 1;
  justify-content: center;
}

.dashboard-calendar__range-arrow:disabled {
  opacity: .45;
  cursor: default;
}

.dashboard-calendar__range-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.dashboard-calendar__range-label {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--color-text);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}

.dashboard-calendar__timezone {
  color: var(--cal-muted);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 600;
}

.dashboard-calendar__date-native {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.dashboard-calendar__board {
  padding: 8px 22px 24px;
}

.dashboard-calendar__viewport {
  overflow: auto;
  max-height: calc(100vh - 280px);
  border: 1px solid var(--cal-grid-line);
  border-radius: 12px;
  background: var(--cal-grid-bg);
}

.dashboard-calendar__grid {
  display: grid;
  min-width: 980px;
  background: var(--cal-grid-bg);
  position: relative;
}

.dashboard-calendar__header-cell {
  position: sticky;
  top: 0;
  z-index: 4;
  min-height: 62px;
  padding: 10px 8px 8px;
  border-right: 1px solid var(--cal-grid-line);
  border-bottom: 1px solid var(--cal-grid-line);
  background: var(--cal-grid-soft);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--cal-muted);
  text-align: center;
}

.dashboard-calendar__header-cell.is-time {
  align-items: flex-start;
  padding-left: 16px;
  color: #9a938a;
  font-size: 14px;
  font-weight: 700;
}

.dashboard-calendar__header-cell.is-today {
  background: var(--color-primary-soft);
}

.dashboard-calendar__header-weekday {
  display: block;
  font-size: 13px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.dashboard-calendar__header-date {
  display: block;
  margin-top: 4px;
  color: var(--color-text-soft);
  font-size: 22px;
  line-height: 1;
  font-weight: 800;
}

.dashboard-calendar__time-cell {
  position: relative;
  border-right: 1px solid var(--cal-grid-line);
  border-bottom: 1px solid var(--cal-grid-line);
  background: var(--cal-grid-soft);
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding-right: 12px;
}

.dashboard-calendar__time-label {
  display: inline-block;
  transform: translateY(-8px);
  color: #5b554e;
  font-size: 14px;
  line-height: 1;
  font-weight: 600;
}

.dashboard-calendar__cell {
  position: relative;
  height: 32px;
  border: 0;
  border-right: 1px solid var(--cal-grid-line);
  border-bottom: 1px solid var(--cal-grid-line);
  background: var(--cal-grid-cell);
  padding: 0;
  transition: background-color .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.dashboard-calendar__cell.is-clickable {
  cursor: crosshair;
}

.dashboard-calendar__cell.is-available,
.dashboard-calendar__cell.is-available-start {
  background: var(--cal-success);
}

.dashboard-calendar__cell.is-occupied {
  background: repeating-linear-gradient(45deg, var(--cal-busy-a) 0, var(--cal-busy-a) 2px, var(--cal-busy-b) 2px, var(--cal-busy-b) 7px);
}

.dashboard-calendar__cell.is-available-start {
  box-shadow: inset 0 0 0 1px rgba(122, 172, 64, 0.14);
}

.dashboard-calendar__cell.is-available-start:hover:not(.is-past) {
  box-shadow: inset 0 0 0 1px rgba(70, 111, 27, 0.18), 0 0 0 1px rgba(149, 205, 86, 0.12);
}

.dashboard-calendar__cell.is-past,
.dashboard-calendar__event.is-past {
  opacity: 0;
}

.dashboard-calendar__cell.is-selected-range {
  background: var(--cal-selected) !important;
  box-shadow: inset 0 0 0 1px rgba(108, 157, 207, 0.2);
}

.dashboard-calendar__cell:hover:not(.is-past) {
  box-shadow: inset 0 0 0 1px rgba(108, 157, 207, 0.16);
}

.dashboard-calendar__event {
  position: relative;
  z-index: 3;
  margin: 2px 4px;
  border-radius: 8px;
  padding: 7px 8px;
  color: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dashboard-calendar__event--lesson {
  background: var(--cal-event-primary);
}

.dashboard-calendar__event--group,
.dashboard-calendar__event--teacher-group,
.dashboard-calendar__event--student-group {
  background: var(--cal-event-secondary);
}

.dashboard-calendar__event-title {
  font-size: 12px;
  line-height: 1.15;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-calendar__event-time {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.1;
  opacity: .96;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-calendar__mobile-days {
  display: none;
  gap: 8px;
  padding: 0 22px 12px;
  overflow-x: auto;
}

.dashboard-calendar__mobile-day-btn {
  border: 1px solid #e2dbd2;
  background: #fff;
  color: #5b554e;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
  white-space: nowrap;
}

.dashboard-calendar__mobile-day-btn.is-active {
  background: var(--color-primary-soft);
  border-color: #cfe0f2;
  color: var(--color-primary-hover);
}

.dashboard-calendar__status {
  display: none;
  margin: 0 22px 12px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 600;
}

.dashboard-calendar__status.is-info {
  display: block;
  background: var(--color-primary-soft);
  color: var(--color-primary-hover);
}

.dashboard-calendar__status.is-success {
  display: block;
  background: var(--cal-success-soft);
  color: #4e7c2e;
}

.dashboard-calendar__status.is-error {
  display: block;
  background: var(--cal-danger-soft);
  color: #c14f44;
}

.dashboard-calendar__section {
  padding: 0 22px 24px;
}

.dashboard-calendar__groups-card {
  border: 1px solid var(--cal-shell-border);
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(57, 45, 32, 0.05);
  overflow: hidden;
}

.dashboard-calendar__groups-head,
.dashboard-calendar__booking-modal-head,
.dashboard-calendar-modal__head {
  border-bottom: 1px solid var(--color-border-soft);
}

.dashboard-calendar__groups-head {
  padding: 18px 20px 14px;
}

.dashboard-calendar__groups-title,
.dashboard-calendar__booking-modal-title,
.dashboard-calendar-modal__title {
  font-size: 18px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-text);
}

.dashboard-calendar__groups-list {
  display: grid;
}

.dashboard-calendar__groups-item {
  padding: 16px 20px;
  border-top: 1px solid #f1ece5;
}

.dashboard-calendar__groups-item:first-child {
  border-top: 0;
}

.dashboard-calendar__groups-item-title,
.dashboard-calendar__booking-title {
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.3;
  font-weight: 700;
}

.dashboard-calendar__groups-item-meta,
.dashboard-calendar__booking-modal-subtitle,
.dashboard-calendar-modal__summary {
  margin-top: 6px;
  color: var(--cal-muted);
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
}

body.dashboard-calendar-is-selecting,
body.dashboard-calendar-is-selecting * {
  user-select: none;
}

.dashboard-calendar-modal-backdrop,
.dashboard-calendar__booking-modal-overlay,
.teacher-calendar-overlay__backdrop {
  background: rgba(40, 34, 29, 0.28);
  backdrop-filter: blur(2px);
}

.dashboard-calendar-modal-backdrop,
.teacher-calendar-overlay {
  z-index: 1200;
}

.dashboard-calendar-modal,
.dashboard-calendar__booking-modal-card {
  width: min(560px, calc(100vw - 24px));
  border-radius: 20px;
  border: 1px solid var(--cal-shell-border);
  box-shadow: 0 24px 60px rgba(57, 45, 32, 0.18);
}

.dashboard-calendar-modal--compact {
  max-width: 400px;
  width: 100%;
  max-height: min(86vh, 620px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dashboard-calendar-modal__head,
.dashboard-calendar__booking-modal-head {
  padding: 20px 22px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-calendar-modal__head-main {
  min-width: 0;
}

.dashboard-calendar__booking-close,
.dashboard-calendar-modal__close {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  font-size: 24px;
  line-height: 1;
}

.dashboard-calendar-modal__body {
  padding: 18px 22px;
  overflow-y: auto;
}

.dashboard-calendar-modal__action-list,
.dashboard-calendar__booking-list {
  display: grid;
  gap: 10px;
}

.dashboard-calendar__booking-list {
  padding: 18px 22px 0;
}

.dashboard-calendar-modal__choice,
.dashboard-calendar__booking-btn {
  border: 1px solid #e2dbd2;
  background: #fff;
}

.dashboard-calendar-modal__choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border-radius: 14px;
  padding: 0 14px;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 600;
}

.dashboard-calendar-modal__choice:has(input:checked),
.dashboard-calendar__booking-btn.is-enabled {
  border-color: #cfe0f2;
  background: var(--color-primary-soft);
}

.dashboard-calendar-modal__repeat-wrap {
  margin-top: 18px;
}

.dashboard-calendar-modal__repeat-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 600;
}

.dashboard-calendar-modal__repeat-panel[hidden] {
  display: none !important;
}

.dashboard-calendar-modal__repeat-panel {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--color-border-soft);
  border-radius: 16px;
  background: var(--color-surface-muted);
}

.dashboard-calendar-modal__weekday-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.dashboard-calendar-modal__weekday {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid #e2dbd2;
  border-radius: 12px;
  background: #fff;
  color: var(--color-text-soft);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.dashboard-calendar-modal__weekday input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.dashboard-calendar-modal__weekday:has(input:checked) {
  border-color: #cfe0f2;
  background: var(--color-primary-soft);
  color: var(--color-primary-hover);
}

.dashboard-calendar-modal__dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.dashboard-calendar-modal__date-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dashboard-calendar-modal__date-input {
  min-height: 42px;
}

.dashboard-calendar-modal__error {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--cal-danger-soft);
  color: #c14f44;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 600;
}

.dashboard-calendar-modal__foot {
  padding: 0 22px 22px;
}

.dashboard-calendar-modal__foot-actions {
  justify-content: flex-end;
  gap: 10px;
}

.dashboard-calendar__booking-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
}

.dashboard-calendar__booking-modal.is-open {
  display: block;
}

.dashboard-calendar__booking-modal-dialog {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.dashboard-calendar__booking-btn {
  width: 100%;
  border-radius: 16px;
  padding: 14px 16px;
  text-align: left;
  transition: border-color .15s ease, background-color .15s ease, transform .15s ease, opacity .15s ease;
}

.dashboard-calendar__booking-btn:hover:not(:disabled) {
  border-color: var(--color-border-strong);
  background: var(--color-surface-muted);
}

.dashboard-calendar__booking-btn.is-disabled,
.dashboard-calendar__booking-btn:disabled {
  opacity: .58;
  cursor: default;
}

.dashboard-calendar__booking-row {
  justify-content: space-between;
  gap: 12px;
}

.dashboard-calendar__booking-desc {
  margin-top: 4px;
  color: var(--cal-muted);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 500;
}

.dashboard-calendar__booking-balance {
  color: var(--color-text-soft);
  font-size: 13px;
  line-height: 1.25;
  font-weight: 700;
  white-space: nowrap;
}

.dashboard-calendar__booking-note {
  padding: 16px 22px 22px;
  color: var(--cal-muted);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 600;
}

.tp-student-profile__info {
  display: grid;
  gap: 0;
}

.tp-student-profile__info-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border-soft);
}

.tp-student-profile__info-row:last-child {
  border-bottom: 0;
}

.tp-student-profile__info-label {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: var(--line-md);
}

.tp-student-profile__info-value {
  min-width: 0;
  word-break: break-word;
  color: var(--color-text);
  font-size: var(--text-sm);
  line-height: var(--line-md);
  font-weight: 700;
}

.tp-packages-overview {
  display: grid;
  gap: var(--space-3);
}

.tp-packages-overview__item {
  padding: 18px 20px;
  border: 1px solid var(--color-border-soft);
  border-radius: 22px;
  background: #fcfaf7;
}

.tp-packages-overview__value {
  margin-top: 8px;
  font-size: 34px;
  line-height: 1;
  font-weight: 800;
  color: var(--color-text);
}

.tp-package-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.tp-package-card {
  min-width: 0;
}

.tp-package-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.tp-package-card__head-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.tp-package-card__summary {
  min-width: 0;
  word-break: break-word;
  color: var(--color-text-muted);
}

.tp-package-card__tokens {
  margin-top: 14px;
}

.tp-package-token-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tp-package-token {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #e2dbd2;
  background: #fff;
  color: var(--color-text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  box-shadow: var(--shadow-xs);
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.tp-package-token--new {
  background: var(--color-success-soft);
  border-color: #d9ecc7;
  color: #67953f;
}

.tp-package-token--add {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(108, 157, 207, 0.18);
}

.tp-package-token--add:hover {
  background: var(--color-primary-hover);
}

.tp-package-token--removable {
  cursor: pointer;
}

.tp-package-token__text,
.tp-package-token__minus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity .16s ease, transform .16s ease;
}

.tp-package-token__minus {
  position: absolute;
  inset: 0;
  opacity: 0;
  font-size: 18px;
  font-weight: 800;
}

.tp-package-token--removable:hover {
  background: #fff3f1;
  border-color: #efc7c1;
  color: #b64d43;
  transform: translateY(-1px);
}

.tp-package-token--removable:hover .tp-package-token__text {
  opacity: 0;
  transform: scale(.9);
}

.tp-package-token--removable:hover .tp-package-token__minus {
  opacity: 1;
  transform: scale(1);
}

.tp-package-editor {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--color-border-soft);
  border-radius: 20px;
  background: #fcfaf7;
}

.tp-package-editor__form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}

.tp-package-editor.is-hidden,
.tp-package-editor__step.is-hidden {
  display: none;
}

.teacher-calendar-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  opacity: 1;
  transition: opacity .22s ease;
}

.teacher-calendar-overlay.is-closing {
  opacity: 0;
}

.teacher-calendar-overlay__dialog {
  position: relative;
  z-index: 1;
  width: min(1800px, calc(100vw - 20px));
  height: calc(100vh - 20px);
  margin: 10px;
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(0);
  opacity: 1;
  transition: transform .22s ease, opacity .22s ease;
}

.teacher-calendar-overlay__dialog.is-closing {
  transform: translateY(56px);
  opacity: .82;
}

.teacher-calendar-overlay__collapse {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 46px;
  height: 22px;
  border-radius: 999px;
  background: rgba(47, 44, 40, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: background .18s ease, transform .18s ease;
}

.teacher-calendar-overlay__collapse:hover {
  background: rgba(47, 44, 40, 0.14);
  transform: translateX(-50%) translateY(1px);
}

.teacher-calendar-overlay__collapse-icon {
  font-size: 16px;
  line-height: 1;
  color: rgba(47, 44, 40, 0.72);
  transform: translateY(-1px);
  pointer-events: none;
}

.teacher-calendar-overlay__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-top: 18px;
}

.teacher-calendar-overlay__body > #teacher-calendar-root {
  min-height: 100%;
}

.teacher-calendar-layer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  pointer-events: none;
}

.teacher-calendar-layer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.08);
  opacity: 1;
  transition: opacity .22s ease;
  pointer-events: auto;
}

.teacher-calendar-layer__sheet {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  top: var(--teacher-calendar-top, 104px);
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
  overflow: visible;
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
  transition: transform .22s ease, opacity .22s ease, box-shadow .22s ease;
}

.teacher-calendar-layer__content {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: visible;
}

.teacher-calendar-layer__content > #teacher-calendar-root,
.teacher-calendar-layer__content > * {
  min-height: 100%;
}

.teacher-calendar-layer__nav-btn {
  position: absolute;
  top: 12px;
  z-index: 10;
  width: auto;
  height: auto;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  color: var(--color-text);
  font-size: 32px;
  line-height: 1;
}

.teacher-calendar-layer__nav-btn:hover {
  background: transparent;
  color: var(--color-primary-hover);
  transform: none;
}

.teacher-calendar-layer__nav-btn:focus-visible {
  box-shadow: none;
}

.teacher-calendar-layer__nav-btn--back {
  left: 16px;
}

.teacher-calendar-layer__nav-btn--close {
  right: 16px;
}

.teacher-calendar-layer.is-closing .teacher-calendar-layer__backdrop {
  opacity: 0;
}

.teacher-calendar-layer.is-closing .teacher-calendar-layer__sheet {
  opacity: 0;
  transform: translateY(18px);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
}

@media (max-width: 1100px) {
  .ui-grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tp-package-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .dashboard-calendar__toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-calendar__toolbar-right {
    width: 100%;
    justify-content: space-between;
  }

  .dashboard-calendar__range-nav {
    width: 100%;
    justify-content: space-between;
  }

  .dashboard-calendar__range-center {
    flex: 1 1 auto;
  }
}

@media (max-width: 960px) {
  .teacher-calendar-layer__sheet {
    left: 16px;
    right: 16px;
    bottom: 16px;
    top: var(--teacher-calendar-top, 88px);
    border-radius: 22px;
  }

  .teacher-calendar-layer__nav-btn {
    font-size: 30px;
  }

  .teacher-calendar-layer__nav-btn--back {
    left: 14px;
  }

  .teacher-calendar-layer__nav-btn--close {
    right: 14px;
  }
}

@media (max-width: 900px) {
  .ui-grid--2,
  .ui-grid--3 {
    grid-template-columns: 1fr;
  }

  .ui-page__head {
    flex-direction: column;
  }

  .dashboard-shell__layout {
    grid-template-columns: 1fr;
  }

  .dashboard-shell__sidebar {
    position: static;
  }

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

  .teacher-calendar-overlay__dialog {
    width: 100vw;
    height: 100vh;
    margin: 0;
    border-radius: 0;
  }

  .teacher-calendar-overlay__collapse {
    top: 6px;
    width: 40px;
    height: 20px;
  }

  .teacher-calendar-overlay__body {
    padding-top: 16px;
  }
}

@media (max-width: 760px) {
  .dashboard-calendar {
    padding: 12px;
  }

  .dashboard-calendar__modal-head {
    min-height: 64px;
    padding: 0 14px;
  }

  .dashboard-calendar__toolbar {
    padding: 14px 14px 10px;
  }

  .dashboard-calendar__board {
    padding: 8px 14px 14px;
  }

  .dashboard-calendar__mobile-days {
    display: flex;
    padding: 0 14px 12px;
  }

  .dashboard-calendar__viewport {
    max-height: calc(100vh - 260px);
  }

  .dashboard-calendar__grid {
    min-width: 100%;
  }

  .dashboard-calendar__legend {
    gap: 12px;
  }

  .dashboard-calendar__legend-item {
    font-size: 13px;
  }

  .dashboard-calendar__range-label {
    font-size: 15px;
    text-align: center;
  }

  .dashboard-calendar__header-cell {
    min-height: 54px;
  }

  .dashboard-calendar__status {
    margin: 0 14px 12px;
  }

  .dashboard-calendar__section {
    padding: 0 14px 16px;
  }

  .dashboard-calendar-modal-backdrop {
    padding: 10px;
    align-items: flex-end;
  }

  .dashboard-calendar-modal--compact {
    max-width: 100%;
    width: 100%;
    max-height: 88vh;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  .dashboard-calendar-modal__dates {
    grid-template-columns: 1fr;
  }

  .dashboard-calendar-modal__foot-actions {
    justify-content: stretch;
  }

  .dashboard-calendar-modal__foot-actions .ui-btn {
    flex: 1 1 0;
    min-height: 44px;
  }

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

@media (max-width: 767px) {
  .teacher-calendar-layer__backdrop {
    background: rgba(15, 23, 42, 0.14);
  }

  .teacher-calendar-layer__sheet {
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    border-radius: 0;
  }

  .teacher-calendar-layer__nav-btn {
    top: max(8px, env(safe-area-inset-top));
    font-size: 28px;
  }

  .teacher-calendar-layer__nav-btn--back {
    left: 10px;
  }

  .teacher-calendar-layer__nav-btn--close {
    right: 10px;
  }
}

@media (max-width: 640px) {
  .ui-container {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  .ui-page {
    padding-top: var(--space-6);
    padding-bottom: var(--space-8);
  }

  .platform-header__inner {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3);
  }

  .platform-header__right {
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .tp-auth-screen,
  .student-auth-screen {
    padding: 26px 0 44px;
  }

  .dashboard-shell__nav {
    grid-template-columns: 1fr;
  }

  .tp-student-profile__info-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .tp-package-editor__form {
    grid-template-columns: 1fr;
  }

  .tp-package-token {
    min-width: 38px;
    height: 38px;
    font-size: 11px;
  }

  .tp-package-token--add {
    font-size: 16px;
  }
}