/* VEXTELE workspace: shared shell, components and responsive page compositions. */
:root, [data-theme="light"] {
  --primary: #3867d6; --primary-dark: #2954bc; --link: #2459bf;
  --accent: #087f72; --accent-soft: #e3f5ef; --accent-ink: #ffffff;
  --bg: #f3f5f8; --card: #ffffff; --topbar-bg: #fbfcfe;
  --sidebar-bg: #eef1f6; --border: #dee4ed; --row-border: #eaf0f5;
  --text: #1b273b; --muted: #63718a; --input-bg: #f9fafc;
  --hover: #f1f5fb; --menu-hover: #e5ecf5; --icon-btn-bg: #edf2f8;
  --green: #168065; --red: #c13c57; --gray-dot: #8794aa;
  --badge-green-bg: #e2f5ed; --badge-green-fg: #187355;
  --badge-blue-bg: #e6eeff; --badge-blue-fg: #315fb7;
  --badge-gray-bg: #edf0f6; --badge-gray-fg: #64728a;
  --badge-red-bg: #fce6ed; --badge-red-fg: #b32d4d;
  --hint-bg: #eff3f9; --shadow: 0 8px 24px #1c335308;
  --shadow-lg: 0 28px 80px #172a4d26; --backdrop: #121a3399;
  --sidebar-width: 246px; --topbar-h: 76px; --fg: var(--text);
  color-scheme: light;
}
[data-theme="dark"] {
  --primary: #7f9eff; --primary-dark: #a2b8ff; --link: #a6baff;
  --accent: #79e1c2; --accent-soft: #79e1c212; --accent-ink: #10261f;
  --bg: #0d1017; --card: #141922; --topbar-bg: #0f131b;
  --sidebar-bg: #10141d; --border: #252c3a; --row-border: #202735;
  --text: #edf1f8; --muted: #909db3; --input-bg: #10151f;
  --hover: #1c2432; --menu-hover: #202a3b; --icon-btn-bg: #1c2330;
  --green: #79e1c2; --red: #f2849a; --gray-dot: #536178;
  --badge-green-bg: #79e1c214; --badge-green-fg: #79e1c2;
  --badge-blue-bg: #7f9eff1a; --badge-blue-fg: #a6baff;
  --badge-gray-bg: #909db315; --badge-gray-fg: #a5b0c3;
  --badge-red-bg: #f2849a15; --badge-red-fg: #f2849a;
  --hint-bg: #171d29; --shadow: 0 8px 24px #00000012;
  --shadow-lg: 0 28px 80px #00000060; --backdrop: #06090ec9;
  color-scheme: dark;
}
body { font-family: "Segoe UI Variable", "Segoe UI", -apple-system, sans-serif; font-size: 14px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, a, summary, input, select { -webkit-tap-highlight-color: transparent; }
button, a, summary { transition: background .16s, color .16s, border-color .16s; }
button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 4px;
}
[hidden] { display: none !important; }
.vx-icon { flex: none; vertical-align: middle; }
::selection { background: var(--accent); color: var(--accent-ink); }
* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
body:not(.signed-in) #topbar, body:not(.signed-in) #sidebar { display: none; }

