/* hostrivo panel base styles, tokens from hostrivomain/DESIGN.md (Signal) */

/* Signal typefaces, self hosted (GDPR): assets/fonts, SIL OFL 1.1.
   Variable woff2, split latin / latin-ext so a page without latin-ext
   characters only pulls the smaller file. */

@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url("../fonts/inter-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url("../fonts/inter-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: Archivo;
    font-style: normal;
    font-weight: 600 700;
    font-display: swap;
    src: url("../fonts/archivo-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: Archivo;
    font-style: normal;
    font-weight: 600 700;
    font-display: swap;
    src: url("../fonts/archivo-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/jetbrains-mono-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/jetbrains-mono-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --bg: #EAEAEC;
    --surface: #FFFFFF;
    --raised: #FFFFFF;
    --border: #D8D8DC;
    --text: #1B1B1E;
    --muted: #66666C;
    --accent: #C13E0E;
    --accent-hover: #A93509;
    --on-accent: #FFFFFF;
    --success: #3FA363;
    --warning: #C9A227;
    --danger: #CC2E2E;
    --info: #5B8DB8;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 6px 16px -10px rgba(0, 0, 0, 0.18);
    --radius: 6px;
    --radius-sm: 4px;
    --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --font-heading: Archivo, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --font-mono: "JetBrains Mono", Consolas, "Liberation Mono", monospace;
}

:root[data-theme="dark"] {
    --bg: #17171A;
    --surface: #1F1F23;
    --raised: #27272C;
    --border: #38383E;
    --text: #EDEDEF;
    --muted: #9C9CA2;
    --accent: #E8551F;
    --accent-hover: #F26A38;
    --on-accent: #1C0D06;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 16px -10px rgba(0, 0, 0, 0.6);
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font: 14px/1.5 var(--font);
    -webkit-font-smoothing: antialiased;
}

main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    letter-spacing: -0.018em;
    margin: 0;
}

h1 {
    font-size: 30px;
    font-weight: 700;
}

h2 {
    font-size: 20px;
    font-weight: 600;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.mono {
    font-family: var(--font-mono);
}

.tnum {
    font-variant-numeric: tabular-nums;
}

.muted {
    color: var(--muted);
}

/* buttons: one primary per view, secondary = outline, ghost = text, danger = outline red */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 16px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    background: transparent;
    color: inherit;
    font: 600 14px/1 var(--font);
    cursor: pointer;
    white-space: nowrap;
    transition: background 120ms ease, border-color 120ms ease;
}

.btn-primary {
    background: var(--accent);
    color: var(--on-accent);
}

.btn-primary:hover {
    background: var(--accent-hover);
    text-decoration: none;
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}

.btn-secondary:hover {
    border-color: var(--muted);
    text-decoration: none;
}

.btn-ghost {
    background: transparent;
    color: var(--accent);
}

.btn-danger {
    background: transparent;
    color: var(--danger);
    border-color: var(--danger);
}

.btn-block {
    width: 100%;
}

.btn[disabled], .btn.is-loading {
    opacity: 0.55;
    cursor: default;
    pointer-events: none;
}

.btn-icon {
    width: 36px;
    height: 36px;
    min-height: 0;
    padding: 0;
    color: var(--muted);
    background: var(--surface);
    border-color: var(--border);
    border-radius: var(--radius-sm);
}

.btn-icon:hover {
    color: var(--text);
    border-color: var(--muted);
}

.btn-icon span {
    display: inline-flex;
}

/* the toggle shows the mode it switches to */
:root[data-theme="dark"] .icon-moon,
:root:not([data-theme="dark"]) .icon-sun {
    display: none;
}

/* forms: labels above, help and error below the field */
.field {
    margin-bottom: 16px;
}

.field-row {
    display: flex;
    gap: 12px;
}

.field-row .field {
    flex: 1;
    min-width: 0;
}

.field label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
}

.field label .optional {
    color: var(--muted);
    font-weight: 400;
}

.input {
    width: 100%;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font: 14px var(--font);
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

.field.has-error .input {
    border-color: var(--danger);
}

.field .help {
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px;
}

.field .error {
    font-size: 12px;
    color: var(--danger);
    margin-top: 6px;
    display: none;
}

.field.has-error .error {
    display: block;
}

.check,
.field label.check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.3;
    cursor: pointer;
}

.check input {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    accent-color: var(--accent);
    margin: 0;
}

/* surfaces */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.alert {
    display: none;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-size: 13px;
    margin-bottom: 16px;
}

.alert.is-visible {
    display: flex;
}

.alert-danger {
    border-color: rgba(204, 46, 46, 0.45);
    background: rgba(204, 46, 46, 0.08);
    color: var(--text);
}

.alert-success {
    border-color: rgba(63, 163, 99, 0.45);
    background: rgba(63, 163, 99, 0.08);
}

.alert-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
}

.alert-danger .alert-dot {
    background: var(--danger);
}

.alert-success .alert-dot {
    background: var(--success);
}

.brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 20px;
    color: var(--text);
    letter-spacing: -0.5px;
}

.brand span {
    color: var(--accent);
}

.brand:hover {
    text-decoration: none;
}

/* auth pages: centered card on the canvas */
.auth {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

/* the theme mounts the view in its own element; without a width it shrinks to
   its content and the card never reaches the 400px the auth-top above it uses */
.auth > [data-hostrivo-view] {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auth-top {
    width: 100%;
    max-width: 400px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.auth-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* segmented control: one small choice, 4px items inside a 6px frame */
.segmented {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.segment {
    min-width: 36px;
    padding: 5px 8px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--muted);
    font: 600 12px/1.2 var(--font);
    letter-spacing: 0.04em;
    cursor: pointer;
}

.segment:hover {
    color: var(--text);
}

.segment.is-active {
    background: var(--bg);
    color: var(--text);
}

:root[data-theme="dark"] .segment.is-active {
    background: var(--raised);
}

.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 28px;
}

.auth-card h1 {
    margin-bottom: 4px;
}

.auth-card .intro {
    color: var(--muted);
    margin: 0 0 22px 0;
}

.auth-foot {
    margin-top: 18px;
    font-size: 13px;
    color: var(--muted);
    text-align: center;
}

/* app shell: topbar + sidebar + content */
.shell {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: 56px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.topbar .spacer {
    flex-grow: 1;
}

.topbar .user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 4px 4px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: transparent;
    color: var(--text);
    font: 500 13px var(--font);
    cursor: pointer;
}

.topbar .user:hover,
.dropdown.is-open .user {
    border-color: var(--border);
    background: var(--bg);
}

.topbar .user svg {
    color: var(--muted);
}

/* disclosure dropdown: trigger + menu card, closed by default */
.dropdown {
    position: relative;
}

.menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 280px;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 20;
}

.dropdown.is-open .menu {
    display: block;
}

.menu-head {
    padding: 8px 10px 6px 10px;
}

.menu-title {
    font-weight: 600;
    font-size: 13px;
}

.menu-sub {
    font-size: 12px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-sep {
    border-top: 1px solid var(--border);
    margin: 4px 4px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text);
    font: 500 13px var(--font);
    text-align: left;
    cursor: pointer;
}

.menu-item:hover {
    background: var(--bg);
}

.menu-item.is-danger {
    color: var(--danger);
}

.menu-meta {
    padding: 6px 10px 4px 10px;
}

.menu-meta-label {
    font-size: 11px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--muted);
    margin: 6px 0 2px 0;
}

.menu-meta-label:first-child {
    margin-top: 0;
}

.menu-meta-value {
    font-size: 12px;
    color: var(--text);
}

.menu-copy {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--text);
    font-size: 12px;
    text-align: left;
    cursor: pointer;
}

.menu-copy svg {
    color: var(--muted);
    flex-shrink: 0;
}

.menu-copy:hover svg {
    color: var(--accent);
}

.avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--on-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.shell-body {
    display: flex;
    flex-grow: 1;
}

.sidebar {
    width: 220px;
    flex-shrink: 0;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 16px 12px;
}

.nav-section {
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--muted);
    margin: 14px 10px 6px 10px;
}

.nav-section:first-child {
    margin-top: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius);
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
}

.nav-item:hover {
    color: var(--text);
    text-decoration: none;
}

.nav-item.is-active {
    background: var(--bg);
    color: var(--text);
    border-color: var(--border);
    font-weight: 600;
}

.nav-item svg {
    flex-shrink: 0;
}

/* starred services under the services entry */
.nav-favs {
    display: flex;
    flex-direction: column;
    margin: 0 0 4px 16px;
}

.nav-item.nav-fav {
    gap: 8px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 400;
}

.nav-item.nav-fav svg {
    color: var(--warning);
}

