/* Enterprise dashboard (org.html), in the style of business apps: a coloured
   app bar across the top, a light navigation pane, a command bar with the
   page's actions and flat white cards with a soft shadow. The organisation's
   colours are set by org.js (--org-primary, --org-sidebar = app bar). */

:root {
  --org-primary: #3b82f6;
  --org-primary-rgb: 59, 130, 246;
  --org-sidebar: #0b2a63;
  --org-bg: #faf9f8;
  --org-card: #ffffff;
  --org-nav: #f3f2f1;
  --org-nav-hover: #e9e7e5;
  --org-line: #edebe9;
  --org-muted: #605e5c;
  --org-text: #201f1e;
  --org-radius: 4px;
  --org-shadow: 0 1.6px 3.6px rgba(0, 0, 0, .11), 0 .3px .9px rgba(0, 0, 0, .09);
  --org-appbar-h: 48px;
}
[data-bs-theme="dark"] {
  --org-bg: #1b1a19;
  --org-card: #252423;
  --org-nav: #201f1e;
  --org-nav-hover: #2d2c2b;
  --org-line: #3b3a39;
  --org-muted: #b3b0ad;
  --org-text: #f3f2f1;
  --org-shadow: 0 1.6px 3.6px rgba(0, 0, 0, .4), 0 .3px .9px rgba(0, 0, 0, .3);
}

.org-body {
  background: var(--org-bg); color: var(--org-text); min-height: 100vh;
  font-family: "Segoe UI", "Segoe UI Web (West European)", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;
  font-size: .92rem;
}
.org-body .ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.org-body .btn, .org-body .form-control, .org-body .form-select, .org-body .input-group-text { border-radius: var(--org-radius); }
.org-body .modal-content { border-radius: 6px; border: 0; box-shadow: 0 25.6px 57.6px rgba(0, 0, 0, .22), 0 4.8px 14.4px rgba(0, 0, 0, .18); }
.org-body .modal-header { border-bottom: 0; padding-bottom: .25rem; }
.org-body .modal-footer { border-top: 0; }
.org-body .dropdown-menu { border-radius: var(--org-radius); border: 0; box-shadow: 0 6.4px 14.4px rgba(0, 0, 0, .13), 0 1.2px 3.6px rgba(0, 0, 0, .11); }

.org-body .avatar { --av-base: var(--org-primary); }

.org-boot { min-height: 100vh; display: grid; place-items: center; }

.btn-org { background: var(--org-primary); border-color: var(--org-primary); color: #fff; font-weight: 600; }
.btn-org:hover, .btn-org:focus { background: var(--org-primary); border-color: var(--org-primary); color: #fff; filter: brightness(.92); }
.btn-org-soft { background: transparent; color: var(--org-primary); border: 1px solid var(--org-line); }
.btn-org-soft:hover { background: rgba(var(--org-primary-rgb), .08); color: var(--org-primary); }
.text-org { color: var(--org-primary) !important; }
.org-body .form-check-input:checked { background-color: var(--org-primary); border-color: var(--org-primary); }
.org-body a:not(.btn) { color: var(--org-primary); }

/* ---- logo / initials mark */
.org-mark { width: 30px; height: 30px; border-radius: var(--org-radius); background: rgba(255, 255, 255, .2); color: #fff; display: inline-grid; place-items: center; font-weight: 700; font-size: .95rem; flex: none; }
.org-mark-lg { width: 56px; height: 56px; border-radius: 8px; font-size: 1.5rem; background: var(--org-primary); }
.org-logo { max-height: 28px; max-width: 120px; object-fit: contain; }
.org-logo-lg { max-height: 64px; max-width: 220px; object-fit: contain; }

/* ---- sign in */
.org-auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(180deg, var(--org-sidebar) 0 220px, var(--org-bg) 220px); }
.org-auth-card { width: 100%; max-width: 420px; background: var(--org-card); border-radius: 6px; box-shadow: 0 25.6px 57.6px rgba(0, 0, 0, .14), 0 4.8px 14.4px rgba(0, 0, 0, .12); padding: 36px 32px; }
.org-auth-brand { text-align: center; margin-bottom: 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.org-powered { text-align: center; font-size: .8rem; color: var(--org-muted); margin: 22px 0 0; }

/* ---- layout: app bar on top, navigation pane, content */
.org-shell {
  display: grid; grid-template-columns: 228px minmax(0, 1fr); grid-template-rows: var(--org-appbar-h) minmax(0, 1fr);
  grid-template-areas: "bar bar" "side main"; min-height: 100vh;
}
.org-appbar {
  grid-area: bar; position: sticky; top: 0; z-index: 1045; height: var(--org-appbar-h);
  background: var(--org-sidebar); color: #fff; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 12px;
}
.org-appbar-brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.org-side-name { font-weight: 600; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-appbar-sep { width: 1px; height: 20px; background: rgba(255, 255, 255, .35); flex: none; }
.org-appbar-product { font-size: .95rem; color: rgba(255, 255, 255, .85); white-space: nowrap; }
.org-appbar-actions { display: flex; align-items: center; gap: 4px; }
.org-appbar-btn { background: none; border: 0; color: #fff; height: var(--org-appbar-h); padding: 0 12px; display: inline-flex; align-items: center; gap: 8px; }
a.org-appbar-btn, a.org-appbar-btn:hover { color: #fff; text-decoration: none; }
.org-appbar-btn:hover, .org-userbtn:hover { background: rgba(255, 255, 255, .12); }
.org-userbtn { background: none; border: 0; height: var(--org-appbar-h); padding: 0 10px; display: grid; place-items: center; }
.org-avatar { width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--org-sidebar); display: grid; place-items: center; font-size: .8rem; font-weight: 700; }
.org-usermenu { min-width: 240px; }

.org-sidebar {
  grid-area: side; background: var(--org-nav); border-right: 1px solid var(--org-line); position: sticky; top: var(--org-appbar-h);
  height: calc(100vh - var(--org-appbar-h)); display: flex; flex-direction: column; overflow-y: auto; z-index: 1040;
}
.org-nav { padding: 8px 0; display: flex; flex-direction: column; flex: 1; }
.org-nav-label { color: var(--org-muted); font-size: .75rem; font-weight: 600; padding: 16px 16px 6px; }
.org-nav-link {
  position: relative; display: flex; align-items: center; gap: 12px; color: var(--org-text) !important; text-decoration: none;
  padding: 8px 16px; background: none; border: 0; font-size: .9rem; text-align: left; line-height: 1.3;
}
.org-nav-link .ico { width: 18px; height: 18px; color: var(--org-muted); }
.org-nav-link:hover { background: var(--org-nav-hover); }
.org-nav-link.active { background: var(--org-card); font-weight: 600; }
.org-nav-link.active::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 2px; background: var(--org-primary); }
.org-nav-link.active .ico { color: var(--org-primary); }
.org-nav-link .badge { margin-left: auto; }
.org-side-foot { padding: 8px 0 12px; border-top: 1px solid var(--org-line); }
.org-logout { color: var(--org-muted) !important; }

.org-main { grid-area: main; padding: 0 28px 48px; min-width: 0; }
/* Command bar */
.org-topbar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--org-card); border-bottom: 1px solid var(--org-line);
  margin: 0 -28px 0; padding: 10px 28px; position: sticky; top: var(--org-appbar-h); z-index: 1020;
}
.org-title { font-size: 1.25rem; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.org-title .ico { width: 22px; height: 22px; color: var(--org-primary); }
.org-tools { display: flex; align-items: center; gap: 8px; }
.org-search {
  display: flex; align-items: center; gap: 8px; background: var(--org-bg); border: 1px solid var(--org-line); border-radius: var(--org-radius);
  padding: 0 10px; height: 34px; width: min(340px, 50vw); color: var(--org-muted); margin: 0;
}
.org-search:focus-within { border-color: var(--org-primary); background: var(--org-card); }
.org-search .ico { width: 16px; height: 16px; }
.org-search input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; color: var(--org-text); }
.org-add {
  height: 34px; border-radius: var(--org-radius); border: 0; background: var(--org-primary); color: #fff; display: inline-flex; align-items: center;
  gap: 6px; padding: 0 14px 0 10px; font-weight: 600; flex: none;
}
.org-add:hover { filter: brightness(.92); }
.org-add .ico { width: 18px; height: 18px; }
.org-burger { display: none; background: none; border: 0; color: #fff; padding: 6px; height: var(--org-appbar-h); }
.org-subline { color: var(--org-muted); font-size: .85rem; min-height: 1.2em; margin: 14px 0 14px; }
.org-scrim { display: none; }

/* ---- tabs: a pivot (text with an underline) */
.org-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--org-line); margin-bottom: 16px; overflow-x: auto; }
.org-tab { position: relative; background: none; border: 0; padding: 10px 12px; color: var(--org-text); white-space: nowrap; }
.org-tab:hover { background: var(--org-nav); }
.org-tab.active { font-weight: 600; }
.org-tab.active::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 0; height: 2px; border-radius: 2px; background: var(--org-primary); }
.org-tab .count { color: var(--org-muted); margin-left: 4px; font-size: .85em; font-weight: 400; }