/* Persistent sidebar, with native keyboard-accessible navigation groups. */
#sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); z-index: 150;
  display: flex; flex-direction: column; background: var(--sidebar-bg);
  border-right: 1px solid var(--border); padding: 30px 18px 18px;
}
.workspace-brand { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--text); }
.workspace-brand img { width: 36px; height: 36px; border-radius: 10px; }
.workspace-brand > span { font-size: 19px; letter-spacing: .12em; font-weight: 750; line-height: 1.2; }
.workspace-brand small { display: block; font-size: 8px; letter-spacing: .19em; color: var(--muted); font-weight: 500; margin-top: 6px; }
.workspace-label { display: flex; align-items: center; gap: 9px; font-size: 12px; padding: 12px; margin: 29px 0 22px; border: 1px solid var(--border); border-radius: 10px; }
.workspace-dot { width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
.workspace-version { margin-left: auto; color: var(--muted); font: 11px Consolas, monospace; }
.nav-search { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 9px; color: var(--muted); }
.nav-search:focus-within { border-color: var(--accent); }
.nav-search input { border: 0; outline: 0; box-shadow: none; background: none; color: var(--text); min-width: 0; width: 100%; font-size: 12px; }
.nav-search input::placeholder { color: var(--muted); }
.nav-caption { font-size: 9px; font-weight: 650; letter-spacing: .17em; color: var(--muted); padding: 26px 12px 13px; }
#sidebar nav { overflow-y: auto; flex: 1; min-height: 0; padding-right: 2px; }
.nav-group { margin-bottom: 6px; }
.nav-group summary { list-style: none; display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 8px; color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 550; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group[open] summary { color: var(--text); }
.nav-group summary:hover { background: var(--hover); color: var(--text); }
.nav-chevron { margin-left: auto; font-size: 18px; line-height: 1; transition: transform .15s; }
.nav-group[open] .nav-chevron { transform: rotate(90deg); }
.nav-links { padding: 3px 0 7px; }
.nav-links a { display: block; position: relative; margin: 2px 0; padding: 9px 10px 9px 43px; border-radius: 8px; font-size: 12px; text-decoration: none; color: var(--muted); }
.nav-links a:hover { background: var(--hover); color: var(--text); }
.nav-links a.selected { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-links a.selected::before { content: ""; position: absolute; left: 22px; top: calc(50% - 2px); width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.nav-no-results { color: var(--muted); font-size: 12px; text-align: center; padding: 16px 0; }
.sidebar-footer { display: flex; gap: 11px; align-items: center; border-top: 1px solid var(--border); padding: 19px 5px 0; margin-top: 20px; }
.sidebar-avatar, .agent-initial { width: 33px; height: 33px; border-radius: 10px; display: inline-grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 650; flex: none; }
.sidebar-footer strong { display: block; font-size: 12px; font-weight: 550; }
.sidebar-footer small { display: block; font-size: 11px; color: var(--muted); text-transform: capitalize; }
.sidebar-footer a { margin-left: auto; color: var(--muted); padding: 5px; }

/* Header and shared content surface. */
#topbar { margin-left: var(--sidebar-width); padding: 0 36px; gap: 18px; background: var(--topbar-bg); }
#topbar .spacer { flex: 1; }
.breadcrumbs { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--muted); min-width: 0; }
.breadcrumbs strong { font-weight: 500; color: var(--text); white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.breadcrumb-separator { color: var(--gray-dot); }
#topbar .clock { font-size: 11px; color: var(--muted); text-align: left; white-space: nowrap; }
#topbar .icon-btn { width: 34px; height: 34px; background: none; border: 1px solid var(--border); border-radius: 10px; color: var(--muted); }
#topbar .icon-btn:hover { background: var(--hover); color: var(--text); }
#topbar .mobile-menu { display: none; }
#topbar .avatar { width: 34px; height: 34px; background: var(--icon-btn-bg); color: var(--text); border: 1px solid var(--border); border-radius: 11px; }
.topbar-dialer { display: inline-flex; align-items: center; gap: 9px; border: 1px solid var(--border); border-radius: 9px; padding: 8px 12px; background: var(--card); color: var(--text); font-size: 11px; cursor: pointer; white-space: nowrap; }
.topbar-dialer:hover { border-color: var(--accent); color: var(--accent); }
#topbar .mode-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 9px; letter-spacing: .06em; background: var(--badge-gray-bg); color: var(--muted); border: 1px solid var(--border); border-radius: 6px; padding: 4px 7px; }
#topbar .mode-badge.live { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.mode-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
#topbar .user-menu { top: 65px; right: 32px; border-radius: 12px; padding: 6px; }
#topbar .user-menu a, #topbar .user-menu button { width: 100%; display: block; text-align: left; padding: 10px; border: 0; border-radius: 7px; font-size: 12px; color: var(--text); background: none; cursor: pointer; }
#topbar .user-menu button:hover { background: var(--hover); }
.signed-in .container { margin-left: var(--sidebar-width); max-width: none; padding: 36px 36px 48px; }
.container > * { min-width: 0; }
.page-title { font-size: 28px; font-weight: 650; letter-spacing: -.035em; margin-bottom: 25px; }
.page-title .info { font-size: 10px; opacity: .65; }
.section-sub { margin-top: -16px; margin-bottom: 25px; font-size: 12px; }
.card { border-radius: 15px; padding: 23px; box-shadow: var(--shadow); }
.card h3 { font-size: 14px; font-weight: 600; }
.toolbar { gap: 12px; margin-bottom: 22px; }
.btn { padding: 10px 15px; border-radius: 9px; font-size: 12px; font-weight: 550; justify-content: center; }
.btn-primary { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.btn-primary:hover { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); filter: brightness(1.08); }
.btn-sm { padding: 6px 10px; font-size: 11px; }
input[type=text], input[type=password], input[type=number], input[type=email],
input[type=search], input[type=date], input[type=time], select, textarea {
  border-radius: 8px; padding: 10px 12px; border: 1px solid var(--border);
  background: var(--input-bg); color: var(--text); font-size: 12px; max-width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.nav-search input { padding: 0; border: 0; background: none; box-shadow: none; }
.field label { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.filters { gap: 18px; }
.table-wrap { overflow-x: auto; }
table.table th { padding: 14px 18px; font-size: 10px; font-weight: 600; letter-spacing: .055em; text-transform: uppercase; background: var(--hint-bg); }
table.table td { padding: 15px 18px; font-size: 12px; }
table.table tbody tr:last-child td { border-bottom: 0; }
table.table td.empty { padding: 56px 20px; }
.badge { padding: 4px 9px; border-radius: 6px; font-size: 10px; }
.stat-grid { gap: 16px; }
.stat { border-radius: 14px; padding: 23px; }
.stat .num { font-size: 34px; font-weight: 550; letter-spacing: -.04em; }
.stat .lbl { margin-top: 7px; }
.modal-backdrop { padding: 10vh 16px 24px; backdrop-filter: blur(7px); }
.modal { border-radius: 18px; padding: 26px; max-height: 80vh; }
.modal h3 { font-size: 20px; letter-spacing: -.025em; }
.toast { border-radius: 12px; padding: 14px 35px 14px 18px; }
.empty { padding: 42px 18px; }
.pager { font-size: 11px; padding: 5px 0; }
.pager .pages a { border-radius: 7px; min-width: 30px; height: 30px; }
.pager .pages a.cur { background: var(--accent); color: var(--accent-ink); }

/* Overview: every metric is backed by the dashboard API. */
.personal-nav-link { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 550; text-decoration: none; }
.personal-workspace { max-width: 850px; padding-top: 14px; }
.personal-workspace .eyebrow { margin-bottom: 20px; }
.personal-phone-card { max-width: 420px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); padding: 22px 26px; }
.personal-card-head { display: flex; align-items: center; gap: 10px; }
.personal-phone-symbol { display: grid; place-items: center; width: 22px; height: 22px; color: var(--accent); }
.personal-card-head h2 { margin: 0; font-size: 14px; font-weight: 550; letter-spacing: 0; }
.personal-ext-line { margin: 12px 0 18px; font-size: 12px; color: var(--muted); }
.personal-ext-line strong { color: var(--text); font-weight: 550; }
.personal-open-link {
  display: inline-block; padding: 8px 14px; border-radius: 7px; border: 1px solid var(--border);
  color: var(--text); font-size: 11px; font-weight: 550; text-decoration: none;
  background: var(--hint-bg); transition: border-color .15s, color .15s;
}
.personal-open-link:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 700px) {
  #topbar .personal-signout { font-size: 10px; padding: 7px 9px; }
}
.eyebrow { font-size: 9px; letter-spacing: .19em; font-weight: 650; color: var(--muted); margin: 0 0 13px; }
.overview-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 5px 0 31px; }
.overview-heading h1 { font-size: clamp(25px, 2.6vw, 38px); letter-spacing: -.05em; font-weight: 600; margin: 0; line-height: 1.2; }
.heading-dot { color: var(--accent); }
.page-description { font-size: 12px; color: var(--muted); margin: 12px 0 0; }
.overview-heading-actions { display: flex; flex-direction: column-reverse; align-items: flex-end; gap: 11px; flex: none; }
.overview-heading-actions .btn { gap: 10px; }
.refresh-label { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--muted); }
.status-pulse { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.overview-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 17px; margin-bottom: 24px; }
.metric-card { border: 1px solid var(--border); border-radius: 15px; padding: 20px 22px; background: var(--card); position: relative; overflow: hidden; --tone: var(--accent); }
.metric-card.blue { --tone: var(--primary); }
.metric-card.violet { --tone: #b19af0; }
.metric-card.amber { --tone: #dcb47b; }
[data-theme="light"] .metric-card.violet { --tone: #7c50c0; }
[data-theme="light"] .metric-card.amber { --tone: #95671f; }
.metric-card::after { content: ""; position: absolute; left: 22px; bottom: 0; width: 36px; height: 2px; background: var(--tone); opacity: .7; }
.metric-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.metric-icon { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 10px; color: var(--tone); background: var(--hint-bg); }
.metric-value { font-size: 43px; letter-spacing: -.06em; font-weight: 500; line-height: 1.2; margin: 15px 0; font-variant-numeric: tabular-nums; }
.metric-note { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.metric-line { width: 11px; height: 3px; border-radius: 2px; background: var(--tone); }
.overview-grid { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(0,1fr); gap: 22px; }
.overview-grid > div { min-width: 0; }
.overview-panel { height: 100%; margin: 0; padding: 0; overflow: hidden; }
.panel-heading { padding: 23px 24px 18px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--row-border); }
.panel-heading h3 { margin: 0; font-size: 14px; font-weight: 600; }
.panel-heading p { margin: 5px 0 0; font-size: 10px; color: var(--muted); }
.text-link { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); text-decoration: none; font-size: 10px; white-space: nowrap; }
.text-link:hover { text-decoration: underline; }
.overview-empty { min-height: 231px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 25px 20px; text-align: center; }
.empty-symbol { display: grid; place-items: center; width: 54px; height: 54px; border: 1px solid var(--border); border-radius: 17px; background: var(--hint-bg); color: var(--muted); margin-bottom: 17px; transform: rotate(-6deg); }
.empty-symbol svg { transform: rotate(6deg); }
.overview-empty strong { font-size: 13px; font-weight: 500; }
.overview-empty p { font-size: 11px; color: var(--muted); margin: 7px 0 0; max-width: 270px; line-height: 1.65; }
.overview-empty .text-link { margin-top: 15px; }
.overview-panel .table-wrap { box-shadow: none; border: 0; border-radius: 0; margin: 0; }
.availability-content { padding: 22px 26px; display: flex; align-items: center; gap: 26px; min-height: 231px; }
.availability-ring { width: 128px; height: 128px; border-radius: 50%; padding: 9px; flex: none; transform: rotate(-90deg); }
.ring-center { border-radius: 50%; background: var(--card); width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; transform: rotate(90deg); }
.ring-center strong { font-size: 32px; line-height: 1.2; font-weight: 500; }
.ring-center span { font-size: 7px; letter-spacing: .1em; color: var(--muted); margin-top: 7px; }
.availability-legend { flex: 1; }
.availability-legend > div { display: flex; align-items: center; gap: 8px; font-size: 10px; color: var(--muted); padding: 8px 0; }
.availability-legend strong { margin-left: auto; color: var(--text); font-weight: 500; font-size: 12px; }
.legend-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.agent-identity { display: flex; align-items: center; gap: 10px; }
.workspace-bottom { display: flex; justify-content: space-between; gap: 16px; padding-top: 26px; font-size: 9px; color: var(--muted); letter-spacing: .02em; }

/* Dialer reuses its existing controls, with the workspace visual language. */
.dialer-page { gap: 28px; }
.softphone { width: 340px; max-width: 100%; padding: 8px; border-radius: 24px; background: var(--card); border-color: var(--border); color: var(--text); font-family: inherit; box-shadow: var(--shadow); }
.sp-head, .sp-foot { padding: 16px; background: transparent; border-color: var(--border); }
.sp-wordmark { font-size: 11px; }
.sp-grip, .sp-bars { display: none; }
.sp-input-row { padding: 22px 14px 10px; }
input.sp-input { font-size: 24px; padding: 18px 12px; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; text-align: center; letter-spacing: .03em; }
.sp-input::placeholder { font-size: 16px; color: var(--muted); letter-spacing: 0; }
.sp-grid { gap: 8px; padding: 18px; }
.sp-key { padding: 17px 0 12px; background: var(--hint-bg); border: 1px solid var(--border); border-radius: 13px; }
.sp-key:hover { background: var(--accent-soft); border-color: var(--accent); }
.sp-key-num { color: var(--text); font-size: 24px; }
.sp-key-sub { color: var(--muted); margin-top: 5px; }
.sp-call-row { padding: 8px 18px 22px; }
.sp-call { width: 100%; height: 46px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); }
.sp-call:hover { background: var(--accent); filter: brightness(1.1); }
.sp-close, .sp-gear, .sp-cid-btn { color: var(--muted); }
.sp-close:hover, .sp-gear:hover, .sp-cid-btn:hover { color: var(--accent); }
.sp-cid-pop { background: var(--card); border-color: var(--border); bottom: 64px; }
.sp-cid-opt { color: var(--text); }
.sp-cid-opt:hover { background: var(--hover); }
.sp-cid-opt.sel { color: var(--accent); }
.sp-recent { color: var(--text); padding: 15px 10px; border-radius: 8px; }

/* Sign-in is intentionally dark in either workspace theme. */
body:not(.signed-in) .container { margin: 0; padding: 0; max-width: none; }
.access-page { min-height: 100dvh; display: grid; grid-template-columns: 1.2fr 1fr; background: #0d1017; color: #edf1f8; --accent: #79e1c2; --accent-ink: #10261f; --muted: #909db3; --border: #252c3a; --input-bg: #10151f; --text: #edf1f8; --accent-soft: #79e1c212; color-scheme: dark; }
.access-story { position: relative; overflow: hidden; padding: 40px 9%; display: flex; flex-direction: column; justify-content: space-between; background: radial-gradient(ellipse at 50% 70%, #1e48462e, transparent 60%), #10151e; border-right: 1px solid #252c3a; }
.access-story::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .18; background-image: linear-gradient(#52698023 1px, transparent 1px), linear-gradient(90deg,#52698023 1px,transparent 1px); background-size: 55px 55px; mask-image: linear-gradient(transparent,black); }
.access-brand { position: relative; color: #edf1f8; }
.access-message { position: relative; padding: 60px 0 15px; }
.access-message .eyebrow { color: #79e1c2; font-size: 9px; }
.access-message h1 { font-size: clamp(34px,3.8vw,59px); font-weight: 500; letter-spacing: -.055em; line-height: 1.12; margin: 22px 0; }
.access-message h1 span { color: #79e1c2; }
.access-lede { color: #909db3; font-size: 13px; line-height: 1.9; max-width: 365px; }
.connection-art { height: 270px; max-width: 430px; position: relative; margin: 15px auto 0; }
.orbit { position: absolute; border: 1px solid #79e1c221; border-radius: 50%; left: 50%; top: 48%; transform: translate(-50%,-50%); }
.orbit-outer { width: 310px; height: 210px; transform: translate(-50%,-50%) rotate(-22deg); }
.orbit-inner { width: 200px; height: 150px; transform: translate(-50%,-50%) rotate(26deg); border-style: dashed; }
.orbit-core { position: absolute; left: 50%; top: 48%; transform: translate(-50%,-50%) rotate(-8deg); width: 70px; height: 70px; border: 1px solid #79e1c24a; border-radius: 21px; display: grid; place-items: center; background: #1a2b32; box-shadow: 0 0 70px #79e1c216; }
.orbit-core img { width: 43px; height: 43px; border-radius: 10px; }
.orbit-node { position: absolute; border: 1px solid #344550; background: #19252e; color: #79e1c2; width: 45px; height: 45px; border-radius: 14px; display: grid; place-items: center; animation: orbit-float 6s ease-in-out infinite; }
.node-one { left: 8%; top: 48%; }
.node-two { right: 17%; top: 7%; animation-delay: -2s; color: #a6baff; }
.node-three { right: 12%; bottom: 19%; animation-delay: -4s; }
.orbit-label { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); font-size: 8px; letter-spacing: .22em; color: #83969d; white-space: nowrap; }
@keyframes orbit-float { 50% { transform: translateY(-7px); } }
.access-footer { position: relative; display: flex; justify-content: space-between; gap: 20px; font-size: 9px; color: #909db3; padding-top: 25px; }
.access-form-column { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 40px; position: relative; }
.access-form-column form { width: 100%; max-width: 350px; }
.access-form-icon { width: 50px; height: 50px; border: 1px solid #79e1c22a; background: #79e1c20b; color: #79e1c2; display: grid; place-items: center; border-radius: 15px; margin-bottom: 30px; }
.access-form-column h2 { font-size: 32px; font-weight: 550; letter-spacing: -.04em; margin: 0; }
.access-sub { font-size: 12px; color: #909db3; margin: 12px 0 32px; }
.access-form-column .field { margin-bottom: 20px; }
.access-form-column .field label { font-size: 11px; color: #a8b4c6; }
.access-form-column input { width: 100%; padding: 14px; font-size: 13px; }
.access-form-column .btn-block { width: 100%; padding: 14px 16px; margin-top: 9px; justify-content: space-between; font-size: 12px; }
.access-note { margin-top: 24px; font-size: 10px; color: #909db3; text-align: center; }
.access-security { position: absolute; bottom: 40px; font-size: 9px; color: #909db3; display: flex; align-items: center; gap: 7px; }

/* Responsive layouts: tables scroll within cards, navigation becomes a drawer. */
.webphone-window { min-height: 100dvh; }
.webphone-window #main { padding: 12px; max-width: 400px; margin: 0 auto; }
.webphone-window .softphone { width: 100%; margin: 0; }
.webphone-window .sp-head { padding: 10px 14px; }
.webphone-window .sp-input-row { padding-top: 12px; }
.webphone-window .sp-grid { padding: 12px; gap: 7px; }
.webphone-window .sp-key { padding: 13px 0 10px; }
.webphone-window .sp-call-row { padding: 7px 12px 16px; }
.webphone-window .sp-foot { padding: 12px; }
.webphone-window .sp-call:disabled { opacity: .5; cursor: wait; }
.sp-connection { display: flex; gap: 9px; align-items: center; margin: 8px 8px 0; padding: 11px 12px; border: 1px solid #b78a354d; background: #b78a3510; color: #dcb47b; border-radius: 9px; font-size: 12px; }
.sp-connection strong { font-weight: 550; }
.sp-connection[data-state="ready"] { border-color: var(--border); background: var(--accent-soft); color: var(--accent); }
.sp-connect { margin-left: auto; padding: 3px 0; border: 0; border-bottom: 2px solid currentColor; background: none; color: var(--link); font-size: 12px; font-weight: 650; cursor: pointer; }
.sp-connect:disabled { opacity: .5; cursor: wait; }
.sp-connection-message { text-align: center; color: var(--muted); font-size: 11px; line-height: 1.6; margin: 12px 8px 0; }
.sp-connection-message:empty { display: none; }
.sp-disconnected .sp-input-row, .sp-disconnected .sp-grid, .sp-disconnected .sp-call-row { opacity: .25; }
.sp-disconnected .sp-key, .sp-disconnected .sp-call { cursor: not-allowed; }
.sp-disconnected .sp-key:hover { background: var(--hint-bg); border-color: var(--border); }
.webphone-hint { text-align: center; font-size: 10px; color: var(--muted); margin: 14px 0 0; }
.webphone-window .sp-status { text-align: center; overflow-wrap: anywhere; margin-top: 10px; }
.webphone-window #toasts { top: 12px; left: 12px; right: 12px; }
.webphone-window .toast { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.webphone-window:not(.signed-in) #main { padding: 0; max-width: none; }
.webphone-window .access-page { display: block; }
.webphone-window .access-story { display: none; }
/* Compact phone window shows only the form column of the sign-in page. */
.webphone-window .lg-shell { grid-template-columns: 1fr; }
.webphone-window .lg-aside { display: none; }
.webphone-window .access-form-column { min-height: 100dvh; padding: 30px 24px 65px; }

@media (min-width: 1600px) {
  .signed-in .container { padding-left: 52px; padding-right: 52px; }
  .overview-grid { grid-template-columns: minmax(0,1.8fr) minmax(0,1fr); }
}
@media (max-width: 1250px) {
  :root { --sidebar-width: 224px; }
  #topbar { padding: 0 25px; gap: 12px; }
  #topbar .clock { display: none; }
  .signed-in .container { padding: 28px 25px 40px; }
  .availability-content { flex-direction: column; gap: 10px; }
  .availability-legend { width: 100%; }
  .overview-empty { min-height: 285px; }
  .filters { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 1000px) {
  #sidebar { transform: translateX(-100%); transition: transform .2s; width: 260px; z-index: 310; }
  .nav-open #sidebar { transform: translateX(0); }
  body.nav-open { overflow: hidden; }
  #nav-backdrop { position: fixed; inset: 0; z-index: 300; border: 0; background: #05091199; backdrop-filter: blur(3px); }
  #topbar { margin-left: 0; }
  #topbar .mobile-menu { display: grid; place-items: center; }
  .signed-in .container { margin-left: 0; }
  .access-page { grid-template-columns: 1fr 1fr; }
  .access-story { padding: 35px; }
  .access-footer span:last-child { display: none; }
}
@media (max-width: 700px) {
  :root { --topbar-h: 65px; }
  #topbar { padding: 0 16px; gap: 10px; }
  .breadcrumbs > span, #topbar .mode-badge { display: none; }
  .breadcrumbs { font-size: 11px; flex: 1; }
  #topbar .spacer { display: none; }
  .topbar-dialer { padding: 9px; }
  .topbar-dialer span { display: none; }
  #topbar .user-menu { right: 16px; top: 56px; }
  .signed-in .container { padding: 26px 16px 40px; }
  .overview-heading { display: block; margin-top: 0; }
  .overview-heading h1 { font-size: 30px; }
  .overview-heading-actions { flex-direction: row-reverse; justify-content: space-between; align-items: center; margin-top: 24px; }
  .overview-stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .metric-card { padding: 16px; }
  .metric-heading { font-size: 10px; }
  .metric-icon { width: 26px; height: 26px; border-radius: 8px; }
  .metric-icon svg { width: 16px; height: 16px; }
  .metric-value { font-size: 35px; margin: 14px 0; }
  .metric-note { font-size: 9px; }
  .overview-grid { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .overview-empty { min-height: 220px; }
  .availability-content { flex-direction: row; min-height: 200px; gap: 30px; }
  .panel-heading { padding: 20px; }
  .panel-heading h3 { font-size: 13px; }
  .workspace-bottom { flex-direction: column; gap: 8px; }
  .filters { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
  .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  .kv { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .toolbar > input { width: 100% !important; }
  .toolbar { gap: 8px; }
  .card { padding: 18px; }
  .overview-panel { padding: 0; }
  .page-title { font-size: 24px; }
  .dialer-page > div { width: 100%; min-width: 0; }
  .softphone { margin: auto; }
  .access-page { grid-template-columns: 1fr; }
  .access-story { padding: 25px; border-right: 0; border-bottom: 1px solid #252c3a; }
  .access-message, .access-footer { display: none; }
  .access-form-column { padding: 45px 26px 80px; min-height: calc(100dvh - 90px); }
  .access-security { bottom: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
