:root {
  font-family: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  color: #1f1f1f;
  background: #f3f3f3;
  font-synthesis: none;
  --accent: #0067c0;
  --accent-hover: #005a9e;
  --accent-soft: #e8f2fb;
  --surface: #ffffff;
  --surface-alt: #f8f8f8;
  --border: #d9d9d9;
  --border-soft: #e8e8e8;
  --text: #1f1f1f;
  --muted: #666666;
  --danger: #c42b1c;
  --danger-soft: #fbeae8;
  --warning: #8a4b08;
  --warning-soft: #fff4ce;
  --success: #0f6b3e;
  --success-soft: #e7f4ec;
  --sidebar-width: 242px;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: #f3f3f3; color: var(--text); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
[hidden] { display: none !important; }

.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #f3f3f3; }
.login-panel { width: min(390px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 30px; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.login-brand, .sidebar-brand { display: flex; align-items: center; gap: 12px; }
.login-brand { margin-bottom: 28px; }
.login-brand h1 { margin: 0; font-size: 23px; font-weight: 600; }
.login-brand p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.brand-mark { width: 44px; height: 44px; border-radius: 7px; display: grid; place-items: center; color: #fff; background: var(--accent); font-size: 24px; }
.brand-mark.small { width: 34px; height: 34px; border-radius: 5px; font-size: 19px; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); display: flex; flex-direction: column; background: #f8f8f8; border-right: 1px solid var(--border); z-index: 20; }
.sidebar-brand { height: 64px; padding: 0 16px; border-bottom: 1px solid var(--border-soft); }
.sidebar-brand strong, .sidebar-brand span { display: block; }
.sidebar-brand strong { font-size: 14px; font-weight: 600; }
.sidebar-brand span { color: var(--muted); font-size: 11px; margin-top: 1px; }
.nav-list { padding: 10px 8px; display: grid; gap: 2px; overflow-y: auto; }
.nav-item { width: 100%; min-height: 38px; display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: #303030; text-align: left; font-size: 13px; }
.nav-item i { font-size: 18px; color: #555; }
.nav-item:hover { background: #ededed; }
.nav-item.active { background: #e7e7e7; border-color: #dedede; }
.nav-item.active::before { content: ""; position: absolute; width: 3px; height: 18px; margin-left: -11px; border-radius: 3px; background: var(--accent); }
.nav-item.active i { color: var(--accent); }
.nav-divider { height: 1px; background: var(--border-soft); margin: 8px 7px; }
.nav-count { min-width: 19px; height: 19px; padding: 0 5px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: var(--danger); font-size: 10px; font-weight: 600; }
.sidebar-footer { margin-top: auto; padding: 10px; border-top: 1px solid var(--border-soft); }
.profile-card { display: flex; align-items: center; gap: 9px; padding: 8px; margin-bottom: 6px; }
.profile-avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #e5e5e5; color: #555; }
.profile-copy { min-width: 0; }
.profile-copy strong, .profile-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy strong { font-size: 12px; font-weight: 600; }
.profile-copy span { margin-top: 2px; font-size: 11px; color: var(--muted); }

.content { min-height: 100vh; margin-left: var(--sidebar-width); padding: 0 26px 36px; }
.content-header { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--border); margin-bottom: 22px; }
.content-header h1 { margin: 0; font-size: 22px; font-weight: 600; }
.content-header p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.header-actions { display: flex; align-items: center; gap: 9px; }
.status-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); color: var(--muted); font-size: 11px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #999; }
.status-chip.online { color: var(--success); border-color: #b9dbc8; background: var(--success-soft); }
.status-chip.online .status-dot { background: var(--success); }

.page-section { display: none; animation: page-in .15s ease-out; }
.page-section.active { display: block; }
@keyframes page-in { from { opacity: .4; transform: translateY(2px); } to { opacity: 1; transform: none; } }

.toolbar, .section-intro, .panel-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.toolbar { min-height: 60px; margin-bottom: 14px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; }
.toolbar-title strong, .toolbar-title span { display: block; }
.toolbar-title strong { font-size: 13px; }
.toolbar-title span { color: var(--muted); font-size: 11px; margin-top: 2px; }
.toolbar-controls, .inline-controls, .filter-actions, .dialog-actions, .live-actions { display: flex; align-items: center; gap: 8px; }
.compact-field { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.compact-field input, .compact-field select, .inline-controls input { min-height: 32px; }
.section-intro { margin-bottom: 16px; }
.section-intro h2 { margin: 0; font-size: 18px; font-weight: 600; }
.section-intro p { margin: 4px 0 0; color: var(--muted); font-size: 12px; max-width: 740px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.metric-card { min-height: 112px; display: flex; align-items: center; gap: 13px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; }
.metric-icon { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 5px; background: #ededed; color: #4b4b4b; font-size: 20px; }
.metric-card.attention .metric-icon { background: var(--warning-soft); color: var(--warning); }
.metric-card span, .metric-card strong, .metric-card small { display: block; }
.metric-card span { color: var(--muted); font-size: 11px; }
.metric-card strong { margin: 3px 0 2px; font-size: 25px; line-height: 1.1; font-weight: 600; }
.metric-card small { color: #777; font-size: 10.5px; }

.layout-two { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr); gap: 14px; margin-bottom: 14px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; margin-bottom: 14px; overflow: hidden; }
.panel-header { min-height: 58px; padding: 13px 15px; border-bottom: 1px solid var(--border-soft); }
.panel-header h2 { margin: 0; font-size: 14px; font-weight: 600; }
.panel-header p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.search-panel { overflow: visible; }

.button, .icon-button { border: 1px solid transparent; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 500; }
.button { min-height: 32px; padding: 0 12px; font-size: 12px; }
.button i { font-size: 16px; }
.button.primary { color: #fff; background: var(--accent); border-color: var(--accent); }
.button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.button.secondary { color: var(--text); background: #f3f3f3; border-color: #cfcfcf; }
.button.secondary:hover, .button.ghost:hover, .button.tertiary:hover { background: #e9e9e9; }
.button.tertiary, .button.ghost { color: var(--text); background: transparent; border-color: transparent; }
.button.danger { color: #fff; background: var(--danger); border-color: var(--danger); }
.button.danger:hover { background: #a92518; }
.button.full { width: 100%; }
.icon-button { width: 32px; height: 32px; padding: 0; background: transparent; color: #444; font-size: 18px; }
.icon-button:hover { background: #e9e9e9; }

.field { display: grid; gap: 5px; font-size: 11px; color: #4a4a4a; }
.field small { color: var(--muted); font-size: 10.5px; }
input, select, textarea { width: 100%; border: 1px solid #bfbfbf; border-radius: 3px; background: #fff; color: var(--text); outline: none; }
input, select { min-height: 34px; padding: 0 9px; }
textarea { resize: vertical; padding: 8px 9px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
input::placeholder, textarea::placeholder { color: #8b8b8b; }
.form-stack { display: grid; gap: 13px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-error { min-height: 18px; color: var(--danger); font-size: 11px; }
.form-message { min-height: 18px; color: var(--success); font-size: 11px; }
.form-message.error { color: var(--danger); }
.input-with-suffix { display: grid; grid-template-columns: 1fr auto; }
.input-with-suffix input { border-radius: 3px 0 0 3px; }
.input-with-suffix span { min-width: 54px; display: grid; place-items: center; border: 1px solid #bfbfbf; border-left: 0; border-radius: 0 3px 3px 0; background: #f3f3f3; color: var(--muted); }
.switch-field { min-height: 34px; display: flex; align-items: center; gap: 8px; color: #444; font-size: 11px; }
.switch-field input { position: absolute; width: 1px; height: 1px; min-height: 0; margin: 0; padding: 0; opacity: 0; pointer-events: none; overflow: hidden; }
.switch { width: 34px; height: 18px; padding: 2px; border-radius: 10px; background: #8a8a8a; transition: .15s; }
.switch::after { content: ""; display: block; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: .15s; }
.switch-field input:checked + .switch { background: var(--accent); }
.switch-field input:checked + .switch::after { transform: translateX(16px); }

.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 10px 12px; border-bottom: 1px solid var(--border-soft); text-align: left; vertical-align: middle; font-size: 11.5px; }
.data-table th { color: #5f5f5f; background: #fafafa; font-weight: 600; white-space: nowrap; }
.data-table tbody tr:hover { background: #fafafa; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.cell-main { display: block; color: var(--text); font-weight: 500; }
.cell-sub { display: block; color: var(--muted); font-size: 10.5px; margin-top: 2px; }
.cell-actions { display: flex; justify-content: flex-end; gap: 5px; white-space: nowrap; }
.empty-row td { padding: 28px 12px; color: var(--muted); text-align: center; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; min-height: 23px; padding: 0 7px; border: 1px solid #d5d5d5; border-radius: 11px; background: #f6f6f6; color: #555; font-size: 10.5px; white-space: nowrap; }
.status-badge.warning { border-color: #ead9a2; background: var(--warning-soft); color: var(--warning); }
.status-badge.danger { border-color: #efc3be; background: var(--danger-soft); color: var(--danger); }
.status-badge.success { border-color: #badbc8; background: var(--success-soft); color: var(--success); }
.status-badge.neutral { color: #555; }

.bar-list { min-height: 238px; padding: 14px 15px; display: grid; align-content: start; gap: 11px; }
.bar-row { display: grid; grid-template-columns: 72px 1fr 92px; align-items: center; gap: 10px; font-size: 11px; }
.bar-label { color: #4f4f4f; }
.bar-track { height: 8px; overflow: hidden; border-radius: 2px; background: #ececec; }
.bar-fill { height: 100%; min-width: 2px; border-radius: 2px; background: var(--accent); }
.bar-value { color: var(--muted); text-align: right; white-space: nowrap; }
.empty-state { min-height: 220px; display: grid; place-items: center; align-content: center; gap: 7px; padding: 26px; color: var(--muted); text-align: center; }
.empty-state.compact { min-height: 238px; }
.empty-state i { font-size: 28px; color: #888; }
.empty-state strong { color: #4b4b4b; font-size: 13px; }
.empty-state span { font-size: 11px; }

.notice { margin-bottom: 14px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 5px; font-size: 11.5px; }
.notice.neutral { background: #fafafa; color: #555; }
.review-grid { display: grid; gap: 10px; }
.review-card { display: grid; grid-template-columns: minmax(230px, 1.2fr) minmax(240px, .9fr) auto; align-items: center; gap: 16px; padding: 13px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; }
.review-card.priority { border-left: 4px solid var(--warning); padding-left: 11px; }
.review-main strong { display: block; font-size: 13px; font-weight: 600; }
.review-main span { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.review-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }

.filter-grid { display: grid; grid-template-columns: 1.1fr 1.2fr .8fr .8fr 1fr; gap: 10px; align-items: end; padding: 15px; }
.filter-grid .switch-field { grid-column: span 2; }
.filter-actions { justify-content: flex-end; grid-column: -3 / -1; }
.calls-table { min-width: 1320px; }
.calls-table th:nth-child(6),
.calls-table td:nth-child(6),
.recording-audio-cell { min-width: 430px; width: 38vw; }
.recording-audio-wrap { width: 100%; min-width: 380px; max-width: 760px; }
.recording-audio-wrap .audio-player { display: block; width: 100%; min-width: 380px; height: 40px; }
.audio-player { height: 32px; max-width: 100%; }
.audio-player.wide { width: 100%; height: 40px; margin: 4px 0 12px; }
@media (max-width: 720px) {
  .calls-table th:nth-child(6),
  .calls-table td:nth-child(6),
  .recording-audio-cell { min-width: 340px; width: 340px; }
  .recording-audio-wrap,
  .recording-audio-wrap .audio-player { min-width: 320px; }
}

.live-layout { grid-template-columns: minmax(300px, .75fr) minmax(380px, 1.25fr); }
.live-layout .panel { margin-bottom: 0; }
.live-layout .form-stack, .live-session-panel > .live-state, .live-session-panel > .live-actions { margin: 15px; }
.live-state { min-height: 114px; display: flex; align-items: center; gap: 13px; padding: 16px; border: 1px solid var(--border-soft); border-radius: 5px; background: #fafafa; }
.live-state-icon { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 50%; background: #e9e9e9; font-size: 20px; color: #555; }
.live-state strong, .live-state span { display: block; }
.live-state strong { font-size: 13px; }
.live-state span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.live-state.active .live-state-icon { background: var(--success-soft); color: var(--success); }
.live-actions { justify-content: flex-end; }

.notification-list { display: grid; gap: 8px; }
.notification-item { display: grid; grid-template-columns: 34px 1fr auto; align-items: start; gap: 11px; padding: 12px 13px; background: var(--surface); border: 1px solid var(--border); border-radius: 5px; }
.notification-item.unread { border-left: 3px solid var(--accent); padding-left: 11px; }
.notification-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #ededed; color: #555; font-size: 17px; }
.notification-copy strong { display: block; font-size: 12px; }
.notification-copy p { margin: 3px 0 0; color: #555; font-size: 11px; }
.notification-time { color: var(--muted); font-size: 10.5px; white-space: nowrap; }

.settings-layout { grid-template-columns: minmax(340px, .85fr) minmax(280px, .45fr); }
.settings-layout .panel { margin-bottom: 0; }
.settings-layout .form-stack { padding: 15px; }
.storage-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 15px; }
.storage-summary div { padding: 14px; border: 1px solid var(--border-soft); border-radius: 5px; background: #fafafa; }
.storage-summary span, .storage-summary strong { display: block; }
.storage-summary span { color: var(--muted); font-size: 11px; }
.storage-summary strong { margin-top: 5px; font-size: 20px; font-weight: 600; }
.password-grid { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)) auto; gap: 10px; align-items: end; padding: 15px; }
.password-grid .form-message { grid-column: 1 / -1; }

.dialog { width: min(560px, calc(100vw - 28px)); padding: 0; border: 1px solid #bdbdbd; border-radius: 7px; background: var(--surface); color: var(--text); box-shadow: 0 14px 36px rgba(0,0,0,.18); }
.dialog::backdrop { background: rgba(0,0,0,.28); }
.dialog.small-dialog { width: min(420px, calc(100vw - 28px)); }
.dialog.review-dialog { width: min(620px, calc(100vw - 28px)); }
.dialog-body { padding: 17px; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.dialog-header h2 { margin: 0; font-size: 17px; font-weight: 600; }
.dialog-header p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.dialog-actions { justify-content: flex-end; margin-top: 17px; }
.activation-code { padding: 18px; border: 1px solid var(--border); border-radius: 5px; background: #fafafa; text-align: center; font-family: "Cascadia Mono", Consolas, monospace; font-size: 30px; letter-spacing: 7px; font-weight: 600; }
.muted-text { color: var(--muted); font-size: 11px; text-align: center; }

.toast-region { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: grid; gap: 8px; }
.toast { min-width: 260px; max-width: 390px; display: flex; align-items: start; gap: 9px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 5px; background: #fff; box-shadow: 0 7px 20px rgba(0,0,0,.13); font-size: 11.5px; }
.toast.error { border-left: 3px solid var(--danger); }
.toast.success { border-left: 3px solid var(--success); }
.mobile-only, .sidebar-backdrop { display: none; }

@media (max-width: 1150px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-grid { grid-template-columns: repeat(3, 1fr); }
  .filter-grid .switch-field { grid-column: span 1; }
  .filter-actions { grid-column: span 2; }
  .review-card { grid-template-columns: 1fr 1fr; }
  .review-card > :last-child { grid-column: 1 / -1; justify-self: end; }
  .password-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
  .sidebar { transform: translateX(-100%); transition: transform .18s ease; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 19; background: rgba(0,0,0,.28); }
  .sidebar-backdrop.open { display: block; }
  .content { margin-left: 0; padding: 0 16px 28px; }
  .mobile-only { display: inline-flex; }
  .layout-two, .live-layout, .settings-layout { grid-template-columns: 1fr; }
  .settings-layout .panel { margin-bottom: 14px; }
  .filter-grid { grid-template-columns: repeat(2, 1fr); }
  .review-card { grid-template-columns: 1fr; }
  .review-card > :last-child { grid-column: auto; justify-self: stretch; }
}
@media (max-width: 600px) {
  .content-header { min-height: 66px; }
  .content-header p { display: none; }
  .metric-grid { grid-template-columns: 1fr; }
  .toolbar, .section-intro, .panel-header { align-items: flex-start; flex-direction: column; }
  .toolbar-controls { width: 100%; flex-wrap: wrap; }
  .filter-grid, .form-row, .password-grid { grid-template-columns: 1fr; }
  .filter-grid .switch-field, .filter-actions { grid-column: auto; }
  .filter-actions { justify-content: stretch; }
  .filter-actions .button { flex: 1; }
  .bar-row { grid-template-columns: 62px 1fr; }
  .bar-value { grid-column: 2; text-align: left; }
  .notification-item { grid-template-columns: 32px 1fr; }
  .notification-time { grid-column: 2; }
}

/* v1.4: detailed team view and paged audit */
.field-note { margin: 0; color: var(--muted); font-size: 10.5px; line-height: 1.45; }
.clickable-row { cursor: pointer; }
.clickable-row:hover td { background: #f7f9fb; }
.table-open { width: 28px; height: 28px; font-size: 16px; }
.pagination { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 13px; border-top: 1px solid var(--border-soft); color: var(--muted); font-size: 11px; }
.pagination > div { display: flex; align-items: center; gap: 8px; }
.employee-detail-dialog { width: min(1080px, calc(100vw - 36px)); }
.employee-detail-dialog .dialog-body { max-height: calc(100vh - 44px); overflow-y: auto; }
.detail-metric-grid { display: grid; grid-template-columns: repeat(5, minmax(130px, 1fr)); gap: 8px; margin-bottom: 10px; }
.detail-metric { min-height: 82px; display: grid; grid-template-columns: 24px 1fr; grid-template-rows: auto 1fr; column-gap: 7px; padding: 11px; border: 1px solid var(--border-soft); border-radius: 5px; background: #fafafa; }
.detail-metric i { grid-row: 1 / 3; align-self: start; color: #5b5b5b; font-size: 18px; }
.detail-metric span { color: var(--muted); font-size: 10.5px; }
.detail-metric strong { align-self: end; font-size: 17px; font-weight: 600; }
.detail-period-note { margin: 0 0 12px; color: var(--muted); font-size: 11px; }
.detail-grid { display: grid; grid-template-columns: minmax(330px, .8fr) minmax(420px, 1.2fr); gap: 12px; }
.detail-section { margin-top: 12px; border: 1px solid var(--border-soft); border-radius: 5px; overflow: hidden; }
.detail-section h3 { margin: 0; padding: 10px 12px; border-bottom: 1px solid var(--border-soft); background: #fafafa; font-size: 12px; font-weight: 600; }
.compact-table th, .compact-table td { padding-top: 8px; padding-bottom: 8px; }
.detail-table-scroll { max-height: 280px; overflow: auto; }

@media (max-width: 1150px) {
  .detail-metric-grid { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .pagination { align-items: flex-start; flex-direction: column; }
  .pagination > div { width: 100%; justify-content: space-between; }
  .detail-metric-grid { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
}


/* v1.4.2: centrally managed recording applications */
.recording-apps-panel { margin-top: 14px; }
.panel-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.recording-apps-list { display: grid; grid-template-columns: repeat(4, minmax(170px, 1fr)); gap: 8px; padding: 15px; }
.recording-app-item { min-height: 52px; display: grid; grid-template-columns: auto 30px 1fr; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--border-soft); border-radius: 5px; background: #fafafa; cursor: pointer; }
.recording-app-item:hover { border-color: #c5c5c5; background: #f6f6f6; }
.recording-app-item input { margin: 0; }
.recording-app-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 4px; background: #ececec; color: #555; font-size: 15px; }
.recording-app-item strong, .recording-app-item small { display: block; }
.recording-app-item strong { font-size: 11.5px; font-weight: 600; }
.recording-app-item small { margin-top: 2px; color: var(--muted); font-size: 9.5px; }
.recording-apps-unknown { margin: 0 15px 15px; padding: 11px 12px; border: 1px solid var(--border-soft); border-radius: 5px; background: #fafafa; }
.recording-apps-unknown strong, .recording-apps-unknown small { display: block; }
.recording-apps-unknown small { margin-top: 2px; color: var(--muted); font-size: 10.5px; font-weight: 400; }
@media (max-width: 1200px) { .recording-apps-list { grid-template-columns: repeat(3, minmax(170px, 1fr)); } }
@media (max-width: 820px) { .recording-apps-list { grid-template-columns: repeat(2, minmax(150px, 1fr)); } }
@media (max-width: 520px) { .recording-apps-list { grid-template-columns: 1fr; } }

/* v1.5 — журналы удаления и компактные служебные формы */
.compact-filter-grid { grid-template-columns: 1.2fr .8fr .8fr auto; }
.compact-notice { margin: 0; padding: 10px 12px; display: grid; gap: 3px; }
.compact-notice strong { font-size: 12px; font-weight: 600; }
.compact-notice span { font-size: 11px; color: var(--muted); }
.deletion-log-controls { justify-content: flex-start; flex-wrap: wrap; margin-bottom: 12px; }
.deletion-log-controls .compact-field { min-width: 190px; }
@media (max-width: 820px) {
  .compact-filter-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .compact-filter-grid { grid-template-columns: 1fr; }
}

/* v1.6.2: active calls and per-user activity page */
.active-calls-list { padding: 14px; display: grid; gap: 12px; }
.active-call-team { border: 1px solid var(--border-soft); border-radius: 6px; overflow: hidden; background: #fff; }
.active-call-team > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; background: #f7f7f7; border-bottom: 1px solid var(--border-soft); }
.active-call-team > header strong, .active-call-team > header span { display: block; }
.active-call-team > header div > span { color: var(--muted); font-size: 10.5px; margin-top: 2px; }
.active-call-items { display: grid; }
.active-call-card { display: grid; grid-template-columns: minmax(180px, 1fr) auto; gap: 16px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--border-soft); }
.active-call-card:last-child { border-bottom: 0; }
.active-call-card > div:first-child strong, .active-call-card > div:first-child span, .active-call-card > div:first-child small { display: block; }
.active-call-card > div:first-child span, .active-call-card > div:first-child small { color: var(--muted); font-size: 10.5px; margin-top: 2px; }
.active-call-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.active-call-actions time { min-width: 76px; font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
#page-userProfile .section-intro > div { display: grid; gap: 4px; }
#page-userProfile #backToUsers { justify-self: start; margin-bottom: 4px; }
@media (max-width: 760px) {
  .active-call-card { grid-template-columns: 1fr; }
  .active-call-actions { justify-content: space-between; }
}

/* v1.6.2 analytics/live/UI refinement */
.admin-dashboard-only[hidden], .supervisor-dashboard-only[hidden] { display: none !important; }

/* Compact logs: one event should never dominate the page. */
.log-table { table-layout: fixed; min-width: 820px; }
.log-table th, .log-table td { padding: 6px 9px; line-height: 1.25; vertical-align: middle; }
.log-table th:nth-child(1) { width: 145px; }
.log-table th:nth-child(2) { width: 190px; }
.log-table th:nth-child(3) { width: 155px; }
.log-table th:nth-child(4) { width: 105px; }
.log-table th:last-child { width: auto; }
.nowrap-cell { white-space: nowrap; font-variant-numeric: tabular-nums; }
.compact-detail { display: block; max-width: min(42vw, 520px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #505050; }
.log-table .cell-sub { margin-top: 1px; line-height: 1.2; }
.log-table .status-badge { min-height: 20px; padding-inline: 6px; font-size: 10px; }
.pagination { min-height: 42px; padding: 6px 10px; }
.pagination .button { min-height: 28px; padding-inline: 8px; }

.compact-notification-list { gap: 5px; }
.compact-notification-list .notification-item { grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px; min-height: 52px; padding: 7px 9px; border-radius: 4px; }
.compact-notification-list .notification-item.unread { padding-left: 7px; }
.compact-notification-list .notification-icon { width: 28px; height: 28px; font-size: 14px; }
.notification-copy { min-width: 0; }
.notification-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notification-copy p { margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notification-meta { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10.5px; white-space: nowrap; }
.compact-action { min-height: 26px; padding: 0 7px; font-size: 10.5px; }

/* Long-term user analysis. */
.profile-metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.profile-metric { min-height: 96px; padding: 13px 14px; }
.profile-metric > div { min-width: 0; }
.profile-metric strong { font-size: 21px; }
.status-text.success { color: var(--success); }
.status-text.warning { color: var(--warning); }
.status-text.neutral { color: var(--muted); }
.profile-password-panel .password-grid { grid-template-columns: repeat(3, minmax(180px, 1fr)) auto; }

/* Admin analytics tables and team selection. */
.team-controls { flex-wrap: wrap; justify-content: flex-end; }
.team-controls .compact-field { min-width: 230px; }
#dashboardTeamsTable td:last-child, #dashboardPlatformTable td:last-child { white-space: nowrap; }

/* Active calls are inserted/removed without abrupt jumps. */
.active-call-card { transform-origin: top; transition: opacity .17s ease, transform .17s ease, max-height .17s ease, padding .17s ease; max-height: 100px; }
.active-call-card.entering { animation: active-call-enter .22s ease-out both; }
.active-call-card.leaving { opacity: 0; transform: translateY(-5px) scaleY(.96); max-height: 0; padding-top: 0; padding-bottom: 0; overflow: hidden; }
@keyframes active-call-enter { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: none; } }
.active-call-empty { min-height: 108px !important; }

@media (max-width: 1120px) {
  .profile-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-password-panel .password-grid { grid-template-columns: 1fr 1fr; }
  .profile-password-panel .password-grid button { justify-self: start; }
}
@media (max-width: 700px) {
  .profile-metric-grid { grid-template-columns: 1fr; }
  .profile-password-panel .password-grid { grid-template-columns: 1fr; }
  .compact-notification-list .notification-item { grid-template-columns: 28px minmax(0, 1fr); }
  .notification-meta { grid-column: 2; justify-content: space-between; }
  .compact-detail { max-width: 360px; }
}
/* v1.7: desktop release publishing */
.releases-panel { margin-top: 18px; }
.release-upload-grid { display: grid; grid-template-columns: 180px minmax(260px, 1fr); gap: 12px 16px; align-items: end; padding: 15px; border-bottom: 1px solid var(--border-soft); }
.release-notes-field, .release-flags, .release-upload-grid .form-message { grid-column: 1 / -1; }
.release-flags { display: grid; grid-template-columns: repeat(2, minmax(240px, 1fr)); gap: 12px; }
.release-upload-grid > .button { justify-self: start; }
.release-table-scroll { margin-top: 0; }
.release-download { display: inline-flex; align-items: center; gap: 5px; color: var(--text); text-decoration: none; font-weight: 600; }
.release-download:hover { text-decoration: underline; }
.release-hash { font-size: 10px; white-space: nowrap; }
.compact-switch { min-width: 40px; padding: 0; }
.compact-switch > span:last-child { display: none; }
.danger-text { color: var(--danger); }
@media (max-width: 760px) {
  .release-upload-grid { grid-template-columns: 1fr; }
  .release-notes-field, .release-flags, .release-upload-grid .form-message { grid-column: 1; }
  .release-flags { grid-template-columns: 1fr; }
}


/* v1.7.5: server management and consistent card spacing */
.server-metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.server-metric-grid .metric-card strong { font-size: 14px; overflow-wrap: anywhere; }
.server-control-body { display: grid; gap: 12px; justify-items: start; padding: 15px; }
.server-control-body .notice { width: 100%; margin: 0; }
.server-control-body .notice strong,
.server-control-body .notice span { display: block; }
.server-control-body .notice span { margin-top: 3px; color: var(--muted); }
.server-control-body .form-message { min-height: 18px; }
@media (max-width: 900px) {
  .server-metric-grid { grid-template-columns: 1fr; }
}

/* v1.7.2: calmer active-call typography */
.active-call-team > header div > span { display: block; }
.active-call-team-name,
.active-call-name {
  display: block;
  color: var(--text) !important;
  font-size: 12px !important;
  font-weight: 400;
  margin-top: 0 !important;
}
.active-call-card > div:first-child span,
.active-call-card > div:first-child small { display: block; }
.active-call-actions time { font-weight: 400; }

/* v1.7.2: concise employee preview + separate full details */
.employee-summary-dialog { width: min(820px, calc(100vw - 28px)); }
.employee-summary-dialog .dialog-body { max-height: calc(100vh - 44px); overflow-y: auto; }
.compact-metric-grid { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
.compact-metric-grid .detail-metric { min-height: 68px; }
.employee-preview-section { margin-top: 8px; }
@media (max-width: 700px) {
  .compact-metric-grid { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
}

/* v1.7.2: releases are a standalone, ordered administration page */
#page-releases .releases-panel { margin-top: 0; }
.release-version-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.release-version { font-size: 13px; font-weight: 600; }
.release-notes { max-width: 330px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.release-switch { min-width: 76px; gap: 7px; }
.release-switch > span:last-child { display: inline; color: var(--muted); font-size: 10.5px; }

/* v1.7.4: global call filters and upload tracking */
.global-call-filters {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 48px;
  margin: -10px 0 16px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}
.global-call-filter-title { display: flex; align-items: center; gap: 9px; margin-right: auto; }
.global-call-filter-title > i { color: var(--accent); font-size: 19px; }
.global-call-filter-title strong, .global-call-filter-title small { display: block; }
.global-call-filter-title strong { font-size: 12px; }
.global-call-filter-title small { margin-top: 1px; color: var(--muted); font-size: 10px; }
.filter-check { display: inline-flex; align-items: center; gap: 7px; color: #444; font-size: 11px; white-space: nowrap; cursor: pointer; }
.filter-check input { width: 15px; min-height: 15px; accent-color: var(--accent); }
.upload-state { min-width: 155px; display: grid; gap: 5px; }
.upload-state .status-badge { justify-self: start; }
.upload-progress { width: 100%; height: 6px; overflow: hidden; border-radius: 5px; background: #e5e5e5; }
.upload-progress > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .2s ease; }
.review-card .upload-state { max-width: 220px; }
@media (max-width: 900px) {
  .global-call-filters { align-items: flex-start; flex-wrap: wrap; }
  .global-call-filter-title { width: 100%; }
}
@media (max-width: 560px) {
  .global-call-filters { gap: 10px; }
  .filter-check { width: 100%; white-space: normal; }
}

.live-volume-control {
  margin: 0 15px 15px;
  display: grid;
  grid-template-columns: minmax(150px, auto) minmax(150px, 1fr) 48px;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 5px;
  background: #fff;
}
.live-volume-control > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}
.live-volume-control input[type="range"] { width: 100%; accent-color: var(--accent); }
.live-volume-control > strong { text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; }
@media (max-width: 620px) {
  .live-volume-control { grid-template-columns: 1fr 48px; }
  .live-volume-control > span { grid-column: 1 / -1; }
}

/* v1.8.0 — overview, team navigation, live monitoring and user journal */
.dashboard-metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.team-overview-panel { overflow: visible; }
.team-accordion { display: grid; gap: 10px; padding: 14px; }
.team-accordion-item { border: 1px solid var(--border); border-radius: 7px; background: var(--surface); overflow: hidden; transition: border-color .18s ease, box-shadow .18s ease; }
.team-accordion-item:hover { border-color: #c6c6c6; }
.team-accordion-item.open { border-color: #b8cfe5; box-shadow: 0 3px 12px rgba(0, 72, 130, .07); }
.team-accordion-header { width: 100%; min-height: 92px; display: grid; grid-template-columns: minmax(235px, .9fr) minmax(450px, 1.5fr) 28px; align-items: center; gap: 18px; padding: 14px 16px; border: 0; background: #fff; color: var(--text); text-align: left; }
.team-accordion-header:hover { background: #fafafa; }
.team-leader { display: flex; align-items: center; gap: 11px; min-width: 0; }
.team-leader-avatar { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; border-radius: 7px; background: var(--accent-soft); color: var(--accent); font-size: 20px; }
.team-leader span, .team-leader strong, .team-leader small { display: block; }
.team-leader span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.team-leader strong { margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
.team-leader small { margin-top: 3px; color: var(--muted); font-size: 10.5px; }
.team-summary-metrics { display: grid; grid-template-columns: repeat(4, minmax(90px, 1fr)); gap: 8px; }
.team-summary-metrics > div { min-width: 0; padding-left: 12px; border-left: 1px solid var(--border-soft); }
.team-summary-metrics span, .team-summary-metrics strong, .team-summary-metrics small { display: block; }
.team-summary-metrics span { color: var(--muted); font-size: 10px; }
.team-summary-metrics strong { margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.team-summary-metrics small { margin-top: 2px; color: var(--muted); font-size: 9.5px; }
.team-accordion-arrow { justify-self: end; color: #666; font-size: 20px; transition: transform .22s ease; }
.team-accordion-item.open .team-accordion-arrow { transform: rotate(180deg); }
.team-accordion-content { display: grid; grid-template-rows: 0fr; opacity: 0; border-top: 0 solid var(--border-soft); transition: grid-template-rows .24s ease, opacity .18s ease, border-top-width .18s ease; }
.team-accordion-item.open .team-accordion-content { grid-template-rows: 1fr; opacity: 1; border-top-width: 1px; }
.team-member-list { min-height: 0; overflow: hidden; }
.team-member-row { width: 100%; min-height: 58px; display: grid; grid-template-columns: minmax(210px, 1.4fr) repeat(4, minmax(90px, .7fr)) 24px; align-items: center; gap: 10px; padding: 9px 16px; border: 0; border-bottom: 1px solid var(--border-soft); background: #fff; color: var(--text); text-align: left; }
.team-member-row:last-child { border-bottom: 0; }
.team-member-row:hover { background: #f7f9fb; }
.team-member-row span, .team-member-row strong, .team-member-row small { display: block; }
.team-member-row > span:not(.team-member-name) small { color: var(--muted); font-size: 9.5px; }
.team-member-row > span:not(.team-member-name) strong { margin-top: 2px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.team-member-name strong { font-size: 12px; font-weight: 600; }
.team-member-name small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.team-member-row > i { color: #777; font-size: 17px; }
.share-cell { min-width: 150px; display: grid; grid-template-columns: minmax(80px, 1fr) 34px; align-items: center; gap: 8px; }
.share-cell > div { height: 6px; overflow: hidden; border-radius: 4px; background: #e8e8e8; }
.share-cell > div > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.share-cell strong { text-align: right; font-size: 10.5px; font-weight: 600; }

.team-filter-panel { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(430px, 1.2fr); gap: 12px; margin-bottom: 14px; }
.team-filter-primary, .team-filter-period { padding: 12px 14px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.team-filter-kicker { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .02em; }
.team-filter-primary > label { min-height: 36px; display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 7px; }
.team-filter-primary > label > i { color: var(--accent); font-size: 20px; }
.team-filter-primary select { min-height: 36px; font-size: 12px; font-weight: 600; }
.team-filter-period > div { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) auto; align-items: end; gap: 8px; }
.team-filter-field { display: grid; gap: 4px; color: var(--muted); font-size: 10px; }
.team-filter-field input, .team-filter-field select { min-height: 36px; font-size: 12px; }

.live-control-body { padding: 15px; display: grid; gap: 14px; }
.live-target-controls { display: grid; grid-template-columns: minmax(220px, 1fr) auto; align-items: end; gap: 10px; }
.live-target-controls .button { min-height: 34px; }
.live-session-summary { min-height: 108px; display: grid; grid-template-columns: minmax(260px, 1fr) minmax(480px, 1.5fr); align-items: center; gap: 18px; padding: 14px; border: 1px solid var(--border-soft); border-radius: 6px; background: #fafafa; }
.live-session-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.live-session-avatar { width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; border-radius: 8px; background: #e9eef3; color: #465b6e; font-size: 22px; }
.live-session-person strong, .live-session-person span { display: block; }
.live-session-person strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.live-session-person span { margin-top: 4px; color: var(--muted); font-size: 10.5px; }
.live-session-metrics { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)); }
.live-session-metrics > div { min-width: 0; padding: 2px 14px; border-left: 1px solid var(--border-soft); }
.live-session-metrics span, .live-session-metrics strong, .live-session-metrics small { display: block; }
.live-session-metrics span { color: var(--muted); font-size: 9.5px; }
.live-session-metrics strong { margin-top: 5px; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.live-session-metrics small { margin-top: 3px; color: var(--muted); font-size: 9.5px; }
#liveSessionQuality[data-level="good"] { color: var(--success); }
#liveSessionQuality[data-level="warning"] { color: var(--warning); }
#liveSessionQuality[data-level="bad"] { color: var(--danger); }
.live-control-panel .live-volume-control { margin: 0; background: #fff; }
.active-calls-list { padding: 14px; display: grid; gap: 8px; }
.active-call-card { max-height: 130px; display: grid; grid-template-columns: minmax(250px, 1.4fr) minmax(120px, .7fr) minmax(110px, .6fr) minmax(155px, .8fr) auto; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--border-soft); border-radius: 6px; background: #fff; }
.active-call-card:hover { border-color: #c9c9c9; background: #fcfcfc; }
.active-call-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.active-call-avatar { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; border-radius: 7px; background: #edf1f5; color: #52687a; font-size: 18px; }
.active-call-identity strong, .active-call-identity span, .active-call-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.active-call-identity strong { font-size: 12px; font-weight: 600; }
.active-call-identity span, .active-call-identity small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.active-call-detail { min-width: 0; }
.active-call-detail > span, .active-call-detail > strong, .active-call-detail > small { display: block; }
.active-call-detail > span { color: var(--muted); font-size: 9.5px; }
.active-call-detail > strong { margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; }
.active-call-detail > small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.active-call-detail time { font-variant-numeric: tabular-nums; }
.quality-text.good { color: var(--success); }
.quality-text.warning { color: var(--warning); }
.quality-text.bad { color: var(--danger); }
.quality-text.neutral { color: var(--muted); }
.active-call-listen { min-width: 98px; }

.journal-filter-grid { display: grid; grid-template-columns: repeat(6, minmax(130px, 1fr)); gap: 9px; padding: 13px 15px; border-bottom: 1px solid var(--border-soft); background: #fafafa; }
.journal-search-field { grid-column: span 4; }
.journal-filter-actions { grid-column: span 2; display: flex; align-items: end; justify-content: flex-end; gap: 8px; }
.user-journal-panel .log-table { min-width: 1040px; }
.user-journal-panel .log-table th:nth-child(1) { width: 145px; }
.user-journal-panel .log-table th:nth-child(2) { width: 190px; }
.user-journal-panel .log-table th:nth-child(3) { width: 125px; }
.user-journal-panel .log-table th:nth-child(4) { width: 160px; }
.user-journal-panel .log-table th:nth-child(5) { width: 105px; }
.user-journal-panel .log-table th:nth-child(6) { width: auto; }

@media (max-width: 1180px) {
  .team-accordion-header { grid-template-columns: minmax(220px, .8fr) minmax(360px, 1.2fr) 24px; }
  .team-summary-metrics { grid-template-columns: repeat(2, minmax(110px, 1fr)); row-gap: 10px; }
  .team-member-row { grid-template-columns: minmax(190px, 1.3fr) repeat(2, minmax(85px, .7fr)) 24px; }
  .team-member-row > span:nth-of-type(4), .team-member-row > span:nth-of-type(5) { display: none; }
  .active-call-card { grid-template-columns: minmax(220px, 1.2fr) minmax(110px, .7fr) minmax(105px, .6fr) auto; }
  .active-call-card .active-call-detail:nth-of-type(4) { display: none; }
  .journal-filter-grid { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .journal-search-field { grid-column: span 2; }
  .journal-filter-actions { grid-column: span 1; }
}
@media (max-width: 880px) {
  .dashboard-metric-grid { grid-template-columns: 1fr; }
  .team-accordion-header { grid-template-columns: 1fr 24px; }
  .team-summary-metrics { grid-column: 1 / -1; grid-row: 2; }
  .team-accordion-arrow { grid-column: 2; grid-row: 1; }
  .team-filter-panel { grid-template-columns: 1fr; }
  .live-session-summary { grid-template-columns: 1fr; }
  .live-session-metrics > div:first-child { border-left: 0; padding-left: 0; }
  .active-call-card { grid-template-columns: 1fr 1fr auto; }
  .active-call-identity { grid-column: 1 / -1; }
  .active-call-card .active-call-detail:nth-of-type(4) { display: block; }
}
@media (max-width: 620px) {
  .team-summary-metrics { grid-template-columns: 1fr 1fr; }
  .team-member-row { grid-template-columns: 1fr 24px; }
  .team-member-row > span:not(.team-member-name) { display: none; }
  .team-filter-period > div { grid-template-columns: 1fr; }
  .live-target-controls { grid-template-columns: 1fr; }
  .live-session-metrics { grid-template-columns: 1fr; gap: 10px; }
  .live-session-metrics > div { padding: 8px 0 0; border-left: 0; border-top: 1px solid var(--border-soft); }
  .live-session-metrics > div:first-child { border-top: 0; padding-top: 0; }
  .active-call-card { grid-template-columns: 1fr 1fr; }
  .active-call-identity, .active-call-listen { grid-column: 1 / -1; }
  .active-call-listen { width: 100%; }
  .journal-filter-grid { grid-template-columns: 1fr; }
  .journal-search-field, .journal-filter-actions { grid-column: auto; }
  .journal-filter-actions { justify-content: stretch; }
  .journal-filter-actions .button { flex: 1; }
}


/* v1.8.0 final polish: flat live session and adaptive team filters */
.team-filter-primary[hidden] + .team-filter-period { grid-column: 1 / -1; }
.live-session-summary {
  min-height: 96px;
  padding: 14px 0;
  border: 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  border-radius: 0;
  background: transparent;
}
.live-control-panel .live-volume-control {
  margin: 0;
  padding: 2px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.panel-footnote { padding: 0 15px 15px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.panel-footnote.is-error { color: var(--danger, #a33); }


/* v1.9.2: visible background recording conversion progress */
.archive-progress-card { margin-top: 8px; padding: 8px 9px; border: 1px solid var(--border-soft); border-radius: 5px; background: #fafafa; }
.archive-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 10.5px; }
.archive-progress-head span { color: #454545; }
.archive-progress-head strong { color: var(--muted); font-size: 10px; font-weight: 600; text-align: right; }
.archive-progress { width: 100%; height: 5px; margin-top: 7px; overflow: hidden; border-radius: 4px; background: #e4e4e4; }
.archive-progress > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .35s ease; }
.archive-progress-card.ready { background: #f8faf8; }
.archive-progress-card.failed { background: #fff9f8; border-color: #e4c8c4; }
.archive-progress-card.failed .archive-progress-head strong { max-width: 320px; color: #8c3d34; }
.archive-progress-card.expired { background: #f7f7f7; }


/* v1.9.5: paged archives and stable native audio controls. */
.recording-audio-cell { vertical-align: top; }
.recording-audio-wrap { min-height: 58px; contain: layout; }
.recording-audio-wrap .audio-player,
.audio-player {
  visibility: visible;
  opacity: 1;
  transition: none !important;
  animation: none !important;
  contain: layout paint;
}
#recordingsPagination:empty { display: none; }

/* v1.9.8 — desktop application connection state in Team */
.connection-status { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.connection-status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: 0 0 6px; }

/* v2.0.0 — separated access roles, organization hierarchy and admin console. */
#openAdminPanel.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, white); color: var(--accent); }
.admin-panel-intro { align-items: center; }
.admin-system-page { --system-panel-bg: #f7f8fa; }
.admin-system-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.admin-system-link {
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.admin-system-link:hover { border-color: #c8ccd3; background: #fafbfc; }
.admin-system-link > i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 7px; background: #eef1f5; color: #3e4857; font-size: 19px; }
.admin-system-link span, .admin-system-link strong, .admin-system-link small { display: block; }
.admin-system-link strong { font-size: 12.5px; font-weight: 600; }
.admin-system-link small { margin-top: 4px; color: var(--muted); font-size: 10.5px; line-height: 1.35; }
.admin-health-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.system-chart-panel { overflow: hidden; }
.system-chart-wrap { min-height: 320px; padding: 6px 14px 0; overflow-x: auto; }
.system-chart-legend { display: flex; flex-wrap: wrap; gap: 18px; padding: 2px 18px 15px; color: var(--muted); font-size: 10.5px; }
.system-chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.system-chart-legend i { width: 18px; height: 2px; border-radius: 2px; }
.legend-cpu { background: var(--accent); }
.legend-memory { background: #6b7280; }
.legend-api { background: #b7791f; }
.compact-table th, .compact-table td { padding-top: 9px; padding-bottom: 9px; }
.sidebar-footer #openAdminPanel { justify-content: flex-start; }

@media (max-width: 1180px) {
  .admin-system-nav, .admin-health-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .admin-system-nav, .admin-health-grid { grid-template-columns: 1fr; }
  .system-chart-wrap { padding-inline: 4px; }
}

/* v2.0.0 final — hierarchical Team page for "All available teams" */
.team-page-panel { overflow: visible; }
.team-page-hierarchy { display: grid; gap: 14px; padding: 14px; }
.team-page-hierarchy[hidden] { display: none !important; }
.team-hierarchy-group { overflow: hidden; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); }
.team-hierarchy-group.neutral { border-color: #d5d5d5; }
.team-hierarchy-group-header { width: 100%; min-height: 98px; display: grid; grid-template-columns: minmax(250px, .9fr) minmax(520px, 1.6fr) 28px; align-items: center; gap: 18px; padding: 15px 16px; border: 0; background: #f8fafc; color: var(--text); text-align: left; }
.team-hierarchy-group-header:hover { background: #f3f6f9; }
.team-hierarchy-person { display: flex; align-items: center; gap: 11px; min-width: 0; }
.team-hierarchy-person-icon { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 8px; background: #e5f0fa; color: var(--accent); font-size: 21px; }
.team-hierarchy-person-icon.neutral { background: #ededed; color: #666; }
.team-hierarchy-person span, .team-hierarchy-person strong, .team-hierarchy-person small { display: block; }
.team-hierarchy-person span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.team-hierarchy-person strong { margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; }
.team-hierarchy-person small { margin-top: 3px; color: var(--muted); font-size: 10.5px; }
.team-hierarchy-metrics { display: grid; grid-template-columns: repeat(4, minmax(100px, 1fr)); gap: 8px; }
.team-hierarchy-metrics > div { min-width: 0; padding-left: 12px; border-left: 1px solid var(--border-soft); }
.team-hierarchy-metrics span, .team-hierarchy-metrics strong, .team-hierarchy-metrics small { display: block; }
.team-hierarchy-metrics span { color: var(--muted); font-size: 10px; }
.team-hierarchy-metrics strong { margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.team-hierarchy-metrics small { margin-top: 2px; color: var(--muted); font-size: 9.5px; }
.team-hierarchy-arrow { justify-self: end; color: #666; font-size: 20px; transition: transform .22s ease; }
.team-hierarchy-group.open .team-hierarchy-arrow { transform: rotate(180deg); }
.team-hierarchy-group-content { display: grid; grid-template-rows: 0fr; opacity: 0; border-top: 0 solid var(--border-soft); transition: grid-template-rows .24s ease, opacity .18s ease, border-top-width .18s ease; }
.team-hierarchy-group.open .team-hierarchy-group-content { grid-template-rows: 1fr; opacity: 1; border-top-width: 1px; }
.team-hierarchy-supervisor-list { min-height: 0; overflow: hidden; display: grid; gap: 9px; padding: 10px; background: #f6f7f8; }
.team-hierarchy-supervisor-list.standalone { padding: 0; background: transparent; }
.team-page-supervisor-card { box-shadow: none; }
.team-page-supervisor-header { min-height: 88px; }
.team-page-supervisor-metrics { grid-template-columns: repeat(4, minmax(90px, 1fr)); }
.team-page-member-row { width: 100%; min-height: 62px; display: grid; grid-template-columns: minmax(230px, 1.55fr) repeat(5, minmax(86px, .68fr)) minmax(118px, .85fr) 24px; align-items: center; gap: 10px; padding: 9px 16px; border: 0; border-bottom: 1px solid var(--border-soft); background: #fff; color: var(--text); text-align: left; }
.team-page-member-row:last-child { border-bottom: 0; }
.team-page-member-row:hover { background: #f7f9fb; }
.team-page-member-row span, .team-page-member-row strong, .team-page-member-row small { display: block; }
.team-page-member-row > span:not(.team-member-name) small { color: var(--muted); font-size: 9.5px; }
.team-page-member-row > span:not(.team-member-name) strong { margin-top: 2px; font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.team-page-member-row > i { color: #777; font-size: 17px; }
.team-page-connection.online strong { color: #2d7a46; }
.team-page-connection.offline strong { color: #b44343; }

@media (max-width: 1280px) {
  .team-hierarchy-group-header { grid-template-columns: minmax(230px, .85fr) minmax(390px, 1.3fr) 24px; }
  .team-page-member-row { grid-template-columns: minmax(210px, 1.45fr) repeat(3, minmax(82px, .65fr)) minmax(112px, .8fr) 24px; }
  .team-page-member-row > span:nth-of-type(5),
  .team-page-member-row > span:nth-of-type(6) { display: none; }
}

@media (max-width: 900px) {
  .team-hierarchy-group-header { grid-template-columns: 1fr 24px; }
  .team-hierarchy-metrics { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-hierarchy-arrow { grid-column: 2; grid-row: 1; }
  .team-page-supervisor-header { grid-template-columns: 1fr 24px; }
  .team-page-supervisor-metrics { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-page-member-row { grid-template-columns: minmax(190px, 1fr) minmax(110px, .8fr) 24px; }
  .team-page-member-row > span:not(.team-member-name):not(.team-page-connection) { display: none; }
}

@media (max-width: 560px) {
  .team-page-hierarchy { padding: 10px; }
  .team-hierarchy-group-header { padding: 13px; }
  .team-hierarchy-metrics { grid-template-columns: 1fr; }
  .team-hierarchy-supervisor-list { padding: 7px; }
  .team-page-supervisor-metrics { grid-template-columns: 1fr; }
  .team-page-member-row { grid-template-columns: 1fr 24px; padding: 10px 12px; }
  .team-page-member-row > span:not(.team-member-name) { display: none; }
}

/* Titan Audio 2.0.2 — единая спокойная визуальная система */
:root {
  font-family: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
  --sidebar-width: 202px;
  --surface: #ffffff;
  --surface-alt: #f7f7f7;
  --border: #dedede;
  --border-soft: #ececec;
}
html, body, button, input, select, textarea { font-family: "IBM Plex Sans", "Segoe UI", Arial, sans-serif; }
body { font-weight: 400; }
body * { font-weight: 400 !important; }
h1, h2, h3, h4, h5, h6, strong, b,
.button, .nav-item, .status-badge, .metric-card strong,
.team-summary-metrics strong, .team-member-row strong,
.team-page-member-row strong, .profile-copy strong,
.data-table th, .data-table td { font-weight: 400 !important; }
.sidebar-brand { height: 58px; padding-inline: 12px; }
.sidebar-brand .brand-mark.small { width: 30px; height: 30px; flex-basis: 30px; }
.sidebar-brand span { display: none; }
.nav-list { padding: 8px 7px; gap: 1px; }
.nav-item { min-height: 35px; grid-template-columns: 21px 1fr auto; gap: 7px; padding-inline: 8px; border-radius: 4px; font-size: 12px; }
.nav-item i { font-size: 16px; }
.nav-divider { margin: 6px; }
.sidebar-footer { padding: 8px 7px; }
.profile-card-button { width: 100%; border: 1px solid transparent; border-radius: 4px; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.profile-card-button:hover, .profile-card-button:focus-visible { background: #ededed; border-color: #dedede; outline: none; }
.profile-card-button .profile-copy { text-align: left; }
.admin-portal-link { justify-content: flex-start; min-height: 35px; color: #2d2d2d !important; background: transparent !important; border-color: transparent !important; }
.admin-portal-link:hover { background: #e9e9e9 !important; border-color: #dcdcdc !important; }
.content { padding-inline: 22px; }
.content-header { min-height: 68px; margin-bottom: 18px; }
.content-header h1 { font-size: 20px; }
.toolbar, .panel, .metric-card, .team-filter-panel { border-radius: 5px; box-shadow: none; }
.toolbar, .panel-header { min-height: 54px; }
.panel-header { padding: 12px 14px; }
.panel-header h2, .section-intro h2 { font-size: 14px; }
.panel-header p, .section-intro p { line-height: 1.45; }
.metric-card { min-height: 98px; padding: 14px; }
.metric-card strong { font-size: 22px; }
.button, .icon-button, input, select, textarea { border-radius: 3px; }
.review-intro-actions { flex-wrap: wrap; justify-content: flex-end; }
.split-actions { justify-content: space-between; }
.split-actions > div { display: flex; align-items: center; gap: 8px; }
.team-page-supervisor-card.fixed-open .team-accordion-arrow { display: none; }
.team-page-supervisor-card.fixed-open > .team-accordion-header { cursor: default; }
.team-page-supervisor-card.fixed-open > .team-accordion-header:disabled { opacity: 1; color: inherit; }
.selected-team-view { padding: 0; }
.recording-audio-wrap { min-width: 245px; }
.audio-player { max-width: 100%; }
.calls-table .cell-actions { flex-wrap: wrap; min-width: 160px; }
.ti { display: inline-grid; place-items: center; min-width: 1em; }
@media (max-width: 900px) {
  :root { --sidebar-width: 220px; }
  .content { padding-inline: 14px; }
  .review-intro-actions { width: 100%; justify-content: flex-start; }
}

/* Titan Audio 2.0.2 polish — единый каркас всех рабочих страниц */
.page-section > .section-intro,
.global-call-filters,
.team-filter-primary,
.team-filter-period {
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  box-shadow: none;
}
.page-section > .section-intro {
  min-height: 54px;
  margin-bottom: 14px;
  padding: 11px 14px;
}
.page-section > .section-intro h2,
.page-section .panel-header h2,
.toolbar-title strong {
  font-size: 14px;
  line-height: 1.25;
}
.page-section > .section-intro p,
.page-section .panel-header p,
.toolbar-title span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.page-section .panel,
.page-section .toolbar,
.page-section .metric-card,
.page-section .review-card,
.page-section .notification-item,
.page-section .active-call-card,
.page-section .team-hierarchy-group,
.page-section .team-accordion-item {
  border-color: var(--border);
  border-radius: 5px;
  box-shadow: none;
}
.page-section .panel-header,
.page-section .toolbar,
.page-section > .section-intro {
  background: var(--surface);
}
.page-section .panel-header,
.page-section .toolbar {
  padding: 11px 14px;
}
.page-section .notice {
  border-radius: 4px;
  box-shadow: none;
}
#page-review .review-grid,
#page-notifications .notification-list {
  margin-bottom: 14px;
}
#page-review .review-card,
#page-notifications .notification-item {
  background: var(--surface);
}
#page-team .team-filter-panel {
  gap: 10px;
}
#page-team .team-filter-primary,
#page-team .team-filter-period {
  padding: 11px 14px;
}
#page-userProfile .profile-password-panel,
#page-userProfile .user-journal-panel,
#page-users > .panel,
#page-calls > .panel,
#page-live > .panel {
  margin-bottom: 14px;
}
.data-table th,
.data-table td,
.cell-main,
.cell-sub,
.button,
.status-badge,
.nav-item,
.profile-copy,
.metric-card,
.review-card,
.notification-item {
  letter-spacing: 0;
}

/* Иконка не должна превращаться в визуальную точку даже при редком сбое webfont. */
.ti:empty::before {
  display: inline-block;
  min-width: 1em;
  min-height: 1em;
  line-height: 1;
}

@media (max-width: 720px) {
  .page-section > .section-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}

/* Titan Audio 2.0.2 — архив одобренных удалений */
.deleted-archive-filter-grid { grid-template-columns: 1.1fr 1.2fr .9fr .9fr auto; }
.approved-deletions-table { min-width: 1260px; }
.approved-deletions-table th:nth-child(7),
.approved-deletions-table td:nth-child(7) { min-width: 280px; }
.approved-deletions-table .recording-audio-wrap { display: grid; gap: 6px; align-items: start; }
.approved-deletions-table .compact-action { width: max-content; }
@media (max-width: 1100px) {
  .deleted-archive-filter-grid { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .deleted-archive-filter-grid .filter-actions { grid-column: span 2; }
}
@media (max-width: 700px) {
  .deleted-archive-filter-grid { grid-template-columns: 1fr; }
  .deleted-archive-filter-grid .filter-actions { grid-column: auto; }
}

/* v2.0.3: hierarchical users and mass account management. */
.users-management-panel { padding-top: 0; }
.user-bulk-toolbar {
  display: grid;
  grid-template-columns: minmax(250px, .9fr) minmax(300px, 1.25fr) minmax(240px, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--border-soft);
  background: #fafafa;
}
.user-bulk-selection,
.user-bulk-toolbar .compact-field { display: grid; align-content: end; gap: 5px; min-width: 0; }
.user-bulk-label,
.user-bulk-toolbar .compact-field > span { color: var(--muted); font-size: 10.5px; line-height: 1.2; }
.user-bulk-selection-row { min-height: 36px; display: flex; align-items: center; gap: 9px; }
.bulk-select-all { min-height: 36px; display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; white-space: nowrap; }
.bulk-select-all input, .select-column input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.user-bulk-toolbar select { width: 100%; min-height: 36px; }
.user-bulk-action { min-width: 0; }
.user-bulk-target { min-width: 0; }
.user-bulk-apply { min-height: 36px; align-self: end; justify-self: start; white-space: nowrap; }
.user-bulk-message { min-height: 0; padding: 0 14px; }
.user-bulk-message:not(:empty) { padding-top: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border-soft); }
.users-hierarchy-table { min-width: 1240px; }
.users-hierarchy-table .select-column { width: 42px; text-align: center; }
.users-group-row td { padding: 0 !important; background: #f4f6f8; border-bottom-color: #dfe3e7; }
.users-group-heading { display: flex; align-items: baseline; gap: 10px; padding: 9px 14px; }
.users-group-heading span { font-size: 12px; font-weight: 600; color: #252525; }
.users-group-heading small { font-size: 10.5px; color: var(--muted); }
.user-hierarchy-row.inactive-user { opacity: .68; }
.hierarchy-user-name { --user-level: 0; position: relative; display: flex; align-items: center; min-width: 180px; padding-left: calc(var(--user-level) * 22px); }
.hierarchy-user-name .hierarchy-line { display: none; }
.user-level-1 .hierarchy-user-name .hierarchy-line,
.user-level-2 .hierarchy-user-name .hierarchy-line { display: block; width: 14px; height: 10px; margin-right: 6px; border-left: 1px solid #c9ced4; border-bottom: 1px solid #c9ced4; transform: translateY(-3px); }
.ghost-danger { border-color: transparent !important; background: transparent !important; }
.ghost-danger:hover { background: #fff1f1 !important; }
.team-accordion-item.fixed-open > .team-accordion-header { cursor: default; }
.team-accordion-item.fixed-open .team-accordion-arrow { opacity: .35; }

@media (max-width: 1180px) {
  .user-bulk-toolbar { grid-template-columns: minmax(230px, .9fr) minmax(280px, 1.2fr) auto; }
  .user-bulk-target { grid-column: 2; }
  .user-bulk-apply { grid-column: 3; }
}
@media (max-width: 760px) {
  .user-bulk-toolbar { grid-template-columns: 1fr; align-items: stretch; }
  .user-bulk-target, .user-bulk-apply { grid-column: auto; }
  .user-bulk-apply { width: 100%; }
  .user-bulk-selection-row { justify-content: space-between; }
}

/* 2.0.8 users: stable row alignment and position-based hierarchy. */
.user-hierarchy-row.selected-user-row > td { background: var(--surface-soft, #f4f7fb); }
.users-hierarchy-table td.select-column { padding-top: 10px; padding-bottom: 10px; vertical-align: middle; }
.user-select-box { width: 30px; min-height: 24px; margin: 0 auto; display: flex; align-items: center; justify-content: center; cursor: pointer; line-height: 1; }
.user-select-box input { display: block; margin: 0; }
.user-select-box:has(input:disabled) { cursor: not-allowed; }
.select-column input[type="checkbox"] { cursor: pointer; accent-color: currentColor; }
.select-column input[type="checkbox"]:disabled { cursor: not-allowed; opacity: .45; }

/* v2.0.11: neutral authentication bootstrap state. The login form is shown only
   after the server has explicitly rejected the current session. */
.auth-loading-panel {
  min-height: 270px;
  justify-content: center;
}
.auth-loading-copy {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
  color: var(--text-secondary, #5f6368);
}
.auth-loading-copy strong {
  color: var(--text-primary, #1f1f1f);
  font-size: 16px;
  font-weight: 500;
}
.auth-loading-copy p {
  margin: 0;
  max-width: 360px;
  line-height: 1.45;
}
.auth-loading-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid #d9d9d9;
  border-top-color: #0067c0;
  border-radius: 50%;
  animation: titan-auth-spin .8s linear infinite;
}
.auth-loading-copy.is-error .auth-loading-spinner {
  display: none;
}
@keyframes titan-auth-spin { to { transform: rotate(360deg); } }

/* v2.0.14: every user row uses the same action alignment, including the initial administrator. */
.users-hierarchy-table { min-width: 1470px; }
.users-hierarchy-table td:last-child { min-width: 575px; }
.users-hierarchy-table .cell-actions {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  justify-content: start;
  align-items: center;
  gap: 5px;
  min-width: 555px;
}
.users-hierarchy-table .cell-actions .button { min-height: 30px; }
.user-hierarchy-row > td { height: 52px; }
