/* Generated by tools/build-assets.mjs. Edit public/assets/css sources. */
/* Shared component contract. Change these values instead of page-local copies. */
:root {
  --ui-avatar-width: 40px;
  --ui-avatar-height: 48px;
  --ui-avatar-radius: 12px;
  --ui-avatar-font: 14px;
  --ui-radius-control: 12px;
  --ui-radius-card: 16px;
  --ui-space-card: 20px;
  --ui-space-gap: 16px;
  --ui-control-height: 42px;
  --ui-control-font: 14px;
  --ui-row-padding: 16px 20px;
  --ui-table-heading-bg: #faf9fd;
}

.material-type-icon {
  width: 24px;
  height: 24px;
}
.material-folder > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  color: #687086;
}
.material-folder > span .material-type-icon {
  width: 24px;
  height: 24px;
}
.material-preview > span {
  display: grid;
  place-items: center;
  color: #687086;
}
.material-preview .material-type-icon {
  width: 40px;
  height: 40px;
}
.material-preview.has-thumbnail > span {
  display: none;
}
.material-preview.has-thumbnail > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #fff;
}
.material-preview > b {
  display: none !important;
}
.material-no-preview > span {
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  color: #687086;
}
.material-no-preview .material-type-icon {
  width: 42px;
  height: 42px;
}
.material-trash-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.material-trash-button .ui-icon {
  width: 17px;
  height: 17px;
}
:root {
  --ink: #111326;
  --muted: #70758b;
  --line: #e8e9f1;
  --bg: #f7f8fc;
  --violet: #6d4aff;
  --violet-soft: #f1edff;
  --green: #20a765;
  --red: #ef4f5f;
  --shadow: 0 10px 40px rgba(34, 35, 58, 0.06);
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
.app-shell {
  display: grid;
  grid-template-columns: 216px 1fr;
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 34px;
}
.brand-mark,
.login-logo {
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(140deg, #8e6cff, #5836df);
  border-radius: var(--ui-radius-control);
  width: 34px;
  height: 34px;
  box-shadow: 0 8px 18px #7454e944;
}
.sidebar nav {
  display: grid;
  gap: 8px;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  color: #596074;
  border-radius: 12px;
  font-size: 14px;
}
.sidebar nav a.active,
.sidebar nav a:hover {
  background: var(--violet-soft);
  color: var(--violet);
}
.workspace-box {
  margin-top: auto;
  padding: 14px;
  background: #f7f7fb;
  border-radius: 14px;
  display: grid;
  gap: 3px;
}
.workspace-box small,
.workspace-box span {
  font-size: 11px;
  color: var(--muted);
}
main {
  min-width: 0;
}
.topbar {
  height: 66px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.search {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 8px 18px;
  color: #9a9eb0;
  font-size: 13px;
}
.user-chip {
  font-size: 13px;
}
.icon-btn {
  border: 0;
  background: none;
  cursor: pointer;
}
.page {
  padding: 28px;
  max-width: 1500px;
  margin: auto;
}
.page-head,
.form-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.page-head h1,
.form-head h1 {
  font-size: 27px;
  margin: 4px 0;
}
.page-head p,
.form-head p {
  margin: 0;
  color: var(--muted);
}
.btn {
  border: 1px solid var(--line);
  background: white;
  padding: 11px 16px;
  border-radius: 12px;
  font-weight: 650;
  cursor: pointer;
}
.btn.primary {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.metric-grid,
.mini-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.metric,
.mini-grid article {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--ui-radius-card);
  padding: 20px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
}
.metric strong {
  font-size: 30px;
}
.metric small,
.metric span,
.mini-grid span {
  color: var(--muted);
}
.metric.violet {
  background: linear-gradient(145deg, #fff, #f4f0ff);
}
.metric.blue {
  background: linear-gradient(145deg, #fff, #edf6ff);
}
.metric.green,
.mini-grid .green {
  background: linear-gradient(145deg, #fff, #edfbf4);
}
.metric.red,
.mini-grid .danger {
  background: linear-gradient(145deg, #fff, #fff0f1);
}
.panel,
.form-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--ui-radius-card);
  padding: var(--ui-space-card);
  box-shadow: var(--shadow);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel h2 {
  font-size: 16px;
}
.panel-head a {
  font-size: 13px;
  color: var(--violet);
}
.empty {
  padding: 36px;
  text-align: center;
  color: var(--muted);
}
.lesson-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.lesson-row div {
  display: grid;
}
.lesson-row span {
  color: var(--muted);
  font-size: 13px;
}
.pill {
  display: inline-flex;
  width: max-content;
  padding: 5px 9px;
  background: var(--violet-soft);
  color: var(--violet) !important;
  border-radius: 999px;
  font-size: 11px !important;
}
.pill.success {
  background: #eaf8f1;
  color: var(--green) !important;
}
.student-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.student-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--ui-radius-card);
  padding: var(--ui-space-card);
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
}
.student-card h3 {
  margin: 0 0 5px;
}
.student-card p {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 8px;
}
.avatar,
.profile-avatar {
  width: var(--ui-avatar-width);
  height: var(--ui-avatar-height);
  border-radius: var(--ui-avatar-radius);
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #d9d0ff, #f6f2ff);
  color: var(--violet);
  font-weight: 800;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--ui-space-gap);
}
.form-grid label,
.stack label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 650;
}
.form-grid input,
.form-grid select,
.form-grid textarea,
.stack input {
  width: 100%;
  border: 1px solid #dfe1eb;
  border-radius: var(--ui-radius-control);
  padding: 11px;
  background: #fff;
}
.form-grid textarea {
  min-height: 86px;
  resize: vertical;
}
.wide {
  grid-column: 1/-1;
}
.error,
.flash {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
}
.error {
  background: #fff0f1;
  color: #b22;
}
.flash {
  background: #eaf8f1;
  color: #18784b;
}
.profile-head {
  display: grid;
  grid-template-columns: 150px 1fr 180px;
  gap: 28px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  align-items: center;
}
.profile-avatar {
  width: 150px;
  height: 160px;
  font-size: 42px;
  border-radius: 24px;
}
.profile-title h1 {
  margin: 0 0 8px;
  font-size: 28px;
}
.profile-title p {
  color: var(--muted);
}
.profile-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 12px;
  color: #4f556a;
  font-size: 13px;
}
.progress-ring {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  display: grid;
  place-content: center;
  text-align: center;
  background:
    radial-gradient(circle at center, #fff 59%, transparent 60%),
    conic-gradient(var(--violet) 72%, #ebe9f6 0);
}
.progress-ring strong {
  font-size: 32px;
}
.progress-ring span {
  font-size: 11px;
  color: var(--muted);
}
.mini-grid {
  margin-top: 16px;
}
.mini-grid strong {
  font-size: 17px;
}
.tabs {
  display: flex;
  gap: 30px;
  padding: 22px 14px 12px;
  border-bottom: 1px solid var(--line);
  overflow: auto;
}
.tabs span {
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
}
.tabs .active {
  color: var(--violet);
  font-weight: 700;
}
.content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
.piece {
  display: grid;
  grid-template-columns: 1fr 140px 45px;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.piece div:first-child {
  display: grid;
}
.piece span {
  font-size: 12px;
  color: var(--muted);
}
.bar {
  height: 5px;
  background: #eee;
  border-radius: 6px;
}
.bar i {
  display: block;
  height: 100%;
  background: var(--violet);
  border-radius: 6px;
}
.calendar {
  display: grid;
  grid-template-columns: 72px repeat(var(--teachers, 3), minmax(180px, 1fr));
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--ui-radius-card);
  overflow: auto;
}
.calendar-corner,
.teacher-column-head {
  height: 64px;
  border-bottom: 1px solid var(--line);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.time-cell {
  padding: 12px;
  color: var(--muted);
  font-size: 12px;
  border-bottom: 1px solid var(--line);
}
.slot {
  min-height: 78px;
  padding: 5px;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.calendar-lesson {
  background: var(--violet-soft);
  border-left: 3px solid var(--violet);
  padding: 8px;
  border-radius: 8px;
  display: grid;
  font-size: 12px;
}
.calendar-lesson span {
  font-size: 10px;
  color: var(--muted);
}
.auth-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 20%, #eee9ff, transparent 35%), #f7f8fc;
}
.auth-main {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}
.login-card {
  width: min(420px, 100%);
  padding: 38px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 30px 80px #4e44751c;
}
.login-card h1 {
  margin: 18px 0 8px;
}
.login-card p {
  color: var(--muted);
  line-height: 1.5;
}
.stack {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}
.stack .btn {
  width: 100%;
}
@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 72px 1fr;
  }
  .sidebar {
    padding: 18px 10px;
  }
  .sidebar .brand b,
  .sidebar nav span,
  .workspace-box {
    display: none;
  }
  .sidebar nav a {
    justify-content: center;
    font-size: 18px;
  }
  .brand {
    padding: 8px 8px 30px;
  }
  .metric-grid,
  .mini-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .student-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .profile-head {
    grid-template-columns: 100px 1fr;
  }
  .profile-avatar {
    width: 100px;
    height: 115px;
  }
  .progress-ring {
    display: none;
  }
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 620px) {
  .app-shell {
    display: block;
  }
  .sidebar {
    position: fixed;
    z-index: 10;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: auto;
    height: 66px;
    display: block;
    padding: 7px;
    border-right: 0;
    border-top: 1px solid var(--line);
  }
  .sidebar .brand,
  .workspace-box {
    display: none;
  }
  .sidebar nav {
    display: flex;
    justify-content: space-around;
  }
  .sidebar nav a {
    padding: 10px;
  }
  .sidebar nav a:nth-child(n + 6) {
    display: none;
  }
  .topbar {
    height: 58px;
    padding: 0 14px;
  }
  .search,
  .user-chip {
    display: none;
  }
  .page {
    padding: 16px 14px 84px;
  }
  .page-head {
    align-items: flex-start;
    gap: 12px;
  }
  .page-head h1 {
    font-size: 23px;
  }
  .metric-grid,
  .mini-grid,
  .student-grid,
  .content-grid {
    grid-template-columns: 1fr 1fr;
  }
  .metric {
    padding: 15px;
  }
  .metric strong {
    font-size: 22px;
  }
  .student-card {
    grid-column: 1/-1;
  }
  .profile-head {
    grid-template-columns: 78px 1fr;
    padding: 16px;
    gap: 15px;
  }
  .profile-avatar {
    width: 78px;
    height: 94px;
    font-size: 24px;
  }
  .profile-title h1 {
    font-size: 21px;
  }
  .profile-title .pill {
    display: none;
  }
  .profile-facts {
    grid-template-columns: 1fr;
  }
  .profile-facts span:nth-child(n + 4) {
    display: none;
  }
  .mini-grid article {
    padding: 14px;
  }
  .tabs {
    gap: 22px;
  }
  .content-grid {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .wide {
    grid-column: auto;
  }
  .form-head {
    align-items: flex-start;
    gap: 10px;
  }
  .piece {
    grid-template-columns: 1fr 90px 35px;
  }
}
/* Interactive global search and student photos. */
.search {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
}
.search input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 190px;
  color: var(--ink);
}
.avatar img,
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}
.search-results {
  display: grid;
  gap: 10px;
}
.search-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}
.search-result small {
  color: var(--muted);
}
.search-page-input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.photo-preview {
  width: 180px;
  height: 200px;
  margin: 0 0 20px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--violet-soft);
}
.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.editable-avatar {
  position: relative;
  overflow: hidden;
}
.avatar-edit {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(17, 19, 38, 0.66);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.18s;
}
.avatar-edit span {
  font-size: 25px;
}
.avatar-edit small {
  font-size: 11px;
  font-weight: 700;
}
.editable-avatar:hover .avatar-edit,
.avatar-edit:focus-visible {
  opacity: 1;
}
.avatar-dialog {
  width: min(520px, calc(100% - 28px));
  border: 0;
  border-radius: 22px;
  padding: 0;
  box-shadow: 0 30px 90px rgba(17, 19, 38, 0.28);
}
.avatar-dialog::backdrop {
  background: rgba(17, 19, 38, 0.55);
  backdrop-filter: blur(3px);
}
.avatar-dialog form {
  padding: 24px;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}
.modal-head h2 {
  margin: 0 0 5px;
}
.modal-head p {
  margin: 0;
  color: var(--muted);
}
.modal-close {
  border: 0;
  background: #f1f1f6;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 24px;
  cursor: pointer;
}
.file-picker {
  display: flex;
  margin: 20px 0;
}
.file-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.file-picker span {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 700;
  cursor: pointer;
}
.crop-stage {
  display: grid;
  gap: 14px;
}
.crop-stage canvas {
  width: min(100%, 380px);
  aspect-ratio: 1;
  margin: auto;
  border-radius: 18px;
  cursor: grab;
  touch-action: none;
  background: #ececf3;
}
.crop-stage canvas:active {
  cursor: grabbing;
}
.zoom-control {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}
@media (hover: none) {
  .avatar-edit {
    opacity: 1;
    background: linear-gradient(transparent 55%, rgba(17, 19, 38, 0.72));
  }
  .avatar-edit span {
    margin-top: auto;
    margin-bottom: 12px;
  }
  .avatar-edit small {
    display: none;
  }
}
.ui-icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  flex: 0 0 auto;
  color: currentColor;
}
.sidebar nav .ui-icon {
  width: 19px;
  height: 19px;
  stroke-width: 1.7;
}
.profile-facts .ui-icon {
  width: 17px;
  height: 17px;
  color: #73798f;
  margin-right: 4px;
}
.search .ui-icon {
  width: 16px;
  height: 16px;
}
.avatar-edit .ui-icon {
  width: 28px;
  height: 28px;
}
.tabs a {
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
  padding: 4px 0 11px;
  border-bottom: 2px solid transparent;
}
.tabs a:hover {
  color: var(--violet);
}
.tabs a.active {
  color: var(--violet);
  font-weight: 700;
  border-bottom-color: var(--violet);
}
.tabs button {
  appearance: none;
  border: 0;
  background: transparent;
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
  padding: 4px 0 11px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}