.nav-item.nav-fav span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* the content fills the space next to the sidebar, pages use the width with multi column racks */
.content {
    flex-grow: 1;
    min-width: 0;
    padding: 28px 32px;
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.page-head .sub {
    color: var(--muted);
    margin-top: 4px;
}

/* empty state: the fact, the cause, one action */
.empty {
    padding: 28px 0;
    border-top: 1px solid var(--border);
    color: var(--muted);
}

.empty svg {
    color: var(--muted);
    margin-bottom: 10px;
}

.empty .title {
    color: var(--text);
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
}

.empty .btn {
    margin-top: 16px;
}

/* list pages with nothing to show: centered, no rule above */
.empty-center {
    text-align: center;
    border-top: 0;
    padding: 48px 20px;
}

.empty-center svg {
    display: block;
    margin: 0 auto 10px;
}

/* hidden attribute wins over any display rule */
[hidden] {
    display: none !important;
}

select.input {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 32px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2366666C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.input-code {
    font-family: var(--font-mono);
    letter-spacing: 0.12em;
}

.input-inline {
    min-height: 30px;
    padding: 3px 8px;
    font-size: 14px;
}

.btn-icon.is-danger:hover {
    color: var(--danger);
    border-color: var(--danger);
}

/* login: passwordless below the password form */
.auth-or {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 14px 0;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.auth-or::before,
.auth-or::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-card .btn-block + .btn-block {
    margin-top: 10px;
}

/* skeletons: every data region mirrors its loaded layout while the backend answers.
   A .loadable starts with is-loading, Panel.loaded() lifts it. Pulse only, no shimmer gradient */
/* both rules are descendant selectors, so a region nested inside another
   loadable is decided by whichever ancestor matches last. The is-loading
   rules come second and carry no !important, so the nearest loadable wins
   and an outer region that finished does not hide an inner skeleton */
.loadable:not(.is-loading) .skeleton {
    display: none;
}

/* no display rule for a loaded region: it keeps its own (grid, flex) */
.loadable.is-loading .when-loaded {
    display: none;
}

.skeleton {
    display: flow-root;
}

.loadable.is-loading .skeleton {
    display: flow-root;
}

/* tiles and cards are containers, skeletons can react to their own width */
.stat,
.panel-card {
    container-type: inline-size;
}

.skeleton-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.sk {
    display: block;
    background: var(--border);
    border-radius: var(--radius-sm);
    animation: sk-pulse 1.6s ease-in-out infinite;
}

/* text stand-ins are spacers with the exact line box height of the text they replace,
   the visible bar is drawn inside (no margins, so nothing collapses and nothing moves) */
.sk-line,
.sk-line-sm,
.sk-line-xs,
.sk-value,
.sk-stat-sub,
.sk-stat-sub-wrap,
.sk-field-label,
.sk-chip-lg,
.sk-mono,
.sk-help,
.sk-title-line,
.sk-empty {
    position: relative;
    background: transparent;
    border-radius: 0;
    animation: none;
}

.sk-line::after,
.sk-line-sm::after,
.sk-line-xs::after,
.sk-value::after,
.sk-stat-sub::after,
.sk-stat-sub-wrap::after,
.sk-field-label::after,
.sk-chip-lg::after,
.sk-mono::after,
.sk-help::after,
.sk-title-line::after,
.sk-empty::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    background: var(--border);
    border-radius: var(--radius-sm);
    animation: sk-pulse 1.6s ease-in-out infinite;
}

/* 14px text, 21px line */
.sk-line {
    height: 21px;
    width: 60%;
}

.sk-line::after {
    top: 5px;
    height: 12px;
}

/* 13px text, 19.5px line */
.sk-line-sm {
    height: 19.5px;
    width: 60%;
}

.sk-line-sm::after {
    top: 4px;
    height: 11px;
}

/* 12px text, 18px line */
.sk-line-xs {
    height: 18px;
    width: 50%;
}

.sk-line-xs::after {
    top: 4px;
    height: 10px;
}

.sk-text {
    height: 12px;
    width: 60%;
}

.sk-input {
    height: 40px;
    width: 100%;
}

.sk-btn {
    height: 38px;
    width: 130px;
    border-radius: var(--radius);
}

.sk-chip {
    height: 24px;
    width: 64px;
}

.sk-circle {
    border-radius: var(--radius-sm);
}

/* stat tile: 29px value row, then the 13px sub line 6px below (a second line when the tile is narrow) */
.sk-value {
    height: 29px;
    width: 45%;
}

.sk-value::after {
    top: 4px;
    height: 22px;
}

.sk-chip-lg {
    height: 29px;
    width: 76px;
}

.sk-chip-lg::after {
    top: 1.5px;
    height: 26px;
}

.sk-stat-sub {
    height: 25.5px;
    width: 70%;
}

.sk-stat-sub::after {
    top: 10px;
    height: 11px;
}

.sk-stat-sub-wrap {
    display: none;
    height: 19.5px;
    width: 25%;
}

.sk-stat-sub-wrap::after {
    top: 4px;
    height: 11px;
}

@container (max-width: 340px) {
    .sk-stat-sub-wrap {
        display: block;
    }
}

/* a .field: 13px label line + 6px, 40px input, 16px below */
.sk-field {
    margin-bottom: 16px;
}

.sk-field-label {
    height: 25.5px;
    width: 90px;
}

.sk-field-label::after {
    top: 4px;
    height: 12px;
}

/* feed row: 28px icon, 14px title line, 12px meta line 2px below, hairline */
.sk-feed-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.sk-feed-row:last-child {
    border-bottom: 0;
}

.sk-feed-row .sk-circle {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
}

.sk-feed-main {
    flex: 1;
    min-width: 0;
}

.sk-feed-row .sk-line-xs {
    height: 20px;
}

.sk-feed-row .sk-line-xs::after {
    top: 6px;
}

/* key/value rows like .kv: 13px lines, 8px row gap, a chip row, the id wraps in a narrow card */
.sk-kv {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 8px 16px;
}

.sk-kv .sk-line-sm {
    width: 100%;
}

.sk-kv .sk-chip {
    margin: 1px 0;
}

.sk-kv-wrap {
    display: none;
}

@container (max-width: 400px) {
    .sk-kv-wrap {
        display: block;
    }
}

/* the help line under a field: 6px gap + 12px text */
.sk-help {
    height: 24px;
    width: 70%;
}

.sk-help::after {
    top: 10px;
    height: 10px;
}

/* a 12px mono value like the user id, 16px line */
.sk-mono {
    height: 16px;
    width: 90%;
}

.sk-mono::after {
    top: 3px;
    height: 10px;
}

/* list row like .list-row on a wide screen */
.sk-list {
    margin-bottom: 12px;
}

.sk-list-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 53px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.sk-list-row .sk-circle {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

/* two line list row (title + sub) */
.sk-list-row-2 {
    min-height: 60px;
    align-items: flex-start;
}

.sk-list-row-2 .sk-circle {
    margin-top: 3px;
}

/* status line: chip, text, button, 38px tall */
.sk-status {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
}

/* an empty state sentence with the 12px gap below it */
.sk-empty {
    height: 31.5px;
    width: 220px;
}

.sk-empty::after {
    top: 4px;
    height: 11px;
}

.sk.w-20 { width: 20%; }
.sk.w-30 { width: 30%; }
.sk.w-40 { width: 40%; }
.sk.w-50 { width: 50%; }
.sk.w-70 { width: 70%; }
.sk.w-100 { width: 100%; }

@keyframes sk-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .sk {
        animation: none;
        opacity: 0.7;
    }
}

/* topbar user while the session loads */
.topbar .user.is-loading .avatar {
    color: transparent;
    background: var(--border);
    animation: sk-pulse 1.6s ease-in-out infinite;
}

.topbar .user.is-loading .user-name {
    display: block;
    width: 88px;
    height: 12px;
    color: transparent;
    overflow: hidden;
    background: var(--border);
    border-radius: var(--radius-sm);
    animation: sk-pulse 1.6s ease-in-out infinite;
}

.topbar .user.is-loading svg {
    visibility: hidden;
}

/* tab bar under the page header, active = 2px accent underline */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    margin: -8px 0 24px 0;
}

.tab {
    position: relative;
    padding: 10px 12px;
    margin-bottom: -1px;
    color: var(--muted);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}

.tab:hover {
    color: var(--text);
    text-decoration: none;
}

.tab.is-active {
    color: var(--text);
    border-bottom-color: var(--accent);
}

/* settings sheet: one card across the content width, each setting a row of label
   column + control column. Controls use the width through the .fields grid */
.sheet {
    width: 100%;
}

.setting {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 16px 48px;
    padding: 26px 32px;
}

.setting + .setting {
    border-top: 1px solid var(--border);
}

.setting-label h2 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.setting-label p {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}

.setting-body {
    min-width: 0;
}

.setting-body h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.setting-body p {
    margin: 0 0 14px 0;
}

/* fields flow into columns as the control column grows (container queries, so the
   sidebar and label column do not matter): 1, 2, then 3 or 4 columns */
.setting-body {
    container-type: inline-size;
}

.fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0 16px;
}

