:root {
  --bg: #f3f4f6;
  --card: #ffffff;
  --muted: #7f8a98;
  --text: #1e2732;
  --line: #e2e6ec;
  --blue: #2b78e4;
  --blue-soft: #e8f1ff;
  --green: #43b86e;
  --orange: #f0a14a;
  --red: #e15a60;
  --pink: #f6c7cf;
  --yellow: #f4c542;
  --teal: #1bb6a4;
  --violet: #6b5bd1;
  --shadow: 0 4px 14px rgba(25, 38, 58, 0.08);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: 'Segoe UI', 'Inter', 'Arial', sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: #f7f7f9;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar__left,
.topbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar__right {
  position: relative;
}

.brand {
  font-size: 20px;
  font-weight: 700;
  color: #1f76d2;
  letter-spacing: 0.2px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot--green { background: #36c275; }
.dot--blue { background: #5aa1ff; }
.dot--orange { background: #f2a247; }
.dot--red { background: #e0575b; }
.dot--teal { background: #1ab6a1; }
.dot--violet { background: #7b5be5; }
.dot--lime { background: #74c043; }
.dot--yellow { background: #f1c232; }
.dot--pink { background: #f37aa1; }
.dot--purple { background: #8f6cf0; }

.pill-group { display: flex; gap: 6px; margin-left: 4px; }

.pill {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 4px 8px;
  font-weight: 600;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pill--red { border-color: #f3b0b2; color: #d25257; }
.pill--blue { border-color: #a8c8f7; color: #2e7be8; }
.pill--green { border-color: #b7e1c5; color: #2f9b5d; }
.pill--orange { border-color: #f4d0a7; color: #c57825; }

.pill__icon {
  width: 13px;
  height: 13px;
  display: inline-block;
  background: currentColor;
  mask-image: var(--pill-icon);
  -webkit-mask-image: var(--pill-icon);
  mask-size: cover;
  -webkit-mask-size: cover;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  flex: 0 0 13px;
}

.pill__icon--calls {
  --pill-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6.6 10.2a15.5 15.5 0 0 0 7.2 7.2l2.4-2.4a1 1 0 0 1 1-.24 11.4 11.4 0 0 0 3.6.6 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A18 18 0 0 1 4 5a1 1 0 0 1 1-1h3.2a1 1 0 0 1 1 1 11.4 11.4 0 0 0 .6 3.6 1 1 0 0 1-.24 1z"/><path d="M15 5a5 5 0 0 1 4 4h-2a3 3 0 0 0-2-2z"/></svg>');
}

.pill__icon--police {
  --pill-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2l8 3v6c0 5.5-3.8 9.8-8 11-4.2-1.2-8-5.5-8-11V5z"/><path d="M12 6l1.3 2.6 2.9.4-2.1 2 0.5 2.9L12 12.5 9.4 13.9l.5-2.9-2.1-2 2.9-.4z"/></svg>');
}

.pill__icon--ems {
  --pill-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect x="9" y="3" width="6" height="18" rx="1"/><rect x="3" y="9" width="18" height="6" rx="1"/></svg>');
}

.pill__icon--mcsh {
  --pill-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2c3 3.2 5 5.6 5 9a5 5 0 1 1-10 0c0-1.9.8-3.7 2.4-5.6-.1 1.8.5 3 1.6 3.9.4-2.4 1.3-4.2 1-7.3z"/><path d="M10 16a2 2 0 1 0 4 0c0-1.2-.7-2.1-1.7-2.8.1.9-.1 1.5-.5 1.9-.5-.4-.8-1-.8-1.8-.6.7-1 1.5-1 2.7z"/></svg>');
}

.media-controls { display: flex; gap: 6px; }

.icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s ease;
}

.icon-btn:hover { box-shadow: var(--shadow); }
.icon-btn.is-active { border-color: var(--blue); color: var(--blue); }
.icon-btn--danger { background: #ffebee; border-color: #f5a4a6; color: #d64c50; }
.icon-btn--ok { background: #e7f8ee; border-color: #8bd1a2; color: #2f9b5d; }

.icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  background: currentColor;
  mask-size: cover;
  -webkit-mask-size: cover;
}

.icon--menu { mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect x="3" y="6" width="18" height="2"/><rect x="3" y="11" width="18" height="2"/><rect x="3" y="16" width="18" height="2"/></svg>'); }
.icon--play { mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><polygon points="8,5 20,12 8,19"/></svg>'); }
.icon--pause { mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect x="6" y="5" width="4" height="14"/><rect x="14" y="5" width="4" height="14"/></svg>'); }
.icon--bell { mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 22a2 2 0 0 0 2-2h-4a2 2 0 0 0 2 2z"/><path d="M18 16v-5a6 6 0 1 0-12 0v5l-2 2h16l-2-2z"/></svg>'); }
.icon--gear { mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19.14 12.94a7.43 7.43 0 0 0 .05-.94 7.43 7.43 0 0 0-.05-.94l2.03-1.58-1.92-3.32-2.39.96a7.1 7.1 0 0 0-1.63-.94l-.36-2.54h-3.84l-.36 2.54a7.1 7.1 0 0 0-1.63.94l-2.39-.96-1.92 3.32 2.03 1.58a7.43 7.43 0 0 0-.05.94 7.43 7.43 0 0 0 .05.94l-2.03 1.58 1.92 3.32 2.39-.96c.5.38 1.05.7 1.63.94l.36 2.54h3.84l.36-2.54c.58-.24 1.13-.56 1.63-.94l2.39.96 1.92-3.32-2.03-1.58z"/><circle cx="12" cy="12" r="3"/></svg>'); }
.icon--user { mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><circle cx="12" cy="8" r="4"/><path d="M4 20a8 8 0 0 1 16 0z"/></svg>'); }
.icon--phone { mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6.6 10.2a15.5 15.5 0 0 0 7.2 7.2l2.4-2.4a1 1 0 0 1 1-.24 11.4 11.4 0 0 0 3.6.6 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A18 18 0 0 1 4 5a1 1 0 0 1 1-1h3.2a1 1 0 0 1 1 1 11.4 11.4 0 0 0 .6 3.6 1 1 0 0 1-.24 1z"/></svg>'); }
.icon--mic { mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 14a3 3 0 0 0 3-3V6a3 3 0 0 0-6 0v5a3 3 0 0 0 3 3z"/><path d="M19 11a7 7 0 0 1-14 0"/><path d="M12 18v3"/><path d="M8 21h8"/></svg>'); }
.icon--volume { mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 9v6h4l5 5V4L8 9H4z"/><path d="M16 8a5 5 0 0 1 0 8"/></svg>'); }
.icon--record { mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><circle cx="12" cy="12" r="6"/></svg>'); }
.icon--hang { mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 12a9 9 0 0 1 18 0v4H3z"/><rect x="7" y="12" width="2" height="5"/><rect x="15" y="12" width="2" height="5"/></svg>'); }
.icon--map { mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15 5l-6 2-6-2v14l6 2 6-2 6 2V7z"/></svg>'); }
.icon--chat { mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 4h16v12H7l-3 4z"/></svg>'); }
.icon--book { mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 5h14a2 2 0 0 1 2 2v12H6a2 2 0 0 0-2 2z"/><path d="M6 3h12v14H6a2 2 0 0 0-2 2V5a2 2 0 0 1 2-2z"/></svg>'); }
.icon--chart { mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 19h16v2H2V3h2z"/><rect x="7" y="11" width="3" height="6"/><rect x="12" y="7" width="3" height="10"/><rect x="17" y="4" width="3" height="13"/></svg>'); }

.btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 6px 10px;
  border-radius: 2px;
  font-size: 12px;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn--primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.btn--outline { border-color: #9cc1f5; color: var(--blue); background: #f7fbff; }
.btn--ghost { background: transparent; border-color: #cfe0fb; color: #2e7be8; }
.btn--danger { background: #ffe9ea; color: #d34e53; border-color: #f2b1b3; }
.btn--icon { display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { box-shadow: var(--shadow); }

.chip {
  background: #eef3fb;
  border: 1px solid #cfe0fb;
  color: #2e7be8;
  padding: 4px 10px;
  border-radius: 2px;
  font-size: 12px;
  cursor: pointer;
}

.chip--toggle { background: #f8f9fb; color: #48566a; border-color: #dde2e9; }
.chip--toggle.is-active { background: #e8f0ff; color: #2e7be8; border-color: #b7d1ff; }

.toolbar { display: flex; align-items: center; gap: 8px; }

.topbar-volume {
  min-width: 154px;
  display: grid;
  grid-template-columns: 16px minmax(72px, 1fr) 38px;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border: 1px solid #d8e3f3;
  border-radius: 4px;
  background: #fff;
  color: #344b68;
  font-size: 11px;
  cursor: pointer;
}

.topbar-volume .icon {
  width: 14px;
  height: 14px;
  background-color: #2e7be8;
}

#dispatch-top-volume {
  width: 100%;
  min-width: 0;
}

#dispatch-top-volume-value {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.user { display: flex; align-items: center; gap: 6px; }
.user__name { font-size: 12px; color: #364a63; }

.dispatch-settings {
  position: absolute;
  top: 36px;
  right: 0;
  min-width: 240px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fff;
  box-shadow: var(--shadow);
  z-index: 50;
}

.dispatch-settings__title {
  font-weight: 700;
  font-size: 12px;
  margin-bottom: 8px;
}

.dispatch-settings__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #4b5d75;
  margin-bottom: 8px;
}

#dispatch-master-volume,
#emergency-ring-volume {
  width: 100%;
}

.dispatch-settings__row--spaced {
  margin-top: 12px;
}

.subnav {
  display: flex;
  gap: 12px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.subnav__tab {
  background: #fff;
  border: 1px solid transparent;
  padding: 6px 12px;
  border-radius: 2px;
  font-weight: 600;
  color: #5a6c83;
  cursor: pointer;
  font-size: 12px;
}

.subnav__tab.is-active {
  border-color: #b6cff5;
  color: #2e7be8;
  background: #f4f8ff;
}

.content { padding: 12px; }

.grid--call {
  display: grid;
  grid-template-columns: 320px 1fr 320px;
  gap: 12px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: var(--shadow);
}

.panel--wide { padding: 8px; }
.panel--narrow { padding: 8px; }
.panel--flat { padding: 10px; box-shadow: none; }

.panel__section { padding: 10px; border-bottom: 1px solid var(--line); }
.panel__section:last-child { border-bottom: none; }
.panel__title { font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.panel__subtitle { font-weight: 600; margin-bottom: 6px; color: #5a6c83; font-size: 12px; }

.meta { font-size: 11px; color: var(--muted); margin-bottom: 6px; }

.badges { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 10px; }

.badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 2px;
  background: #f1f3f6;
  border: 1px solid #e1e4ea;
  color: #5a6c83;
}

.badge--gold { background: #fff2df; color: #c07a2a; border-color: #f0cfa1; }
.badge--blue { background: #e9f1ff; color: #2e7be8; border-color: #cfe1ff; }
.badge--red { background: #ffe9ea; color: #d34e53; border-color: #f2b1b3; }
.badge--pink { background: #f7d7df; color: #d14b66; border-color: #f2b0c3; }
.badge--error { background: #ffe0e0; color: #c83b3f; border-color: #f3a0a2; }
.badge--green { background: #e8f8f0; color: #2f9b5d; border-color: #bfe7cf; }
.badge--orange { background: #fff1df; color: #b87427; border-color: #f1d1a2; }
.badge--yellow { background: #fff8dd; color: #b28a1e; border-color: #f5e3a1; }

.row { display: flex; gap: 6px; align-items: center; }
.row--space { justify-content: space-between; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }

.label { font-size: 11px; color: #6b7c93; }
.value { font-weight: 600; font-size: 11px; }

label { font-size: 11px; color: #5f6f85; display: block; }
input, select, textarea {
  width: 100%;
  border: 1px solid #dde2e9;
  border-radius: 2px;
  padding: 5px 8px;
  font-size: 12px;
  background: #fff;
  margin-top: 4px;
}

textarea { resize: vertical; }

.form-grid {
  display: grid;
  gap: 8px;
  margin: 6px 0;
}

.form-grid--two { grid-template-columns: repeat(2, 1fr); }
.form-grid--three { grid-template-columns: repeat(3, 1fr); }
.form-grid--five { grid-template-columns: repeat(5, 1fr); }

.checkbox, .radio { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }

.link { color: #2e7be8; font-size: 12px; text-decoration: none; border: none; background: none; cursor: pointer; }

.table {
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
  font-size: 12px;
}

.table__head {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr 1fr 90px;
  background: #f7f8fb;
  padding: 0;
  font-weight: 600;
}

.table__body .table__row {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr 1fr 90px;
  gap: 6px;
  padding: 8px;
  border-top: 1px solid var(--line);
  align-items: center;
}

.table__row.is-active { background: #eef7ef; }

.th {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border: none;
  background: transparent;
  font-weight: 600;
  font-size: 12px;
  color: #4b5f79;
  cursor: pointer;
  text-align: left;
}

.th:hover { background: #eef3fb; }

.sort {
  width: 10px;
  height: 12px;
  position: relative;
}

.sort::before,
.sort::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
}

.sort::before {
  top: 0;
  border-bottom: 5px solid #b7c1d1;
}

.sort::after {
  bottom: 0;
  border-top: 5px solid #b7c1d1;
}

.th.is-asc .sort::before { border-bottom-color: #2e7be8; }
.th.is-desc .sort::after { border-top-color: #2e7be8; }

.eos-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.tab {
  border: 1px solid #d8dde5;
  background: #f8f9fb;
  border-radius: 2px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
.tab.is-active { background: #e8f0ff; border-color: #b7d1ff; color: #2e7be8; }

.eos-list { display: flex; flex-direction: column; gap: 8px; }
.eos-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px; border: 1px dashed #d7dde6; border-radius: 3px; }
.eos-item__title { font-weight: 600; font-size: 12px; }
.eos-item__sub { font-size: 11px; color: var(--muted); }

.call { padding: 8px; background: #f7f9fc; border-radius: 3px; }
.call__meta { font-size: 12px; color: var(--muted); }
.call__timer { font-weight: 600; font-size: 14px; margin: 6px 0; }
.call__participants { display: flex; flex-direction: column; gap: 8px; }
.person { display: flex; align-items: center; gap: 8px; }
.person__name { font-weight: 600; font-size: 12px; }
.person__role { font-size: 11px; color: var(--muted); }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: #e6eefb; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.is-speaking .avatar { background: #e6f7ff; }

.call-controls { display: flex; justify-content: space-between; gap: 6px; margin-top: 10px; }

.filters { display: grid; grid-template-columns: repeat(8, minmax(100px, 1fr)); gap: 8px; margin-bottom: 12px; }

.filters-panel {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr)) 120px;
  gap: 8px;
  padding: 10px;
  background: #f7f9fb;
  border: 1px solid var(--line);
  border-radius: 3px;
  margin-bottom: 10px;
}

.stat-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 12px; }

.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 12px;
}

.stat-card__title { font-size: 12px; color: #6b7c93; }
.stat-card__value { font-size: 26px; font-weight: 700; color: #1c62c3; margin-top: 6px; }

.charts { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 2px; padding: 10px; }
.card__title { font-weight: 600; margin-bottom: 10px; }

.bar-chart { display: grid; grid-template-columns: repeat(8, 1fr); align-items: end; gap: 10px; height: 240px; }

.bar { background: #dfeafb; border-radius: 2px 2px 0 0; position: relative; height: var(--h); display: flex; align-items: flex-end; justify-content: center; }
.bar:nth-child(3), .bar:nth-child(7) { background: #1f76d2; }
.bar:nth-child(5), .bar:nth-child(8) { background: #86b8f5; }
.bar span { position: absolute; top: -20px; font-size: 11px; color: #5a6c83; }
.bar__label { position: absolute; bottom: -20px; font-size: 11px; color: #6b7c93; }

.donut {
  width: 220px;
  height: 220px;
  margin: 10px auto;
  border-radius: 50%;
  background: conic-gradient(
    #5aa1ff 0 18%,
    #74c043 18% 32%,
    #f2a247 32% 44%,
    #f37aa1 44% 57%,
    #19b6a1 57% 63%,
    #7b5be5 63% 71%,
    #f1c232 71% 80%,
    #1f76d2 80% 88%,
    #e0575b 88% 100%
  );
  position: relative;
}

.donut::after {
  content: '';
  position: absolute;
  inset: 26px;
  background: #fff;
  border-radius: 50%;
}

.donut__center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  z-index: 1;
}

.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 12px; }
.legend__item { display: flex; justify-content: space-between; align-items: center; gap: 6px; }

.page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.search-row { display: flex; gap: 8px; margin-top: 6px; }

.table--requests .table__head,
.table--requests .table__body .table__row {
  grid-template-columns: 90px 130px 200px 260px 120px 140px 70px 110px 160px;
}

.table--requests .table__body .table__row { align-items: start; }

.table--requests .table__body .table__row.is-highlight { background: #f6f0f2; }
.table--requests .table__body .table__row.is-danger { background: #f7e9e9; }

.pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.pager { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.pager .btn.is-active { background: #e8f0ff; border-color: #b7d1ff; color: #2e7be8; }

.page-list { display: flex; gap: 4px; }

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.3); }
.modal__card {
  position: relative;
  background: #fff;
  border-radius: 2px;
  padding: 18px;
  width: 320px;
  box-shadow: var(--shadow);
  z-index: 1;
  text-align: center;
}

.modal__card--wide {
  width: 380px;
  text-align: left;
}

.modal__title { font-weight: 600; margin-bottom: 8px; }
.modal__timer { font-size: 16px; margin-bottom: 6px; color: #d34e53; }
.modal__phone { font-weight: 600; margin-bottom: 10px; }
.modal__body { font-size: 12px; color: #5f6f85; text-align: left; display: grid; gap: 6px; margin-bottom: 12px; }
.btn[disabled] { opacity: 0.55; pointer-events: none; cursor: not-allowed; }

#audio-check-modal .modal__card {
  width: min(720px, 92vw);
  padding: 24px;
  border-radius: 3px;
  text-align: left;
}

#audio-check-modal .modal__title {
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: .2px;
  margin-bottom: 14px;
  color: #1f2f46;
}

#audio-check-modal .modal__body {
  font-size: 14px;
  color: #4e6078;
  gap: 12px;
  margin-bottom: 16px;
}

.audio-check__section {
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 14px;
  background: #ffffff;
  display: grid;
  gap: 10px;
}

.audio-check__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.audio-check__row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.audio-check__row .meta {
  font-size: 13px;
  color: #5a6c83;
}

.audio-check__meter {
  height: 10px;
  border-radius: 2px;
  border: 1px solid var(--line);
  background: #eef2f8;
  overflow: hidden;
}

.audio-check__meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #53c46f 0%, #2e7be8 100%);
  transition: width .08s linear;
}

#audio-check-modal .checkbox {
  font-size: 14px;
}

#audio-check-modal #audio-check-continue {
  min-width: 170px;
  height: 42px;
  font-size: 14px;
  font-weight: 600;
}

.is-hidden { display: none !important; }

.comment-list {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
  max-height: 180px;
  overflow: auto;
  padding-right: 4px;
}

.comment-item {
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 6px 8px;
  background: #fafbfe;
}

.comment-meta {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 2px;
}

.comment-text {
  font-size: 12px;
  color: var(--text);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  padding: 4px 8px;
  border-radius: 2px;
  border: 1px solid var(--line);
  background: #f7f9fc;
  font-size: 11px;
}

.unit-list {
  display: grid;
  gap: 6px;
  max-height: 420px;
  overflow: auto;
}

.row--radio {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: center;
}

.radio-members {
  margin-top: 12px;
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding-right: 6px;
}

.radio-member {
  padding: 8px 10px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}

.radio-member.is-talking {
  border-color: rgba(122, 255, 182, 0.5);
  box-shadow: 0 0 0 1px rgba(122, 255, 182, 0.25) inset;
}

.emergency-ui {
  border: 1px solid #dde3ec;
  border-radius: 2px;
  background: #ffffff;
  overflow: hidden;
}

.emergency-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  border-bottom: 1px solid #e6ebf3;
  background: #fbfcff;
}

.emergency-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: #61738d;
  font-size: 12px;
  font-weight: 600;
  padding: 9px 8px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.emergency-tab .icon {
  width: 13px;
  height: 13px;
}

.emergency-tab.is-active {
  color: #2e7be8;
  border-bottom-color: #2e7be8;
  background: #f6f9ff;
}

.emergency-headline {
  padding: 10px 12px 6px;
  display: grid;
  justify-items: center;
  gap: 4px;
}

.emergency-members-count {
  font-size: 20px;
  font-weight: 700;
  color: #2b3a4f;
}

.emergency-timer {
  font-size: 13px;
  font-weight: 600;
  color: #d14f54;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.emergency-timer::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f05f5f;
}

.emergency-list {
  max-height: 350px;
  overflow: auto;
  padding: 0 10px 10px;
  display: grid;
  gap: 10px;
}

.emergency-empty {
  border: 1px dashed #d5deeb;
  border-radius: 2px;
  padding: 12px;
  font-size: 12px;
  color: #6f819a;
  text-align: center;
  background: #fbfcff;
}

.emergency-participants {
  border: 1px solid #e0e7f1;
  border-radius: 2px;
  background: #ffffff;
  overflow: hidden;
}

.emergency-participant {
  display: grid;
  grid-template-columns: 32px 1fr 10px;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-top: 1px solid #edf1f6;
}

.emergency-participant:first-child { border-top: none; }

.emergency-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #2d7be7;
  background: #e9f2ff;
}

.emergency-avatar.is-self {
  color: #39a254;
  background: #e8f7ed;
}

.emergency-person__name {
  font-size: 13px;
  font-weight: 600;
  color: #2c3b51;
  line-height: 1.2;
}

.emergency-person__meta {
  font-size: 11px;
  color: #7a8aa1;
  margin-top: 1px;
}

.emergency-participant.is-speaking .emergency-person__meta {
  color: #3ba95f;
  font-weight: 600;
}

.emergency-speaking-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #40b35e;
}

.emergency-speaking-dot.is-muted {
  background: #d1d8e3;
}

.emergency-queue {
  display: grid;
  gap: 8px;
}

.emergency-queue-item {
  border: 1px solid #e0e7f1;
  border-radius: 2px;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  background: #ffffff;
}

.emergency-queue-item.is-mine {
  border-color: #9ec3ff;
  box-shadow: 0 0 0 1px rgba(43, 123, 231, 0.12) inset;
}

.emergency-queue-title {
  font-size: 13px;
  font-weight: 700;
  color: #2a3b51;
}

.emergency-queue-meta {
  font-size: 11px;
  color: #74859d;
  margin-top: 2px;
}

.emergency-queue-side {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.emergency-queue-status {
  font-size: 11px;
  font-weight: 700;
  border-radius: 2px;
  padding: 2px 8px;
  background: #fff1df;
  color: #b7782c;
}

.emergency-queue-status.is-accepted {
  background: #e8f0ff;
  color: #2e7be8;
}

.emergency-queue-actions {
  display: flex;
  gap: 6px;
}

.row--emergency-controls {
  margin-top: 10px;
  grid-template-columns: minmax(120px, 1fr) auto auto;
  align-items: center;
}

.emergency-volume-control {
  display: grid;
  grid-template-columns: 16px auto minmax(90px, 1fr) 38px;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid #e0e7f1;
  border-radius: 2px;
  color: #566981;
  background: #f8faff;
  font-size: 11px;
}

.emergency-volume-control .icon {
  width: 14px;
  height: 14px;
  background-color: #2e7be8;
}

#emergency-voice-volume {
  width: 100%;
  min-width: 0;
}

#emergency-voice-volume-value {
  text-align: right;
  color: #2f4057;
  font-weight: 700;
}

.emergency-openmic {
  margin: 0;
  white-space: nowrap;
  color: #4f6078;
  font-size: 12px;
}

#emergency-ptt.is-active {
  filter: brightness(1.07);
  box-shadow: 0 0 0 1px rgba(46, 123, 232, 0.35) inset;
}

#radio-ptt.is-active {
  filter: brightness(1.08);
  box-shadow: 0 0 0 1px rgba(46, 123, 232, 0.35) inset;
}

#radio-mic.is-active {
  border-color: #2e7be8;
  color: #2e7be8;
}

.unit-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fafbfe;
}

.unit-item__name {
  font-size: 12px;
  font-weight: 600;
}

.unit-item__meta {
  font-size: 11px;
  color: var(--muted);
}

.quick-calls {
  display: grid;
  gap: 6px;
}

.quick-call {
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 6px 8px;
  background: #f9fbfe;
  cursor: pointer;
}

.quick-call:hover { box-shadow: var(--shadow); }

.quick-call__title { font-size: 12px; font-weight: 600; }
.quick-call__meta { font-size: 11px; color: var(--muted); }

.dispatch-notepad {
  min-height: 160px;
  font-size: 13px;
  line-height: 1.45;
}

.service-chat {
  display: grid;
  gap: 8px;
  padding-top: 8px;
}

.service-chat__list {
  min-height: 220px;
  max-height: 340px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--line);
  background: #f8fafc;
}

.service-chat__message {
  padding: 7px 8px;
  border-left: 3px solid var(--blue);
  background: #fff;
  box-shadow: 0 1px 3px rgba(25, 38, 58, 0.08);
}

.service-chat__meta {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.service-chat__text {
  color: var(--text);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.records-panel {
  min-height: calc(100vh - 122px);
}

.records-search {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(260px, 2fr) minmax(260px, 2fr) auto;
  align-items: end;
  gap: 10px;
  margin: 12px 0 8px;
}

.records-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(0, 2fr);
  gap: 12px;
  margin-top: 12px;
}

.records-results,
.records-details {
  min-height: 420px;
  border: 1px solid var(--line);
  background: #fff;
}

.records-results {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.records-result {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.records-result:hover,
.records-result.is-active {
  background: var(--blue-soft);
}

.records-result.is-active {
  box-shadow: inset 3px 0 0 var(--blue);
}

.records-result__title {
  font-size: 13px;
  font-weight: 700;
}

.records-result__meta {
  color: var(--muted);
  font-size: 11px;
}

.records-details {
  padding: 16px;
}

.records-details__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.records-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.records-field {
  padding: 10px;
  border: 1px solid var(--line);
  background: #f9fbfe;
}

.records-field__label {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
}

.records-field__value {
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.records-wanted {
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid #f2b1b3;
  background: #ffe9ea;
  color: #b53238;
  font-weight: 700;
}

.records-empty {
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

@media (min-width: 1800px) {
  .topbar { min-height: 58px; padding: 12px 18px; }
  .topbar :where(button, span, div),
  .subnav__tab,
  .page :where(button, input, select, textarea, label, a, div, span) {
    font-size: clamp(14px, 0.48vw, 18px);
  }
  .topbar .brand { font-size: clamp(24px, 0.72vw, 28px); }
  .icon-btn {
    width: clamp(34px, 1.05vw, 40px);
    height: clamp(34px, 1.05vw, 40px);
  }
  .icon {
    width: clamp(18px, 0.56vw, 22px);
    height: clamp(18px, 0.56vw, 22px);
  }
  .pill__icon {
    width: clamp(16px, 0.5vw, 20px);
    height: clamp(16px, 0.5vw, 20px);
    flex-basis: clamp(16px, 0.5vw, 20px);
  }
  .pill { padding: 7px 11px; }
  .subnav { gap: 16px; padding: 11px 18px; }
  .subnav__tab { padding: 8px 14px; }
  .content { padding: clamp(16px, 0.8vw, 28px); }
  .grid--call {
    grid-template-columns: clamp(360px, 16vw, 520px) minmax(720px, 1fr) clamp(360px, 16vw, 520px);
    gap: clamp(14px, 0.7vw, 24px);
  }
  .panel--wide,
  .panel--narrow,
  .panel--flat { padding: 12px; }
  .panel__section { padding: 14px; }
  .panel__title { font-size: clamp(18px, 0.56vw, 22px); }
  .panel__subtitle,
  .btn,
  .chip,
  .subnav__tab,
  .pill,
  .table,
  input,
  select,
  textarea { font-size: clamp(14px, 0.48vw, 18px); }
  label,
  .label,
  .value,
  .meta,
  .badge,
  .user__name,
  .quick-call__title,
  .quick-call__meta,
  .service-chat__meta,
  .service-chat__text,
  .records-result__meta,
  .records-field__label { font-size: clamp(14px, 0.44vw, 17px); }
  input,
  select,
  textarea { min-height: 38px; padding: 10px 12px; }
  .btn { min-height: 38px; padding: 9px 14px; }
  .records-result__title,
  .records-field__value { font-size: clamp(15px, 0.5vw, 19px); }
  .stat-card__value { font-size: clamp(30px, 0.9vw, 38px); }
  .donut__center { font-size: clamp(30px, 0.9vw, 38px); }
  .comment-list,
  .history-list,
  .service-chat__list { max-height: 420px; }
}

@media (max-width: 1400px) {
  .grid--call { grid-template-columns: 300px 1fr 300px; }
  .filters { grid-template-columns: repeat(4, minmax(120px, 1fr)); }
  .stat-cards { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1100px) {
  .grid--call { grid-template-columns: 1fr; }
  .charts { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .records-search { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .records-layout { grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr); }
}

@media (max-width: 860px) {
  .topbar { flex-direction: column; align-items: flex-start; gap: 8px; }
  .topbar__right { width: 100%; justify-content: space-between; }
  .topbar-volume { min-width: 140px; }
  .subnav { flex-wrap: wrap; }
  .filters { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
  .stat-cards { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .pagination { flex-direction: column; align-items: flex-start; gap: 8px; }
  .filters-panel { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
  .records-search,
  .records-layout,
  .records-fields { grid-template-columns: 1fr; }
}