.tabs button:hover {
  color: var(--violet);
}
.tabs button.active {
  color: var(--violet);
  font-weight: 700;
  border-bottom-color: var(--violet);
}
#student-tab-content {
  min-height: 260px;
}
.tab-loading {
  min-height: 250px;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--muted);
}
.tab-loading span {
  width: 34px;
  height: 34px;
  border: 3px solid #e7e3fa;
  border-top-color: var(--violet);
  border-radius: 50%;
  margin: auto;
  animation: tab-spin 0.7s linear infinite;
}
@keyframes tab-spin {
  to {
    transform: rotate(360deg);
  }
}
.crop-stage[hidden] {
  display: none !important;
}
.upload-zone {
  margin: 22px 0 8px;
  min-height: 138px;
  border: 1.5px dashed #cbc8dd;
  border-radius: 18px;
  background: linear-gradient(145deg, #faf9ff, #f5f3ff);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
  cursor: pointer;
  transition: 0.18s;
}
.upload-zone:hover,
.upload-zone.dragging {
  border-color: var(--violet);
  background: #f2eeff;
  transform: translateY(-1px);
}
.upload-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.upload-zone .upload-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--violet);
  box-shadow: 0 8px 22px #6d4aff20;
}
.upload-zone .upload-icon .ui-icon {
  width: 23px;
  height: 23px;
}
.upload-zone strong {
  font-size: 15px;
}
.upload-zone small {
  color: var(--muted);
}
.avatar-status {
  min-height: 18px;
  margin: 7px 0 14px;
  text-align: center;
  color: var(--green);
  font-size: 12px;
}
.avatar-status.error-text {
  color: var(--red);
}
.crop-frame {
  position: relative;
  width: min(100%, 380px);
  aspect-ratio: 1;
  margin: auto;
  border-radius: 22px;
  overflow: hidden;
  background: #ececf3;
  box-shadow: inset 0 0 0 1px #ffffff80;
}
.crop-frame canvas {
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 0;
}
.crop-guide {
  position: absolute;
  inset: 9%;
  border: 1px solid #ffffffcc;
  border-radius: 50%;
  box-shadow: 0 0 0 999px rgba(17, 19, 38, 0.18);
  pointer-events: none;
}
.modal-actions .btn.primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.profile-avatar {
  width: 150px;
  height: 200px;
  border-radius: 22px;
}
.crop-frame {
  width: min(100%, 360px);
  aspect-ratio: 3/4;
}
.crop-guide {
  display: none;
}
.action-dialog {
  width: min(820px, calc(100% - 28px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 0;
  border-radius: 22px;
  padding: 0;
  box-shadow: 0 30px 90px rgba(17, 19, 38, 0.3);
}
.action-dialog::backdrop {
  background: rgba(17, 19, 38, 0.55);
  backdrop-filter: blur(3px);
}
.action-dialog-body {
  position: relative;
  padding: 24px;
}
.action-dialog .action-close {
  position: sticky;
  float: right;
  top: 0;
  z-index: 3;
}
.action-dialog .form-card {
  border: 0;
  box-shadow: none;
  padding: 4px;
  background: #fff;
}
.action-dialog .form-head {
  padding-right: 44px;
}
.action-dialog .page-head {
  padding-right: 44px;
}
@media (max-width: 900px) {
  .profile-avatar {
    width: 105px;
    height: 140px;
  }
}
@media (max-width: 620px) {
  .profile-avatar {
    width: 78px;
    height: 104px;
  }
  .action-dialog-body {
    padding: 16px;
  }
}
.profile-more {
  margin: 16px 0 8px auto;
  width: max-content;
  position: relative;
}
.profile-more summary {
  list-style: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.profile-more summary::-webkit-details-marker {
  display: none;
}
.profile-more summary:hover {
  background: var(--violet-soft);
  color: var(--violet);
}
.profile-more-menu {
  position: absolute;
  right: 0;
  top: 48px;
  z-index: 6;
  width: 205px;
  padding: 7px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 50px rgba(17, 19, 38, 0.14);
  display: grid;
}
.profile-more-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 650;
}
.profile-more-menu a:hover {
  background: var(--violet-soft);
  color: var(--violet);
}
.profile-more-menu .ui-icon {
  width: 18px;
  height: 18px;
}
.action-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.action-dialog .form-head > button {
  display: none;
}
.action-dialog .action-modal-footer > button {
  display: inline-flex;
}
.action-dialog .form-head {
  margin-bottom: 22px;
}
.action-dialog .form-head h1 {
  font-size: 25px;
}
.action-dialog .modal-close.action-close {
  margin: 0;
}
.action-dialog form > .action-modal-footer {
  position: sticky;
  bottom: -24px;
  background: #fff;
  padding-bottom: 4px;
}
.profile-title {
  position: relative;
  padding-right: 54px;
}
.profile-title > .profile-more {
  position: absolute;
  right: 0;
  top: -7px;
  margin: 0;
}
.profile-title > p {
  display: flex;
  align-items: center;
  gap: 7px;
}
.profile-title > p .ui-icon,
.profile-facts .ui-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}
.profile-facts span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.fact-separator {
  color: #b5b8c6;
}
.teacher-column-head .avatar {
  overflow: hidden;
}
.teacher-column-head .avatar img,
.teacher-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.teacher-column-head {
  justify-content: flex-start;
}
.schedule-date-control {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  margin-top: 4px;
}
.schedule-date-control .ui-icon {
  width: 18px;
  height: 18px;
  color: var(--violet);
}
.schedule-date-control input {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 7px 9px;
  color: var(--ink);
}
.teacher-stat {
  display: grid;
  place-items: center;
  text-align: center;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: var(--violet-soft);
  color: var(--violet);
}
.teacher-stat strong {
  font-size: 40px;
}
.teacher-stat span {
  font-size: 12px;
}
.tabs button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 0 10px;
  white-space: nowrap;
  cursor: pointer;
  font-size: 13px;
}
.tabs button.active {
  color: var(--violet);
  font-weight: 700;
  border-bottom: 2px solid var(--violet);
}
.profile-title {
  padding-right: 0;
}
.profile-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.profile-name-row h1 {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0;
}
.profile-name-row h1 .pill {
  font-size: 11px !important;
  font-weight: 600;
  padding: 5px 10px;
}
.profile-name-row .profile-more {
  margin: 0;
  display: inline-block;
  font-size: 14px;
}
.profile-name-row .profile-more summary {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  border-radius: 10px;
}
.profile-name-row .profile-more summary:hover,
.profile-name-row .profile-more[open] summary {
  background: var(--violet-soft);
  color: var(--violet);
}
.profile-more-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 0;
  background: transparent;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
}
.profile-more-menu button:hover {
  background: var(--violet-soft);
  color: var(--violet);
}
.profile-title > p,
.profile-facts,
.profile-facts span {
  font-size: 14px;
  line-height: 1.45;
}
.profile-title > p {
  margin: 8px 0 15px;
}
.profile-title > p .ui-icon,
.profile-facts .ui-icon {
  width: 18px;
  height: 18px;
  stroke-width: 1.7;
}
.profile-facts {
  row-gap: 11px;
}
.profile-name-row h1 .pill {
  font-size: 13px !important;
  padding: 6px 11px;
}
.profile-title > p {
  width: 50%;
  padding-right: 18px;
}
.profile-facts {
  grid-template-columns: repeat(2, minmax(190px, 1fr));
  grid-template-rows: repeat(3, minmax(22px, auto));
  column-gap: 42px;
  row-gap: 10px;
}
.profile-facts span:nth-child(1) {
  grid-column: 1;
  grid-row: 2;
}
.profile-facts span:nth-child(2) {
  grid-column: 1;
  grid-row: 1;
}
.profile-facts span:nth-child(3) {
  grid-column: 2;
  grid-row: 1;
}
.profile-facts span:nth-child(4) {
  grid-column: 2;
  grid-row: 2;
}
.profile-facts span:nth-child(5) {
  grid-column: 2;
  grid-row: 3;
}
.teacher-profile .profile-title > p {
  width: auto;
}
.teacher-profile .profile-facts span:nth-child(1) {
  grid-column: 1;
  grid-row: 3;
}
.teacher-profile .profile-facts span:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}
.teacher-profile .profile-facts span:nth-child(3) {
  grid-column: 1;
  grid-row: 2;
}
.teacher-profile .profile-facts span:nth-child(4) {
  grid-column: 1;
  grid-row: 1;
}
.guardian-profile .profile-facts span:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
}
.guardian-profile .profile-facts span:nth-child(2) {
  grid-column: 1;
  grid-row: 2;
}
.guardian-profile .profile-facts span:nth-child(3) {
  grid-column: 2;
  grid-row: 1;
}
.invite-copy-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.invite-copy-row input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #f8f8fc;
  color: #444a61;
}
.invite-result > p {
  color: var(--muted);
  font-size: 13px;
}
@media (max-width: 700px) {
  .profile-title > p {
    width: 100%;
  }
  .profile-facts {
    display: flex;
    flex-direction: column;
    gap: 9px;
  }
  .profile-facts span {
    order: initial !important;
  }
}
.profile-title {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr);
  grid-template-rows: auto repeat(3, minmax(24px, auto));
  column-gap: 48px;
  row-gap: 9px;
}
.profile-name-row {
  grid-column: 1/-1;
  grid-row: 1;
}
.profile-title > p {
  grid-column: 1;
  grid-row: 2;
  width: auto;
  margin: 0;
  padding: 0;
  color: #596074;
}
.profile-facts {
  display: contents;
}
.profile-facts span {
  color: #596074 !important;
  font-weight: 400;
}
.profile-title .profile-facts span:nth-child(1) {
  grid-column: 1;
  grid-row: 4;
}
.profile-title .profile-facts span:nth-child(2) {
  grid-column: 1;
  grid-row: 3;
}
.profile-title .profile-facts span:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}
.profile-title .profile-facts span:nth-child(4) {
  grid-column: 2;
  grid-row: 3;
}
.profile-title .profile-facts span:nth-child(5) {
  grid-column: 2;
  grid-row: 4;
}
.teacher-profile .profile-title .profile-facts span:nth-child(1) {
  grid-column: 1;
  grid-row: 4;
}
.teacher-profile .profile-title .profile-facts span:nth-child(2) {
  grid-column: 2;
  grid-row: 2;
}
.teacher-profile .profile-title .profile-facts span:nth-child(3) {
  grid-column: 1;
  grid-row: 3;
}
.teacher-profile .profile-title .profile-facts span:nth-child(4) {
  grid-column: 1;
  grid-row: 2;
}
.guardian-profile .profile-title .profile-facts span:nth-child(1) {
  grid-column: 1;
  grid-row: 2;
}
.guardian-profile .profile-title .profile-facts span:nth-child(2) {
  grid-column: 1;
  grid-row: 3;
}
.guardian-profile .profile-title .profile-facts span:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}
.invite-flow .form-head {
  margin-bottom: 18px;
}
.invite-steps {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  counter-reset: invite;
  display: grid;
  gap: 10px;
}
.invite-steps li {
  counter-increment: invite;
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  color: #596074;
  font-size: 13px;
}
.invite-steps li:before {
  content: counter(invite);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--violet-soft);
  color: var(--violet);
  font-weight: 800;
}
.invite-steps b {
  color: var(--ink);
}
.invite-flow .stack label small {
  font-weight: 400;
  color: var(--muted);
}
.invite-success {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 14px;
  background: #eefaf4;
  color: #18784b;
}
.invite-success-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #20a765;
  color: white;
  font-weight: 800;
}
.invite-success p {
  margin: 4px 0 0;
  color: #4f6d60;
  font-size: 13px;
}
.invite-note {
  color: var(--muted);
  font-size: 13px;
}
.relation-picker,
.form-grid fieldset.wide {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}
.relation-picker > p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}
.relation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.relation-grid label {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
}
.relation-grid label:has(input:checked) {
  border-color: #8a72ff;
  background: var(--violet-soft);
}
.relation-grid input {
  width: auto;
}
.relation-grid span {
  display: grid;
}
.relation-grid small {
  color: var(--muted);
  font-weight: 400;
}
.relation-picker-head {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: start;
}
.relation-combobox {
  position: relative;
}
.relation-combobox > input {
  width: 100%;
  border: 1px solid #dfe1eb;
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
}
.relation-options {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  max-height: 360px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 7px;
  box-shadow: 0 18px 55px rgba(17, 19, 38, 0.16);
}
.relation-options[hidden] {
  display: none;
}
.relation-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border-radius: 10px;
  cursor: pointer;
}
.relation-options label:hover {
  background: var(--violet-soft);
}
.relation-options label[hidden] {
  display: none;
}
.relation-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.relation-options label:has(input:checked) {
  color: var(--violet);
  background: #f7f5ff;
}
.relation-options label:has(input:checked):after {
  content: "✓";
  margin-left: auto;
  font-weight: 900;
}
.relation-avatar {
  position: relative;

  overflow: hidden;
  display: grid;
  place-items: center;
}
.relation-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.relation-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}
.relation-selected-card {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 210px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.relation-selected-card strong {
  font-size: 13px;
}
.relation-selected-card button {
  margin-left: auto;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: #f1f1f6;
  color: #676b7d;
  font-size: 20px;
  cursor: pointer;
}
.relation-selected-card button:hover {
  background: #fff0f1;
  color: var(--red);
}
.relation-empty {
  margin: 4px 0;
  color: var(--muted);
  font-size: 13px;
}
@media (max-width: 700px) {
  .profile-title {
    display: flex;
    flex-direction: column;
    gap: 9px;
  }
  .profile-title > p,
  .profile-facts span {
    display: flex !important;
  }
  .relation-grid {
    grid-template-columns: 1fr;
  }
  .invite-copy-row {
    flex-direction: column;
  }
  .relation-picker-head {
    grid-template-columns: 1fr;
  }
  .relation-picker-head > .btn {
    width: 100%;
    text-align: center;
  }
  .relation-selected-card {
    width: 100%;
  }
}
.invite-flow {
  width: min(680px, 100%);
}
.invite-flow .form-head h1 {
  margin-bottom: 6px;
}
.invite-explainer {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid #e4dfff;
  border-radius: 15px;
  background: #f8f6ff;
}
.invite-explainer-icon {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--violet);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
}
.invite-explainer strong {
  display: block;
  margin-bottom: 4px;
}
.invite-explainer p {
  margin: 0;
  color: #596074;
  line-height: 1.5;
  font-size: 14px;
}
.invite-flow .stack {
  margin-top: 18px;
}
.invite-flow .stack label {
  display: grid;
  gap: 8px;
}
.invite-flow .stack small {
  display: block;
  line-height: 1.4;
}
.relation-selected-card {
  min-width: 270px;
}
.relation-selected-card strong {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.relation-options [data-relation-name] {
  font-weight: 650;
}
.btn {
  white-space: nowrap;
}
.mobile-menu-toggle,
.mobile-menu-backdrop,
.mobile-sidebar-footer {
  display: none;
}
@media (max-width: 620px) {
  .sidebar nav {
    width: 100%;
    justify-content: stretch !important;
    align-content: start;
  }
  .sidebar nav a {
    width: 100%;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
}
@media (max-width: 620px) {
  body.app-shell {
    display: block;
  }
  .app-shell main {
    min-height: 100vh;
  }
  .sidebar {
    position: fixed;
    z-index: 60;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: min(320px, 88vw);
    height: 100dvh;
    padding: 22px 18px;
    background: #fff;
    border: 0;
    border-left: 1px solid var(--line);
    box-shadow: -24px 0 70px rgba(17, 19, 38, 0.18);
    display: flex;
    transform: translateX(105%);
    transition: transform 0.25s ease;
    visibility: hidden;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
    visibility: visible;
  }
  .sidebar .brand {
    display: flex;
    padding: 6px 8px 24px;
  }
  .sidebar .brand b {
    display: inline;
  }
  .sidebar nav {
    display: grid;
    gap: 6px;
    overflow-y: auto;
  }
  .sidebar nav a {
    display: flex !important;
    justify-content: flex-start;
    padding: 12px 14px;
    font-size: 14px;
  }
  .sidebar nav a:nth-child(n + 6) {
    display: flex !important;
  }
  .sidebar nav span {
    display: inline;
  }
  .sidebar .workspace-box {
    display: grid;
    margin-top: auto;
  }
  .mobile-sidebar-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
  }
  .mobile-sidebar-footer a,
  .mobile-sidebar-footer button {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    color: #596074;
    font-size: 12px;
  }
  .mobile-sidebar-footer form {
    margin: 0;
  }
  .mobile-sidebar-footer .ui-icon {
    width: 17px;
    height: 17px;
  }
  .mobile-menu-toggle {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    display: grid;
    place-content: center;
    gap: 4px;
    cursor: pointer;
  }
  .mobile-menu-toggle span {
    display: block;
    width: 19px;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
    transition: 0.2s;
  }
  .mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }
  .mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }
  .mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }
  .mobile-menu-backdrop {
    position: fixed;
    z-index: 55;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(17, 19, 38, 0.46);
    backdrop-filter: blur(2px);
    display: block;
  }
  .mobile-menu-backdrop[hidden] {
    display: none;
  }
  .mobile-menu-visible {
    overflow: hidden;
  }
  .desktop-logout {
    display: none;
  }
  .topbar {
    height: 64px;
    padding: 0 14px;
    position: sticky;
    top: 0;
    z-index: 40;
  }
  .top-actions {
    margin-left: auto;
  }
  .breadcrumbs {
    max-width: calc(100vw - 92px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .page {
    padding: 18px 14px 32px;
  }
  .page-head {
    align-items: flex-start;
  }
  .page-head > .btn {
    flex: 0 0 auto;
    padding: 10px 14px;
  }
  .metric-grid,
  .mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .student-grid {
    grid-template-columns: 1fr;
  }
  .content-grid {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .profile-head {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 15px;
    padding: 16px;
  }
  .profile-title {
    min-width: 0;
  }
  .teacher-stat,
  .progress-ring {
    display: none;
  }
  .relation-selected-card {
    min-width: 0;
    width: 100%;
  }
}
@media (max-width: 620px) {
  body.app-shell {
    display: block;
  }
  .app-shell main {
    min-height: 100vh;
  }
  .sidebar {
    position: fixed;
    z-index: 60;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: min(320px, 88vw);
    height: 100dvh;
    padding: 22px 18px;
    background: #fff;
    border: 0;
    border-left: 1px solid var(--line);
    box-shadow: -24px 0 70px rgba(17, 19, 38, 0.18);
    display: flex;
    transform: translateX(105%);
    transition: transform 0.25s ease;
    visibility: hidden;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
    visibility: visible;
  }
  .sidebar .brand {
    display: flex;
    padding: 6px 8px 24px;
  }
  .sidebar .brand b {
    display: inline;
  }
  .sidebar nav {
    display: grid;
    gap: 6px;
    overflow-y: auto;
  }
  .sidebar nav a {
    display: flex !important;
    justify-content: flex-start;
    padding: 12px 14px;
    font-size: 14px;
  }
  .sidebar nav a:nth-child(n + 6) {
    display: flex !important;
  }
  .sidebar nav span {
    display: inline;
  }
  .sidebar .workspace-box {
    display: grid;
    margin-top: auto;
  }
  .mobile-sidebar-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
  }
  .mobile-sidebar-footer a,
  .mobile-sidebar-footer button {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    color: #596074;
    font-size: 12px;
  }
  .mobile-sidebar-footer form {
    margin: 0;
  }
  .mobile-sidebar-footer .ui-icon {
    width: 17px;
    height: 17px;
  }
  .mobile-menu-toggle {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    display: grid;
    place-content: center;
    gap: 4px;
    cursor: pointer;
  }
  .mobile-menu-toggle span {
    display: block;
    width: 19px;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
    transition: 0.2s;
  }
  .mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }
  .mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }
  .mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }
  .mobile-menu-backdrop {
    position: fixed;
    z-index: 55;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(17, 19, 38, 0.46);
    backdrop-filter: blur(2px);
    display: block;
  }
  .mobile-menu-backdrop[hidden] {
    display: none;
  }
  .mobile-menu-visible {
    overflow: hidden;
  }
  .desktop-logout {
    display: none;
  }
  .topbar {
    height: 64px;
    padding: 0 14px;
    position: sticky;
    top: 0;
    z-index: 40;
  }
  .top-actions {
    margin-left: auto;
  }
  .breadcrumbs {
    max-width: calc(100vw - 92px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .page {
    padding: 18px 14px 32px;
  }
  .page-head {
    align-items: flex-start;
  }
  .page-head > .btn {
    flex: 0 0 auto;
    padding: 10px 14px;
  }
  .metric-grid,
  .mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .student-grid {
    grid-template-columns: 1fr;
  }
  .content-grid {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .profile-head {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 15px;
    padding: 16px;
  }
  .profile-title {
    min-width: 0;
  }
  .teacher-stat,
  .progress-ring {
    display: none;
  }
  .relation-selected-card {
    min-width: 0;
    width: 100%;
  }
}
.profile-head {
  grid-template-columns: 150px minmax(0, 1fr);
}
.teacher-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 900px) {
  .profile-head {
    grid-template-columns: 100px minmax(0, 1fr);
  }
  .teacher-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  .profile-head {
    grid-template-columns: 78px minmax(0, 1fr);
  }
  .teacher-metrics {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 620px) {
  .topbar .breadcrumbs {
    display: none;
  }
  .topbar .top-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 10px;
  }
  .topbar .search {
    display: flex !important;
    width: 100%;
    min-width: 0;
    padding: 8px 12px;
  }
  .topbar .search input {
    width: 100%;
    min-width: 0;
  }
  .topbar .mobile-menu-toggle {
    grid-column: 2;
  }
  .page-head,
  .page-head.schedule-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 20px;
  }
  .page-head > div:first-child {
    min-width: 0;
  }
  .page-head h1 {
    font-size: 25px;
    line-height: 1.15;
    margin: 0 0 6px;
  }
  .page-head p {
    font-size: 14px;
    line-height: 1.45;
  }
  .page-head > .btn {
    justify-self: start;
  }
  .page-head .form-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }
  .page-head .form-actions .btn {
    min-width: 0;
    padding: 10px 12px;
    text-align: center;
    font-size: 13px;
  }
  .schedule-date-control {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 5px 9px;
    align-items: center;
  }
  .schedule-date-control span {
    line-height: 1.35;
  }
  .schedule-date-control input {
    grid-column: 1/-1;
    width: 100%;
    margin-top: 4px;
  }
  .calendar {
    width: 100%;
    grid-template-columns: 64px repeat(var(--teachers, 3), 180px);
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }
  .calendar-corner,
  .teacher-column-head {
    height: 68px;
    padding: 9px;
  }
  .teacher-column-head {
    gap: 8px;
  }
  .teacher-column-head strong {
    font-size: 13px;
    line-height: 1.2;
  }
  .time-cell {
    padding: 10px 8px;
  }
  .slot {
    min-height: 72px;
  }
  .panel {
    padding: 14px;
  }
  .data-table {
    min-width: 0;
  }
  .data-table .tr {
    column-gap: 8px;
    font-size: 12px;
  }
  .data-table .tr > * {
    min-width: 0;
  }
  .data-table .tr strong {
    overflow-wrap: anywhere;
  }
}
@media (max-width: 620px) {
  .page-head > .btn {
    justify-self: end;
  }
  .page-head .form-actions {
    justify-self: end;
  }
  .page-head .form-actions .btn {
    text-align: center;
  }
}
.user-menu {
  position: relative;
}
.user-menu summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 7px;
  border-radius: 11px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}
