/*
 * Deliberately plain. The brief asks for useful function over visual polish, so this is a small
 * hand-written sheet with no framework and no build step: readable, and trivial to replace when a
 * real design lands.
 */

/*
 * Colours are tokens, in two sets. Light is the default; dark applies when the person chose it
 * (data-theme="dark" on <html>, from Preferences) or left the choice to a device set to dark.
 */
:root {
    color-scheme: light;
    --bg: #f6f7f9;
    --panel: #ffffff;
    --ink: #1d2430;
    --muted: #667085;
    --line: #dfe3e8;
    --accent: #1f5fa8;
    --on-accent: #ffffff;
    --accent-soft: #eef4fb;
    --field: #ffffff;
    --hover: #fafbfc;
    --surface-2: #f1f3f6;
    --code-bg: #fbfbfc;
    --shadow: rgba(0, 0, 0, .12);
    --ok: #1f7a3f;
    --ok-soft: #e6f4ea;
    --ok-line: #b7dfc3;
    --warn: #9a6700;
    --warn-soft: #fdf3e0;
    --bad: #a32424;
    --bad-soft: #fdecec;
    --bad-line: #f0bcbc;
    --busy: #7a3fa8;
    --busy-soft: #f2e9fb;
    --neutral-soft: #eef0f3;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --bg: #0f141b;
        --panel: #171d26;
        --ink: #e3e8ef;
        --muted: #93a0b2;
        --line: #2b3442;
        --accent: #6aa6ea;
        --on-accent: #0b1220;
        --accent-soft: #1b2b40;
        --field: #10151d;
        --hover: #1c2330;
        --surface-2: #222a36;
        --code-bg: #121821;
        --shadow: rgba(0, 0, 0, .5);
        --ok: #5cc68a;
        --ok-soft: #15301f;
        --ok-line: #24563a;
        --warn: #e0b252;
        --warn-soft: #33280f;
        --bad: #f07b7b;
        --bad-soft: #3a1a1a;
        --bad-line: #6a2a2a;
        --busy: #c49bf0;
        --busy-soft: #2a1d3a;
        --neutral-soft: #232a35;
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0f141b;
    --panel: #171d26;
    --ink: #e3e8ef;
    --muted: #93a0b2;
    --line: #2b3442;
    --accent: #6aa6ea;
    --on-accent: #0b1220;
    --accent-soft: #1b2b40;
    --field: #10151d;
    --hover: #1c2330;
    --surface-2: #222a36;
    --code-bg: #121821;
    --shadow: rgba(0, 0, 0, .5);
    --ok: #5cc68a;
    --ok-soft: #15301f;
    --ok-line: #24563a;
    --warn: #e0b252;
    --warn-soft: #33280f;
    --bad: #f07b7b;
    --bad-soft: #3a1a1a;
    --bad-line: #6a2a2a;
    --busy: #c49bf0;
    --busy-soft: #2a1d3a;
    --neutral-soft: #232a35;
}

* { box-sizing: border-box; }

/* Links default to the accent; any rule of its own wins (zero specificity). */
:where(a, a:visited) { color: var(--accent); }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--bg);
}

.masthead {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 10px 20px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
}

.brand { font-weight: 700; font-size: 17px; color: var(--ink); text-decoration: none; }

/* Line icons (see Icons.cs): the size of the text beside them, in its color. */
.icon { width: 16px; height: 16px; flex: none; vertical-align: -3px; }

/* The header's menus: the section switcher, and the person's own menu. */
.menu { position: relative; }
.menu > summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    cursor: pointer;
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
}
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary::after { content: "\25BE"; margin-left: 6px; color: var(--muted); font-size: 11px; }
.menu[open] > summary { background: var(--accent-soft); border-color: var(--accent); }
.menu-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 60;
    min-width: 200px;
    padding: 4px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 8px 24px var(--shadow);
    display: grid;
}
.menu-panel.menu-right { left: auto; right: 0; }
.menu .menu-panel a, .menu .menu-panel button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 7px 10px;
    border: 0;
    border-radius: 6px;
    background: none;
    color: var(--ink);
    font: inherit;
    font-weight: normal;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}
.menu .menu-panel a:hover, .menu .menu-panel button:hover { background: var(--hover); color: var(--accent); }
.menu .menu-panel a.current { color: var(--accent); font-weight: 600; }
.menu-panel form { margin: 4px 0 0; border-top: 1px solid var(--line); padding-top: 4px; }

/* The profile menu's Appearance: its label, and Device, Light and Dark as three boxes beside it. */
.menu-panel form.appearance { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0; border-top: 0; padding: 4px 4px 4px 10px; }
.appearance-label { display: inline-flex; align-items: center; gap: 8px; }
.appearance-choices { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; }
.menu .menu-panel .appearance-choices button { width: auto; padding: 4px 6px; border-radius: 4px; color: var(--muted); }
.menu .menu-panel .appearance-choices button.chosen { background: var(--accent-soft); color: var(--accent); }
.section-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--muted); }

/* Logged in to take calls (the Agent page): other sections and switching account wait until Log Out. */
body.agent-logged-in .section-menu .menu-panel a:not(.current),
body.agent-logged-in .crumbs a { opacity: .45; cursor: not-allowed; }

