/* =========================================================================
   Кабинет: расписание и оплаты учеников
   ========================================================================= */
.sc-card { padding: 24px; }
.sc-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sc-empty { margin-top: 18px; padding: 14px 16px; border-radius: 16px; font-size: 14px; line-height: 1.55; color: var(--muted); background: rgba(99,102,241,.07); border: 1px dashed rgba(99,102,241,.35); }
.sc-empty b { color: var(--strong); }
.sc-today { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.sc-box { padding: 14px; border-radius: 18px; background: var(--card-solid); border: 1px solid var(--line); min-width: 0; }
.sc-box-h { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 900; color: var(--strong); margin-bottom: 8px; }
.sc-box-h svg { color: #6366f1; }
.sc-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.sc-row:first-of-type { border-top: 0; }
.sc-row .sc-chip { flex: 1; min-width: 0; }
.sc-row-t { min-width: 0; display: flex; flex-direction: column; font-size: 13px; line-height: 1.3; }
.sc-row-t b { color: var(--strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-row-t span { color: var(--muted); font-size: 12px; }
.sc-row-act { display: flex; gap: 4px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.sc-mini { height: 28px; padding: 0 9px; border-radius: 9px; font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; color: var(--strong); background: rgba(100,116,139,.12); border: 1px solid var(--line); white-space: nowrap; cursor: pointer; }
.sc-mini:hover { background: rgba(99,102,241,.15); }
.sc-mini.ok { color: #fff; background: #10b981; border-color: #10b981; }
.sc-mini.ok:hover { background: #059669; }
.sc-none { font-size: 13px; color: var(--muted); padding: 6px 0; text-align: center; }
.sc-month { grid-column: 1 / -1; font-size: 13px; color: var(--muted); padding: 2px 4px; }
.sc-month b { color: var(--strong); }

.sc-weekbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.sc-weekbar h3 { font-size: 17px; font-weight: 900; color: var(--strong); }
.sc-nav { display: flex; gap: 6px; }
.sc-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.sc-day { min-width: 0; border-radius: 16px; background: var(--card-solid); border: 1px solid var(--line); padding: 8px; min-height: 120px; }
.sc-day.is-today { border-color: #6366f1; box-shadow: 0 0 0 1px #6366f1 inset; }
.sc-day.is-past { opacity: .78; }
.sc-day-h { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 12px; color: var(--muted); font-weight: 800; }
.sc-day-h b { color: var(--strong); font-size: 15px; }
.sc-add { margin-left: auto; width: 24px; height: 24px; border-radius: 8px; font-size: 16px; line-height: 1; font-weight: 900; color: #6366f1; background: rgba(99,102,241,.1); }
.sc-add:hover { background: #6366f1; color: #fff; }
.sc-day-b { display: flex; flex-direction: column; gap: 5px; }
.sc-day-none { font-size: 12px; color: var(--muted); opacity: .6; padding: 2px; }
.sc-chip { display: flex; flex-direction: column; align-items: stretch; gap: 2px; width: 100%; text-align: left; padding: 6px 8px; border-radius: 10px; font-size: 12.5px; line-height: 1.25; cursor: pointer;
  color: var(--strong); background: rgba(99,102,241,.12); border: 1px solid rgba(99,102,241,.3); }
.sc-chip-t { display: flex; align-items: center; gap: 6px; }
.sc-chip-n { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; color: var(--text, var(--strong)); }
.sc-chip.one { flex-direction: row; align-items: center; }
.sc-chip:hover { border-color: #6366f1; }
.sc-chip b { flex-shrink: 0; font-weight: 900; }
.sc-chip i { margin-left: auto; font-style: normal; font-weight: 900; }
.sc-chip em { font-style: normal; font-size: 10px; color: var(--muted); margin-left: auto; }
.sc-chip i + em { margin-left: 4px; }
.sc-chip.st-done { background: rgba(16,185,129,.13); border-color: rgba(16,185,129,.4); }
.sc-chip.st-done i { color: #10b981; }
.sc-chip.st-missed { background: rgba(245,158,11,.14); border-color: rgba(245,158,11,.45); }
.sc-chip.st-missed i { color: #d97706; }
.sc-chip.st-cancelled { opacity: .55; background: transparent; border-style: dashed; }
.sc-chip.st-cancelled .sc-chip-n { text-decoration: line-through; }

.sc-st { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.sc-st:first-child { border-top: 0; }
.sc-st-main { flex: 1; min-width: 220px; }
.sc-st-name { font-weight: 900; color: var(--strong); }
.sc-st-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.sc-st-act { display: flex; gap: 6px; }
.sc-bal { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.sc-bal.ok { color: #047857; background: rgba(16,185,129,.14); }
.sc-bal.warn { color: #b45309; background: rgba(245,158,11,.16); }
.sc-bal.bad { color: #be123c; background: rgba(244,63,94,.13); }
.sc-bal.mut { color: var(--muted); background: rgba(100,116,139,.12); }
body:not(.light) .sc-bal.ok { color: #34d399; }
body:not(.light) .sc-bal.warn { color: #fbbf24; }
body:not(.light) .sc-bal.bad { color: #fb7185; }

/* окна */
.sc-modal { max-width: 520px !important; }
.sc-lbl { display: block; font-size: 12px; font-weight: 800; color: var(--muted); margin: 14px 0 6px; text-transform: uppercase; letter-spacing: .04em; }
.sc-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sc-grid3 { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; }
.sc-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sc-seg label { display: flex; align-items: center; justify-content: center; gap: 6px; height: 40px; border-radius: 12px; border: 1px solid var(--line); font-weight: 800; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.sc-seg input { position: absolute; opacity: 0; pointer-events: none; }
.sc-seg label:has(input:checked) { color: #fff; background: #4B55E8; border-color: #4B55E8; }
.sc-slot { display: grid; grid-template-columns: 1.4fr 1fr 1fr 32px; gap: 6px; margin-bottom: 6px; }
.sc-f { height: 40px !important; padding: 0 10px !important; font-size: 14px !important; min-width: 0; }
.sc-x { width: 32px; height: 32px; border-radius: 10px; color: #f43f5e; background: rgba(244,63,94,.1); font-weight: 900; flex-shrink: 0; align-self: center; }
.sc-x:hover { background: #f43f5e; color: #fff; }
.sc-check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin-top: 8px; color: var(--strong); }
.sc-check input { margin-top: 3px; }
.sc-contact { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; font-size: 14px; color: var(--strong); border-top: 1px solid var(--line); }
.sc-contact:first-child { border-top: 0; }
.sc-share { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.sc-pill { display: inline-flex; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: rgba(99,102,241,.12); color: #6366f1; }
.sc-pill.st-done { background: rgba(16,185,129,.14); color: #059669; }
.sc-pill.st-missed { background: rgba(245,158,11,.16); color: #b45309; }
.sc-pill.st-cancelled { background: rgba(100,116,139,.14); color: var(--muted); }
.sc-stbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 14px; }
.sc-stbtns button { height: 40px; border-radius: 12px; font-weight: 800; font-size: 13.5px; border: 1px solid var(--line); color: var(--strong); background: rgba(100,116,139,.08); }
.sc-stbtns button:hover { border-color: #6366f1; }
.sc-stbtns button.on { color: #fff; background: #4B55E8; border-color: #4B55E8; }
.sc-hist { display: grid; grid-template-columns: 80px 90px 1fr 32px; gap: 8px; align-items: center; padding: 6px 0; font-size: 13.5px; border-top: 1px solid var(--line); color: var(--strong); }
.sc-hist span { color: var(--muted); }
.sc-sub-h { font-size: 12px; font-weight: 900; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.sc-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.sc-tag { font-size: 12px; padding: 2px 8px; border-radius: 8px; background: rgba(16,185,129,.12); color: var(--strong); }

@media (max-width: 1023px) {
  .sc-today { grid-template-columns: 1fr; }
}
@media (max-width: 899px) {
  .sc-week { grid-template-columns: 1fr; }
  .sc-day { min-height: 0; display: grid; grid-template-columns: 74px 1fr; gap: 8px; align-items: start; }
  .sc-day-h { flex-direction: column; align-items: flex-start; gap: 2px; margin: 0; }
  .sc-add { margin: 4px 0 0; }
  .sc-day.is-past { display: none; }
}
@media (max-width: 640px) {
  .sc-card { padding: 18px 14px; }
  .sc-slot { grid-template-columns: 1fr 1fr; }
  .sc-slot select[data-k="dur"] { grid-column: 1; }
  .sc-grid3 { grid-template-columns: 1fr 1fr; }
  .sc-hist { grid-template-columns: 70px 1fr 32px; }
  .sc-hist span:nth-of-type(2) { grid-column: 1 / 3; }
}

/* «Ближайший урок» в приветствии */
.sc-next { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 14px 16px; border-radius: 18px; background: rgba(99,102,241,.08); border: 1px solid rgba(99,102,241,.28); }
.sc-next-ic { width: 44px; height: 44px; flex-shrink: 0; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: #fff; background: #4B55E8; }
.sc-next-ic.live { background: #10b981; box-shadow: 0 0 0 0 rgba(16,185,129,.5); animation: scPulse 1.8s infinite; }
@keyframes scPulse { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,.45); } 70% { box-shadow: 0 0 0 12px rgba(16,185,129,0); } 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); } }
.sc-next-t { flex: 1; min-width: 0; }
.sc-next-l { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.sc-next-l span { color: #4B55E8; }
.sc-next-n { font-size: 16px; color: var(--strong); margin-top: 2px; line-height: 1.35; }
.sc-next-s { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.sc-next-b { flex-shrink: 0; }
body:not(.light) .sc-next-l span { color: #a5b4fc; }

/* строки в «Сегодня» */
.sc-row-link { text-align: left; cursor: pointer; flex: 1; }
.sc-row-link:hover b { color: #4B55E8; }
.sc-row-t b { white-space: normal; }
.sc-row-t span.live { color: #059669; font-weight: 800; }
.sc-row-t span.soon { color: #d97706; font-weight: 800; }
.sc-row.is-live { background: rgba(16,185,129,.07); margin: 0 -8px; padding: 6px 8px; border-radius: 12px; }
.sc-mini.pr { color: #fff; background: #4B55E8; border-color: #4B55E8; }
.sc-done { color: #10b981; font-weight: 900; padding: 0 4px; }
.sc-row-t .sc-bal { align-self: flex-start; margin-top: 3px; }

/* итоги месяца */
.sc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.sc-stat { padding: 12px 16px; border-radius: 16px; background: var(--card-solid); border: 1px solid var(--line); }
.sc-stat span { display: block; font-size: 12px; font-weight: 800; color: var(--muted); }
.sc-stat b { font-size: 20px; font-weight: 900; color: var(--strong); }
.sc-stat b small { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.sc-stat.bad b { color: #e11d48; }

@media (max-width: 640px) {
  .sc-next { flex-wrap: wrap; }
  .sc-next-b { width: 100%; justify-content: center; }
  .sc-row-stack { flex-direction: column; align-items: stretch; }
  .sc-row-stack .sc-row-act { justify-content: flex-start; }
  .sc-row-stack .sc-mini { flex: 1; justify-content: center; height: 34px; }
  .sc-stats { grid-template-columns: 1fr 1fr; }
  .sc-stat:last-child { grid-column: 1 / -1; }
}

/* Сводка по ученикам: первые 5, остальные по кнопке; поиск */
.ov-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ov-search { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--card-solid); color: var(--muted); }
.ov-search input { border: 0; outline: 0; background: transparent; color: var(--strong); font-size: 14px; width: 170px; }
.ov-more { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 46px; margin-top: 10px; border-radius: 16px; font-weight: 800; font-size: 14px;
  color: #4B55E8; background: rgba(99,102,241,.08); border: 1px dashed rgba(99,102,241,.4); cursor: pointer; }
.ov-more:hover { background: rgba(99,102,241,.15); }
body:not(.light) .ov-more { color: #a5b4fc; }
@media (max-width: 640px) { .ov-search { width: 100%; } .ov-search input { width: 100%; } }
.ov-row.hidden, .ov-more.hidden, .ov-search.hidden { display: none !important; }

/* Карточка «Расписание» в кабинете */
.sc-mini-card { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: 24px; background: var(--card-solid); border: 1px solid var(--line); flex-wrap: wrap; }
.sc-mini-card.hidden { display: none !important; }
.sc-mini-main { display: flex; align-items: center; gap: 14px; min-width: 220px; }
.sc-mini-title { font-size: 18px; font-weight: 900; color: var(--strong); }
.sc-mini-stats { display: flex; gap: 8px; flex: 1; flex-wrap: wrap; }
.sc-ms { display: flex; align-items: baseline; gap: 6px; padding: 8px 14px; border-radius: 14px; background: rgba(100,116,139,.08); border: 1px solid var(--line); }
.sc-ms b { font-size: 20px; font-weight: 900; color: var(--strong); }
.sc-ms span { font-size: 13px; color: var(--muted); font-weight: 700; }
.sc-ms.need { border-color: rgba(239,68,68,.45); background: rgba(239,68,68,.07); } .sc-ms.need b { color: #ef4444; }
.sc-ms.warn { border-color: rgba(245,158,11,.45); background: rgba(245,158,11,.08); } .sc-ms.warn b { color: #d97706; }
.sc-ms:hover { border-color: #6366f1; }
.sc-next-s a { color: #4B55E8; text-decoration: underline; }
@media (max-width: 640px) { .sc-mini-btn { width: 100%; justify-content: center; } }