.user-menu summary::-webkit-details-marker {
  display: none;
}
.user-menu summary:hover,
.user-menu[open] summary {
  background: var(--violet-soft);
}
.user-menu-avatar {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #8e6cff, #5836df);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.user-menu-chevron {
  color: var(--muted);
  font-size: 16px;
  transition: transform 0.18s;
}
.user-menu[open] .user-menu-chevron {
  transform: rotate(180deg);
}
.user-menu-dropdown {
  position: absolute;
  z-index: 50;
  right: 0;
  top: 45px;
  width: 220px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(17, 19, 38, 0.16);
  display: grid;
}
.user-menu-dropdown a,
.user-menu-dropdown button {
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 9px;
  padding: 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.user-menu-dropdown a:hover,
.user-menu-dropdown button:hover {
  background: var(--violet-soft);
  color: var(--violet);
}
.user-menu-dropdown form {
  margin: 0;
  border-top: 1px solid var(--line);
  padding-top: 5px;
  margin-top: 4px;
}
.user-menu-dropdown .ui-icon {
  width: 17px;
  height: 17px;
}
.account-overview {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}
.account-overview h1 {
  margin: 0 0 5px;
  font-size: 24px;
}
.account-overview p {
  margin: 0;
  color: var(--muted);
}
.account-avatar {
  width: 58px;
  height: 58px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #8e6cff, #5836df);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}
.schedule-color-field {
  grid-column: 1/-1;
}
.schedule-color-input {
  appearance: none !important;
  -webkit-appearance: none;
  width: 100% !important;
  height: 48px !important;
  padding: 5px !important;
  border: 1px solid var(--line) !important;
  border-radius: 13px !important;
  background: #fff !important;
  cursor: pointer;
}
.schedule-color-input::-webkit-color-swatch-wrapper {
  padding: 0;
}
.schedule-color-input::-webkit-color-swatch {
  border: 0;
  border-radius: 9px;
}
.schedule-color-input::-moz-color-swatch {
  border: 0;
  border-radius: 9px;
}
.schedule-color-field small {
  color: var(--muted);
  font-weight: 400;
}
.lesson-row > .pill {
  min-width: 92px;
  justify-content: center;
}
.topbar {
  position: relative;
}
@media (min-width: 621px) {
  .topbar .search {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: min(360px, 34vw);
  }
  .topbar .search input {
    width: 100%;
    min-width: 0;
  }
  .topbar .top-actions {
    margin-left: auto;
  }
}
@media (max-width: 620px) {
  .user-menu {
    display: none;
  }
  .mobile-sidebar-footer form {
    grid-column: 1/-1;
  }
  .account-overview {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .account-overview .btn {
    grid-column: 1/-1;
    text-align: center;
  }
}
.material-lesson-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: 300px;
  overflow: auto;
  padding: 4px;
}
.material-lesson-list .check {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.material-lesson-list .check span {
  display: grid;
  gap: 3px;
}
.material-lesson-list .check small {
  color: var(--muted);
  font-weight: 500;
}
.material-picker-layout {
  display: grid;
  gap: 18px;
}
.material-picker-layout .form-card {
  max-width: none;
}
@media (max-width: 620px) {
  .material-lesson-list {
    grid-template-columns: 1fr;
  }
  .material-picker-layout .form-head {
    align-items: flex-start;
  }
}
:root {
  --platform-accent: #6d4aff;
}
.platform-shell .data-table {
  display: grid;
}
.platform-shell .data-table .tr {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) repeat(3, minmax(120px, 1fr));
  gap: 18px;
  align-items: center;
  padding: 14px 10px;
  border-top: 1px solid var(--line);
}
.platform-shell .data-table .tr:first-child {
  border-top: 0;
}
.platform-shell .data-table .th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.platform-shell .data-table strong {
  display: grid;
  gap: 4px;
}
.platform-shell .data-table strong small {
  color: var(--muted);
  font-weight: 500;
}
.platform-shell .invite-flow {
  margin-bottom: 18px;
}
.platform-shell .invite-copy-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}
.platform-shell .invite-copy-row input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px 13px;
  background: #f8f8fb;
}
.section-gap {
  margin-top: 16px;
}
@media (max-width: 760px) {
  .platform-shell .data-table .tr {
    grid-template-columns: 1fr auto;
  }
  .platform-shell .data-table .tr > *:nth-child(2),
  .platform-shell .data-table .tr > *:nth-child(3) {
    display: none;
  }
  .platform-shell .invite-copy-row {
    grid-template-columns: 1fr;
  }
  .platform-shell .page-head {
    align-items: flex-start;
  }
}
:root {
  --plan-icon-size: 48px;
}
.platform-plan-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.platform-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 310px;
}
.platform-plan-icon {
  width: var(--plan-icon-size);
  height: var(--plan-icon-size);
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--violet-soft);
  color: var(--violet);
  margin-bottom: 10px;
}
.platform-plan-icon .ui-icon {
  width: 24px;
  height: 24px;
}
.platform-plan > h2 {
  font-size: 19px;
  margin: 4px 0 12px;
}
.platform-plan > strong {
  font-size: 18px;
}
.platform-plan > p {
  color: var(--muted);
  line-height: 1.45;
}
.platform-plan > .pill {
  margin-top: auto;
}
.desktop-logout .btn {
  display: flex;
  align-items: center;
  gap: 8px;
}
.desktop-logout .ui-icon {
  width: 17px;
  height: 17px;
}
.platform-shell .sidebar nav .ui-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
}
@media (max-width: 1100px) {
  .platform-plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  .platform-plan-grid {
    grid-template-columns: 1fr;
  }
  .platform-plan {
    min-height: 0;
  }
}
:root {
  --client-action-width: 118px;
}
.platform-shell .platform-clients .tr {
  grid-template-columns:
    minmax(230px, 2fr) minmax(100px, 0.8fr) minmax(100px, 0.8fr)
    minmax(100px, 0.8fr) var(--client-action-width);
}
.platform-client-name:hover strong {
  color: var(--violet);
}
.platform-open-cabinet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 11px;
  font-size: 12px;
  white-space: nowrap;
}
.platform-open-cabinet .ui-icon {
  width: 16px;
  height: 16px;
}
@media (max-width: 760px) {
  .platform-shell .platform-clients .tr {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .platform-shell .platform-clients .tr > *:nth-child(2),
  .platform-shell .platform-clients .tr > *:nth-child(3),
  .platform-shell .platform-clients .tr > *:nth-child(4) {
    display: none;
  }
  .platform-shell .platform-clients .th span:last-child {
    display: block;
  }
  .platform-open-cabinet span {
    display: none;
  }
  .platform-open-cabinet {
    width: 40px;
    height: 40px;
    padding: 0;
  }
}
.platform-client-form {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px;
}
.platform-client-form .form-head {
  padding-bottom: 22px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--line);
}
.platform-client-form .form-head h1 {
  margin-top: 0;
}
.client-form-section {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 34px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.client-form-section-title {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}
.client-form-section-title > span {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--violet-soft);
  color: var(--violet);
  font-size: 13px;
  font-weight: 800;
}
.client-form-section-title h2 {
  font-size: 16px;
  margin: 1px 0 6px;
}
.client-form-section-title p {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
  margin: 0;
}
.client-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}
.client-form-grid label {
  color: #25283a;
}
.client-form-grid label small {
  font-weight: 500;
  color: var(--muted);
  line-height: 1.4;
}
.client-form-grid input,
.client-form-grid select {
  height: 48px;
  padding: 0 14px;
}
.subdomain-field {
  height: 52px;
  display: flex;
  align-items: center;
  border: 1px solid #dfe1eb;
  border-radius: 11px;
  background: #fff;
  overflow: hidden;
  transition:
    border-color 0.18s,
    box-shadow 0.18s;
}
.subdomain-field:focus-within {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px #6d4aff14;
}
.subdomain-field span {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: #f7f7fa;
  color: #9296a7;
  font-size: 12px;
  border-right: 1px solid var(--line);
}
.subdomain-field input {
  height: 100% !important;
  min-width: 90px;
  flex: 1;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 8px !important;
  outline: 0;
  box-shadow: none !important;
  font-weight: 700;
  color: var(--violet);
}
.subdomain-field strong {
  padding-right: 14px;
  color: #596074;
  font-size: 12px;
  white-space: nowrap;
}
.client-plan-section {
  border-bottom: 0;
}
.client-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 22px;
}
.client-form-actions .btn {
  min-width: 118px;
}
.platform-client-form > .form-head > .btn {
  display: none;
}
@media (max-width: 900px) {
  .client-form-section {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .client-form-section-title {
    max-width: 480px;
  }
}
@media (max-width: 620px) {
  .platform-client-form {
    padding: 20px 16px;
  }
  .platform-client-form .form-head {
    padding-bottom: 18px;
  }
  .client-form-grid {
    grid-template-columns: 1fr;
  }
  .client-form-section {
    padding: 23px 0;
  }
  .subdomain-field span {
    display: none;
  }
  .subdomain-field strong {
    padding-right: 10px;
    font-size: 10px;
  }
  .client-form-actions {
    position: sticky;
    bottom: 74px;
    background: #fff;
    padding: 14px 0 0;
  }
  .client-form-actions .btn {
    flex: 1;
    min-width: 0;
  }
}
.user-menu summary {
  height: 42px;
  white-space: nowrap;
}
.user-menu summary > span:nth-child(2) {
  display: block;
  line-height: 20px;
}
.user-menu-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  line-height: 20px;
  text-align: center;
  transform-origin: 50% 50%;
  will-change: transform;
}
.user-menu[open] .user-menu-chevron {
  transform: rotate(180deg);
}
.dashboard-head {
  margin-bottom: 22px;
}
.dashboard-head > div > small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
}
.dashboard-metrics .metric {
  min-height: 142px;
  position: relative;
  overflow: hidden;
}
.dashboard-metrics .metric:after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -38px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(109, 74, 255, 0.045);
}
.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.dashboard-kpis article {
  display: grid;
  gap: 7px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}