.fields-2 {
    max-width: 620px;
}

.fields-3 {
    max-width: 900px;
}

.fields-4 {
    max-width: 1180px;
}

.fields .field {
    min-width: 0;
}

@container (min-width: 560px) {
    .fields-2,
    .fields-3,
    .fields-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fields .span-2 {
        grid-column: span 2;
    }
}

@container (min-width: 720px) {
    .fields-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@container (min-width: 1060px) {
    .fields-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1900px) {
    .setting {
        grid-template-columns: 340px minmax(0, 1fr);
        gap: 16px 64px;
        padding: 28px 36px;
    }
}

@media (max-width: 900px) {
    .setting {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        padding: 20px;
    }
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.actions .spacer {
    flex: 1;
}

.field-zip {
    flex: 0 0 130px !important;
}

/* shop: one section per category (product type when none is set), one card per
   plan, the specs as hairline rows, the price beside them */
.plan-group + .plan-group {
    margin-top: 26px;
}

.plan-group-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 12px;
}

.plan-group-head h2 {
    font-size: 20px;
    font-weight: 600;
}

.plan-group-count {
    font-size: 12px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

/* a bare skeleton bar inside a card or heading part takes that part's own line
   box, so a skeleton plan and a loaded one are the same height by construction */
.plan-group-head .sk,
.plan-card .sk:not(.sk-btn) {
    display: block;
    height: 1.5em;
}

.plan-group-head .sk {
    width: 160px;
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 14px;
}

.plan-card {
    container-type: inline-size;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

/* wide enough for two columns: the specs read down the left, the price and
   the action sit together on the right instead of stacking into dead space */
.plan-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.plan-buy {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

@container (min-width: 430px) {
    .plan-body {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(180px, auto);
        gap: 10px 28px;
        align-items: start;
    }

    .plan-body .plan-specs {
        margin: 0;
    }

    .plan-buy {
        justify-self: end;
        align-items: flex-end;
        text-align: right;
        min-width: 180px;
    }

    .plan-buy .plan-price {
        margin-top: 0;
        padding-top: 0;
        border-top: 0;
    }

    .plan-buy .btn {
        width: 100%;
    }
}

.plan-type {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--muted);
}

.plan-card .plan-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.plan-card h3 {
    font-size: 20px;
    font-weight: 600;
}

.plan-card .plan-desc {
    color: var(--muted);
    font-size: 13px;
}

.plan-specs {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 13px;
    color: var(--muted);
}

.plan-specs li {
    padding: 5px 0;
    border-top: 1px solid var(--border);
}

.plan-price {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-size: 20px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.plan-price .plan-cycle {
    font-size: 13px;
    font-weight: 400;
    color: var(--muted);
}

.plan-note {
    font-size: 12px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

/* status line: chip, detail text, actions right after it */
.status-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    min-height: 38px;
}

.status-line .status-actions {
    display: flex;
    gap: 8px;
    margin-left: 6px;
}

/* stacked status lines: room per row, a hairline between them, actions on the right */
.status-list .status-line {
    padding: 10px 0;
}

.status-list .status-line:not(:first-child) {
    border-top: 1px solid var(--border);
}

.status-list .status-actions {
    margin-left: auto;
}

/* category rows: the name takes the free room, sort and actions keep their size */
.category-row .input {
    flex: 1 1 200px;
    min-width: 0;
}

.category-row .input-sort {
    flex: 0 0 92px;
}

.category-row .status-actions {
    margin-left: auto;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    border: 1px solid var(--border);
    color: var(--muted);
}

/* small remove control inside a chip (role chips in the team list) */
.chip-x {
    border: 0;
    background: none;
    padding: 0 0 0 2px;
    cursor: pointer;
    color: inherit;
    font-size: 13px;
    line-height: 1;
    opacity: 0.6;
}

.chip-x:hover {
    opacity: 1;
}

.chip-success {
    color: var(--success);
    border-color: rgba(63, 163, 99, 0.5);
    background: rgba(63, 163, 99, 0.1);
}

/* an opened step below the status line, sits on the canvas tone */
.step {
    max-width: 640px;
    margin-top: 14px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
}

:root[data-theme="dark"] .step {
    background: var(--raised);
}

.step .field:last-of-type {
    margin-bottom: 16px;
}

.step .input {
    background: var(--surface);
}

.code-field {
    max-width: 200px;
}

.qr-row {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.qr {
    width: 144px;
    height: 144px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: #fff;
}

.qr-secret {
    min-width: 0;
}

.qr-secret .label {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.secret-copy {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font: 13px var(--font-mono);
    cursor: pointer;
    text-align: left;
    word-break: break-all;
    margin-bottom: 10px;
}

.secret-copy svg {
    flex-shrink: 0;
    color: var(--muted);
}

.secret-copy:hover svg {
    color: var(--accent);
}

.codes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

.codes span {
    padding: 7px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    text-align: center;
    font-size: 13px;
    letter-spacing: 0.04em;
}

/* key list: hairline rows. Wide screens show the dates as columns, narrow ones stack them under the name */
.list {
    display: flex;
    flex-direction: column;
    max-width: 1280px;
    margin-bottom: 12px;
}

.list:empty {
    display: none;
}

.list-row {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr) auto;
    grid-template-areas: "icon main actions" "icon meta actions";
    align-items: center;
    gap: 2px 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.list-icon {
    grid-area: icon;
    display: inline-flex;
    color: var(--muted);
}

.list-main {
    grid-area: main;
    min-width: 0;
}

.list-title {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-meta {
    grid-area: meta;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
    font-size: 12px;
    color: var(--muted);
}

.list-meta .micro {
    display: inline-block;
    min-width: 0;
    margin-right: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@media (min-width: 1100px) {
    .list-row {
        grid-template-columns: 16px minmax(0, 1fr) 480px auto;
        grid-template-areas: "icon main meta actions";
    }

    .list-meta {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 20px;
        font-size: 13px;
    }
}
.list-actions {
    grid-area: actions;
    display: flex;
    gap: 4px;
}

.list-actions .btn-icon {
    width: 32px;
    height: 32px;
    border-color: transparent;
    background: transparent;
}

.list-actions .btn-icon:hover {
    border-color: var(--border);
    background: var(--surface);
}

.list-empty {
    color: var(--muted);
    margin-bottom: 12px;
}

/* dashboard: stat strip, activity feed and the account card */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat {
    padding: 16px 20px 18px;
}

.stat-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}

.stat-value {
    display: flex;
    align-items: center;
    min-height: 29px;
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.018em;
    line-height: 1.2;
}

.stat-value.mono {
    font-family: var(--font-mono);
    letter-spacing: 0.06em;
}

.stat-value .chip {
    font-size: 13px;
    padding: 4px 10px;
}

.stat-sub {
    margin-top: 6px;
    font-size: 13px;
    color: var(--muted);
}

.stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.stat-row .btn-icon {
    width: 30px;
    height: 30px;
}

.stat-copy {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.stat-copy svg {
    color: var(--muted);
}

.stat-copy:hover svg {
    color: var(--accent);
}

.chip-warning {
    color: var(--warning);
    border-color: rgba(201, 162, 39, 0.5);
    background: rgba(201, 162, 39, 0.12);
}

.dash-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.dash-side {
    display: grid;
    gap: 20px;
}

@media (min-width: 1150px) {
    .dash-grid {
        grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
    }
}

.panel-card {
    padding: 18px 22px 20px;
}

.card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.card-head h2 {
    font-size: 16px;
    font-weight: 600;
}

.panel-card .empty {
    padding: 24px 16px;
}

.feed {
    display: flex;
    flex-direction: column;
}

.feed:empty {
    display: none;
}

.feed-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.feed-item:last-child {
    border-bottom: 0;
}

.feed-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    color: var(--muted);
}

.feed-main {
    min-width: 0;
}

.feed-text {
    font-weight: 500;
}

.feed-meta {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
    overflow-wrap: anywhere;
}

.feed + .actions {
    margin-top: 14px;
}

/* key/value rows */
.kv {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px 16px;
    margin: 0;
    font-size: 13px;
}

.kv dt {
    color: var(--muted);
    white-space: nowrap;
}

.kv dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

/* billing address asked for right in the checkout and the topup form */
.order-address {
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.order-address h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px;
}

.order-address .help {
    margin-bottom: 10px;
}

/* renew dialog: one row per service, periods and the total under the list */
.renew-list {
    max-height: 320px;
    overflow-y: auto;
    margin: 6px 0 14px;
}

.renew-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 0;
    border-top: 1px solid var(--border);
    cursor: pointer;
    font-size: 13px;
}

.renew-row:last-child {
    border-bottom: 1px solid var(--border);
}

.renew-row .grow {
    flex: 1;
    min-width: 0;
}

.renew-row .renew-sub {
    font-size: 12px;
}

.renew-row input {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    accent-color: var(--accent);
    margin: 0;
}

.renew-foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.renew-foot .input {
    min-width: 180px;
}

.renew-total {
    text-align: right;
    font-size: 13px;
}

.renew-total .is-short {
    color: var(--danger);
}

/* orders: the folded row with everything the list has no room for */
.data-table tr.order-detail td {
    background: var(--bg);
    padding: 14px 16px 16px;
}

.order-detail .kv {
    max-width: 960px;
}

.kv-copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 12px;
    cursor: pointer;
    text-align: left;
}

.kv-copy svg {
    flex-shrink: 0;
    color: var(--muted);
}

.kv-copy:hover svg {
    color: var(--accent);
}
.list-row-link {
    color: var(--text);
    text-decoration: none;
    grid-template-columns: 16px minmax(0, 1fr);
    grid-template-areas: "icon main";
}

.list-row-link:hover {
    text-decoration: none;
}

.list-row-link:hover .list-title {
    color: var(--accent);
}

.list-row-link .list-sub {
    font-size: 12px;
}

/* page header extras: breadcrumb, title with chip, actions on the right */
.page-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 6px;
}

.breadcrumb .sep {
    color: var(--border);
}

.title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.title-row .chip {
    font-size: 12px;
}

.chip-danger {
    color: var(--danger);
    border-color: rgba(204, 46, 46, 0.45);
    background: rgba(204, 46, 46, 0.08);
}

/* table: micro uppercase header, hairlines, no zebra, ids in mono */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th {
    padding: 12px 20px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
}

.table td {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.table tbody tr:last-child td {
    border-bottom: 0;
}

.table tr.is-link {
    cursor: pointer;
}

.table tr.is-link:hover td {
    background: var(--raised);
}

:root:not([data-theme="dark"]) .table tr.is-link:hover td {
    background: var(--bg);
}

.table .mono {
    font-size: 13px;
}

.table-link {
    color: var(--text);
    font-weight: 500;
}

.card-foot {
    padding: 10px 20px;
    border-top: 1px solid var(--border);
    font-size: 12px;
}

.card > .empty {
    margin: 20px;
}

.card:not(.auth-card) > .alert {
    margin: 20px 20px 0;
}

/* table skeleton: the header row and one row per remembered entry */
/* a bare skeleton bar inside a table part takes that part's own line box, so a
   skeleton table and a loaded one are the same height by construction */
.table th .sk,
.table td .sk,
.data-table th .sk,
.data-table td .sk,
.table-foot .sk:not(.sk-btn) {
    display: block;
    height: 1.5em;
}

.sk-table-head,
.sk-table-row {
    display: grid;
    grid-template-columns: 2fr 3fr 1fr 1fr 1fr;
    gap: 20px;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--border);
}

/* measured against .data-table, which is what every theme view uses */
.sk-table-head {
    height: 33px;
}

.sk-table-row {
    height: 36px;
}

.sk-table-body .sk-table-row:last-child {
    border-bottom: 0;
}

.sk-empty-box {
    height: 208px;
    background: transparent;
    border-top: 1px solid var(--border);
    animation: none;
}

/* page title line, 24px heading */
.sk-title-line {
    height: 45px;
    width: 40%;
}

.sk-title-line::after {
    top: 11px;
    height: 22px;
}

.address-preview {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
}
@media (max-width: 600px) {
    .field-row {
        flex-direction: column;
        gap: 0;
    }

    .field-zip {
        flex: 1 !important;
    }

    .qr-row {
        flex-direction: column;
    }
}

@media (max-width: 800px) {
    .sidebar {
        display: none;
    }

    .content {
        padding: 20px 16px;
    }
}

/* runtime ui: toasts bottom right, modal on a dimmed overlay */
.hx-toasts {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
}

.hx-toast {
    padding: 10px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 13px;
    box-shadow: var(--shadow);
    transition: opacity 200ms ease, transform 200ms ease;
}

.hx-toast-success {
    border-color: rgba(63, 163, 99, 0.5);
}

.hx-toast-error {
    border-color: rgba(204, 46, 46, 0.5);
}

.hx-toast.is-gone {
    opacity: 0;
    transform: translateY(6px);
}

.hx-modal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.4);
    z-index: 900;
}

.hx-modal {
    width: 100%;
    max-width: 420px;
    padding: 22px 24px;
}

.hx-modal h2 {
    font-size: 20px;
    margin-bottom: 8px;
}

.hx-modal p {
    margin: 0 0 16px 0;
    color: var(--muted);
}

.hx-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
/* an uploaded logo replaces the brand text */
.brand img {
    display: block;
    height: 26px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}

/* data tables (outgoing mail log): tools row, scrollable table, pager */
.table-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.table-tools .input {
    max-width: 280px;
}

/* the table sits flat on the card: hairlines, no box inside a box */
.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th {
    text-align: left;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
}

.data-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table td .chip + .chip {
    margin-left: 6px;
}

.table-foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
    font-size: 12px;
    color: var(--muted);
}

.micro-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

/* inline mail viewer under the log tables */
.data-table tbody tr.is-clickable {
    cursor: pointer;
}

.data-table tbody tr.is-clickable:hover td {
    background: var(--bg);
}

.mail-viewer {
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.mail-viewer-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.mail-viewer-head .spacer {
    flex: 1;
}

.mail-viewer iframe {
    display: block;
    width: 100%;
    height: 480px;
    border: 0;
    background: #ffffff;
}

/* the order card walks payment -> setup -> ready, the active step pulses */
.order-steps {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0 16px;
    flex-wrap: wrap;
}

.order-steps .step {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: var(--muted);
}

.order-steps .step .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
}

.order-steps .step.is-done {
    color: var(--text);
}

.order-steps .step.is-done .dot {
    background: var(--success);
}

.order-steps .step.is-active {
    color: var(--text);
    font-weight: 600;
}

.order-steps .step.is-active .dot {
    background: var(--accent);
    animation: order-step-pulse 1.2s ease-in-out infinite;
}

.order-steps .sep {
    flex: 0 0 26px;
    height: 2px;
    background: var(--border);
    border-radius: 2px;
}

@keyframes order-step-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

/* the service the order flow just delivered */
.status-line.is-highlight {
    border-left: 3px solid var(--accent);
    padding-left: 10px;
}

/* the row the order flow just delivered */
.data-table tr.is-highlight td {
    background: color-mix(in srgb, var(--accent) 7%, transparent);
}

/* full width section for table pages, no label column */
.setting.setting-wide {
    display: block;
}

/* a wide section stacks, so its label needs the gap the grid used to give it */
.setting.setting-wide > .setting-label {
    margin-bottom: 14px;
}

/* tab strip and fact tiles inside a card (billing, customer, interface, offers) */
.svc-tabs {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--border);
    padding: 0 10px;
    overflow-x: auto;
    overflow-y: hidden;
}