/* While impersonating: a bar across the top of every page, with Stop. */
.impersonation-bar { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 6px 16px; background: #b45309; color: #ffffff; font-size: 13px; }
.impersonation-bar form { margin: 0; }
.impersonation-bar button { padding: 3px 12px; background: #ffffff; color: #b45309; border-color: #ffffff; }

/* The section menu, at the top of the sidebar: it opens over the sidebar's links, the sidebar's width. */
.sidebar-section { padding: 4px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.sidebar-section .section-name { padding: 4px 6px; }
.sidebar .section-menu > summary { display: flex; width: 100%; box-sizing: border-box; }
.sidebar .section-menu > summary::after { margin-left: auto; }
.sidebar .section-menu .menu-panel { left: 0; right: 0; min-width: 0; }
.sidebar .section-menu .menu-panel a { border-left: 0; }
.profile-menu > summary { border-color: transparent; color: var(--muted); font-weight: normal; }

/* Lists of radio choices (Preferences). */
.choice-list { display: grid; gap: 8px; margin-bottom: 8px; }
.choice-list label { display: flex; gap: 8px; align-items: baseline; cursor: pointer; }
.choice-list.inline-choices { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 12px; }
input:disabled { opacity: .5; cursor: not-allowed; }

.identity { display: flex; align-items: center; gap: 12px; color: var(--muted); margin-left: auto; flex-wrap: wrap; }

/* The page beside the menu down the left. */
.shell { display: flex; align-items: flex-start; min-height: calc(100vh - 47px); }
.main { flex: 1; min-width: 0; }

.sidebar {
    flex: none;
    width: 200px;
    position: sticky;
    top: 0;
    max-height: 100vh;
    overflow-y: auto;
    padding: 8px 0 24px;
    background: var(--panel);
    border-right: 1px solid var(--line);
    align-self: stretch;
}
.sidebar h4 {
    margin: 14px 16px 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}
.sidebar a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 16px 5px 13px;
    border-left: 3px solid transparent;
    color: var(--ink);
    text-decoration: none;
}
.sidebar a .icon { color: var(--muted); }
.sidebar a:hover .icon, .sidebar a.current .icon { color: currentColor; }
.sidebar a:hover { background: var(--bg); color: var(--accent); }
.sidebar a.current { border-left-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.nav-toggle {
    display: none;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--ink);
    font-size: 18px;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
}

/* Narrow screens: the menu slides over the page from the toggle. */
@media (max-width: 860px) {
    .masthead { flex-wrap: wrap; gap: 8px 16px; }
    .nav-toggle { display: inline-block; }
    .sidebar {
        position: fixed;
        top: 47px;
        left: 0;
        bottom: 0;
        max-height: none;
        z-index: 50;
        transform: translateX(-100%);
        transition: transform 0.15s ease-out;
        box-shadow: 2px 0 8px var(--shadow);
    }
    .sidebar.open { transform: none; z-index: 80; box-shadow: 2px 0 8px var(--shadow), 0 0 0 100vmax rgba(0, 0, 0, 0.35); }
}

.content { max-width: 1280px; margin: 0 auto; padding: 20px 20px 32px; }

h1 { font-size: 22px; margin: 0 0 4px; }
h1 .icon { width: 22px; height: 22px; vertical-align: -3px; color: var(--accent); }
h2 { font-size: 17px; margin: 24px 0 8px; }
h3 { font-size: 14px; margin: 16px 0 6px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
p.lead { color: var(--muted); margin: 0 0 16px; }

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 16px;
}

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 14px; }
.tile .value { font-size: 30px; font-weight: 600; line-height: 1.1; }
.tile .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.tile .value.bad { color: var(--bad); }
/* Disables a form's controls without changing its layout (Billing & Usage, for those who may only look). */
fieldset.plain { display: contents; }

/* Billing & Usage: cost by day, as bars. */
.usage-chart { display: flex; align-items: flex-end; gap: 2px; height: 140px; margin-top: 12px; border-bottom: 1px solid var(--line); }
.usage-bar { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.usage-bar span { display: block; width: 100%; background: var(--accent); border-radius: 2px 2px 0 0; }
.usage-bar:hover span { opacity: .75; }
.usage-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-top: 4px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
tbody tr:hover { background: var(--hover); }
td.numeric, th.numeric { text-align: right; font-variant-numeric: tabular-nums; }

.badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid transparent;
}
.badge-available { background: var(--ok-soft); color: var(--ok); }
.badge-notready  { background: var(--warn-soft); color: var(--warn); }
.badge-busy      { background: var(--busy-soft); color: var(--busy); }
.badge-offline   { background: var(--neutral-soft); color: var(--muted); }
.badge-bad       { background: var(--bad-soft); color: var(--bad); }

form.stacked { display: grid; gap: 12px; max-width: 640px; }
.field { display: grid; gap: 4px; }
.field label { font-weight: 600; font-size: 13px; }
.field .hint { color: var(--muted); font-size: 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.row .field { flex: 1 1 180px; }

input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], input[type=tel], input[type=url], select, textarea {
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 4px;
    font: inherit;
    color: var(--ink);
    background: var(--field);
    width: 100%;
}
input[type=checkbox] { width: auto; }

button, .button {
    padding: 7px 14px;
    border-radius: 4px;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: var(--on-accent);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
button.secondary, .button.secondary { background: var(--panel); color: var(--accent); }
button.danger, .button.danger { background: var(--panel); border-color: var(--bad); color: var(--bad); }
button:disabled { opacity: .45; cursor: not-allowed; }

.link-button { background: none; border: none; color: var(--accent); padding: 0; font: inherit; cursor: pointer; }

.banner { padding: 10px 14px; border-radius: 4px; margin-bottom: 16px; border: 1px solid transparent; }
.banner-success { background: var(--ok-soft); border-color: var(--ok-line); color: var(--ok); }
.banner-error { background: var(--bad-soft); border-color: var(--bad-line); color: var(--bad); }
.banner-warning { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }

.validation { color: var(--bad); font-size: 13px; }

.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
pre.explanation {
    background: var(--code-bg);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 12px;
    overflow-x: auto;
    white-space: pre;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 12px;
}

/* The agent's control bar: the width of the page, under the header, on the Agent page. */
.agent-bar {
    position: relative;
    z-index: 50;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 8px 20px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
}
.bar-group { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.bar-end { margin-left: auto; }
.agent-bar button, .agent-bar .button { display: inline-flex; align-items: center; gap: 6px; }
.agent-bar select { width: auto; }
.bar-state { display: inline-flex; align-items: baseline; gap: 6px; padding: 0 6px; font-variant-numeric: tabular-nums; }
.bar-state strong { font-size: 15px; }
.bar-state .state-Available { color: var(--ok); }
.bar-state .state-NotReady { color: var(--warn); }
.bar-state .state-AfterCallWork, .bar-state .state-OnInteraction, .bar-state .state-Ringing, .bar-state .state-Reserved { color: var(--busy); }
.bar-menu > summary.button { padding: 7px 14px; border-radius: 4px; border-color: var(--accent); color: var(--accent); background: var(--panel); font-weight: 600; }
.bar-menu.disabled > summary { opacity: .45; cursor: not-allowed; }
.bar-audio > summary.button { padding: 7px 10px; }
.bar-audio > summary::after { display: none; }
.bar-audio .menu-panel { min-width: 220px; padding: 12px; gap: 8px; }
.bar-audio input[type=range] { padding: 0; }
.bar-muted > summary.button { border-color: var(--bad); color: var(--bad); }
.bar-drawer {
    position: absolute;
    top: calc(100% + 4px);
    right: 20px;
    width: min(480px, calc(100vw - 32px));
    margin: 0;
    box-shadow: 0 8px 24px var(--shadow);
}
.bar-drawer-head { display: flex; align-items: center; justify-content: space-between; }
.bar-drawer-head h2 { margin: 0; }
#drawer-close { font-size: 22px; line-height: 1; }
.bar-drawer label { display: block; }
.bar-drawer .hint { display: block; margin-top: 6px; }
.sidebar a .badge { margin-left: auto; }

/* The Agent page's Messages and Click-to-Dial: the pages themselves, inside it. */
.agent-frame { display: block; width: 100%; height: calc(100vh - 150px); min-height: 420px; border: 0; }
body.embedded .content { padding-top: 12px; }

/* Agent workspace */
.workspace { display: grid; grid-template-columns: minmax(280px, 340px) 1fr; gap: 16px; align-items: start; }
@media (max-width: 860px) { .workspace { grid-template-columns: 1fr; } }

.state-display { font-size: 26px; font-weight: 700; }
.state-timer { font-variant-numeric: tabular-nums; color: var(--muted); }

.offer {
    border: 2px solid var(--accent);
    background: var(--accent-soft);
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 16px;
}
.offer h2 { margin-top: 0; }
.offer .actions { display: flex; gap: 10px; margin-top: 12px; }

.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hidden { display: none !important; }

/* Organizations: the current one in the header, and the picker. */
.identity a { color: var(--muted); }


/* A page title with its main action beside it, at the right. */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.contact-center-choice { display: flex; align-items: center; gap: 12px; margin: 10px 0; }
.contact-center-choice button { min-width: 200px; text-align: left; }

/* Small forms inside table cells on the platform pages. */
form.inline { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; }
.inline-check { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; font-weight: normal; }

/* Browser phone status in the agent workspace. */
.phone-status { font-weight: 600; color: var(--muted); }
.phone-ok { color: var(--ok); }
.phone-warn { color: var(--warn); }
.phone-error { color: var(--bad); }

/* Wallboard: big numbers, readable across a room. */
.wallboard { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.wallboard-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.wallboard-stat { min-width: 90px; }
.wallboard-value { font-size: 2.2rem; font-weight: 700; line-height: 1.1; }
.wallboard-label { color: var(--muted); font-size: 0.85rem; }
.wallboard-warn .wallboard-value { color: var(--warn); }
.wallboard-bad .wallboard-value { color: var(--bad); }

/* The sign-in page: the panel over a full-window picture of calls in motion. */
body.sign-in { background: #071526 url("/img/sign-in-background.svg") center / cover no-repeat fixed; min-height: 100vh; }
body.sign-in .masthead { background: transparent; border-bottom-color: transparent; }
body.sign-in .brand { display: none; }
.organization-actions { white-space: nowrap; }
.organization-actions form { display: inline-block; margin: 0 0 0 6px; }
.organization-actions button.danger { background: var(--bad); color: #ffffff; }
/* Go: the button to take (Select), green. Quiet danger: red words only, for a rare and confirmed action (Deactivate). */
button.go, .button.go { background: var(--ok); border-color: var(--ok); color: var(--panel); }
button.go:hover, .button.go:hover { filter: brightness(1.08); color: var(--panel); }
button.quiet-danger, .organization-actions button.quiet-danger { background: var(--panel); border-color: var(--line); color: var(--bad); }
button.quiet-danger:hover { border-color: var(--bad); }
body.sign-in .panel { box-shadow: 0 20px 60px rgba(0, 0, 0, .45); border-color: transparent; }
body.sign-in .identity, body.sign-in .identity .menu > summary { color: #ffffff; }
/* Open, a menu's button turns pale: its text the background's deep blue, and the menu itself in the page's own colors. */
body.sign-in .identity .menu[open] > summary { background: #ffffff; border-color: #ffffff; color: #071526; }
body.sign-in .identity .menu-panel { color: var(--ink); }

/* The organizations list, in one tile over the same picture as signing in. */
.organizations-tile { max-width: 760px; margin: 32px auto; }
.organizations-tile.organization-workspace { max-width: 1000px; }
.organization-workspace td select { width: auto; }
/* Each row's name and roles level with its buttons. */
.organizations-tile td { vertical-align: middle; }

/*
 * On a phone, tables turn each row into a small card (sonnus.js marks them "stack" and labels their cells
 * from the column headings): the first cell (stack-title) the card's heading, every other cell its
 * heading (data-label) on the left and the value on the right, and a row's buttons along its foot.
 */
@media (max-width: 640px) {
    table.stack, table.stack tbody, table.stack tr, table.stack td, table.stack th { display: block; width: auto; }
    table.stack thead { display: none; }
    table.stack tr { border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; margin-bottom: 8px; background: var(--panel); }
    table.stack td, table.stack th { border: 0; padding: 4px 0; text-align: left; white-space: normal; }
    table.stack td:empty, table.stack th:empty { display: none; }
    table.stack .stack-title { font-weight: 600; padding-bottom: 6px; }
    /* The column's heading at the left, the value at the right; a long heading wraps and the row grows with it. */
    table.stack td[data-label], table.stack th[data-label] { display: flow-root; text-align: right; min-height: 1.6em; }
    table.stack td[data-label]::before, table.stack th[data-label]::before {
        content: attr(data-label);
        float: left;
        width: 40%;
        padding-right: 8px;
        padding-top: 1px;
        text-align: left;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
        font-size: 12px;
        font-weight: normal;
        color: var(--muted);
        text-transform: none;
        letter-spacing: normal;
    }
    /* A cell holding a form: its heading above, the controls across the card and wrapping. */
    table.stack td.stack-wide { padding-left: 0; text-align: left; }
    table.stack td.stack-wide::before { float: none; display: block; width: auto; padding-right: 0; margin-bottom: 4px; }
    table.stack td.stack-wide .row { flex-wrap: wrap; }
    table.stack td.stack-wide select { flex: 1 1 100%; width: 100%; }
    table.stack td.stack-wide input[type=number] { flex: 1 1 8em; width: auto !important; }
    table.stack .stack-skip { display: none; }
    table.stack tr.total th, table.stack tr.total td { background: transparent; border: 0; }
    table.stack tbody th { text-transform: none; letter-spacing: normal; font-size: inherit; color: var(--ink); font-weight: 600; }
    /* A row's buttons: on a line of their own, wrapping, at the card's foot. */
    table.stack td.stack-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-start; align-items: center; padding-top: 8px; text-align: left; }
    table.stack td.stack-actions:not(:has(*:not(form.hidden, input[type=hidden]))) { display: none; }
    table.stack td.stack-actions form { margin: 0; }
    /* A message across the whole table ("Nothing yet."): just the message. */
    table.stack td[colspan] { padding-left: 0; text-align: left; }
    table.stack td[colspan]::before { content: none; }
    table.stack tr:has(> td[colspan]:only-child) { border-style: dashed; }
    /* A clickable row stays clickable; its hover is the card's. */
    table.stack tr.open-row:hover td { background: transparent; }
}
.usage-picker .menu-panel { padding: 8px 10px; gap: 6px; max-height: 320px; overflow-y: auto; }
/* Its button the size of the selects beside it, and level with them. */
#usage-form { align-items: center; margin-bottom: 14px; }
.usage-picker > summary { padding: 7px 9px; border-radius: 4px; background: var(--field); font-weight: normal; line-height: inherit; }

/* Usage tables: the heading and the total stand apart from the rows between them. */
.usage-table thead th { background: var(--bg); }
.usage-table tr.total th, .usage-table tr.total td { background: var(--accent-soft); border-top: 2px solid var(--line); }

/* A period: the usual ones, or custom dates. */
.period-picker { display: inline-flex; gap: 6px; align-items: center; }
.period-picker select, .period-picker input { width: auto; }

/* A form with one field to a line, its button on a line of its own (a password change). */
.stacked-form { display: grid; gap: 10px; max-width: 360px; }

/* A page's own Save and Cancel, at its foot. */
.page-actions { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }

/* Rows that open something when clicked (the Accounts page). */
tr.open-row { cursor: pointer; }
tr.open-row:hover td { background: var(--hover); }
.open-account { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; text-decoration: none; }
.open-account:hover, .open-account:focus-visible { color: var(--accent); text-decoration: underline; }

/* Dialogs (a new call flow's name): a panel over the dimmed page. */
dialog.modal { border: 1px solid var(--line); border-radius: 8px; padding: 20px; width: min(420px, calc(100vw - 32px)); background: var(--panel); color: var(--ink); box-shadow: 0 20px 60px var(--shadow); }
dialog.modal::backdrop { background: rgba(0, 0, 0, .45); }
dialog.modal h2 { margin-top: 0; }
dialog.modal .actions { margin-top: 16px; justify-content: flex-end; }

/* The call flow editor: a column of step tiles, and the lines between them in the gutter to its right. */
.flow-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 16px 0 8px; }
.flow-canvas { position: relative; min-height: 40px; }
.flow-steps { position: relative; z-index: 1; width: min(560px, calc(100% - 280px)); margin: 0 auto; }
.flow-lines { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.flow-lines-svg { position: absolute; left: 0; top: 0; overflow: visible; }
.flow-step { margin: 0; padding: 10px 14px; }
.flow-step.collapsed { padding-bottom: 8px; }
.flow-step-head { display: flex; align-items: center; gap: 8px; min-height: 28px; }
.flow-step-number { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 4px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; }
.flow-step-name { font-size: 14px; }
.flow-step-kind { color: var(--muted); font-size: 13px; }
.flow-step-actions { margin-left: auto; display: inline-flex; gap: 10px; font-size: 13px; }
.flow-toggle { width: 18px; font-size: 13px; color: var(--muted); }
.flow-step-summary { margin: 4px 0 0 26px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
/* A step that ends the flow (a queue, voicemail, forwarding, hanging up): its header is tinted red. */
.flow-step.flow-end .flow-step-head { margin: -10px -14px 0; padding: 8px 14px; background: var(--bad-soft); border-radius: 6px 6px 0 0; }
.flow-step.flow-end:not(.collapsed) .flow-step-head { margin-bottom: 8px; }
.flow-step.flow-end .flow-step-number { background: var(--panel); color: var(--bad); }
.flow-step.target-highlight { outline: 2px solid var(--accent); outline-offset: 2px; }
.flow-step .route-highlight { background: var(--accent-soft); border-radius: 4px; box-shadow: 0 0 0 4px var(--accent-soft); }
/* Going on to the following step: a short arrow down between two tiles; none where a step never does. */
.flow-fall { height: 22px; position: relative; }
.flow-fall::before { content: ""; position: absolute; left: 28px; top: 2px; bottom: 6px; border-left: 2px solid var(--muted); }
.flow-fall::after { content: ""; position: absolute; left: 24px; bottom: 2px; border: 5px solid transparent; border-top-color: var(--muted); border-bottom: 0; }
.flow-fall.none::before, .flow-fall.none::after { display: none; }
.flow-edge { pointer-events: stroke; cursor: pointer; }
.flow-edge-hit { fill: none; stroke: transparent; stroke-width: 12; pointer-events: stroke; }
.flow-edge-line { fill: none; stroke: var(--muted); stroke-width: 1.5; opacity: .75; }
.flow-edge.back .flow-edge-line { stroke-dasharray: 5 3; }
.flow-edge:hover .flow-edge-line { opacity: 1; stroke-width: 2; }
.flow-edge.selected .flow-edge-line { stroke: var(--accent); stroke-width: 2.5; opacity: 1; }
.flow-edge-port { fill: var(--muted); }
.flow-edge.selected .flow-edge-port { fill: var(--accent); }
.flow-edge-label { font-size: 11px; fill: var(--muted); pointer-events: none; }
.flow-edge.selected .flow-edge-label { fill: var(--accent); font-weight: 600; }
.flow-arrowhead { fill: var(--muted); }
.flow-arrowhead-selected { fill: var(--accent); }

/* The call flow editor's canvas: boxes on a pannable, zoomable world; the selected step's fields beside it. */
.flow-view-toggle button { padding: 4px 12px; background: none; border: 0; color: var(--muted); font-weight: 600; }
.flow-view-toggle button.chosen { background: var(--accent-soft); color: var(--accent); }
.flow-board { position: relative; display: flex; height: calc(100vh - 220px); min-height: 480px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); overflow: hidden; }
.board-viewport { position: relative; flex: 1; overflow: hidden; cursor: grab; background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 20px 20px; }
.board-viewport.panning { cursor: grabbing; }
.board-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.board-lines { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
.board-node { position: absolute; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 2px 6px var(--shadow); cursor: move; user-select: none; font-size: 13px; }
.board-node.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft), 0 2px 6px var(--shadow); }
.board-node.unset { border-style: dashed; }
.board-node.target-highlight { outline: 2px solid var(--accent); outline-offset: 2px; }
.board-node-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px 2px; }
.board-node.flow-end .board-node-head { padding-bottom: 6px; background: var(--bad-soft); border-radius: 6px 6px 0 0; }
.board-node.flow-end .flow-step-number { background: var(--panel); color: var(--bad); }
.board-start { margin-left: auto; padding: 1px 6px; border-radius: 8px; background: var(--ok-soft); color: var(--ok); font-size: 11px; font-weight: 600; }
.board-node-kind { padding: 2px 10px; color: var(--muted); }
.board-node-summary { padding: 0 10px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-node-routes { border-top: 1px solid var(--line); padding: 4px 0; }
.board-route { display: flex; justify-content: space-between; gap: 8px; padding: 2px 10px; font-size: 12px; }
.board-route.implicit { color: var(--muted); }
.board-route.route-highlight { background: var(--accent-soft); color: var(--accent); }
.board-route-label { font-weight: 600; }
.board-route-target { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-panel { display: none; width: 380px; flex: none; margin: 0; border: 0; border-left: 1px solid var(--line); border-radius: 0; overflow-y: auto; }
.flow-board.panel-open .board-panel { display: block; }
.board-panel-head { margin: -14px -14px 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.board-panel-head.flow-end { background: var(--bad-soft); }
.board-panel-tools { display: flex; justify-content: flex-end; gap: 12px; margin-bottom: 8px; font-size: 13px; }
/* A step's header: its action (top left), then its name, both edited right there. */
.flow-step-head .flow-step-action { width: auto; max-width: 13em; padding: 3px 6px; font-size: 13px; }
.flow-step-head .flow-step-name-input { width: auto; min-width: 0; flex: 1 1 8em; max-width: 14em; padding: 3px 6px; font-size: 14px; font-weight: 600; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 4px; background: none; cursor: pointer; font-size: 14px; line-height: 1; }
.icon-button.flow-remove { color: var(--bad); font-weight: 700; }
.icon-button.flow-remove:hover { background: var(--bad-soft); }
.flow-edge.implicit .flow-edge-line { stroke-dasharray: 2 3; }

/* The flow editor: its variables down the left, staying in view; the steps beside them. */
.flow-workspace { display: flex; gap: 16px; align-items: flex-start; }
.flow-main { flex: 1; min-width: 0; }
.flow-variables { position: sticky; top: 12px; flex: none; width: 300px; margin: 0; max-height: calc(100vh - 24px); overflow-y: auto; }
.flow-variables-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.flow-variables-head h2 { margin: 0; font-size: 16px; }
.flow-variables-table { display: grid; grid-template-columns: minmax(0, 1fr) 7.5em auto auto; gap: 4px 6px; align-items: center; font-size: 13px; }
.flow-variables-table input:not([type=checkbox]), .flow-variables-table select { width: 100%; padding: 3px 5px; font-size: 13px; }
.flow-variable-save { text-align: center; }
.flow-variable-save input { width: auto; margin: 0; }
.flow-workspace .flow-steps { width: min(560px, calc(100% - 200px)); }
@media (max-width: 1100px) {
    .flow-workspace { flex-direction: column; align-items: stretch; }
    .flow-variables { position: static; width: auto; max-height: none; }
}

/* Skill rules: skill, required or preferred, proficiency, from when, remove. */
.skill-rules-table { display: grid; grid-template-columns: minmax(0, 1fr) 8em 6em 6em auto; gap: 4px 6px; align-items: center; margin: 4px 0 8px; font-size: 13px; }
.skill-rules-table select, .skill-rules-table input { width: 100%; padding: 3px 5px; font-size: 13px; }

/* A value from somewhere on the call: where from, then which. */
.value-source { display: flex; gap: 6px; width: 100%; }
.value-source .value-kind { flex: 0 0 11em; }
.value-source > :last-child { flex: 1; min-width: 0; }

/* An API endpoint's headers and parameters: name, value, remove. */
.pair-list { display: grid; gap: 6px; margin: 8px 0 10px; }
.pair-row { display: grid; grid-template-columns: minmax(8em, 14em) minmax(0, 1fr) auto; gap: 6px; align-items: center; }

/* A message a step says: recording or text to speech, then which. */
.message-input { display: flex; gap: 6px; }
.message-input .message-kind { flex: 0 0 11em; }
.message-input > :last-child { flex: 1; min-width: 0; }

/* A step's voice, set apart from its other fields. */
.flow-voice { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 12px; margin-bottom: 4px; }
.flow-voice > summary { cursor: pointer; width: max-content; }

/* A Custom JavaScript step's script. */
.flow-script { width: 100%; min-height: 10em; font-size: 13px; line-height: 1.45; tab-size: 4; white-space: pre; }

/* Radio buttons in a row, each with its label. */
.choice-group { display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 4px 0; }
.choice-group label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: normal; color: var(--ink); }
.choice-group input { width: auto; margin: 0; }

/* A message's keys and outcomes: when, the message first, the action, and where to continue. */
.flow-handlers { display: grid; grid-template-columns: max-content minmax(0, 1fr) minmax(0, 7em) minmax(0, 1fr); gap: 4px 6px; align-items: center; margin: 8px 0 4px; font-size: 13px; }
.flow-handlers select { width: 100%; padding: 3px 4px; font-size: 13px; }
.flow-handlers-head { color: var(--muted); font-size: 12px; font-weight: 600; }
.flow-handlers-key { font-weight: 600; cursor: help; }

/* Tabs over a panel: the chosen one joins it. */
.tabs { display: flex; gap: 4px; margin: 16px 0 -1px; position: relative; z-index: 1; }
.tabs button { padding: 8px 18px; border: 1px solid var(--line); border-bottom-color: transparent; border-radius: 6px 6px 0 0; background: none; color: var(--muted); font-weight: 600; cursor: pointer; }
.tabs button.chosen { background: var(--panel); color: var(--ink); border-bottom-color: var(--panel); }
.tab-panel { margin-top: 0; border-top-left-radius: 0; }

/* The Do Not Call List: filters, its buttons, the table and its pages. */
.dnc-filters { align-items: flex-end; }
.dnc-filters .dnc-clear { flex: 0 0 auto; }
.dnc-toolbar { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.dnc-table tr.expired td { color: var(--muted); }
.dnc-table .row-actions { white-space: nowrap; text-align: right; }
.dnc-table .row-actions button + button { margin-left: 12px; }
.link-button.danger-link { color: var(--bad); }
.dnc-expiry { display: flex; gap: 8px; }
.dnc-expiry select { flex: 0 0 9em; }
.pager { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pager .actions { align-items: center; }

/* A table's own action, right above it (Create Account). */
.table-actions { display: flex; justify-content: flex-end; margin: 8px 0; }
.usage-picker .menu-panel label { display: flex; gap: 8px; align-items: center; white-space: nowrap; }
body.sign-in .organizations-tile .menu > summary { color: var(--ink); }
/* Parts of a page in one tile (Your account, Preferences): divided by a line, not boxed again. */
body.sign-in .organizations-tile .panel { background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; padding: 16px 0 0; margin: 16px 0 0; }

/* An agent's own voicemail, in the Agent page; an answer group's, under Operations. */
.voicemail-dialog { width: min(640px, calc(100vw - 32px)); }
.voicemail-head { display: flex; justify-content: space-between; align-items: center; }
.voicemail-head h2 { margin: 0; }
.voicemail-head .icon-button { color: var(--muted); font-size: 16px; }
.voicemail-head .icon-button:hover { color: var(--text, inherit); background: var(--line); }
#voicemail-list { display: grid; gap: 10px; max-height: 60vh; overflow-y: auto; }
.voicemail-row { border: 1px solid var(--line); border-radius: 8px; padding: 10px; display: grid; gap: 6px; }
.voicemail-row.unread { border-color: var(--accent); background: var(--accent-soft); }
.voicemail-row audio { width: 100%; }
.voicemail-who { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.voicemail-actions { display: flex; gap: 14px; font-size: 13px; }
.bar-menu summary .voicemail-unread, [role=menuitem] .voicemail-unread { margin-left: 6px; }

/*
 * Sign in with Google, Microsoft, LinkedIn: each provider's own logo on a white button, as their
 * branding guidelines ask, whatever the page's colors.
 */
.provider-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 40px;
    padding: 8px 16px;
    background: #ffffff;
    color: #1f1f1f;
    border: 1px solid #747775;
    border-radius: 4px;
    font: 500 14px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    cursor: pointer;
}
.provider-button:hover { background: #f5f7fa; border-color: #5f6368; }
.provider-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.provider-button svg { width: 18px; height: 18px; flex: none; }
.or-divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

/* A queue profile's call handling: per kind of call, its sections, conditions and keys. */
.queue-type { display: grid; gap: 14px; }
.queue-section { border: 1px solid var(--line); border-radius: 6px; padding: 10px 14px 12px; margin: 0; }
.queue-section legend { font-weight: 600; padding: 0 6px; }
.queue-row { margin-top: 8px; align-items: start; }
.queue-time input { text-align: right; }
.queue-condition { padding: 8px 0; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.queue-condition:first-of-type { border-top: 0; }
.queue-condition-head { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.queue-step { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.queue-step select { width: auto; }
.queue-keys { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 6px 18px; }
.queue-keys .mono { min-width: 3.5em; }
.queue-skills-pick summary { cursor: pointer; }
.queue-skills { display: grid; gap: 2px; max-height: 12em; overflow: auto; padding: 4px 0; }
label.inline { display: inline-flex; gap: 4px; align-items: center; font-weight: normal; }
.radios { display: inline-flex; flex-wrap: wrap; gap: 4px 16px; }
.queue-condition > .link-button { justify-self: start; }
.queue-keypad { display: grid; grid-template-columns: repeat(3, 2.4em); gap: 4px; }
.queue-keypad button { padding: 4px 0; }
.queue-sounds { width: 100%; }
.queue-sounds td { vertical-align: top; }
.queue-sounds td select { margin-bottom: 4px; }
.queue-section details { margin-top: 8px; }
.queue-section details summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.system-sounds audio { height: 32px; max-width: 100%; }
.inline-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.resource-input { display: flex; gap: 6px; flex: 1; flex-wrap: wrap; }
.resource-input select { flex: 0 1 14em; }
.resource-input input { flex: 1 1 14em; }

/* The breadcrumb at the top left: Sonnus, the organization, the account. */
.crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: nowrap; }
.crumbs .crumb { color: inherit; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 22ch; }
.crumbs a.crumb:hover { text-decoration: underline; }
.crumbs .crumb.current { font-weight: 600; }
.crumbs .crumb-sep { color: var(--muted); }
@media (max-width: 640px) {
    .crumbs .crumb { max-width: 12ch; }
}

/* Administration's Contact Centers: a table for each organization, under its name. */
.org-group + .org-group { margin-top: 22px; }
.org-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 2px 6px; border-bottom: 2px solid var(--line); }
.org-group-head strong { font-size: 16px; margin-right: 8px; }
.org-group table { margin-top: 0; }

/* Profile and Security's linked sign-ins: each provider, and a big button to link or unlink it. */
.sign-in-links { width: 100%; margin-top: 8px; }
.sign-in-links td { padding: 14px 10px; vertical-align: middle; }
.sign-in-links strong { font-size: 16px; }
.sign-in-links td > div { margin-top: 4px; }
.sign-in-link-action { width: 1%; text-align: right; white-space: nowrap; }
.sign-in-link-action form { margin: 0; }
.sign-in-link-action button { min-width: 120px; padding: 10px 18px; font-size: 15px; }

/* Select Organization and Select Contact Center: menus in the breadcrumb. */
.crumbs .place-menu > summary { border-color: transparent; padding: 4px 8px; font-weight: 600; max-width: 26ch; overflow: hidden; text-overflow: ellipsis; display: inline-block; }
.crumbs .place-menu > summary:hover { border-color: var(--line); }
.crumbs .place-menu > summary.place-prompt { color: var(--accent); border-color: var(--accent); }
.crumbs .place-menu .menu-panel { max-height: 70vh; overflow-y: auto; min-width: 240px; }
.crumbs .place-menu .menu-panel form.place-choice { margin: 0; border-top: 0; padding-top: 0; }
.crumbs .place-menu .menu-panel button.current { color: var(--accent); font-weight: 600; }
/* Each choice: its name, and what tells it apart from a similarly named one. */
.crumbs .place-menu .menu-panel a, .crumbs .place-menu .menu-panel button { flex-direction: column; align-items: flex-start; gap: 1px; }
.place-name { font-weight: inherit; }
.place-id { font-size: 11px; color: var(--muted); font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace); font-weight: normal; }
/* The breadcrumb's separators, centered on the menus beside them. */
.crumbs .place-menu { display: flex; align-items: center; }
.crumbs .crumb-sep { display: inline-flex; align-items: center; align-self: center; line-height: 1; }
.crumbs .place-locked { color: var(--muted); padding: 4px 8px; white-space: nowrap; cursor: not-allowed; }
.menu-note { color: var(--muted); padding: 7px 10px; }
@media (max-width: 640px) {
    .crumbs .place-menu > summary { max-width: 14ch; }
    .crumbs .place-locked { display: none; }
}

/* The chooser: rows of organizations and accounts, the whole row the choice. */
.chooser { max-width: 560px; margin: 0 auto; }
.chooser h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 20px 0 6px; }
.chooser-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--panel); }
.chooser-list li + li { border-top: 1px solid var(--line); }
.chooser-list + .chooser-list, .chooser-list + h2 { margin-top: 20px; }
.chooser > .chooser-list:first-child, .chooser > h2:first-child { margin-top: 24px; }
.chooser-list form { margin: 0; }
.chooser-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; background: none; border: 0; border-radius: 0;
    color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.chooser-row:hover, .chooser-row:focus-visible { background: var(--accent-soft, rgba(37, 99, 235, .08)); outline: none; }
.chooser-row .chooser-name { font-weight: 600; flex: 1; }
.chooser-row .chooser-kind { color: var(--muted); font-size: 12px; }

/* A list to pick from: one big button each (the whole button the choice), with Open on it. */
.chooser > h1 { margin-top: 24px; }
.pick-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.chooser h2 + .pick-list { margin-top: 0; }
.pick-list + h2 { margin-top: 24px; }
.pick-list form { margin: 0; }
.pick { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 14px 18px; box-sizing: border-box;
    background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
    font: inherit; text-align: left; text-decoration: none; cursor: pointer; transition: border-color .12s, box-shadow .12s, transform .06s; }
.pick:hover, .pick:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft, rgba(37, 99, 235, .15)); outline: none; text-decoration: none; }
.pick:active { transform: translateY(1px); }
.pick-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.pick-name { font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.pick-detail { font-size: 13px; color: var(--muted); }
.pick-note { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.pick-go { flex: none; background: var(--accent); color: #fff; font-weight: 600; font-size: 15px; padding: 9px 16px; border-radius: 8px; white-space: nowrap; }
@media (max-width: 480px) {
    .pick { padding: 12px 14px; gap: 10px; }
    .pick-go { padding: 8px 12px; }
}

/* A page's heading, and its button, kept apart from what follows when they wrap (on a phone). */
.page-head + .admin-search, .page-head + .banner { margin-top: 16px; }

/* Administration's search above its lists. */
.admin-search { gap: 8px; margin-bottom: 12px; align-items: center; }
.admin-search input[type=search] { flex: 1; max-width: 420px; }

/* The call flow editor on a phone: the steps take the whole width (no gutter for the lines between them,
   which the "Go to" choices already show), headers and pickers wrap, and the canvas's panel covers it. */
@media (max-width: 640px) {
    .flow-steps, .flow-workspace .flow-steps { width: 100%; }
    .flow-lines { display: none; }
    .flow-step { padding: 10px 12px; }
    .flow-step-head { flex-wrap: wrap; row-gap: 6px; }
    .flow-step-head .flow-step-action { flex: 1 1 10em; max-width: none; }
    .flow-step-head .flow-step-name-input { flex: 1 1 100%; max-width: none; order: 5; }
    .flow-step-summary { margin-left: 0; white-space: normal; }
    .message-input, .value-source { flex-wrap: wrap; }
    .message-input .message-kind, .value-source .value-kind { flex: 1 1 100%; }
    .resource-input { flex-direction: column; }
    .flow-handlers { grid-template-columns: max-content repeat(3, minmax(0, 1fr)); gap: 4px; font-size: 12px; }
    .flow-handlers select { font-size: 12px; padding: 3px 2px; }
    .skill-rules-table { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
    .flow-variables-table { grid-template-columns: minmax(0, 1fr) 6.5em auto auto; }
    .pair-row { grid-template-columns: minmax(0, 1fr) auto; }
    .pair-row > :nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
    .flow-board { height: calc(100vh - 160px); min-height: 420px; }
    .flow-board.panel-open .board-panel { position: absolute; inset: 0; width: auto; z-index: 5; border-left: 0; }
    .flow-toolbar { flex-wrap: wrap; }
}