.dashboard-kpis span {
  color: var(--muted);
  font-size: 12px;
}
.dashboard-kpis strong {
  font-size: 19px;
}
.dashboard-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.8fr);
  gap: 16px;
  margin-bottom: 16px;
}
.dashboard-stack {
  display: grid;
  gap: 16px;
  align-content: start;
}
.dashboard-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.dashboard-row:first-of-type {
  margin-top: 6px;
}
.dashboard-row time {
  color: #4f556a;
  font-variant-numeric: tabular-nums;
}
.dashboard-row > div {
  display: grid;
  gap: 3px;
}
.dashboard-row span {
  color: var(--muted);
  font-size: 12px;
}
.dashboard-row.compact {
  grid-template-columns: 52px minmax(0, 1fr) auto;
}
.dashboard-row.compact b {
  color: var(--green);
  font-size: 13px;
}
.load-row {
  display: grid;
  gap: 7px;
  padding: 10px 0;
}
.load-row > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}
.load-row span {
  color: var(--muted);
}
.load-row > i {
  display: block;
  height: 6px;
  border-radius: 6px;
  background: #eeeefa;
  overflow: hidden;
}
.load-row > i > b {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #8669ff, var(--violet));
}
.birthday-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.birthday-row time {
  color: var(--muted);
}
.empty.small {
  padding: 18px;
}
@media (max-width: 1100px) {
  .dashboard-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .dashboard-columns {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 620px) {
  .dashboard-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-kpis article:last-child {
    grid-column: 1/-1;
  }
  .dashboard-row {
    grid-template-columns: 66px minmax(0, 1fr);
  }
  .dashboard-row > .pill {
    display: none;
  }
  .dashboard-head > .btn {
    justify-self: end;
  }
  .dashboard-metrics .metric {
    min-height: 120px;
  }
  .user-menu summary {
    height: 40px;
  }
}
.platform-org-head {
  margin-bottom: 12px;
}
.platform-org-tabs {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  gap: 7px;
  padding: 8px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  overflow-x: auto;
}
.platform-org-tabs a {
  padding: 9px 13px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.platform-org-tabs a:hover {
  background: var(--violet-soft);
  color: var(--violet);
}
.platform-org-section {
  scroll-margin-top: 86px;
}
.platform-org-section .form-head p {
  margin-top: 5px;
}
.platform-org-section .form-head small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}
.platform-inline-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 16px;
}
.platform-inline-actions form {
  margin: 0;
}
.platform-usage-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.platform-usage-grid article {
  display: grid;
  gap: 8px;
  padding: 17px;
  border-radius: 14px;
  background: #f8f8fc;
  border: 1px solid var(--line);
}
.platform-usage-grid span {
  color: var(--muted);
  font-size: 12px;
}
.platform-usage-grid strong {
  font-size: 17px;
}
.platform-settings .form-head {
  margin-bottom: 22px;
}
.platform-danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px;
  border: 1px solid #ffd9dd;
  border-radius: var(--ui-radius-card);
  background: linear-gradient(145deg, #fff, #fff7f8);
}
.platform-danger-zone h2,
.platform-danger-zone h3 {
  margin: 0;
  color: #b52e3c;
}
.platform-danger-zone p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.platform-danger-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.platform-confirm-name {
  display: grid;
  gap: 8px;
  margin: 22px 0 4px;
  font-size: 13px;
  font-weight: 700;
}
.platform-confirm-name input {
  height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.btn.danger {
  border-color: #ef4f5f;
  color: #c72e3d;
  background: #fff;
}
.btn.danger:hover {
  background: #ef4f5f;
  color: #fff;
}
.pill.danger {
  background: #fff0f1;
  color: #c72e3d !important;
}
.platform-org-section h3 {
  margin: 25px 0 8px;
  font-size: 14px;
}
.platform-org-section textarea {
  min-height: 72px;
}
@media (max-width: 1000px) {
  .platform-usage-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  .platform-org-tabs {
    top: 64px;
    margin-left: -4px;
    margin-right: -4px;
  }
  .platform-org-section {
    scroll-margin-top: 132px;
  }
  .platform-usage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .platform-usage-grid article:last-child {
    grid-column: 1/-1;
  }
  .platform-inline-actions {
    display: grid;
  }
  .platform-inline-actions .btn {
    width: 100%;
  }
  .platform-danger-zone {
    align-items: flex-start;
    flex-direction: column;
  }
  .platform-danger-zone form,
  .platform-danger-zone .btn {
    width: 100%;
  }
}
.platform-org-head > .btn {
  font-size: 14px;
}
.platform-org-head > .btn::after {
  content: none;
}
.platform-org-section#main .form-grid > label:nth-child(3) {
  grid-template-columns: auto minmax(120px, 1fr) auto;
  align-items: center;
  column-gap: 8px;
}
.platform-org-section#main .form-grid > label:nth-child(3) > input {
  min-width: 0;
}
.platform-org-section#main .form-grid > label:nth-child(3) > small {
  white-space: nowrap;
  color: var(--muted);
  font-weight: 600;
}
.platform-danger-actions {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
}
.platform-danger-actions form {
  margin: 0;
}
.platform-purge-form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.platform-purge-form label {
  display: grid;
  gap: 6px;
  color: #9d2935;
  font-size: 11px;
  font-weight: 700;
}
.platform-purge-form input {
  height: 40px;
  min-width: 220px;
  padding: 0 11px;
  border: 1px solid #f0b8be;
  border-radius: 10px;
  background: #fff;
}
.platform-purge-form .btn {
  height: 40px;
}
@media (max-width: 760px) {
  .platform-org-section#main .form-grid > label:nth-child(3) {
    grid-template-columns: 1fr;
  }
  .platform-org-section#main .form-grid > label:nth-child(3) > small {
    white-space: normal;
  }
  .platform-danger-actions,
  .platform-purge-form {
    width: 100%;
    display: grid;
  }
  .platform-purge-form input {
    width: 100%;
    min-width: 0;
  }
}
.platform-org-tabs a.active {
  background: var(--violet-soft);
  color: var(--violet);
  box-shadow: inset 0 0 0 1px #e1d9ff;
}
.platform-org-section[hidden],
[data-platform-panel][hidden],
.platform-danger-zone[hidden] {
  display: none !important;
}
.app-toast {
  position: fixed;
  z-index: 100;
  top: 82px;
  right: 24px;
  max-width: min(420px, calc(100vw - 28px));
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid #cdebdc;
  border-radius: 14px;
  background: #f0fbf5;
  color: #18784b;
  box-shadow: 0 18px 55px rgba(17, 19, 38, 0.18);
  animation: toast-in 0.25s ease both;
}
.app-toast > span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #20a765;
  color: #fff;
  font-weight: 900;
}
.app-toast p {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
}
.app-toast button {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #4d7964;
  font-size: 20px;
  cursor: pointer;
}
.app-toast button:hover {
  background: #dff4e9;
}
.app-toast.is-hiding {
  animation: toast-out 0.22s ease both;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
}
@media (max-width: 620px) {
  .app-toast {
    top: 74px;
    right: 14px;
    left: 14px;
    max-width: none;
  }
}
.activation-success {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 20px 0 4px;
  padding: 13px 14px;
  border: 1px solid #cdebdc;
  border-radius: 13px;
  background: #f0fbf5;
  color: #18784b;
}
.activation-success > span {
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #20a765;
  color: #fff;
  font-weight: 900;
}
.activation-success strong {
  display: block;
}
.activation-success p {
  margin: 3px 0 0 !important;
  color: #4d7964 !important;
  font-size: 12px;
  line-height: 1.4;
}
.platform-member-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}
.platform-member-card {
  display: grid;
  gap: 14px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fafafe;
}
.platform-member-heading {
  display: flex;
  align-items: center;
  gap: 11px;
}
.platform-member-heading > div:last-child {
  display: grid;
  gap: 3px;
}
.platform-member-heading small {
  color: var(--muted);
}
.platform-member-heading small b {
  color: #a66b00;
}
.platform-member-fields {
  display: grid;
  grid-template-columns:
    minmax(160px, 1.15fr) minmax(210px, 1.35fr) minmax(145px, 0.8fr)
    minmax(145px, 0.8fr);
  gap: 11px;
}
.platform-member-fields label {
  display: grid;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
}
.platform-member-fields input,
.platform-member-fields select {
  height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.platform-member-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.platform-member-actions .btn {
  font-size: 12px;
}
@media (max-width: 980px) {
  .platform-member-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  .platform-member-fields {
    grid-template-columns: 1fr;
  }
  .platform-member-actions {
    display: grid;
  }
  .platform-member-actions .btn {
    width: 100%;
  }
}
.platform-member-count {
  padding: 7px 11px;
  border-radius: 10px;
  background: var(--violet-soft);
  color: var(--violet);
  font-size: 12px;
  font-weight: 750;
}
.platform-member-list-clean {
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--ui-radius-card);
  overflow: hidden;
  background: #fff;
}
.platform-member-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 20px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
}
.platform-member-row:last-of-type {
  border-bottom: 0;
}
.platform-member-row:hover {
  background: #faf9ff;
}
.platform-member-meta,
.platform-member-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.platform-member-row-actions .btn {
  height: 38px;
  padding: 0 13px;
  font-size: 12px;
}
.platform-member-row-actions .ui-icon {
  width: 16px;
  height: 16px;
}
.icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.icon-btn:hover {
  border-color: #cfc5ff;
  background: var(--violet-soft);
  color: var(--violet);
}
.icon-btn.danger {
  font-size: 23px;
  color: #c72e3d;
}
.icon-btn.danger:hover {
  border-color: #ef4f5f;
  background: #fff0f1;
}
.platform-access-dialog {
  width: min(620px, calc(100% - 28px));
  border: 0;
  border-radius: 22px;
  padding: 0;
  box-shadow: 0 30px 90px rgba(17, 19, 38, 0.28);
}
.platform-access-dialog::backdrop {
  background: rgba(17, 19, 38, 0.55);
  backdrop-filter: blur(4px);
}
.platform-access-dialog form {
  padding: 24px;
}
.platform-access-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 22px;
}
.platform-access-fields label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 750;
}
.platform-access-fields input,
.platform-access-fields select {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.platform-confirm-dialog {
  width: min(520px, calc(100% - 28px));
}
.platform-confirm-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafafe;
}
.platform-confirm-user > div:last-child {
  display: grid;
  gap: 3px;
}
.platform-confirm-user small {
  color: var(--muted);
}
.platform-confirm-user.danger {
  border-color: #ffd9dd;
  background: #fff7f8;
}
@media (max-width: 760px) {
  .platform-member-row {
    grid-template-columns: 1fr auto;
  }
  .platform-member-meta {
    grid-column: 1/-1;
    grid-row: 2;
  }
  .platform-member-row-actions {
    grid-column: 2;
    grid-row: 1;
  }
  .platform-member-row-actions .btn {
    width: 38px;
    padding: 0;
    font-size: 0;
  }
  .platform-member-row-actions .btn .ui-icon {
    margin: 0;
  }
  .platform-access-fields {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 460px) {
  .platform-member-row {
    gap: 10px;
    padding: 13px;
  }
  .platform-member-row-actions {
    gap: 5px;
  }
  .platform-member-row-actions .icon-btn,
  .platform-member-row-actions .btn {
    width: 34px;
    height: 34px;
  }
  .platform-member-meta {
    flex-wrap: wrap;
  }
  .platform-access-dialog form {
    padding: 19px;
  }
}
.platform-link-dialog-content {
  padding: 24px;
}
.platform-link-dialog .invite-copy-row {
  margin-top: 22px;
}
.platform-link-dialog .copy-hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.platform-confirm-dialog .modal-actions {
  flex-wrap: wrap;
}
@media (max-width: 520px) {
  .platform-link-dialog-content {
    padding: 19px;
  }
  .platform-link-dialog .invite-copy-row {
    display: grid;
  }
  .platform-link-dialog .invite-copy-row .btn {
    width: 100%;
  }
  .platform-confirm-dialog .modal-actions {
    display: grid;
  }
  .platform-confirm-dialog .modal-actions .btn {
    width: 100%;
  }
}
.platform-access-dialog {
  position: fixed !important;
  inset: 0 !important;
  margin: auto !important;
  max-height: calc(100dvh - 32px);
  overflow: auto;
}
.overdue-lessons-warning {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: -8px 0 18px;
  padding: 15px 18px;
  border: 1px solid #ffd39b;
  border-radius: 14px;
  background: #fff8ed;
  color: #8a4b00;
}
.overdue-lessons-warning span {
  font-size: 13px;
}
.lesson-status-filters {
  display: flex;
  gap: 8px;
  margin: -6px 0 16px;
  overflow: auto;
}
.lesson-status-filters a {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.lesson-status-filters a.active {
  border-color: var(--violet);
  background: var(--violet-soft);
  color: var(--violet);
}
.student-grid {
  align-items: stretch;
}
.student-card {
  height: 100%;
}
.student-card > div:last-child {
  min-width: 0;
}
.piece.repertoire-work-item,
.student-overview-side .piece {
  grid-template-columns: 1fr;
}
.piece.repertoire-work-item > .bar,
.piece.repertoire-work-item > b,
.student-overview-side .piece > .bar,
.student-overview-side .piece > b {
  display: none;
}
@media (max-width: 620px) {
  .overdue-lessons-warning {
    align-items: flex-start;
    flex-direction: column;
  }
}
.platform-org-head-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.platform-org-actions {
  position: relative;
}
.platform-org-actions > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}
.platform-org-actions > summary::-webkit-details-marker {
  display: none;
}
.platform-org-actions[open] > summary {
  background: var(--violet-soft);
  color: var(--violet);
}
.platform-org-actions-menu {
  position: absolute;
  z-index: 30;
  right: 0;
  top: 48px;
  width: 220px;
  display: grid;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(17, 19, 38, 0.16);
}
.platform-org-actions-menu button {
  width: 100%;
  padding: 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}
.platform-org-actions-menu button:hover {
  background: var(--violet-soft);
  color: var(--violet);
}
.platform-org-actions-menu button.danger {
  color: #c72e3d;
}
.platform-org-actions-menu button.danger:hover {
  background: #fff0f1;
}
.platform-trash-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.platform-trash-actions .btn {
  padding: 9px 11px;
  font-size: 12px;
  white-space: nowrap;
}
.platform-trash-list {
  --client-action-width: 270px;
}
@media (max-width: 760px) {
  .platform-org-head-actions {
    align-items: stretch;
  }
  .platform-org-head-actions > .btn {
    font-size: 0;
    width: 42px;
  }
  .platform-org-head-actions > .btn:before {
    content: "↗";
    font-size: 18px;
  }
  .platform-trash-list .tr {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }
  .platform-trash-actions .btn {
    width: 40px;
    height: 40px;
    padding: 0;
    font-size: 0;
  }
  .platform-trash-actions .btn:first-child:before {
    content: "↶";
    font-size: 18px;
  }
  .platform-trash-actions .btn:last-child:before {
    content: "×";
    font-size: 22px;
  }
}
.platform-org-section.platform-client-form {
  width: 100%;
  max-width: none;
  margin-top: 0;
}
.platform-org-section.platform-client-form > .form-head {
  padding-bottom: 22px;
}
.platform-org-section .client-form-section-last {
  border-bottom: 0;
}
.platform-org-section.platform-client-form .client-form-actions {
  border-top: 1px solid var(--line);
}
.platform-org-section .organization-subdomain-label {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 7px !important;
}
.platform-org-section .organization-subdomain-field {
  width: 100%;
  display: flex;
}
.platform-org-section .organization-subdomain-field input {
  min-width: 120px;
  flex: 1;
}
.platform-org-section .organization-subdomain-field strong {
  display: block;
  flex: 0 0 auto;
  padding: 0 16px 0 8px;
}
.subscription-price-summary {
  display: grid;
  justify-items: end;
  gap: 2px;
  padding: 10px 14px;
  border-radius: 13px;
  background: var(--violet-soft);
}
.subscription-price-summary span,
.subscription-price-summary small {
  color: var(--muted);
  font-size: 11px;
}
.subscription-price-summary strong {
  font-size: 20px;
  color: var(--violet);
}
.platform-subscription-form textarea {
  min-height: 100px;
  padding: 13px 14px;
}
@media (max-width: 620px) {
  .subscription-price-summary {
    justify-items: start;
    width: 100%;
  }
  .platform-org-section .organization-subdomain-field strong {
    padding-right: 10px;
    font-size: 10px;
  }
}
.team-panel .panel-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.team-list {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--ui-radius-card);
  overflow: hidden;
}
.team-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 18px;
  align-items: center;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
}
.team-row:last-child {
  border-bottom: 0;
}
.team-row:hover {
  background: #faf9ff;
}
.team-access-summary {
  display: flex;
  gap: 7px;
}
.team-dialog {
  width: min(760px, calc(100% - 28px));
}
.team-dialog > form {
  padding: 24px;
}
.team-dialog .wide {
  grid-column: 1/-1;
}
.team-access-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 20px 0;
  border: 0;
  padding: 0;
}
.team-access-mode legend {
  margin-bottom: 9px;
  font-size: 12px;
  font-weight: 800;
}
.team-access-mode > label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  cursor: pointer;
}
.team-access-mode > label:has(input:checked) {
  border-color: #8a72ff;
  background: var(--violet-soft);
}
.team-access-mode input {
  margin-top: 3px;
}
.team-access-mode span {
  display: grid;
  gap: 3px;
}
.team-access-mode small {
  color: var(--muted);
  line-height: 1.35;
}
.permission-matrix {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: opacity 0.2s;
}
.permission-matrix.is-disabled {
  opacity: 0.42;
}
.permission-head,
.permission-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(3, 90px);
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid var(--line);
}
.permission-row:last-child {
  border-bottom: 0;
}
.permission-head {
  background: #f8f8fc;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}
.permission-head span,
.permission-row strong {
  padding: 0 14px;
}
.permission-head span:not(:first-child) {
  text-align: center;
}
.permission-row strong {
  font-size: 12px;
}
.permission-row label {
  height: 44px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.permission-row input {
  position: absolute;
  opacity: 0;
}
.permission-row label span {
  width: 20px;
  height: 20px;
  border: 1px solid #cfd2df;
  border-radius: 50%;
  background: #fff;
}
.permission-row label:has(input:checked) span {
  border: 6px solid var(--violet);
}
@media (max-width: 760px) {
  .team-row {
    grid-template-columns: 1fr auto;
  }
  .team-access-summary {
    grid-column: 1/-1;
    grid-row: 2;
    flex-wrap: wrap;
  }
  .team-access-mode {
    grid-template-columns: 1fr;
  }
  .permission-head,
  .permission-row {
    grid-template-columns: minmax(120px, 1fr) repeat(3, 60px);
  }
  .permission-head span,
  .permission-row strong {
    padding: 0 8px;
    font-size: 10px;
  }
}

.trash-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.trash-actions form,
.profile-more-menu form {
  margin: 0;
}
.trash-table .tr {
  grid-template-columns: minmax(180px, 1fr) 150px 150px minmax(220px, auto);
}
.profile-more-menu form button.danger-text {
  width: 100%;
  color: #d33b47;
}
@media (max-width: 700px) {
  .trash-table .th {
    display: none;
  }
  .trash-table .tr {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  .trash-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}
.material-folder-card {
  position: relative;
  min-width: 0;
}
.material-folder-card:has(.folder-actions[open]) {
  z-index: 20;
}
.material-folder-card .material-folder {
  min-height: 74px;
  height: auto;
  padding-right: 58px;
}
.material-folder-card .folder-actions {
  right: 12px;
  bottom: auto;
  top: 12px;
  transform: none;
}
.material-folder-card .folder-actions > div {
  top: 42px;
  right: -12px;
  bottom: auto;
  width: 220px;
  z-index: 30;
}
.material-folder-card .folder-actions form {
  margin: 0;
}
.folder-dialog select {
  width: 100%;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.folder-dialog form > .modal-head {
  justify-content: space-between;
}
.folder-dialog form > .modal-actions {
  justify-content: flex-end;
}

.data-table {
  display: grid;
}
.tr {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 16px;
  padding: var(--ui-row-padding);
  border-top: 1px solid var(--line);
  align-items: center;
}
.tr.th {
  border-top: 0;
  color: var(--muted);
  font-size: 12px;
}
.check {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-weight: 500 !important;
}
.check input {
  width: auto !important;
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
legend {
  padding: 0 6px;
  font-size: 13px;
  font-weight: 700;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 22px 0;
}
.calendar {
  grid-template-columns: 72px repeat(var(--teachers, 3), minmax(180px, 1fr)) !important;
}
@media (max-width: 620px) {
  .tr {
    grid-template-columns: 1.4fr repeat(3, 0.8fr);
    font-size: 12px;
    gap: 7px;
  }
  .data-table {
    overflow-x: auto;
  }
  .panel {
    overflow: hidden;
  }
}
.narrow {
  max-width: 760px;
}
.form-grid.single {
  grid-template-columns: 1fr;
}
.section-gap {
  margin-top: 16px;
}
.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.profile-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}
.portal-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.portal-card h2 {
  margin: 12px 0;
}
.mini-grid.portal {
  grid-template-columns: 1fr 1fr;
}
.lesson-mode-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin: 4px 0 22px;
  background: #f3f1ff;
  border-radius: 14px;
}
.lesson-mode-switch label {
  position: relative;
  padding: 10px 18px;
  border-radius: 11px;
  color: var(--muted);
  font-weight: 750;
  cursor: pointer;
}
.lesson-mode-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.lesson-mode-switch label:has(input:checked) {
  background: #fff;
  color: var(--violet);
  box-shadow: 0 3px 12px rgba(40, 28, 90, 0.1);
}
.recurrence-settings {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.recurrence-settings[hidden] {
  display: none;
}
.recurrence-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr;
  gap: 18px;
}
.recurrence-grid fieldset,
.recurrence-grid > label {
  min-width: 0;
}
.recurrence-grid > label {
  display: grid;
  align-content: start;
  gap: 7px;
  font-size: 13px;
  font-weight: 650;
}
.recurrence-grid select,
.end-mode input[type="number"],
.end-mode input[type="date"] {
  width: 100%;
  border: 1px solid #dfe1eb;
  border-radius: 10px;
  padding: 11px;
  background: #fff;
}
.weekday-picker {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px;
}
.weekday-picker label {
  cursor: pointer;
}
.weekday-picker input {
  position: absolute;
  opacity: 0;
}
.weekday-picker span {
  display: grid;
  place-items: center;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  font-weight: 800;
}
.weekday-picker input:checked + span {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
}
.end-mode {
  display: grid;
  gap: 10px;
}
.end-mode label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 650;
}
.end-mode input[type="radio"] {
  width: auto;
}
.end-mode input[type="number"],
.end-mode input[type="date"] {
  width: auto;
  min-width: 100px;
}
.lesson-date-preview {
  margin-top: 18px;
  padding: 18px;
  border-radius: 16px;
  background: #f8f7ff;
  border: 1px solid #e8e2ff;
}
.lesson-date-preview > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.lesson-date-preview span {
  color: var(--violet);
  font-weight: 800;
}
.lesson-date-preview ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 24px;
  margin: 14px 0 0;
  padding-left: 24px;
}
.lesson-date-preview li {
  color: var(--muted);
  font-size: 13px;
}
.lesson-date-preview p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}
@media (max-width: 820px) {
  .recurrence-grid {
    grid-template-columns: 1fr;
  }
  .lesson-date-preview ol {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 520px) {
  .weekday-picker {
    grid-template-columns: repeat(4, 1fr);
  }
  .lesson-date-preview ol {
    grid-template-columns: 1fr;
  }
  .lesson-mode-switch {
    display: flex;
  }
  .lesson-mode-switch label {
    flex: 1;
    text-align: center;
    padding-inline: 10px;
  }
}
.calendar-lesson {
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}
.calendar-lesson:hover,
.calendar-lesson:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(73, 49, 170, 0.14);
  outline: 2px solid rgba(109, 74, 255, 0.22);
  outline-offset: 1px;
}
.calendar .slot {
  min-height: 54px;
  padding: 4px;
}
.calendar .time-cell {
  padding: 8px 10px;
}
.calendar .calendar-lesson {
  padding: 6px 8px;
  line-height: 1.15;
}
.schedule-navigator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}
.schedule-calendar-picker {
  position: relative;
  min-width: 270px;
}
.schedule-calendar-picker > button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
}
.schedule-calendar-picker .ui-icon {
  width: 22px;
  height: 22px;
  color: var(--violet);
}
.schedule-calendar-picker button > span {
  display: grid;
  gap: 1px;
}
.schedule-calendar-picker small {
  font-size: 11px;
  color: var(--muted);
}
.schedule-calendar-picker strong {
  font-size: 14px;
}
.schedule-calendar-picker button > b {
  margin-left: auto;
  padding: 7px 9px;
  background: var(--violet-soft);
  border-radius: 9px;
  color: var(--violet);
  font-size: 11px;
  white-space: nowrap;
}
.schedule-calendar-picker > button:hover {
  border-color: #cfc5ff;
}
.schedule-calendar-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  right: 14px;
  bottom: 3px;
  opacity: 0;
  pointer-events: none;
}
.schedule-week-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.schedule-week-actions > span {
  min-width: 155px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}