.svc-tab {
    padding: 12px 14px;
    border: 0;
    background: none;
    color: var(--muted);
    font: 600 13px var(--font);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
}

.svc-tab.is-active {
    color: var(--text);
    border-bottom-color: var(--accent);
}

.svc-pane {
    display: none;
}

.svc-pane.is-active {
    display: block;
}

.svc-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}

.svc-fact {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 11px 14px;
}

.svc-fact .k {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.svc-fact .v {
    font-weight: 600;
    margin-top: 3px;
}

.svc-fact .s {
    font-size: 12px;
    color: var(--muted);
}

/* customer profile staff actions: a grid so the rows end flush with the facts */
.cust-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.cust-actions .btn {
    width: 100%;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* service detail pages: page header with the spec line and the power group,
   a summary strip, tabs, then one label-column sheet (.setting rows) per tab */
.svc-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.svc-head-main {
    min-width: 0;
}

.svc-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.svc-title h1 {
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.svc-title form {
    flex: 1 1 360px;
    max-width: 520px;
}

.svc-spec {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 4px;
    min-height: 24px;
    margin-top: 8px;
    font-size: 13px;
    color: var(--muted);
    /* every item carries its separator, the one opening a line is clipped away */
    margin-left: -29px;
    clip-path: inset(-6px -6px -6px 29px);
}

.svc-spec > span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.svc-spec > span::before {
    content: "";
    display: inline-block;
    width: 1px;
    height: 12px;
    margin: 0 12px;
    background: var(--border);
}

.svc-spec .mono {
    color: var(--text);
}

.svc-head-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding-top: 4px;
}

.svc-head-actions .menu {
    min-width: 220px;
}

/* compact buttons for rows and inline tools */
.btn-sm {
    min-height: 30px;
    padding: 5px 10px;
    font-size: 13px;
    gap: 6px;
}

.btn-danger-ghost {
    background: transparent;
    color: var(--danger);
}

.btn-danger-ghost:hover {
    background: color-mix(in srgb, var(--danger) 8%, transparent);
}

.btn-danger-solid {
    background: var(--danger);
    color: #fff;
}

/* joined outline buttons, one action set (power) */
.btn-group {
    display: inline-flex;
}

.btn-group .btn {
    border-radius: 0;
    border-color: var(--border);
    background: var(--surface);
}

.btn-group .btn + .btn {
    margin-left: -1px;
}

.btn-group .btn:first-child {
    border-radius: var(--radius) 0 0 var(--radius);
}

.btn-group .btn:last-child {
    border-radius: 0 var(--radius) var(--radius) 0;
}

.btn-group .btn:hover {
    position: relative;
    border-color: var(--muted);
}

.btn-group .btn[hidden] + .btn,
.btn-group .btn:first-child[hidden] + .btn {
    border-radius: var(--radius) 0 0 var(--radius);
}

/* summary strip: one white bar, each cell draws its own hairline into the
   1px gap, so a wrapped row keeps clean lines */
.svc-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1px;
    margin-bottom: 22px;
    overflow: hidden;
}

.svc-strip.is-lead {
    grid-template-columns: minmax(250px, 1.25fr) repeat(auto-fit, minmax(170px, 1fr));
}

.svc-cell {
    min-width: 0;
    padding: 14px 20px 16px;
    background: var(--surface);
    box-shadow: 0 0 0 1px var(--border);
}

.svc-cell .k {
    font-size: 11px;
    font-weight: 600;
    line-height: 16.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.svc-cell .v {
    min-height: 24px;
    margin-top: 6px;
    font: 600 20px/24px var(--font-heading);
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.svc-cell .v small {
    font: 500 13px var(--font);
    color: var(--muted);
    letter-spacing: 0;
    margin-left: 4px;
}

.svc-cell .v.is-mono {
    display: flex;
    align-items: center;
    gap: 4px;
    font: 500 16px/24px var(--font-mono);
    letter-spacing: 0;
}

.svc-cell .s {
    min-height: 18px;
    margin-top: 4px;
    font-size: 12px;
    line-height: 18px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.svc-cell .svc-meter {
    margin-top: 10px;
}

.svc-tabbar {
    margin: 0 0 18px 0;
    overflow-x: auto;
    overflow-y: hidden;
}

.svc-tabbar .tab {
    border-top: 0;
    border-left: 0;
    border-right: 0;
    background: none;
    font: 500 14px/1.5 var(--font);
    white-space: nowrap;
    cursor: pointer;
}

.svc-tabbar .tab .count {
    margin-left: 6px;
    font-size: 12px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

/* key value columns inside a sheet row */
.svc-kv {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px 32px;
}

.svc-kv .span-2 {
    grid-column: span 2;
}

.svc-kv .k {
    font-size: 12px;
    font-weight: 500;
    line-height: 18px;
    color: var(--muted);
    margin-bottom: 3px;
}

.svc-kv .v {
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 24px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.svc-kv .v.mono {
    font-weight: 500;
    font-size: 13px;
}

.svc-kv .s {
    min-height: 18px;
    font-size: 12px;
    line-height: 18px;
    color: var(--muted);
    margin-top: 1px;
}

.svc-body-gap {
    margin-top: 18px;
}

.svc-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.svc-actions .spacer {
    flex: 1;
}

.svc-actions .help,
.svc-add .help {
    font-size: 12px;
    color: var(--muted);
}

.svc-inline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.svc-inline .input {
    width: auto;
}

/* hairline rows (attacks, recent entries) */
.svc-rows {
    border-top: 1px solid var(--border);
}

.svc-row {
    display: grid;
    grid-template-columns: 170px minmax(140px, 220px) minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    min-height: 40px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.svc-row .t {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

/* a long name in a hairline row clips instead of running into the next column */
.svc-row .svc-clip {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.svc-row.is-empty {
    display: flex;
    color: var(--muted);
}

.svc-empty {
    margin: 0;
    padding-top: 6px;
    font-size: 13px;
    color: var(--muted);
}

.svc-note {
    margin: 12px 0 0;
    font-size: 12px;
    color: var(--muted);
}

/* the sheet body sets a margin on every p, these keep their own */
.setting-body .svc-note {
    margin: 12px 0 0;
}

.setting-body .svc-empty {
    margin: 0;
}

.svc-sheet td.mono .chip {
    font-family: var(--font);
}

/* figure above a chart: value + unit, legend on the right, meter underneath */
.svc-figure {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 10px;
}

.svc-figure strong {
    font: 700 24px/1.2 var(--font-heading);
    letter-spacing: -0.018em;
    font-variant-numeric: tabular-nums;
}

.svc-figure > span {
    color: var(--muted);
    font-size: 13px;
}

.svc-figure .svc-legend {
    margin-left: auto;
}

.svc-chart-block {
    margin-top: 16px;
}

/* kvm live data: one line chart per figure, newest sample on the right */
.svc-live-chart {
    display: block;
    width: 100%;
    height: 110px;
    margin-top: 12px;
    border-bottom: 1px solid var(--border);
    overflow: visible;
}

.svc-live-chart polyline {
    fill: none;
    stroke-width: 1.5;
    stroke-linejoin: round;
}

.svc-live-chart .in {
    stroke: color-mix(in srgb, var(--text) 30%, var(--surface));
}

.svc-live-chart .out {
    stroke: color-mix(in srgb, var(--text) 62%, var(--surface));
}

/* kvm console: the noVNC canvas scales into this box */
.svc-vnc-bar {
    margin-top: 0;
    margin-bottom: 12px;
}

.svc-vnc {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: min(70vh, 640px);
    min-height: 320px;
    border: 1px solid #2E2F33;
    border-radius: var(--radius);
    background: #17181B;
    overflow: hidden;
}

.svc-vnc:fullscreen {
    height: 100vh;
    border: 0;
    border-radius: 0;
}

.svc-vnc > div {
    position: absolute;
    inset: 0;
}

.svc-vnc-idle {
    margin: 0;
    padding: 0 16px;
    font-size: 13px;
    color: #9C9CA2;
    text-align: center;
}

.setting-body .data-table td.end,
.setting-body .data-table th.end {
    text-align: right;
    white-space: nowrap;
}

.setting-body .data-table td .btn-sm + .btn-sm {
    margin-left: 4px;
}

.setting-body .data-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.setting-body .data-table td .chip + .chip {
    margin-left: 4px;
}

.svc-add {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 14px;
}

.svc-add .input {
    width: auto;
}

/* the danger row: red label, confirm input, the solid red button only in here */
.setting.svc-danger .setting-label h2 {
    color: var(--danger);
}

.svc-confirm {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.svc-confirm .input {
    width: 300px;
}

/* why a row action is locked, next to the disabled button */
.svc-why {
    margin-right: 10px;
    font-size: 12px;
    color: var(--muted);
}

.svc-check-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    align-items: center;
}

/* inline copy control next to a value */
.svc-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    vertical-align: middle;
}

.svc-copy:hover {
    color: var(--accent);
    background: var(--bg);
}

:root[data-theme="dark"] .svc-copy:hover {
    background: var(--raised);
}

/* status dot: the only round thing besides avatars */
.svc-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.chip-info {
    color: var(--info);
    border-color: color-mix(in srgb, var(--info) 50%, transparent);
    background: color-mix(in srgb, var(--info) 10%, transparent);
}

.chip-progress {
    color: var(--muted);
}

/* the console tone, dark in both modes (DESIGN.md console tokens) */
.svc-console {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 760px;
    min-height: 40px;
    padding: 0 6px 0 14px;
    border: 1px solid #2E2F33;
    border-radius: var(--radius);
    background: #17181B;
    color: #C9C9C9;
    font: 13px/1.4 var(--font-mono);
    font-variant-ligatures: none;
}

.svc-console code {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font: inherit;
}

.svc-console .p {
    color: #66666C;
    margin-right: 8px;
    user-select: none;
}

.svc-console .svc-copy {
    color: #9C9CA2;
}

.svc-console .svc-copy:hover {
    color: #E8551F;
    background: #2E2F33;
}

/* usage meter: 6px track, 3px radius, never a pill */
.svc-meter {
    height: 6px;
    border-radius: 3px;
    background: color-mix(in srgb, var(--text) 9%, transparent);
    overflow: hidden;
}

.svc-meter i {
    display: block;
    width: 0;
    height: 100%;
    background: var(--accent);
    transition: width 200ms ease;
}

.svc-meter.is-warn i {
    background: var(--warning);
}

/* daily traffic: out stacked on in, graphite so the orange stays scarce */
.svc-chart {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 120px;
    border-bottom: 1px solid var(--border);
}

.svc-chart .c {
    flex: 1;
    display: flex;
    flex-direction: column-reverse;
    min-width: 3px;
    height: 100%;
}

.svc-chart .c i {
    display: block;
    width: 100%;
}

.svc-chart .c .in,
.svc-legend i.in {
    background: color-mix(in srgb, var(--text) 24%, var(--surface));
}

.svc-chart .c .out,
.svc-legend i.out {
    background: color-mix(in srgb, var(--text) 50%, var(--surface));
}

.svc-chart .c .out {
    border-radius: 2px 2px 0 0;
}

.svc-chart .c.is-today i {
    opacity: 0.45;
}

.svc-chart.is-loading {
    background: color-mix(in srgb, var(--border) 45%, transparent);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    animation: sk-pulse 1.6s ease-in-out infinite;
}

.svc-chart-x {
    display: flex;
    justify-content: space-between;
    min-height: 16.5px;
    margin-top: 6px;
    font-size: 11px;
    line-height: 16.5px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.svc-legend {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--muted);
}

.svc-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.svc-legend i {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

/* switch: kantig like the rest, 4px radius instead of a pill */
.svc-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.svc-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.svc-switch .t {
    position: relative;
    width: 34px;
    height: 20px;
    flex-shrink: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--text) 8%, transparent);
    transition: background 120ms ease, border-color 120ms ease;
}

.svc-switch .t::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 2px;
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    transition: transform 120ms ease;
}

.svc-switch input:checked + .t {
    background: var(--text);
    border-color: var(--text);
}

.svc-switch input:checked + .t::after {
    transform: translateX(14px);
}

.svc-switch input:focus-visible + .t {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

.svc-switch input:disabled + .t {
    opacity: 0.55;
}

/* os picker tiles */
.svc-os-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}

.svc-os {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 58px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    text-align: left;
    color: var(--text);
    font: 600 13px/1.3 var(--font);
    cursor: pointer;
}

.svc-os small {
    font-weight: 400;
    font-size: 12px;
    color: var(--muted);
}

.svc-os:hover {
    border-color: var(--muted);
}

.svc-os.is-picked {
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1px var(--accent);
}

.svc-os.sk {
    border: 0;
    cursor: default;
}

/* warning banner in the page flow (iso mounted, rescue active) */
.svc-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 10px 14px;
    border: 1px solid color-mix(in srgb, var(--warning) 55%, transparent);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--warning) 9%, transparent);
    font-size: 13px;
}

.svc-banner .btn {
    margin-left: auto;
}

/* a server log file, console tone */
.svc-logview {
    max-height: 420px;
    overflow: auto;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #2E2F33;
    border-radius: var(--radius);
    background: #17181B;
    color: #C9C9C9;
    font: 12px/1.6 var(--font-mono);
    font-variant-ligatures: none;
    white-space: pre;
}

/* inline stand-in inside a real text element: the element keeps its own line
   box, so loading and loaded are the same height by construction */
.sk-bar {
    display: inline-block;
    vertical-align: middle;
    width: 80px;
    max-width: 100%;
    height: 0.72em;
    border-radius: var(--radius-sm);
    background: var(--border);
    animation: sk-pulse 1.6s ease-in-out infinite;
}

.sk-btn-sm {
    display: inline-block;
    vertical-align: middle;
    width: 64px;
    height: 30px;
    border-radius: var(--radius);
    background: var(--border);
    animation: sk-pulse 1.6s ease-in-out infinite;
}

.svc-empty.sk-empty {
    height: 25.5px;
}

/* below 1300px the label column costs the tables too much room, rows stack */
@media (max-width: 1300px) {
    .svc-sheet .setting {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }
}

@media (max-width: 1100px) {
    .svc-head {
        flex-direction: column;
    }

    .svc-head-actions {
        padding-top: 0;
    }
}

@media (max-width: 900px) {
    .svc-strip.is-lead {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    .svc-row {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
        gap: 10px;
    }

    .svc-row > span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .svc-row > :nth-child(3) {
        display: none;
    }
}

/* ticket thread: avatar and bubble per message, the reader's own side right,
   the team in accent, internal notes dashed in warning */
.tkt-thread {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tkt-msg {
    display: flex;
    gap: 12px;
    max-width: 820px;
    width: 100%;
}

.tkt-msg.is-own {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.tkt-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--muted);
    margin-top: 2px;
}

.tkt-msg.is-team .tkt-avatar {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
}

.tkt-bubble {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 10px 14px 12px;
}

.tkt-msg.is-own .tkt-bubble {
    background: var(--bg);
}

.tkt-msg.is-internal .tkt-bubble {
    border-style: dashed;
    border-color: var(--warning);
    background: color-mix(in srgb, var(--warning) 8%, var(--surface));
}

.tkt-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
    font-size: 12px;
    color: var(--muted);
}

.tkt-head strong {
    color: var(--text);
    font-size: 13px;
}

.tkt-head time {
    margin-left: auto;
    white-space: nowrap;
}

.tkt-body {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 14px;
    line-height: 1.55;
}

/* the chips under the subject and the reply composer */
.tkt-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 8px;
}

.tkt-composer {
    margin-top: 20px;
    border-top: 1px solid var(--border);
    padding-top: 18px;
}

.tkt-composer textarea {
    width: 100%;
    resize: vertical;
    min-height: 110px;
}

.tkt-composer-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.tkt-composer-bar .spacer {
    flex: 1;
}

.tkt-closed {
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    font-size: 13px;
    color: var(--muted);
}

.tkt-side .field + .field {
    margin-top: 10px;
}

/* the standalone order page: own frame, config left, sticky summary right */
.order-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.order-wrap {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
}

.order-top {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.order-top .order-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 60px;
}

.order-brand {
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

.order-brand .dot {
    color: var(--accent);
}

.order-brand img {
    max-height: 30px;
    display: block;
}

.order-top .spacer,
.order-foot .spacer {
    flex: 1;
}

.order-main {
    flex: 1;
    padding-top: 28px;
    padding-bottom: 48px;
}

.order-foot {
    border-top: 1px solid var(--border);
    padding: 18px 0;
}

.order-foot .order-wrap {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--muted);
    flex-wrap: wrap;
}

.order-foot a {
    color: var(--muted);
}

.order-foot a:hover {
    color: var(--text);
}

.order-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 20px;
    align-items: start;
}

.order-headline h1 {
    margin: 0 0 4px 0;
    font-size: 26px;
}

.order-headline p {
    margin: 0 0 18px 0;
}

.order-section {
    padding: 18px;
    margin-bottom: 14px;
}

.order-section h2 {
    margin: 0 0 12px 0;
    font-size: 15px;
}

.order-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.order-option {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--raised);
    cursor: pointer;
}

