@font-face { font-family: "Source Sans Pro"; src: url("/static/fonts/SourceSansPro-Regular.ttf") format("truetype"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Sans Pro"; src: url("/static/fonts/SourceSansPro-Bold.ttf") format("truetype"); font-style: normal; font-weight: 700; font-display: swap; }
@font-face { font-family: "Source Sans Pro"; src: url("/static/fonts/SourceSansPro-Light.ttf") format("truetype"); font-style: normal; font-weight: 100; font-display: swap; }
@font-face { font-family: "Material-Design-Iconic-Font"; src: url("/static/fonts/Material-Design-Iconic-Font.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: block; }

:root {
  --bg: #ededed;
  --surface: #ffffff;
  --surface-soft: #f7f7f7;
  --line: #dddddd;
  --text: #242424;
  --muted: #707070;
  --cyan: #00bcd4;
  --cyan-dark: #00838f;
  --cyan-soft: #80deea;
  --cyan-side: #00bcd4;
  --coral: #ef7074;
  --coral-soft: #ffcdd2;
  --amber: #ffca28;
  --green: #3bbf8a;
  --violet: #d1c4e9;
  --shadow: 0 3px 1px -2px rgba(0,0,0,.14), 0 2px 2px 0 rgba(0,0,0,.098), 0 1px 5px 0 rgba(0,0,0,.084);
  font-family: "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); }
button, select, input { font: inherit; }
h1, h2, p { margin: 0; }
.hidden { display: none !important; }
.zmdi { display: inline-block; font: normal normal normal 14px/1 "Material-Design-Iconic-Font"; text-rendering: auto; -webkit-font-smoothing: antialiased; }
.zmdi-view-dashboard::before { content: "\f31c"; }.zmdi-chart::before { content: "\f131"; }.zmdi-store::before { content: "\f1d4"; }.zmdi-account::before { content: "\f207"; }.zmdi-format-list-bulleted::before { content: "\f247"; }.zmdi-headset::before { content: "\f29d"; }.zmdi-phone::before { content: "\f2be"; }.zmdi-account-circle::before { content: "\f205"; }.zmdi-caret-down::before { content: "\f2f2"; }.zmdi-globe-alt::before { content: "\f171"; }.zmdi-power::before { content: "\f1af"; }.zmdi-refresh::before { content: "\f1b9"; }.zmdi-download::before { content: "\f220"; }.zmdi-close::before { content: "\f136"; }.zmdi-more::before { content: "\f19c"; }

.login-view { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; min-height: 100vh; padding: 24px; background: #126268 url("/static/login-background.jpg") center / cover no-repeat; }
.login-card { width: min(326px, 100%); background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.28); }
.login-card > header { height: 60px; display: grid; place-items: center; color: #fff; background: #37b7ca; font-size: 20px; font-weight: 400; }
.login-card form { padding: 16px 20px 38px; }
.login-field { position: relative; display: block; padding-top: 10px; margin-bottom: 17px; }
.login-field > span { display: block; margin-bottom: 5px; color: #8a8a8a; font-size: 11px; }
.login-field input { width: 100%; height: 30px; padding: 0 28px 0 0; border: 0; border-bottom: 2px solid #d7d7d7; outline: none; color: #333; background: transparent; }
.login-field input:focus { border-bottom-color: var(--cyan); }
.login-field i { position: absolute; right: 5px; bottom: 8px; color: #d43a3a; font-size: 17px; }
.password-indicator { width: 17px; height: 17px; display: grid; place-items: center; color: #fff !important; background: #d43a3a; border-radius: 3px; font-size: 13px !important; }
.login-error { min-height: 18px; margin: 0 0 8px; color: #c62828; font-size: 11px; }
.login-submit { width: 100%; height: 38px; border: 0; color: #fff; background: #37b7ca; box-shadow: var(--shadow); cursor: pointer; font-size: 12px; letter-spacing: .04em; }
.login-submit:hover { background: #00a9bf; }.login-submit:disabled { opacity: .6; cursor: wait; }

.shell { display: grid; grid-template-columns: 350px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--cyan-side); color: #fff; box-shadow: 2px 0 6px rgba(0,0,0,.2); z-index: 10; }
.brand { height: 86px; display: flex; align-items: center; gap: 14px; padding: 0 14px; border-bottom: 1px solid rgba(0,0,0,.12); }
.brand-mark { width: 52px; height: 52px; flex: none; display: grid; place-items: center; }
.brand-mark img { display: block; width: 52px; height: 52px; object-fit: contain; image-rendering: auto; }
.brand strong { display: block; font-size: 22px; font-weight: 400; white-space: nowrap; }
nav { display: grid; }
nav a { min-height: 64px; display: flex; align-items: center; gap: 14px; padding: 0 20px; color: #fff; text-decoration: none; font-size: 18px; border-bottom: 1px solid rgba(0,0,0,.07); transition: background .16s ease, color .16s ease; }
nav a span { width: 26px; text-align: center; font-size: 20px; }
nav a:hover { background: rgba(255,255,255,.12); }
nav a.active { color: #173037; background: rgba(255,255,255,.28); }
.sidebar-foot { padding: 18px; border-top: 1px solid rgba(0,0,0,.09); }
.api-state { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.api-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.api-state.ok i { background: #d4ff72; box-shadow: 0 0 10px rgba(212,255,114,.75); }
.api-state.error i { background: #ff5b4c; }
.sidebar-foot small { display: block; margin-top: 8px; color: rgba(255,255,255,.72); }

main { min-width: 0; }
.app-topbar { height: 86px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; background: #fafafa; border-bottom: 1px solid #bababa; box-shadow: 0 2px 6px rgba(0,0,0,.14); }
.app-topbar h1 { font-size: 28px; font-weight: 400; }
.account-wrap { position: relative; margin-left: auto; }
.account { display: flex; align-items: center; gap: 10px; padding: 0; border: 0; color: #222; background: transparent; font-size: 18px; cursor: pointer; }
.account strong { font-weight: 400; }
.account-avatar { width: 48px; height: 48px; display: grid; place-items: center; color: #c7c7c7; font-size: 48px; }
.account-caret { margin-right: 34px; }
.account-action { font-size: 25px; margin-left: 30px; }
.topbar-actions { display: flex; align-items: center; }
.header-logout-button { width: 46px; height: 46px; display: grid; place-items: center; margin-left: 30px; padding: 0; border: 0; border-radius: 50%; color: #222; background: transparent; cursor: pointer; font-size: 25px; transition: background .15s ease, color .15s ease; }
.header-logout-button:hover { color: #c62828; background: #ffebee; }.header-logout-button:focus-visible { outline: 3px solid rgba(0,188,212,.35); outline-offset: 2px; }
.account-menu { position: absolute; z-index: 60; top: calc(100% + 16px); right: 24px; width: 250px; background: #fff; box-shadow: 0 6px 22px rgba(0,0,0,.28); }
.account-menu::before { content: ""; position: absolute; right: 26px; top: -8px; border: 8px solid transparent; border-top: 0; border-bottom-color: #fff; }
.account-summary { padding: 17px 18px; border-bottom: 1px solid #ddd; }
.account-summary strong, .account-summary span { display: block; }.account-summary strong { font-size: 17px; font-weight: 400; }.account-summary span { margin-top: 2px; color: #777; font-size: 12px; }
.account-menu button { width: 100%; min-height: 46px; display: flex; align-items: center; gap: 12px; padding: 0 18px; border: 0; color: #333; background: #fff; text-align: left; cursor: pointer; }
.account-menu button:hover { background: #e8f6f8; }.account-menu button .zmdi { width: 20px; color: var(--cyan-dark); font-size: 18px; }
.dashboard-content { width: 100%; padding: 34px 44px 44px; }
.dashboard-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.dashboard-heading h2 { font-size: 25px; font-weight: 400; }
.eyebrow { color: var(--cyan-dark); font-size: 10px; letter-spacing: .12em; font-weight: 700; margin-bottom: 5px; }
.live-pill { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; color: #176947; background: #d9f4e8; border-radius: 2px; font-size: 11px; font-weight: 700; }
.live-pill i, .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(59,191,138,0); } 100% { box-shadow: 0 0 0 0 rgba(59,191,138,0); } }

.filter-panel { margin-bottom: 14px; background: #fff; box-shadow: var(--shadow); }
.filter-title { min-height: 86px; padding: 0 18px 0 24px; display: flex; align-items: center; justify-content: space-between; color: #fff; background: var(--cyan-dark); }
.filter-title strong { font-size: 26px; font-weight: 400; }
.filter-actions { display: flex; align-items: center; gap: 14px; }
.filter-title button { width: 56px; height: 56px; border: 0; border-radius: 50%; color: #242424; background: var(--amber); box-shadow: var(--shadow); cursor: pointer; font-size: 25px; }
.filter-title button:disabled { opacity: .55; cursor: wait; }
.controls { display: grid; grid-template-columns: repeat(3, minmax(145px, 1fr)) auto; align-items: center; gap: 18px; padding: 20px 24px; }
.controls select, .controls input { width: 100%; height: 46px; padding: 0 12px; color: #353535; background: #fff; border: 0; border-bottom: 2px solid #a9a9a9; outline: none; font-size: 17px; }
.controls select:focus, .controls input:focus { border-bottom-color: var(--cyan); }
.custom-dates { display: flex; gap: 10px; }

.status-strip { min-height: 58px; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 12px 18px; margin-bottom: 14px; background: #fff9df; border-left: 5px solid var(--amber); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.status-strip > div:first-child { display: flex; align-items: center; gap: 12px; }
.status-strip strong { font-size: 15px; font-weight: 500; }
.status-strip small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.status-meta { display: flex; gap: 24px; color: var(--muted); font-size: 12px; }
.status-meta strong { color: var(--text); margin-left: 4px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { min-height: 112px; padding: 16px 18px; position: relative; overflow: hidden; background: var(--cyan-soft); box-shadow: var(--shadow); }
.kpi:nth-child(2), .kpi:nth-child(7) { background: #26c6da; }
.kpi:nth-child(3) { background: var(--coral-soft); }
.kpi:nth-child(4), .kpi:nth-child(8) { background: var(--amber); }
.kpi:nth-child(5) { background: var(--coral); }
.kpi:nth-child(6) { background: var(--violet); }
.kpi::before { content: "\f30e"; position: absolute; left: 15px; bottom: 14px; color: rgba(30,45,49,.45); font: normal normal normal 37px/1 "Material-Design-Iconic-Font"; }
.kpi:nth-child(3)::before, .kpi:nth-child(5)::before { content: "\f310"; }
.kpi .label { text-align: right; color: rgba(35,35,35,.66); font-size: 15px; }
.kpi .value { text-align: right; font-size: 43px; font-weight: 100; margin: 5px 0 2px; }
.kpi .foot { display: flex; justify-content: flex-end; gap: 10px; color: rgba(35,35,35,.62); font-size: 12px; }
.delta { padding: 1px 5px; background: rgba(255,255,255,.38); }
.delta.up { color: #176947; }.delta.down { color: #8d2525; }.delta.neutral { color: #555; }

.chart-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(270px, .75fr); gap: 14px; margin-bottom: 14px; }
.panel { min-width: 0; padding: 18px; background: #fff; box-shadow: var(--shadow); }
.panel-head { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: -18px -18px 18px; padding: 10px 18px; color: #fff; background: var(--cyan); }
.panel-head .eyebrow { color: rgba(255,255,255,.78); }
.panel-head h2 { font-size: 23px; font-weight: 400; }
.panel-head .muted { color: rgba(255,255,255,.86); }
.muted { color: var(--muted); font-size: 13px; }
.legend { display: flex; gap: 15px; color: #fff; font-size: 10px; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 3px; margin-right: 5px; vertical-align: middle; background: currentColor; }
.cyan { color: #fff; }.violet { color: #e6dcff; }.coral { color: #9b3030; }
.canvas-wrap { height: 270px; position: relative; }.canvas-wrap.short { height: 205px; }
canvas { width: 100%; height: 100%; display: block; }
.donut-zone { min-height: 270px; display: grid; place-items: center; grid-template-rows: 1fr auto; }
.donut { width: 170px; height: 170px; border-radius: 50%; display: grid; place-items: center; position: relative; }
.donut::after, .gauge::after { content: ""; position: absolute; background: #fff; border-radius: 50%; }
.donut::after { inset: 18px; }
.donut > div, .gauge > div { position: relative; z-index: 1; text-align: center; }
.donut strong, .donut span, .gauge strong, .gauge span { display: block; }
.donut strong { font-size: 29px; font-weight: 400; }.donut span, .gauge span { color: var(--muted); font-size: 10px; margin-top: 4px; }
.stack-legend { width: 100%; display: grid; gap: 8px; }
.stack-legend > div { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.stack-legend b { color: var(--text); font-weight: 500; }.stack-legend i { display: inline-block; width: 9px; height: 9px; margin-right: 7px; }
.peak { color: #2f2f2f; background: var(--amber); padding: 6px 10px; font-size: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.service-card { text-align: center; }.service-card .panel-head { text-align: left; }
.gauge { margin: 5px auto 18px; width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; position: relative; }
.gauge::after { inset: 14px; }.gauge strong { font-size: 29px; font-weight: 400; }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); padding-top: 13px; }
.mini-stats > div + div { border-left: 1px solid var(--line); }.mini-stats span, .mini-stats strong { display: block; }.mini-stats span { color: var(--muted); font-size: 10px; }.mini-stats strong { margin-top: 4px; font-size: 15px; font-weight: 500; }

.table-panel { margin-bottom: 14px; }.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { padding: 12px; color: #696969; font-size: 13px; font-weight: 700; text-align: left; white-space: nowrap; }
td { padding: 13px 12px; border-top: 1px solid #e3e3e3; color: #444; white-space: nowrap; }
tbody tr:nth-child(odd) { background: #f5f5f5; } tbody tr:hover { background: #dceef5; }
td strong { color: var(--text); font-weight: 500; }
.store-name, .agent-cell { display: flex; align-items: center; gap: 10px; }
.store-pin, .avatar { width: 31px; height: 31px; display: grid; place-items: center; flex: none; color: #fff; background: var(--cyan); border-radius: 50%; font-size: 10px; box-shadow: 0 2px 4px rgba(0,0,0,.2); }
.store-name small, .agent-cell small { display: block; color: var(--muted); margin-top: 2px; }
.rate { display: flex; align-items: center; gap: 7px; }.rate-bar { width: 58px; height: 5px; background: #ddd; overflow: hidden; }.rate-bar i { display: block; height: 100%; background: var(--cyan); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; font-size: 9px; font-weight: 700; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }.badge.ok { color: #176947; background: #d9f4e8; }.badge.missed { color: #a43131; background: #f8d8d8; }

.split-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 14px; margin-bottom: 14px; }
.queue-list { display: grid; }.queue-item { display: grid; grid-template-columns: 1fr auto auto; gap: 22px; align-items: center; padding: 12px; border-bottom: 1px solid #e2e2e2; }
.queue-item:nth-child(odd) { background: #f5f5f5; }.queue-item strong { display: block; font-size: 12px; font-weight: 500; }.queue-item small { color: var(--muted); font-size: 10px; }.queue-stat { text-align: right; }.queue-stat b { display: block; font-size: 15px; font-weight: 500; }.queue-stat span { color: var(--muted); font-size: 8px; }
.capability-list { display: grid; gap: 10px; }.capability { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; color: var(--muted); }.capability b { color: #176947; font-size: 9px; }.capability b.no { color: #a43131; }
.permission-note { margin-top: 16px; padding: 12px; color: #66551d; background: #fff7d8; border-left: 4px solid var(--amber); font-size: 10px; line-height: 1.5; }
.quality-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }.quality-card { padding: 14px; background: #f5f5f5; border-bottom: 4px solid var(--cyan); }.quality-card span { color: var(--muted); font-size: 10px; }.quality-card strong { display: block; font-size: 23px; font-weight: 400; margin: 7px 0; }.progress { height: 5px; background: #ddd; overflow: hidden; }.progress i { display: block; height: 100%; background: var(--cyan); }
.empty { color: var(--muted); font-size: 11px; padding: 20px; text-align: center; }
.recording-button { width: 34px; height: 34px; border: 0; border-radius: 50%; color: #fff; background: var(--cyan); box-shadow: var(--shadow); cursor: pointer; }.recording-button:hover { background: var(--cyan-dark); transform: translateY(-1px); }
footer { display: flex; justify-content: space-between; color: #777; font-size: 10px; padding: 13px 2px 0; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 90; padding: 12px 16px; color: #fff; background: #333; font-size: 11px; opacity: 0; transform: translateY(10px); pointer-events: none; transition: .25s ease; box-shadow: var(--shadow); }.toast.show { opacity: 1; transform: translateY(0); }
.audio-player { position: fixed; z-index: 80; left: 370px; right: 24px; bottom: 20px; min-height: 72px; display: grid; grid-template-columns: minmax(180px,.65fr) minmax(280px,1.6fr) 42px 38px; align-items: center; gap: 16px; padding: 12px 16px; color: #fff; background: var(--cyan-dark); box-shadow: 0 5px 20px rgba(0,0,0,.35); }
.audio-meta { display: flex; align-items: center; gap: 11px; min-width: 0; }.audio-meta strong, .audio-meta small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.audio-meta strong { font-size: 12px; }.audio-meta small { color: rgba(255,255,255,.72); font-size: 10px; margin-top: 3px; }.audio-icon { width: 36px; height: 36px; display: grid; place-items: center; flex: none; color: #242424; background: var(--amber); border-radius: 50%; }
.audio-player audio { width: 100%; height: 34px; accent-color: var(--amber); }.audio-download, .audio-close { width: 36px; height: 36px; display: grid; place-items: center; border: 0; color: #242424; background: var(--amber); border-radius: 50%; text-decoration: none; cursor: pointer; }.audio-close { color: #fff; background: var(--coral); font-size: 18px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 24px; background: rgba(0,0,0,.5); }
.users-dialog { width: min(1120px, 100%); max-height: calc(100vh - 48px); overflow: auto; background: #fff; box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.users-dialog > header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 12px 20px 12px 24px; color: #fff; background: var(--cyan); }
.users-dialog > header p { color: rgba(255,255,255,.76); font-size: 10px; letter-spacing: .1em; }.users-dialog > header h2 { margin-top: 4px; font-size: 24px; font-weight: 400; }
.users-dialog > header button { width: 44px; height: 44px; border: 0; border-radius: 50%; color: #222; background: var(--amber); cursor: pointer; font-size: 20px; }
.user-create-form { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; padding: 22px 24px 12px; }
.user-create-form label span { display: block; margin-bottom: 5px; color: #777; font-size: 11px; }.user-create-form input, .user-create-form select { width: 100%; height: 40px; border: 0; border-bottom: 2px solid #aaa; outline: none; }.user-create-form input:focus, .user-create-form select:focus { border-bottom-color: var(--cyan); }
.user-create-form button { min-height: 42px; align-self: end; border: 0; color: #222; background: var(--amber); box-shadow: var(--shadow); cursor: pointer; }
.user-form-error { min-height: 18px; padding: 0 24px; color: #c62828; font-size: 12px; }
.users-list-wrap { padding: 10px 24px 26px; overflow-x: auto; }.panel-user-name strong, .panel-user-name span { display: block; }.panel-user-name span { color: #777; font-size: 12px; }.scope-label { color: #555; font-size: 12px; }.user-state-button { min-width: 90px; height: 32px; border: 0; cursor: pointer; }.user-state-button.active { color: #176947; background: #d9f4e8; }.user-state-button.inactive { color: #a43131; background: #f8d8d8; }

@media (max-width: 1400px) {
  .shell { grid-template-columns: 76px minmax(0,1fr); }
  .brand { padding: 0 13px; }.brand > div:last-child { display: none; }.brand-mark { width: 48px; }
  nav a { justify-content: center; padding: 0; font-size: 0; } nav a span { width: auto; font-size: 17px; }
  .sidebar-foot { display: none; }.kpi-grid { grid-template-columns: repeat(2,1fr); }.quality-grid { grid-template-columns: repeat(3,1fr); }.audio-player { left: 96px; }
}
@media (max-width: 780px) {
  .shell { display: block; }.sidebar { display: none; }.app-topbar { height: 58px; padding: 0 14px; }.app-topbar h1 { font-size: 19px; }.account-action, .account-caret { display: none; }
  .dashboard-content { padding: 18px 12px 30px; }.dashboard-heading { align-items: flex-start; }.controls { grid-template-columns: 1fr; }.custom-dates { display: grid; grid-template-columns: 1fr 1fr; }.topbar-actions { display: none; }.account-caret { margin-right: 0; }.account-menu { right: 0; }
  .status-strip { align-items: flex-start; }.status-meta { display: none; }.kpi-grid, .chart-grid, .split-grid { grid-template-columns: 1fr; }.quality-grid { grid-template-columns: repeat(2,1fr); }.canvas-wrap { height: 225px; }
  .audio-player { left: 12px; right: 12px; bottom: 10px; grid-template-columns: 1fr 36px; gap: 8px; }.audio-player audio { grid-column: 1 / -1; grid-row: 2; }.audio-download { display: none; }.audio-close { grid-column: 2; grid-row: 1; }.user-create-form { grid-template-columns: 1fr; }
}
