@font-face {
  font-family: "Medeo Sans";
  src: url("/assets/fonts/MedeoSansVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  --canvas: #f6f7f9;
  --surface: #fff;
  --ink: #202630;
  --muted: #606a78;
  --line: #dfe3e9;
  --blue: #285de5;
  --green: #36995b;
  --green-bg: #eaf5ed;
  --yellow: #fff3d5;
  --red: #a93535;
  --red-bg: #fcece9;
  --shadow: 0 16px 50px rgba(28, 39, 59, 0.09);
  --radius: 20px;
  --sidebar: 228px;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
html {
  background: var(--canvas);
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family:
    "Medeo Sans",
    system-ui,
    -apple-system,
    sans-serif;
  font-size: 16px;
  line-height: 1.45;
}
h1,
h2,
h3,
h4,
strong,
b,
th {
  font-weight: 600;
}
h1 {
  font-weight: 600;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}
a {
  color: inherit;
}
.skip-link {
  position: fixed;
  z-index: 1000;
  left: 12px;
  top: -60px;
  background: #111;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
}
.skip-link:focus {
  top: 12px;
}
:focus-visible {
  outline: 3px solid rgba(40, 93, 229, 0.35);
  outline-offset: 2px;
}
.muted {
  color: var(--muted);
}
.fine-print {
  font-size: 13px;
  color: var(--muted);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.boot-loader {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
}
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #d7dce5;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  padding: 25px 18px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #dbdfe5;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  z-index: 30;
}
/* «impact admissions» spans the sidebar's inner width (228 − 2×18 px). */
.brand {
  display: flex;
  align-items: baseline;
  padding-top: 4px;
  font-size: 23.9px;
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1;
  white-space: nowrap;
  color: var(--ink);
}
.brand-sub {
  margin-left: 0.2em;
  font-weight: 400;
  letter-spacing: -0.03em;
  color: #9aa3b2;
}
/* Wordmark: a dotless ı with the brand's red dot, as in the app icon.
   The dot's place comes from Medeo Sans' own i. */
.brand-i {
  position: relative;
  display: inline-block;
  line-height: 1;
}
.brand-i::before {
  content: "";
  position: absolute;
  left: 0.123em;
  top: 0.118em;
  width: 0.15em;
  height: 0.15em;
  border-radius: 50%;
  background: #ff1717;
  transform: translateX(-50%);
}
.account {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 24px 0;
  padding: 10px 8px;
  border-radius: 14px;
}
/* «Назначить» stays in reach on every page. */
.sidebar-book {
  margin: -8px 0 18px;
}
.avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e8ecf3;
  font-size: 13px;
  font-weight: 650;
}
.account-copy {
  min-width: 0;
}
.account-copy strong,
.account-copy small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-copy small {
  font-size: 12px;
  color: var(--muted);
}
.desktop-nav {
  display: grid;
  gap: 5px;
}
.nav-item {
  min-height: 46px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 13px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: #555f6d;
  text-decoration: none;
  text-align: left;
}
.nav-item:hover {
  background: #eef1f5;
}
.nav-item.active {
  background: #e9efff;
  color: #174cc6;
  font-weight: 650;
}
.nav-item svg {
  width: 20px;
  height: 20px;
}
.nav-badge {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  background: #f2b646;
  color: #4e3500;
  font-size: 11px;
  border-radius: 11px;
}
.sidebar-foot {
  margin-top: auto;
  display: grid;
  gap: 5px;
}
.workspace {
  grid-column: 2;
  min-width: 0;
}
.workspace-main {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 26px 34px 80px;
}
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin: 12px 0 24px;
}
/* One heading size on every page, the same as «График Команды». */
.page-head h1 {
  font-size: 30px;
  line-height: 1.04;
  letter-spacing: -0.045em;
  margin: 0 0 6px;
}
.head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 10px 15px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}
.button:hover {
  background: #f8f9fb;
}
.button.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.button.primary:hover {
  background: #174ecb;
}
.button.danger {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.button.quiet {
  background: transparent;
  border-color: transparent;
}
.button.wide {
  width: 100%;
}
.icon-button {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #cfd5de;
  border-radius: 12px;
  background: #fff;
  display: grid;
  place-items: center;
}
.icon-button svg {
  width: 19px;
}
.text-link {
  border: 0;
  background: none;
  padding: 8px;
  color: #2456d7;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.panel {
  background: #fff;
  border: 1px solid #e6e8ec;
  border-radius: var(--radius);
  padding: 22px;
}
.panel h2,
.panel h3 {
  margin-top: 0;
}
.stack {
  display: grid;
  gap: 12px;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.row.between {
  justify-content: space-between;
}
.wrap {
  flex-wrap: wrap;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 18px 0;
}
.date-nav {
  display: grid;
  grid-template-columns: 44px minmax(180px, auto) 44px auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
}
.date-picker {
  height: 44px;
  border: 1px solid #cfd5de;
  border-radius: 12px;
  background: #fff;
  padding: 0 12px;
  font-weight: 600;
}
.today-return {
  white-space: nowrap;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.metric {
  min-height: 92px;
  padding: 14px;
  background: #fff;
  border: 1px solid #e4e7eb;
  border-radius: 16px;
}
.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.metric strong {
  font-size: 27px;
  line-height: 1.15;
}
.metric.confirmed {
  border: 2px solid var(--green);
}
.metric.rescheduled {
  background: var(--yellow);
}
.metric.cancelled {
  background: var(--red-bg);
}
.metric.completed {
  background: var(--green-bg);
}
.summary-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #eaf0ff, #f7f9ff);
  padding: 20px;
  border-radius: 20px;
  margin-bottom: 18px;
}
.summary-card strong {
  font-size: 34px;
  line-height: 1;
}
.summary-icon {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--blue);
}
.attention {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 17px;
  background: #fff8e6;
  border: 1px solid #f1d995;
  border-radius: 16px;
  margin-bottom: 18px;
}
.attention .button {
  margin-left: auto;
}
.filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.chip {
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  white-space: nowrap;
}
.chip.active {
  border-color: #1f55d8;
  background: #eaf0ff;
  color: #1849bd;
  font-weight: 650;
}
.mobile-status {
  display: none;
  width: 100%;
  height: 48px;
  border: 1px solid #cfd5de;
  border-radius: 13px;
  background: #fff;
  padding: 0 12px;
}
.section {
  margin-bottom: 26px;
}
.section-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
}
.section-head h2 {
  font-size: 18px;
  margin: 0;
}
.count {
  min-width: 25px;
  height: 25px;
  padding: 0 7px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #e9ecf1;
  color: #536070;
  font-size: 12px;
}
.member-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 10px;
}
.member-head h3 {
  margin: 0;
  font-size: 16px;
}
.meeting-list {
  display: grid;
  gap: 12px;
}
.meeting {
  position: relative;
  background: #fff;
  border: 1px solid #e0e4e9;
  border-radius: 20px;
  padding: 18px;
  overflow: hidden;
}
.meeting.confirmed {
  border: 3px solid var(--green);
  padding: 16px;
}
.meeting.completed,
.meeting.review {
  background: var(--green-bg);
  border-color: #b9dcc4;
}
.meeting.rescheduled {
  background: var(--yellow);
  border-color: #eed99e;
}
.meeting.cancelled,
.meeting.no_show,
.meeting.unqualified {
  background: var(--red-bg);
  border-color: #efcac4;
}
.meeting-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.meeting-time {
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
}
.meeting-time small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 9px;
  border-radius: 999px;
  background: #eef1f4;
}
.status-dot {
  width: 7px;
  height: 7px;
  background: #7a8492;
  border-radius: 50%;
}
.status.confirmed {
  background: #e4f3e8;
  color: #267445;
}
.status.confirmed .status-dot {
  background: var(--green);
}
.status.completed {
  background: #d9eddf;
  color: #246d40;
}
.status.rescheduled {
  background: #ffe8a8;
  color: #75540c;
}
.status.cancelled,
.status.no_show,
.status.unqualified {
  background: #f6d8d3;
  color: #8d2f2f;
}
.meeting-title {
  margin: 13px 0 4px;
  font-size: 19px;
}
.meeting-title button {
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
  font-weight: 650;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: #cbd2db;
  text-underline-offset: 4px;
}
.meeting-school {
  font-size: 13px;
  color: var(--muted);
}
/* Card facts and people: label column, value column. */
.case-facts,
.meeting-owner {
  display: grid;
  gap: 6px;
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.4;
}
.case-facts > div,
.meeting-owner > div {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
}
.case-facts dt,
.meeting-owner dt {
  color: var(--muted);
}
.case-facts dd,
.meeting-owner dd {
  margin: 0;
  color: var(--ink);
  font-weight: 500;
  overflow-wrap: anywhere;
}
.meeting-owner {
  padding-top: 12px;
  border-top: 1px solid #2026301a;
}
.meeting-owner dd {
  font-weight: 650;
}
.new-time {
  display: flex;
  gap: 10px;
  align-items: center;
  background: #fff;
  border-radius: 15px;
  padding: 13px 14px;
  margin: 13px 0;
}
.new-time small,
.new-time strong {
  display: block;
}
.new-time small {
  color: #7b6221;
  font-size: 12px;
}
.review-flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffd87b;
  color: #584006;
  border-radius: 10px;
  padding: 7px 10px;
  margin: 8px 0;
  font-size: 12px;
  font-weight: 650;
}
.card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.card-actions .primary-action,
.card-actions .question-action {
  grid-column: 1/-1;
}
.button.question-action {
  background: var(--yellow);
  border-color: #eed99e;
  color: #75540c;
}
.button.question-action:hover {
  background: #ffe8a8;
}
.timeline-list {
  display: grid;
  gap: 12px;
}
.timeline-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.timeline-time {
  padding-top: 18px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #4c5664;
}
.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.date-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
/* Calendar day tabs only switch days on phones; wider screens show all three days as columns. */
.date-strip.cal-strip {
  display: none;
}
.date-tab {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 7px;
}
.date-tab small {
  display: block;
  color: var(--muted);
}
.date-tab.active {
  background: #eaf0ff;
  border-color: #7fa1ed;
  color: #1648bd;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.calendar-day {
  min-width: 0;
}
.calendar-day > h2 {
  font-size: 15px;
  margin: 0 0 9px;
}
.calendar-day .meeting {
  padding: 14px;
}
.calendar-day .meeting.confirmed {
  padding: 12px;
}
.calendar-day .meeting-title {
  font-size: 15px;
}
.calendar-day .case-facts,
.calendar-day .card-actions {
  display: none;
}
.podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  margin: 20px 0;
}
.podium-place {
  min-height: 184px;
  border: 1px solid #e1e4e9;
  border-radius: 20px;
  background: #fff;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.podium-place.first {
  min-height: 215px;
  border-color: #e4bc56;
  background: linear-gradient(#fffaf0, #fff);
}
.podium-place .avatar {
  width: 48px;
  height: 48px;
}
.medal {
  font-size: 12px;
  color: #7a5a17;
}
.podium-name {
  text-align: center;
  font-weight: 650;
}
.podium-value {
  font-size: 23px;
}
.my-rank {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  border: 4px solid var(--blue);
  border-radius: 19px;
  background: #fff;
  padding: 13px 16px;
  margin: 16px 0;
}
.my-rank strong:last-child {
  margin-left: auto;
  font-size: 22px;
}
.rank-list {
  display: grid;
  gap: 7px;
}
.rank-row {
  width: 100%;
  display: grid;
  grid-template-columns: 30px 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  text-align: left;
  border: 1px solid #e1e4e9;
  background: #fff;
  border-radius: 15px;
  padding: 10px 13px;
}
.rank-row.you {
  border: 2px solid var(--blue);
}
.rank-row small {
  display: block;
  color: var(--muted);
}
.rank-row-value {
  text-align: right;
  font-weight: 650;
}
.ranking-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ranking-controls select {
  height: 44px;
  border: 1px solid #cfd5de;
  border-radius: 12px;
  background: #fff;
  padding: 0 10px;
}
.totals {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 15px 0;
  color: var(--muted);
  font-size: 14px;
}
.winner {
  padding: 15px 18px;
  border-radius: 17px;
  background: #fff8e6;
  border: 1px solid #f0d38d;
  margin: 16px 0;
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.settings-grid .panel.wide {
  grid-column: 1/-1;
}
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.field {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 650;
  color: #4c5664;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cdd3dc;
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
  font-size: 16px;
  /* The label is bold; what is typed or chosen is regular text. */
  font-weight: 450;
  color: var(--ink);
}
/* One chevron for every select, clear of the border. */
.field select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%2364748b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  text-overflow: ellipsis;
  cursor: pointer;
}
.field select:disabled {
  background-color: #f5f7fa;
  background-image: none;
  color: #64748b;
  cursor: default;
  opacity: 1;
}
.field textarea {
  min-height: 125px;
  resize: vertical;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.form-stack {
  display: grid;
  gap: 14px;
}
.days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.day-toggle {
  min-height: 43px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 11px;
  padding: 4px;
}
.day-toggle.active {
  background: #e8efff;
  border-color: #6d91e8;
  color: #1649bf;
}
.save-state {
  min-height: 22px;
  color: var(--muted);
  font-size: 13px;
}
.save-state.error,
.form-error {
  color: #9d2828;
  background: #fcebea;
  border: 1px solid #efc9c5;
  padding: 9px 11px;
  border-radius: 10px;
}
.exception-row,
.break-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: end;
}
.exception-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 25, 35, 0.42);
  z-index: 80;
  display: flex;
  justify-content: flex-end;
}
.sheet {
  width: min(650px, 100%);
  height: 100%;
  overflow: auto;
  background: var(--canvas);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.14);
  animation: sheet-in 0.2s ease;
}
.sheet-top {
  position: sticky;
  top: 0;
  z-index: 3;
  min-height: 66px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(246, 247, 249, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid #e1e5ea;
}
.sheet-body {
  padding: 22px 22px 52px;
}
.sheet h1 {
  font-size: 28px;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 0 0 6px;
}
.sheet h2 {
  font-size: 18px;
}
.sheet-section {
  margin: 20px 0;
}
.details-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.meta-box {
  padding: 12px;
  border-radius: 13px;
  background: #fff;
  border: 1px solid #e2e5e9;
}
.meta-box small,
.meta-box strong {
  display: block;
}
.meta-box small {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 3px;
}
.expert-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 8px;
  align-items: center;
}
.expert-box small {
  grid-column: 1/-1;
}
/* Details sheet: the meeting as stages, then the current step's buttons. */
.stage-card {
  margin-top: 14px;
}
.stage-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  position: relative;
}
.stage-steps::before {
  content: "";
  position: absolute;
  left: calc(50% / var(--n));
  right: calc(50% / var(--n));
  top: 11px;
  height: 2px;
  background: var(--line);
}
.stage-steps li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #8a93a1;
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
}
.stage-steps i {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: #fff;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
}
.stage-steps svg {
  width: 13px;
  height: 13px;
  stroke-width: 3;
}
.stage-steps li.done {
  color: var(--ink);
}
.stage-steps li.done i {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.stage-steps li.cur {
  color: var(--blue);
}
.stage-steps li.cur i {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px #dfe7fc;
}
.stage-steps li.skip {
  color: #9a5b0b;
}
.stage-steps li.skip i {
  border-color: #e9a23b;
  background: var(--yellow);
}
@media (max-width: 480px) {
  .stage-steps li {
    font-size: 10.5px;
    hyphens: auto;
    overflow-wrap: anywhere;
  }
}
.stage-now {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.stage-now.mine {
  padding: 12px;
  border: 1px solid #d6e1f8;
  border-radius: 14px;
  background: #f4f7fe;
}
.stage-now .button {
  width: 100%;
  margin: 0;
}
.stage-row {
  display: grid;
  grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  gap: 8px;
}
.stage-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
}
.stage-banner b {
  font-weight: 650;
}
.stage-banner span {
  font-size: 13px;
  opacity: 0.85;
}
.stage-banner.ok {
  background: var(--green-bg);
  color: #24683c;
}
.stage-banner.bad {
  background: var(--red-bg);
  color: var(--red);
}
.stage-banner.warn {
  background: var(--yellow);
  color: #7a4a06;
}
.stage-banner.violet {
  background: #f1edfe;
  color: #6136c9;
}
.stage-banner .presence-undo {
  margin: 0 0 0 auto;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}
.stage-banner .presence-undo:hover {
  background: #fff;
}
.stage-wait {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px dashed #d3d9e2;
  border-radius: 12px;
  background: #f6f8fb;
  color: var(--muted);
  font-size: 14px;
}
.stage-wait svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.stage-more {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 16px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.stage-more > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #8a93a1;
  font-size: 12.5px;
  font-weight: 600;
}
.stage-more > span svg {
  width: 14px;
  height: 14px;
}
.button.link {
  min-height: 32px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: #3d4654;
  font-size: 13.5px;
  font-weight: 600;
}
.button.link:hover {
  background: none;
  color: var(--blue);
}
.button.link.danger-link {
  color: var(--red);
}
/* «Перенести без времени» и «Сменить эксперта» — крупнее остальных ссылок. */
.button.link.big-link {
  font-size: 16px;
}
.button.presence-absent {
  color: var(--red);
}
.card-actions .presence-joined:not(:has(+ .presence-absent)) {
  grid-column: 1/-1;
}
.contact-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.details-sheet .section-head {
  justify-content: space-between;
}
.presence-chip::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.presence-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.presence-chip::before {
  content: "";
  width: 7px;
  height: 7px;
}
.presence-chip.joined {
  background: var(--green-bg);
  color: #24683c;
}
.presence-chip.absent {
  background: var(--red-bg);
  color: var(--red);
}
.presence-undo {
  display: block;
  margin-top: 4px;
  padding: 2px 0;
  border: 0;
  background: none;
  color: #24683c;
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(36, 104, 60, 0.35);
  text-underline-offset: 3px;
  cursor: pointer;
}
.presence-undo:hover {
  text-decoration-color: currentColor;
}
.meeting-row .presence-chip {
  padding: 2px 8px;
  font-size: 11px;
  white-space: nowrap;
}
@media (max-width: 700px) {
  .meeting-row .presence-chip {
    white-space: normal;
  }
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: #e3e6ea;
  border: 1px solid #e3e6ea;
  border-radius: 14px;
  overflow: hidden;
}
.detail-item {
  padding: 11px 13px;
  background: #fff;
  min-width: 0;
}
.detail-item small,
.detail-item strong {
  display: block;
}
.detail-item small {
  color: var(--muted);
  font-size: 11px;
}
.detail-item strong {
  overflow-wrap: anywhere;
}
.meeting-summary-body {
  overflow-wrap: anywhere;
  background: #f2f4f7;
  padding: 4px 14px;
  border-radius: 13px;
  margin-bottom: 10px;
}
.meeting-summary-body h3 {
  font-size: 15px;
  margin: 12px 0 4px;
}
.meeting-summary-body p,
.meeting-summary-body ul,
.meeting-summary-body ol {
  margin: 6px 0 10px;
}
.meeting-summary-body ul,
.meeting-summary-body ol {
  padding-left: 20px;
}
.meeting-summary-body:has(.summary-block) {
  background: none;
  padding: 0;
}
.summary-block {
  background: #f2f4f7;
  padding: 4px 14px 2px;
  border-radius: 13px;
  margin-bottom: 10px;
}
.summary-block.summary-ai {
  background: #f4f0fd;
  border: 1px solid #e1d8f8;
}
.meeting-summary-body .summary-block-title {
  font-size: 16px;
  margin: 12px 0 6px;
}
.summary-block h3 + ul,
.summary-block h3 + p {
  margin-top: 2px;
}
.meeting-summary-body li.summary-tone {
  list-style: none;
  margin-left: -20px;
  padding: 7px 10px;
  border-radius: 9px;
  margin-bottom: 6px;
  background: #fff;
  border-left: 3px solid var(--line);
}
.summary-tone.ok { border-left-color: #36995b; }
.summary-tone.mid { border-left-color: #d7a52b; }
.summary-tone.low { border-left-color: #e07b2e; }
.summary-tone.bad { border-left-color: #c96257; background: #fdf3f1; }
.summary-tone.na { border-left-color: #b3bdcb; color: var(--muted); }
.raw-case {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f2f4f7;
  padding: 14px;
  border-radius: 13px;
}
.history {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
.history li {
  position: relative;
  padding-left: 20px;
}
.history li:before {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a0af;
}
.history small {
  display: block;
  color: var(--muted);
}
.flow-progress {
  display: flex;
  gap: 6px;
  margin: 0 0 18px;
}
.flow-progress span {
  height: 5px;
  flex: 1;
  border-radius: 5px;
  background: #dfe3e9;
}
.flow-progress span.done {
  background: var(--blue);
}
.candidate-list {
  display: grid;
  gap: 8px;
}
.candidate {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  border: 1px solid #d9dee6;
  background: #fff;
  border-radius: 14px;
  padding: 12px;
}
.candidate.selected {
  border: 2px solid var(--blue);
  padding: 11px;
  background: #f2f6ff;
}
.candidate-copy {
  flex: 1;
}
.candidate-copy strong,
.candidate-copy small {
  display: block;
}
.candidate-copy small {
  color: var(--muted);
}
.slots {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.slot {
  min-height: 44px;
  border: 1px solid #7293e3;
  color: #194bbd;
  border-radius: 11px;
  background: #fff;
}
.slot.selected {
  background: var(--blue);
  color: #fff;
}
.result-unavailable {
  padding: 16px;
  border-radius: 15px;
  background: #fff8e6;
  border: 1px solid #e8cc82;
}
.missing-list {
  margin: 7px 0 0;
  padding-left: 20px;
  color: #8f4f11;
}
.confirmation {
  padding: 18px;
  border-radius: 18px;
  background: #fff;
  border: 3px solid var(--green);
}
.success {
  padding: 28px;
  text-align: center;
  border-radius: 20px;
  background: var(--green-bg);
}
.success-mark {
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--green);
  font-size: 28px;
}
.state-box {
  padding: 28px;
  text-align: center;
  background: #fff;
  border: 1px solid #e2e6eb;
  border-radius: 20px;
}
.state-box h2 {
  margin: 5px 0;
}
.empty {
  padding: 28px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.6);
  border: 1px dashed #cfd5dd;
  border-radius: 18px;
}
.inline-error {
  color: #9b2929;
  margin-top: 9px;
}
.toast-region {
  position: fixed;
  z-index: 120;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100% - 36px));
}
.toast {
  padding: 13px 15px;
  border-radius: 13px;
  background: #202630;
  color: #fff;
  box-shadow: var(--shadow);
  animation: toast-in 0.18s ease;
}
.toast.error {
  background: #9f3030;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
@keyframes sheet-in {
  from {
    transform: translateX(22px);
    opacity: 0.7;
  }
}
.bottom-nav,
.more-menu,
.narrow-label {
  display: none;
}
.login-page {
  min-height: 100dvh;
}
.login-wrap {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 22px;
}
.login-card {
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid #e3e6eb;
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--shadow);
}
.login-card h1 {
  font-size: 30px;
  letter-spacing: -0.04em;
  margin: 30px 0 5px;
}
.login-admin {
  display: block;
  text-align: center;
  margin-top: 18px;
}
.login-card .fine-print {
  text-align: center;
}
@media (max-width: 760px), (max-width: 1000px) and (pointer: coarse) {
  .shell {
    display: block;
  }
  .sidebar {
    display: none;
  }
  .workspace {
    display: block;
  }
  .workspace-main {
    padding: max(18px, env(safe-area-inset-top)) 14px
      calc(108px + env(safe-area-inset-bottom));
  }
  .page-head {
    margin: 5px 0 18px;
  }
  .page-head h1 {
    font-size: 26px;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric:last-child {
    grid-column: 1/-1;
  }
  .mobile-status {
    display: block;
  }
  .filter-row .chip {
    display: none;
  }
  .filter-row .chip[data-qual-filter] {
    display: inline-flex;
  }
  .date-nav {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }
  .today-return {
    grid-column: 1/-1;
    width: 100%;
  }
  .summary-card {
    padding: 16px;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .settings-grid .panel.wide {
    grid-column: auto;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .days {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .details-meta,
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .sheet {
    width: 100%;
  }
  .sheet-body {
    padding: 18px 14px 45px;
  }
  .card-actions {
    grid-template-columns: 1fr;
  }
  .podium {
    gap: 6px;
  }
  .podium-place {
    min-height: 174px;
    padding: 10px 5px;
  }
  .podium-place.first {
    min-height: 200px;
  }
  .podium-name {
    font-size: 13px;
  }
  .podium-place .avatar {
    width: 42px;
    height: 42px;
  }
  .rank-row {
    grid-template-columns: 24px 36px minmax(0, 1fr) auto;
    padding: 9px;
  }
  .calendar-grid {
    display: block;
  }
  .date-strip.cal-strip {
    display: grid;
  }
  .calendar-day {
    display: none;
  }
  .calendar-day.active {
    display: block;
  }
  .calendar-day > h2 {
    display: none;
  }
  .calendar-day .meeting {
    padding: 16px;
  }
  .calendar-day .meeting.confirmed {
    padding: 14px;
  }
  .calendar-day .case-facts {
    display: grid;
  }
  .exception-row,
  .break-row {
    grid-template-columns: 1fr 1fr;
  }
  .exception-row .button,
  .break-row .button {
    grid-column: 1/-1;
  }
  .bottom-nav {
    position: fixed;
    z-index: 45;
    bottom: max(10px, env(safe-area-inset-bottom));
    min-height: 67px;
    padding: 7px;
    display: grid;
    grid-template-columns: repeat(var(--nav-count, 4), minmax(0, 1fr));
    width: min(560px, calc(100% - 20px));
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ffffffeb, #edf3ffb8);
    border: 1px solid #ffffffd9;
    border-radius: 28px;
    box-shadow:
      0 8px 32px #243d6029,
      inset 0 1px 0 #fff,
      0 0 0 1px #bac8dc80;
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);
  }
  .bottom-nav .nav-item {
    min-height: 52px;
    padding: 4px 2px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    justify-content: center;
    border-radius: 21px;
    text-align: center;
    font-size: 10px;
  }
  .bottom-nav .nav-item svg {
    width: 20px;
    height: 20px;
  }
  .wide-label {
    display: none;
  }
  .narrow-label {
    display: inline;
  }
  /* «+»: centred on the bar's top edge, half above it. */
  .nav-fab {
    align-self: start;
    justify-self: center;
    width: 58px;
    height: 58px;
    margin-top: -22px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    box-shadow:
      0 0 0 5px var(--canvas),
      0 10px 24px #285de55c;
    transition: transform 0.15s ease;
  }
  .nav-fab:active {
    transform: scale(0.94);
  }
  .nav-fab svg {
    width: 26px;
    height: 26px;
    stroke-width: 2.4;
  }
  /* «Остальное»: grows out of its icon above the tab bar. */
  .more-menu {
    position: fixed;
    z-index: 46;
    right: calc(50% - min(280px, 50% - 10px));
    bottom: calc(max(10px, env(safe-area-inset-bottom)) + 77px);
    min-width: 220px;
    padding: 6px;
    display: grid;
    gap: 2px;
    background: #fffffff2;
    border: 1px solid #ffffffd9;
    border-radius: 22px;
    box-shadow:
      0 12px 40px #243d6033,
      0 0 0 1px #bac8dc80;
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px) scale(0.9);
    transition:
      opacity 0.16s ease,
      transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1),
      visibility 0s linear 0.22s;
  }
  .more-menu.open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition:
      opacity 0.16s ease,
      transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .more-menu .nav-item {
    min-height: 48px;
    border-radius: 16px;
    font-size: 15px;
  }
  .more-menu .nav-badge {
    position: static;
    transform: none;
  }
  .nav-badge {
    position: absolute;
    transform: translate(15px, -12px);
    margin: 0;
  }
  .toast-region {
    bottom: 96px;
  }
  .login-card {
    padding: 25px 20px;
  }
  .login-card h1 {
    font-size: 27px;
  }
}
@media (max-width: 360px) {
  .workspace-main {
    padding-left: 10px;
    padding-right: 10px;
  }
  .meeting {
    padding: 15px;
  }
  .page-head {
    gap: 10px;
  }
  .button {
    padding-left: 11px;
    padding-right: 11px;
  }
  .podium-place {
    min-height: 160px;
  }
  .podium-place.first {
    min-height: 185px;
  }
  .metric {
    padding: 12px;
  }
  .sheet-body {
    padding-left: 10px;
    padding-right: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
.button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
.grouping-toggle {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin: -8px 0 16px;
}
.time-blocks {
  display: grid;
  gap: 16px;
}
.time-block {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.time-block > header {
  position: sticky;
  top: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding-top: 17px;
  font-variant-numeric: tabular-nums;
}
.time-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(330px, 100%), 1fr));
  gap: 12px;
}
@media (max-width: 760px) {
  .card-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .time-block {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .time-block > header {
    position: static;
    padding-top: 0;
  }
  .time-cards {
    grid-template-columns: 1fr;
  }
  .grouping-toggle {
    justify-content: stretch;
  }
  .grouping-toggle .chip {
    flex: 1;
  }
}
.meeting-link {
  margin-top: 8px;
}
/* Compact agenda: real table on desktop, stacked rows on narrow screens. */
.compact-today .page-head,
.compact-today .date-nav,
.compact-today .filter-row {
  margin-bottom: 14px;
}
.cc-overview {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}
.cc-overview > * {
  flex: 1;
  min-width: 0;
  margin: 0;
}
.cc-overview .summary-card,
.cc-overview .pending-reschedule-card {
  padding: 12px 16px;
  margin: 0;
  gap: 10px;
  border-radius: 14px;
  font-size: 13px;
}
.cc-overview .summary-card strong,
.cc-overview .pending-reschedule-card b {
  font-size: 26px;
}
.cc-overview .summary-icon,
.cc-overview .pending-card-icon,
.cc-overview .pending-reschedule-card small {
  display: none;
}
.cc-overview:has(.metrics) {
  flex-direction: column;
}
.compact-today .personal-stats {
  margin-bottom: 14px;
}
.compact-today .personal-stats > summary {
  padding: 10px 14px;
  font-size: 13px;
}
.compact-today .collection-tabs {
  margin-bottom: 14px;
}
.cc-view-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.cc-view-toolbar .grouping-toggle {
  margin: 0;
}
.cc-view-toolbar .chip {
  font-size: 12px;
  min-height: 38px;
}
.view-toggle {
  display: inline-flex;
  background: #e9edf3;
  border: 1px solid #dce1e9;
  border-radius: 12px;
  padding: 3px;
}
.view-toggle button {
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  padding: 5px 15px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}
.view-toggle button[aria-pressed="true"] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 4px #23334a1a;
}
.meeting-table-wrap {
  border: 1px solid #dce1e8;
  border-radius: 16px;
  background: #fff;
}
.meeting-table {
  width: 100%;
  table-layout: fixed;
  border-spacing: 0;
  font-size: 13px;
}
.meeting-table .col-time {
  width: 76px;
}
.meeting-table .col-expert {
  width: 15%;
}
.meeting-table .col-status {
  width: 164px;
}
.meeting-table .col-actions {
  width: 272px;
}
.meeting-table thead th {
  position: sticky;
  top: 0;
  z-index: 12;
  padding: 12px 10px;
  background: #edf1f6;
  border-bottom: 1px solid #dce1e8;
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  color: #5b6677;
  font-weight: 650;
}
.meeting-table thead th:first-child {
  border-top-left-radius: 15px;
}
.meeting-table thead th:last-child {
  border-top-right-radius: 15px;
}
.manager-section .meeting-table thead th {
  top: 82px;
}
.meeting-table .meeting-row {
  --row-accent: #b3bdcb;
  --row-background: #fff;
  border: 0;
  border-radius: 0;
  padding: 0;
  overflow: visible;
  background: var(--row-background);
}
.meeting-table .meeting-row.confirmed {
  --row-accent: #36995b;
  --row-background: #f8fcf9;
}
.meeting-table .meeting-row.completed,
.meeting-table .meeting-row.review {
  --row-accent: #36995b;
  --row-background: #eaf5ed;
}
.meeting-table .meeting-row.rescheduled {
  --row-accent: #d7a52b;
  --row-background: #fff5db;
}
.meeting-table .meeting-row.cancelled,
.meeting-table .meeting-row.no_show,
.meeting-table .meeting-row.unqualified {
  --row-accent: #c96257;
  --row-background: #fceeea;
}
.meeting-row > td {
  padding: 12px 10px;
  border-bottom: 1px solid #dfe5e9;
  vertical-align: middle;
  overflow-wrap: anywhere;
}
.meeting-row > td:first-child {
  box-shadow: inset 3px 0 var(--row-accent);
  padding-left: 14px;
}
.meeting-row.confirmed > td {
  border-top: 1px solid #83bb95;
  border-bottom: 1px solid #83bb95;
}
.meeting-row.confirmed > td:first-child {
  box-shadow: inset 4px 0 var(--row-accent);
}
.meeting-row.confirmed > td:last-child {
  box-shadow: inset -2px 0 var(--row-accent);
}
.meeting-row:hover > td,
.meeting-row:focus-within > td {
  background-image: linear-gradient(#25457606, #25457606);
}
.meeting-table tbody:last-child > tr:last-child > td {
  border-bottom: 0;
}
.row-time time {
  display: block;
  white-space: nowrap;
  font-size: 17px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.row-time small {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.meeting-row .meeting-title {
  font-size: 14px;
  margin: 0 0 4px;
  line-height: 1.35;
}
.meeting-row .meeting-title button {
  min-height: 28px;
  text-decoration: none;
  font-weight: 650;
}
.meeting-row .meeting-title button:hover {
  text-decoration: underline;
}
.meeting-row .meeting-school {
  font-size: 11px;
}
.row-expert {
  font-weight: 550;
}
.row-mobile-label {
  display: none;
}
.meeting-row .status {
  padding: 5px 8px;
  font-size: 11px;
  max-width: 100%;
}
.meeting-row .status-dot {
  flex-shrink: 0;
  background: var(--row-accent);
}
.meeting-row .card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
}
.meeting-row .button {
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 11px;
}
.meeting-row .card-actions .primary {
  background: #edf3ff;
  border-color: #aac2f6;
  color: #1e50c2;
}
.meeting-row .card-actions .primary:hover {
  background: #dfebff;
}
.meeting-row .row-open {
  display: block;
  width: 18px;
  height: 18px;
  color: var(--muted);
}
.meeting-row .new-time {
  margin: 5px 0 0;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 11px;
}
.meeting-row .new-time small {
  font-size: 10px;
}
.row-review {
  display: block;
  margin-top: 5px;
  color: #775307;
  font-size: 11px;
  font-weight: 650;
}
.table-group th {
  padding: 9px 14px;
  background: #f0f3f7;
  text-align: left;
  font-size: 12px;
}
.table-group .count {
  display: inline-grid;
  margin-left: 7px;
  width: auto;
  height: 21px;
}
@media (min-width: 1001px) and (max-width: 1180px) {
  .meeting-table .col-actions {
    width: 100px;
  }
  .meeting-table .col-status {
    width: 150px;
  }
  .meeting-row .card-actions {
    flex-direction: column;
  }
  .meeting-row .button {
    min-height: 28px;
    padding: 4px 6px;
  }
}
@media (max-width: 1000px) {
  .compact-today .date-nav {
    grid-template-columns: 36px minmax(0, 1fr) 36px auto;
    gap: 5px;
  }
  .compact-today .date-nav .icon-button {
    width: 36px;
    min-width: 36px;
  }
  .compact-today .date-control {
    font-size: 12px;
  }
  .compact-today .today-return {
    grid-column: auto;
    padding: 0 8px;
    font-size: 12px;
  }
  .cc-overview {
    gap: 8px;
  }
  .cc-overview .summary-card,
  .cc-overview .pending-reschedule-card {
    padding: 10px;
    font-size: 11px;
    gap: 7px;
  }
  .cc-overview .pending-reschedule-card > svg {
    display: none;
  }
  .cc-overview .summary-card {
    grid-template-columns: auto 1fr;
  }
  .cc-overview .summary-card strong,
  .cc-overview .pending-reschedule-card b {
    font-size: 23px;
  }
  .cc-view-toolbar {
    gap: 8px;
  }
  .view-toggle button {
    padding: 5px 10px;
    min-height: 38px;
    font-size: 12px;
  }
  .cc-view-toolbar .chip {
    padding: 7px 9px;
    min-height: 44px;
    font-size: 11px;
  }
  .cc-view-toolbar .grouping-toggle {
    gap: 5px;
  }
  .meeting-table,
  .meeting-table tbody {
    display: block;
  }
  .meeting-table thead,
  .meeting-table colgroup {
    display: none;
  }
  .meeting-table .meeting-row {
    display: grid;
    grid-template-columns: min-content minmax(0, 1fr) minmax(100px, 34%);
    grid-template-areas: "time client status" "time expert status" "actions actions actions";
    column-gap: 10px;
    padding: 12px 10px 10px;
    border-bottom: 1px solid #dce1e8;
    box-shadow: inset 3px 0 var(--row-accent);
  }
  .meeting-table .meeting-row:first-child {
    border-radius: 15px 15px 0 0;
  }
  .meeting-table .meeting-row:last-child {
    border-radius: 0 0 15px 15px;
  }
  .meeting-table .meeting-row.confirmed {
    box-shadow:
      inset 4px 0 var(--row-accent),
      inset 0 1px #83bb95,
      inset 0 -1px #83bb95;
  }
  .meeting-table .meeting-row > td {
    padding: 0;
    border: 0;
    box-shadow: none;
    min-width: 0;
  }
  .row-time {
    grid-area: time;
  }
  .row-client {
    grid-area: client;
  }
  .row-expert {
    grid-area: expert;
    margin-top: 5px;
    font-size: 11px;
    color: #4f5d6e;
  }
  .row-mobile-label {
    display: inline;
    font-weight: 400;
  }
  .row-status {
    grid-area: status;
    justify-self: stretch;
  }
  .row-actions {
    grid-area: actions;
    margin-top: 10px;
  }
  .meeting-row .status {
    font-size: 10px;
    padding: 5px 6px;
    gap: 4px;
  }
  .meeting-row .status-dot {
    width: 5px;
    height: 5px;
  }
  .meeting-row .meeting-title {
    font-size: 13px;
  }
  .meeting-row .meeting-title button {
    min-height: 24px;
  }
  .meeting-row .card-actions {
    display: flex;
    gap: 6px;
  }
  .meeting-row .card-actions .button {
    flex: 1 1 auto;
    overflow-wrap: normal;
    hyphens: none;
  }
  .meeting-row .button {
    min-height: 40px;
    font-size: 11px;
  }
  .meeting-row .row-open {
    display: none;
  }
  .meeting-row .row-actions:has(.row-open) {
    display: none;
  }
  .table-now,
  .table-now td,
  .table-group,
  .table-group th {
    display: block;
  }
  .table-now td {
    padding: 0 10px;
  }
}
.date-control {
  position: relative;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid #cfd5de;
  border-radius: 12px;
  background: #fff;
  font-weight: 650;
  overflow: hidden;
}
.date-control .date-picker {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.field-label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 650;
  color: #4c5664;
}
.check-row {
  display: flex;
  gap: 9px;
  align-items: center;
  min-height: 44px;
}
.check-row input {
  width: 20px;
  height: 20px;
}
.review-reason {
  padding: 13px 15px;
  margin: 13px 0;
  background: #fff8e6;
  border: 1px solid #efd28b;
  border-radius: 13px;
}
.personal-stats {
  padding: 0;
  margin-bottom: 18px;
  overflow: hidden;
}
.personal-stats > summary {
  min-height: 52px;
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 650;
}
.personal-stats-body {
  padding: 0 14px 14px;
}
.personal-period {
  max-width: 220px;
  margin: 0 0 12px;
}
.personal-period select {
  height: 44px;
  border: 1px solid #cfd5de;
  border-radius: 12px;
  background: #fff;
  padding: 0 36px 0 12px;
  font: inherit;
}
.personal-stats .metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 0;
}
.personal-stats .metric {
  grid-column: auto;
  min-height: 82px;
}
.personal-stats .metric.pending {
  background: var(--yellow);
  border-color: #e6c56b;
}

/* Booking calendar and stable dialogs */
.booking-sheet {
  width: min(880px, 100%);
}
.booking-sheet .sheet-body {
  padding: 26px 30px 40px;
}
.booking-options {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 14px;
  margin: 16px 0 8px;
}
.booking-picker {
  background: white;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
}
/* Only the bookable days: 3, 5 for a team lead's move, one more from 21:00. */
.booking-days {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 20px 22px;
}
.booking-days.week {
  gap: 8px;
}
.booking-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Top-aligned so dates line up when only some cards carry a weekday. */
  justify-content: flex-start;
  gap: 3px;
  min-width: 0;
  min-height: 66px;
  padding: 10px 6px;
  border: 1px solid #c9d6ef;
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}
.booking-day span {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: capitalize;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.booking-day strong {
  font-size: 17px;
  font-weight: 600;
  color: #2155cc;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.booking-day small {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.booking-day:not(:disabled):hover {
  border-color: var(--blue);
}
.booking-day.selected {
  background: var(--blue);
  border-color: var(--blue);
  box-shadow: 0 4px 12px #285de529;
}
.booking-day.selected span,
.booking-day.selected strong,
.booking-day.selected small {
  color: white;
}
.booking-day:disabled {
  background: #f3f4f6;
  border-color: transparent;
  opacity: 1;
  cursor: not-allowed;
}
.booking-day:disabled span,
.booking-day:disabled strong,
.booking-day:disabled small {
  color: #a0a6b0;
}
.days-status {
  display: block;
  padding: 0 22px 14px;
}
.calendar-zone {
  margin-left: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.booking-times {
  padding: 24px;
  border-top: 1px solid var(--line);
  min-height: 250px;
}
.booking-times h2 {
  margin: 0 0 14px;
  font-size: 18px;
}
.booking-times .slots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: 310px;
  overflow-y: auto;
  padding: 4px 3px;
}
.booking-times .slot {
  min-height: 46px;
  border-radius: 12px;
  width: 100%;
  font-weight: 600;
  color: var(--blue);
  border: 1px solid #bdcdec;
  background: #fff;
}
.booking-times .slot.selected {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}
.time-skeleton {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}
.booking-extras {
  font-size: 13px;
  color: var(--muted);
}
.booking-extras summary {
  cursor: pointer;
  padding: 8px 0;
}
.booking-extras[open] {
  display: grid;
  gap: 10px;
}
.booking-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
}
.booking-next span {
  font-size: 14px;
}
.hold-clock {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}
.hold-clock i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}
.hold-clock b {
  font-variant-numeric: tabular-nums;
  padding: 5px 10px;
  background: #e5f3e9;
  border-radius: 8px;
  color: #246b3e;
}
.hold-clock.expiring b {
  background: #fff0ca;
  color: #946700;
}
.pending-reschedule-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  border: 1px solid #e7d091;
  background: #fff1c9;
  border-radius: 18px;
  padding: 18px 20px;
  margin: 16px 0;
}
.pending-reschedule-card svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.pending-reschedule-card span:nth-child(2) {
  flex: 1;
}
.pending-reschedule-card strong,
.pending-reschedule-card small {
  display: block;
}
.pending-reschedule-card small {
  color: #856b2a;
  font-size: 12px;
  margin-top: 3px;
}
.pending-reschedule-card b {
  font-size: 30px;
  font-variant-numeric: tabular-nums;
}
.pending-card-icon {
  display: grid;
  place-items: center;
  background: #fff9e6;
  border-radius: 12px;
  width: 42px;
  height: 42px;
  color: #a87912;
}
.manager-contents {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin: 20px 0 28px;
}
.manager-contents button {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  text-align: left;
}
.manager-contents button > span:nth-child(2) {
  flex: 1;
  font-size: 13px;
  font-weight: 650;
}
.manager-contents b {
  background: #edf2fb;
  color: var(--blue);
  border-radius: 9px;
  padding: 5px 10px;
}
.manager-section {
  position: relative;
  margin: 0 0 32px;
  scroll-margin-top: 20px;
}
.manager-sticky {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  background: #edf1f8f5;
  backdrop-filter: blur(16px);
  border: 1px solid #d5ddea;
  border-radius: 14px;
  margin-bottom: 18px;
  box-shadow: 0 4px 10px #22334408;
}
.manager-sticky h2 {
  font-size: 18px;
  margin: 0;
}
.manager-sticky small {
  font-size: 12px;
  color: var(--muted);
}
.manager-sticky > a {
  margin-left: auto;
  font-size: 12px;
}
.calendar-totals {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  margin: 0 0 16px;
  display: flex;
  gap: 16px;
  align-items: center;
}
.calendar-totals > strong {
  font-size: 28px;
  line-height: 1;
}
.calendar-totals > strong small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 5px;
}
.day-formats {
  order: 3;
  margin-left: auto;
  display: grid;
  gap: 4px;
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.day-formats b {
  color: var(--ink);
  font-weight: 600;
}
.day-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.day-count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  font-size: 13px;
}
.day-count small {
  display: none;
}
.day-count i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9aa3ae;
}
.day-count.confirmed i {
  background: #4380e8;
}
.day-count.rescheduled i {
  background: #e1b341;
}
.day-count.cancelled i {
  background: #d46760;
}
.day-count.conducted i {
  background: #54a777;
}
.date-tab-total {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  margin-left: 8px;
  background: #e9edf5;
  border-radius: 9px;
  min-width: 23px;
  padding: 2px 5px;
}
.date-tab.active .date-tab-total {
  background: #ffffff30;
}
.history-search {
  max-width: 520px;
  margin-bottom: 20px;
}
.history-search input {
  background: white;
  min-height: 48px;
}
.history-feed {
  display: grid;
  gap: 10px;
}
.collection-tabs {
  display: flex;
  gap: 4px;
  padding: 5px;
  margin: 0 0 22px;
  background: #e9edf2;
  border-radius: 16px;
  width: fit-content;
  max-width: 100%;
}
.collection-tabs button {
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #596576;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.collection-tabs button.active {
  background: white;
  color: #162234;
  box-shadow: 0 2px 8px #1622340d;
}
.collection-tabs button span {
  font-size: 12px;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 8px;
  background: #dce3eb;
}
.legacy-feed {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}
.legacy-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 18px;
  width: 100%;
  text-align: left;
  padding: 20px;
  border: 1px solid #e0e5eb;
  border-radius: 18px;
  background: white;
  color: #243247;
  font: inherit;
  cursor: pointer;
}
.legacy-item:hover {
  border-color: #96a8c0;
}
.legacy-date,
.legacy-copy {
  display: grid;
  gap: 5px;
  overflow-wrap: anywhere;
}
.legacy-date {
  font-weight: 600;
}
.legacy-copy strong {
  font-size: 17px;
}
.legacy-copy small,
.legacy-date small {
  color: #667486;
  font-weight: 400;
}
.legacy-status {
  width: fit-content;
  margin-top: 4px;
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 12px;
  background: #edf0f5;
}
.legacy-item > svg {
  width: 18px;
  height: 18px;
}
.slot-error {
  padding: 12px;
  background: #fff1ef;
  border-radius: 12px;
}
.slots-context {
  font-size: 13px;
  color: #596576;
  margin: 8px 0 12px;
}
.slots-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.slots-toolbar button {
  min-height: 36px;
  padding: 6px 10px;
  font-size: 12px;
}
@media (max-width: 600px) {
  .collection-tabs {
    width: 100%;
  }
  .collection-tabs button {
    flex: 1;
    padding: 10px 8px;
    font-size: 13px;
  }
  .legacy-item {
    grid-template-columns: minmax(0, 1fr) 18px;
    padding: 16px;
    gap: 10px;
  }
  .legacy-date {
    grid-column: 1 / -1;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
  }
  .legacy-copy {
    grid-column: 1;
    font-size: 14px;
  }
}
.history-item {
  display: flex;
  gap: 14px;
  align-items: center;
  text-align: left;
  width: 100%;
  background: white;
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 18px;
}
.history-item > svg {
  width: 17px;
  height: 17px;
  color: var(--muted);
  flex-shrink: 0;
}
.history-copy {
  display: grid;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.history-copy > span {
  font-size: 13px;
}
.history-copy small {
  font-size: 12px;
  color: var(--muted);
}
.history-item time {
  font-size: 12px;
  color: var(--muted);
  max-width: 95px;
  text-align: right;
}
.history-marker {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #eef2f8;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.history-marker svg {
  width: 20px;
  height: 20px;
}
.history-item.cancelled .history-marker {
  background: var(--red-bg);
  color: var(--red);
}
.history-item.rescheduled .history-marker {
  background: var(--yellow);
  color: #a87912;
}
.history-item.completed .history-marker {
  background: var(--green-bg);
  color: var(--green);
}
@media (max-width: 700px) {
  .booking-sheet .sheet-body {
    padding: 18px 16px 32px;
  }
  .booking-sheet h1 {
    font-size: 25px;
  }
  .booking-options {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .booking-options > label:first-child {
    grid-column: 1/-1;
  }
  .booking-days {
    gap: 8px;
    padding: 16px;
  }
  /* Five or more days do not fit a phone row: scroll them sideways instead. */
  .booking-days.week {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .booking-days.week::-webkit-scrollbar {
    display: none;
  }
  .booking-days.week .booking-day {
    flex: 0 0 92px;
    scroll-snap-align: start;
  }
  .booking-day {
    min-height: 60px;
    padding: 10px 4px;
  }
  /* «Послезавтра» must fit a third of a 360px phone. */
  .booking-day span {
    font-size: 12px;
  }
  .booking-times {
    padding: 18px;
    min-height: 100px;
  }
  .booking-times .slots {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: 185px;
  }
  .booking-next {
    align-items: stretch;
    flex-direction: column;
    position: sticky;
    bottom: 0;
    background: var(--canvas);
    padding: 14px 0 6px;
    z-index: 2;
  }
  .booking-next > span {
    font-size: 13px;
  }
  .booking-next .button {
    width: 100%;
  }
  .manager-contents {
    grid-template-columns: 1fr 1fr;
  }
  .manager-contents .avatar {
    display: none;
  }
  .manager-sticky {
    top: 0;
    padding: 12px;
  }
  .manager-sticky h2 {
    font-size: 16px;
  }
  .manager-sticky > a {
    font-size: 11px;
  }
  .history-item {
    padding: 14px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .history-copy {
    flex-basis: calc(100% - 70px);
  }
  .history-item time {
    margin-left: 50px;
    max-width: none;
    text-align: left;
  }
  .history-item > svg {
    margin-left: auto;
  }
  .bottom-nav .nav-item {
    flex: 1 0 51px;
    min-width: 51px;
  }
  .bottom-nav .nav-item span {
    font-size: 9px;
  }
  .calendar-totals {
    padding: 14px;
  }
}
.settings-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
}
/* «Моя команда»: очередь специалистов и список сотрудников. */
.team-section + .team-section {
  margin-top: 26px;
}
.team-section > header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.team-section h2 {
  margin: 0;
  font-size: 17px;
}
.tg-missing {
  padding: 3px 10px;
  border-radius: 999px;
  background: #fff1d1;
  color: #8a5f08;
  font-size: 12.5px;
  font-weight: 650;
}
.team-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.team-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(200px, 320px) auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 10px 14px;
  border-top: 1px solid #edf0f4;
  background: #fff;
  cursor: pointer;
  transition: background 0.15s ease;
}
.team-row.sortable {
  grid-template-columns: auto 22px auto minmax(0, 1fr) minmax(200px, 320px) auto;
}
.team-row:first-child {
  border-top: 0;
  border-radius: var(--radius) var(--radius) 0 0;
}
.team-row:last-child {
  border-radius: 0 0 var(--radius) var(--radius);
}
.team-row:only-child {
  border-radius: var(--radius);
}
.team-row:hover {
  background: #f8f9fb;
}
.team-row.paused .avatar,
.team-row.paused .team-row-main,
.team-row.off .avatar,
.team-row.off .team-row-main {
  opacity: 0.55;
}
.team-row.dragging {
  position: relative;
  z-index: 1;
  background: #fff;
  box-shadow: 0 10px 30px rgba(28, 39, 59, 0.16);
  cursor: grabbing;
}
.team-row-main {
  display: grid;
  min-width: 0;
}
.team-row-main strong {
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.team-row-main small {
  color: var(--muted);
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.drag-handle {
  display: grid;
  place-items: center;
  width: 28px;
  height: 36px;
  margin: 0 -6px 0 -4px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: #9aa3b2;
  cursor: grab;
  touch-action: none;
}
.drag-handle svg {
  width: 18px;
  fill: currentColor;
}
.drag-handle:hover,
.drag-handle:focus-visible {
  background: #eef1f5;
  color: var(--ink);
}
.queue-no {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.team-row-tg {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.tg-input {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  height: 38px;
  padding: 0 4px 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  cursor: text;
}
.tg-input.missing {
  border-color: #e9c46a;
  background: #fffaf0;
}
.tg-input:focus-within {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(40, 93, 229, 0.12);
}
.tg-input input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 6px 0 2px;
  border: 0;
  outline: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}
.tg-linked {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #287644;
  font-size: 14px;
  font-weight: 550;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tg-linked svg {
  flex: none;
  width: 16px;
}
.tg-none {
  color: #9aa3b2;
  font-size: 13px;
}
.team-chip {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
.team-chip.paused {
  background: #fff1d1;
  color: #8a5f08;
}
.team-chip.off {
  background: #f1f2f5;
  color: #6e7682;
}
.row-menu {
  position: relative;
  grid-row: 1;
  grid-column: -2;
}
.row-menu > summary {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--muted);
  list-style: none;
  cursor: pointer;
}
.row-menu > summary::-webkit-details-marker {
  display: none;
}
.row-menu > summary svg {
  width: 18px;
  fill: currentColor;
}
.row-menu > summary:hover,
.row-menu[open] > summary {
  background: #eef1f5;
  color: var(--ink);
}
.row-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  display: grid;
  min-width: 200px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}
.row-menu-list button {
  padding: 9px 12px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.row-menu-list button:hover {
  background: #f3f5f8;
}
.row-menu-list button.danger {
  color: var(--red);
}
.paused-group {
  margin-top: 26px;
}
.paused-group > summary {
  width: fit-content;
  margin-bottom: 12px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-weight: 650;
  cursor: pointer;
}
.paused-group[open] > summary {
  color: var(--ink);
}
@media (max-width: 700px) {
  .team-row,
  .team-row.sortable {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px 10px;
    padding: 10px 12px;
  }
  .team-row.sortable {
    grid-template-columns: auto 18px auto minmax(0, 1fr) auto;
  }
  .team-row-tg {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .team-row.sortable .team-row-tg {
    grid-column: 3 / -1;
  }
}
.booking-options {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 12px 0 4px;
}
/* With the foreign-specialist switch. */
.booking-options.five {
  grid-template-columns: 1.1fr repeat(3, minmax(0, 1fr)) 1.1fr;
}
@media (max-width: 940px) {
  .booking-options.five {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.booking-options > label {
  max-width: 420px;
}
@media (max-width: 700px) {
  .booking-options,
  .booking-options.five {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .booking-options > label:first-child {
    grid-column: auto;
  }
  .booking-options > label {
    max-width: none;
  }
  .booking-times {
    padding: 16px;
  }
  .booking-times h2 {
    margin-bottom: 8px;
  }
  .booking-next {
    padding-top: 10px;
  }
  .booking-sheet .sheet-body {
    padding-top: 14px;
  }
}
.booking-times .slots > .empty {
  grid-column: 1 / -1;
  line-height: 1.6;
}
.booking-times .slots {
  scrollbar-width: thin;
  scrollbar-color: #b8c7e2 #edf2fa;
}
.booking-times .slots::-webkit-scrollbar {
  width: 5px;
}
.booking-times .slots::-webkit-scrollbar-thumb {
  background: #b8c7e2;
  border-radius: 8px;
}
@media (min-width: 701px) {
  .booking-times .slots {
    max-height: 400px;
  }
}
.booking-summary {
  display: grid;
  gap: 0;
  background: white;
  border: 1px solid #dfe3e9;
  border-radius: 18px;
  padding: 6px 20px;
  margin: 20px 0;
}
.booking-summary > div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid #edf0f5;
}
.booking-summary > div:last-child {
  border: 0;
}
.booking-summary dt {
  font-size: 14px;
  color: #657083;
}
.booking-summary dd {
  margin: 0;
  font-weight: 600;
}
@media (max-width: 600px) {
  .booking-summary > div {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .booking-summary {
    padding: 6px 16px;
  }
}

.specialist-table .card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}
.specialist-table .card-actions .primary-action {
  grid-column: 1 / -1;
}
.specialist-table .card-actions .button {
  white-space: normal;
}
.row-meet-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #2457c6;
  font-size: 11px;
  margin-top: 6px;
  text-decoration: none;
}
.row-meet-link svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
html {
  scrollbar-gutter: stable;
}
body:has(.sheet-backdrop) {
  overflow: hidden;
}
.sheet {
  overscroll-behavior: contain;
}
@media (min-width: 1001px) and (max-width: 1180px) {
  .specialist-table .col-actions {
    width: 185px;
  }
}
@media (max-width: 760px), (max-width: 1000px) and (pointer: coarse) {
  .field input,
  .field select,
  .field textarea {
    font-size: 16px;
  }
  .bottom-nav .nav-item {
    transition:
      background 0.15s ease,
      transform 0.15s ease;
  }
  .bottom-nav .nav-item:active {
    transform: scale(0.95);
  }
  .bottom-nav .nav-item.active {
    background: #e1ebffcc;
    box-shadow: inset 0 1px 0 #ffffffc2;
  }
  .sheet-top {
    padding-top: max(14px, env(safe-area-inset-top));
  }
  .row-meet-link {
    min-height: 28px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .bottom-nav .nav-item,
  .nav-fab,
  .more-menu,
  .more-menu.open {
    transition: none;
  }
}

/* Daily metrics, team overview and an undated reschedule inbox. */
.cc-overview {
  display: grid;
  gap: 12px;
}
.daily-summary {
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) 3fr;
  gap: 12px;
}
.day-hero {
  position: relative;
  text-align: left;
  display: grid;
  gap: 7px;
  padding: 22px;
  border: 1px solid #c9d9fa;
  border-radius: 18px;
  color: #17365d;
  background: linear-gradient(125deg, #e9f1ff, #f6f9ff);
}
.day-hero > span:first-child {
  font-weight: 650;
  font-size: 14px;
}
.day-hero > strong {
  font-size: 42px;
  line-height: 1;
  letter-spacing: -1.5px;
}
.day-hero > small {
  font-size: 12px;
  color: #566d88;
}
.hero-arrow {
  position: absolute;
  right: 18px;
  top: 20px;
}
.day-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.day-metric {
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 12px;
  border: 1px solid #e0e5ec;
  border-radius: 16px;
  background: #fff;
  min-width: 0;
}
.day-metric > span {
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.day-metric > strong {
  font-size: 28px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.day-metric i {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 5px;
  background: #8c97a5;
}
.day-metric.confirmed {
  border-color: #b6ddca;
}
.day-metric.confirmed i {
  background: #1b9560;
}
.day-metric.rescheduled {
  background: #fff9e9;
  border-color: #eee0b3;
}
.day-metric.rescheduled i {
  background: #c28c19;
}
.day-metric.cancelled {
  background: #fff2f1;
  border-color: #f1d3d0;
}
.day-metric.cancelled i {
  background: #cc6056;
}
.day-metric.completed {
  background: #eaf6ee;
  border-color: #cae4d3;
}
.day-metric.completed i {
  background: #318c58;
}
.day-metric[aria-pressed="true"],
.day-hero[aria-pressed="true"] {
  outline: 2px solid #416fbe;
  outline-offset: 2px;
}
.cc-overview .pending-reschedule-card {
  width: 100%;
  min-height: 64px;
  margin: 0;
  padding: 12px 16px;
}
.team-overview {
  margin: 20px 0 26px;
}
.team-overview .section-head {
  margin-bottom: 10px;
}
.overview-scroll.manager-contents {
  display: block;
  overflow-x: auto;
  border: 1px solid #dce3ec;
  border-radius: 16px;
  background: white;
  margin: 0;
}
.overview-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.overview-table th,
.overview-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #edf0f4;
  text-align: center;
}
.overview-table thead th {
  font-size: 11px;
  font-weight: 550;
  color: #687485;
  height: 48px;
  background: #f8fafc;
}
.overview-table th:first-child {
  text-align: left;
  min-width: 190px;
}
.overview-table tbody th {
  font-weight: 550;
}
.overview-table .avatar {
  width: 28px;
  height: 28px;
  font-size: 11px;
  flex-shrink: 0;
}
.overview-table button {
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 5px;
  border-radius: 7px;
  min-width: 32px;
  min-height: 32px;
  color: inherit;
}
.overview-table th button {
  justify-content: flex-start;
  width: 100%;
  text-align: left;
}
.overview-table td.expected {
  font-weight: 650;
  color: #28518d;
  background: #f3f7fe;
}
.overview-table td.confirmed {
  color: #238555;
}
.overview-table td.rescheduled {
  color: #a77b16;
}
.overview-table td.cancelled {
  color: #bb514b;
}
.overview-table td.completed {
  color: #238555;
}
.overview-table button:hover {
  background: #e8effb;
}
.overview-table tfoot {
  font-weight: 650;
  background: #f4f7fb;
}
.overview-table tfoot th,
.overview-table tfoot td {
  border-bottom: 0;
}
.overview-table td:nth-child(3),
.overview-table th:nth-child(3) {
  max-width: 110px;
}
.table-period th {
  text-align: left;
  padding: 12px 16px;
  font-size: 12px;
  color: #67778b;
  background: #f2f5f9;
  letter-spacing: 0.02em;
}
.table-period.upcoming th {
  color: #315b86;
  background: #edf4fd;
}
.table-period span,
.period-heading span {
  margin-left: 8px;
  font-weight: 500;
  opacity: 0.7;
}
.period-heading {
  font-size: 13px;
  margin: 16px 0 10px;
  color: #66768b;
}
.upcoming .period-heading {
  color: #315b86;
}
.time-period .time-block {
  margin-bottom: 12px;
}
.queue-total {
  font-size: 22px;
  color: #a67a19;
}
.queue-members {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}
.queue-members button {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #e4dcc7;
  background: #fffbef;
  border-radius: 10px;
  padding: 10px 14px;
  text-align: left;
}
.queue-members b {
  font-size: 13px;
  color: #906713;
}
.queue-group {
  scroll-margin-top: 75px;
  margin: 24px 0;
}
.queue-group h2 {
  display: flex;
  gap: 12px;
  font-size: 17px;
  position: sticky;
  top: 62px;
  background: #fff;
  padding: 12px 0;
  z-index: 2;
}
.queue-group h2 span {
  font-weight: 500;
  color: #948164;
}
.pending-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.pending-table th {
  text-align: left;
  font-weight: 500;
  color: #758093;
  font-size: 11px;
  padding: 10px 8px;
}
.pending-table td {
  padding: 14px 8px;
  border-top: 1px solid #e8eaf0;
  vertical-align: middle;
}
.pending-table td small {
  display: block;
  color: #7a8492;
  font-size: 12px;
  margin-top: 5px;
}
.pending-table .text-link {
  border: 0;
  background: none;
  font-weight: 650;
  padding: 0;
  text-align: left;
}
.pending-table .button {
  white-space: nowrap;
}
.history li time {
  display: block;
  color: #61718a;
  font-size: 12px;
  margin: 4px 0 7px;
}
.history-zone {
  display: block;
  font-size: 11px;
  color: #8490a1;
  font-weight: 400;
  margin-top: 5px;
}

/* Ranking: one aligned filter bar, compact podium, clear personal placement. */
.ranking-page {
  max-width: 1100px;
  margin: auto;
}
.ranking-filter-panel {
  padding: 16px;
  background: #fff;
  border: 1px solid #e0e6ee;
  border-radius: 16px;
}
.ranking-page .ranking-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}
.ranking-controls .field {
  font-size: 11px;
  color: #6c7889;
  gap: 6px;
}
.ranking-page .ranking-controls select {
  width: 100%;
  min-width: 0;
  background: #f8fafc;
  font-size: 13px;
}
.rank-summary {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  margin: 20px 0 28px;
  gap: 12px;
}
.rank-summary > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-right: 1px solid #dce3ec;
  padding: 0 18px;
}
.rank-summary > div:first-child {
  padding-left: 0;
}
.rank-summary > div:last-child {
  border-right: 0;
}
.rank-summary span {
  font-size: 12px;
  color: #758091;
}
.rank-summary strong {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.5px;
}
.ranking-page h2 {
  font-size: 17px;
  letter-spacing: -0.2px;
}
.ranking-page .section-head {
  margin-bottom: 12px;
}
.ranking-page .podium {
  gap: 12px;
  align-items: stretch;
  margin: 0 0 20px;
}
.ranking-page .podium-place {
  min-height: 180px;
  gap: 7px;
  padding: 18px 12px 16px;
  border-radius: 17px;
  background: #fff;
  border-color: #dfe5ed;
  justify-content: flex-start;
  box-shadow: 0 3px 10px #24395c04;
}
.ranking-page .podium-place.first {
  min-height: 180px;
  background: linear-gradient(155deg, #fff6df, #fffdf8);
  border-color: #e9ce8d;
}
.ranking-page .medal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #8993a0;
  font-size: 11px;
  font-weight: 600;
}
.ranking-page .first .medal {
  color: #9e7321;
}
.ranking-page .medal svg {
  width: 14px;
  height: 14px;
}
.ranking-page .podium-place .avatar {
  width: 36px;
  height: 36px;
  font-size: 12px;
  background: #f0f3f8;
  color: #53667f;
  margin-top: 3px;
}
.ranking-page .first .avatar {
  background: #f4e9ca;
  color: #957531;
}
.ranking-page .podium-name {
  font-size: 14px;
  line-height: 1.35;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.ranking-page .podium-value {
  font-size: 27px;
  font-weight: 650;
  letter-spacing: -0.6px;
  margin-top: auto;
  line-height: 1.1;
}
.podium-unit {
  font-size: 10px;
  color: #7e8897;
}
.ranking-page .my-rank {
  border: 2px solid #7b9fe2;
  background: #f2f6ff;
  border-radius: 15px;
  padding: 14px 16px;
  gap: 12px;
  box-shadow: 0 2px 8px #2a5abc05;
}
.ranking-page .my-rank strong:last-child {
  margin: 0;
  font-size: inherit;
}
.own-rank-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.own-rank-copy > strong {
  font-size: 14px;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.own-rank-copy small {
  font-size: 12px;
  color: #667c9e;
}
.you-label {
  font-size: 10px;
  color: #3e67aa;
  font-weight: 650;
}
.own-rank-value {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.own-rank-value > strong {
  font-size: 26px !important;
}
.own-rank-value small {
  color: #7083a1;
  font-size: 10px;
}
.my-rank > svg {
  color: #7994bd;
  width: 16px;
  flex-shrink: 0;
}
.ranking-results {
  margin-top: 28px;
}
.ranking-page .rank-list {
  gap: 0;
  border: 1px solid #dfe5ed;
  border-radius: 16px;
  overflow: hidden;
  background: white;
}
.ranking-page .rank-row {
  grid-template-columns: 26px 34px minmax(0, 1fr) auto 14px;
  border: 0;
  border-bottom: 1px solid #edf0f5;
  border-radius: 0;
  padding: 13px 16px;
  gap: 12px;
  min-height: 64px;
}
.ranking-page .rank-row:last-child {
  border-bottom: 0;
}
.ranking-page .rank-row.you {
  background: #f1f6ff;
  box-shadow: inset 3px 0 #5d86cb;
}
.ranking-page .rank-row:hover,
.ranking-page .podium-place:hover {
  background: #f5f8fd;
}
.ranking-page .rank-row .avatar {
  width: 34px;
  height: 34px;
  font-size: 12px;
}
.rank-position {
  font-size: 12px;
  color: #7c899b;
}
.rank-person {
  font-size: 14px;
  font-weight: 550;
  overflow-wrap: anywhere;
}
.ranking-page .rank-row > svg {
  width: 14px;
  color: #a3afbd;
}
.ranking-page .rank-row-value {
  font-size: 16px;
  font-weight: 650;
}
.ranking-page .rank-row-value small {
  font-size: 10px;
  font-weight: 400;
}
@media (max-width: 1200px) {
  .daily-summary {
    grid-template-columns: 1fr;
  }
  .day-hero {
    min-height: 120px;
  }
  .day-metric {
    min-height: 100px;
  }
  .overview-table {
    min-width: 760px;
  }
}
@media (max-width: 760px) {
  .daily-summary {
    gap: 10px;
  }
  .day-hero {
    padding: 18px;
    min-height: 128px;
  }
  .day-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }
  .day-metric {
    padding: 12px;
    min-height: 92px;
  }
  .day-metric > strong {
    font-size: 25px;
  }
  .day-metric > span {
    font-size: 11px;
  }
  .day-metric:nth-last-child(-n + 2) {
    grid-column: span 1;
  }
  .team-overview {
    margin-top: 16px;
  }
  .overview-table th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #fff;
    min-width: 145px;
    max-width: 145px;
    box-shadow: 2px 0 4px #172a4010;
  }
  .overview-table thead th:first-child,
  .overview-table tfoot th:first-child {
    background: #f4f7fb;
  }
  .overview-table th button {
    font-size: 12px;
  }
  .overview-table .avatar {
    display: none;
  }
  .overview-table th,
  .overview-table td {
    padding: 8px;
  }
  .overview-table {
    min-width: 680px;
  }
  .table-period {
    display: table-row !important;
  }
  .table-period th {
    display: table-cell;
    padding: 10px 12px;
    font-size: 12px;
  }
  .queue-members {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .queue-members button {
    justify-content: space-between;
    font-size: 12px;
    padding: 10px;
  }
  .queue-group h2 {
    font-size: 16px;
  }
  .pending-table,
  .pending-table tbody {
    display: block;
  }
  .pending-table thead {
    display: none;
  }
  .pending-table tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 15px 0;
    border-bottom: 1px solid #e5eaf0;
  }
  .pending-table td {
    border: 0;
    padding: 0;
  }
  .pending-table td:first-child {
    font-size: 14px;
    font-weight: 600;
  }
  .pending-table td:nth-child(2) {
    text-align: right;
    color: #7b8493;
    font-size: 11px;
  }
  .pending-table td:nth-child(3) {
    font-size: 12px;
  }
  .pending-table td:last-child {
    display: flex;
    align-items: flex-end;
  }
  .pending-table .button {
    font-size: 12px;
    padding: 9px;
    min-height: 40px;
  }
  .ranking-page .page-head {
    align-items: center;
  }
  .rank-screen-link {
    font-size: 11px;
    padding: 9px;
    min-height: 36px;
  }
  .ranking-filter-panel {
    padding: 12px;
  }
  .ranking-page .ranking-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .ranking-page .ranking-controls select {
    font-size: 14px;
  }
  .rank-summary {
    gap: 0;
    margin: 18px 0 24px;
    grid-template-columns: 1fr 1fr 1fr;
  }
  .rank-summary > div {
    padding: 0 10px;
  }
  .rank-summary span {
    font-size: 10px;
    line-height: 1.4;
  }
  .rank-summary strong {
    font-size: 18px;
  }
  .ranking-page .podium {
    gap: 7px;
  }
  .ranking-page .podium-place,
  .ranking-page .podium-place.first {
    padding: 12px 6px;
    min-height: 166px;
  }
  .ranking-page .podium-name {
    font-size: 12px;
  }
  .ranking-page .podium-value {
    font-size: 25px;
  }
  .ranking-page .podium-place .avatar {
    width: 30px;
    height: 30px;
    font-size: 11px;
  }
  .ranking-page .my-rank {
    padding: 12px;
    gap: 9px;
  }
  .ranking-page .my-rank .avatar {
    width: 32px;
    height: 32px;
    font-size: 11px;
  }
  .own-rank-copy > strong {
    font-size: 13px;
  }
  .own-rank-copy small {
    font-size: 11px;
  }
  .ranking-page .rank-row {
    padding: 12px;
    gap: 8px;
    grid-template-columns: 20px 30px minmax(0, 1fr) auto 12px;
  }
  .rank-person {
    font-size: 13px;
  }
}
/* Keep the summary compact while making unconfirmed work a direct action. */
.hero-group {
  border: 1px solid #c9d9fa;
  border-radius: 18px;
  background: linear-gradient(125deg, #e9f1ff, #f6f9ff);
  overflow: hidden;
}
.hero-group .day-hero {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 18px 22px 12px;
}
.hero-group .day-metric.assigned {
  display: flex;
  flex-direction: row;
  align-items: center;
  min-height: 36px;
  width: 100%;
  border: 0;
  border-top: 1px solid #d4e0f5;
  border-radius: 0;
  padding: 8px 22px;
  background: #e4edfb80;
  gap: 12px;
}
.hero-group .day-metric.assigned strong {
  font-size: 16px;
}
.day-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.cc-overview .pending-reschedule-card small {
  display: block;
  font-size: 11px;
  margin-top: 4px;
}
.cc-overview .pending-reschedule-card > svg {
  display: block;
}
.cc-overview .pending-reschedule-card:hover {
  border-color: #b9933e;
  background: #ffedb8;
}
.ranking-page .section-head {
  justify-content: space-between;
}
.ranking-page .section-head h2 {
  display: flex;
  align-items: center;
  gap: 9px;
}
.ranking-page .count {
  display: inline-grid;
  width: auto;
  font-weight: 500;
}
.queue-group h2 {
  background: var(--bg, #f5f7fb);
}
.queue-back {
  margin-bottom: 20px;
  font-size: 12px;
}
@media (min-width: 1001px) {
  .compact-today .date-nav {
    grid-template-columns: 44px minmax(180px, 1fr) 44px max-content;
  }
}
@media (max-width: 760px) {
  .day-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .day-metric {
    min-height: 72px;
    flex-direction: row;
    align-items: center;
    gap: 5px;
  }
  .day-metric > strong {
    font-size: 23px;
  }
  .day-metric > span {
    font-size: 11px;
  }
  .hero-group .day-hero {
    min-height: 110px;
    padding: 14px 16px 10px;
    gap: 5px;
  }
  .day-hero > strong {
    font-size: 36px;
  }
  .hero-group .day-metric.assigned {
    padding: 8px 16px;
  }
  .ranking-page .ranking-controls .field:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}
.queue-shortcut {
  position: sticky;
  top: 8px;
  z-index: 14;
  min-height: 64px;
  padding: 12px 16px;
  margin: 0 0 14px;
  box-shadow: 0 3px 12px #7d5a0710;
}
.queue-shortcut b {
  font-size: 26px;
}
.queue-shortcut small {
  font-size: 11px;
}
.queue-shortcut strong {
  font-size: 13px;
}
.queue-shortcut .pending-card-icon {
  display: none;
}
.compact-today .manager-sticky {
  top: 80px;
}
.compact-today .manager-section,
.compact-today .meeting-table-wrap,
.compact-today .time-blocks {
  scroll-margin-top: 84px;
}
/* Keep column labels and time labels clear of the persistent queue shortcut. */
.compact-today .meeting-table thead th {
  top: 80px;
}
.compact-today .manager-section .meeting-table thead th {
  position: static;
}
@media (min-width: 761px) {
  .compact-today .time-block > header {
    top: 84px;
  }
}
@media (max-width: 1000px) {
  .meeting-table .table-period,
  .meeting-table .table-period th {
    display: block !important;
    width: 100%;
  }
  .meeting-table .meeting-row.confirmed > td:first-child,
  .meeting-table .meeting-row.confirmed > td:last-child {
    box-shadow: none;
  }
}

/* Approved daily workspace: one next meeting, compact work queue, explicit decisions. */
.next-meeting {
  margin: 22px 0;
  max-width: 760px;
}
.next-meeting > h2 {
  font-size: 15px;
  color: var(--muted, #64748b);
  margin-bottom: 12px;
}
.next-meeting .meeting {
  padding: 24px;
  border-radius: 22px;
}
.next-meeting .meeting-time {
  font-size: 32px;
  letter-spacing: -1px;
}
.next-meeting .meeting-title {
  font-size: 23px;
}
.cc-contact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin: 14px 0;
  border: 1px solid #dce5f2;
  border-radius: 14px;
  background: #edf3fc;
  color: #223b66;
}
.cc-contact > span:nth-child(2) {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.cc-contact small {
  font-size: 11px;
  color: #566983;
}
.cc-contact strong {
  overflow-wrap: anywhere;
}
.cc-contact .button {
  margin-left: auto;
  min-height: 44px;
}
.decision-success {
  text-align: center;
  padding: 32px 8px;
}
.decision-success .success-mark {
  margin: 0 auto 22px;
}
.result-sheet .form-stack {
  gap: 12px;
}
.result-sheet .wide {
  min-height: 48px;
}
@media (max-width: 700px) {
  .next-meeting {
    margin: 18px 0;
  }
  .next-meeting .meeting {
    padding: 18px;
  }
  .cc-contact {
    padding: 10px;
    gap: 9px;
  }
  .cc-contact .avatar {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
  }
  .result-sheet {
    align-self: flex-end;
    height: auto !important;
    max-height: 90dvh;
    border-radius: 26px 26px 0 0 !important;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .result-sheet .sheet-top:before {
    content: "";
    position: absolute;
    top: 8px;
    left: calc(50% - 20px);
    width: 40px;
    height: 4px;
    background: #c1cad8;
    border-radius: 5px;
  }
  .result-sheet .sheet-top {
    position: relative;
    padding-top: 20px;
    touch-action: pan-x;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sheet {
    animation: none !important;
  }
}
.ranking-metrics {
  display: flex;
  padding: 4px;
  border-radius: 13px;
  gap: 4px;
  background: #eef2f8;
  margin-bottom: 16px;
}
.ranking-metrics button {
  flex: 1;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.ranking-metrics button.selected {
  color: #254a9d;
  background: #fff;
  box-shadow: 0 2px 6px #1425480d;
  font-weight: 600;
}
.ranking-controls .field:has([data-rank="metric"]) {
  display: none;
}
.ranking-page .my-rank {
  border-width: 2px;
  background: #f7f9ff;
}
.decision-change {
  display: block;
  padding: 8px 10px;
  background: #eef3f8;
  border-radius: 8px;
  margin-top: 8px;
  font-size: 13px;
}
@media (max-width: 600px) {
  .ranking-metrics button {
    font-size: 12px;
    padding: 8px;
  }
}
.history-item,
.history-copy,
.history-note,
.decision-change {
  min-width: 0;
  overflow-wrap: anywhere;
}
.history-note {
  white-space: normal;
}

/* Content-sized sheets keep the page visible and short decisions easy to scan. */
.sheet {
  height: auto;
  max-height: calc(100dvh - 40px);
  align-self: center;
  margin: 20px;
  border-radius: 22px;
}
.result-sheet {
  width: min(480px, calc(100% - 40px));
}
.result-sheet .sheet-top {
  min-height: 50px;
  border-bottom: 0;
}
.result-sheet .sheet-body {
  padding: 0 24px 24px;
}
.decision-success {
  padding: 0 0 20px;
}
.decision-success .success-mark {
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
}
.result-time-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  margin: 20px 0;
  background: #f0f4fa;
  border: 1px solid #dce4ef;
  border-radius: 14px;
}
.result-time-card span {
  color: var(--muted);
  font-size: 13px;
}
.result-people {
  display: grid;
  gap: 12px;
  margin: 0;
  text-align: left;
}
.result-people > div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
}
.result-people dt {
  color: var(--muted);
  font-size: 13px;
}
.result-people dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.decision-change {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}
.decision-tone.assigned {
  color: #526173;
}
.decision-tone.confirmed {
  color: #2458ba;
}
.decision-tone.completed {
  color: #22744f;
}
.decision-tone.review,
.decision-tone.rescheduled {
  color: #956215;
}
.decision-tone.cancelled,
.decision-tone.no_show {
  color: #ac3947;
}
.hero-group .day-hero {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-content: center;
  padding-right: 44px;
}
.day-hero > strong {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
}
.day-hero > small {
  grid-column: 1;
}
.day-hero .hero-arrow {
  top: 50%;
  transform: translateY(-50%);
  right: 12px;
}
@media (max-width: 700px) {
  .sheet,
  .result-sheet {
    height: auto !important;
    max-height: 88dvh;
    align-self: flex-end;
    margin: 0;
    width: 100%;
    border-radius: 24px 24px 0 0;
  }
  .result-sheet .sheet-body {
    padding: 0 20px max(20px, env(safe-area-inset-bottom));
  }
  .hero-group .day-hero {
    padding-right: 40px;
  }
}
@media (max-width: 700px) {
  .team-today .page-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px 12px;
  }
  .team-today .page-head > div:first-child {
    display: contents;
  }
  .team-today .page-head h1 {
    grid-column: 1 / -1;
    font-size: 28px;
  }
  .team-today .head-actions {
    grid-column: 2;
    grid-row: 2;
  }
}
.idle-toggle {
  margin-top: 10px;
  color: var(--muted);
}
.overview-scroll {
  overflow-x: auto;
  touch-action: pan-x pan-y;
  overscroll-behavior-x: contain;
}
@media (min-width: 761px) {
  .daily-summary {
    grid-template-columns: minmax(200px, 1.15fr) 4fr;
    gap: 12px;
    align-items: stretch;
  }
  .hero-group .day-hero {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 0;
    gap: 4px;
    padding: 14px 16px 10px;
  }
  .day-hero > strong {
    order: -1;
    align-self: flex-start;
    font-size: 36px;
    line-height: 1;
  }
  .day-hero > span:first-child {
    font-size: 12px;
  }
  .day-hero > small {
    font-size: 11px;
  }
  .day-hero .hero-arrow {
    display: none;
  }
  .hero-group .day-metric.assigned {
    min-height: 30px;
    padding: 6px 16px;
    justify-content: space-between;
  }
  .day-metrics {
    gap: 12px;
  }
  .day-metrics > .day-metric {
    min-height: 0;
    padding: 16px;
    justify-content: flex-start;
    gap: 8px;
  }
  .day-metrics > .day-metric > strong {
    order: -1;
    font-size: 36px;
    line-height: 1;
  }
  .day-metrics > .day-metric > span {
    font-size: 12px;
  }
}
.day-metrics > .confirmed > strong,
.day-metrics > .completed > strong {
  color: #22744f;
}
.day-metrics > .rescheduled > strong {
  color: #956215;
}
.day-metrics > .cancelled > strong {
  color: #ac3947;
}

/* Today redesign (23 September): one toolbar row, one metric strip that is also
   the status filter, and two lists — "В работе" with the current-time line, then
   the rest of the day. */
@media (min-width: 1001px) {
  .workspace-main.compact-today {
    width: min(1240px, 100%);
    padding-top: 28px;
  }
}
.compact-today .today-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.compact-today .today-head > .page-head {
  display: contents;
}
.compact-today .today-head > .page-head > div:first-child {
  flex: 1 1 220px;
  min-width: 0;
}
.compact-today .today-head .page-head h1 {
  font-size: 30px;
  margin: 0 0 2px;
}
.compact-today .today-head > .collection-tabs,
.compact-today .today-head > .date-nav {
  margin: 0;
}
.compact-today .today-head > .date-nav {
  flex: 0 1 430px;
  width: auto;
}
.compact-today .today-head .head-actions {
  order: 5;
}
@media (max-width: 1000px) {
  .compact-today .today-head > .page-head > div:first-child {
    flex: 1 1 0;
  }
  .compact-today .today-head .page-head h1 {
    font-size: 26px;
  }
  .compact-today .today-head .head-actions {
    order: 0;
  }
  .compact-today .today-head > .collection-tabs,
  .compact-today .today-head > .date-nav {
    flex: 1 0 100%;
  }
}

/* Metric strip: six equal tiles in one bordered row (three per row on phones). */
.workspace-main .cc-overview .daily-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  border: 1px solid #e0e5ec;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}
.workspace-main .daily-summary .hero-group,
.workspace-main .daily-summary .day-metrics {
  display: contents;
}
.workspace-main .daily-summary .day-hero,
.workspace-main .daily-summary .day-metric {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 2px;
  min-height: 0;
  margin: 0;
  padding: 12px 16px;
  border: 0;
  border-right: 1px solid #e0e5ec;
  border-radius: 0;
  background: #fff;
  color: var(--ink, #202630);
  outline: 0;
  position: relative;
}
.workspace-main .daily-summary .day-metrics > .day-metric:last-child {
  border-right: 0;
}
.workspace-main .daily-summary .day-hero > strong,
.workspace-main .daily-summary .day-metric > strong {
  order: -1;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.5px;
}
.workspace-main .daily-summary .day-hero > span:first-child,
.workspace-main .daily-summary .day-metric > span {
  font-size: 13px;
  font-weight: 500;
  color: #606a78;
}
.workspace-main .daily-summary .day-hero > small {
  font-size: 12px;
  color: #8a93a0;
}
.workspace-main .daily-summary .day-hero .hero-arrow {
  display: none;
}
.workspace-main .daily-summary .day-hero[aria-pressed="true"],
.workspace-main .daily-summary .day-metric[aria-pressed="true"] {
  background: #eef3fe;
  outline: 0;
}
.workspace-main .daily-summary [aria-pressed="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: #285de5;
}
.workspace-main .daily-summary .day-hero:hover,
.workspace-main .daily-summary .day-metric:hover {
  background: #f7f9fc;
}
@media (max-width: 1000px) {
  .workspace-main .cc-overview .daily-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .workspace-main .daily-summary .day-hero,
  .workspace-main .daily-summary .day-metric {
    padding: 10px 12px;
    border-bottom: 1px solid #e0e5ec;
  }
  .workspace-main .daily-summary .hero-group > .day-metric.assigned,
  .workspace-main .daily-summary .day-metrics > .day-metric:nth-child(3) {
    border-right: 0;
  }
  .workspace-main .daily-summary .day-metrics > .day-metric:nth-child(n + 2) {
    border-bottom: 0;
  }
  .workspace-main .daily-summary .day-metrics > .day-metric:last-child {
    border-right: 0;
  }
  .workspace-main .daily-summary .day-hero > strong,
  .workspace-main .daily-summary .day-metric > strong {
    font-size: 21px;
  }
  .workspace-main .daily-summary .day-hero > span:first-child,
  .workspace-main .daily-summary .day-metric > span {
    font-size: 12px;
  }
  .workspace-main .daily-summary .day-hero > small {
    display: none;
  }
}

/* Pending-reschedule shortcut: a slim amber pill instead of a banner. */
.compact-today .cc-overview .pending-reschedule-card,
.compact-today .pending-reschedule-card.queue-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: auto;
  max-width: 100%;
  min-height: 36px;
  justify-self: start;
  margin: 0 0 14px;
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: #fff4da;
  color: #6d4d0e;
  box-shadow: none;
}
.compact-today .pending-reschedule-card .pending-card-icon {
  display: none;
}
.compact-today .pending-reschedule-card span:nth-child(2) {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.compact-today .pending-reschedule-card strong {
  font-size: 13px;
  font-weight: 600;
}
.compact-today .pending-reschedule-card small {
  font-size: 12px;
  color: #8a6a2a;
}
.compact-today .pending-reschedule-card b {
  order: -1;
  font-size: 16px;
}
.compact-today .pending-reschedule-card > svg {
  display: block;
  width: 14px;
  height: 14px;
}
.compact-today .filter-reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.compact-today .filter-reset svg {
  width: 14px;
  height: 14px;
}
.compact-today .personal-stats {
  margin-top: 20px;
}

/* Two lists in one table. */
.meeting-table .table-period.active th {
  color: #202630;
  background: #fff;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0;
}
.meeting-table .table-period.rest th {
  color: #606a78;
  background: #f6f7f9;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0;
  border-top: 14px solid var(--canvas, #f6f7f9);
}
.meeting-table tbody[data-time-period="rest"] .meeting-row .row-time time,
.meeting-table tbody[data-time-period="rest"] .meeting-row .meeting-title {
  color: #606a78;
}
.row-time small.rel {
  color: #285de5;
  font-weight: 500;
}
.row-time small.live {
  color: #c2332f;
  font-weight: 600;
}
.row-time small.late {
  color: #8a5d0c;
  font-weight: 600;
}
.row-time small {
  white-space: normal;
}
.meeting-table .meeting-row.needs-result > td {
  background: #fffaf0;
}
.meeting-table .meeting-row.needs-result > td:first-child {
  box-shadow: inset 4px 0 #d7a52b;
}

/* Current-time line (restored on 23 September by request). */
.table-now > td {
  padding: 0 12px;
  height: 0;
  border: 0;
  background: transparent;
}
.now-cue {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -1px 0;
  position: relative;
  z-index: 1;
}
.now-cue b {
  flex: none;
  padding: 1px 7px;
  border-radius: 6px;
  background: #c2332f;
  color: #fff;
  font-size: 11px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.now-cue span {
  flex: 1;
  height: 2px;
  background: #c2332f;
}
@media (max-width: 1000px) {
  .meeting-table .table-now,
  .meeting-table .table-now > td {
    display: block !important;
    width: 100%;
  }
  .meeting-table .table-now > td {
    padding: 6px 0;
  }
}
.workspace-main .daily-summary .hero-group > .day-metric.assigned {
  align-items: flex-start;
  text-align: left;
  justify-content: flex-start;
}
@media (min-width: 1001px) {
  .compact-today .today-head > .date-nav {
    flex: 0 1 340px;
  }
  .compact-today .today-head > .collection-tabs button {
    padding-inline: 12px;
  }
}
.workspace-main .daily-summary .day-hero,
.workspace-main .daily-summary .day-metric {
  align-items: flex-start;
  text-align: left;
}
.workspace-main .daily-summary .day-hero > span:first-child,
.workspace-main .daily-summary .day-metric > span {
  display: block;
}
@media (max-width: 1000px) {
  .compact-today .pending-reschedule-card small {
    display: none;
  }
}
.meeting-table .meeting-row.needs-result .card-actions .primary {
  background: #285de5;
  border-color: #285de5;
  color: #fff;
}
.row-time small.rel,
.row-time small.live,
.row-time small.late {
  overflow-wrap: normal;
  word-break: normal;
}
@media (max-width: 1000px) {
  .meeting-table .meeting-row.needs-result {
    background: #fffaf0;
  }
  .meeting-table .meeting-row.needs-result > td {
    background: transparent;
  }
  .meeting-table .meeting-row.needs-result > td:first-child {
    box-shadow: none;
  }
}
@media (min-width: 1001px) {
  .compact-today .meeting-table thead th {
    top: 52px;
  }
}
@media (max-width: 1000px) {
  .workspace-main .daily-summary .day-metric i {
    display: none;
  }
}
/* Leader qualification queue: a slim violet pill beside the pending pill. */
.compact-today > .attention {
  display: inline-flex;
  width: auto;
  max-width: 100%;
  gap: 10px;
  margin: 0 0 14px 8px;
  padding: 4px 6px 4px 14px;
  border: 0;
  border-radius: 999px;
  background: #f3eefe;
  color: #5b3fa8;
  font-size: 13px;
}
.compact-today > .attention .button {
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
}
@media (max-width: 1000px) {
  .compact-today > .attention {
    margin-left: 0;
  }
}
/* Specialist cards: results to record, questionable qualification, no-shows. */
.workspace-main .daily-summary .day-metric.awaiting_result > strong,
.overview-table td.awaiting_result {
  color: #a0680c;
}
.workspace-main .daily-summary .day-metric.awaiting_result i {
  background: #d7a52b;
}
.workspace-main .daily-summary .day-metric.review > strong,
.overview-table td.review {
  color: #5b3fa8;
}
.workspace-main .daily-summary .day-metric.review i {
  background: #7c5cd6;
}
.workspace-main .daily-summary .day-metric.no_show > strong,
.overview-table td.no_show {
  color: #606a78;
}
.workspace-main .daily-summary .day-metric.no_show i {
  background: #8d97a5;
}
.workspace-main .daily-summary .day-metric.completed > strong {
  color: #22744f;
}
.workspace-main .daily-summary .day-metric.cancelled > strong {
  color: #ac3947;
}
.workspace-main .cc-overview .daily-summary .hero-group .day-hero > * {
  /* An older layout placed the number in a second grid column. */
  align-self: flex-start;
  grid-column: auto;
  grid-row: auto;
}
/* Each role's main action is solid: КЦ confirms, specialists record results. */
.meeting-table .meeting-row .card-actions [data-action="confirm"] {
  background: #285de5;
  border-color: #285de5;
  color: #fff;
}
/* Urgent bookings: toggle in the booking form and a red marker on meeting
   cards (Google Calendar uses the matching «Tomato» colour). */
.urgent-toggle {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #cdd3dc;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 450;
  color: var(--ink);
}
.urgent-toggle input {
  flex: none;
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--red);
}
.urgent-toggle span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.urgent-toggle.on {
  background: var(--red-bg);
  border-color: var(--red);
  color: var(--red);
}
.foreign-toggle {
  gap: 8px;
  padding: 0 12px;
}
.foreign-toggle input {
  accent-color: var(--blue);
}
.foreign-toggle.on {
  background: #eaf0fe;
  border-color: var(--blue);
  color: var(--blue);
}
.urgent-hint {
  margin: 8px 0 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--red-bg);
  color: var(--red);
  font-size: 13px;
}
.custom-time {
  margin-top: 12px;
  max-width: 180px;
}
article.meeting.urgent,
.meeting-table .meeting-row.urgent > td:first-child {
  box-shadow: inset 5px 0 0 #d50000;
}
.urgent-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #d50000;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
}
.meeting-time .urgent-badge {
  display: block;
  width: max-content;
  margin: 4px 0 0;
}
.telegram-panel {
  align-content: start;
}
.telegram-panel p {
  margin: 0;
}
/* Настройки → «Уведомления» (учётки экспертов). */
.notify-panel {
  align-content: start;
}
.notify-panel h2 {
  margin: 0;
}
.notify-status {
  margin: 0;
  color: var(--green);
  font-size: 14px;
}
.notify-warning {
  display: grid;
  gap: 8px;
  padding: 13px 15px;
  background: #fff8e6;
  border: 1px solid #efd28b;
  border-radius: 13px;
}
.notify-warning span {
  color: var(--muted);
  font-size: 13px;
}
.notify-warning .button {
  justify-self: start;
}
.notify-toggle {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
}
.notify-toggle span {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.notify-toggle small {
  color: var(--muted);
  font-size: 13px;
}
/* Переключатель вместо квадратного чекбокса. */
.notify-toggle input {
  appearance: none;
  flex: none;
  width: 42px;
  height: 24px;
  margin: 1px 0 0;
  border-radius: 999px;
  background: #cdd3dc;
  position: relative;
  cursor: pointer;
  transition: background 0.15s;
}
.notify-toggle input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s;
}
.notify-toggle input:checked {
  background: var(--blue);
}
.notify-toggle input:checked::after {
  transform: translateX(18px);
}
.notify-toggle input:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.notify-sub {
  display: grid;
  gap: 4px;
  padding-left: 14px;
  border-left: 3px solid #dbe5ff;
  margin-left: 14px;
}
.notify-sub.is-off {
  opacity: 0.5;
}
.notify-actions {
  gap: 8px;
}
/* «Свободные окна»: свободное время экспертов на день. */
.free-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.free-services {
  display: inline-flex;
  gap: 6px;
}
.free-services .chip {
  min-height: 36px;
  padding: 6px 14px;
}
.free-search {
  flex: 1 1 200px;
  max-width: 300px;
  margin: 0;
}
.free-search input {
  background: #fff;
  min-height: 40px;
}
.free-summary {
  margin: 0 0 12px;
  color: var(--muted);
  font-weight: 650;
}
.free-list {
  display: grid;
  gap: 8px;
}
.free-row {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  align-items: center;
  gap: 4px 16px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.free-head {
  display: grid;
  gap: 2px;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
}
.free-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.free-name strong {
  font-size: 16px;
}
.free-head:hover strong,
.free-head:focus-visible strong {
  color: var(--blue);
}
.free-badges {
  display: inline-flex;
  gap: 4px;
}
.free-badge {
  padding: 1px 7px;
  border-radius: 999px;
  background: #eef1f5;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.free-badge.ps {
  background: #eaf0ff;
  color: #1849bd;
}
.free-badge.vh {
  background: #f4ecff;
  color: #6b35b8;
}
.free-badge.sat,
.service-badge.sat {
  background: #e6f6ee;
  color: #13734a;
}
.free-badge.ielts,
.service-badge.ielts {
  background: #fff3e0;
  color: #a35200;
}
/* SAT / IELTS в списке, карточках и модалке встречи */
.service-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
}
.services-field {
  border: 0;
  margin: 0;
  padding: 0;
}
.services-field .row {
  gap: 14px;
}
.free-load {
  color: var(--muted);
  font-size: 13px;
}
.free-times {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.free-chip {
  min-width: 64px;
  padding: 6px 10px;
  border: 1px solid #b9dfc6;
  border-radius: 10px;
  background: var(--green-bg);
  color: #21733f;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.free-reason {
  color: #8a93a0;
  font-size: 14px;
}
.free-row.is-empty {
  background: #fafbfc;
}
.free-row.is-empty .free-name strong {
  color: var(--muted);
}
.free-busy {
  display: none;
  grid-column: 1 / -1;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.free-row.open .free-busy {
  display: block;
}
.free-busy small {
  color: var(--muted);
  font-weight: 650;
}
.free-busy ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}
.free-busy time {
  margin-right: 6px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.free-busy li.booking span {
  color: #1849bd;
}
.free-busy li.none {
  color: var(--muted);
}
@media (max-width: 760px), (max-width: 1000px) and (pointer: coarse) {
  .free-toolbar {
    gap: 8px;
  }
  .free-search {
    flex-basis: 100%;
    max-width: none;
  }
  .free-row {
    grid-template-columns: 1fr;
    padding: 12px 14px;
  }
  .free-busy ul {
    display: grid;
  }
}
/* Team leader filters: specialist picker + status tabs with icons. */
.team-filters {
  margin: 4px 0 14px;
}
.expert-picker {
  position: relative;
  display: flex;
  flex: 0 0 auto;
}
.cc-view-toolbar:has(.expert-picker) {
  justify-content: flex-start;
}
.expert-picker-button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 250px;
  min-height: 48px;
  padding: 6px 14px 6px 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.expert-picker-button:hover,
.expert-picker.open .expert-picker-button {
  border-color: #b9c6dc;
  box-shadow: 0 4px 14px rgba(28, 39, 59, 0.07);
}
.expert-picker.active .expert-picker-button {
  border-color: #9fb7f0;
  background: #f3f6ff;
}
.expert-picker.active .expert-picker-label {
  margin-right: 30px;
}
.expert-picker-button > svg {
  width: 18px;
  height: 18px;
  margin-left: auto;
  color: var(--muted);
  transition: transform 0.15s;
}
.expert-picker.open .expert-picker-button > svg {
  transform: rotate(180deg);
}
.expert-picker-label {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}
.expert-picker-label small {
  color: var(--muted);
  font-size: 11px;
}
.expert-picker-label strong {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 650;
}
.avatar-stack {
  display: flex;
  flex: 0 0 auto;
}
.avatar-stack .avatar {
  width: 30px;
  height: 30px;
  font-size: 11px;
  border: 2px solid #fff;
}
.avatar-stack .avatar + .avatar {
  margin-left: -10px;
}
.expert-picker-clear {
  position: absolute;
  top: 50%;
  right: 40px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-top: -12px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #dfe7fb;
  color: #1849bd;
  cursor: pointer;
}
.expert-picker-clear svg {
  width: 14px;
  height: 14px;
}
.expert-popover {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  left: 0;
  width: 340px;
  max-width: calc(100vw - 28px);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(28, 39, 59, 0.18);
  animation: expert-pop 0.14s ease-out;
}
.expert-popover[hidden] {
  display: none;
}
@keyframes expert-pop {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}
.expert-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--canvas);
}
.expert-search svg {
  width: 17px;
  height: 17px;
  color: var(--muted);
}
.expert-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
}
.expert-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 6px;
}
.expert-quick button {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  cursor: pointer;
}
.expert-quick button.active {
  border-color: #9fb7f0;
  background: #eaf0ff;
  color: #1849bd;
  font-weight: 650;
}
.expert-options {
  max-height: 320px;
  overflow-y: auto;
  margin: 0 -4px;
  padding: 0 4px;
}
.expert-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.expert-option[hidden] {
  display: none;
}
.expert-option:hover {
  background: var(--canvas);
}
.expert-option.picked {
  background: #eef3ff;
}
.expert-option .avatar {
  width: 30px;
  height: 30px;
  font-size: 11px;
}
.expert-check {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 1.5px solid #c3cbd8;
  border-radius: 6px;
  color: transparent;
}
.expert-check svg {
  width: 12px;
  height: 12px;
  stroke-width: 3;
}
.expert-option.picked .expert-check {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}
.expert-option-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.expert-option-count {
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eaf0ff;
  color: #1849bd;
  font-size: 12px;
  font-weight: 650;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.expert-option.idle .expert-option-count {
  background: #f1f3f6;
  color: #9aa3b0;
}
.expert-popover-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.expert-popover-foot .button {
  min-height: 36px;
  padding: 0 16px;
}
.status-tabs {
  display: flex;
  flex: 1;
  gap: 2px;
  min-width: 0;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #eef1f5;
  scrollbar-width: none;
}
.status-tabs::-webkit-scrollbar {
  display: none;
}
.status-tab {
  --tone: #285de5;
  --tone-bg: #eaf0ff;
  display: inline-flex;
  flex: 1 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #4d5765;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.status-tab:hover {
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
}
.status-tab-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--tone-bg);
  color: var(--tone);
}
.status-tab-icon svg {
  width: 15px;
  height: 15px;
  stroke-width: 2;
}
.status-tab b {
  min-width: 22px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(32, 38, 48, 0.07);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.status-tab.zero {
  color: #8a93a0;
}
.status-tab.zero .status-tab-icon {
  opacity: 0.6;
}
.status-tab[aria-selected="true"] {
  background: #fff;
  color: var(--tone);
  font-weight: 650;
  box-shadow: 0 2px 8px rgba(28, 39, 59, 0.1), inset 0 -2px 0 var(--tone);
}
.status-tab[aria-selected="true"] .status-tab-icon {
  background: var(--tone);
  color: #fff;
  opacity: 1;
}
.status-tab[aria-selected="true"] b {
  background: var(--tone-bg);
  color: var(--tone);
}
.status-tab.tone-all {
  --tone: #202630;
  --tone-bg: #e3e7ee;
}
.status-tab.tone-awaiting_result {
  --tone: #a0680c;
  --tone-bg: #fff1d1;
}
.status-tab.tone-completed,
.status-tab.tone-confirmed {
  --tone: #22744f;
  --tone-bg: #e2f3e8;
}
.status-tab.tone-review {
  --tone: #5b3fa8;
  --tone-bg: #efe9fd;
}
.status-tab.tone-cancelled {
  --tone: #ac3947;
  --tone-bg: #fdebea;
}
.status-tab.tone-rescheduled {
  --tone: #9a6b0c;
  --tone-bg: #fdf3d8;
}
.manager-section .member-head small {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
}
/* Day switch: the previous day stays visible, dimmed, until the new one lands. */
.workspace-main.is-refreshing > :not(.today-head) {
  opacity: 0.45;
  pointer-events: none;
  transition: opacity 0.12s 0.08s;
}
.workspace-main.is-refreshing .date-control::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border: 2px solid #c9d3e3;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@media (max-width: 1100px) {
  .status-tab {
    flex: 0 0 auto;
  }
}
@media (max-width: 760px) {
  .cc-view-toolbar .expert-picker {
    flex: 1 0 100%;
  }
  .expert-picker-button {
    width: 100%;
    min-width: 0;
  }
  .expert-picker,
  .expert-popover {
    width: 100%;
  }
  .status-tab-label {
    font-size: 12px;
  }
}
/* Calendar: the specialist picker sits at the right end of the toolbar. */
.calendar-toolbar .expert-popover {
  left: auto;
  right: 0;
}
@media (max-width: 760px) {
  .calendar-toolbar .expert-picker {
    flex: 1 0 100%;
  }
  .calendar-toolbar .expert-popover {
    left: 0;
  }
}
/* Specialist teams inside the picker: grouped under a team heading. */
.expert-group[hidden] {
  display: none;
}
.expert-group + .expert-group {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}
.expert-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Итоги встречи: кольцо скрипта, кружки этапов, свёрнутые разделы */
.score-ring {
  --c: #2f9e5b;
  --size: 44px;
  --pct: 0;
  flex: 0 0 auto;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: conic-gradient(var(--c) calc(var(--pct) * 1%), #e6e9ef 0);
  position: relative;
}
.score-ring::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #fff;
}
.score-ring b {
  position: relative;
  font-size: 13px;
  font-weight: 650;
  color: var(--c);
  letter-spacing: -0.02em;
}
.score-ring b small {
  font-size: 0.7em;
  font-weight: 650;
}
.score-ring.mid { --c: #e07a1f; }
.score-ring.bad { --c: #d14343; }
.score-ring.sm { --size: 32px; }
.score-ring.sm::before { inset: 3px; }
.score-ring.sm b { font-size: 10.5px; }
.score-ring.sm b small { display: none; }
.score-ring.lg { --size: 76px; }
.score-ring.lg::before { inset: 7px; }
.score-ring.lg b { font-size: 21px; }

.stage-dots {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
  align-items: center;
}
.stage-dot {
  --c: #2f9e5b;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  background: var(--c);
  flex: 0 0 auto;
}
.stage-dot.good { --c: #2f9e5b; }
.stage-dot.mid { --c: #86b83a; }
.stage-dot.low { --c: #e98a24; }
.stage-dot.bad { --c: #d14343; }
.stage-dot.na { --c: #c3cad5; }

.script-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.script-badge .stage-dot {
  width: 15px;
  height: 15px;
  font-size: 9px;
}
.script-badge .stage-dots { gap: 2px; }
.lead-chip {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  display: inline-grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 650;
  background: #e8edf5;
  color: #3a4558;
}
.lead-chip.lead-A, .sum-chip.lead-A b { background: #e2f3e8; color: #22744f; }
.lead-chip.lead-B, .sum-chip.lead-B b { background: #fff1d1; color: #9a6b0c; }
.lead-chip.lead-C, .sum-chip.lead-C b { background: #fdebea; color: #ac3947; }

.summary-scorecard {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(135deg, #fbfcfe, #f4f0fd);
  margin-bottom: 10px;
}
.scorecard-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.scorecard-title strong { display: block; font-size: 15px; }
.scorecard-title small { color: var(--muted); font-size: 12px; }
.summary-scorecard .stage-dot { width: 22px; height: 22px; font-size: 11.5px; }
.sum-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sum-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 4px 3px 9px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 12px;
}
.sum-chip small { color: var(--muted); font-size: 11px; }
.sum-chip b {
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef1f6;
  font-weight: 650;
}
.sum-chip.ready-high b, .sum-chip.kp-ok b { background: #e2f3e8; color: #22744f; }
.sum-chip.ready-mid b { background: #fff1d1; color: #9a6b0c; }
.sum-chip.ready-low b, .sum-chip.kp-warn b { background: #fdebea; color: #ac3947; }

.summary-fold {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  margin-bottom: 8px;
  overflow: hidden;
}
.summary-fold > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.summary-fold > summary::-webkit-details-marker { display: none; }
.summary-fold > summary:hover { background: #f8f9fb; }
.fold-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #f2f4f7;
  font-size: 17px;
  flex: 0 0 auto;
}
.summary-fold[data-fold$=":audit"] .fold-icon { background: #efe9fd; }
.fold-title { display: grid; min-width: 0; flex: 1; }
.fold-title strong { font-size: 14.5px; }
.fold-title small {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fold-chevron {
  width: 9px;
  height: 9px;
  border-right: 2px solid #8a94a3;
  border-bottom: 2px solid #8a94a3;
  transform: rotate(45deg);
  transition: transform 0.18s ease;
  margin: -4px 4px 0 0;
}
.summary-fold[open] .fold-chevron { transform: rotate(-135deg); margin-top: 4px; }
.summary-fold[open] > summary { border-bottom: 1px solid var(--line); }
.fold-body { padding: 12px 14px 14px; overflow-wrap: anywhere; }

.ms-cards, .audit-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px;
}
.audit-cards { margin-top: 10px; grid-template-columns: 1fr; }
.ms-card, .audit-card {
  background: #f6f7f9;
  border-radius: 11px;
  padding: 10px 12px;
  font-size: 13px;
}
.ms-card.wide { grid-column: 1 / -1; }
.ms-card h4, .audit-card h4 {
  display: flex;
  gap: 6px;
  align-items: baseline;
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
}
.ms-card p, .audit-card p { margin: 0; }
.ms-card ul, .audit-card ul { margin: 0; padding-left: 16px; }
.ms-card li + li, .audit-card li + li { margin-top: 3px; }

.stage-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.stage-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 11px;
  border-radius: 11px;
  background: #f6f7f9;
  font-size: 13px;
}
.stage-list li.bad { background: #fdf2f1; }
.stage-list li .stage-dot { width: 26px; height: 26px; font-size: 13px; margin-top: 1px; }
.stage-list li > div { min-width: 0; flex: 1; }
.stage-list strong { font-size: 13.5px; }
.stage-score {
  float: right;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-left: 8px;
}
.stage-list p { margin: 3px 0 0; color: #3d4654; }

@media (max-width: 640px) {
  .summary-scorecard { flex-direction: column; align-items: flex-start; }
  .ms-cards { grid-template-columns: 1fr; }
}

/* Слабый звонок по проверке ИИ */
.call-flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 2px 8px 2px 6px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 650;
  vertical-align: middle;
  white-space: nowrap;
  background: #fff1e0;
  color: #b25a0c;
}
.call-flag svg { width: 13px; height: 13px; }
.call-flag.bad { background: #fdebea; color: #b4232f; }
.meeting-row.call-bad td:first-child { box-shadow: inset 3px 0 0 #d14343; }
.meeting-row.call-bad { background: #fff8f7; }
article.meeting.call-bad { border-color: #f1c2bd; box-shadow: inset 3px 0 0 #d14343; }
.call-alert {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 10px;
  background: #fff4e6;
  border: 1px solid #f6d3a8;
  color: #6f3b06;
}
.call-alert.bad { background: #fdeeec; border-color: #f1c2bd; color: #7d1d24; }
.call-alert-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: #e98a24;
  color: #fff;
}
.call-alert.bad .call-alert-icon { background: #d14343; }
.call-alert-icon svg { width: 17px; height: 17px; }
.call-alert strong { font-size: 14.5px; }
.call-alert ul { margin: 4px 0 0; padding-left: 16px; font-size: 13px; }
.status-tab.tone-weak_calls {
  --tone: #b4232f;
  --tone-bg: #fdebea;
}
.score-ring.na { --c: #9aa3b1; background: #e6e9ef; }
.summary-scorecard.incomplete { background: #f6f7f9; }

/* Десктоп: окна — модалкой по центру, а не панелью справа. Телефон (≤700px)
   остаётся шторкой снизу (правило выше). */
@media (min-width: 701px) {
  .sheet-backdrop {
    justify-content: center;
    align-items: center;
    padding: 24px;
    backdrop-filter: blur(3px);
    animation: backdrop-in 0.18s ease;
  }
  .sheet {
    margin: 0;
    max-height: calc(100dvh - 48px);
    box-shadow: 0 30px 80px rgba(18, 25, 35, 0.28);
    animation: modal-in 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .sheet.details-sheet {
    width: min(900px, 100%);
  }
  .sheet-top {
    border-radius: 22px 22px 0 0;
  }
}
@keyframes modal-in {
  from {
    transform: translateY(12px) scale(0.98);
    opacity: 0;
  }
}
@keyframes backdrop-in {
  from {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sheet-backdrop {
    animation: none;
  }
}

/* Бот-записыватель встречи: статус + «Бот: зайти / выйти» (meeting_bot.py). */
.bot-panel {
  border: 1px solid #e3e8f2;
  border-radius: 16px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #fbfcfe 0%, #f6f8fc 100%);
}
.bot-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bot-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: #eef2fb;
  font-size: 20px;
}
.bot-copy h2 {
  margin: 0;
  font-size: 15px;
}
.bot-status {
  margin: 2px 0 0;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  color: var(--muted);
}
.bot-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b7bfcc;
  flex: 0 0 auto;
}
.bot-status.live { color: #22693d; }
.bot-status.live .bot-dot {
  background: #36995b;
  box-shadow: 0 0 0 0 rgba(54, 153, 91, 0.45);
  animation: bot-pulse 1.8s ease-out infinite;
}
.bot-status.wait .bot-dot { background: #e2a32b; }
.bot-status.bad { color: #8a2c2c; }
.bot-status.bad .bot-dot { background: #d14343; }
.bot-wait { color: var(--muted); }
@keyframes bot-pulse {
  70% { box-shadow: 0 0 0 7px rgba(54, 153, 91, 0); }
  100% { box-shadow: 0 0 0 0 rgba(54, 153, 91, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .bot-status.live .bot-dot { animation: none; }
}
.bot-note {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.bot-note.bad { color: var(--red); }
.bot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.button.bot-join {
  background: #eef3ff;
  border-color: #cfdcfb;
  color: #1f4fc4;
}
.button.bot-join:hover { background: #e3ebff; }
.button.bot-leave { color: #8a2c2c; }
.button.bot-leave.confirm {
  background: var(--red-bg);
  border-color: #f1c2bd;
}
.button:disabled { opacity: 0.55; cursor: progress; }
.bot-room {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}
.bot-room .button { justify-self: start; }
.bot-room small { color: var(--muted); font-size: 12.5px; }
.button.bot-quick {
  min-height: 36px;
  padding: 6px 11px;
  font-size: 13px;
  border-radius: 10px;
  background: #f4f6fb;
  border-color: #e1e6f0;
  color: #3a4558;
}
.button.bot-quick.live {
  background: var(--green-bg);
  border-color: #cfe7d6;
  color: #22693d;
}
@media (max-width: 700px) {
  .bot-actions .button { flex: 1 1 100%; }
  .bot-room .button { justify-self: stretch; }
}

/* Ranking podium (03.11.2026): pedestals in medal colours, a crown over the
   leader, bars against the leader in the list. Motion only when the ranking
   opens or its numbers change (.is-entering), never on background refreshes. */
.ranking-page .podium {
  position: relative;
  grid-template-columns: repeat(var(--n, 3), minmax(0, 240px));
  justify-content: center;
  align-items: end;
  gap: 14px;
  margin: 0 0 22px;
  padding: 26px 22px 0;
  border: 1px solid #e3e8f0;
  border-radius: 20px;
  background:
    radial-gradient(60% 70% at 50% 0%, #fff4d6 0%, transparent 70%),
    linear-gradient(180deg, #fbfcfe, #f3f6fb);
  overflow: hidden;
}
.ranking-page .podium-place,
.ranking-page .podium-place.first {
  min-height: 0;
  padding: 0;
  gap: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  justify-content: flex-end;
  transition: transform 0.25s ease;
}
.ranking-page .podium-place:hover {
  background: none;
  transform: translateY(-4px);
}
.podium-person {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0 4px 12px;
  min-width: 0;
  max-width: 100%;
}
.ranking-page .podium-place .avatar {
  width: 48px;
  height: 48px;
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  color: #4f5d70;
  background: #fff;
  box-shadow: 0 0 0 3px var(--medal, #cfd6e0), 0 6px 16px rgba(28, 39, 59, 0.12);
}
.ranking-page .first .avatar {
  width: 60px;
  height: 60px;
  font-size: 17px;
  color: #8a6416;
  background: #fffaf0;
}
.ranking-page .podium-name {
  font-size: 13px;
  text-align: center;
}
.ranking-page .podium-value {
  margin: 0;
  font-size: 24px;
  line-height: 1;
}
.ranking-page .first .podium-value {
  font-size: 30px;
}
.place-1 { --medal: #e8b23a; --pedestal: linear-gradient(180deg, #f9dc83, #e9b444); --pedestal-h: 118px; }
.place-2 { --medal: #b8c2cf; --pedestal: linear-gradient(180deg, #eef1f5, #c8d0db); --pedestal-h: 84px; }
.place-3 { --medal: #d39a6a; --pedestal: linear-gradient(180deg, #f5d3b4, #d79c6b); --pedestal-h: 62px; }
.pedestal {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  height: var(--pedestal-h);
  border-radius: 14px 14px 0 0;
  background: var(--pedestal);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transform-origin: bottom;
  overflow: hidden;
}
.pedestal-rank {
  margin-top: 8px;
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.place-1 .pedestal::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.55) 50%, transparent 65%);
  transform: translateX(-100%);
  animation: rank-shine 4.5s ease-in-out 1.2s infinite;
}
.crown {
  width: 30px;
  height: 30px;
  color: #e8b23a;
  filter: drop-shadow(0 2px 3px rgba(185, 130, 20, 0.35));
  animation: rank-bob 2.8s ease-in-out infinite;
}
/* List: medal tints for the top three, a bar against the leader. */
.ranking-page .rank-row {
  grid-template-columns: 28px 34px minmax(0, 1fr) auto 14px;
}
.rank-position {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-weight: 650;
}
.rank-row.top-1 .rank-position { background: #fbe7b0; color: #8a6416; }
.rank-row.top-2 .rank-position { background: #e7ebf1; color: #55657a; }
.rank-row.top-3 .rank-position { background: #f6dcc6; color: #8c5528; }
.rank-person {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rank-bar {
  display: block;
  height: 5px;
  margin-top: 5px;
  border-radius: 99px;
  background: #eef1f6;
  overflow: hidden;
}
.rank-bar i {
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: inherit;
  background: linear-gradient(90deg, #6b93f0, var(--blue));
}
.rank-row.top-1 .rank-bar i { background: linear-gradient(90deg, #f3cf6b, #e2a52c); }
.ranking-page .my-rank {
  background: linear-gradient(120deg, #eef4ff, #f8faff);
}
/* Entrance */
.is-entering .pedestal {
  animation: rank-rise 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.15) both;
}
.is-entering .place-2 .pedestal { animation-delay: 0.05s; }
.is-entering .place-1 .pedestal { animation-delay: 0.2s; }
.is-entering .place-3 .pedestal { animation-delay: 0.35s; }
.is-entering .podium-person {
  animation: rank-pop 0.5s ease-out both;
}
.is-entering .place-2 .podium-person { animation-delay: 0.4s; }
.is-entering .place-1 .podium-person { animation-delay: 0.55s; }
.is-entering .place-3 .podium-person { animation-delay: 0.7s; }
.is-entering .rank-row {
  animation: rank-fade 0.45s ease-out both;
  animation-delay: calc(0.3s + var(--i, 0) * 0.05s);
}
.is-entering .rank-bar i {
  animation: rank-grow 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(0.45s + var(--i, 0) * 0.05s);
}
.is-entering .my-rank {
  animation: rank-fade 0.45s ease-out 0.25s both;
}
@keyframes rank-rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes rank-pop { from { opacity: 0; transform: translateY(14px) scale(0.92); } to { opacity: 1; transform: none; } }
@keyframes rank-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes rank-grow { from { width: 0; } }
@keyframes rank-bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-4px) rotate(4deg); } }
@keyframes rank-shine { 0% { transform: translateX(-100%); } 35%, 100% { transform: translateX(100%); } }
@media (max-width: 700px) {
  .ranking-page .podium {
    gap: 8px;
    padding: 20px 10px 0;
  }
  .ranking-page .podium-place .avatar { width: 40px; height: 40px; font-size: 12px; }
  .ranking-page .first .avatar { width: 50px; height: 50px; font-size: 15px; }
  .ranking-page .podium-name { font-size: 12px; overflow-wrap: anywhere; }
  .ranking-page .podium-value { font-size: 20px; }
  .ranking-page .first .podium-value { font-size: 24px; }
  .place-1 { --pedestal-h: 92px; }
  .place-2 { --pedestal-h: 66px; }
  .place-3 { --pedestal-h: 48px; }
  .pedestal-rank { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .ranking-page *,
  .ranking-page *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* «Отправить ссылку клиенту» — в ряду «Позвонить / Открыть amoCRM», своей строкой. */
.contact-row:has(.meetlink-send) {
  grid-auto-flow: row;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.contact-row:has(.meetlink-send) > :only-child,
.contact-row .meetlink-send {
  grid-column: 1/-1;
}
.button.meetlink-send {
  background: #eef3ff;
  border-color: #cfdcfb;
  color: #1f4fc4;
}
.button.meetlink-send:hover { background: #e3ebff; }
.contact-row:has(.meetlink-copy) .meetlink-send { grid-column: auto; }
.contact-row .meetlink-copy svg { width: 16px; height: 16px; }
.meetlink-sent {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--green);
}
.meetlink-sent svg { width: 14px; height: 14px; flex-shrink: 0; }
/* Эксперты РФ: дата и время вместо сетки слотов. */
.booking-times.foreign-datetime {
  border-top: 0;
  min-height: 0;
}
.foreign-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 260px));
  gap: 14px;
}
.foreign-time {
  display: flex;
  align-items: center;
  gap: 6px;
}
.foreign-time select {
  flex: 1;
  min-width: 0;
}

/* A meeting on hold 15+ minutes: the setter gives it a new time before anything else. */
.due-backdrop {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(18, 25, 35, 0.55);
}
.due-screen {
  width: min(520px, 100%);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  background: var(--canvas);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
}
.due-screen h1 {
  margin: 0 0 16px;
}
.due-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.due-list li {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 12px;
}
.due-meeting {
  display: grid;
  gap: 3px;
}
.due-meeting span,
.due-meeting small {
  color: var(--muted);
}
.due-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}
.button.pause-link {
  display: block;
  margin: 18px auto 0;
  color: var(--muted);
  font-weight: 500;
}