.order-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.order-option:hover {
    border-color: var(--muted);
}

.order-option.is-active {
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1px var(--accent);
}

.order-option-title {
    font-size: 13px;
    font-weight: 600;
}

.order-option-sub {
    font-size: 12px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.order-stepper-field {
    margin-bottom: 12px;
}

.order-stepper-field > label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 5px;
}

/* one joined control: minus, value, plus */
.order-stepper {
    display: inline-flex;
    align-items: stretch;
}

.order-stepper .btn {
    width: 40px;
    min-height: 40px;
    padding: 0;
    flex-shrink: 0;
    font-size: 16px;
    background: var(--raised);
}

.order-stepper .btn:first-child {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.order-stepper .btn:last-child {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.order-stepper .input {
    width: 76px;
    margin: 0 -1px;
    border-radius: 0;
    text-align: center;
    font-variant-numeric: tabular-nums;
    -moz-appearance: textfield;
}

.order-stepper .input::-webkit-outer-spin-button,
.order-stepper .input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.order-stepper .input:focus {
    position: relative;
    z-index: 1;
}

.order-stepper-field .help {
    margin-top: 8px;
}

.order-summary {
    position: sticky;
    top: 20px;
}

.order-summary-card {
    padding: 18px;
}

.order-summary-card h2 {
    margin: 0 0 10px 0;
    font-size: 15px;
}

.order-specs {
    list-style: none;
    margin: 0 0 12px 0;
    padding: 0;
    font-size: 12px;
    color: var(--muted);
}

.order-specs li {
    padding: 3px 0;
    border-bottom: 1px solid var(--border);
}

.order-specs li:last-child {
    border-bottom: 0;
}

.order-line {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 3px 0;
    color: var(--muted);
}

.order-line .tnum {
    color: var(--text);
}

.order-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-top: 1px solid var(--border);
    margin-top: 8px;
    padding-top: 10px;
    font-weight: 600;
}

.order-total-row strong {
    font-size: 20px;
    font-family: var(--font-heading);
}

.order-total-row strong.is-quoting {
    opacity: 0.4;
}

.order-tax-note {
    font-size: 12px;
    margin: 6px 0 0 0;
}

.order-pay {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.order-tos {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-size: 13px;
    margin: 14px 0 0 0;
}

.order-buy {
    width: 100%;
    margin-top: 12px;
}

.order-auth {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    text-align: center;
}

.order-register-link {
    font-size: 13px;
}

.order-missing,
.order-status {
    max-width: 560px;
    margin: 40px auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.order-missing h1,
.order-status h1 {
    margin: 0;
    font-size: 22px;
}

@media (max-width: 860px) {
    .order-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .order-summary {
        position: static;
    }
}

/* website stats */
.stats-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 120px;
    margin-top: 16px;
}

.stats-bar {
    flex: 1;
    display: flex;
    align-items: flex-end;
    height: 100%;
    min-width: 0;
}

.stats-bar-fill {
    width: 100%;
    background: var(--accent);
    border-radius: 2px 2px 0 0;
    opacity: 0.85;
}

.stats-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.stats-row:last-child {
    border-bottom: none;
}

.stats-row > .mono {
    flex: 0 0 40%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}

.stats-row-track {
    flex: 1;
    height: 8px;
    background: var(--bg);
    border-radius: 4px;
    overflow: hidden;
}

.stats-row-fill {
    display: block;
    height: 100%;
    background: var(--accent);
    opacity: 0.7;
    border-radius: 4px;
}

.stats-row-count {
    flex: 0 0 56px;
    text-align: right;
}

.stats-row-count.money {
    flex-basis: 110px;
}

.stats-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 8px 28px;
}

.stats-facts {
    margin-top: 18px;
    font-size: 13px;
}

.stats-bars + h3 {
    margin-top: 20px;
}

/* theme editor for child interfaces, ported from the hostrivopanel design page */
/* theme editor: files, code, preview side by side, full height */
.design-grid {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr) minmax(360px, 42%);
    gap: 16px;
    height: calc(100vh - 210px);
    min-height: 480px;
}