.schedule-nav-arrow,
.schedule-today {
  display: grid;
  place-items: center;
  height: 40px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  font-weight: 750;
}
.schedule-nav-arrow {
  width: 40px;
  font-size: 20px;
}
.schedule-today {
  padding: 0 14px;
  font-size: 13px;
}
.schedule-nav-arrow:hover,
.schedule-today:hover {
  border-color: #cfc5ff;
  color: var(--violet);
}
.schedule-day-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(104px, 1fr));
  gap: 9px;
  margin-bottom: 14px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-width: thin;
}
.schedule-day {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 8px;
  min-width: 104px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.schedule-day > span {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}
.schedule-day > strong {
  grid-row: 1/3;
  grid-column: 2;
  font-size: 23px;
}
.schedule-day > small {
  font-size: 11px;
  color: var(--muted);
}
.schedule-day > i {
  grid-column: 1/-1;
  height: 5px;
  margin-top: 7px;
  background: #eceaf5;
  border-radius: 99px;
  overflow: hidden;
}
.schedule-day > i b {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #8b6cff, var(--violet));
  border-radius: inherit;
}
.schedule-day > em {
  grid-column: 1/-1;
  font-style: normal;
  text-align: right;
  color: var(--muted);
  font-size: 10px;
}
.schedule-day:hover {
  border-color: #d5ccff;
}
.schedule-day.active {
  border-color: var(--violet);
  background: linear-gradient(145deg, #fff, #f4f0ff);
  box-shadow: 0 7px 22px rgba(83, 58, 178, 0.12);
}
.schedule-day.active > span,
.schedule-day.today > span {
  color: var(--violet);
}
@media (max-width: 760px) {
  .schedule-navigator {
    align-items: stretch;
    flex-direction: column;
  }
  .schedule-calendar-picker {
    width: 100%;
  }
  .schedule-week-actions {
    justify-content: space-between;
  }
  .schedule-week-actions > span {
    min-width: 0;
  }
  .schedule-today {
    display: none;
  }
  .schedule-day-strip {
    grid-template-columns: repeat(7, 92px);
  }
  .schedule-day {
    min-width: 92px;
    padding: 10px;
  }
  .schedule-day > strong {
    font-size: 20px;
  }
}
.schedule-teacher-filter {
  display: grid;
  gap: 5px;
  margin-right: auto;
  min-width: 230px;
}
.schedule-teacher-filter span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
}
.schedule-teacher-filter select {
  height: 42px;
  padding: 0 36px 0 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-weight: 700;
  color: var(--ink);
}
.teacher-workload {
  margin: 0 0 14px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.teacher-workload-head > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
.teacher-workload-head span {
  color: var(--muted);
  font-size: 12px;
}
.teacher-workload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 13px;
}
.teacher-workload-grid > a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px 12px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.teacher-workload-grid > a:hover {
  border-color: #d3c9ff;
}
.teacher-workload-grid a > div {
  display: grid;
}
.teacher-workload-grid span {
  font-size: 11px;
  color: var(--muted);
}
.teacher-workload-grid i {
  grid-column: 1;
  height: 6px;
  align-self: center;
  background: #eceaf5;
  border-radius: 99px;
  overflow: hidden;
}
.teacher-workload-grid i b {
  display: block;
  height: 100%;
  background: var(--violet);
  border-radius: inherit;
}
.teacher-workload-grid em {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
}
.schedule-calendar-dialog {
  width: min(390px, calc(100% - 28px));
  border: 0;
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 30px 90px rgba(17, 19, 38, 0.3);
}
.schedule-calendar-dialog::backdrop {
  background: rgba(17, 19, 38, 0.48);
  backdrop-filter: blur(3px);
}
.schedule-calendar-head {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 8px;
}
.schedule-calendar-head strong {
  text-align: center;
  text-transform: capitalize;
  font-size: 18px;
}
.schedule-calendar-head button {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 18px;
}
.schedule-calendar-weekdays,
.schedule-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}
.schedule-calendar-weekdays {
  margin: 17px 0 7px;
}
.schedule-calendar-weekdays span {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.schedule-calendar-grid button {
  aspect-ratio: 1;
  border: 0;
  border-radius: 11px;
  background: transparent;
  cursor: pointer;
  color: var(--ink);
  font-weight: 650;
}
.schedule-calendar-grid button:hover {
  background: var(--violet-soft);
  color: var(--violet);
}
.schedule-calendar-grid button.outside {
  color: #b9bcc8;
}
.schedule-calendar-grid button.today {
  box-shadow: inset 0 0 0 1px #cfc5ff;
  color: var(--violet);
}
.schedule-calendar-grid button.selected {
  background: var(--violet);
  color: #fff;
  box-shadow: 0 6px 15px rgba(109, 74, 255, 0.28);
}
.schedule-calendar-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}
.schedule-calendar-footer button {
  border: 0;
  background: transparent;
  color: var(--violet);
  font-weight: 750;
  cursor: pointer;
  padding: 8px;
}
.schedule-calendar-picker {
  min-width: 205px;
}
.schedule-calendar-picker > button {
  min-height: 54px;
}
.schedule-calendar-picker button > span {
  flex: 1;
}
.schedule-calendar-picker input {
  display: none;
}
@media (max-width: 900px) {
  .schedule-navigator {
    flex-wrap: wrap;
  }
  .schedule-teacher-filter {
    order: 3;
    width: 100%;
  }
  .teacher-workload-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 620px) {
  .teacher-workload-grid {
    grid-template-columns: 1fr;
  }
  .teacher-workload-head > div {
    display: grid;
  }
  .schedule-calendar-dialog {
    padding: 14px;
  }
}
.custom-date-field {
  position: relative;
  width: 100%;
  min-width: 0;
}
.custom-date-native {
  position: absolute !important;
  left: 8px !important;
  bottom: 2px !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0;
  pointer-events: none;
}
.custom-date-trigger {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #dfe1eb;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-weight: 650;
}
.custom-date-trigger:hover,
.custom-date-trigger:focus-visible {
  border-color: #cfc5ff;
  box-shadow: 0 0 0 3px rgba(109, 74, 255, 0.08);
  outline: 0;
}
.custom-date-trigger.empty span {
  color: #9296a8;
  font-weight: 500;
}
.custom-date-trigger svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--violet);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}
.custom-date-trigger span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.custom-date-trigger b {
  margin-left: auto;
  padding: 6px 9px;
  border-radius: 8px;
  background: var(--violet-soft);
  color: var(--violet);
  font-size: 11px;
  white-space: nowrap;
}
.custom-date-dialog {
  width: min(410px, calc(100% - 28px));
  border: 0;
  border-radius: 22px;
  padding: 19px;
  box-shadow: 0 30px 90px rgba(17, 19, 38, 0.3);
}
.custom-date-dialog::backdrop {
  background: rgba(17, 19, 38, 0.48);
  backdrop-filter: blur(3px);
}
.custom-date-head {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 8px;
}
.custom-date-head strong {
  text-align: center;
  text-transform: capitalize;
  font-size: 18px;
}
.custom-date-head button {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 18px;
}
.custom-date-weekdays,
.custom-date-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}
.custom-date-weekdays {
  margin: 17px 0 7px;
}
.custom-date-weekdays span {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.custom-date-grid button {
  aspect-ratio: 1;
  border: 0;
  border-radius: 11px;
  background: transparent;
  cursor: pointer;
  color: var(--ink);
  font-weight: 650;
}
.custom-date-grid button:hover:not(:disabled) {
  background: var(--violet-soft);
  color: var(--violet);
}
.custom-date-grid button.outside {
  color: #b9bcc8;
}
.custom-date-grid button.today {
  box-shadow: inset 0 0 0 1px #cfc5ff;
  color: var(--violet);
}
.custom-date-grid button.selected {
  background: var(--violet);
  color: #fff;
  box-shadow: 0 6px 15px rgba(109, 74, 255, 0.28);
}
.custom-date-grid button:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}
.custom-date-time {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 12px 2px 2px;
  font-size: 13px;
  font-weight: 750;
}
.custom-date-time[hidden] {
  display: none !important;
}
.custom-date-time input {
  width: 145px !important;
  padding: 9px 11px !important;
  border: 1px solid var(--line) !important;
  border-radius: 10px !important;
}
.custom-date-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}
.custom-date-footer > div {
  display: flex;
  gap: 7px;
}
.custom-date-footer button {
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--violet);
  font-weight: 750;
  cursor: pointer;
  padding: 9px 11px;
}
.custom-date-footer button.primary {
  background: var(--ink);
  color: #fff;
}
.custom-date-footer button:hover {
  background: var(--violet-soft);
}
.custom-date-footer button.primary:hover {
  background: #20243d;
}
.end-mode .custom-date-field {
  display: inline-block;
  width: auto;
  min-width: 170px;
}
.end-mode .custom-date-trigger {
  min-height: 40px;
  padding: 7px 9px;
}
.end-mode .custom-date-trigger b {
  display: none;
}
@media (max-width: 520px) {
  .custom-date-dialog {
    padding: 14px;
  }
  .custom-date-trigger b {
    display: none;
  }
}
.material-breadcrumbs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
}
.material-folders,
.material-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.material-folder {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.material-folder > span {
  font-size: 30px;
}
.material-folder div,
.material-card-body {
  display: grid;
  min-width: 0;
}
.material-folder small,
.material-card-body span,
.material-card-body small {
  color: var(--muted);
  font-size: 11px;
}
.material-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.material-preview {
  display: grid;
  place-items: center;
  min-height: 150px;
  background: #f6f4ff;
  border-radius: 18px 18px 0 0;
}
.material-preview span {
  font-size: 44px;
}
.material-preview b {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 7px;
  background: #fff;
  border-radius: 7px;
  font-size: 10px;
}
.material-card-body {
  gap: 3px;
  padding: 14px 48px 16px 15px;
}
.material-card-body strong,
.material-card-body span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.material-actions {
  position: absolute;
  right: 10px;
  bottom: 12px;
}
.material-actions summary {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  list-style: none;
}
.material-actions > div {
  position: absolute;
  right: 0;
  bottom: 40px;
  z-index: 5;
  display: grid;
  min-width: 180px;
  padding: 7px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 16px 40px #1113262e;
}
.material-actions a,
.material-actions button {
  width: 100%;
  padding: 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.danger-text {
  color: #d33b47;
}
.material-empty {
  text-align: center;
  padding: 55px;
}
.folder-dialog {
  width: min(480px, calc(100% - 28px));
  border: 0;
  border-radius: 20px;
  padding: 25px;
}
.folder-dialog::backdrop {
  background: #11132677;
}
.folder-dialog form {
  display: grid;
  gap: 14px;
}
.folder-dialog label {
  display: grid;
  gap: 7px;
}
.folder-dialog input {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.folder-dialog form > div {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}
.material-upload-form {
  max-width: 980px;
  margin: auto;
}
.material-kind-switch {
  display: inline-flex;
  padding: 5px;
  background: #f2f0fb;
  border-radius: 13px;
}
.material-kind-switch label {
  position: relative;
}
.material-kind-switch input {
  position: absolute;
  opacity: 0;
}
.material-kind-switch span {
  display: block;
  padding: 10px 17px;
  border-radius: 10px;
}
.material-kind-switch input:checked + span {
  background: #fff;
  color: var(--violet);
}
.material-dropzone {
  display: grid !important;
  place-items: center;
  gap: 7px;
  min-height: 230px;
  margin: 18px 0;
  padding: 30px;
  border: 2px dashed #d7d1ee !important;
  border-radius: 18px;
  background: #faf9ff;
  text-align: center;
  cursor: pointer;
}
.material-dropzone.dragging {
  border-color: var(--violet) !important;
}
.material-dropzone input {
  position: absolute;
  width: 1px !important;
  height: 1px !important;
  opacity: 0;
}
.material-dropzone small,
.material-dropzone em {
  color: var(--muted);
  font-style: normal;
}
.material-link-field {
  display: grid;
  gap: 7px;
  margin: 18px 0;
}
.material-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
}
.material-viewer {
  display: grid;
  place-items: center;
  min-height: 620px;
  overflow: hidden;
}
.material-viewer img,
.material-viewer video {
  max-width: 100%;
  max-height: 70vh;
}
.material-viewer iframe {
  width: 100%;
  height: 70vh;
  border: 0;
}
.material-inspector {
  align-self: start;
}
.material-inspector dl div {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.material-inspector dd {
  margin: 0;
}
.material-edit-form,
.material-edit-form label {
  display: grid;
  gap: 9px;
}
.material-edit-form {
  margin: 18px 0;
}
.material-edit-form input,
.material-edit-form select {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.material-back {
  color: var(--violet);
}
@media (max-width: 850px) {
  .material-detail-layout {
    grid-template-columns: 1fr;
  }
  .material-viewer {
    min-height: 400px;
  }
}
@media (max-width: 560px) {
  .material-grid,
  .material-folders {
    grid-template-columns: 1fr;
  }
}

.material-preview {
  height: 180px;
  overflow: hidden;
}

.material-preview > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.material-card:hover .material-preview > img {
  transform: scale(1.025);
}

.material-card-body {
  min-height: 50px;
  padding: 14px 50px 14px 15px;
}

.material-card-body > span,
.material-card-body > small,
.material-preview > b {
  display: none;
}

.material-card-body strong {
  display: block;
  line-height: 22px;
}

.material-actions {
  bottom: 8px;
}

.material-preview {
  position: relative;
  background: #f8f8fc;
}

.material-card:has(.material-preview.has-thumbnail) .material-card-body {
  border-top: 1px solid var(--line);
}

.material-folder-card .folder-actions {
  top: auto;
  right: 10px;
  bottom: 10px;
}

.material-folder-card .folder-actions > div {
  top: auto;
  right: -10px;
  bottom: 42px;
}

.student-material-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.student-material-actions a {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--violet);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

.student-material-actions a:hover {
  color: #4f32d9;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 620px) {
  .student-material-actions {
    width: 100%;
  }

  .student-material-actions a {
    white-space: normal;
  }
}

[data-material-file-zone][hidden],
[data-material-link-zone][hidden] {
  display: none !important;
}

.material-dropzone.upload-zone {
  display: flex !important;
  min-height: 160px;
  margin: 20px 0 18px;
  padding: 24px;
  border: 1.5px dashed #cbc8dd !important;
  border-radius: 18px;
  background: linear-gradient(145deg, #faf9ff, #f5f3ff);
  transition: 0.18s;
}

.material-dropzone.upload-zone:hover,
.material-dropzone.upload-zone.dragging {
  border-color: var(--violet) !important;
  background: #f2eeff;
  transform: translateY(-1px);
}

.material-dropzone.upload-zone .upload-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 14px;
  background: #fff;
  color: var(--violet);
  box-shadow: 0 8px 22px rgba(109, 74, 255, 0.13);
  font-size: 22px;
}

.material-dropzone.upload-zone strong {
  font-size: 15px;
}

.material-dropzone.upload-zone em {
  min-height: 18px;
  margin: 3px 0 0;
  color: var(--green);
  font-size: 12px;
}

.material-link-field {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fafaff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
}

.material-link-field input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #dfe1eb;
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  outline: 0;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.material-link-field input::placeholder {
  color: #999daf;
}

.material-link-field input:hover {
  border-color: #cbc5df;
}

.material-link-field input:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(109, 74, 255, 0.1);
}

label.material-dropzone.upload-zone[hidden],
label.material-link-field[hidden] {
  display: none !important;
}

.material-inspector > form:last-child,
.material-inspector > form:last-child .btn {
  width: 100%;
}

.material-no-preview a {
  overflow-wrap: anywhere;
}

.lesson-completion-form {
  width: 100%;
  max-width: none;
  padding: 0;
  overflow: hidden;
}

.payment-warning {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #f0c36a;
  border-radius: 14px;
  background: #fff9e9;
  color: #6d4a00;
}

.payment-warning input {
  margin-top: 3px;
}
.payment-warning span {
  display: grid;
  gap: 3px;
}
.payment-warning small {
  color: #846b35;
}

.lesson-completion-form > .form-head {
  padding: 26px 28px 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(145deg, #fff, #faf9ff);
}

.lesson-completion-form > .form-head h1 {
  margin-bottom: 5px;
}

.lesson-student-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.lesson-student-heading > div {
  min-width: 0;
}

.lesson-student-avatar {
  width: 54px;
  height: 72px;
  flex: 0 0 54px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(145deg, #ded5ff, #f2efff);
  color: var(--violet);
  font-size: 20px;
  font-weight: 850;
}

.lesson-student-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lesson-student-avatar:hover {
  box-shadow: 0 0 0 3px rgba(111, 71, 255, 0.12);
}

.lesson-form-section {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 28px;
  padding: 26px 28px;
  border-bottom: 1px solid var(--line);
}

.lesson-form-section h2,
.lesson-form-section p {
  margin: 0;
}

.lesson-form-section h2 {
  font-size: 17px;
}

.lesson-form-section p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.lesson-section-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.lesson-learning-section .lesson-section-fields {
  grid-template-columns: 1fr 1fr;
}

.lesson-learning-section .lesson-section-fields > .wide {
  grid-column: auto;
}

.lesson-section-fields > label {
  min-width: 0;
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
}

.lesson-section-fields > label[hidden] {
  display: none;
}

.lesson-section-fields select,
.lesson-section-fields textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  outline: none;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.lesson-section-fields select {
  height: 48px;
  padding: 0 42px 0 14px;
}

.lesson-section-fields textarea {
  padding: 13px 14px;
  line-height: 1.5;
}

.lesson-section-fields select:focus,
.lesson-section-fields textarea:focus {
  border-color: #8a72ff;
  box-shadow: 0 0 0 3px rgba(111, 71, 255, 0.12);
}

.lesson-completion-form textarea {
  min-height: 150px;
  resize: vertical;
}

.lesson-attendance-section textarea {
  min-height: 92px;
}

.lesson-attendance-control select[hidden] {
  display: none;
}

.lesson-attendance-control {
  grid-column: 1 / -1;
}

.lesson-section-fields.reason-visible .lesson-attendance-control {
  grid-column: auto;
}

.attendance-switch {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  width: 100%;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #f5f3fc;
}

.attendance-switch button {
  min-height: 42px;
  padding: 8px 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.attendance-switch button:hover {
  color: var(--violet);
  background: rgba(255, 255, 255, 0.65);
}

.attendance-switch button.active {
  color: var(--violet);
  background: #fff;
  box-shadow:
    0 5px 16px rgba(43, 32, 91, 0.1),
    inset 0 0 0 1px #ddd5ff;
  transform: translateY(-1px);
}

.lesson-head-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
}

.lesson-head-actions .primary {
  min-width: 160px;
}

.lesson-material-content {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.lesson-material-content > .btn {
  justify-self: end;
  margin-bottom: 2px;
}

.lesson-material-content .empty {
  min-height: 94px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: #fafaff;
}

.lesson-action-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 0;
  padding: 18px 28px;
  background: #fafaff;
}

.lesson-action-bar .danger-outline {
  color: var(--red);
  border-color: #ffd0d4;
  background: #fff;
}

@media (max-width: 800px) {
  .lesson-form-section {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .lesson-section-fields,
  .lesson-learning-section .lesson-section-fields {
    grid-template-columns: 1fr;
  }

  .lesson-learning-section .lesson-section-fields > .wide {
    grid-column: 1;
  }

  .attendance-switch {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 801px) {
  .lesson-attendance-section .lesson-section-fields > label:only-child {
    grid-column: 1 / -1;
    max-width: 520px;
  }
}

@media (max-width: 560px) {
  .lesson-completion-form > .form-head,
  .lesson-form-section,
  .lesson-action-bar {
    padding-inline: 18px;
  }

  .lesson-action-bar {
    display: flex;
  }

  .lesson-action-bar .danger-outline {
    width: 100%;
  }

  .lesson-completion-form > .form-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .lesson-student-heading {
    order: 1;
    width: 100%;
  }

  .lesson-student-avatar {
    width: 48px;
    height: 64px;
    flex-basis: 48px;
    border-radius: 13px;
  }

  .lesson-head-actions {
    order: 2;
    width: 100%;
  }

  .lesson-head-actions .btn {
    flex: 1;
    min-width: 0;
  }
}

.student-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}
.student-overview-side {
  display: grid;
  gap: 16px;
}
.homework-history-panel {
  min-width: 0;
}
.homework-history-item {
  border-top: 1px solid var(--line);
}
.homework-history-item summary {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr) 24px;
  gap: 14px;
  align-items: center;
  padding: 16px 0;
  cursor: pointer;
  list-style: none;
}
.homework-history-item summary::-webkit-details-marker {
  display: none;
}
.homework-history-item summary > span:first-child {
  display: grid;
  gap: 4px;
}
.homework-history-item summary small {
  color: var(--muted);
}
.homework-preview {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #4f556a;
}
.homework-chevron {
  font-size: 21px;
  color: var(--violet);
  text-align: center;
  transition: transform 0.2s;
}
.homework-history-item[open] .homework-chevron {
  transform: rotate(180deg);
}
.homework-history-body {
  padding: 0 38px 18px 159px;
}
.homework-history-body p {
  margin: 0 0 12px;
  line-height: 1.55;
  white-space: normal;
}
.homework-history-body a {
  color: var(--violet);
  font-weight: 700;
  font-size: 13px;
}
.homework-more {
  display: block;
  margin: 18px auto 0;
}
.student-overview-side .piece {
  grid-template-columns: minmax(0, 1fr) 70px 38px;
}
.student-overview-side .empty {
  padding: 24px 8px;
}
@media (max-width: 900px) {
  .student-overview-grid {
    grid-template-columns: 1fr;
  }
  .student-overview-side {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 620px) {
  .student-overview-side {
    grid-template-columns: 1fr;
  }
  .homework-history-item summary {
    grid-template-columns: 100px minmax(0, 1fr) 20px;
    gap: 8px;
  }
  .homework-history-body {
    padding: 0 28px 16px 108px;
  }
  .homework-preview {
    font-size: 13px;
  }
}

.mini-grid .metric-label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mini-grid .metric-label .ui-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: #747a90;
}
.birthday-row .ui-icon {
  width: 20px;
  height: 20px;
  color: var(--violet);
}

.student-finance {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.85fr);
  gap: 18px;
}

.action-dialog .form-grid {
  align-items: start;
}

.action-dialog .form-grid > label {
  align-self: start;
  align-content: start;
}

.action-dialog .form-grid > label > input:not([type="hidden"]),
.action-dialog .form-grid > label > select {
  min-height: 46px;
  height: 46px;
}

.action-dialog .form-grid > label > small {
  min-height: 32px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.35;
}

.student-finance .panel-head > div p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.subscription-card {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.subscription-card:first-of-type {
  border-top: 0;
}

.subscription-card-head,
.subscription-card-head > div,
.subscription-lesson-progress,
.subscription-money,
.payment-row {
  display: flex;
  align-items: center;
}

.subscription-card-head {
  justify-content: space-between;
  gap: 18px;
}

.subscription-card-head > div {
  min-width: 0;
  gap: 10px;
}

.subscription-card-head > div > strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subscription-card-head > b {
  flex: none;
  white-space: nowrap;
  font-size: 18px;
}

.subscription-lesson-progress {
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.finance-comment {
  margin: 11px 0 0;
  padding: 10px 12px;
  border-left: 3px solid #d8cffd;
  border-radius: 0 9px 9px 0;
  background: #faf9ff;
  color: #555b70;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.payment-row .finance-comment {
  margin-top: 6px;
  padding: 0 0 0 9px;
  background: transparent;
  font-size: 12px;
}

.subscription-money {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.subscription-money > span {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border-radius: 12px;
  background: #f7f7fb;
  color: var(--muted);
  font-size: 12px;
}

.subscription-money > span:first-child {
  display: none;
}

.subscription-money strong {
  color: var(--ink);
  font-size: 14px;
  white-space: nowrap;
}

.subscription-money .has-debt {
  background: #fff1f1;
}

.subscription-money .is-paid {
  background: #effaf4;
}

.payment-row {
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.payment-row:first-of-type {
  border-top: 0;
}

.payment-row > div {
  display: grid;
  gap: 3px;
}

.payment-row span,
.payment-row time {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 900px) {
  .student-finance {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .subscription-card-head {
    align-items: flex-start;
  }

  .subscription-card-head > div {
    display: grid;
  }

  .subscription-money {
    grid-template-columns: 1fr;
  }
}

.custom-date-period {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 7px;
  min-width: 0;
}

.custom-date-period select {
  width: 100%;
  height: 40px;
  padding: 0 30px 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background-color: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  text-transform: capitalize;
  cursor: pointer;
}

.custom-date-period select:hover,
.custom-date-period select:focus {
  border-color: #cfc5ff;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(109, 74, 255, 0.08);
}

.schedule-date-period {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px;
  gap: 7px;
  min-width: 0;
}

.schedule-date-period select {
  width: 100%;
  height: 38px;
  padding: 0 28px 0 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background-color: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  text-transform: capitalize;
  cursor: pointer;
}

.custom-date-time {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
}

.custom-date-time[hidden] {
  display: none !important;
}

.custom-time-selects {
  display: flex;
  align-items: end;
  gap: 7px;
}

.custom-time-selects label {
  display: grid;
  gap: 5px;
}

.custom-time-selects small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-align: center;
}

.custom-time-selects select {
  width: 92px;
  height: 44px;
  padding: 0 30px 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background-color: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.custom-time-selects b {
  padding-bottom: 10px;
  font-size: 20px;
}

@media (max-width: 420px) {
  .custom-date-period {
    grid-template-columns: minmax(0, 1fr) 92px;
  }

  .custom-date-head {
    grid-template-columns: 36px minmax(0, 1fr) 36px;
  }
}

.custom-date-field {
  position: relative;
  width: 100%;
  min-width: 0;
}
.custom-date-native {
  position: absolute !important;
  left: 8px !important;
  bottom: 2px !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0;
  pointer-events: none;
}
.custom-date-trigger {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #dfe1eb;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-weight: 650;
}
.custom-date-trigger:hover,
.custom-date-trigger:focus-visible {
  border-color: #cfc5ff;
  box-shadow: 0 0 0 3px rgba(109, 74, 255, 0.08);
  outline: 0;
}
.custom-date-trigger.empty span {
  color: #9296a8;
  font-weight: 500;
}
.custom-date-trigger svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--violet);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}
.custom-date-trigger span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.custom-date-trigger b {
  margin-left: auto;
  padding: 6px 9px;
  border-radius: 8px;
  background: var(--violet-soft);
  color: var(--violet);
  font-size: 11px;
  white-space: nowrap;
}
.custom-date-dialog {
  width: min(410px, calc(100% - 28px));
  border: 0;
  border-radius: 22px;
  padding: 19px;
  box-shadow: 0 30px 90px rgba(17, 19, 38, 0.3);
}
.custom-date-dialog::backdrop {
  background: rgba(17, 19, 38, 0.48);
  backdrop-filter: blur(3px);
}
.custom-date-head {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 8px;
}
.custom-date-head strong {
  text-align: center;
  text-transform: capitalize;
  font-size: 18px;
}
.custom-date-head button {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 18px;
}
.custom-date-weekdays,
.custom-date-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}
.custom-date-weekdays {
  margin: 17px 0 7px;
}
.custom-date-weekdays span {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.custom-date-grid button {
  aspect-ratio: 1;
  border: 0;
  border-radius: 11px;
  background: transparent;
  cursor: pointer;
  color: var(--ink);
  font-weight: 650;
}
.custom-date-grid button:hover:not(:disabled) {
  background: var(--violet-soft);
  color: var(--violet);
}
.custom-date-grid button.outside {
  color: #b9bcc8;
}
.custom-date-grid button.today {
  box-shadow: inset 0 0 0 1px #cfc5ff;
  color: var(--violet);
}
.custom-date-grid button.selected {
  background: var(--violet);
  color: #fff;
  box-shadow: 0 6px 15px rgba(109, 74, 255, 0.28);
}
.custom-date-grid button:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}
.custom-date-time {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 12px 2px 2px;
  font-size: 13px;
  font-weight: 750;
}
.custom-date-time[hidden] {
  display: none !important;
}
.custom-date-time input {
  width: 145px !important;
  padding: 9px 11px !important;
  border: 1px solid var(--line) !important;
  border-radius: 10px !important;
}
.custom-date-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}
.custom-date-footer > div {
  display: flex;
  gap: 7px;
}
.custom-date-footer button {
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--violet);
  font-weight: 750;
  cursor: pointer;
  padding: 9px 11px;
}
.custom-date-footer button.primary {
  background: var(--ink);
  color: #fff;
}
.custom-date-footer button:hover {
  background: var(--violet-soft);
}
.custom-date-footer button.primary:hover {
  background: #20243d;
}
.end-mode .custom-date-field {
  display: inline-block;
  width: auto;
  min-width: 170px;
}
.end-mode .custom-date-trigger {
  min-height: 40px;
  padding: 7px 9px;
}
.end-mode .custom-date-trigger b {
  display: none;
}
@media (max-width: 520px) {
  .custom-date-dialog {
    padding: 14px;
  }
  .custom-date-trigger b {
    display: none;
  }
}

.portal-grid {
  display: grid;
  gap: 18px;
}

.portal-card {
  padding: 22px;
}

.portal-student-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.portal-student-head small,
.portal-summary span,
.portal-summary small,
.portal-homework time {
  color: var(--muted);
  font-size: 12px;
}

.portal-student-head h2 {
  margin: 3px 0 0;
}

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

.portal-summary article {
  display: grid;
  gap: 6px;
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fafafe;
}

.portal-summary strong {
  font-size: 18px;
}

.portal-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.75fr);
  gap: 14px;
}

.portal-content .panel {
  margin: 0;
  box-shadow: none;
}

.portal-homework p {
  margin-bottom: 0;
  line-height: 1.6;
}

.portal-material-list {
  display: grid;
}

.portal-material-list > a {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.portal-material-list > a:first-child {
  border-top: 0;
}

.portal-material-list .ui-icon {
  width: 20px;
  height: 20px;
  color: var(--muted);
}

.portal-material-list span {
  display: grid;
  min-width: 0;
}

.portal-material-list strong,
.portal-material-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-material-list small {
  color: var(--muted);
  font-size: 11px;
}

.portal-material-list b {
  color: var(--violet);
}

@media (max-width: 760px) {
  .portal-card {
    padding: 16px;
  }

  .portal-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .portal-page-head p {
    max-width: 30ch;
  }

  .portal-summary {
    grid-template-columns: 1fr;
  }

  .portal-summary article {
    min-height: 92px;
  }
}

.action-dialog input[type="date"],
.action-dialog input[type="datetime-local"],
.action-dialog input[type="time"] {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.action-dialog .form-grid > label,
.action-dialog .form-grid > fieldset {
  min-width: 0;
}

@media (max-width: 620px) {
  .action-dialog {
    width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 18px;
  }

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

  .action-dialog .form-grid > .wide {
    grid-column: 1;
  }

  .action-dialog .action-modal-footer {
    bottom: -16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .action-dialog .action-modal-footer .btn {
    width: 100%;
  }
}

.login-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-title-row .login-logo {
  flex: 0 0 34px;
}

.login-card .login-title-row h1 {
  min-width: 0;
  margin: 0;
}

@media (max-width: 420px) {
  .login-card .login-title-row h1 {
    font-size: 25px;
  }
}

.app-error-page {
  width: min(620px, 100%);
  margin: 8vh auto;
  text-align: center;
  padding: 48px 28px;
}
.app-error-code {
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.14em;
  color: var(--violet);
  text-transform: uppercase;
}
.app-error-page h1 {
  margin: 10px 0 8px;
  font-size: 28px;
}
.app-error-page p {
  margin: 0 auto 24px;
  max-width: 460px;
  color: var(--muted);
  line-height: 1.55;
}
.sidebar a[href="/audit"] {
  display: none !important;
}

.guardian-access-list {
  display: grid;
  gap: 12px;
}
.guardian-access-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 0.8fr) minmax(
      260px,
      1fr
    );
  gap: 18px;
  align-items: center;
  padding: 16px;
}
.guardian-access-row .check {
  margin: 0;
}
.guardian-access-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}
.guardian-access-checks .check {
  font-size: 13px;
}
@media (max-width: 800px) {
  .guardian-access-row {
    grid-template-columns: 1fr;
  }
  .guardian-access-checks {
    display: grid;
  }
}

.action-dialog {
  overflow: hidden;
}
.action-dialog-body {
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #b7a7ef transparent;
}
.action-dialog-body::-webkit-scrollbar {
  width: 8px;
}
.action-dialog-body::-webkit-scrollbar-track {
  background: transparent;
  margin: 18px 0;
}
.action-dialog-body::-webkit-scrollbar-thumb {
  background: #b7a7ef;
  border: 2px solid #fff;
  border-radius: 999px;
}
.action-dialog-body::-webkit-scrollbar-thumb:hover {
  background: #8064e8;
}

/* Keep the native scrollbar inside every rounded modal shell. */
.action-dialog {
  overflow: hidden !important;
  box-sizing: border-box;
  padding: 6px !important;
  background: #fff;
}

.action-dialog-body {
  box-sizing: border-box;
  max-height: calc(100dvh - 52px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border-radius: 16px;
}

.platform-access-dialog,
.folder-dialog,
.avatar-dialog {
  overflow: hidden !important;
  box-sizing: border-box;
  padding: 6px !important;
  background: #fff;
}

.platform-access-dialog > form,
.folder-dialog > form,
.avatar-dialog > form,
.platform-access-dialog > .platform-link-dialog-content {
  box-sizing: border-box;
  max-height: calc(100dvh - 44px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border-radius: 16px;
}

.action-dialog-body,
.platform-access-dialog > form,
.folder-dialog > form,
.avatar-dialog > form,
.platform-access-dialog > .platform-link-dialog-content {
  scrollbar-width: thin;
  scrollbar-color: #c9c4d8 transparent;
}

.action-dialog-body::-webkit-scrollbar,
.platform-access-dialog > form::-webkit-scrollbar,
.folder-dialog > form::-webkit-scrollbar,
.avatar-dialog > form::-webkit-scrollbar,
.platform-access-dialog > .platform-link-dialog-content::-webkit-scrollbar {
  width: 10px;
}
.action-dialog-body::-webkit-scrollbar-track,
.platform-access-dialog > form::-webkit-scrollbar-track,
.folder-dialog > form::-webkit-scrollbar-track,
.avatar-dialog > form::-webkit-scrollbar-track,
.platform-access-dialog
  > .platform-link-dialog-content::-webkit-scrollbar-track {
  background: transparent;
  margin-block: 18px;
}
.action-dialog-body::-webkit-scrollbar-thumb,
.platform-access-dialog > form::-webkit-scrollbar-thumb,
.folder-dialog > form::-webkit-scrollbar-thumb,
.avatar-dialog > form::-webkit-scrollbar-thumb,
.platform-access-dialog
  > .platform-link-dialog-content::-webkit-scrollbar-thumb {
  background: #bbb4ce;
  background-clip: padding-box;
  border: 2px solid transparent;
  border-radius: 999px;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.field-label-row a {
  color: var(--violet);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}
.field-label-row a:hover {
  text-decoration: underline;
}
.instrument-manager {
  max-width: 760px;
}
.instrument-list {
  display: grid;
  gap: 10px;
  margin: 22px 0;
}
.instrument-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.instrument-row > label:first-child,
.instrument-new {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 750;
}
.instrument-row input[type="text"],
.instrument-row input:not([type]),
.instrument-new input {
  width: 100%;
}
.instrument-delete {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 6px;
  font-size: 12px;
  font-weight: 750;
  color: #c43343;
}
.instrument-delete.disabled {
  color: var(--muted);
}
.instrument-delete input {
  width: auto;
}
.instrument-new {
  margin-top: 4px;
}
@media (max-width: 620px) {
  .action-dialog {
    padding: 5px !important;
  }
  .action-dialog-body {
    max-height: calc(100dvh - 26px);
    border-radius: 14px;
  }
  .instrument-row {
    grid-template-columns: 1fr;
  }
  .instrument-delete {
    min-height: auto;
    padding: 2px 0 0;
  }
}
[data-guardian-child][hidden] {
  display: none !important;
}
[data-guardian-child] {
  padding: 12px 0;
  border-bottom: 1px solid #e7e8f2;
}
[data-guardian-child]:last-child {
  border-bottom: 0;
}

.platform-plan-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-bottom: 10px;
}
.platform-plan-heading .platform-plan-icon {
  margin-bottom: 0;
  flex-shrink: 0;
}
.plan-edit-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--violet);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.plan-edit-trigger:hover {
  background: var(--violet-soft);
}
.plan-edit-trigger:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}
.plan-edit-trigger .ui-icon {
  width: 16px;
  height: 16px;
}
.plan-edit-dialog {
  width: min(660px, calc(100% - 28px));
}
.plan-edit-dialog > form {
  padding: 24px;
}
.plan-edit-dialog .modal-head {
  margin-bottom: 18px;
}
.plan-edit-fields {
  display: grid;
  gap: 20px;
}
.plan-edit-fields label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}
.plan-edit-fields input {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--ink, #151528);
  font: inherit;
  height: 44px;
  min-height: 44px;
  box-sizing: border-box;
  margin: 0;
  width: 100%;
}
.plan-edit-fields input:focus {
  outline: 2px solid var(--violet);
  outline-offset: 1px;
}
.plan-edit-fields input[readonly] {
  background: #f7f6fc;
  color: var(--muted);
}
.plan-edit-fields fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.plan-edit-fields legend {
  padding: 0;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 700;
}
.plan-price-fields,
.plan-limit-fields {
  display: grid;
  gap: 16px;
  align-items: start;
}
.plan-price-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.plan-limit-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.plan-edit-dialog .plan-field-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin: 10px 0 0;
}
.plan-edit-dialog .plan-edit-notice {
  margin: 20px 0 16px;
  padding: 14px 16px;
  background: #f7f6fc;
  border-radius: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.plan-edit-dialog .check {
  font-size: 13px;
  gap: 9px;
}
.plan-edit-dialog .modal-actions {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
@media (max-width: 540px) {
  .plan-edit-dialog > form {
    padding: 18px;
  }
  .plan-limit-fields,
  .plan-price-fields {
    grid-template-columns: 1fr;
  }
}

.notification-menu {
  position: relative;
  flex-shrink: 0;
}
.notification-menu > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}
.notification-menu > summary::-webkit-details-marker {
  display: none;
}
.notification-menu > summary:hover,
.notification-menu[open] > summary {
  background: var(--violet-soft);
  color: var(--violet);
}
.notification-menu > summary:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}
.notification-menu .ui-icon {
  width: 23px;
  height: 23px;
}
.notification-count {
  position: absolute;
  top: 1px;
  right: 0;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  box-sizing: border-box;
  border-radius: 10px;
  background: var(--violet);
  color: white;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  line-height: 17px;
}
.notification-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 330px;
  box-sizing: border-box;
  padding: 18px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 16px 48px #24203f20;
  z-index: 100;
}
.notification-panel h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 14px;
  font-size: 15px;
}
.notification-panel h3 span {
  color: var(--muted);
  font-size: 12px;
}
.notification-item {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
  border: 0;
  border-radius: 11px;
  padding: 14px;
  text-align: left;
  font: inherit;
  background: #f8f7fd;
  cursor: pointer;
}
.notification-item:hover {
  background: var(--violet-soft);
}
.notification-item strong {
  font-size: 13px;
  color: #151528;
}
.notification-item span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.notification-item small {
  font-size: 12px;
  color: var(--violet);
}
@media (max-width: 620px) {
  .notification-panel {
    position: fixed;
    top: 70px;
    left: 12px;
    right: 12px;
    width: auto;
  }
}

