@font-face {
  font-family: "Mulish";
  src: url("/fonts/mulish-300.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Mulish";
  src: url("/fonts/mulish-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Mulish";
  src: url("/fonts/mulish-500.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Mulish";
  src: url("/fonts/mulish-600.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Mulish";
  src: url("/fonts/mulish-700.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Mulish";
  src: url("/fonts/mulish-900.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ───────────────────────── База */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #FFFFFF;
  --card: #ffffff;
  --text: #383A3F;
  --graphite: #383A3F;
  --muted: #6F6F73;
  --line: #E3E3E3;
  --accent: #03FF80;
  --accent-ink: #000000;
  --accent-soft: rgba(3, 255, 128, 0.14);
  --ok: #03FF80;
  --ok-soft: rgba(3, 255, 128, 0.14);
  --warn: #F5A623;
  --warn-soft: #FFF6E5;
  --danger: #E5484D;
  --danger-soft: #FDECEC;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(56, 58, 63, 0.05), 0 14px 36px -24px rgba(56, 58, 63, 0.28);
  --font: "Mulish", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: #383A3F;
  text-decoration-color: #03FF80;
  text-underline-offset: 3px;
}

.accent-text {
  position: relative;
  z-index: 0;
  color: #000;
  padding: 0 0.06em;
}

.accent-text::before {
  content: "";
  position: absolute;
  inset: 0.04em -0.05em;
  background: var(--accent);
  transform: skewX(-15deg);
  z-index: -1;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  color: #000;
}

h1 {
  font-weight: 900;
  letter-spacing: -0.03em;
}

h2 {
  font-weight: 700;
  letter-spacing: -0.015em;
}

h3 {
  font-weight: 700;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 24px 72px;
}

.container.narrow {
  max-width: 780px;
}

/* ───────────────────────── Шапка */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid #ECECEC;
}

.topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
  height: 80px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand-logo {
  display: block;
  height: 26px;
  width: auto;
}

.brand-point {
  padding-left: 14px;
  border-left: 1px solid #E3E3E3;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #6F6F73;
  white-space: nowrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  min-width: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #03FF80, #03FF80);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  flex: none;
}

.brand small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0;
}

.nav {
  margin-left: auto;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.nav a {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #6F6F73;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.nav a:hover {
  background: #F5F5F5;
  color: #000;
}

.nav a.active {
  color: #000;
  background: var(--accent);
  font-weight: 700;
}

/* ───────────────────────── Панели */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
}

.panel + .panel {
  margin-top: 0;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.panel-head h2 {
  font-size: 20px;
  letter-spacing: -0.01em;
}

.panel-head .spacer {
  margin-left: auto;
}

.lead {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  margin-top: 6px;
}

/* ───────────────────────── Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.08s, box-shadow 0.15s, background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.btn:hover:not(:disabled) {
  border-color: #DCDCDC;
  background: #FFFFFF;
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary:disabled,
.btn-ok:disabled {
  opacity: 1;
  background: #F2F2F2;
  border-color: #E7E7E7;
  color: #A3A3A3;
  box-shadow: none;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  font-weight: 700;
  box-shadow: none;
}

.btn-primary:hover:not(:disabled) {
  background: #00E066;
  border-color: #00E066;
}

.btn-ok {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  font-weight: 700;
}

.btn-ok:hover:not(:disabled) {
  background: #00E066;
  border-color: #00E066;
}

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

.btn-ghost:hover:not(:disabled) {
  background: #F2F2F2;
  border-color: transparent;
}

.btn-danger {
  background: var(--danger-soft);
  border-color: #f6c9ca;
  color: #b42318;
}

.btn-danger:hover:not(:disabled) {
  background: #fbe0e0;
  border-color: #f0b4b6;
}

.btn-lg {
  height: 56px;
  padding: 0 26px;
  font-size: 17px;
  border-radius: 14px;
}

.btn-block {
  width: 100%;
}

.icon-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

/* ───────────────────────── Бейджи */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  background: #F2F2F2;
  color: #475467;
  white-space: nowrap;
}

.badge-accent {
  background: var(--accent);
  color: #000;
  font-weight: 700;
}

.badge-dark {
  background: var(--accent);
  color: #000;
}

.badge-ok {
  background: var(--accent);
  color: #000;
  font-weight: 700;
}

.badge-warn {
  background: var(--warn-soft);
  color: #b54708;
}

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

.badge-priority {
  background: #FFFFFF;
  border: 1px solid var(--accent);
  color: #000;
}

/* ───────────────────────── Главная */
.hero {
  padding: 28px 0 8px;
}

.hero h1 {
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -0.03em;
  line-height: 1.1;
  max-width: 780px;
}

.hero .lead {
  font-size: 17px;
  max-width: 620px;
  margin-top: 14px;
}

.hero-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.hero-badges .badge {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  font-weight: 500;
}

.launch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.launch-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.launch-card:hover {
  transform: translateY(-2px);
  border-color: rgba(3, 255, 128, 0.55);
  box-shadow: 0 1px 2px rgba(15, 14, 14, 0.05), 0 18px 40px -20px rgba(3, 255, 128, 0.45);
}

.launch-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 20px;
  background: var(--accent-soft);
}

.launch-card h3 {
  font-size: 17px;
  letter-spacing: -0.01em;
}

.launch-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.launch-card .go {
  margin-top: auto;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.stat {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}

.stat b {
  display: block;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat span {
  font-size: 12.5px;
  color: var(--muted);
}

/* ───────────────────────── Страница талона */
.page-head {
  text-align: center;
  padding: 10px 0 24px;
}

.page-head h1 {
  font-size: clamp(26px, 3.4vw, 36px);
  letter-spacing: -0.025em;
}

.page-head .lead {
  margin-top: 8px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.service-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font: inherit;
  transition: transform 0.12s, border-color 0.15s, box-shadow 0.15s;
}

.service-btn:hover:not(:disabled) {
  border-color: rgba(3, 255, 128, 0.55);
  box-shadow: 0 10px 30px -18px rgba(3, 255, 128, 0.55);
  transform: translateY(-1px);
}

.service-btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.service-prefix {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 19px;
  font-weight: 900;
  color: #000;
  background: var(--accent);
}

.service-body {
  min-width: 0;
}

.service-body strong {
  display: block;
  font-size: 16.5px;
  letter-spacing: -0.01em;
}

.service-body span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}

.queue-hint {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--muted);
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

.check input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  margin: 0;
}

/* Талон */
.stub {
  position: relative;
  border-radius: 20px;
  background:
    radial-gradient(600px 200px at 50% 0%, rgba(3, 255, 128, 0.10) 0%, transparent 70%),
    #fff;
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px -30px rgba(15, 14, 14, 0.4);
  overflow: hidden;
}

.stub.is-called {
  border-color: rgba(3, 255, 128, 0.75);
  background:
    radial-gradient(600px 220px at 50% 0%, rgba(3, 255, 128, 0.12) 0%, transparent 70%),
    #fff;
}

.stub-top {
  padding: 30px 30px 22px;
  text-align: center;
  border-bottom: 1px dashed #E7E7E7;
}

.stub-label {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.stub-number {
  color: #000;
  font-size: clamp(64px, 12vw, 104px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  margin: 10px 0 4px;
}

.stub-service {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.stub-meta {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.stub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 24px 30px;
}

.stub-grid > div span {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 4px;
}

.stub-grid > div strong {
  font-size: 19px;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.stub-status {
  padding: 16px 30px 24px;
  border-top: 1px dashed #E7E7E7;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.stub-status .status-text {
  flex: 1;
  min-width: 200px;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.45;
}

.stub-actions {
  display: flex;
  gap: 10px;
  padding: 0 30px 26px;
  flex-wrap: wrap;
}

.called-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: 15px;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #000;
  box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.35);
  animation: pulse 1.6s infinite;
  flex: none;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 12px rgba(3, 255, 128, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(3, 255, 128, 0);
  }
}

/* ───────────────────────── Оператор */
.op-layout {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.op-side .panel {
  position: sticky;
  top: 84px;
}

.op-window {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.op-window label {
  width: auto;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.op-window .op-note {
  grid-column: 2;
  margin-top: 0;
}

select,
input[type="text"],
input[type="number"],
input[type="date"],
input[type="time"] {
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 12px;
  font: inherit;
  font-size: 14.5px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  max-width: 100%;
  color-scheme: light;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  opacity: 0.45;
  cursor: pointer;
  transition: opacity 0.15s;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover {
  opacity: 0.85;
}

input[type="time"]::-webkit-inner-spin-button {
  display: none;
}

select:focus,
input:focus {
  border-color: #03FF80;
  box-shadow: 0 0 0 3px rgba(3, 255, 128, 0.12);
}

.op-window select {
  flex: 1;
  font-weight: 600;
}

.current-card {
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #FFFFFF;
  padding: 22px;
  text-align: center;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.current-card.is-active {
  background: linear-gradient(180deg, rgba(3, 255, 128, 0.10), #fff);
  border-color: rgba(3, 255, 128, 0.55);
}

.current-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}

.current-number {
  color: #000;
  font-size: 64px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.current-service {
  font-size: 15px;
  font-weight: 600;
}

.current-meta {
  font-size: 13px;
  color: var(--muted);
}

.current-empty {
  color: var(--muted);
  font-size: 15px;
}

.op-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.op-actions .btn-primary {
  grid-column: 1 / -1;
}

.queue-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.queue-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 0.15s, background 0.15s, transform 0.08s;
}

.queue-row:hover {
  border-color: rgba(3, 255, 128, 0.55);
  background: #F7F7F7;
}

.queue-row:active {
  transform: translateY(1px);
}

.queue-row.is-priority {
  border-left: 3px solid var(--accent);
}

.queue-num {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.queue-svc {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
  color: #3A3A3A;
}

.queue-svc-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-order {
  padding-left: 7px;
  border-left: 2px solid var(--accent);
  font-size: 12px;
  font-weight: 600;
  color: #383A3F;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-wait {
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.empty-note {
  padding: 26px 8px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.missed-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.missed-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  font-size: 13.5px;
}

.missed-row .queue-num {
  font-size: 14px;
}

.missed-row .spacer {
  margin-left: auto;
}

details.disclosure {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

details.disclosure summary {
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

details.disclosure summary::-webkit-details-marker {
  display: none;
}

details.disclosure summary::before {
  content: "▸";
  font-size: 11px;
  transition: transform 0.15s;
}

details.disclosure[open] summary::before {
  transform: rotate(90deg);
}

/* ───────────────────────── Экран в зале */
body.display {
  background: #FFFFFF;
  color: #383A3F;
  overflow: hidden;
}

.display-wrap {
  height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: 26px 34px 22px;
  gap: 18px;
}

.display-top {
  display: flex;
  align-items: center;
  gap: 18px;
}

.display-logo {
  display: block;
  height: 28px;
  width: auto;
}

.display-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #000;
}

.display-sub {
  font-size: 13px;
  color: #6F6F73;
}

.display-clock {
  margin-left: auto;
  color: #000;
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.sound-btn {
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid #E3E3E3;
  background: #FFFFFF;
  color: #383A3F;
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sound-btn:hover {
  border-color: var(--accent);
}

.display-main {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calls {
  width: 100%;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.call-card {
  position: relative;
  border-radius: 24px;
  padding: 38px 32px;
  text-align: center;
  background: #F7F7F7;
  border: 2px solid var(--accent);
  box-shadow: 0 24px 60px -46px rgba(56, 58, 63, 0.4);
  overflow: hidden;
}

.call-card.is-fresh {
  animation: call-flash 1.1s ease-out 2;
}

@keyframes call-flash {
  0% {
    background-color: #E4FFF1;
    border-color: #03FF80;
  }
  100% {
    background-color: #F7F7F7;
    border-color: #03FF80;
  }
}

.call-number {
  font-size: clamp(72px, 11vw, 150px);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  color: #000;
  text-shadow: none;
  word-break: break-word;
}

.call-window {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  border-radius: 999px;
  background: #03FF80;
  border: 1px solid #03FF80;
  color: #000;
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.call-service {
  margin-top: 10px;
  color: #6F6F73;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.display-empty {
  text-align: center;
  color: #6F6F73;
}

.display-empty .big {
  font-size: clamp(34px, 4vw, 56px);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #000;
}

.display-empty .small {
  margin-top: 10px;
  font-size: 16px;
}

.display-bottom {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 20px;
  border-radius: 14px;
  background: #F7F7F7;
  border: 1px solid #E7E7E7;
  font-size: 14px;
  color: #6F6F73;
}

.display-bottom b {
  color: #000;
  font-variant-numeric: tabular-nums;
}

.recent {
  margin-left: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.recent-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1px solid #E3E3E3;
  font-size: 13px;
  color: #383A3F;
  font-variant-numeric: tabular-nums;
}

.recent-item span {
  color: #6F6F73;
}

/* ───────────────────────── Админка */
.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.stats-tables {
  display: grid;
  grid-template-columns: 1.4fr minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.stats-tables > div + div {
  border-left: 1px solid var(--line);
  padding-left: 28px;
}

.table-caption {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 600;
}

.stat-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: #FFFFFF;
}

.stat-card b {
  display: block;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.stat-card span {
  font-size: 12.5px;
  color: var(--muted);
}

.chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 140px;
  padding-top: 10px;
  background-image: repeating-linear-gradient(
    to top,
    rgba(15, 14, 14, 0.055) 0 1px,
    transparent 1px 35px
  );
  border-radius: 8px 8px 0 0;
}

.chart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  height: 100%;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 100%;
  width: 100%;
  justify-content: center;
}

.chart-bar {
  width: 12px;
  min-height: 2px;
  border-radius: 3px 3px 1px 1px;
  background: #D9D9D9;
}

.chart-bar.served {
  background: #03FF80;
}

.chart-label {
  font-size: 10.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.chart-legend {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 6px;
  background: #D9D9D9;
}

.legend-dot.served {
  background: #03FF80;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th {
  text-align: left;
  white-space: nowrap;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 600;
  padding: 0 10px 10px;
}

.table td {
  padding: 10px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}

.table td:first-child,
.table th:first-child {
  padding-left: 0;
}

.table td:last-child,
.table th:last-child {
  padding-right: 0;
  text-align: right;
}

.num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.service-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px 100px 170px;
  gap: 12px;
  padding: 0 0 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 600;
}

.service-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px 100px 170px;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.service-row:first-of-type {
  border-top: none;
}

.service-row input[type="text"] {
  width: 100%;
}

.service-row input[type="number"] {
  width: 100%;
}

.service-row .row-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}

.service-row .btn {
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.service-row .icon-btn {
  width: 36px;
  height: 36px;
}

.prefix-input {
  text-transform: uppercase;
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.window-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
  gap: 14px;
}

.window-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: #FFFFFF;
}

.window-head {
  display: flex;
  gap: 10px;
  align-items: center;
}

.window-head input[type="text"] {
  flex: 1;
  font-weight: 600;
}

.window-services {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 12px;
}

.window-services .check {
  font-size: 13px;
}

.window-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.window-foot .spacer {
  margin-left: auto;
}

.add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px 90px auto;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.add-service {
  grid-template-columns: minmax(0, 1fr) 130px auto;
}

.add-window {
  grid-template-columns: 340px max-content;
}

.add-settings {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
}

.add-form input {
  width: 100%;
}

.danger-zone {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #f6c9ca;
  background: #fffafa;
}

.danger-zone p {
  font-size: 13.5px;
  color: var(--muted);
  flex: 1;
  min-width: 220px;
  line-height: 1.45;
}

/* ───────────────────────── Уведомления */
#toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(380px, calc(100vw - 40px));
}

.toast {
  padding: 12px 16px;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1px solid #E3E3E3;
  color: #383A3F;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 18px 40px -22px rgba(56, 58, 63, 0.45);
  animation: toast-in 0.2s ease-out;
}

.toast.error {
  background: #b42318;
}

.toast.ok {
  background: #03FF80;
  color: #000;
  font-weight: 600;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* ───────────────────────── Подсказка на странице талона */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--line);
}

.step b {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  font-size: 12px;
  font-weight: 700;
  color: #000;
  background: var(--accent);
}

.step span {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.4;
}

@media (max-width: 720px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

/* Страница талона: центрируем содержимое по вертикали, как в киоске */
body.ticket-page main {
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 720px) {
  body.ticket-page main {
    min-height: calc(100vh - 104px);
    justify-content: flex-start;
  }
}

/* ───────────────────────── Адаптив */
@media (max-width: 920px) {
  .op-layout,
  .admin-grid,
  .stats-tables,
  .window-grid {
    grid-template-columns: 1fr;
  }



  .op-side .panel {
    position: static;
  }

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

@media (max-width: 720px) {
  .container {
    padding: 20px 16px 56px;
  }

  .topbar-inner {
    padding: 9px 16px;
    height: auto;
    min-height: 58px;
    flex-wrap: wrap;
    row-gap: 4px;
  }

  .brand {
    flex: 1 1 100%;
  }

  .brand-logo {
    height: 22px;
  }

  .brand-point {
    font-size: 11.5px;
    padding-left: 10px;
  }

  .brand small {
    display: none;
  }

  .nav {
    width: 100%;
    margin-left: 0;
    justify-content: center;
    gap: 4px;
  }

  .nav a {
    flex: 1 1 30%;
    text-align: center;
    padding: 8px 6px;
  }

  .nav a {
    padding: 7px 9px;
    font-size: 13px;
  }

  body.home-page .nav {
    display: none;
  }

  .panel {
    padding: 20px;
  }

  .launch-grid,
  .service-grid {
    grid-template-columns: 1fr;
  }

  .stub-top,
  .stub-grid,
  .stub-status,
  .stub-actions {
    padding-left: 20px;
    padding-right: 20px;
  }

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

  .add-service,
  .add-window,
  .add-settings {
    grid-template-columns: 1fr;
  }

  .stats-tables > div + div {
    border-left: none;
    padding-left: 0;
  }

  .service-head {
    display: none;
  }

  .service-row {
    grid-template-columns: minmax(0, 1fr) 88px 34px;
    gap: 8px;
  }

  .service-row .row-actions {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .display-wrap {
    padding: 16px;
    gap: 12px;
  }

  .display-clock {
    font-size: 24px;
  }

  .display-bottom {
    flex-wrap: wrap;
  }

  .recent {
    margin-left: 0;
  }
}

/* ───────────────────────── Технолаб: точки, QR, плакат */
.points-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 16px;
}

.point-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.point-card.is-off {
  opacity: 0.65;
}

.point-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.point-head h3 {
  font-size: 20px;
  letter-spacing: -0.01em;
}

.point-head p {
  font-size: 13px;
  margin-top: 4px;
}

.point-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.point-stats > div {
  background: #F7F7F7;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}

.point-stats b {
  display: block;
  font-size: 22px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.point-stats span {
  font-size: 11.5px;
  color: var(--muted);
}

.point-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}

.point-links .btn {
  height: 40px;
  padding: 0 14px;
  font-size: 14px;
}

.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  padding: 6px 0 20px;
}

.admin-head h1 {
  font-size: 30px;
  letter-spacing: -0.02em;
}

.point-picker {
  display: flex;
  align-items: center;
  gap: 10px;
}

.point-picker > span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
}

.point-picker .cselect-value {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
}

.point-picker select {
  min-width: 200px;
  font-weight: 600;
}

.qr-row {
  display: flex;
  gap: 28px;
  align-items: center;
  flex-wrap: wrap;
}

.qr-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}

.qr-box img {
  display: block;
  width: 190px;
  height: 190px;
}

.qr-info {
  flex: 1;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qr-info h2 {
  font-size: 18px;
}

.qr-link {
  display: block;
  font-size: 12.5px;
  background: #F2F2F2;
  border: 1px dashed var(--line);
  padding: 9px 12px;
  border-radius: 10px;
  color: #3A3A3A;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.qr-hint {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
}

.qr-hint.warn {
  color: #b54708;
}

.qr-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.stack-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stack-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

.stack-form label.check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--text);
  font-size: 14px;
}

.stack-form input[type="text"] {
  width: 100%;
  height: 42px;
}

.stack-form .btn {
  align-self: flex-start;
}

body.poster-page {
  background: #F7F7F7;
}

.poster {
  max-width: 720px;
  margin: 36px auto;
  background: #fff;
  border-radius: 24px;
  border-top: 10px solid var(--accent);
  padding: 0 56px 48px;
  box-shadow: 0 24px 60px -40px rgba(56, 58, 63, 0.35);
  text-align: center;
  overflow: hidden;
}

.poster-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 -56px;
  padding: 26px 56px;
  background: #FFFFFF;
  border-bottom: 1px solid #ECECEC;
  color: #383A3F;
  font-size: 14px;
}

.poster-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.poster-logo {
  display: block;
  height: 28px;
  width: auto;
}

.poster-point {
  font-weight: 600;
  color: #6F6F73;
}

.poster h1 {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-top: 36px;
}

.poster-lead {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
  margin-top: 10px;
}

.poster-qr {
  margin: 26px auto 8px;
  width: max-content;
  padding: 16px;
  border: 3px solid #03FF80;
  border-radius: 16px;
}

.poster-qr img {
  display: block;
  width: 340px;
  height: 340px;
}

.poster-steps {
  list-style: none;
  counter-reset: s;
  padding: 0;
  margin: 18px auto 0;
  max-width: 460px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.poster-steps li {
  counter-increment: s;
  position: relative;
  padding-left: 38px;
  font-size: 15px;
  line-height: 1.4;
}

.poster-steps li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: -2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: #383A3F;
  font-size: 13px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.poster-link {
  margin-top: 22px;
  font-size: 12.5px;
  color: var(--muted);
  font-family: ui-monospace, monospace;
  word-break: break-all;
}

.poster-foot {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

.poster-toolbar {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  gap: 10px;
}

@media (max-width: 720px) {
  .points-grid {
    grid-template-columns: 1fr;
  }

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

  .poster {
    margin: 0;
    border-radius: 0;
    padding: 0 20px 24px;
  }

  .poster-head {
    margin: 0 -20px;
    padding: 18px 20px;
  }

  .poster h1 {
    margin-top: 24px;
  }

  .poster h1 {
    font-size: 28px;
  }

  .poster-qr img {
    width: 260px;
    height: 260px;
  }

  .poster-toolbar {
    position: static;
    justify-content: center;
    padding: 16px;
  }
}

@media print {
  body.poster-page {
    background: #fff;
  }

  .poster {
    margin: 0;
    max-width: none;
    border-radius: 0;
    box-shadow: none;
    padding: 24px;
  }

  .poster-toolbar {
    display: none;
  }

  .poster-qr {
    break-inside: avoid;
  }
}


/* ───────────────────────── Чекбоксы в фирменном стиле */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--graphite);
  border-radius: 4px;
  background: #fff;
  display: inline-grid;
  place-content: center;
  margin: 0;
  cursor: pointer;
  flex: none;
  transition: background 0.12s, border-color 0.12s;
}

input[type="checkbox"]::before {
  content: "";
  width: 10px;
  height: 10px;
  transform: scale(0);
  transition: transform 0.12s;
  background: #000;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}

input[type="checkbox"]:checked::before {
  transform: scale(1);
}

input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}


/* ───────────────────────── Стартовая страница (QR) */
body.start-page main {
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.start-grid {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}

.start-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.12s;
}

.start-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.start-card-body {
  flex: 1;
  min-width: 0;
}

.start-card h2 {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.start-card p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 3px;
}

.start-arrow {
  margin-left: auto;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}

.start-note {
  margin-top: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 720px) {
  body.start-page main {
    min-height: calc(100vh - 80px);
    justify-content: flex-start;
    padding-top: 28px;
  }

  .start-card {
    padding: 18px;
    gap: 12px;
  }

  .start-card h2 {
    font-size: 21px;
  }

  .start-card .badge {
    display: none;
  }
}


/* ───────────────────────── Менеджер */
.manager-kpi {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.manager-kpi .stat-card b {
  font-size: 26px;
}

.manager-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.manager-grid > *,
.op-layout > *,
.admin-grid > *,
.stats-tables > * {
  min-width: 0;
}

.manager-queue {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.manager-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.manager-row.is-priority {
  border-left: 3px solid var(--accent);
}

.manager-num {
  min-width: 48px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.manager-service {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
}

.manager-service-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manager-wait {
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.manager-table-wrap {
  overflow-x: auto;
}

.manager-table th {
  white-space: nowrap;
}

.manager-table td {
  white-space: nowrap;
}

@media (max-width: 920px) {
  .manager-kpi {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manager-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .manager-kpi {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manager-kpi .stat-card:last-child {
    grid-column: 1 / -1;
  }
}


@media (max-width: 900px) {
  .manager-log th:nth-child(3),
  .manager-log td:nth-child(3),
  .manager-log th:nth-child(4),
  .manager-log td:nth-child(4),
  .manager-log th:nth-child(5),
  .manager-log td:nth-child(5),
  .manager-log th:nth-child(6),
  .manager-log td:nth-child(6) {
    display: none;
  }

  .manager-log th,
  .manager-log td {
    white-space: normal;
  }
}


@media (max-width: 720px) {
  .manager-log th:nth-child(7),
  .manager-log td:nth-child(7) {
    display: none;
  }

  .manager-log {
    font-size: 12.5px;
  }

  .manager-log th:nth-child(2),
  .manager-log td:nth-child(2) {
    max-width: 150px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .manager-log th,
  .manager-log td {
    padding-left: 6px;
    padding-right: 6px;
  }
}


/* ───────────────────────── Выравнивание и переполнения */
.stats-tables > div {
  min-width: 0;
  overflow-x: auto;
}

.chart-bar {
  min-height: 0;
}

@media (max-width: 720px) {
  .point-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .point-links .btn {
    width: 100%;
  }

  .stats-tables table {
    font-size: 12.5px;
  }

  .stats-tables th,
  .stats-tables td {
    padding-left: 6px;
    padding-right: 6px;
  }

  .stats-tables th:last-child,
  .stats-tables td:last-child {
    display: none;
  }

  .manager-row .badge-priority {
    display: none;
  }

  .stub-actions {
    flex-direction: column;
  }

  .stub-actions .btn {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .op-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .op-actions #missBtn {
    grid-column: 1 / -1;
  }
}


@media (max-width: 720px) {
  .chart {
    gap: 2px;
  }

  .chart-bar {
    width: 6px;
  }

  .chart-label {
    font-size: 9.5px;
  }
}


@media (max-width: 720px) {
  .service-row {
    grid-template-columns: minmax(0, 1fr) 96px;
    grid-template-areas:
      "name name"
      "avg active"
      "actions actions";
    row-gap: 8px;
  }

  .service-row [data-field="name"] {
    grid-area: name;
  }

  .service-row [data-field="avgMinutes"] {
    grid-area: avg;
    width: 96px;
  }

  .service-row .check {
    grid-area: active;
    justify-self: end;
    align-self: center;
  }

  .service-row .row-actions {
    grid-area: actions;
    justify-self: end;
  }

  .add-service {
    grid-template-columns: minmax(0, 1fr) 96px;
  }

  .add-service input[name="name"] {
    grid-column: 1 / -1;
  }

  .add-service button {
    grid-column: 1 / -1;
  }

  .add-window {
    grid-template-columns: 1fr;
  }

  .add-window input,
  .add-window button {
    width: 100%;
  }

  .qr-actions {
    width: 100%;
  }

  .qr-actions .btn {
    width: 100%;
  }
}


/* мобильные формы и карточки окон */
@media (max-width: 920px) {
  .window-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .window-grid > * {
    min-width: 0;
  }
}

@media (max-width: 720px) {
  .window-card {
    min-width: 0;
    max-width: 100%;
  }

  .service-row input[data-field="avgMinutes"],
  .add-service input[name="avgMinutes"] {
    width: 96px;
  }

  .qr-box {
    align-self: center;
  }

  .qr-row {
    align-items: center;
  }

  .qr-info {
    width: 100%;
  }
}


/* ───────────────────────── Селекты в фирменном стиле */
.cselect {
  position: relative;
  display: flex;
  flex: 1;
  min-width: 0;
}

.cselect-native {
  position: absolute !important;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.cselect-trigger {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0 12px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.cselect-trigger:hover {
  border-color: #C9C9C9;
}

.cselect-trigger:disabled,
.cselect-trigger.is-disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: #FAFAFA;
  border-color: var(--line);
}

.cselect-trigger:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(3, 255, 128, 0.25);
}

.cselect-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cselect-chevron {
  width: 14px;
  height: 14px;
  flex: none;
  color: #6F6F73;
  transition: transform 0.15s;
}

.cselect[data-open="true"] .cselect-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cselect-chevron {
  transform: rotate(180deg);
}

.cselect-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  min-width: 100%;
  padding: 5px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 40px -22px rgba(56, 58, 63, 0.4);
  display: none;
  max-height: 280px;
  overflow: auto;
}

.cselect[data-open="true"] .cselect-menu {
  display: block;
}

.cselect-option {
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.cselect-option:hover {
  background: #F2F2F2;
}

.cselect-option.is-selected {
  background: var(--accent);
  color: #000;
  font-weight: 700;
}

.cselect-option.is-selected:hover {
  background: #00E066;
}

.cselect-check {
  opacity: 0;
  font-weight: 700;
}

.cselect-option.is-selected .cselect-check {
  opacity: 1;
}

.point-picker .cselect {
  flex: 0 0 auto;
  width: 220px;
  max-width: 100%;
}


/* ───────────────────────── Заказ и модальное окно */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(56, 58, 63, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  position: relative;
  width: min(460px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 30px 80px -30px rgba(56, 58, 63, 0.45);
}

.modal h2 {
  font-size: 24px;
  padding-right: 32px;
}

.modal-lead {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  background: #F2F2F2;
  color: #000;
}

.modal-input {
  width: 100%;
  height: 46px;
  margin-top: 16px;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.modal-actions .btn {
  flex: 1 1 140px;
}

body.modal-open {
  overflow: hidden;
}

.stub-order {
  margin-top: 12px;
  max-width: 100%;
  overflow-wrap: anywhere;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(3, 255, 128, 0.16);
  font-size: 13px;
}

.stub-order span {
  color: #6F6F73;
}

.stub-order strong {
  color: #000;
  font-weight: 700;
}

.queue-row.is-static {
  cursor: default;
}

.queue-row.is-static:hover {
  border-color: var(--line);
  background: #fff;
}

.current-order {
  margin-top: 8px;
  max-width: 100%;
  overflow-wrap: anywhere;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(3, 255, 128, 0.18);
  border: 1px solid rgba(3, 255, 128, 0.55);
  font-size: 14px;
}

.current-order span {
  color: #6F6F73;
}

.table-sub {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

@media (max-width: 520px) {
  .modal {
    padding: 22px;
  }
}

/* ───────────────────────── Вход сотрудника */
.login-page {
  display: flex;
  justify-content: center;
  padding-top: 64px;
  padding-bottom: 64px;
}

.login-card {
  width: min(620px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 24px 60px -38px rgba(56, 58, 63, 0.35);
}

.login-head h1 {
  margin-top: 12px;
  font-size: 34px;
}

.login-head .lead {
  margin-top: 8px;
}

.login-error {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #FFF0F0;
  color: #B42318;
  font-size: 14px;
}

.login-academy {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(3, 255, 128, 0.1);
  border: 1px solid rgba(3, 255, 128, 0.45);
  font-size: 14px;
}

.login-academy p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.5;
}

.employee-list {
  margin-top: 22px;
}

.employee-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.employee-sep {
  margin: 18px 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.employee-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.employee-card:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 26px -20px rgba(3, 255, 128, 0.9);
  transform: translateY(-1px);
}

.employee-card.is-manager {
  background: #FAFAFA;
}

.employee-avatar {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  font-size: 13px;
  font-weight: 800;
}

.employee-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.employee-info b {
  font-size: 15px;
}

.employee-info span {
  font-size: 12.5px;
  color: var(--muted);
}

.employee-arrow {
  font-size: 18px;
  color: var(--muted);
}

.login-note {
  margin-top: 20px;
  font-size: 12.5px;
  color: var(--muted);
}

@media (max-width: 560px) {
  .login-page {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .login-card {
    padding: 22px;
  }

  .login-head h1 {
    font-size: 28px;
  }
}

/* ───────────────────────── Смена оператора */
.shift-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 0 0 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.shift-person {
  flex: 1 1 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.shift-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}

.shift-person b {
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shift-person span {
  font-size: 12.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

.shift-alert {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #FFF6E8;
  border: 1px solid #F3D19A;
  color: #7A4A00;
  font-size: 13px;
  line-height: 1.45;
}

.op-window-control {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.op-window-control select,
.op-window-control .cselect {
  flex: 1;
  min-width: 0;
}

.op-note {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.op-note.warn {
  color: #7A4A00;
}

/* ───────────────────────── Смены менеджера */
.manager-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 13px;
}

.staff-lead {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.5;
  max-width: 760px;
}

.shift-form {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(160px, 1.4fr) minmax(140px, 1fr) 150px 110px 110px auto;
  gap: 8px;
  align-items: end;
}

.shift-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.shift-form input,
.shift-form .cselect {
  width: 100%;
  min-width: 0;
}

.shift-form .btn {
  height: 40px;
  white-space: nowrap;
}

.roster-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.roster-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 14px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.roster-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #E3E3E3;
}

.roster-card.has-shift::before {
  background: var(--accent);
}

.roster-card.has-window {
  background: linear-gradient(180deg, rgba(3, 255, 128, 0.07), #fff 58%);
}

.roster-card.is-free {
  background: #FCFCFC;
}

.roster-card:hover {
  border-color: #D6D6D6;
  box-shadow: 0 14px 30px -26px rgba(56, 58, 63, 0.35);
}

.roster-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.roster-head b {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15.5px;
}

.roster-role {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #F2F2F2;
  color: #6F6F73;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.roster-role::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.roster-line {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
}

.roster-line > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.roster-line b {
  color: var(--text);
  font-weight: 700;
}

.roster-dot {
  width: 6px;
  height: 6px;
  margin-top: 5px;
  flex: none;
  border-radius: 50%;
  background: #D9D9D9;
}

.roster-dot.is-on {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(3, 255, 128, 0.16);
}

.roster-window.is-on {
  color: var(--text);
  font-weight: 600;
}

.roster-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.roster-actions:empty {
  display: none;
}

.roster-actions .roster-btn {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  box-shadow: none;
}

.roster-btn:hover {
  border-color: #C9C9C9;
  background: #F7F7F7;
}

.roster-btn-ok {
  border-color: rgba(3, 255, 128, 0.55) !important;
  background: rgba(3, 255, 128, 0.1) !important;
  color: #000 !important;
}

.roster-btn-danger {
  border-color: #F0C7C7 !important;
  background: #FFF8F8 !important;
  color: #B42318 !important;
}

.roster-btn-danger:hover {
  border-color: #E8AAAA !important;
  background: #FFEDED !important;
}

.transfer-select {
  height: 32px;
  flex: 1 1 140px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 8px;
  font: inherit;
  font-size: 12px;
  color: var(--text);
}

.roster-free {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}

.roster-free b {
  color: var(--text);
}

@media (max-width: 920px) {
  .shift-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .shift-form .btn {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .shift-form {
    grid-template-columns: 1fr 1fr;
  }

  .shift-form label:nth-child(1),
  .shift-form label:nth-child(2) {
    grid-column: 1 / -1;
  }
}


.login-demo {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--muted);
}

@media (max-width: 720px) {
  .manager-grid .manager-table th:last-child,
  .manager-grid .manager-table td:last-child {
    display: none;
  }
}

/* ───────────────────────── Личная очередь клиента */
.my-page {
  max-width: 660px;
  padding-top: 22px;
  padding-bottom: 36px;
}

.my-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.my-loading,
.my-error {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

.my-error b {
  display: block;
  color: var(--text);
  font-size: 18px;
}

.my-error p {
  margin: 8px 0 16px;
}

.my-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 26px 22px 22px;
  text-align: center;
}

.my-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--accent);
}

.my-hero.is-called {
  border-color: rgba(3, 255, 128, 0.75);
  box-shadow: 0 20px 50px -36px rgba(3, 255, 128, 1);
}

.my-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.my-number {
  margin-top: 4px;
  font-size: clamp(72px, 22vw, 108px);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.my-service {
  margin-top: 8px;
  font-size: 17px;
  font-weight: 700;
}

.my-badges {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

.my-call {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--accent);
  color: #000;
  text-align: center;
}

.my-call-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.my-call b {
  font-size: 26px;
  line-height: 1.1;
}

.my-done {
  padding: 14px 16px;
  border-radius: 12px;
  background: #F5F5F5;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
}

.my-done.is-missed {
  background: #FFF0F0;
  color: #B42318;
}

.my-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
}

.my-metrics > div {
  min-width: 0;
  padding: 14px 16px;
  background: #fff;
}

.my-metrics span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.my-metrics strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
  font-weight: 800;
}

.my-section {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 18px;
}

.my-section h2 {
  font-size: 19px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.my-section h2 span {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: #F2F2F2;
  font-size: 12px;
  color: var(--muted);
}

.my-windows {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.my-window {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.my-window span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.my-window b {
  font-size: 22px;
}

.my-window.is-busy {
  border-color: rgba(3, 255, 128, 0.7);
  background: rgba(3, 255, 128, 0.07);
}

.my-queue {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.my-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
}

.my-row b {
  min-width: 40px;
  font-size: 15px;
}

.my-row span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.my-row em {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #000;
}

.my-row.is-mine {
  border-color: var(--accent);
  background: rgba(3, 255, 128, 0.1);
}

.my-row.is-mine span {
  color: var(--text);
}

.my-empty {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

.my-updated {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  padding: 2px 0 10px;
}

.my-note {
  margin-top: 16px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}

@media (min-width: 560px) {
  .my-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}


.nav.nav-single {
  justify-content: flex-end;
}

.nav.nav-single a {
  flex: 0 0 auto;
}

@media (max-width: 720px) {
  .nav.nav-single {
    justify-content: center;
  }
}

/* ───────────────────────── Закрытый талон */
.closed-card {
  padding: 42px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.closed-card h2 {
  font-size: 30px;
}

.closed-card p {
  max-width: 420px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.closed-card .stub-actions {
  justify-content: center;
  margin-top: 8px;
}

@media (max-width: 600px) {
  .closed-card {
    padding: 30px 18px;
  }

  .closed-card .stub-actions {
    width: 100%;
    flex-direction: column;
  }

  .closed-card .stub-actions .btn {
    width: 100%;
  }
}


.current-card.is-paused {
  border-color: #E8C98F;
  background: #FFFBF3;
}

.shift-bar .btn-sm {
  padding: 0 9px;
  white-space: nowrap;
}

.device-note {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #FFF6E8;
  border: 1px solid #F3D19A;
  color: #7A4A00;
  font-size: 13px;
  line-height: 1.45;
}

/* ───────────────────────── Журнал действий */
.audit-list {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.audit-row {
  display: grid;
  grid-template-columns: 54px minmax(140px, 0.8fr) minmax(150px, 0.9fr) minmax(0, 1.4fr);
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  font-size: 13px;
  border-top: 1px solid var(--line);
}

.audit-row:first-child {
  border-top: 0;
}

.audit-time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.audit-action {
  color: var(--muted);
}

.audit-detail {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .audit-row {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 2px 8px;
    padding: 9px 10px;
  }

  .audit-time {
    grid-row: span 2;
  }

  .audit-detail {
    grid-column: 2;
    white-space: normal;
  }
}

.priority-form {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.priority-form .cselect,
.priority-form input {
  width: 100%;
  min-width: 0;
}

.transfer-select {
  height: 32px;
  max-width: 100%;
  flex: 1 1 140px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 8px;
  font: inherit;
  font-size: 12px;
  color: var(--text);
}

@media (max-width: 720px) {
  .priority-form {
    grid-template-columns: 1fr;
  }

  .priority-form .btn {
    grid-column: 1 / -1;
  }
}

.sla-banner {
  margin: 16px 0 0;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid #F0C27A;
  background: #FFF6E8;
  color: #7A4A00;
  font-size: 13px;
  font-weight: 600;
}

.hotkeys {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
}

.hotkeys b {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: #FAFAFA;
  color: var(--text);
  font-size: 10.5px;
}

/* ───────────────────────── Фирменные дата и время */
.dt-trigger {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0 10px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font: inherit;
  font-size: 14.5px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.dt-trigger:hover {
  border-color: #C9C9C9;
}

.dt-trigger:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(3, 255, 128, 0.22);
}

.dt-trigger svg {
  flex: none;
  color: #6F6F73;
}

.dt-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dt-popover {
  position: fixed;
  z-index: 200;
  width: 320px;
  max-width: calc(100vw - 24px);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 60px -28px rgba(56, 58, 63, 0.45);
}

.dt-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 15px;
  text-transform: capitalize;
}

.dt-nav {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.dt-nav:hover {
  background: #F7F7F7;
}

.dt-week,
.dt-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.dt-week {
  margin-bottom: 4px;
}

.dt-week span {
  padding: 3px 0;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.dt-day {
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
}

.dt-day:hover {
  background: #F2F2F2;
}

.dt-day.is-empty {
  visibility: hidden;
}

.dt-day.is-today {
  box-shadow: inset 0 0 0 1px var(--accent);
}

.dt-day.is-selected {
  background: var(--accent);
  color: #000;
  font-weight: 800;
}

.dt-cal-foot {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

.dt-time-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}

.dt-time-head span {
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.dt-time-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.dt-time-col {
  max-height: 220px;
  overflow: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  scrollbar-width: thin;
}

.dt-time-option {
  width: 100%;
  height: 32px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.dt-time-option:hover {
  background: #F2F2F2;
}

.dt-time-option.is-selected {
  background: var(--accent);
  color: #000;
  font-weight: 800;
}

.dt-pop-foot {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}