.design-files {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.design-files-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}

.micro-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.design-tree {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* a long list must scroll, never squeeze the rows to fit */
.design-tree > * {
    flex-shrink: 0;
}

.design-file {
    text-align: left;
    padding: 6px 8px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text);
    font-size: 12px;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.design-file:hover {
    background: var(--bg);
}

:root[data-theme="dark"] .design-file:hover {
    background: var(--raised);
}

.design-file.is-active {
    background: var(--bg);
    color: var(--accent);
}

:root[data-theme="dark"] .design-file.is-active {
    background: var(--raised);
}

.design-files-foot {
    padding: 8px 12px;
    border-top: 1px solid var(--border);
    font-size: 11px;
}

.design-editor {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
}

.design-editor-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
}

.design-editor-head .spacer {
    flex: 1;
}

/* signal moved on under a copied file: review bar above the editor */
.design-signal-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    color: var(--warning);
    background: color-mix(in srgb, var(--warning) 8%, transparent);
}

.design-signal-bar > span:first-child {
    flex: 1;
    min-width: 140px;
}

.design-signal-bar .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.design-update-chip {
    float: right;
    margin-left: 8px;
    pointer-events: none;
    /* compact enough to sit inside the row line without growing it */
    height: 14px;
    padding: 0 5px;
    font-size: 11px;
    line-height: 1;
}

