:root {
  --wood: #6b4226;
  --wood-dark: #4a2c17;
  --amber: #d99a2b;
  --amber-light: #f0c674;
  --cream: #f7f1e6;
  --ink: #241a12;
  --muted: #7a6a58;
  --card: #fffdf9;
  --border: #e6dcc9;
  --shadow: 0 10px 30px rgba(74, 44, 23, 0.12);
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-primary { background: var(--amber); color: #3a2410; box-shadow: 0 6px 18px rgba(217,154,43,.4); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(217,154,43,.5); }
.btn-ghost { background: transparent; color: var(--cream); border: 1.5px solid rgba(247,241,230,.55); }
.btn-ghost:hover { background: rgba(247,241,230,.12); }
.btn-outline { background: transparent; color: var(--wood); border: 1.5px solid var(--wood); }
.btn-outline:hover { background: var(--wood); color: var(--cream); }
.btn-block { display: block; width: 100%; text-align: center; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(43, 27, 15, 0.92);
  backdrop-filter: blur(8px);
  color: var(--cream);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: .3px; }
.brand .logo { font-size: 24px; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { font-size: 15px; opacity: .9; transition: opacity .15s; }
.nav-links a:hover { opacity: 1; }
.nav-cta { display: flex; gap: 12px; align-items: center; }

/* Hero */
.hero {
  position: relative;
  color: var(--cream);
  padding: 120px 0 130px;
  background: linear-gradient(rgba(36,22,12,.72), rgba(36,22,12,.78)), url("img/hero.jpg") center/cover no-repeat;
}
.hero h1 { font-size: 54px; line-height: 1.08; font-weight: 800; max-width: 720px; margin-bottom: 20px; }
.hero p { font-size: 20px; max-width: 600px; opacity: .92; margin-bottom: 34px; }
.hero .actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero .stats { display: flex; gap: 46px; margin-top: 60px; flex-wrap: wrap; }
.hero .stat b { display: block; font-size: 34px; color: var(--amber-light); }
.hero .stat span { font-size: 14px; opacity: .85; }

/* Sections */
section { padding: 90px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.eyebrow { color: var(--amber); font-weight: 700; text-transform: uppercase; letter-spacing: 2px; font-size: 13px; }
.section-head h2 { font-size: 38px; margin: 10px 0 14px; }
.section-head p { color: var(--muted); font-size: 17px; }

/* About */
.about { background: var(--card); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about-grid img { border-radius: var(--radius); box-shadow: var(--shadow); }
.about h2 { font-size: 34px; margin-bottom: 18px; }
.about p { color: var(--muted); margin-bottom: 16px; }
.about ul { list-style: none; margin-top: 20px; }
.about li { padding: 8px 0 8px 30px; position: relative; }
.about li::before { content: "\266A"; position: absolute; left: 0; color: var(--amber); font-size: 18px; }

/* Courses */
.cards { display: flex; flex-wrap: wrap; gap: 28px; justify-content: center; }
.card {
  flex: 1 1 320px; max-width: 355px;
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--border);
  transition: transform .18s ease;
}
.card:hover { transform: translateY(-6px); }
.card .thumb { height: 200px; overflow: hidden; }
.card .thumb img { height: 100%; width: 100%; object-fit: cover; }
.card .body { padding: 24px; }
.card h3 { font-size: 21px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15px; margin-bottom: 14px; }
.card .price { font-weight: 700; color: var(--wood); font-size: 18px; }

/* Teachers */
.teachers { background: var(--card); }
.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.member { text-align: center; }
.member img { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; margin: 0 auto 16px; box-shadow: var(--shadow); }
.member h4 { font-size: 19px; }
.member span { color: var(--amber); font-size: 14px; font-weight: 600; }
.member p { color: var(--muted); font-size: 14px; margin-top: 8px; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.plan { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 34px 28px; text-align: center; }
.plan.featured { border: 2px solid var(--amber); box-shadow: var(--shadow); transform: scale(1.03); }
.plan h3 { font-size: 20px; margin-bottom: 6px; }
.plan .cost { font-size: 40px; font-weight: 800; color: var(--wood); margin: 12px 0; }
.plan .cost small { font-size: 15px; color: var(--muted); font-weight: 400; }
.plan ul { list-style: none; margin: 20px 0 26px; text-align: left; }
.plan li { padding: 7px 0 7px 26px; position: relative; color: var(--muted); }
.plan li::before { content: "\2713"; position: absolute; left: 0; color: var(--amber); font-weight: 700; }

/* CTA */
.cta-band { background: var(--wood-dark); color: var(--cream); text-align: center; }
.cta-band h2 { font-size: 34px; margin-bottom: 14px; }
.cta-band p { opacity: .9; margin-bottom: 28px; font-size: 17px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.contact-info h3 { font-size: 24px; margin-bottom: 16px; }
.contact-info p { color: var(--muted); margin-bottom: 12px; }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.form-field input, .form-field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 15px; font-family: inherit; background: var(--card);
}
.form-field input:focus, .form-field textarea:focus { outline: 2px solid var(--amber-light); border-color: var(--amber); }

/* Footer */
.site-footer { background: #201509; color: #cdbfa9; padding: 50px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 34px; }
.footer-grid h5 { color: var(--cream); margin-bottom: 14px; font-size: 16px; }
.footer-grid a { display: block; padding: 4px 0; font-size: 14px; opacity: .85; }
.footer-bottom { border-top: 1px solid #3a2a18; padding-top: 20px; text-align: center; font-size: 13px; opacity: .7; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(20,12,6,.6); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--card); border-radius: 20px; padding: 38px; width: 100%; max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35); position: relative;
}
.modal h3 { font-size: 26px; margin-bottom: 6px; }
.modal .sub { color: var(--muted); font-size: 15px; margin-bottom: 24px; }
.modal .close { position: absolute; top: 18px; right: 20px; font-size: 26px; cursor: pointer; color: var(--muted); background: none; border: none; }
.auth-switch { display: flex; gap: 8px; margin: 4px 0 20px; background: #f1e7d4; padding: 5px; border-radius: 12px; }
.auth-tab {
  flex: 1; padding: 10px; border: none; background: transparent; cursor: pointer;
  font-weight: 700; font-size: 15px; font-family: inherit; color: var(--muted); border-radius: 9px;
}
.auth-tab.active { background: var(--card); color: var(--wood); box-shadow: 0 2px 6px rgba(74,44,23,.12); }
.captcha-field label b { color: var(--wood); }
.reg-ok {
  color: #1e8a4c; font-size: 14px; margin: -4px 0 14px; background: #eafbea;
  padding: 12px 14px; border-radius: 10px; line-height: 1.5;
}
.role-tabs { display: flex; gap: 10px; margin-bottom: 22px; }
.role-tab { flex: 1; padding: 10px; text-align: center; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); }
.role-tab.active { background: var(--wood); color: var(--cream); border-color: var(--wood); }
.login-error { color: #c0392b; font-size: 14px; margin: -6px 0 14px; display: none; }
.login-error.show { display: block; }
.demo-hint { margin-top: 18px; font-size: 12.5px; color: var(--muted); background: #f3ead8; padding: 12px 14px; border-radius: 10px; line-height: 1.5; }

/* Dashboard */
.dash-body { background: var(--cream); min-height: 100vh; }
.dash-top {
  background: var(--wood-dark); color: var(--cream); padding: 16px 0;
  position: sticky; top: 0; z-index: 20;
}
.dash-top .nav { height: auto; }
.dash-user { display: flex; align-items: center; gap: 14px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--amber); color: #3a2410; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.dash-main { padding: 46px 0 80px; }
.dash-hello { margin-bottom: 34px; }
.dash-hello h1 { font-size: 32px; }
.dash-hello p { color: var(--muted); }
.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; align-items: start; }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); margin-bottom: 24px; }
.panel h2 { font-size: 20px; margin-bottom: 18px; }
.lesson {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 12px;
}
.lesson-info b { font-size: 16px; }
.lesson-info span { display: block; color: var(--muted); font-size: 14px; }
.lesson .badge { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #eafbea; color: #1e8a4c; }
.lesson .badge.soon { background: #fdf3e0; color: #c9871a; }
.stat-row { display: flex; gap: 16px; flex-wrap: wrap; }
.mini-stat { flex: 1; min-width: 120px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px; text-align: center; }
.mini-stat b { display: block; font-size: 28px; color: var(--wood); }
.mini-stat span { font-size: 13px; color: var(--muted); }

/* Notes */
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.panel-head h2 { margin-bottom: 0; }
.notes-status { font-size: 13px; color: #1e8a4c; opacity: 0; transition: opacity .3s; }
.notes-area {
  width: 100%; min-height: 160px; resize: vertical;
  padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px;
  font-family: inherit; font-size: 15px; line-height: 1.6; color: var(--ink);
  background: #fffef9;
}
.notes-area:focus { outline: 2px solid var(--amber-light); border-color: var(--amber); }
.notes-hint { font-size: 12.5px; color: var(--muted); margin-top: 10px; }

/* Приветствие + счётчики + небольшой календарь справа сверху */
.hello-row { display: flex; gap: 28px; align-items: flex-start; margin-bottom: 28px; }
.hello-left { flex: 1 1 auto; min-width: 0; }
.stat-col { display: flex; flex-direction: column; gap: 12px; max-width: 340px; }
.stat-col .mini-stat {
  display: flex; align-items: baseline; gap: 10px; text-align: left; padding: 12px 18px;
}
.stat-col .mini-stat b { display: inline; font-size: 22px; }
.stat-col .mini-stat span { font-size: 13px; }
.cal-panel { flex: 0 0 430px; max-width: 430px; margin-bottom: 0; padding: 20px 22px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 360px; margin-top: 16px; }
.tile {
  background: var(--card); border: 1px solid var(--border); border-radius: 11px;
  padding: 10px 12px; text-align: center;
}
.tile b { display: block; font-size: 21px; color: var(--wood); line-height: 1.1; }
.tile span { font-size: 11.5px; color: var(--muted); }
.tile.tile-blue b { color: #2e86c8; }
.tile-cancel b { color: #2e86c8; }
.tile-wide { grid-column: 1 / -1; }
.tile-trial b { color: #c9871a; font-size: 17px; }

/* Форма пробного урока */
.trial-form { display: flex; flex-direction: column; gap: 10px; }
.trial-form select {
  padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 14px; font-family: inherit; background: var(--card); color: var(--ink);
}
.trial-actions { display: flex; gap: 10px; }
.trial-actions .btn { flex: 1; }
#trialStartBtn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
@media (max-width: 900px) {
  .hello-row { flex-direction: column; }
  .cal-panel { flex-basis: auto; max-width: 100%; width: 100%; }
  .stat-col, .tiles { max-width: 100%; }
}

/* Кабинет администратора */
.paid-now { font-size: 16px; color: var(--muted); margin-bottom: 16px; }
.paid-now b { font-size: 30px; color: var(--wood); margin-left: 6px; }
.paid-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.paid-form input[type="number"] {
  width: 90px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 15px; font-family: inherit; background: var(--card);
}
.paid-badge {
  flex: 0 0 auto; min-width: 28px; text-align: center; font-weight: 700; color: var(--wood);
  background: #fdf6e7; border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; font-size: 14px;
}
.paid-note {
  flex: 1 1 160px; min-width: 150px; padding: 11px 13px;
  border: 1px solid var(--border); border-radius: 10px; font-size: 14px; font-family: inherit; background: var(--card);
}
.paid-note:focus { outline: 2px solid var(--amber-light); border-color: var(--amber); }
.log-month {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
  color: var(--muted); margin: 14px 2px 4px;
}
.log-month:first-child { margin-top: 0; }
.paid-log { display: flex; flex-direction: column; gap: 3px; }
.log-line { font-size: 12.5px; color: var(--muted); line-height: 1.6; padding: 1px 2px; }
.log-line .pl-delta { font-weight: 700; margin-right: 2px; }
.paid-log-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 13px; border: 1px solid var(--border); border-radius: 10px;
}
.pl-delta { font-weight: 800; min-width: 36px; }
.pl-delta.up { color: #1e8a4c; }
.pl-delta.down { color: #c0392b; }
.pl-name { flex: 1; font-size: 14px; }
.pl-date { font-size: 13px; color: var(--muted); }

.admin-student { gap: 10px; }
.admin-student .dl-del {
  background: none; border: none; color: #c0392b; cursor: pointer;
  font-size: 18px; line-height: 1; padding: 2px 4px; flex: 0 0 auto;
}
.add-form .form-field { margin-bottom: 14px; }
.add-form select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 15px; font-family: inherit; background: var(--card); color: var(--ink);
}
.add-error { color: #c0392b; font-size: 14px; margin: -4px 0 12px; display: none; }
.add-error.show { display: block; }

/* Calendar (compact) */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-title { margin: 0 !important; font-size: 15px !important; }
.cal-nav { display: flex; align-items: center; gap: 5px; }
.cal-arrow {
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--card); cursor: pointer; font-size: 14px; color: var(--wood); line-height: 1;
}
.cal-arrow:hover { background: var(--cream); }
.cal-filter { font-size: 12px; color: var(--wood); font-weight: 600; margin-bottom: 10px; }
#allSchedBtn.active { background: var(--wood); color: var(--cream); border-color: var(--wood); }
.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-weekdays { margin-bottom: 5px; }
.cal-weekdays span { text-align: center; font-size: 9.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.cal-cell {
  position: relative; height: 40px; border: 1px solid var(--border); border-radius: 7px;
  background: var(--card); cursor: pointer; font-size: 12.5px;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .12s, background .12s;
}
.cal-cell > span { line-height: 1; }
.cal-cell:hover { border-color: var(--amber); background: var(--cream); }
.cal-cell.empty { background: transparent; border: none; cursor: default; }
.cal-cell.today { border-color: var(--amber); background: #fdf6e7; font-weight: 700; }
.cal-cell.trial-day { background: #fff2b0; border-color: #f0c22b; }
.cal-cell .dot {
  position: absolute; top: 1px; right: 1px;
  font-size: 8px; font-weight: 700; min-width: 12px; height: 12px; line-height: 12px; text-align: center;
  background: var(--amber); color: #3a2410; border-radius: 999px; padding: 0 2px;
}
.cal-cell .miss-lines {
  position: absolute; left: 5px; right: 5px; bottom: 3px;
  display: flex; flex-direction: column-reverse; gap: 1.5px;
}
.cal-cell .miss-line { height: 2px; background: #3ba3e3; border-radius: 2px; }

/* Cascading popover */
.cal-popover {
  position: absolute; z-index: 200; display: none;
  width: 250px; max-width: calc(100vw - 20px);
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 18px 50px rgba(40,24,12,.28); padding: 12px;
}
.cal-popover.open { display: block; }
.pop-title {
  font-weight: 700; font-size: 15px; text-transform: capitalize;
  padding: 2px 4px 10px; border-bottom: 1px solid var(--border); margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.pop-back {
  background: none; border: none; cursor: pointer; color: var(--wood);
  font-size: 20px; line-height: 1; padding: 0 4px;
}
.pop-list { max-height: 320px; overflow-y: auto; }
.pop-sub { font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 8px 4px 6px; }
.pop-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 11px; border-radius: 9px; cursor: pointer; font-size: 13px;
}
.pop-item:hover { background: var(--cream); }
.pop-arrow { color: var(--muted); font-size: 18px; }
.pop-booked { cursor: default; background: #f5efe1; }
.pop-booked:hover { background: #f5efe1; }
.pop-booked.pop-missed span { color: #2e86c8; font-weight: 600; }
.pop-miss-tag {
  display: block; font-size: 8.5px; line-height: 1; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px; color: #2e86c8;
  margin: -2px 0 1px; height: 9px;
}
.pop-booked .dl-del { background: none; border: none; color: #c0392b; cursor: pointer; font-size: 17px; line-height: 1; padding: 2px 4px; }
.pop-times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pop-time {
  border: 1px solid var(--border); background: var(--card); color: var(--wood);
  padding: 9px 0; border-radius: 8px; cursor: pointer; font-size: 13.5px; font-family: inherit; font-weight: 600;
}
.pop-time:hover { background: var(--amber); color: #3a2410; border-color: var(--amber); }
.pop-time.taken { opacity: .38; text-decoration: line-through; cursor: not-allowed; }
.pop-time.taken:hover { background: var(--card); color: var(--wood); border-color: var(--border); }

/* Wheel time picker */
.wheel-picker {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 5px;
  height: 160px; margin: 2px 0;
}
.wheel {
  height: 160px; width: 62px; overflow-y: scroll; scroll-snap-type: y mandatory;
  text-align: center; -ms-overflow-style: none; scrollbar-width: none;
  padding: 64px 0; /* (160 - 32) / 2, чтобы крайние вставали в центр */
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 32%, #000 68%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 32%, #000 68%, transparent);
}
.wheel::-webkit-scrollbar { display: none; }
.wheel-item {
  height: 32px; line-height: 32px; scroll-snap-align: center;
  font-size: 17px; color: var(--muted); font-variant-numeric: tabular-nums; cursor: pointer;
  transition: color .12s, transform .12s;
}
.wheel-item.sel { color: var(--wood); font-weight: 800; font-size: 19px; }
.wheel-colon { font-size: 18px; font-weight: 800; color: var(--wood); padding-bottom: 2px; }
.wheel-band {
  position: absolute; left: 8px; right: 8px; top: 64px; height: 32px;
  border-top: 1px solid var(--amber); border-bottom: 1px solid var(--amber);
  background: rgba(217,154,43,.08); border-radius: 6px; pointer-events: none;
}

/* Students + per-student notes */
/* Нижний ряд: уроки+заметки | быстрое действие */
.bottom-row { display: flex; gap: 28px; align-items: flex-start; }
.lessons-panel { flex: 1 1 auto; min-width: 0; margin-bottom: 0; }
.action-panel { flex: 0 0 300px; max-width: 300px; margin-bottom: 0; }
@media (max-width: 860px) {
  .bottom-row { flex-direction: column; }
  .action-panel { flex-basis: auto; max-width: 100%; width: 100%; }
}

.students-layout { display: grid; grid-template-columns: 1fr 1.5fr; gap: 28px; align-items: start; }
.students-layout .notes-area { min-height: 220px; }
.student-list { display: flex; flex-direction: column; gap: 8px; }
.list-sub {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
  color: var(--muted); margin: 6px 2px 2px;
}
.list-sub:first-child { margin-top: 0; }
.student-item {
  border: 1px solid var(--border); border-radius: 11px; padding: 12px 14px; cursor: pointer;
  transition: border-color .12s, background .12s;
}
.student-item:hover { border-color: var(--amber); background: var(--cream); }
.student-item.active { border-color: var(--wood); background: #fdf6e7; box-shadow: 0 0 0 1px var(--wood) inset; }
.student-item b { display: block; font-size: 14px; }
.student-item span { font-size: 12px; color: var(--muted); }

/* Строка урока в объединённом списке */
.lesson-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 13px; }
.lesson-item .li-main { min-width: 0; }
.lesson-item .li-start { padding: 7px 14px; font-size: 12.5px; flex: 0 0 auto; }
.student-notes .panel-head { margin-bottom: 12px; }
.student-notes .notes-area:disabled { background: #f3efe6; color: var(--muted); cursor: not-allowed; }

/* Пропущенные занятия */
.missed-block { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.missed-title { font-size: 16px; margin-bottom: 12px; }
.missed-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.missed-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 13px; border: 1px solid var(--border); border-radius: 10px;
  border-left: 3px solid #c0392b;
}
.missed-item.is-move { border-left-color: var(--amber); }
.missed-item .mi-main { min-width: 0; }
.missed-item .mi-main b { font-size: 14px; text-transform: capitalize; }
.missed-item .mi-main span { display: block; font-size: 13px; color: var(--muted); }
.missed-item .dl-del { background: none; border: none; color: #c0392b; cursor: pointer; font-size: 17px; line-height: 1; padding: 2px 4px; flex: 0 0 auto; }

.missed-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.miss-left { flex: 0 0 auto; }
.miss-left .btn { padding: 10px 16px; font-size: 14px; }
.miss-choice { display: none; gap: 8px; }
.miss-choice.open { display: flex; }
.miss-choice .btn { padding: 10px 16px; font-size: 13.5px; }
.miss-reason {
  flex: 1 1 140px; min-width: 120px; padding: 10px 13px;
  border: 1px solid var(--border); border-radius: 10px; font-size: 14px; font-family: inherit; background: var(--card);
}
.miss-reason:focus { outline: 2px solid var(--amber-light); border-color: var(--amber); }
.miss-reason:disabled { background: #f3efe6; cursor: not-allowed; }

@media (max-width: 760px) {
  .students-layout { grid-template-columns: 1fr; }
}

/* Room */
.room-body {
  background: #14100c; color: var(--cream);
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; overflow: hidden;
}
.room-top {
  flex: 0 0 auto;
  padding: 14px 24px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid #2c2118;
}
.room-top .brand { font-size: 17px; }

/* Управление размером окна звонка */
.room-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.size-btn {
  background: transparent; border: 1px solid rgba(247,241,230,.35); color: var(--cream);
  padding: 7px 14px; border-radius: 999px; font-size: 13px; cursor: pointer;
  font-family: inherit; transition: background .15s, color .15s, border-color .15s;
}
.size-btn:hover { background: rgba(247,241,230,.12); }
.size-btn.active { background: var(--amber); color: #3a2410; border-color: var(--amber); font-weight: 600; }

/* Сцена и рамка звонка */
.jitsi-stage {
  flex: 1 1 auto; min-height: 0;
  display: flex; align-items: flex-start; justify-content: center;
  overflow: auto;
}
.jitsi-wrap { position: relative; background: #000; width: 100%; height: 100%; flex: 0 0 auto; }
.jitsi-wrap.boxed {
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 14px 44px rgba(0,0,0,.55);
  margin: 20px auto; max-width: 100%;
}
#jitsi { position: absolute; top: 0; left: 0; right: 0; bottom: 0; }
#jitsi iframe { width: 100% !important; height: 100% !important; border: 0; display: block; }

.resize-handle {
  position: absolute; right: 0; bottom: 0; width: 24px; height: 24px;
  cursor: nwse-resize; z-index: 6; display: none;
  background: linear-gradient(135deg, transparent 45%, var(--amber) 45%);
  border-bottom-right-radius: 14px;
}
.jitsi-wrap.boxed .resize-handle { display: block; }
.resizing { user-select: none; }

.room-note { padding: 60px 24px; text-align: center; max-width: 520px; margin: 0 auto; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero h1 { font-size: 38px; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .team, .plans { grid-template-columns: 1fr; }
  .card { max-width: 100%; }
  .dash-grid { grid-template-columns: 1fr; }
  .plan.featured { transform: none; }
}