.list-view-switch {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.list-view-switch[hidden] {
  display: none;
}
.list-view-switch button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 8px;
  padding: 8px 11px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.list-view-switch button[aria-pressed="true"] {
  background: var(--violet-soft);
  color: var(--violet);
}
.list-view-switch button:focus-visible {
  outline: 2px solid var(--violet);
}
.list-view-switch .ui-icon {
  width: 17px;
  height: 17px;
}
.people-list-head {
  display: none;
}
.people-list[data-list-view="table"] {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--ui-radius-card);
  background: white;
  overflow: hidden;
}
.people-list[data-list-view="table"] .people-list-head,
.people-list[data-list-view="table"] .student-card {
  display: grid;
  grid-template-columns: 48px minmax(150px, 1.2fr) minmax(160px, 1.4fr) minmax(
      120px,
      1fr
    );
  align-items: center;
  gap: 16px;
  padding: var(--ui-row-padding);
}
.people-list[data-list-view="table"] .people-list-head {
  background: #faf9fd;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.people-list[data-list-view="table"] .student-card {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  margin: 0;
}
.people-list[data-list-view="table"] .student-card:hover {
  background: #faf9ff;
  transform: none;
}
.people-list[data-list-view="table"] .student-card > div:not(.avatar) {
  display: contents;
}
.people-list[data-list-view="table"] h3,
.people-list[data-list-view="table"] p {
  margin: 0;
  font-size: 13px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.people-list[data-list-view="table"] .pill {
  justify-self: start;
  margin: 0;
}
.data-table[data-list-view="tiles"] {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  border: 0;
}
.data-table[data-list-view="tiles"] .tr.th {
  display: none;
}
.data-table[data-list-view="tiles"] .tr:not(.th) {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--ui-radius-card);
  padding: var(--ui-space-card);
  background: white;
  min-width: 0;
}
.data-table[data-list-view="tiles"] .tr > * {
  display: block !important;
  width: auto;
  overflow-wrap: anywhere;
}
.data-table[data-list-view="tiles"] [data-column-label]::before {
  content: attr(data-column-label);
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  margin-bottom: 4px;
}
.material-grid[data-list-view="table"],
.material-folders[data-list-view="table"] {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.material-folders[data-list-view="table"] .material-folder-card {
  width: 100%;
  border-radius: 0;
  box-shadow: none;
}
.material-folders[data-list-view="table"] .material-folder {
  min-height: 70px;
}
.material-grid[data-list-view="table"] .material-card {
  display: flex;
  align-items: center;
  min-height: 76px;
  border-radius: 0;
  overflow: visible;
  padding-right: 60px;
}
.material-grid[data-list-view="table"] .material-preview {
  width: 56px;
  height: 56px;
  min-height: 56px;
  flex-shrink: 0;
  margin: 10px;
  border-radius: 8px;
  overflow: hidden;
}
.material-grid[data-list-view="table"] .material-preview svg {
  width: 28px;
  height: 28px;
}
.material-grid[data-list-view="table"] .material-card-body {
  position: static;
  background: none;
  flex: 1;
  padding: 12px;
}
.material-grid[data-list-view="table"] .material-actions {
  bottom: 22px;
}
@media (max-width: 760px) {
  .list-view-switch {
    display: none;
  }
  .switchable-list.people-list {
    grid-template-columns: 1fr;
  }
  .data-table[data-list-view="tiles"] {
    grid-template-columns: 1fr;
  }
}

.platform-client-search {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
}
.platform-client-search label {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(480px, 100%);
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.platform-client-search label:focus-within {
  border-color: var(--violet);
}
.platform-client-search .ui-icon {
  width: 18px;
  height: 18px;
  color: var(--muted);
  flex-shrink: 0;
}
.platform-client-search input {
  min-width: 0;
  width: 100%;
  height: 44px;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 13px;
}
.platform-client-search > a {
  color: var(--violet);
  font-size: 13px;
}
.platform-client-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.platform-shell .platform-clients:not(.platform-trash-list) .tr {
  grid-template-columns:
    minmax(200px, 2fr) minmax(80px, 0.7fr) minmax(90px, 0.8fr)
    minmax(95px, 0.8fr) 235px;
}
@media (max-width: 1000px) {
  .platform-shell .platform-clients:not(.platform-trash-list) .tr {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .platform-shell
    .platform-clients:not(.platform-trash-list)
    .tr
    > :nth-child(2),
  .platform-shell
    .platform-clients:not(.platform-trash-list)
    .tr
    > :nth-child(3),
  .platform-shell
    .platform-clients:not(.platform-trash-list)
    .tr
    > :nth-child(4) {
    display: none;
  }
}
@media (max-width: 760px) {
  .platform-client-actions {
    flex-wrap: wrap;
  }
  .platform-client-actions .platform-open-cabinet span {
    display: inline;
  }
  .platform-client-search {
    flex-wrap: wrap;
  }
  .platform-client-search label {
    width: 100%;
    box-sizing: border-box;
  }
}

@media (max-width: 760px) {
  .app-shell .sidebar {
    width: min(380px, calc(100vw - 16px));
    box-sizing: border-box;
  }
  .mobile-sidebar-footer {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  }
  .mobile-sidebar-footer a,
  .mobile-sidebar-footer button {
    box-sizing: border-box;
    white-space: nowrap;
  }
  .mobile-sidebar-footer .ui-icon {
    flex-shrink: 0;
  }
  .app-shell .topbar:has(.top-actions) {
    display: flex;
    align-items: center;
    height: 64px;
    min-height: 64px;
    box-sizing: border-box;
    padding: 10px 14px;
  }
  .app-shell .topbar .breadcrumbs {
    display: none;
  }
  .app-shell .topbar .top-actions {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
    min-width: 0;
    margin: 0;
  }
  .app-shell .topbar .search {
    display: flex !important;
    position: static;
    transform: none;
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    height: 40px;
    box-sizing: border-box;
    margin: 0;
    padding: 8px 10px;
  }
  .app-shell .topbar .search input {
    width: 100%;
    min-width: 0;
    font-size: 13px;
  }
  .app-shell .topbar .search .ui-icon {
    flex-shrink: 0;
  }
  .app-shell .topbar .notification-menu {
    flex: 0 0 36px;
  }
  .app-shell .topbar .notification-menu > summary {
    width: 36px;
    height: 40px;
  }
  .app-shell .topbar .mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    margin: 0 0 0 auto;
    position: static;
    box-sizing: border-box;
  }
  .app-shell .topbar .mobile-menu-toggle span {
    position: static;
    display: block;
    flex: 0 0 2px;
    width: 18px;
    height: 2px;
    margin: 0;
  }
  .app-shell .topbar .user-menu {
    display: none;
  }
  .student-card > div:not(.avatar) {
    min-width: 0;
  }
  .student-card h3,
  .student-card p,
  .student-card .pill {
    overflow-wrap: anywhere;
  }
  .student-card .avatar {
    flex-shrink: 0;
  }
}
@media (max-width: 359px) {
  .mobile-sidebar-footer {
    grid-template-columns: 1fr;
  }
}

/* Use a geometric cross rather than the font-dependent multiplication glyph. */
button.modal-close,
button.action-close {
  display: inline-grid;
  place-items: center;
  position: relative;
  scrollbar-gutter: auto;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  flex-shrink: 0;
  box-sizing: border-box;
  padding: 0;
  font-size: 0;
  line-height: 0;
  text-indent: 0;
  color: #151528;
}
button.modal-close::after,
button.action-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: block;
  width: 18px;
  height: 18px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 6 12 12M18 6 6 18' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
}
button.modal-close > svg,
button.action-close > svg {
  display: none;
}
/* Anchor close controls to the popup surface, not the heading's flex row. */
.action-dialog-body,
.platform-access-dialog > form,
.platform-access-dialog > .platform-link-dialog-content,
.folder-dialog > form,
.avatar-dialog > form {
  position: relative;
  scrollbar-gutter: auto;
}
dialog button.modal-close,
dialog button.action-close,
.action-dialog .modal-close.action-close {
  position: absolute;
  top: 8px;
  right: 8px;
  float: none;
  margin: 0;
  z-index: 5;
  padding: 0;
  font-size: 0;
  line-height: 0;
}
dialog .modal-head {
  padding-right: 46px;
}
.action-dialog .form-head,
.action-dialog .page-head {
  padding-right: 46px;
}

.dashboard-quick-add {
  position: relative;
  z-index: 20;
}
.dashboard-quick-add summary {
  display: flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  cursor: pointer;
  gap: 10px;
}
.dashboard-quick-add summary::-webkit-details-marker {
  display: none;
}
.dashboard-quick-add summary::after {
  display: block;
  flex: 0 0 6px;
  content: "";
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-top: -4px;
}
.dashboard-quick-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(270px, calc(100vw - 32px));
  padding: 8px;
  background: white;
  border: 1px solid #e5e5ef;
  border-radius: 16px;
  box-shadow: 0 12px 36px #17172b18;
}
.dashboard-quick-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  color: #161627;
  text-decoration: none;
}
.dashboard-quick-menu a:hover,
.dashboard-quick-menu a:focus-visible {
  background: #f3efff;
  color: #754bff;
}
.dashboard-quick-menu svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  flex-shrink: 0;
}