.design-editor-body {
    flex: 1;
    min-height: 0;
    position: relative;
}

.design-editor-body .CodeMirror {
    position: absolute;
    inset: 0;
    height: 100%;
    font-family: var(--font-mono);
    font-size: 13px;
    background: var(--surface);
    color: var(--text);
}

:root[data-theme="dark"] .design-editor-body .CodeMirror {
    background: var(--surface);
}

:root[data-theme="dark"] .CodeMirror-gutters {
    background: var(--raised);
    border-color: var(--border);
}

:root[data-theme="dark"] .CodeMirror-linenumber {
    color: var(--muted);
}

:root[data-theme="dark"] .CodeMirror-cursor {
    border-color: var(--text);
}

.design-editor-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.design-help {
    max-width: 440px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.design-help p {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--muted);
}

.design-help .btn {
    margin-top: 2px;
}

.design-preview {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.design-preview-head {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
}

.design-preview-head .spacer {
    flex: 1;
}

.design-preview-head .segment {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    min-width: 30px;
    padding: 4px 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
}

.design-preview-head .segment.is-active {
    color: var(--text);
    background: var(--bg);
}

:root[data-theme="dark"] .design-preview-head .segment.is-active {
    background: var(--raised);
}

.design-preview-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    background: var(--bg);
    display: flex;
    justify-content: center;
}

.design-preview-body iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}

@media (max-width: 1200px) {
    .design-grid {
        grid-template-columns: 200px minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
        height: auto;
    }

    /* height auto above lets the card grow with the file list, the tree
       scrolls inside a capped card instead */
    .design-files {
        max-height: 480px;
    }

    .design-editor {
        min-height: 360px;
    }

    .design-preview {
        grid-column: 1 / -1;
        height: 480px;
    }
}

@media (max-width: 720px) {
    .design-grid {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none;
    }

    .design-files {
        max-height: 360px;
    }
}
/* dashed starter action at the end of the theme file tree */
.design-seed {
    margin-top: 4px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    cursor: pointer;
}

.design-seed:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* codemirror dark: the default theme is made for a white background */
:root[data-theme="dark"] .design-editor-body .CodeMirror-activeline-background {
    background: rgba(255, 255, 255, 0.05);
}

:root[data-theme="dark"] .design-editor-body .CodeMirror-selected {
    background: rgba(110, 168, 254, 0.2);
}

:root[data-theme="dark"] .design-editor-body .CodeMirror-matchingbracket {
    color: #98c379 !important;
    background: rgba(152, 195, 121, 0.15);
}