/* ---- cards & tables */
.org-card { background: var(--org-card); border: 0; border-radius: var(--org-radius); box-shadow: var(--org-shadow); }
.org-card-pad { padding: 16px 20px; }
.org-card-title { font-size: 1rem; font-weight: 600; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
.org-grid { display: grid; gap: 16px; }
.org-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.org-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.org-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.org-table { margin: 0; color: var(--org-text); --bs-table-bg: transparent; --bs-table-color: var(--org-text); }
.org-table thead th { font-weight: 600; font-size: .8rem; color: var(--org-muted); padding: 10px 14px; border-bottom: 1px solid var(--org-line); white-space: nowrap; background: transparent; }
.org-table tbody td { padding: 10px 14px; vertical-align: middle; border-color: var(--org-line); }
.org-table tbody tr:hover td { background: var(--org-nav); }
.org-table tbody tr:last-child td { border-bottom: 0; }
.org-table .muted, .org-muted { color: var(--org-muted); }
.org-table-wrap { overflow-x: auto; }
.org-empty { text-align: center; color: var(--org-muted); padding: 36px 16px !important; }
.org-gear { background: none; border: 0; color: var(--org-muted); padding: 5px; border-radius: var(--org-radius); }
.org-gear:hover { color: var(--org-primary); background: rgba(var(--org-primary-rgb), .08); }
.org-gear .ico { width: 18px; height: 18px; }
.org-link { background: none; border: 0; padding: 0; color: var(--org-primary); display: inline-flex; align-items: center; gap: 6px; }
.org-link:hover { text-decoration: underline; }
.org-table audio { width: 260px; height: 36px; display: block; }
.org-ann-text { max-width: 420px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Status labels (roles, groups, states) */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 2px; font-size: .78rem; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.pill-blue { background: #deecf9; color: #005a9e; }
.pill-green { background: #dff6dd; color: #107c10; }
.pill-red { background: #fde7e9; color: #a4262c; }
.org-minutes-input { width: 8.5rem; }
/* Key maps (virtual receptionists, keys in a queue): one row per key */
/* Key options: a list (pen = edit) and a small popup over the dialog */
.org-keylist-items { display: grid; gap: 6px; }
.org-key-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--org-line); border-radius: var(--org-radius); background: var(--bs-body-bg); min-width: 0; }
.org-key-edit { background: none; border: 0; padding: 4px; border-radius: var(--org-radius); color: var(--bs-secondary-color); display: inline-grid; place-items: center; }
.org-key-edit:hover, .org-key-edit:focus-visible { background: var(--org-nav); color: var(--bs-body-color); }
.org-key-edit .ico { width: 16px; height: 16px; }
.org-subpop { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .35); border-radius: inherit; }
.org-subpop-card { width: min(440px, 100%); max-height: 100%; overflow: auto; background: var(--bs-body-bg); border: 1px solid var(--org-line); border-radius: var(--org-radius); box-shadow: 0 12px 32px rgba(0, 0, 0, .25); padding: 20px; }
.org-key { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: var(--org-radius); background: var(--org-nav); border: 1px solid var(--org-line); font-weight: 600; font-family: var(--bs-font-monospace); }
/* The web phone's "how to dial" info icon in the app bar */
.wp-info-btn { background: none; border: 0; padding: 0; margin-left: 2px; color: rgba(255, 255, 255, .8); display: inline-grid; place-items: center; cursor: help; }
.wp-info-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.wp-info-btn:hover, .wp-info-btn:focus-visible { color: #fff; }
.tooltip-inner { max-width: 340px; }
/* The web phone's line menu: a star for the user's default line */
.wp-line-menu .dropdown-item { cursor: pointer; }
.wp-line-star { color: var(--org-muted); line-height: 1; }
.wp-line-star .ico-sm { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.wp-line-star.on { color: #f5a623; }
.wp-line-star.on .ico-sm { fill: currentColor; }
.wp-line-menu .dropdown-item.active .wp-line-star:not(.on) { color: rgba(255, 255, 255, .8); }
.pill-amber { background: #fff4ce; color: #8a5a00; }
.pill-purple { background: #ede7f6; color: #5c2e91; }
.pill-gray { background: #f3f2f1; color: #484644; }
[data-bs-theme="dark"] .pill-blue { background: rgba(0, 120, 212, .25); color: #9fd1ff; }
[data-bs-theme="dark"] .pill-green { background: rgba(16, 124, 16, .3); color: #9ee59e; }
[data-bs-theme="dark"] .pill-red { background: rgba(164, 38, 44, .35); color: #ffabb0; }
[data-bs-theme="dark"] .pill-amber { background: rgba(138, 90, 0, .35); color: #ffd877; }
[data-bs-theme="dark"] .pill-purple { background: rgba(92, 46, 145, .4); color: #d4bff2; }
[data-bs-theme="dark"] .pill-gray { background: rgba(255, 255, 255, .1); color: #d2d0ce; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; background: #b3b0ad; }
.dot-online { background: #13a10e; }
.dot-busy { background: #d13438; }
.dot-dnd { background: #ffaa44; }

/* Stat tiles (overview): a number with a coloured accent on the left */
.org-stat { display: flex; flex-direction: column; gap: 4px; border-left: 3px solid var(--org-primary); }
.org-stat-icon { width: 36px; height: 36px; border-radius: var(--org-radius); display: grid; place-items: center; background: rgba(var(--org-primary-rgb), .1); color: var(--org-primary); margin-bottom: 6px; }
.org-stat-icon.green { background: rgba(16, 124, 16, .1); color: #107c10; }
.org-stat-icon.amber { background: rgba(255, 170, 68, .18); color: #8a5a00; }
.org-stat-icon.red { background: rgba(209, 52, 56, .1); color: #a4262c; }
.org-stat:has(.org-stat-icon.green) { border-left-color: #107c10; }
.org-stat:has(.org-stat-icon.amber) { border-left-color: #ffaa44; }
.org-stat:has(.org-stat-icon.red) { border-left-color: #d13438; }
.org-stat-value { font-size: 1.75rem; font-weight: 600; line-height: 1.1; }
.org-stat-label { color: var(--org-muted); font-size: .85rem; }
.org-stat-sub { font-size: .78rem; color: var(--org-muted); }

.org-bigext { font-size: 2.4rem; font-weight: 600; letter-spacing: .03em; line-height: 1; }
.org-kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.org-kv dt { color: var(--org-muted); font-weight: 400; }
.org-kv dd { margin: 0; overflow-wrap: anywhere; }

/* Queue cards */
.org-queue { display: flex; flex-direction: column; gap: 10px; border-top: 3px solid var(--org-primary); }
.org-queue-num { font-family: var(--bs-font-monospace); color: var(--org-muted); }
.org-agents { display: flex; flex-wrap: wrap; gap: 6px; }

/* Member pickers inside dialogs */
.org-pick { max-height: 260px; overflow-y: auto; border: 1px solid var(--org-line); border-radius: var(--org-radius); padding: 4px 10px; }
.org-pick .form-check { padding: 6px 0 6px 1.8em; margin: 0; border-bottom: 1px solid var(--org-line); }
.org-pick .form-check:last-child { border-bottom: 0; }
.org-pick-sm { max-height: 170px; }
/* Virtual receptionist builder: keypad + call flow */
.org-ivr-pad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 560px; }
.org-ivr-key { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 64px; padding: 8px 12px; text-align: left;
  border: 1px dashed var(--org-line); border-radius: var(--org-radius); background: transparent; color: var(--org-muted); }
.org-ivr-key:hover { border-color: var(--org-primary); }
.org-ivr-key.set { border-style: solid; border-color: rgba(var(--org-primary-rgb), .5); background: rgba(var(--org-primary-rgb), .07); color: inherit; }
.org-ivr-digit { font-size: 1.35rem; font-weight: 600; line-height: 1; }
.org-ivr-dest { font-size: .78rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-ivr-tree { list-style: none; margin: 0; padding-left: 0; }
.org-ivr-tree .org-ivr-tree { padding-left: 22px; border-left: 2px solid var(--org-line); margin: 4px 0 4px 10px; }
.org-ivr-tree li { padding: 3px 0; }
.org-vm-transcript { max-width: 420px; color: var(--org-muted); font-style: italic; white-space: normal; }
.org-span-2 { grid-column: 1 / -1; }
.org-pick-row { display: flex; align-items: center; gap: 10px; }

/* Wallboard (fits a TV in full screen) */
.org-wallboard:fullscreen { background: var(--bs-body-bg); padding: 24px; overflow-y: auto; }
.org-wb-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.org-wb-tile { border: 1px solid var(--org-line); border-radius: var(--org-radius); padding: 10px 12px; }
.org-wb-value { font-size: 1.9rem; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.org-wallboard:fullscreen .org-wb-value { font-size: 2.8rem; }
.org-wb-label { font-size: .78rem; color: var(--org-muted); }
.org-wb-alert { border-color: #c4314b; background: rgba(196, 49, 75, .08); }
.org-wb-alert .org-wb-value { color: #c4314b; }
.org-wb-warn .org-wb-value { color: #c87d0a; }
.org-wb-good .org-wb-value { color: #107c10; }
.org-wb-list { padding-left: 1.2em; margin: 0; }
.org-wb-list li { padding: 3px 0; }
.org-wb-list li span:first-child { margin-right: 10px; }
.org-wb-list li span:last-child { float: right; }
.org-wb-agent { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--org-line); border-radius: 999px; padding: 3px 4px 3px 12px; font-size: .88rem; }
.org-pick-row .form-control { width: 76px; }
.org-perm-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--org-line); }
.org-perm-row:last-child { border-bottom: 0; }
.org-perm-row .form-select { width: auto; min-width: 150px; }
.org-hours-row { display: grid; grid-template-columns: 70px auto 1fr 1fr; gap: 10px; align-items: center; margin-bottom: 6px; }

/* Branding preview: app bar on top, navigation pane, content */
.org-preview { display: grid; grid-template-columns: 110px 1fr; grid-template-rows: 22px 1fr; border-radius: var(--org-radius); overflow: hidden; border: 1px solid var(--org-line); min-height: 170px; }
.org-preview::before { content: ""; grid-column: 1 / -1; background: var(--org-sidebar); }
.org-preview-side { background: var(--org-nav); padding: 12px 8px; display: flex; flex-direction: column; gap: 8px; border-right: 1px solid var(--org-line); }
.org-preview-item { height: 8px; border-radius: 2px; background: var(--org-line); }
.org-preview-item.active { background: var(--org-card); border-left: 3px solid var(--org-primary); height: 18px; }
.org-preview-main { background: var(--org-bg); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.org-preview-bar { height: 12px; width: 60%; border-radius: 2px; background: var(--org-line); }
.org-preview-btn { width: 54px; height: 22px; border-radius: 2px; background: var(--org-primary); align-self: flex-end; }
.org-color { width: 56px; min-width: 56px; height: 40px; padding: 4px; flex: none; }
.org-bg-color { flex: none; }
.org-bg-sliders { max-width: 520px; }

.org-live-dot { width: 9px; height: 9px; }

/* Custom background (Branding): fixed behind the content; the command bar
   stays solid so the title is readable on any image */
.org-has-bg { position: relative; isolation: isolate; }
.org-has-bg::before {
  content: ""; position: fixed; z-index: -1; pointer-events: none;
  /* Reaches past the edges, so a blurred image has no faded border */
  inset: calc(var(--org-bg-blur, 0px) * -2);
  background-color: var(--org-bg-color, transparent); background-image: var(--org-bg-image, none);
  background-size: var(--org-bg-size, cover); background-repeat: var(--org-bg-repeat, no-repeat); background-position: center;
  filter: blur(var(--org-bg-blur, 0px));
}
.org-shell.org-has-bg .org-subline { display: inline-block; background: color-mix(in srgb, var(--org-card) 88%, transparent); backdrop-filter: blur(10px); border-radius: var(--org-radius); padding: 3px 10px; }
.org-shell.org-has-bg .org-subline:empty { display: none; }
.org-shell.org-has-bg .org-tabs { background: color-mix(in srgb, var(--org-card) 85%, transparent); }
.org-shell.org-has-bg > .org-main > .org-view > p.org-muted { background: color-mix(in srgb, var(--org-card) 88%, transparent); border-radius: var(--org-radius); padding: 8px 12px; }
.org-auth.org-has-bg { background-position: center; }
.org-preview-main.org-has-bg { background-attachment: scroll; }
.org-role-card .form-check-input:disabled { opacity: .8; }

/* ---- user call history, reports */
.org-mini-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.org-mini-stat { background: var(--org-bg); border-left: 3px solid var(--org-primary); border-radius: 2px; padding: 8px 10px; display: flex; flex-direction: column; min-width: 0; }
.org-mini-stat strong { font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-mini-stat span { font-size: .75rem; color: var(--org-muted); }
.org-table-sm thead th { padding: 8px 12px; }
.org-table-sm tbody td { padding: 8px 12px; }
.org-note { color: var(--org-text); background: rgba(255, 185, 0, .16); border-radius: 2px; padding: 2px 8px; margin-top: 4px; display: inline-block; white-space: pre-wrap; }
.org-days { display: flex; align-items: flex-end; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.org-day { flex: 1 0 28px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.org-day-bar { height: 140px; width: 100%; max-width: 34px; display: flex; align-items: flex-end; background: rgba(var(--org-primary-rgb), .06); border-radius: 2px; overflow: hidden; }
.org-day-fill { display: block; width: 100%; background: var(--org-primary); border-radius: 2px 2px 0 0; min-height: 2px; }
.org-day-label, .org-day-n { font-size: .7rem; color: var(--org-muted); white-space: nowrap; }
.org-day-n { color: var(--org-text); font-weight: 600; }
@media (max-width: 767.98px) { .org-mini-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---- the web phone (org-dialer.html): Bootstrap cards in the dashboard's style */
.wp-appbar { position: sticky; top: 0; padding: 0 16px; gap: 16px; }
.wp-appbar .form-check-label, .wp-appbar-sub { color: rgba(255, 255, 255, .8); }
.wp-appbar .form-check-input { background-color: rgba(255, 255, 255, .25); border-color: rgba(255, 255, 255, .5); }
.wp-appbar .form-check-input:checked { background-color: #fff; border-color: #fff; --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%230b2a63'/%3e%3c/svg%3e"); }
.wp-appbar .reg-status { padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .12); }
.wp-appbar .reg-status.on { color: #9ee59e; }
.wp-appbar .reg-status.off { color: #ffb3b3; }
:is(.wp-fluent, .admin-fluent) .card { border: 0; border-radius: var(--org-radius); box-shadow: var(--org-shadow); background: var(--org-card); }
:is(.wp-fluent, .admin-fluent) .card-header { background: var(--org-card); border-bottom: 1px solid var(--org-line); }
:is(.wp-fluent, .admin-fluent) .call-info { border: 0 !important; }
:is(.wp-fluent, .admin-fluent) .list-group-item { background: var(--org-card); border-color: var(--org-line); color: var(--org-text); }
:is(.wp-fluent, .admin-fluent) .list-group-flush .list-group-item:hover { background: var(--org-nav); }
/* Tabs as a pivot: text with a coloured underline */
:is(.wp-fluent, .admin-fluent) .nav-tabs { border-bottom: 1px solid var(--org-line); gap: 4px; }
:is(.wp-fluent, .admin-fluent) .card-header-tabs { margin-bottom: calc(-1 * var(--bs-card-cap-padding-y) - 1px); }
:is(.wp-fluent, .admin-fluent) .nav-tabs .nav-link { position: relative; border: 0; border-radius: 0; color: var(--org-text); background: none; padding: 10px 12px; }
:is(.wp-fluent, .admin-fluent) .nav-tabs .nav-link:hover { background: var(--org-nav); }
:is(.wp-fluent, .admin-fluent) .nav-tabs .nav-link.active { font-weight: 600; color: var(--org-text); background: none; }
:is(.wp-fluent, .admin-fluent) .nav-tabs .nav-link.active::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 0; height: 2px; border-radius: 2px; background: var(--org-primary); }
/* Buttons and switches in the organisation's colour */
:is(.wp-fluent, .admin-fluent) .btn-primary { background: var(--org-primary); border-color: var(--org-primary); font-weight: 600; }
:is(.wp-fluent, .admin-fluent) .btn-primary:hover, :is(.wp-fluent, .admin-fluent) .btn-primary:focus { background: var(--org-primary); border-color: var(--org-primary); filter: brightness(.92); }
:is(.wp-fluent, .admin-fluent) .btn-primary:disabled { background: var(--org-primary); border-color: var(--org-primary); opacity: .45; }
:is(.wp-fluent, .admin-fluent) .btn-outline-primary { color: var(--org-primary); border-color: var(--org-line); }
:is(.wp-fluent, .admin-fluent) .btn-outline-primary:hover { background: rgba(var(--org-primary-rgb), .08); color: var(--org-primary); border-color: var(--org-primary); }
:is(.wp-fluent, .admin-fluent) .form-control:focus, :is(.wp-fluent, .admin-fluent) .form-select:focus { border-color: var(--org-primary); box-shadow: 0 0 0 .15rem rgba(var(--org-primary-rgb), .2); }
:is(.wp-fluent, .admin-fluent) .keypad .btn, :is(.wp-fluent, .admin-fluent) .call-btn.aux { border-radius: var(--org-radius); border-color: var(--org-line); }
:is(.wp-fluent, .admin-fluent) .keypad .btn:hover { background: var(--org-nav); color: var(--org-text); }
/* Enterprise web phone: white keys (white digits on dark, white keys on light) */
.wp-fluent .keypad .btn { color: var(--org-text); background: var(--org-card); }
[data-bs-theme="dark"] .wp-fluent .keypad .btn { color: #fff; }
.wp-fluent .keypad .btn small { opacity: .75; }
:is(.wp-fluent, .admin-fluent) .dialer-display { border-radius: var(--org-radius); }
:is(.wp-fluent, .admin-fluent) .badge { border-radius: 2px; }
/* Keypad: only call / hang up (mute and hold are icons in the call card) */
:is(.wp-fluent, .admin-fluent) #keypad + .call-actions { grid-template-columns: 1fr; }
:is(.wp-fluent, .admin-fluent) .call-btn { border-radius: var(--org-radius); }
.wp-icon-btn { width: 38px; height: 38px; padding: 0; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--org-line); color: var(--org-muted); background: var(--org-card); }
.wp-icon-btn .ico-sm { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wp-icon-btn:hover:not(:disabled) { background: var(--org-nav); color: var(--org-text); border-color: var(--org-line); }
.wp-icon-btn:disabled { opacity: .4; border-color: var(--org-line); }
#mute.wp-icon-btn.active { background: #d13438; border-color: #d13438; color: #fff; }
#hold.wp-icon-btn.active { background: #ffaa44; border-color: #ffaa44; color: #201f1e; }
:is(.wp-fluent, .admin-fluent) .modal-header .nav-tabs, :is(.wp-fluent, .admin-fluent) .modal-body .nav-tabs { margin-bottom: 0; }

/* ---- the network's web phone (dialer.html: Windows app and pop-out) in the
   same style: one narrow column on a card */
/* Enterprise web phone: Home + a tab per call (org-dialer.js renderCallbar) */
.od-callbar {
  position: sticky; top: var(--org-appbar-h); z-index: 1040; display: flex; align-items: stretch; gap: 2px; overflow-x: auto;
  padding: 6px 12px 0; background: var(--org-card); border-bottom: 1px solid var(--org-line); box-shadow: var(--org-shadow); scrollbar-width: thin;
}
.od-ctab {
  display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; max-width: 260px; height: 38px; padding: 0 6px 0 12px;
  border: 1px solid transparent; border-bottom: 0; border-radius: 6px 6px 0 0; background: transparent; color: var(--org-muted);
  font-size: .9rem; cursor: pointer; position: relative; user-select: none;
}
button.od-ctab { padding-right: 14px; }
.od-ctab:hover { background: var(--org-bg); color: var(--bs-body-color); }
.od-ctab.active { background: var(--org-bg); color: var(--bs-body-color); border-color: var(--org-line); font-weight: 600; }
.od-ctab.active::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--org-primary); }
.od-ctab:focus-visible { outline: 2px solid var(--org-primary); outline-offset: -2px; }
.od-ctab-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.od-ctab-state { font-size: .78rem; font-weight: 400; color: var(--org-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.od-ctab-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; background: #8a8886; }
.od-ctab.is-live .od-ctab-dot { background: #22a35a; box-shadow: 0 0 0 3px rgba(34, 163, 90, .2); }
.od-ctab.is-held .od-ctab-dot { background: #e5a000; }
.od-ctab.is-held .od-ctab-state { color: #b97f00; }
.od-ctab.is-ringing .od-ctab-dot { background: var(--org-primary); animation: od-pulse 1.2s ease-in-out infinite; }
.od-ctab.is-ended { opacity: .75; }
.od-ctab.is-ended .od-ctab-dot { background: #c4314b; }
.od-ctab-x {
  display: inline-grid; place-items: center; width: 24px; height: 24px; flex: 0 0 auto; border: 0; border-radius: 4px; padding: 0;
  background: transparent; color: inherit; opacity: .7;
}
.od-ctab-x:hover { background: rgba(196, 49, 75, .15); color: #c4314b; opacity: 1; }
.od-ctab-x svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
@keyframes od-pulse { 50% { opacity: .35; } }

/* Recent calls: compact rows */
.od-recent-card .card-header { padding-top: .45rem; padding-bottom: .45rem; }
.od-recent-card .wp-recent { padding: .35rem .75rem; gap: .5rem !important; }
.od-recent-card .wp-recent .fw-semibold { font-size: .875rem; line-height: 1.25; }
.od-recent-card .wp-recent .small { font-size: .75rem; }
.od-recent-card .wp-recent .ico-sm { width: 15px; height: 15px; }
.od-recent-card .wp-redial { padding: .15rem .35rem; line-height: 1; }
.od-recent-card .wp-redial .ico-sm { width: 14px; height: 14px; }
/* Wide: the right column is as tall as the keypad / call, not taller; the
   pinned list and Recent calls scroll inside it */
@media (min-width: 992px) {
  /* (--od-side-h: the height on Home, org-dialer.js; call tabs keep it) */
  #od-side-col { position: relative; min-height: var(--od-side-h, 360px); }
  .od-side { position: absolute; top: 0; bottom: 0; left: calc(var(--bs-gutter-x) * .5); right: calc(var(--bs-gutter-x) * .5); display: flex; flex-direction: column; }
  .od-side > aside { display: flex; flex-direction: column; min-height: 0; flex: 0 1 auto; overflow: hidden; }
  .od-side > aside > .card-header { flex: 0 0 auto; }
  .od-side > aside .wp-list { flex: 1 1 auto; max-height: none; min-height: 0; overflow-y: auto; }
  .od-side > aside:first-child { max-height: 40%; min-height: 96px; }
  .od-side > #od-park-card { max-height: 28%; min-height: 90px; }
  .od-side > .od-recent-card { flex: 1 1 0; min-height: 140px; }
}

/* The call card's picture for a caller without a name */
.ci-avatar-icon { width: 55%; height: 55%; fill: currentColor; }
/* Statuses besides online / on a call / do not disturb */
.status-dot.away, .dot-away { background: #e8b400; }
.status-dot.unavailable, .dot-unavailable { background: #f2c811; }
.status-dot.idle, .dot-idle { background: transparent; box-shadow: inset 0 0 0 2px #8a8886; }
/* After Conversation Work (wrap-up after a call) */
.status-dot.acw, .dot-acw { background: #8764b8; }
/* An organisation's own status: its colour (--dot), its symbol inside */
.status-dot.od-custom-dot, .dot-custom { background: var(--dot, #6c757d); display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; color: #fff; font-size: 0; line-height: 1; }
.status-dot.od-custom-dot:not(:empty) { width: 16px; height: 16px; font-size: 10px; font-weight: 700; }
.status-dot.ringing { background: var(--bs-info); animation: od-lamp 1s steps(2, start) infinite; }
@keyframes od-lamp { to { opacity: .25; } }
/* The status button in the app bar */
.od-status-btn { display: inline-flex; align-items: center; gap: 2px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: inherit; border-radius: 999px; padding: 3px 10px; font-size: .85rem; white-space: nowrap; }
.od-status-btn:hover { background: rgba(255,255,255,.16); }
.od-status-menu { min-width: 260px; }
#od-status-label { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.od-status-menu .dropdown-item.active { background: var(--org-nav); color: var(--org-text); font-weight: 600; }
/* Wrap-up bar (under the call tabs) */
.od-wrapbar { display: flex; align-items: center; gap: 10px; padding: 6px 16px; background: color-mix(in srgb, var(--bs-warning) 18%, var(--org-card)); border-bottom: 1px solid var(--org-line); }
.od-wrapbar[hidden] { display: none; }
.od-wrapbar .ico-sm { width: 18px; height: 18px; fill: currentColor; }
.od-idle-icon { background: color-mix(in srgb, #8a8886 18%, transparent) !important; color: #8a8886 !important; }
/* Team (busy lamp field) on Home */
.od-team .card-header { padding-top: .5rem; padding-bottom: .5rem; }
.od-team-search { max-width: 170px; }
.od-blf { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; padding: 12px; overflow-y: auto; max-height: var(--od-side-h, 560px); align-content: start; }
.od-lamp { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--org-line); border-radius: var(--org-radius); background: var(--org-card); cursor: pointer; text-align: left; color: inherit; min-width: 0; transition: border-color .15s, background .15s; }
.od-lamp:hover { border-color: var(--org-primary, var(--bs-primary)); }
.od-lamp .avatar { width: 34px; height: 34px; font-size: .95rem; flex: 0 0 auto; font-weight: 400; }
.od-lamp-dot { position: absolute; left: 34px; top: 30px; width: 12px; height: 12px; margin: 0; box-shadow: 0 0 0 2px var(--org-card); }
.od-lamp-dot.idle { box-shadow: inset 0 0 0 2px #8a8886, 0 0 0 2px var(--org-card); background: var(--org-card); }
.od-lamp-name { font-weight: 600; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.od-lamp-sub { font-size: .75rem; color: var(--org-muted, var(--bs-secondary-color)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.od-lamp.is-talking { border-color: color-mix(in srgb, var(--bs-warning) 60%, var(--org-line)); background: color-mix(in srgb, var(--bs-warning) 8%, var(--org-card)); }
.od-lamp.is-ringing { border-color: var(--bs-info); background: color-mix(in srgb, var(--bs-info) 10%, var(--org-card)); }
.od-lamp.is-offline { opacity: .55; }
.od-lamp.is-me { cursor: default; }
.od-lamp-pick { margin-left: auto; flex: 0 0 auto; padding: 2px 8px; font-size: .75rem; }
/* Missed calls badge (Recent calls, the Home tab) */
.od-missed-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #c4314b; color: #fff; font-size: .7rem; font-weight: 700; line-height: 1; }
.od-missed-badge[hidden] { display: none; }
/* Attended transfer bar (the call to the target; the caller waits on hold) */
.od-consult { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: color-mix(in srgb, var(--bs-success) 12%, transparent); border-bottom: 1px solid var(--org-line); }
.od-consult[hidden] { display: none; }
.od-consult .ico-sm { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; color: var(--bs-success); }
/* The other side talking: a ring with a gap around the call card's picture */
#ci-avatar { font-weight: 400; outline: 2.5px solid transparent; outline-offset: 4px; transition: outline-color .15s ease; }
#ci-avatar.od-speaking { outline-color: var(--bs-success); }

/* Redirect dialog, Outside number: the country code small next to the number,
   the Home keypad and its call button below */
/* (as wide as the Home keypad; the keys shrink a little only when the window
   is too low to show it all without scrolling) */
.od-outside { max-width: 300px; }
.od-outside .keypad .btn { height: clamp(42px, calc((100vh - 400px) / 4), 60px); }
.od-outside .od-cc { flex: 0 0 92px; width: 92px; padding-left: .4rem; padding-right: .4rem; }
.od-outside .dialer-display::placeholder { font-family: var(--bs-body-font-family); font-size: .95rem; }
.od-outside #od-out-preview:empty { display: none; }
/* Outside number tab: a slimmer dialog frame, so it fits the window */
#od-modal.od-modal-outside .modal-dialog { margin-top: .75rem; margin-bottom: .75rem; }
#od-modal.od-modal-outside .modal-dialog-scrollable { height: auto; max-height: calc(100% - 1.5rem); }
#od-modal.od-modal-outside .modal-header { padding-top: .6rem; padding-bottom: .6rem; }
#od-modal.od-modal-outside .modal-body { padding-top: .6rem; padding-bottom: .9rem; }
.od-outside #od-out-number { flex: 1 1 0; min-width: 0; width: auto; }
.od-outside .od-cc::-webkit-calendar-picker-indicator { display: none !important; }
.od-out-actions { grid-template-columns: 1fr; }

/* A call tab: no keypad, the call card takes its place */
.od-in-tab #od-keypad-col { display: none; }
.od-in-tab #od-call-col { flex: 0 0 auto; width: 100%; }
@media (min-width: 992px) { .od-in-tab #od-call-col { width: 75%; } }
.od-hangup-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 50%; }
.od-hangup-btn[hidden] { display: none; }
.od-hangup-btn svg { width: 20px; height: 20px; fill: currentColor; }

.od-close-icon { width: 56px; height: 56px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: rgba(196, 49, 75, .12); color: #c4314b; }
.od-close-icon svg { width: 26px; height: 26px; fill: currentColor; }
.od-close-icon.is-ended { background: rgba(var(--org-primary-rgb, 59, 130, 246), .12); color: var(--org-primary); }
.od-close-icon.is-ended svg { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
/* The Details tab's sections (Caller, This call, Together) */
.od-dl-head { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--org-primary); font-weight: 700; padding-top: .75rem; margin-bottom: .35rem; border-bottom: 1px solid var(--org-line); }
.od-dl-head:first-child { padding-top: 0; }

/* Incoming calls: a popup each, top right (org-dialer.js renderRinging) */
.od-ring-stack {
  position: fixed; top: calc(var(--org-appbar-h) + 56px); right: 16px; z-index: 1090; display: flex; flex-direction: column; gap: 10px;
  width: min(460px, calc(100vw - 32px)); pointer-events: none;
}
.od-ring {
  pointer-events: auto; display: flex; align-items: center; gap: 16px; padding: 20px 22px; border-radius: 14px;
  background: var(--org-card); border: 1px solid var(--org-line);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .26), 0 2px 8px rgba(0, 0, 0, .14); animation: od-ring-in .25s ease-out;
}
.od-ring-avatar { width: 60px; height: 60px; flex: 0 0 auto; display: inline-grid; place-items: center; }
.od-ring-avatar svg { width: 32px; height: 32px; fill: currentColor; stroke: none; }
.od-ring-text { flex: 1 1 auto; min-width: 0; line-height: 1.35; }
.od-ring-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--org-primary); font-weight: 700; }
.od-ring-name { font-weight: 600; font-size: 1.25rem; }
.od-ring-sub { font-size: .9rem; color: var(--org-muted); }
.od-ring-via { color: var(--bs-body-color); font-weight: 600; }
.od-ring-actions { display: flex; gap: 12px; flex: 0 0 auto; }
.od-ring-btn { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; padding: 0; border: 0; border-radius: 50%; color: #fff; transition: transform .1s; overflow: hidden; }
.od-ring-btn:hover { transform: scale(1.08); }
/* (the phone glyph filled and centred; the decline one turned in place) */
.od-ring-btn svg { display: block; width: 26px; height: 26px; flex: 0 0 auto; fill: currentColor; stroke: none; overflow: visible; }
.od-ring-yes { background: #22a35a; }
.od-ring-no { background: #c4314b; }
@keyframes od-ring-in { from { opacity: 0; transform: translateX(40px); } }
@media (prefers-reduced-motion: reduce) { .od-ring, .od-ctab.is-ringing .od-ctab-dot { animation: none; } }

.wp-compact .wp-appbar { padding: 0 4px 0 12px; gap: 8px; }
.wp-compact .wp-appbar .reg-status { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.wp-compact main { padding-top: 16px !important; }
.wp-compact .dialer { background: var(--org-card); box-shadow: var(--org-shadow); border-radius: var(--org-radius); padding: 16px; }
.wp-compact #keypad + .call-actions { grid-template-columns: repeat(3, 1fr); }
.wp-compact .keypad .btn { height: 54px; font-weight: 600; }
.wp-compact .call-info { box-shadow: none; background: var(--org-nav); }
.wp-compact .modal-body .nav-tabs { margin-bottom: 1rem !important; }
.wp-compact .wp-kv dt { font-weight: 400; color: var(--org-muted); }
.wp-compact .wp-tools .btn { padding-left: 6px; padding-right: 6px; color: var(--org-primary); }
.wp-compact .wp-tools .ico-sm { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wp-compact a.btn-primary, .wp-compact a.btn-primary:hover { color: #fff; }
/* A ringing call shows in its popup, not as the call card (no jump in size) */
.wp-ringing #call-info { display: none !important; }
#wp-ring-avatar { font-weight: 400; }
.wp-add-btn { width: 32px; height: 32px; padding: 0; display: inline-grid; place-items: center; }
.wp-add-btn .ico-sm { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.wp-ring-btn { width: 64px; height: 64px; border-radius: 50% !important; display: inline-grid; place-items: center; }
.wp-compact a.dropdown-item { color: var(--bs-dropdown-link-color); }

/* ---- the admin panel (admin.html) in the same style */
.admin-nav { display: flex; flex-direction: column; padding: 8px 0; }
.admin-nav .nav-link { position: relative; color: var(--org-text); padding: 8px 16px; border-radius: 0; font-size: .9rem; }
/* (white / dark text, not link-coloured: beats .org-body a:not(.btn) above) */
.org-body .admin-nav a.nav-link { color: var(--org-text); }
.admin-nav .nav-link:hover { background: var(--org-nav-hover); color: var(--org-text); }
.admin-nav .nav-link.active { background: var(--org-card); font-weight: 600; color: var(--org-text); }
.admin-nav .nav-link.active::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 2px; background: var(--org-primary); }
.admin-nav .org-nav-label[hidden] { display: none; }
.admin-nav .nav-link .ico { width: 18px; height: 18px; color: var(--org-muted); }
.admin-nav .nav-link.active .ico { color: var(--org-primary); }
.admin-main { padding-top: 18px; }
.tk-search { width: min(220px, 100%); }
.org-body .org-appbar a.org-appbar-btn { color: #fff; }
.admin-main .panel > div:first-child h2 { font-size: 1.25rem; font-weight: 600; }
.admin-fluent .org-mark .ico { width: 18px; height: 18px; color: #fff; }
.admin-fluent .table { --bs-table-bg: transparent; }
.admin-fluent .table > thead th { font-size: .8rem; font-weight: 600; color: var(--org-muted); }
.admin-fluent .card-body.card, .admin-fluent .card.card-body { padding: 16px 20px; }
:is(.wp-fluent, .admin-fluent) .nav-pills .nav-link { border-radius: var(--org-radius); }
:is(.wp-fluent, .admin-fluent) .nav-pills .nav-link.active { background: var(--org-primary); }
/* The light / dark switch in the app bar */
.org-appbar-btn[data-theme-toggle] { padding: 0 12px; }
.org-appbar-btn.org-feedback-btn { padding: 0 10px; }
.org-appbar-btn[data-theme-toggle] svg, .org-appbar-btn.org-feedback-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 1200px) {
  .org-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .org-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
  .org-shell { grid-template-columns: minmax(0, 1fr); grid-template-areas: "bar" "main"; }
  .org-sidebar { position: fixed; left: 0; top: var(--org-appbar-h); bottom: 0; height: auto; width: 260px; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--org-shadow); }
  .org-shell.nav-open .org-sidebar { transform: none; }
  .org-shell.nav-open .org-scrim { display: block; position: fixed; inset: var(--org-appbar-h) 0 0 0; background: rgba(0, 0, 0, .4); z-index: 1030; }
  .org-burger { display: inline-flex; align-items: center; }
  .org-appbar-sep, .org-appbar-product { display: none; }
  .org-main { padding: 0 16px 40px; }
  .org-topbar { margin: 0 -16px; padding: 10px 16px; }
  .org-title { font-size: 1.1rem; }
  .org-tools { width: 100%; }
  .org-search { flex: 1; width: auto; }
  .org-grid-2, .org-grid-3 { grid-template-columns: minmax(0, 1fr); }
  .org-table thead th, .org-table tbody td { padding: 10px 12px; }
}
@media (max-width: 575.98px) {
  .org-grid-4 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .org-card-pad { padding: 14px; }
  .org-stat-value { font-size: 1.4rem; }
  .org-auth-card { padding: 24px 18px; }
  .org-hours-row { grid-template-columns: 52px auto 1fr 1fr; gap: 6px; }
}
/* "Show as" caller ID picker: texts stay inside the menu */
#od-cid-menu { max-width: 100%; }
#od-cid-menu .od-cid-item { white-space: normal; overflow-wrap: anywhere; cursor: pointer; }
#od-cid-menu .od-out-icon { flex: 0 0 auto; display: inline-flex; color: var(--org-muted); }
#od-cid-menu .od-out-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#od-cid-menu .od-cid-item.active .od-out-icon { color: inherit; }
#od-cid-menu .od-cid-item.active .wp-line-star:not(.on) { color: rgba(255, 255, 255, .8); }
#od-cid-menu .status-dot { margin-right: .35rem; }
.od-ring-count { flex: none; font-size: .82em; font-weight: 400; opacity: .75; align-self: center; }
.status-dot.offline, .dot-offline-status { background: #8a8886; }
/* Live call transcript */
.od-transcript { border: 1px solid var(--bs-border-color); border-radius: 10px; padding: 10px 12px; }
.od-transcript-lines { max-height: 220px; overflow-y: auto; font-size: .9rem; display: flex; flex-direction: column; gap: 6px; }
.od-transcript-lines:empty::before { content: 'Listening…'; color: var(--bs-secondary-color); font-style: italic; }
.od-transcript-who { font-weight: 600; color: var(--bs-secondary-color); }
.od-transcript-line.me .od-transcript-who { color: var(--bs-primary); }
.od-transcript-dot { width: 8px; height: 8px; border-radius: 50%; background: #d13438; animation: od-lamp 1.2s steps(2, start) infinite; }
.od-transcript-dot.off { background: #8a8886; animation: none; }

/* ---- Apps page (org.js renderApps): steps, and the app's windows drawn */
.app-tile { border-radius: 12px; }
.app-step { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 20px 28px; align-items: center; padding: 18px 0; border-top: 1px solid var(--bs-border-color); }
.app-step-text { display: flex; gap: 14px; align-items: flex-start; }
.app-step-n { flex: 0 0 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 600; background: var(--org-primary); }
.app-step-pic { display: flex; justify-content: center; }
.app-step-pic .install-help-shot, .app-install .install-help-shot { width: 100%; max-width: 380px; height: auto; margin: 0; border-radius: 8px; border: 1px solid var(--bs-border-color); }
.app-step-pic .install-help-shot.shot-narrow { max-width: 240px; }
.app-install summary { cursor: pointer; font-size: .875rem; color: var(--org-primary); }
.app-install .install-help-shot { margin-bottom: 4px; }
@media (max-width: 991.98px) { .app-step { grid-template-columns: minmax(0, 1fr); } }

.shot { --shot-bg: #fff; --shot-fg: #201f1e; --shot-muted: #605e5c; --shot-line: #d6d4d2; background: var(--shot-bg); color: var(--shot-fg); border: 1px solid var(--shot-line); box-shadow: 0 8px 28px rgba(0,0,0,.16); font-size: 12px; user-select: none; pointer-events: none; overflow: hidden; }
[data-bs-theme="dark"] .shot { --shot-bg: #252423; --shot-fg: #f3f2f1; --shot-muted: #b3b0ad; --shot-line: #484644; }
.shot-win { width: 100%; max-width: 380px; border-radius: 8px; }
.shot-win.shot-wide { max-width: 420px; }
.shot-bar { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--shot-line); font-size: 11.5px; }
.shot-bar img { width: 16px; height: 16px; }
.shot-bar span:first-of-type { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shot-ctl { color: var(--shot-muted); letter-spacing: 2px; }
.shot-body { position: relative; }
.shot-card { max-width: 250px; margin: 0 auto; padding: 22px 0 24px; display: flex; flex-direction: column; gap: 9px; }
.shot-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; }
.shot-mark { display: inline-grid; place-items: center; color: #2563eb; }
.shot-mark svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
[data-bs-theme="dark"] .shot-mark { color: #6ea8fe; }
.shot-logo { width: 22px; height: 22px; border-radius: 6px; object-fit: contain; flex: 0 0 auto; }
.shot-initials { display: grid; place-items: center; color: #fff; font-size: 10px; font-weight: 700; background: var(--org-primary); }
.shot-h { font-size: 15px; font-weight: 600; margin: 4px 0 2px; }
.shot-field { border: 1px solid var(--shot-line); border-radius: 6px; padding: 4px 8px; display: flex; flex-direction: column; line-height: 1.3; }
.shot-field small { color: var(--shot-muted); font-size: 10px; }
.shot-field span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shot-btn { border-radius: 6px; padding: 7px; text-align: center; color: #fff; font-weight: 600; background: var(--org-primary); }
.shot-btn-net { background: #2563eb; }
.shot-btn-line { background: transparent; color: var(--shot-fg); border: 1px solid var(--shot-line); }
.shot-hl { outline: 2px solid var(--org-primary); outline-offset: 2px; border-radius: 5px; animation: shot-pulse 1.8s ease-in-out infinite; }
@keyframes shot-pulse { 50% { outline-color: rgba(var(--org-primary-rgb), .25); } }
@media (prefers-reduced-motion: reduce) { .shot-hl { animation: none; } }
.shot-appbar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; color: #fff; font-weight: 600; background: var(--org-sidebar); }
.shot-online { font-weight: 500; font-size: 11px; color: #7ee787; }
.shot-phone-ui { max-width: 220px; margin: 0 auto; padding: 14px 0 18px; display: flex; flex-direction: column; gap: 10px; }
.shot-status { display: flex; align-items: center; gap: 6px; color: var(--shot-muted); }
.shot-display { height: 30px; border: 1px solid var(--shot-line); border-radius: 6px; }
.shot-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.shot-keys span { border: 1px solid var(--shot-line); border-radius: 50%; aspect-ratio: 1; max-width: 40px; margin: 0 auto; width: 100%; display: grid; place-items: center; font-size: 13px; }
.shot-call { border-radius: 20px; padding: 7px; text-align: center; color: #fff; font-weight: 600; background: #107c10; }
.shot-mini { display: inline-flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 8px; background: #252423; color: #f3f2f1; border: 1px solid #484644; box-shadow: 0 6px 20px rgba(0,0,0,.25); font-size: 12px; }
.shot-mini small { color: #b3b0ad; }
.shot-tray { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; justify-content: center; pointer-events: none; user-select: none; font-size: 12px; }
.shot-menu { display: flex; flex-direction: column; min-width: 210px; padding: 4px 0; background: #fff; color: #201f1e; border: 1px solid #d6d4d2; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.shot-menu > * { padding: 4px 24px; }
.shot-menu hr { margin: 3px 0; padding: 0; opacity: .2; }
.shot-menu .shot-hl { background: #e5f1fb; outline-offset: -2px; border-radius: 0; }
.shot-input { width: 230px; padding: 12px; background: #fff; color: #201f1e; border: 1px solid #d6d4d2; box-shadow: 0 6px 20px rgba(0,0,0,.18); display: flex; flex-direction: column; gap: 8px; }
.shot-input small { color: #605e5c; }
.shot-input > span { border: 1px solid #8a8886; padding: 3px 6px; font-family: var(--bs-font-monospace); border-radius: 0; }
.shot-input-btns { display: flex; justify-content: flex-end; gap: 6px; }
.shot-input-btns span { border: 1px solid #adadad; background: #e1e1e1; padding: 2px 14px; }
.shot-phone { width: 230px; border-radius: 26px; border-width: 6px; border-color: #1b1a19; padding-top: 18px; position: relative; }
.shot-notch { position: absolute; top: 5px; left: 50%; width: 54px; height: 8px; margin-left: -27px; border-radius: 8px; background: #1b1a19; }
.shot-phone .shot-card { padding: 16px 14px 22px; }
.shot-phone .shot-phone-ui { padding: 12px 14px 16px; }
.shot-perm { position: absolute; left: 10px; right: 10px; bottom: 14px; padding: 12px; border-radius: 16px; background: var(--shot-bg); box-shadow: 0 6px 24px rgba(0,0,0,.35); display: flex; flex-direction: column; gap: 6px; text-align: center; }
.shot-perm span { color: var(--org-primary); font-weight: 600; padding: 3px; border-radius: 12px; background: rgba(var(--org-primary-rgb), .1); }
.shot-perm span:first-of-type { outline: 2px solid var(--org-primary); }
/* ---- Calls / My calls: call ID (copy), notes icon and popup, search */
.org-calls-search { width: min(320px, 100%); }
.org-callid { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--bs-border-color); background: transparent; color: var(--org-muted); border-radius: 6px; padding: 1px 7px; font-family: var(--bs-font-monospace); font-size: .78rem; cursor: copy; }
.org-callid svg { width: 12px; height: 12px; opacity: .7; }
.org-callid:hover { color: var(--org-primary); border-color: var(--org-primary); }
/* Notes / transcript of a call: plain outlined icons like the gear buttons (no fill) */
.org-notes-btn { display: inline-flex; align-items: center; gap: 3px; border: 0; background: none; color: var(--org-muted); border-radius: var(--org-radius); padding: 4px 5px; font-size: .8rem; font-weight: 600; vertical-align: middle; }
.org-notes-btn .ico { width: 18px; height: 18px; }
.org-notes-btn:hover { color: var(--org-primary); background: rgba(var(--org-primary-rgb), .08); }
.org-notes-btn + .org-notes-btn { margin-left: 6px; }
.org-note-list { display: flex; flex-direction: column; gap: 10px; }
.org-note-item { border: 1px solid var(--bs-border-color); border-radius: 8px; padding: 10px 12px; }
.org-note-text { white-space: pre-wrap; overflow-wrap: anywhere; }
/* ---- enterprise web phone: the keypad during a call (org-dialer.js bindDtmfPad) */
/* (the same display and keys as the Home keypad, a little smaller) */
.od-dtmf-menu { width: 272px; padding: 12px; }
.od-dtmf-display { min-height: calc(1.5em + 1rem + 2px); letter-spacing: 2px; overflow: hidden; white-space: nowrap; }
.od-dtmf-menu .keypad { margin: .625rem 0; }
.od-dtmf-menu .keypad .btn { height: 52px; font-size: 1.25rem; }
/* (the keys during a call: just their border and text, no fill) */
.od-dtmf-menu .keypad .btn, .od-dtmf-menu .keypad .btn:hover, .od-dtmf-menu .keypad .btn:focus, .od-dtmf-menu .keypad .btn:active { background: transparent !important; background-image: none !important; box-shadow: none !important; }
.od-dtmf-menu .keypad .btn:hover { border-color: var(--org-primary, #2563eb); }
.od-dtmf-menu .keypad .btn.pressed, .od-dtmf-menu .keypad .btn.pressed:active { background: rgba(var(--org-primary-rgb, 37, 99, 235), .2) !important; }
/* A key pressed (click or keyboard): Home keypad and the call's keypad */
.keypad .btn.pressed { background: rgba(var(--org-primary-rgb, 37, 99, 235), .2) !important; border-color: var(--org-primary, #2563eb) !important; }
.od-hist-transcript { white-space: pre-wrap; max-height: 260px; overflow-y: auto; font-size: .85rem; }
/* ---- CorePBX's own message window (js/app-dialog.js), the same as the
   Windows app's (windows/src/AppDialog.cs): colours and sizes from there */
.app-dialog-back { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, 0); transition: background .12s; }
.app-dialog-back.in { background: rgba(0, 0, 0, .28); }
.app-dialog { --ad-back: #fff; --ad-text: #201f1e; --ad-muted: #605e5c; --ad-line: #d6d4d2; --ad-btn-line: #c8c6c4; --ad-hover: #f3f2f1; --ad-down: #e8e6e4; --ad-input: #fff; --ad-tint: .125;
  width: 420px; max-width: 100%; display: flex; gap: 16px; padding: 24px; background: var(--ad-back); color: var(--ad-text); border: 1px solid var(--ad-line); border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .28), 0 2px 8px rgba(0, 0, 0, .16); font-family: "Segoe UI", system-ui, -apple-system, sans-serif; font-size: 13px; line-height: 1.4;
  opacity: 0; transform: scale(.97); transition: opacity .12s, transform .12s; user-select: none; cursor: default; }
.app-dialog-back.in .app-dialog { opacity: 1; transform: none; }
[data-bs-theme="dark"] .app-dialog { --ad-back: #252423; --ad-text: #f3f2f1; --ad-muted: #b3b0ad; --ad-line: #484644; --ad-btn-line: #484644; --ad-hover: #323130; --ad-down: #3b3a39; --ad-input: #1b1a19; --ad-tint: .235; }
.app-dialog-icon { --ad-c: 37, 99, 235; flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(var(--ad-c), var(--ad-tint)); color: rgb(var(--ad-c)); font: 700 20px/1 "Segoe UI", system-ui, sans-serif; }
.app-dialog-error .app-dialog-icon { --ad-c: 196, 49, 75; font-size: 17px; }
.app-dialog-warning .app-dialog-icon { --ad-c: 234, 160, 0; }
.app-dialog-main { flex: 1 1 auto; min-width: 0; }
.app-dialog-title { font-family: "Segoe UI Semibold", "Segoe UI", system-ui, sans-serif; font-weight: 600; font-size: 15.3px; line-height: 1.35; overflow-wrap: anywhere; }
.app-dialog-text { margin-top: 6px; color: var(--ad-muted); white-space: pre-line; overflow-wrap: anywhere; max-height: 360px; overflow: auto; user-select: text; }
.app-dialog-input { display: block; width: 100%; height: 28px; margin-top: 16px; padding: 2px 6px; border: 1px solid var(--ad-btn-line); border-radius: 0; background: var(--ad-input); color: var(--ad-text); font: 14px "Segoe UI", system-ui, sans-serif; outline: none; user-select: text; }
.app-dialog-input:focus { border-color: #2563eb; }
.app-dialog-buttons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; margin-left: -56px; }
.app-dialog-btn { min-width: 88px; height: 34px; padding: 0 16px; border: 1px solid var(--ad-btn-line); border-radius: 0; background: var(--ad-back); color: var(--ad-text);
  font: 600 13px "Segoe UI Semibold", "Segoe UI", system-ui, sans-serif; cursor: pointer; }
.app-dialog-btn:hover { background: var(--ad-hover); }
.app-dialog-btn:active { background: var(--ad-down); }
.app-dialog-btn.main { border-color: transparent; background: #2563eb; color: #fff; }
.app-dialog-btn.main:hover { background: #2259d6; }
.app-dialog-btn.main:active { background: #1f51c1; }
.app-dialog-btn.main.danger { background: #c4314b; }
.app-dialog-btn.main.danger:hover { background: #b42d45; }
.app-dialog-btn.main.danger:active { background: #a3293e; }
.app-dialog-btn:focus-visible { outline: 2px solid var(--ad-text); outline-offset: 1px; }