.person-name {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  vertical-align: middle;
}
.person-avatar {
  position: relative;
  display: inline-grid;
  place-items: center;

  overflow: hidden;
}
.person-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.person-label {
  min-width: 0;
  overflow-wrap: anywhere;
}
.person-avatar img[hidden] {
  display: none;
}

/* Shared visual primitives; module files own layout, not primitive appearance. */
.instrument-add {
  grid-template-columns: minmax(180px, 400px) auto;
  justify-content: start;
  align-items: end;
  margin-bottom: 24px;
}
.instrument-add input,
.instrument-edit input {
  border: 1px solid var(--line);
  border-radius: var(--ui-radius-control);
  padding: 11px 12px;
  width: 100%;
  min-width: 0;
  min-height: var(--ui-control-height);
}
.instrument-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.instrument-edit summary {
  cursor: pointer;
  color: var(--violet);
  font-size: 13px;
  margin-top: 6px;
}
.instrument-edit form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.instrument-table button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
@media (max-width: 760px) {
  .instrument-add,
  .instrument-table .tr:not(.th) {
    grid-template-columns: 1fr;
  }
  .instrument-table .th {
    display: none;
  }
}
.instrument-row {
  grid-template-columns: minmax(180px, 1fr) repeat(4, auto);
  align-items: center;
  border-radius: var(--ui-radius-card);
}
@media (max-width: 900px) {
  .instrument-row {
    grid-template-columns: 1fr;
    align-items: start;
  }
}
.list-section {
  width: 100%;
  min-width: 0;
}
.list-section-head {
  margin-bottom: 16px;
}
.list-section-head h2 {
  font-size: 16px;
  margin: 0 0 8px;
}
.list-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.list-section > .data-table:not([data-list-view="tiles"]) {
  border: 1px solid var(--line);
  border-radius: var(--ui-radius-card);
  background: white;
  overflow: hidden;
}
.list-section > .data-table .tr.th {
  border-top: 0;
}
.avatar,
.person-avatar,
.relation-avatar {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: var(--ui-avatar-width);
  height: var(--ui-avatar-height);
  min-width: var(--ui-avatar-width);
  flex: 0 0 var(--ui-avatar-width);
  border-radius: var(--ui-avatar-radius);
  overflow: hidden;
  background: var(--violet-soft);
  color: var(--violet);
  font-size: var(--ui-avatar-font);
  font-weight: 700;
  line-height: 1;
}
.person-name .person-avatar > span {
  color: inherit;
  font-size: inherit;
}
.avatar img,
.person-avatar img,
.relation-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--ui-control-height);
  border-radius: var(--ui-radius-control);
  font-size: var(--ui-control-font);
  line-height: 1.3;
}
.panel,
.form-card,
.student-card,
.portal-card {
  border-color: var(--line);
  border-radius: var(--ui-radius-card);
  background: white;
  box-shadow: var(--shadow);
}
.student-card,
.portal-card {
  padding: var(--ui-space-card);
  gap: var(--ui-space-gap);
}
.student-card h3 {
  font-size: 15px;
  line-height: 1.4;
}
.panel-head {
  gap: var(--ui-space-gap);
  flex-wrap: wrap;
}
.panel-head > p {
  flex: 1 1 320px;
  min-width: 0;
}
.people-list[data-list-view="table"] h3 {
  font-size: 14px;
}
.data-table .th,
.people-list[data-list-view="table"] .people-list-head {
  background: var(--ui-table-heading-bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.data-table[data-list-view="tiles"] .tr:not(.th) {
  padding: var(--ui-space-card);
  border-radius: var(--ui-radius-card);
  box-shadow: var(--shadow);
}
.data-table .tr:not(.th) {
  font-size: 14px;
}
.person-name {
  color: inherit;
  font-size: inherit;
  line-height: 1.4;
}
.form-card
  :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not(
    [type="file"]
  ):not([type="hidden"]),
.relation-combobox > input {
  border: 1px solid var(--line);
  border-radius: var(--ui-radius-control);
  min-height: var(--ui-control-height);
  padding: 11px 12px;
  font-size: var(--ui-control-font);
  background: white;
}
.form-card :is(input, select, textarea):focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}
.list-view-switch {
  border-radius: var(--ui-radius-control);
  min-height: var(--ui-control-height);
}
.person-name .person-avatar {
  color: var(--violet);
  font-size: var(--ui-avatar-font);
}
@media (max-width: 760px) {
  :root {
    --ui-space-card: 16px;
  }
  .student-card,
  .portal-card {
    padding: var(--ui-space-card);
  }
  .panel-head {
    align-items: flex-start;
  }
  .panel-head > p {
    flex-basis: 100%;
  }
}