:root[data-theme="dark"] .cm-s-default .cm-comment { color: #7f848e; }
:root[data-theme="dark"] .cm-s-default .cm-string,
:root[data-theme="dark"] .cm-s-default .cm-string-2 { color: #98c379; }
:root[data-theme="dark"] .cm-s-default .cm-number,
:root[data-theme="dark"] .cm-s-default .cm-atom,
:root[data-theme="dark"] .cm-s-default .cm-qualifier { color: #d19a66; }
:root[data-theme="dark"] .cm-s-default .cm-keyword { color: #c678dd; }
:root[data-theme="dark"] .cm-s-default .cm-def,
:root[data-theme="dark"] .cm-s-default .cm-property,
:root[data-theme="dark"] .cm-s-default .cm-link { color: #61afef; }
:root[data-theme="dark"] .cm-s-default .cm-variable { color: var(--text); }
:root[data-theme="dark"] .cm-s-default .cm-variable-2 { color: #e06c75; }
:root[data-theme="dark"] .cm-s-default .cm-variable-3,
:root[data-theme="dark"] .cm-s-default .cm-type,
:root[data-theme="dark"] .cm-s-default .cm-builtin,
:root[data-theme="dark"] .cm-s-default .cm-operator { color: #56b6c2; }
:root[data-theme="dark"] .cm-s-default .cm-tag { color: #e06c75; }
:root[data-theme="dark"] .cm-s-default .cm-attribute { color: #d19a66; }
:root[data-theme="dark"] .cm-s-default .cm-meta,
:root[data-theme="dark"] .cm-s-default .cm-bracket { color: var(--muted); }
:root[data-theme="dark"] .cm-s-default .cm-error { color: #e06c75; background: transparent; }

/* signal sync in the file tree: divider label and ghost rows for missing files */
.design-tree-label {
    padding: 10px 8px 4px 8px;
}

.design-ghost {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
}

.design-ghost svg {
    flex-shrink: 0;
    opacity: 0;
}

.design-ghost:hover {
    color: var(--accent);
}

.design-ghost:hover svg {
    opacity: 1;
}

.hx-modal-wide {
    max-width: 780px;
}

/* diff modal: - signal, + this theme, unchanged runs collapse to ... */
.diff-view {
    max-height: 55vh;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 0;
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.diff-line {
    padding: 0 12px;
    white-space: pre;
}

.diff-add {
    background: rgba(63, 163, 99, 0.12);
    color: var(--text);
}

.diff-del {
    background: rgba(204, 46, 46, 0.1);
    color: var(--muted);
    text-decoration: line-through;
}

.diff-ctx {
    color: var(--muted);
}

.diff-gap {
    padding: 2px 12px;
    color: var(--muted);
    background: var(--bg);
}

/* strings browser: search on top, key plus one column per language */
.strings-list {
    max-height: 50vh;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin: 12px 0 16px 0;
}

.strings-row {
    display: grid;
    grid-template-columns: 220px 1fr 1fr 30px;
    gap: 12px;
    padding: 7px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    align-items: start;
}

.strings-row:last-child {
    border-bottom: 0;
}

.strings-key {
    text-align: left;
    border: 0;
    background: transparent;
    color: var(--accent);
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    overflow-wrap: anywhere;
}

.strings-text {
    color: var(--text);
}

.strings-add {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--muted);
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.strings-add:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.strings-add.is-added {
    color: var(--success);
    border-color: transparent;
    cursor: default;
}

/* versions menu: switch row with rename and delete at the right */
.menu-row {
    display: flex;
    align-items: center;
}

.menu-row .menu-item {
    flex: 1;
    min-width: 0;
}

.menu-act {
    border: 0;
    background: transparent;
    color: var(--muted);
    padding: 6px;
    margin-right: 4px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
}

.menu-act:hover {
    color: var(--accent);
    background: var(--bg);
}

:root[data-theme="dark"] .menu-act:hover {
    background: var(--raised);
}

.menu-act.is-danger:hover {
    color: var(--danger);
}

#versions-label {
    display: inline-block;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

/* brand modal: token rows on top, the asset list below */
.token-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.token-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.token-row label {
    width: 110px;
    font-size: 13px;
    color: var(--muted);
}

.token-row select {
    max-width: 280px;
}

.input-color {
    width: 52px;
    height: 34px;
    padding: 2px;
    cursor: pointer;
}

.asset-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.brand-status {
    font-size: 12px;
    color: var(--muted);
}

.brand-status.is-error {
    color: var(--danger);
}

.asset-list {
    max-height: 40vh;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.asset-empty {
    padding: 14px;
    font-size: 13px;
}

.asset-row {
    display: grid;
    grid-template-columns: 36px 1fr auto auto auto;
    gap: 10px;
    align-items: center;
    padding: 6px 10px;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
}

.asset-row:last-child {
    border-bottom: 0;
}

.asset-thumb {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.asset-thumb img {
    max-width: 100%;
    max-height: 100%;
}

.asset-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* asset rows in the file tree: insert on click, copy at the right */
.design-asset {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 2px 2px 2px 8px;
    cursor: default;
}

.design-asset-name {
    flex: 1;
    min-width: 0;
    text-align: left;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    cursor: pointer;
    padding: 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.design-asset-name:hover {
    color: var(--accent);
}

/* staff viewing as a customer: a bar above everything */
.hx-impersonation {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 8px 16px;
    background: var(--accent);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.hx-impersonation .btn {
    min-height: 0;
    padding: 4px 10px;
    font-size: 12px;
}

/* the ticket thread with the customer context beside it */
.tkt-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 18px;
    align-items: start;
}

.tkt-side {
    padding: 16px 18px;
    display: grid;
    gap: 16px;
}

.tkt-side-block .micro-label {
    margin-bottom: 8px;
}

.tkt-side-list {
    display: grid;
    gap: 4px;
}

.tkt-side-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    color: var(--text);
    text-decoration: none;
    padding: 3px 0;
}

.tkt-side-row span {
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tkt-side-row strong {
    white-space: nowrap;
}

a.tkt-side-row:hover span {
    color: var(--accent);
}

.tkt-canned-list {
    display: grid;
    gap: 6px;
    max-height: 260px;
    overflow-y: auto;
}

@media (max-width: 900px) {
    .tkt-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* the inbox bell in the topbar */
.notify-button {
    position: relative;
}

.notify-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.notify-menu {
    min-width: 340px;
    max-width: 380px;
}

.notify-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.notify-read {
    min-height: 0;
    padding: 3px 8px;
    font-size: 12px;
}

.notify-list {
    max-height: 360px;
    overflow-y: auto;
}

.notify-item {
    display: block;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
}

.notify-item:hover {
    background: var(--bg);
}

.notify-item.is-unread .notify-text {
    font-weight: 600;
}

.notify-item.is-unread .notify-text::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 7px;
    border-radius: 50%;
    background: var(--accent);
    vertical-align: middle;
}

.notify-text {
    font-size: 13px;
    line-height: 1.4;
}

.notify-time {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.notify-empty {
    padding: 14px 10px;
    color: var(--muted);
    font-size: 13px;
}

/* notification settings: one row per event, a checkbox per channel */
.notify-matrix {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.notify-matrix th {
    padding: 6px 8px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
}

.notify-matrix th:first-child {
    text-align: left;
}

.notify-matrix td {
    padding: 7px 8px;
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.notify-matrix td:first-child {
    text-align: left;
}

.notify-matrix tr.is-section td {
    padding-top: 14px;
    border-bottom: 0;
    text-align: left;
}

.notify-matrix tbody tr:last-child td {
    border-bottom: 0;
}

/* api keys (settings) */
.api-scopes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px 16px;
    margin-top: 6px;
}

.api-scopes label {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-size: 13px;
    cursor: pointer;
}

.api-scopes input {
    margin-top: 3px;
}

.api-scopes .micro {
    display: block;
    color: var(--muted);
    font-size: 11px;
}

.api-scopes-head {
    grid-column: 1 / -1;
    margin-top: 8px;
}

.list-row .list-sub {
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.step.step-wide {
    max-width: none;
}

/* api docs (public reference view) */
.docs {
    display: grid;
    gap: 18px;
    padding: 24px 0 48px;
}

.docs-head h1 {
    font-family: var(--font-heading);
    font-size: 26px;
    margin: 0 0 6px;
}

.docs-head p {
    color: var(--muted);
    max-width: 640px;
    margin: 0;
}

.docs .skeleton,
.docs-content {
    display: grid;
    gap: 18px;
}

.docs-card {
    padding: 20px 22px;
}

.docs-card h2 {
    font-size: 16px;
    margin: 0 0 12px;
}

.docs-card > .muted {
    margin: 0 0 12px;
}

.docs-kv {
    margin-bottom: 14px;
}

.docs-code {
    margin: 6px 0 12px;
    padding: 12px 14px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    font-size: 12px;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre;
}

.docs-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.docs-tags a {
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
}

.docs-tags a:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.docs-groups {
    display: grid;
    gap: 18px;
}

.docs-endpoint {
    border-top: 1px solid var(--border);
}

.docs-endpoint:first-of-type {
    border-top: 0;
}

.docs-endpoint summary {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    cursor: pointer;
    list-style: none;
}

.docs-endpoint summary::-webkit-details-marker {
    display: none;
}

.docs-path {
    font-size: 13px;
    word-break: break-all;
}

.docs-summary {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
}

.docs-body {
    padding: 2px 0 14px 70px;
    font-size: 13px;
}

.docs-body .muted {
    margin: 0;
}

.api-method {
    display: inline-block;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 3px 0;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    color: var(--muted);
}

.api-method-get {
    color: var(--success);
    border-color: rgba(63, 163, 99, 0.5);
}

.api-method-post {
    color: var(--accent);
    border-color: rgba(193, 62, 14, 0.4);
}

@media (max-width: 720px) {
    .docs-endpoint summary {
        grid-template-columns: 58px minmax(0, 1fr);
    }

    .docs-endpoint .docs-scope {
        grid-column: 2;
        justify-self: start;
    }

    .docs-body {
        padding-left: 0;
    }
}


/* coupons: the code field on the order page */
.order-coupon {
    margin-top: 16px;
}

.order-coupon-row {
    display: flex;
    gap: 8px;
}

.order-coupon-row .input {
    flex: 1;
    min-width: 0;
}

.order-coupon .help.is-error {
    color: var(--danger);
}

.order-line-discount {
    color: var(--success);
}

/* the platform maintenance notice, same bar as the impersonation banner */
.hx-maintenance {
    background: #b7791f;
}

/* bank transfer instructions under the payment alert */
.bank-box {
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.bank-box strong {
    display: block;
    margin-bottom: 8px;
}

.bank-box .muted {
    margin: 10px 0 0;
    font-size: 13px;
}

/* services list: drag handle, favorite star and pick box in the first column */
.data-table th.svc-pick,
.data-table td.svc-pick {
    width: 1%;
    white-space: nowrap;
}

.svc-pick > * {
    vertical-align: middle;
}

.svc-pick .check {
    display: inline-flex;
    margin-left: 6px;
}

.svc-grip,
.svc-star {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    background: none;
    color: var(--muted);
    cursor: pointer;
}

.svc-grip {
    cursor: grab;
}

.svc-grip:hover,
.svc-star:hover {
    color: var(--text);
    background: var(--bg);
}

.svc-star.is-on {
    color: var(--warning);
}

.data-table tr.is-dragging td {
    opacity: 0.45;
}

.data-table tr.is-drop-before td {
    box-shadow: inset 0 2px 0 var(--accent);
}

.data-table tr.is-drop-after td {
    box-shadow: inset 0 -2px 0 var(--accent);
}

/* offers list: category and product type as group rows, drag handle in front */
.data-table .offer-grip-cell {
    width: 36px;
    padding-right: 0;
}

.data-table tr.offer-group-row td {
    padding-top: 18px;
    background: var(--bg);
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.data-table tr.offer-type-row td {
    padding-top: 10px;
    padding-bottom: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.offer-group-count {
    margin-left: 8px;
    font-family: var(--font);
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
}

/* picked services: count and the power actions above the table */
.svc-bulk {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    font-size: 13px;
}

.svc-bulk .spacer {
    flex: 1;
}

/* backups: lock state and the automatic deletion date under the created date */
.svc-backup-del {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--muted);
}

.svc-backup-del.is-soon {
    color: var(--danger);
}
