:root {
    color-scheme: light;
    --tm-bg: #f3f6f9;
    --tm-bg-soft: #eaf0f5;
    --tm-surface: #ffffff;
    --tm-surface-raised: #f2f6fa;
    --tm-surface-input: #ffffff;
    --tm-surface-translucent: rgba(255, 255, 255, .94);
    --tm-sidebar-bg: rgba(248, 250, 252, .97);
    --tm-topbar-bg: rgba(255, 255, 255, .86);
    --tm-control-bg: rgba(255, 255, 255, .74);
    --tm-border: #d3dde7;
    --tm-border-soft: #e3e9ef;
    --tm-text: #182433;
    --tm-text-soft: #475569;
    --tm-muted: #6b7b8d;
    --tm-brand: #1c98d6;
    --tm-brand-strong: #0875b7;
    --tm-brand-soft: rgba(28, 152, 214, .11);
    --tm-link: #096fae;
    --tm-danger: #c24141;
    --tm-danger-soft: #fff1f1;
    --tm-danger-text: #9f3030;
    --tm-warning: #b7791f;
    --tm-warning-soft: #fff8e8;
    --tm-warning-text: #7a4f11;
    --tm-success: #15956f;
    --tm-success-soft: rgba(21, 149, 111, .09);
    --tm-radius: 16px;
    --tm-shadow: 0 24px 64px rgba(39, 60, 82, .14);
    --tm-card-shadow: 0 14px 36px rgba(39, 60, 82, .08);
    --tm-body-glow: rgba(28, 152, 214, .10);
    --tm-body-gradient-start: #f8fbfd;
    --tm-auth-card-bg: rgba(255, 255, 255, .96);
    --tm-nav-hover: rgba(24, 36, 51, .045);
    --tm-nav-active-text: #086fae;
    --tm-input-hover: #aebdca;
    --tm-input-focus-bg: #ffffff;
    --tm-secondary-bg: #f5f8fb;
    --tm-secondary-hover: #eaf0f5;
    --tm-pill-bg: rgba(255, 255, 255, .74);
    --tm-card-bg: rgba(255, 255, 255, .90);
    --tm-card-primary-bg: linear-gradient(145deg, rgba(224, 243, 252, .95), rgba(255, 255, 255, .98));
    --tm-card-eyebrow: #0875b7;
    --tm-card-stack-gap: .7rem;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --tm-bg: #070b14;
    --tm-bg-soft: #0b1220;
    --tm-surface: #111827;
    --tm-surface-raised: #172033;
    --tm-surface-input: #0a1120;
    --tm-surface-translucent: rgba(17, 24, 39, .94);
    --tm-sidebar-bg: rgba(9, 15, 27, .96);
    --tm-topbar-bg: rgba(7, 11, 20, .78);
    --tm-control-bg: rgba(7, 11, 20, .52);
    --tm-border: #263247;
    --tm-border-soft: #1b2638;
    --tm-text: #f8fafc;
    --tm-text-soft: #cbd5e1;
    --tm-muted: #8d9aad;
    --tm-brand: #35a8e5;
    --tm-brand-strong: #168fce;
    --tm-brand-soft: rgba(53, 168, 229, .13);
    --tm-link: #a9d9f3;
    --tm-danger: #f87171;
    --tm-danger-soft: rgba(127, 29, 29, .28);
    --tm-danger-text: #fecaca;
    --tm-warning: #f0b34a;
    --tm-warning-soft: rgba(120, 74, 16, .30);
    --tm-warning-text: #fde8b0;
    --tm-success: #34d399;
    --tm-success-soft: rgba(6, 78, 59, .2);
    --tm-shadow: 0 24px 64px rgba(0, 0, 0, .34);
    --tm-card-shadow: 0 14px 36px rgba(0, 0, 0, .14);
    --tm-body-glow: rgba(53, 168, 229, .14);
    --tm-body-gradient-start: #09101c;
    --tm-auth-card-bg: rgba(17, 24, 39, .94);
    --tm-nav-hover: rgba(255, 255, 255, .035);
    --tm-nav-active-text: #dceaff;
    --tm-input-hover: #34435d;
    --tm-input-focus-bg: #0c1526;
    --tm-secondary-bg: #101827;
    --tm-secondary-hover: #182236;
    --tm-pill-bg: rgba(17, 24, 39, .72);
    --tm-card-bg: rgba(17, 24, 39, .84);
    --tm-card-primary-bg: linear-gradient(145deg, rgba(31, 56, 98, .72), rgba(17, 24, 39, .92));
    --tm-card-eyebrow: #a9d9f3;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--tm-bg); }
body.tm-body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 15% 10%, var(--tm-body-glow), transparent 28rem),
        linear-gradient(180deg, var(--tm-body-gradient-start) 0%, var(--tm-bg) 100%);
    color: var(--tm-text);
    font-family: "Instrument Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    transition: background-color .18s ease, color .18s ease;
}
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }

.tm-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.tm-kicker {
    display: block;
    margin-bottom: .45rem;
    color: var(--tm-brand-strong);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.tm-brand { display: inline-flex; align-items: center; gap: .78rem; text-decoration: none; min-width: 0; }
.tm-brand-logo-stack {
    position: relative;
    display: block;
    width: 7.1rem;
    aspect-ratio: 2517 / 1179;
    flex: 0 0 auto;
}
.tm-brand-logo {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.tm-brand-logo-dark { display: none; }
:root[data-theme="dark"] .tm-brand-logo-light { display: none; }
:root[data-theme="dark"] .tm-brand-logo-dark { display: block; }
.tm-brand-copy { display: grid; min-width: 0; }
.tm-brand-copy strong { color: var(--tm-text); font-size: .82rem; line-height: 1.15; }
.tm-brand-copy small { margin-top: .2rem; color: var(--tm-muted); font-size: .68rem; }

.tm-display-controls { display: inline-flex; align-items: center; gap: .45rem; }
.tm-locale-switcher {
    display: inline-flex;
    gap: .2rem;
    padding: .2rem;
    border: 1px solid var(--tm-border-soft);
    border-radius: .65rem;
    background: var(--tm-control-bg);
}
.tm-locale-switcher form { margin: 0; }
.tm-locale-button {
    min-width: 2.25rem;
    border: 0;
    border-radius: .45rem;
    background: transparent;
    color: var(--tm-muted);
    padding: .42rem .5rem;
    font-size: .7rem;
    font-weight: 750;
    letter-spacing: .06em;
}
.tm-locale-button:hover, .tm-locale-button.is-active { background: var(--tm-surface-raised); color: var(--tm-text); }
.tm-theme-toggle {
    display: inline-grid;
    width: 2.45rem;
    height: 2.45rem;
    place-items: center;
    border: 1px solid var(--tm-border-soft);
    border-radius: .65rem;
    background: var(--tm-control-bg);
    color: var(--tm-muted);
    padding: 0;
}
.tm-theme-toggle:hover { background: var(--tm-surface-raised); color: var(--tm-text); }
.tm-theme-icon { font-size: 1rem; line-height: 1; }
:root[data-theme="light"] .tm-theme-icon-sun { display: none; }
:root[data-theme="dark"] .tm-theme-icon-moon { display: none; }

.tm-auth-shell { display: grid; min-height: 100vh; place-items: center; padding: 2rem 1.25rem; }
.tm-auth-card {
    width: min(100%, 31rem);
    overflow: hidden;
    border: 1px solid var(--tm-border);
    border-radius: 1.4rem;
    background: var(--tm-auth-card-bg);
    box-shadow: var(--tm-shadow);
    backdrop-filter: blur(18px);
}
.tm-auth-header { padding: 1.7rem 1.8rem 1.2rem; border-bottom: 1px solid var(--tm-border-soft); }
.tm-brand-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.tm-auth-heading { margin-top: 2.2rem; }
.tm-auth-heading h1 { margin: 0; font-size: clamp(1.7rem, 5vw, 2rem); line-height: 1.15; letter-spacing: -.025em; }
.tm-portal-auth-body .tm-auth-heading h1 { overflow-wrap: anywhere; }
.tm-auth-heading p { margin: .7rem 0 0; color: var(--tm-text-soft); font-size: .93rem; line-height: 1.6; }
.tm-auth-content { padding: 1.65rem 1.8rem 1.8rem; }
.tm-auth-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .45rem;
    border-top: 1px solid var(--tm-border-soft);
    padding: 1rem 1.5rem;
    color: var(--tm-muted);
    font-size: .72rem;
    text-align: center;
}
.tm-auth-secondary-action { margin-top: 1.3rem; text-align: center; }

.tm-legal-footer-links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .35rem 0; }
.tm-legal-footer-links a { padding: .3rem .7rem; color: var(--tm-text-soft); font-size: .82rem; text-decoration: none; }
.tm-legal-footer-links a + a { border-inline-start: 1px solid var(--tm-border); }
.tm-legal-footer-links a:first-child { padding-inline-start: 0; }
.tm-legal-footer-links a:last-child { padding-inline-end: 0; }
.tm-legal-footer-links a:hover,
.tm-legal-footer-links a:focus-visible,
.tm-legal-footer-links a[aria-current="page"] { color: var(--tm-link); text-decoration: underline; }
.tm-legal-footer-links a[target="_blank"]::after { content: " ↗"; }
.tm-auth-legal-links { flex-basis: 100%; margin-top: .35rem; }
.tm-legal-fingerprint { overflow-wrap: anywhere; }
.tm-auth-secondary-action a, .tm-field-label-row a { color: var(--tm-link); font-size: .8rem; text-decoration: none; }
.tm-auth-secondary-action a:hover, .tm-field-label-row a:hover { color: var(--tm-text); text-decoration: underline; }

.tm-form { display: grid; gap: 1.15rem; }
.tm-field { display: grid; gap: .48rem; }
.tm-field label { color: var(--tm-text-soft); font-size: .82rem; font-weight: 650; }
.tm-field-label-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.tm-field input {
    width: 100%;
    border: 1px solid var(--tm-border);
    border-radius: .72rem;
    outline: none;
    background: var(--tm-surface-input);
    color: var(--tm-text);
    padding: .78rem .9rem;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.tm-field input:hover { border-color: var(--tm-input-hover); }
.tm-field input:focus { border-color: var(--tm-brand); box-shadow: 0 0 0 3px var(--tm-brand-soft); background: var(--tm-input-focus-bg); }

.tm-button {
    display: inline-flex;
    min-height: 2.65rem;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: .72rem;
    padding: .68rem 1rem;
    font-size: .84rem;
    font-weight: 750;
    text-decoration: none;
    transition: transform .12s ease, background .15s ease, border-color .15s ease;
}
.tm-button:active { transform: translateY(1px); }
.tm-button-primary { background: linear-gradient(135deg, var(--tm-brand), var(--tm-brand-strong)); color: white; box-shadow: 0 10px 24px var(--tm-brand-soft); }
.tm-button-primary:hover { filter: brightness(1.06); }
.tm-button-secondary { border-color: var(--tm-border); background: var(--tm-secondary-bg); color: var(--tm-text-soft); }
.tm-button-secondary:hover { background: var(--tm-secondary-hover); color: var(--tm-text); }
.tm-button-block { width: 100%; }

.tm-alert { margin-bottom: 1.1rem; border: 1px solid var(--tm-border); border-radius: .72rem; background: var(--tm-control-bg); color: var(--tm-text-soft); padding: .82rem .9rem; font-size: .82rem; line-height: 1.5; }
.tm-alert-error { border-color: color-mix(in srgb, var(--tm-danger) 38%, transparent); background: var(--tm-danger-soft); color: var(--tm-danger-text); }
.tm-alert-warning { border-color: color-mix(in srgb, var(--tm-warning) 42%, transparent); background: var(--tm-warning-soft); color: var(--tm-warning-text); }

.tm-admin-shell { display: grid; min-height: 100vh; grid-template-columns: 15.5rem minmax(0, 1fr); }
.tm-sidebar { display: flex; min-height: 100vh; flex-direction: column; border-right: 1px solid var(--tm-border-soft); background: var(--tm-sidebar-bg); }
.tm-sidebar-brand { padding: 1.15rem 1.05rem; border-bottom: 1px solid var(--tm-border-soft); }
.tm-sidebar .tm-brand-logo-stack { width: 6.6rem; }
.tm-nav { display: grid; gap: .35rem; padding: 1.25rem .85rem; }
.tm-nav-label { padding: 0 .65rem .4rem; color: var(--tm-muted); font-size: .66rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.tm-nav-link { display: flex; align-items: center; gap: .7rem; border: 1px solid transparent; border-radius: .7rem; color: var(--tm-text-soft); padding: .68rem .72rem; font-size: .84rem; text-decoration: none; }
.tm-nav-link:hover { background: var(--tm-nav-hover); color: var(--tm-text); }
.tm-nav-link.is-active { border-color: var(--tm-brand-soft); background: var(--tm-brand-soft); color: var(--tm-nav-active-text); }
.tm-nav-icon { width: 1.2rem; color: var(--tm-brand); text-align: center; }
.tm-nav-attention-badge {
    margin-left: auto;
    display: inline-flex;
    min-width: 1.42rem;
    height: 1.42rem;
    align-items: center;
    justify-content: center;
    border: 1px solid color-mix(in srgb, var(--tm-danger) 78%, transparent);
    border-radius: 999px;
    background: var(--tm-danger);
    color: #fff;
    padding: 0 .38rem;
    font-size: .7rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--tm-danger) 12%, transparent);
}
.tm-sidebar-footer { margin-top: auto; display: grid; gap: .7rem; border-top: 1px solid var(--tm-border-soft); padding: 1rem 1.2rem 1.25rem; color: var(--tm-muted); font-size: .7rem; line-height: 1.45; }
.tm-nav-badge-links { position: relative; }
.tm-nav-badge-links .tm-nav-link { padding-inline-end: 3.1rem; }
.tm-nav-badge-links > .tm-nav-attention-badge { position: absolute; inset-inline-end: .72rem; top: 50%; transform: translateY(-50%); text-decoration: none; }
.tm-nav-badge-links > .tm-nav-attention-badge:hover { text-decoration: underline; }
.tm-environment-badge { width: max-content; border: 1px solid color-mix(in srgb, var(--tm-success) 28%, transparent); border-radius: 999px; background: var(--tm-success-soft); color: var(--tm-success); padding: .3rem .55rem; font-size: .66rem; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }

.tm-admin-content { min-width: 0; }
.tm-topbar { display: flex; min-height: 4.75rem; align-items: center; justify-content: space-between; gap: 1.5rem; border-bottom: 1px solid var(--tm-border-soft); background: var(--tm-topbar-bg); padding: .9rem 1.5rem; backdrop-filter: blur(14px); }
.tm-topbar > div:first-child strong { display: block; font-size: .98rem; }
.tm-topbar-actions { display: flex; align-items: center; gap: .75rem; }
.tm-user-summary { display: grid; padding: 0 .25rem; }
.tm-user-summary span { color: var(--tm-muted); font-size: .66rem; }
.tm-user-summary strong { margin-top: .12rem; font-size: .8rem; }
.tm-main { width: min(100%, 82rem); margin: 0 auto; padding: 2rem; }
.tm-page-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.6rem; }
.tm-page-heading h1 { margin: 0; font-size: clamp(1.65rem, 3vw, 2.1rem); letter-spacing: -.025em; }
.tm-page-heading p { max-width: none; margin: .65rem 0 0; color: var(--tm-text-soft); line-height: 1.6; }
/* Customer index: refresh action aligned with page title; count directly below. */
.tm-customer-index-heading-actions { display: flex; flex-direction: column; align-items: flex-end; justify-content: flex-start; gap: .45rem; flex: 0 0 auto; align-self: flex-start; margin-top: 1.45rem; }
.tm-customer-index-heading-actions > .tm-button { white-space: nowrap; }
@media (max-width: 640px) {
    .tm-customer-index-heading-actions { align-items: flex-start; margin-top: 0; }
}

.tm-status-pill { display: inline-flex; align-items: center; gap: .45rem; border: 1px solid var(--tm-border); border-radius: 999px; background: var(--tm-pill-bg); color: var(--tm-text-soft); padding: .48rem .7rem; font-size: .72rem; white-space: nowrap; }
.tm-status-pill span { width: .48rem; height: .48rem; border-radius: 999px; background: var(--tm-success); box-shadow: 0 0 0 4px var(--tm-success-soft); }
.tm-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(18rem, .75fr); gap: 1.2rem; }
.tm-card { border: 1px solid var(--tm-border); border-radius: var(--tm-radius); background: var(--tm-card-bg); padding: 1.35rem; box-shadow: var(--tm-card-shadow); }
.tm-card-primary { min-height: 13rem; background: var(--tm-card-primary-bg); }
.tm-card h2 { margin: 0; font-size: 1.08rem; }
/* Design system: card copy fills the available card width by default.
   Use .tm-reading-measure only for intentionally narrow long-form text. */
.tm-card p { max-width: none; color: var(--tm-text-soft); line-height: 1.6; }
.tm-card p.tm-reading-measure,
.tm-page-heading p.tm-reading-measure,
.tm-content-header-subtitle.tm-reading-measure { max-width: 65ch; }
.tm-card-eyebrow { display: block; margin-bottom: 2.3rem; color: var(--tm-card-eyebrow); font-size: .7rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.tm-meta-list { display: grid; gap: 0; margin: .85rem 0 0; }
.tm-meta-list > div { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--tm-border-soft); padding: .8rem 0; }
.tm-meta-list dt { color: var(--tm-muted); font-size: .78rem; }
.tm-meta-list dd { margin: 0; font-size: .8rem; font-weight: 700; text-align: right; }


/* Desktop admin chrome: keep navigation and topbar viewport-persistent; only main content scrolls. */
@media (min-width: 901px) {
    html, body.tm-body { height: 100%; overflow: hidden; }
    .tm-admin-shell { height: 100vh; min-height: 0; overflow: hidden; }
    .tm-sidebar { height: 100vh; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
    .tm-admin-content {
        display: grid;
        height: 100vh;
        min-height: 0;
        grid-template-rows: auto minmax(0, 1fr);
        overflow: hidden;
    }
    .tm-admin-content.has-impersonation-banner {
        grid-template-rows: auto auto minmax(0, 1fr);
    }
    .tm-topbar { position: relative; z-index: 20; flex: 0 0 auto; }
    .tm-main {
        width: 100%;
        max-width: none;
        min-height: 0;
        height: 100%;
        margin: 0;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
        padding: 2rem max(2rem, calc((100% - 82rem) / 2 + 2rem));
    }
}

@media (max-width: 900px) {
    .tm-admin-shell { grid-template-columns: 1fr; }
    .tm-sidebar { min-height: auto; border-right: 0; border-bottom: 1px solid var(--tm-border-soft); }
    .tm-sidebar-brand { border-bottom: 0; }
    .tm-nav { display: flex; padding-top: 0; }
    .tm-nav-label, .tm-sidebar-footer { display: none; }
    .tm-topbar { align-items: flex-start; }
    .tm-dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .tm-auth-shell { padding: 1rem; }
    .tm-auth-header, .tm-auth-content { padding-left: 1.2rem; padding-right: 1.2rem; }
    .tm-brand-row, .tm-page-heading { align-items: flex-start; }
    .tm-brand-copy { display: none; }
    .tm-display-controls { flex-shrink: 0; }
    .tm-topbar { display: grid; }
    .tm-topbar-actions { width: 100%; flex-wrap: wrap; }
    .tm-user-summary { order: 3; width: 100%; padding: .2rem 0 0; }
    .tm-main { padding: 1.35rem 1rem; }
    .tm-page-heading { display: grid; }
    .tm-status-pill { width: max-content; }
}

/* Error surfaces / request correlation */
.tm-error-shell {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 2rem 1.25rem;
}
.tm-error-card {
    width: min(100%, 38rem);
    overflow: hidden;
    border: 1px solid var(--tm-border);
    border-radius: 1.4rem;
    background: var(--tm-auth-card-bg);
    box-shadow: var(--tm-shadow);
    backdrop-filter: blur(18px);
}
.tm-error-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--tm-border-soft);
    padding: 1.45rem 1.6rem;
}
.tm-error-content { padding: 2rem 1.6rem 1.7rem; }
.tm-error-code {
    color: var(--tm-brand-strong);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .14em;
}
.tm-error-content h1 {
    margin: .55rem 0 .7rem;
    font-size: clamp(1.7rem, 5vw, 2.2rem);
    line-height: 1.12;
    letter-spacing: -.025em;
}
.tm-error-content > p {
    margin: 0;
    color: var(--tm-text-soft);
    line-height: 1.65;
}
.tm-request-id {
    display: grid;
    gap: .35rem;
    margin-top: 1.4rem;
    border: 1px solid var(--tm-border-soft);
    border-radius: .8rem;
    background: var(--tm-control-bg);
    padding: .85rem .95rem;
}
.tm-request-id > span { color: var(--tm-text-soft); font-size: .72rem; font-weight: 750; }
.tm-request-id code { overflow-wrap: anywhere; color: var(--tm-text); font-size: .79rem; }
.tm-request-id small { color: var(--tm-muted); font-size: .7rem; line-height: 1.45; }
.tm-error-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.5rem; }

/* Phase 6 secure Admin read/presentation foundation */
.tm-nav-group { display: grid; gap: .35rem; }
.tm-nav-group + .tm-nav-group { margin-top: .8rem; }
.tm-count-pill { display: inline-flex; align-items: center; border: 1px solid var(--tm-border); border-radius: 999px; background: var(--tm-control-bg); color: var(--tm-text-soft); padding: .48rem .72rem; font-size: .72rem; white-space: nowrap; }
.tm-filter-card { margin-bottom: 0; box-shadow: none; }
.tm-filter-grid { display: grid; grid-template-columns: minmax(12rem, 2fr) repeat(5, minmax(8rem, 1fr)); gap: .8rem; align-items: end; }
.tm-filter-grid:has(select[name="view"]) { grid-template-columns: minmax(11rem, 1.7fr) repeat(6, minmax(7rem, 1fr)); }
.tm-filter-search { min-width: 0; }
.tm-contract-upcoming-note { margin: 0; padding: .7rem 1rem; border-bottom: 1px solid var(--tm-border); color: var(--tm-text-soft); font-size: .76rem; }
.tm-filter-actions { display: flex; gap: .55rem; grid-column: 1 / -1; }
.tm-field { display: grid; gap: .35rem; }
.tm-field > span { color: var(--tm-text-soft); font-size: .72rem; font-weight: 700; }
.tm-field input, .tm-field select { width: 100%; min-height: 2.55rem; border: 1px solid var(--tm-border); border-radius: .68rem; background: var(--tm-control-bg); color: var(--tm-text); padding: .56rem .7rem; }
.tm-field input:focus, .tm-field select:focus { outline: 2px solid var(--tm-brand-soft); outline-offset: 1px; }
.tm-table-card { padding: 0; overflow: hidden; }
.tm-table-scroll { overflow-x: auto; }
.tm-table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.tm-table th, .tm-table td { border-bottom: 1px solid var(--tm-border-soft); padding: .82rem .9rem; text-align: left; vertical-align: middle; }
.tm-table th { background: var(--tm-control-bg); color: var(--tm-muted); font-size: .68rem; letter-spacing: .04em; text-transform: uppercase; }
.tm-table tbody tr:last-child td { border-bottom: 0; }
.tm-table td small { display: block; margin-top: .18rem; color: var(--tm-muted); }
.tm-table-action { text-align: right !important; white-space: nowrap; }
.tm-table-action a { color: var(--tm-brand-strong); font-weight: 700; text-decoration: none; }
.tm-code-label { overflow-wrap: anywhere; }
.tm-badge { display: inline-flex; align-items: center; border: 1px solid var(--tm-border); border-radius: 999px; padding: .28rem .55rem; font-size: .68rem; font-weight: 750; white-space: nowrap; }
.tm-badge-neutral { background: var(--tm-control-bg); color: var(--tm-text-soft); }
.tm-badge-info { background: var(--tm-brand-soft); color: var(--tm-brand-strong); }
.tm-badge-success { background: var(--tm-success-soft); color: var(--tm-success); }
.tm-badge-warning { background: color-mix(in srgb, #d88a00 13%, transparent); color: color-mix(in srgb, #c27700 88%, var(--tm-text)); }
.tm-badge-danger, .tm-badge-critical { background: var(--tm-danger-soft); color: var(--tm-danger-text); }
.tm-badge-critical { border-color: color-mix(in srgb, var(--tm-danger) 45%, transparent); font-weight: 850; }
.tm-empty-state { padding: 2rem 1.35rem; text-align: center; }
.tm-empty-state p { margin: .45rem 0 0; color: var(--tm-text-soft); }
.tm-pagination { display: flex; align-items: center; justify-content: space-between; gap: .8rem; border-top: 1px solid var(--tm-border-soft); padding: .85rem .9rem; color: var(--tm-text-soft); font-size: .75rem; }
.tm-pagination > div { display: flex; gap: .45rem; }
.tm-detail-badges { display: flex; gap: .5rem; margin-bottom: 1rem; }
.tm-detail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.tm-detail-list > div { display: grid; gap: .25rem; border-top: 1px solid var(--tm-border-soft); padding: .85rem .2rem; }
.tm-detail-list > div:nth-child(odd) { padding-right: 1rem; }
.tm-detail-list dt { color: var(--tm-muted); font-size: .72rem; }
.tm-detail-list dd { margin: 0; overflow-wrap: anywhere; font-size: .82rem; font-weight: 650; }
.tm-payment-credit-entry-count { display: block; margin-top: .28rem; color: var(--tm-muted); font-size: .72rem; font-weight: 500; }
.tm-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 1100px) {
    .tm-filter-grid, .tm-filter-grid:has(select[name="view"]) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .tm-filter-grid, .tm-filter-grid:has(select[name="view"]) { grid-template-columns: 1fr; }
    .tm-filter-actions { grid-column: auto; flex-wrap: wrap; }
    .tm-pagination { align-items: flex-start; flex-direction: column; }
    .tm-detail-list { grid-template-columns: 1fr; }
    .tm-detail-list > div:nth-child(odd) { padding-right: .2rem; }
}

/* Phase 6 operational Admin dashboard */
.tm-dashboard-notice {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: .55rem 1rem;
    align-items: baseline;
    margin: -0.45rem 0 1rem;
    border: 1px solid var(--tm-border-soft);
    border-radius: .8rem;
    background: var(--tm-control-bg);
    padding: .8rem 1rem;
    color: var(--tm-text-soft);
    font-size: .75rem;
    line-height: 1.5;
}
.tm-dashboard-notice strong { color: var(--tm-text); }
.tm-dashboard-section-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1rem; row-gap: var(--tm-card-stack-gap); }
.tm-dashboard-section { min-width: 0; }
.tm-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.tm-section-heading .tm-card-eyebrow { margin-bottom: .35rem; }
.tm-text-link { color: var(--tm-brand-strong); font-size: .73rem; font-weight: 750; text-decoration: none; white-space: nowrap; }
.tm-text-link:hover { text-decoration: underline; }
.tm-stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.tm-stat-grid-compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tm-stat { min-width: 0; border: 1px solid var(--tm-border-soft); border-radius: .8rem; background: var(--tm-control-bg); padding: .85rem .9rem; }
.tm-stat > span { display: block; color: var(--tm-muted); font-size: .7rem; }
.tm-stat > strong { display: block; margin-top: .22rem; font-size: 1.45rem; letter-spacing: -.035em; }
.tm-stat > small { display: block; margin-top: .2rem; color: var(--tm-text-soft); font-size: .68rem; line-height: 1.4; }
.tm-review-list { display: grid; }
.tm-review-list > div { display: grid; grid-template-columns: minmax(0, 1fr) max-content; gap: .2rem .8rem; align-items: baseline; border-top: 1px solid var(--tm-border-soft); padding: .7rem 0; }
.tm-review-list > div:first-child { border-top: 0; padding-top: 0; }
.tm-review-list span { font-size: .78rem; }
.tm-review-list strong { font-size: .9rem; }
.tm-review-list small { grid-column: 1 / -1; color: var(--tm-muted); font-size: .66rem; }
.tm-status-pill-success span { background: var(--tm-success); box-shadow: 0 0 0 4px var(--tm-success-soft); }
.tm-status-pill-warning span { background: #d88a00; box-shadow: 0 0 0 4px color-mix(in srgb, #d88a00 15%, transparent); }

@media (max-width: 1050px) {
    .tm-dashboard-section-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .tm-dashboard-notice { grid-template-columns: 1fr; }
    .tm-stat-grid, .tm-stat-grid-compact { grid-template-columns: 1fr 1fr; }
    .tm-section-heading { display: grid; }
}

@media (max-width: 430px) {
    .tm-stat-grid, .tm-stat-grid-compact { grid-template-columns: 1fr; }
}

/* Phase 6 accessibility / text-size foundation */
:root[data-text-size="normal"] { font-size: 100%; }
:root[data-text-size="large"] { font-size: 115%; }
:root[data-text-size="xlarge"] { font-size: 130%; }

.tm-display-controls {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.tm-text-size-control {
    display: inline-flex;
    gap: .15rem;
    padding: .2rem;
    border: 1px solid var(--tm-border-soft);
    border-radius: .65rem;
    background: var(--tm-control-bg);
}

.tm-text-size-button {
    min-width: 2.1rem;
    min-height: 2rem;
    border: 0;
    border-radius: .45rem;
    background: transparent;
    color: var(--tm-muted);
    padding: .28rem .4rem;
    font-weight: 750;
    line-height: 1;
}

.tm-text-size-button:hover:not(:disabled),
.tm-text-size-button[aria-pressed="true"] {
    background: var(--tm-surface-raised);
    color: var(--tm-text);
}

.tm-text-size-button:disabled {
    cursor: default;
    opacity: .38;
}

.tm-text-size-button[data-text-size-action="decrease"] { font-size: .72rem; }
.tm-text-size-button[data-text-size-action="reset"] { font-size: .86rem; }
.tm-text-size-button[data-text-size-action="increase"] { font-size: 1rem; }

button,
input,
select,
textarea {
    font: inherit;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 3px solid var(--tm-brand);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

@media (max-width: 640px) {
    .tm-text-size-control { order: -1; }
}

/* Phase 6 customer read surface */
.tm-customer-address { display: grid; gap: .2rem; margin: 0; color: var(--tm-text); font-style: normal; line-height: 1.55; }

/* Phase 6 customer read-surface iteration: name-first, live filters, related objects */
.tm-customer-name { display: block; overflow-wrap: anywhere; }
.tm-live-filter-hint { align-self: center; color: var(--tm-muted); font-size: .7rem; line-height: 1.4; }
.tm-customer-related-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--tm-card-stack-gap); margin-top: var(--tm-card-stack-gap); }
.tm-customer-related-wide { grid-column: 1 / -1; }
.tm-customer-related-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1rem 1rem .85rem; border-bottom: 1px solid var(--tm-border-soft); }
.tm-customer-related-heading h2 { margin: .28rem 0 0; font-size: 1rem; }
.tm-handle-list { display: grid; gap: .26rem; min-width: 12rem; }
.tm-handle-list > span { overflow-wrap: anywhere; }
.tm-handle-list small { display: inline; margin: 0; color: var(--tm-muted); }
.tm-table-note { border-top: 1px solid var(--tm-border-soft); padding: .72rem .9rem; color: var(--tm-muted); font-size: .68rem; line-height: 1.45; }

@media (max-width: 1050px) {
    .tm-customer-related-grid { grid-template-columns: 1fr; }
    .tm-customer-related-wide { grid-column: auto; }
}

@media (max-width: 640px) {
    .tm-customer-related-heading { display: grid; }
    .tm-live-filter-hint { width: 100%; }
}

/* Phase 6 customer contract/domain grouping */
.tm-contract-domain-section { padding: 0; overflow: hidden; }
.tm-contract-domain-list { display: grid; gap: 1rem; padding: 1rem; }
.tm-contract-domain-card { overflow: hidden; border: 1px solid var(--tm-border); border-left-width: 4px; border-radius: 14px; background: var(--tm-card-bg); }
.tm-contract-domain-card-active { border-left-color: var(--tm-success); background: color-mix(in srgb, var(--tm-success-soft) 42%, var(--tm-card-bg)); }
.tm-contract-domain-card-attention { border-left-color: var(--tm-danger); background: color-mix(in srgb, var(--tm-danger-soft) 30%, var(--tm-card-bg)); }
.tm-contract-domain-card-non_renewing { border-left-color: var(--tm-muted); background: color-mix(in srgb, var(--tm-surface) 58%, var(--tm-card-bg)); opacity: .94; }
.tm-contract-domain-card-terminated { border-left-color: var(--tm-muted); background: color-mix(in srgb, var(--tm-surface) 72%, var(--tm-card-bg)); opacity: .88; }
.tm-contract-domain-card-neutral { border-left-color: var(--tm-muted); }
.tm-contract-domain-header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, auto); gap: 1rem; align-items: start; border-bottom: 1px solid var(--tm-border-soft); padding: 1rem; }
.tm-contract-domain-identity .tm-card-eyebrow { margin-bottom: .25rem; }
.tm-contract-domain-identity h3 { margin: 0; font-size: 1.05rem; }
.tm-contract-products { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin-top: .45rem; color: var(--tm-text-soft); font-size: .8rem; }
.tm-contract-products span { display: inline-flex; align-items: baseline; gap: .35rem; }
.tm-contract-products small { color: var(--tm-muted); }
.tm-contract-domain-status { display: grid; justify-items: end; gap: .6rem; }
.tm-contract-status-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }
.tm-contract-attention-note { margin: 0; max-width: 28rem; color: var(--tm-danger); font-size: .68rem; line-height: 1.45; text-align: right; }
.tm-domain-link { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .14em; }
.tm-domain-link:hover { color: var(--tm-accent); }
.tm-entity-link { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .14em; }
.tm-entity-link:hover { color: var(--tm-accent); }
.tm-contract-domain-status dl { margin: 0; }
.tm-contract-meta-grid { display: grid; grid-template-columns: repeat(4, minmax(7.25rem, 1fr)); gap: .45rem 1rem; width: min(100%, 38rem); }
.tm-contract-domain-status dl > div { display: grid; gap: .12rem; text-align: right; }
.tm-contract-domain-table { width: 100%; min-width: 68rem; table-layout: fixed; }
.tm-contract-domain-col-domain { width: 24%; }
.tm-contract-domain-col-status { width: 14%; }
.tm-contract-domain-col-registration { width: 19%; }
.tm-contract-domain-col-expiry { width: 15%; }
.tm-contract-domain-col-handles { width: 28%; }
.tm-contract-domain-status dt { color: var(--tm-muted); font-size: .66rem; }
.tm-contract-domain-status dd { margin: 0; font-size: .75rem; font-weight: 700; }
.tm-contract-domains { background: color-mix(in srgb, var(--tm-surface) 44%, transparent); }
.tm-contract-domains-heading { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: .72rem .9rem; }
.tm-contract-no-domains { margin: 0; padding: 0 .9rem .9rem; }
.tm-unassigned-domain-review { border-top: 1px solid var(--tm-border); padding: 1rem; }
.tm-unassigned-domain-review h3 { margin: 0 0 .3rem; font-size: .95rem; }
.tm-unassigned-domain-review p { margin: 0 0 .8rem; color: var(--tm-text-soft); font-size: .78rem; }

@media (max-width: 850px) {
    .tm-contract-domain-header { grid-template-columns: 1fr; }
    .tm-contract-domain-status { justify-items: start; }
    .tm-contract-meta-grid { grid-template-columns: repeat(2, minmax(7.25rem, 1fr)); width: 100%; }
    .tm-contract-domain-status dl > div { text-align: left; }
    .tm-contract-status-badges { justify-content: flex-start; }
    .tm-contract-attention-note { text-align: left; }
}

/* Phase 6 – 0.6.7 Users & Access read surface */
.tm-access-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    justify-content: flex-end;
}

.tm-user-account-card .tm-customer-related-heading {
    margin-bottom: 1rem;
}

.tm-user-account-card .tm-card-eyebrow {
    margin-bottom: .3rem;
}

.tm-user-account-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .7rem;
    margin: 0;
}

.tm-user-account-field {
    min-width: 0;
    border: 1px solid var(--tm-border-soft);
    border-radius: .8rem;
    background: var(--tm-control-bg);
    padding: .8rem .9rem;
}

.tm-user-account-field dt {
    margin: 0 0 .28rem;
    color: var(--tm-muted);
    font-size: .68rem;
    font-weight: 750;
    letter-spacing: .035em;
}

.tm-user-account-field dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--tm-text);
    font-size: .82rem;
    line-height: 1.45;
}

.tm-user-account-field-wide {
    grid-column: span 1;
}

.tm-user-access-table th:nth-child(1) { width: 25%; }
.tm-user-access-table th:nth-child(2) { width: 15%; }
.tm-user-access-table th:nth-child(3) { width: 15%; }
.tm-user-access-table th:nth-child(4) { width: 15%; }
.tm-user-access-table th:nth-child(5) { width: 10%; }
.tm-user-access-table th:nth-child(6) { width: 14%; }
.tm-user-access-table th:nth-child(7) { width: 6%; }

.tm-user-membership-table th:nth-child(1) { width: 34%; }
.tm-user-membership-table th:nth-child(2) { width: 16%; }
.tm-user-membership-table th:nth-child(3) { width: 16%; }
.tm-user-membership-table th:nth-child(4) { width: 16%; }
.tm-user-membership-table th:nth-child(5) { width: 18%; }

@media (max-width: 900px) {
    .tm-user-account-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tm-user-account-field-wide {
        grid-column: span 1;
    }

    .tm-access-badges {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .tm-user-account-grid {
        grid-template-columns: 1fr;
    }
}


/* Phase 6 – 0.6.8 Contract read surface */
.tm-contract-read-table { min-width: 72rem; }
.tm-contract-read-table th:nth-child(1) { width: 14%; }
.tm-contract-read-table th:nth-child(2) { width: 21%; }
.tm-contract-read-table th:nth-child(3) { width: 14%; }
.tm-contract-read-table th:nth-child(4) { width: 12%; }
.tm-contract-read-table th:nth-child(5) { width: 13%; }
.tm-contract-read-table th:nth-child(6) { width: 10%; }
.tm-contract-read-table th:nth-child(7) { width: 10%; }
.tm-contract-read-table th:nth-child(8) { width: 6%; }
.tm-contract-item-section { padding: 0; overflow: hidden; }
.tm-contract-item-list { display: grid; gap: 1rem; padding: 1rem; }
.tm-contract-item-card { overflow: hidden; border: 1px solid var(--tm-border); border-radius: .9rem; background: var(--tm-card-bg); }
.tm-contract-item-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1rem; border-bottom: 1px solid var(--tm-border-soft); }
.tm-contract-item-header h3 { margin: .2rem 0 .15rem; font-size: 1rem; }
.tm-contract-item-header small { color: var(--tm-muted); }
.tm-contract-item-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; margin: 0; padding: .9rem 1rem; background: color-mix(in srgb, var(--tm-surface) 42%, transparent); }
.tm-contract-item-meta > div { min-width: 0; }
.tm-contract-item-meta dt { color: var(--tm-muted); font-size: .67rem; }
.tm-contract-item-meta dd { margin: .2rem 0 0; overflow-wrap: anywhere; font-size: .78rem; font-weight: 700; }
.tm-contract-price-table { min-width: 48rem; }
.tm-contract-promotion-list { display: flex; flex-wrap: wrap; gap: .5rem .9rem; border-top: 1px solid var(--tm-border-soft); padding: .75rem 1rem; color: var(--tm-text-soft); font-size: .75rem; }
@media (max-width: 850px) {
    .tm-contract-item-header { display: grid; }
    .tm-contract-item-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
    .tm-contract-item-meta { grid-template-columns: 1fr; }
}

/* Phase 6 / 0.6.9 domain read surface */
.tm-domain-read-table td:first-child strong {
    overflow-wrap: anywhere;
}

.tm-domain-link-stack {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-width: 0;
}

.tm-domain-external-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.55rem;
    height: 1.55rem;
    border: 1px solid var(--tm-border, rgba(148, 163, 184, .22));
    border-radius: 999px;
    text-decoration: none;
    font-size: .8rem;
    line-height: 1;
}

.tm-domain-registration-card > .tm-detail-list {
    padding-inline: 1rem;
}

.tm-domain-registration-card + .tm-domain-registration-card {
    border-top: 1px solid var(--tm-border, rgba(148, 163, 184, .18));
    margin-top: 1rem;
    padding-top: 1rem;
}

.tm-domain-contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.tm-domain-contact-card {
    min-width: 0;
    border: 1px solid var(--tm-border, rgba(148, 163, 184, .18));
    border-radius: 1rem;
    background: rgba(15, 23, 42, .22);
    overflow: hidden;
}

.tm-domain-contact-card > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--tm-border, rgba(148, 163, 184, .18));
}

.tm-domain-contact-card h3 {
    margin: .25rem 0 0;
    overflow-wrap: anywhere;
}

.tm-domain-contact-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
}

.tm-domain-contact-details > div {
    min-width: 0;
    padding: .8rem 1rem;
    border-bottom: 1px solid var(--tm-border, rgba(148, 163, 184, .12));
}

.tm-domain-contact-details dt {
    margin-bottom: .25rem;
    color: var(--tm-muted, #94a3b8);
    font-size: .78rem;
}

.tm-domain-contact-details dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.tm-domain-handle-list {
    display: grid;
    gap: .35rem;
    padding: .85rem 1rem 1rem;
}

.tm-domain-handle-list span {
    overflow-wrap: anywhere;
}

@media (max-width: 980px) {
    .tm-domain-contact-grid,
    .tm-domain-contact-details {
        grid-template-columns: 1fr;
    }
}

/* Phase 6 – 0.6.9.2 global detail content header + admin footer */
.tm-main-content { flex: 1 0 auto; width: 100%; }
.tm-content-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 1rem 1.5rem;
    margin-bottom: 1.2rem;
}
.tm-content-header-copy { min-width: 0; }
.tm-content-header-copy h1 {
    margin: 0;
    overflow-wrap: anywhere;
    font-size: clamp(1.65rem, 3vw, 2.1rem);
    letter-spacing: -.025em;
}
.tm-content-header-subtitle {
    max-width: none;
    margin-top: .55rem;
    color: var(--tm-text-soft);
    line-height: 1.5;
}
.tm-content-header-actions {
    display: grid;
    min-width: max-content;
    justify-items: end;
    gap: .65rem;
}
.tm-content-header-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: .45rem;
}
.tm-admin-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1.5rem;
    margin-top: 2rem;
    border-top: 1px solid var(--tm-border-soft);
    padding: 1rem .1rem .2rem;
    color: var(--tm-muted);
    font-size: .7rem;
    line-height: 1.45;
}
.tm-admin-footer-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: .45rem .85rem;
}
.tm-admin-footer-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .45rem;
}
.tm-admin-footer-version { white-space: nowrap; }
.tm-main { display: flex; flex-direction: column; }

@media (min-width: 901px) {
    .tm-main { min-height: 100%; }
}

@media (max-width: 640px) {
    .tm-content-header { grid-template-columns: 1fr; }
    .tm-content-header-actions { width: 100%; min-width: 0; justify-items: end; }
    .tm-content-header-badges { justify-content: flex-end; }
    .tm-admin-footer { align-items: flex-start; flex-direction: column; }
    .tm-admin-footer-meta, .tm-admin-footer-legal { justify-content: flex-start; }
}

/* Phase 6 – 0.6.10 Hosting read surface */
.tm-hosting-read-table { min-width: 72rem; }
/* Phase 6 – 0.6.10.1 shared small card separator + explicit related action */
.tm-main-content > .tm-card + .tm-card { margin-top: var(--tm-card-stack-gap); }
.tm-main-content > .tm-card + .tm-customer-related-grid,
.tm-main-content > .tm-customer-related-grid + .tm-card { margin-top: var(--tm-card-stack-gap); }
.tm-main-content > .tm-dashboard-notice + .tm-card,
.tm-main-content > .tm-card + .tm-dashboard-notice { margin-top: var(--tm-card-stack-gap); }
.tm-inline-related-action { margin-left: .5rem; }

/* Phase 6 – 0.6.11.1 catalog detail presentation iteration */
.tm-main-content > .tm-card + .tm-dashboard-section-grid,
.tm-main-content > .tm-dashboard-section-grid + .tm-card,
.tm-main-content > .tm-dashboard-section-grid + .tm-dashboard-section-grid {
    margin-top: var(--tm-card-stack-gap);
}
.tm-catalog-master-data { padding: .15rem 1rem 1rem; }
.tm-catalog-master-data > div { padding: .9rem .65rem; }
.tm-catalog-master-data > div:nth-child(odd) { padding-right: 1.25rem; }
.tm-catalog-master-data dt { font-size: .72rem; font-weight: 700; }
.tm-catalog-master-data dd { margin-top: .08rem; font-size: .88rem; line-height: 1.45; }

@media (max-width: 700px) {
    .tm-catalog-master-data { padding-inline: .8rem; }
    .tm-catalog-master-data > div,
    .tm-catalog-master-data > div:nth-child(odd) { padding-inline: .35rem; }
}

/* Phase 6 Notification Template/Layout source inspection */
.tm-heading-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .55rem; }
.tm-notification-template-section-heading { padding: 1.15rem 1.35rem .75rem; margin-bottom: 0; }
.tm-notification-template-section-heading .tm-card-eyebrow { margin-bottom: .35rem; }
.tm-notification-source-card .tm-card-eyebrow { margin-bottom: .35rem; }
.tm-placeholder-list { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-top: .9rem; color: var(--tm-text-soft); font-size: .76rem; }
.tm-placeholder-list strong { margin-right: .2rem; color: var(--tm-text); }
.tm-placeholder-list code { border: 1px solid var(--tm-border-soft); border-radius: .55rem; background: var(--tm-control-bg); color: var(--tm-text-soft); padding: .3rem .45rem; overflow-wrap: anywhere; }
.tm-source-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin-top: .9rem; }
.tm-source-panel { min-width: 0; border: 1px solid var(--tm-border-soft); border-radius: .8rem; background: var(--tm-control-bg); padding: .8rem; }
.tm-source-panel-wide { grid-column: 1 / -1; }
.tm-source-panel > strong { display: block; margin-bottom: .55rem; font-size: .76rem; }
.tm-source-panel pre { max-height: 28rem; margin: 0; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--tm-text-soft); font: 0.74rem/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
@media (max-width: 800px) { .tm-source-grid { grid-template-columns: 1fr; } .tm-source-panel-wide { grid-column: auto; } }


/* Phase 6 settings read surface: long scalar configuration values must wrap safely. */
.tm-wrap-anywhere {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.tm-setting-value {
    font-size: 1rem;
    line-height: 1.55;
    white-space: pre-wrap;
}

/* 0.6.25 local business mutation form */
.tm-page-actions { display:flex; justify-content:flex-end; margin:0 0 var(--tm-card-stack-gap); }
.tm-mutation-form { display:grid; gap:var(--tm-card-stack-gap); }
.tm-mutation-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.8rem; margin-top:.75rem; }
.tm-mutation-actions { display:flex; gap:.65rem; flex-wrap:wrap; align-items:center; margin-bottom:.55rem; }
@media (max-width: 760px) { .tm-mutation-form-grid { grid-template-columns:1fr; } }


/* Phase 6 – 0.6.25.1 compact header actions + audit context presentation */
.tm-content-header-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.tm-content-header-title-actions { display: inline-flex; align-items: center; gap: .3rem; }
.tm-header-icon-action {
    display: inline-grid; width: 2rem; height: 2rem; flex: 0 0 auto; place-items: center;
    border: 1px solid var(--tm-border); border-radius: .55rem; background: var(--tm-control-bg);
    color: var(--tm-link); text-decoration: none;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.tm-header-icon-action:hover, .tm-header-icon-action:focus-visible { border-color: var(--tm-brand-strong); color: var(--tm-text); }
.tm-header-icon-action svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.tm-audit-context-list { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .55rem; }
.tm-audit-context-item { min-width: 0; overflow-wrap: anywhere; }
.tm-audit-context-item a { color: var(--tm-link); text-decoration: none; }
.tm-audit-context-item a:hover, .tm-audit-context-item a:focus-visible { text-decoration: underline; }

/* Phase 6 – 0.6.26.1 reviewed local order/contract actions */
.tm-field textarea {
    width: 100%; min-height: 6.5rem; resize: vertical; border: 1px solid var(--tm-border);
    border-radius: .68rem; background: var(--tm-control-bg); color: var(--tm-text); padding: .65rem .7rem;
    font: inherit; line-height: 1.45;
}
.tm-field textarea:focus { outline: 2px solid var(--tm-brand-soft); outline-offset: 1px; }
.tm-checkbox-row { display: flex; align-items: flex-start; gap: .65rem; margin: .9rem 0; color: var(--tm-text-soft); font-size: .8rem; line-height: 1.45; }
.tm-checkbox-row input { flex: 0 0 auto; margin-top: .18rem; }

/* Phase 6 – 0.6.30 audited read-only customer impersonation */
.tm-content-header-title-actions form { display: inline-flex; margin: 0; }
button.tm-header-icon-action { padding: 0; cursor: pointer; }
.tm-impersonation-banner {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid color-mix(in srgb, #d88a00 42%, var(--tm-border));
    background: color-mix(in srgb, #d88a00 13%, var(--tm-surface));
    padding: .72rem 1.5rem;
    box-shadow: 0 .35rem 1rem color-mix(in srgb, #000 7%, transparent);
}
.tm-impersonation-banner-copy { display: grid; min-width: 0; gap: .1rem; }
.tm-impersonation-banner-copy strong { color: var(--tm-text); }
.tm-impersonation-banner-copy span { overflow-wrap: anywhere; color: var(--tm-text-soft); }
.tm-impersonation-banner-copy small { color: var(--tm-muted); }
.tm-impersonation-banner form { flex: 0 0 auto; margin: 0; }
@media (min-width: 901px) {
    .tm-admin-content.has-impersonation-banner .tm-impersonation-banner { position: relative; top: auto; }
}
@media (max-width: 760px) {
    .tm-impersonation-banner { align-items: stretch; flex-direction: column; padding: .72rem 1rem; }
    .tm-impersonation-banner form, .tm-impersonation-banner .tm-button { width: 100%; }
}

/* Phase 7 / 0.7.1 – customer portal Variant B: Modern & Klar */
:root {
    --tm-portal-header-start: #0a4d8c;
    --tm-portal-header-end: #0868b9;
    --tm-portal-header-text: #ffffff;
    --tm-portal-header-muted: rgba(255, 255, 255, .76);
    --tm-portal-sidebar-width: 15.2rem;
    --tm-portal-stage-bg: #f5f8fb;
    --tm-portal-pagebar-bg: rgba(255, 255, 255, .86);
    --tm-portal-nav-active-bg: #e5f1fb;
    --tm-portal-nav-active-text: #075fa8;
    --tm-portal-nav-disabled: #8492a3;
}

:root[data-theme="dark"] {
    --tm-portal-header-start: #082f55;
    --tm-portal-header-end: #0b4f86;
    --tm-portal-stage-bg: #09111e;
    --tm-portal-pagebar-bg: rgba(11, 18, 32, .9);
    --tm-portal-nav-active-bg: rgba(53, 168, 229, .14);
    --tm-portal-nav-active-text: #c7e9fb;
    --tm-portal-nav-disabled: #64748b;
}

body.tm-portal-body {
    background: var(--tm-portal-stage-bg);
}

.tm-portal-shell {
    display: grid;
    min-height: 100vh;
    grid-template-rows: 4.6rem minmax(0, 1fr);
    background: var(--tm-portal-stage-bg);
}

.tm-portal-topbar {
    position: relative;
    z-index: 60;
    display: grid;
    grid-template-columns: minmax(12rem, auto) minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
    min-width: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    background: linear-gradient(115deg, var(--tm-portal-header-start), var(--tm-portal-header-end));
    color: var(--tm-portal-header-text);
    padding: .7rem 1.2rem;
    box-shadow: 0 8px 24px rgba(0, 44, 82, .12);
}

.tm-portal-topbar-brand,
.tm-portal-topbar-actions,
.tm-portal-brand {
    display: flex;
    align-items: center;
}

.tm-portal-topbar-brand { gap: .8rem; min-width: 0; }
.tm-portal-brand { gap: .7rem; color: #fff; text-decoration: none; min-width: 0; }
.tm-portal-brand .tm-brand-logo-stack {
    width: 6.35rem;
    background: transparent;
}
.tm-portal-brand .tm-brand-logo { filter: none; }
.tm-portal-brand-name { border-left: 1px solid rgba(255,255,255,.28); padding-left: .75rem; color: var(--tm-portal-header-muted); font-size: .75rem; font-weight: 700; white-space: nowrap; }
.tm-portal-topbar-actions { justify-content: flex-end; gap: .65rem; min-width: 0; }
.tm-portal-display-controls { flex-wrap: nowrap; }
.tm-portal-topbar .tm-theme-toggle,
.tm-portal-topbar .tm-locale-switcher,
.tm-portal-topbar .tm-text-size-control {
    border-color: rgba(255,255,255,.22);
    background: rgba(255,255,255,.08);
    color: #fff;
}
.tm-portal-topbar .tm-theme-toggle:hover,
.tm-portal-topbar .tm-locale-button:hover,
.tm-portal-topbar .tm-locale-button.is-active,
.tm-portal-topbar .tm-text-size-button:hover,
.tm-portal-topbar .tm-text-size-button[aria-pressed="true"] {
    background: rgba(255,255,255,.16);
    color: #fff;
}
.tm-portal-topbar .tm-locale-button,
.tm-portal-topbar .tm-text-size-button { color: rgba(255,255,255,.78); }

.tm-portal-user-summary { display: grid; min-width: 0; border-left: 1px solid rgba(255,255,255,.18); padding-left: .8rem; }
.tm-portal-user-summary span { color: var(--tm-portal-header-muted); font-size: .61rem; }
.tm-portal-user-summary strong { max-width: 12rem; overflow: hidden; text-overflow: ellipsis; color: #fff; font-size: .78rem; white-space: nowrap; }
.tm-portal-signout { min-height: 2.25rem; border: 1px solid rgba(255,255,255,.2); border-radius: .62rem; background: rgba(255,255,255,.08); color: #fff; padding: .48rem .7rem; font-size: .72rem; font-weight: 750; }
.tm-portal-signout:hover { background: rgba(255,255,255,.16); }

.tm-portal-menu-toggle { display: none; width: 2.4rem; height: 2.4rem; place-items: center; gap: .23rem; border: 1px solid rgba(255,255,255,.2); border-radius: .62rem; background: rgba(255,255,255,.08); padding: .55rem; }
.tm-portal-menu-toggle > span:not(.tm-sr-only) { display: block; width: 1.05rem; height: 1.5px; background: #fff; }

.tm-portal-workspace { display: grid; min-height: 0; grid-template-columns: var(--tm-portal-sidebar-width) minmax(0, 1fr); }
.tm-portal-sidebar { display: flex; min-height: 0; flex-direction: column; border-right: 1px solid var(--tm-border-soft); background: var(--tm-sidebar-bg); }
.tm-portal-sidebar-scroll {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable;
}
.tm-portal-nav { display: grid; gap: 1.1rem; padding: 1.25rem .8rem; }
.tm-portal-nav-group { display: grid; gap: .24rem; }
.tm-portal-nav-label { padding: .15rem .65rem .38rem; color: var(--tm-muted); font-size: .62rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.tm-portal-nav-link { display: grid; grid-template-columns: 1.2rem minmax(0, 1fr); align-items: center; gap: .65rem; min-height: 2.45rem; border-radius: .62rem; color: var(--tm-text-soft); padding: .55rem .65rem; font-size: .77rem; font-weight: 650; text-decoration: none; }
.tm-portal-nav-link[href]:hover { background: var(--tm-nav-hover); color: var(--tm-text); }
.tm-portal-nav-link.is-active { background: var(--tm-portal-nav-active-bg); color: var(--tm-portal-nav-active-text); font-weight: 780; }
.tm-portal-nav-link.is-disabled { color: var(--tm-portal-nav-disabled); cursor: default; opacity: .72; }
.tm-portal-nav-icon { width: 1.05rem; height: 1.05rem; color: currentColor; }
.tm-portal-sidebar-footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: .6rem; border-top: 1px solid var(--tm-border-soft); padding: .85rem 1rem; color: var(--tm-muted); font-size: .62rem; }

.tm-portal-stage { min-width: 0; min-height: 0; background: var(--tm-portal-stage-bg); }
.tm-portal-pagebar { display: flex; min-height: 3.65rem; align-items: center; border-bottom: 1px solid var(--tm-border-soft); background: var(--tm-portal-pagebar-bg); padding: .7rem clamp(1rem, 3vw, 2rem); backdrop-filter: blur(12px); }
.tm-portal-pagebar > div { display: grid; gap: .1rem; }
.tm-portal-pagebar strong { font-size: .9rem; }
.tm-portal-breadcrumb { color: var(--tm-muted); font-size: .63rem; }
.tm-portal-main { min-width: 0; }
.tm-portal-main-content { width: min(100%, 88rem); margin: 0 auto; padding: 1.65rem clamp(1rem, 3vw, 2rem) 2rem; }
.tm-portal-stage:has(> .tm-portal-legal-footer) { display: flex; flex-direction: column; }
.tm-portal-legal-footer { margin-top: auto; padding: .9rem 1rem; border-top: 1px solid var(--tm-border-soft); }
.tm-portal-legal-page { max-width: 52rem; margin: 0 auto; color: var(--tm-text); line-height: 1.65; overflow-wrap: anywhere; }
.tm-portal-legal-page h1 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.2; }
.tm-portal-legal-page h2 { margin: 1.2em 0 .45em; font-size: 1.15em; line-height: 1.3; }
.tm-portal-legal-page h3 { margin: 1.2em 0 .4em; font-size: 1em; }
.tm-portal-legal-page p { margin: 0 0 .8em; color: var(--tm-text-soft); white-space: pre-line; }
.tm-portal-legal-page a { color: var(--tm-link); }
.tm-portal-legal-page .tm-public-page-hero { margin-bottom: var(--tm-card-stack-gap); }
.tm-portal-legal-page .tm-public-page-hero p { margin-top: .6em; }
.tm-portal-legal-page .tm-public-contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: var(--tm-card-stack-gap); }
.tm-portal-legal-page .tm-public-card-icon { display: none; }
.tm-portal-legal-page .tm-public-contact-card,
.tm-portal-legal-page .tm-public-privacy-preview,
.tm-portal-legal-page .tm-public-imprint { padding: clamp(1rem, 3vw, 1.5rem); border: 1px solid var(--tm-border); border-radius: 1rem; background: var(--tm-card-bg); }
.tm-portal-legal-page .tm-public-contact-card h2,
.tm-portal-legal-page .tm-public-privacy-preview h2,
.tm-portal-legal-page .tm-public-imprint h2 { margin-top: 0; }
.tm-portal-legal-page .tm-public-contact-card address { font-style: normal; }
.tm-portal-legal-page .tm-public-imprint { margin-top: var(--tm-card-stack-gap); }
.tm-portal-legal-page .tm-public-imprint-details { display: grid; gap: .6rem; margin: 0 0 .7rem; }
.tm-portal-legal-page .tm-public-imprint-details dt { font-weight: 700; }
.tm-portal-legal-page .tm-public-imprint-details dd { margin: 0; color: var(--tm-text-soft); }

.tm-portal-page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.tm-portal-page-heading h1 { margin: 0; font-size: clamp(1.6rem, 3vw, 2rem); letter-spacing: -.035em; }
.tm-portal-page-heading p { max-width: 50rem; margin: .5rem 0 0; color: var(--tm-text-soft); font-size: .86rem; line-height: 1.6; }
.tm-portal-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(17rem, .65fr); gap: var(--tm-card-stack-gap); }
.tm-portal-dashboard-grid > .tm-card { min-width: 0; }
.tm-portal-welcome-card { min-height: 12rem; background: linear-gradient(145deg, color-mix(in srgb, var(--tm-brand-soft) 80%, var(--tm-card-bg)), var(--tm-card-bg)); }
.tm-portal-welcome-card h2 { font-size: 1.25rem; }
.tm-portal-readiness-list { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.1rem; }
.tm-portal-readiness-list span { border: 1px solid var(--tm-border-soft); border-radius: 999px; background: var(--tm-control-bg); color: var(--tm-text-soft); padding: .38rem .62rem; font-size: .68rem; font-weight: 700; }
.tm-portal-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.tm-portal-card-heading .tm-card-eyebrow { margin-bottom: .25rem; }
.tm-portal-card-icon { display: grid; width: 2.25rem; height: 2.25rem; place-items: center; border-radius: .7rem; background: var(--tm-brand-soft); color: var(--tm-brand-strong); font-size: .88rem; font-weight: 900; }
.tm-portal-hosting-card { grid-column: 1 / -1; }
.tm-portal-hosting-list { display: grid; gap: .5rem; margin-top: 1rem; }
.tm-portal-hosting-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--tm-border-soft); padding: .85rem 0 0; }
.tm-portal-hosting-row > div { display: grid; gap: .18rem; min-width: 0; }
.tm-portal-hosting-row span { color: var(--tm-muted); font-size: .68rem; }
.tm-portal-hosting-row strong { overflow-wrap: anywhere; font-size: .84rem; }
.tm-portal-support-card { grid-column: 1 / -1; }
.tm-portal-impersonation-banner { border-radius: 0; border-left: 0; border-right: 0; }
.tm-portal-nav-backdrop { display: none; }

@media (min-width: 901px) {
    html, body.tm-portal-body { height: 100%; overflow: hidden; }
    .tm-portal-shell { height: 100vh; min-height: 0; overflow: hidden; }
    .tm-portal-workspace { height: 100%; overflow: hidden; }
    .tm-portal-sidebar { height: 100%; overflow: hidden; }
    .tm-portal-sidebar-scroll { height: 100%; }
    .tm-portal-stage { height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
}

@media (max-width: 1100px) {
    .tm-portal-topbar { grid-template-columns: auto minmax(0, 1fr); }
    .tm-portal-brand-name { display: none; }
    .tm-portal-user-summary span { display: none; }
}

@media (max-width: 900px) {
    .tm-portal-shell { grid-template-rows: 4.25rem minmax(0, 1fr); }
    .tm-portal-topbar { grid-template-columns: minmax(0, 1fr) auto; padding: .55rem .8rem; }
    .tm-portal-menu-toggle { display: grid; }
    .tm-portal-topbar-brand { gap: .55rem; }
    .tm-portal-topbar .tm-portal-user-summary { display: none; }
    .tm-portal-workspace { display: block; min-height: 0; }
    .tm-portal-sidebar {
        position: fixed;
        z-index: 80;
        top: 4.25rem;
        bottom: 0;
        left: 0;
        width: min(19rem, 86vw);
        max-height: calc(100dvh - 4.25rem);
        overflow: hidden;
        transform: translateX(-102%);
        box-shadow: 18px 0 40px rgba(15, 23, 42, .2);
        transition: transform .18s ease;
    }
    .tm-portal-sidebar-scroll {
        height: 100%;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior-y: contain;
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
    }
    .tm-portal-nav,
    .tm-portal-mobile-tools,
    .tm-portal-sidebar-footer { flex-shrink: 0; }
    .tm-portal-shell.is-nav-open .tm-portal-sidebar { transform: translateX(0); }
    .tm-portal-nav-backdrop { position: fixed; z-index: 70; inset: 4.25rem 0 0; display: block; background: rgba(5, 15, 30, .44); overscroll-behavior: none; touch-action: none; }
    .tm-portal-nav-backdrop[hidden] { display: none; }
    .tm-portal-main-content { padding-top: 1.25rem; }
}

@media (max-width: 640px) {
    .tm-portal-topbar-actions { gap: .35rem; }
    .tm-portal-topbar .tm-text-size-control { display: none; }
    .tm-portal-topbar .tm-locale-switcher { padding: .12rem; }
    .tm-portal-signout { display: none; }
    .tm-portal-brand .tm-brand-logo-stack { width: 5.2rem; }
    .tm-portal-pagebar { min-height: 3.25rem; }
    .tm-portal-page-heading { display: grid; }
    .tm-portal-dashboard-grid { grid-template-columns: 1fr; }
    .tm-portal-hosting-card, .tm-portal-support-card { grid-column: auto; }
    .tm-portal-hosting-row { align-items: stretch; flex-direction: column; }
    .tm-portal-hosting-row form, .tm-portal-hosting-row .tm-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .tm-portal-sidebar { transition: none; }
}

/* Phase 7 / 0.7.2 – portal shell responsive + accessibility hardening */
.tm-skip-link {
    position: fixed;
    z-index: 120;
    top: .6rem;
    left: .6rem;
    transform: translateY(-180%);
    border: 2px solid var(--tm-focus);
    border-radius: .65rem;
    background: var(--tm-card-bg);
    color: var(--tm-text);
    padding: .65rem .85rem;
    font-weight: 800;
    text-decoration: none;
    box-shadow: var(--tm-shadow);
}
.tm-skip-link:focus { transform: translateY(0); }
.tm-portal-main:focus { outline: none; }
.tm-portal-mobile-tools { display: none; }
html.tm-portal-nav-lock, body.tm-portal-nav-lock { overflow: hidden; overscroll-behavior: none; }

@media (max-width: 900px) {
    .tm-portal-menu-toggle,
    .tm-portal-nav-link,
    .tm-portal-mobile-tools .tm-button,
    .tm-portal-mobile-tools .tm-theme-toggle,
    .tm-portal-mobile-tools .tm-locale-button,
    .tm-portal-mobile-tools .tm-text-size-button {
        min-height: 2.75rem;
    }
    .tm-portal-sidebar { outline: none; }
    .tm-portal-stage { min-width: 0; overflow-x: clip; }
    .tm-portal-main-content, .tm-portal-pagebar { min-width: 0; }
    .tm-portal-main-content > *, .tm-card { max-width: 100%; }
}

@media (max-width: 640px) {
    .tm-portal-topbar-actions { display: none; }
    .tm-portal-mobile-tools {
        display: grid;
        gap: .65rem;
        border-top: 1px solid var(--tm-border-soft);
        padding: .9rem .8rem 1rem;
    }
    .tm-portal-mobile-display-controls {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: .5rem;
    }
    .tm-portal-mobile-tools .tm-text-size-control,
    .tm-portal-mobile-tools .tm-theme-toggle,
    .tm-portal-mobile-tools .tm-locale-switcher {
        background: var(--tm-control-bg);
    }
    .tm-portal-mobile-tools form,
    .tm-portal-mobile-signout { width: 100%; }
    .tm-portal-sidebar { width: min(19rem, 92vw); }
    .tm-portal-page-heading h1 { overflow-wrap: anywhere; }
}

@media (forced-colors: active) {
    .tm-portal-topbar,
    .tm-portal-sidebar,
    .tm-portal-pagebar,
    .tm-card,
    .tm-portal-nav-link,
    .tm-portal-menu-toggle,
    .tm-skip-link {
        border: 1px solid CanvasText;
    }
    .tm-portal-nav-link.is-active { outline: 2px solid Highlight; outline-offset: -2px; }
    .tm-portal-nav-backdrop { background: CanvasText; opacity: .45; }
}

@media (prefers-reduced-motion: reduce) {
    .tm-skip-link { transition: none; }
}

/* Phase 7 / 0.7.3 customer authentication + recovery UX */
.tm-auth-context-note {
    display: grid;
    gap: .35rem;
    margin-top: 1.25rem;
    border: 1px solid var(--tm-border-soft);
    border-radius: .78rem;
    background: var(--tm-control-bg);
    padding: .85rem .95rem;
    color: var(--tm-text-soft);
    font-size: .78rem;
    line-height: 1.55;
}
.tm-auth-context-note strong { color: var(--tm-text); font-size: .8rem; }
.tm-form-help { margin: -.25rem 0 0; color: var(--tm-muted); font-size: .75rem; line-height: 1.5; }
.tm-portal-auth-display-controls { flex-wrap: wrap; justify-content: flex-end; }

@media (max-width: 640px) {
    .tm-portal-auth-body .tm-brand-row { display: grid; grid-template-columns: minmax(0, 1fr); }
    .tm-portal-auth-display-controls { width: 100%; justify-content: space-between; }
}

/* Phase 7 / 0.7.4 – customer dashboard operational read model */
.tm-portal-dashboard-summary-card { grid-column: 1 / -1; min-height: 0; }
.tm-portal-dashboard-scope {
    border: 1px solid var(--tm-border-soft);
    border-radius: 999px;
    background: var(--tm-control-bg);
    color: var(--tm-muted);
    padding: .4rem .65rem;
    font-size: .68rem;
    font-weight: 750;
    white-space: nowrap;
}
.tm-portal-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
    margin-top: 1rem;
}
.tm-portal-metric {
    display: grid;
    align-content: start;
    gap: .32rem;
    min-width: 0;
    border: 1px solid var(--tm-border-soft);
    border-radius: .9rem;
    background: color-mix(in srgb, var(--tm-card-bg) 82%, transparent);
    padding: 1rem;
}
.tm-portal-metric.is-attention {
    border-color: color-mix(in srgb, var(--tm-danger) 45%, var(--tm-border));
    background: color-mix(in srgb, var(--tm-danger-soft) 55%, var(--tm-card-bg));
}
.tm-portal-metric-label { color: var(--tm-muted); font-size: .7rem; font-weight: 750; }
.tm-portal-metric strong { color: var(--tm-text); font-size: clamp(1.45rem, 3vw, 2rem); line-height: 1.05; }
.tm-portal-metric small { display: grid; gap: .16rem; color: var(--tm-text-soft); font-size: .68rem; line-height: 1.45; }
.tm-portal-money-line { display: block; font-weight: 750; color: var(--tm-text); }
.tm-portal-attention-text { color: var(--tm-danger-text); font-weight: 750; }
.tm-portal-metric-action { margin-top: .15rem; width: max-content; max-width: 100%; font-size: .72rem; font-weight: 800; }
.tm-portal-assignment-list { display: grid; gap: .75rem; }
.tm-portal-assignment + .tm-portal-assignment { border-top: 1px solid var(--tm-border-soft); padding-top: .25rem; }
.tm-portal-finance-card { min-width: 0; }
.tm-portal-money-stack { display: grid; gap: .15rem; }
.tm-portal-card-note { margin: .75rem 0 0; font-size: .72rem; }

@media (max-width: 1100px) {
    .tm-portal-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .tm-portal-dashboard-summary-card { grid-column: auto; }
    .tm-portal-card-heading { flex-wrap: wrap; }
    .tm-portal-dashboard-scope { white-space: normal; }
    .tm-portal-metric-grid { grid-template-columns: 1fr; }
    .tm-portal-metric { padding: .9rem; }
}

/* Phase 7 / 0.7.5 customer master-data read */
.tm-portal-content-header,
.tm-portal-profile-account-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
}

.tm-portal-content-header {
    margin-bottom: 1.25rem;
}

.tm-portal-content-header h1,
.tm-portal-profile-account-heading h2 {
    margin: .2rem 0 .35rem;
}

.tm-portal-content-header p,
.tm-portal-profile-account-heading p {
    margin: 0;
    color: var(--tm-muted);
}

.tm-portal-readonly-badge,
.tm-mini-badge {
    display: inline-flex;
    align-items: center;
    width: max-content;
    border: 1px solid var(--tm-border);
    border-radius: 999px;
    background: var(--tm-surface);
    color: var(--tm-text-soft);
    font-weight: 700;
    white-space: nowrap;
}

.tm-portal-readonly-badge {
    padding: .45rem .7rem;
    font-size: .82rem;
}

.tm-mini-badge {
    padding: .18rem .45rem;
    font-size: .72rem;
}

.tm-portal-profile-stack {
    display: grid;
    gap: 1.5rem;
}

.tm-portal-profile-account {
    display: grid;
    gap: 1rem;
}

.tm-portal-profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.tm-portal-profile-card,
.tm-portal-profile-readonly-note,
.tm-portal-empty-card {
    min-width: 0;
}

.tm-portal-profile-card-wide {
    grid-column: 1 / -1;
}

.tm-portal-profile-list {
    display: grid;
    gap: .8rem;
}

.tm-portal-profile-list-item,
.tm-portal-tax-item,
.tm-portal-address-card {
    min-width: 0;
    border: 1px solid var(--tm-border);
    border-radius: 14px;
    background: var(--tm-surface-raised);
    padding: .9rem 1rem;
}

.tm-portal-profile-list-item header,
.tm-portal-address-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .65rem;
}

.tm-portal-address-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
}

.tm-portal-address-card address {
    display: grid;
    gap: .16rem;
    font-style: normal;
    line-height: 1.5;
}

.tm-detail-list-compact > div {
    padding-block: .42rem;
}

.tm-portal-tax-item {
    display: grid;
    grid-template-columns: minmax(8rem, .8fr) minmax(0, 1.4fr);
    gap: .25rem 1rem;
    align-items: baseline;
}

.tm-portal-tax-item span {
    overflow-wrap: anywhere;
}

.tm-portal-tax-item small {
    grid-column: 2;
    color: var(--tm-muted);
}

.tm-portal-profile-readonly-note {
    margin-top: 1rem;
}

.tm-portal-profile-readonly-note p {
    margin: .35rem 0 0;
    color: var(--tm-muted);
}

@media (max-width: 760px) {
    .tm-portal-content-header,
    .tm-portal-profile-account-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .tm-portal-profile-grid,
    .tm-portal-address-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .tm-portal-profile-card-wide {
        grid-column: auto;
    }

    .tm-portal-tax-item {
        grid-template-columns: minmax(0, 1fr);
    }

    .tm-portal-tax-item small {
        grid-column: auto;
    }
}

/* Phase 7 / 0.7.6 customer master-data self-service */
.tm-portal-selfservice-badge {
    display: inline-flex;
    align-items: center;
    width: max-content;
    border: 1px solid color-mix(in srgb, var(--tm-brand) 36%, var(--tm-border));
    border-radius: 999px;
    background: var(--tm-brand-soft);
    color: var(--tm-brand-strong);
    padding: .45rem .7rem;
    font-size: .82rem;
    font-weight: 750;
    white-space: nowrap;
}

.tm-portal-profile-account-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .65rem;
    flex-wrap: wrap;
}

.tm-alert-success {
    border-color: color-mix(in srgb, var(--tm-success) 36%, transparent);
    background: color-mix(in srgb, var(--tm-success) 10%, var(--tm-control-bg));
    color: var(--tm-text);
}

.tm-portal-profile-edit-form {
    display: grid;
    gap: 1rem;
}

.tm-portal-profile-edit-card {
    min-width: 0;
}

.tm-portal-profile-edit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem 1rem;
}

.tm-portal-profile-edit-wide {
    grid-column: 1 / -1;
}

.tm-field small {
    color: var(--tm-muted);
    font-size: .7rem;
    line-height: 1.45;
}

.tm-field-readonly {
    border: 1px solid var(--tm-border-soft);
    border-radius: .68rem;
    background: var(--tm-surface-raised);
    padding: .65rem .75rem;
}

.tm-field-readonly strong {
    overflow-wrap: anywhere;
}

.tm-portal-profile-conflict p {
    margin: .35rem 0 0;
    color: var(--tm-muted);
}

.tm-portal-profile-edit-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .75rem;
    flex-wrap: wrap;
}

.tm-portal-profile-conflict {
    max-width: 56rem;
}

.tm-portal-profile-conflict h1 {
    margin: .3rem 0 .45rem;
}

@media (max-width: 760px) {
    .tm-portal-profile-account-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .tm-portal-profile-edit-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .tm-portal-profile-edit-wide {
        grid-column: auto;
    }

    .tm-portal-profile-edit-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .tm-portal-profile-edit-actions .tm-button {
        width: 100%;
    }
}

/* Phase 7 / 0.7.7 customer contract read */
.tm-portal-contracts-stack {
    display: grid;
    gap: 1rem;
}

.tm-portal-contract-card,
.tm-portal-contract-section {
    min-width: 0;
}

.tm-portal-contract-card-heading,
.tm-portal-contract-card-footer,
.tm-portal-contract-item > header,
.tm-portal-contract-simple-list > article {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.tm-portal-contract-card-heading h2,
.tm-portal-contract-item strong {
    overflow-wrap: anywhere;
}

.tm-portal-contract-card-heading h2 {
    margin: .2rem 0 .3rem;
}

.tm-portal-contract-card-heading p,
.tm-portal-contract-item small,
.tm-portal-contract-simple-list small {
    margin: 0;
    color: var(--tm-muted);
}

.tm-portal-contract-facts,
.tm-portal-contract-item-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    margin: 1rem 0 0;
}

.tm-portal-contract-facts > div,
.tm-portal-contract-item-facts > div {
    min-width: 0;
    border: 1px solid var(--tm-border-soft);
    border-radius: .75rem;
    background: var(--tm-surface-raised);
    padding: .75rem .85rem;
}

.tm-portal-contract-facts dt,
.tm-portal-contract-item-facts dt {
    color: var(--tm-muted);
    font-size: .68rem;
    font-weight: 750;
}

.tm-portal-contract-facts dd,
.tm-portal-contract-item-facts dd {
    margin: .25rem 0 0;
    color: var(--tm-text);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.tm-portal-contract-item-facts dd small {
    display: block;
    margin-top: .15rem;
    font-weight: 500;
}

.tm-portal-contract-service-counts {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: .85rem;
}

.tm-portal-contract-service-counts > span {
    display: inline-flex;
    align-items: baseline;
    gap: .3rem;
    border-radius: 999px;
    background: var(--tm-brand-soft);
    color: var(--tm-text-soft);
    padding: .38rem .62rem;
    font-size: .72rem;
}

.tm-portal-contract-service-counts strong {
    color: var(--tm-brand-strong);
}

.tm-portal-contract-card-footer {
    align-items: center;
    margin-top: 1rem;
    border-top: 1px solid var(--tm-border-soft);
    padding-top: .85rem;
}

.tm-portal-contract-detail-header .tm-text-link {
    display: inline-flex;
    margin-bottom: .55rem;
}

.tm-portal-contract-summary-grid,
.tm-portal-contract-linked-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.tm-portal-contract-section {
    margin-top: 1rem;
}

.tm-portal-contract-item-list,
.tm-portal-contract-simple-list {
    display: grid;
    gap: .75rem;
}

.tm-portal-contract-item {
    min-width: 0;
    border: 1px solid var(--tm-border);
    border-radius: .9rem;
    background: var(--tm-surface-raised);
    padding: .9rem 1rem;
}

.tm-portal-contract-item > header > div,
.tm-portal-contract-simple-list > article > div {
    display: grid;
    gap: .15rem;
    min-width: 0;
}

.tm-portal-contract-item-facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tm-portal-contract-promotions {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: .75rem;
}

.tm-portal-contract-simple-list > article {
    align-items: center;
    min-width: 0;
    border-top: 1px solid var(--tm-border-soft);
    padding-top: .75rem;
}

.tm-portal-contract-simple-list > article:first-child {
    border-top: 0;
    padding-top: 0;
}

@media (max-width: 900px) {
    .tm-portal-contract-summary-grid,
    .tm-portal-contract-linked-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .tm-portal-contract-item-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .tm-portal-contract-card-heading,
    .tm-portal-contract-card-footer,
    .tm-portal-contract-item > header,
    .tm-portal-contract-simple-list > article {
        align-items: flex-start;
        flex-direction: column;
    }

    .tm-portal-contract-facts,
    .tm-portal-contract-item-facts {
        grid-template-columns: minmax(0, 1fr);
    }

    .tm-portal-contract-card-footer .tm-button {
        width: 100%;
        justify-content: center;
    }
}


.tm-portal-contract-cost-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: .75rem;
}

.tm-portal-contract-cost-card {
    display: grid;
    gap: .2rem;
    min-width: 0;
    border: 1px solid var(--tm-border);
    border-radius: .9rem;
    background: var(--tm-surface-raised);
    padding: .9rem 1rem;
}

.tm-portal-contract-cost-card strong {
    font-size: 1.1rem;
}

.tm-portal-contract-cost-card span,
.tm-portal-contract-cost-card small {
    color: var(--tm-text-muted);
}

/* Phase 7 / 0.7.7.4.1 compact section count badges */
.tm-heading-with-count {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .45rem;
}

.tm-count-pill-compact {
    justify-content: center;
    min-width: 1.65rem;
    height: 1.65rem;
    padding: 0 .38rem;
    line-height: 1;
    vertical-align: middle;
}

/* Phase 7 / 0.7.7.4.2 contract/profile spacing browser iteration */
.tm-heading-with-count {
    column-gap: .7rem;
    row-gap: .4rem;
}

.tm-portal-profile-card .tm-card-heading {
    margin-bottom: 1.05rem;
}

.tm-portal-address-card:only-child {
    grid-column: 1 / -1;
}

/* Phase 7 / 0.7.7.4.3 contract item heading vertical clearance */
.tm-portal-contract-items-heading {
    margin-bottom: .8rem;
}

/* Phase 7 / 0.7.8.1 – compact customer domain overview */
.tm-portal-domain-groups {
    display: grid;
    gap: 1rem;
}

.tm-portal-domain-group {
    min-width: 0;
}

.tm-portal-domain-group-heading {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin: 0 0 .55rem .1rem;
}

.tm-portal-domain-group-heading h2 {
    margin: 0;
    font-size: .92rem;
}

.tm-portal-domains-stack {
    display: grid;
    gap: .55rem;
}

.tm-card.tm-portal-domain-card {
    min-width: 0;
    padding: .82rem 1rem;
}

.tm-portal-domain-card.is-inactive {
    background: color-mix(in srgb, var(--tm-surface) 94%, var(--tm-surface-raised));
}

.tm-portal-domain-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.tm-portal-domain-card-heading h3 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.tm-portal-domain-card-heading small {
    display: block;
    margin-top: .14rem;
    color: var(--tm-muted);
    font-size: .72rem;
    overflow-wrap: anywhere;
}

.tm-portal-domain-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: .7rem 0 0;
    padding-top: .65rem;
    border-top: 1px solid var(--tm-border-soft);
}

.tm-portal-domain-facts.has-customer-account {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tm-portal-domain-facts > div {
    min-width: 0;
    padding: 0 .8rem;
    border-left: 1px solid var(--tm-border-soft);
}

.tm-portal-domain-facts > div:first-child {
    padding-left: 0;
    border-left: 0;
}

.tm-portal-domain-facts > div:last-child {
    padding-right: 0;
}

.tm-portal-domain-facts dt {
    margin-bottom: .2rem;
    color: var(--tm-muted);
    font-size: .67rem;
    font-weight: 750;
}

.tm-portal-domain-facts dd {
    margin: 0;
    font-size: .88rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.tm-portal-domain-facts dd small {
    display: block;
    margin-top: .12rem;
    color: var(--tm-muted);
    font-size: .68rem;
}

.tm-portal-domain-readonly-note {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-top: 1rem;
    padding: .75rem 1rem;
}

.tm-portal-domain-readonly-note p {
    margin: 0;
    color: var(--tm-muted);
    font-size: .78rem;
}

/* The former detail view styles remain intentionally available for legacy source
   compatibility, although /portal/domains/{domain} now redirects to the overview. */
.tm-portal-domain-detail-header .tm-text-link {
    display: inline-flex;
    margin-bottom: .65rem;
}

.tm-portal-domain-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.tm-portal-domain-section {
    min-width: 0;
    margin-bottom: 1rem;
}

.tm-portal-domain-list {
    display: grid;
    gap: 0;
}

.tm-portal-domain-list > article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid var(--tm-border-soft);
    padding: .8rem 0;
}

.tm-portal-domain-list > article:first-child {
    border-top: 0;
    padding-top: 0;
}

.tm-portal-domain-list > article:last-child {
    padding-bottom: 0;
}

.tm-portal-domain-list > article > div:first-child {
    min-width: 0;
}

.tm-portal-domain-list small {
    display: block;
    margin-top: .2rem;
    color: var(--tm-muted);
}

.tm-portal-domain-inline-badges {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .45rem;
    flex-wrap: wrap;
}

.tm-portal-domain-contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
}

.tm-portal-domain-contact-card {
    min-width: 0;
    border: 1px solid var(--tm-border);
    border-radius: 14px;
    background: var(--tm-surface-raised);
    padding: .9rem 1rem;
}

.tm-portal-domain-contact-card header {
    display: grid;
    gap: .2rem;
    margin-bottom: .65rem;
}

.tm-portal-domain-contact-card header strong,
.tm-portal-domain-contact-card dd {
    overflow-wrap: anywhere;
}

@media (max-width: 900px) {
    .tm-portal-domain-facts,
    .tm-portal-domain-facts.has-customer-account {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .65rem 0;
    }

    .tm-portal-domain-facts > div:nth-child(odd) {
        padding-left: 0;
        border-left: 0;
    }
}

@media (max-width: 700px) {
    .tm-portal-domain-detail-grid,
    .tm-portal-domain-contact-grid,
    .tm-portal-domain-facts,
    .tm-portal-domain-facts.has-customer-account {
        grid-template-columns: minmax(0, 1fr);
    }

    .tm-card.tm-portal-domain-card {
        padding: .78rem .85rem;
    }

    .tm-portal-domain-facts {
        gap: 0;
    }

    .tm-portal-domain-facts > div,
    .tm-portal-domain-facts > div:nth-child(odd) {
        padding: .5rem 0;
        border-top: 1px solid var(--tm-border-soft);
        border-left: 0;
    }

    .tm-portal-domain-facts > div:first-child {
        padding-top: 0;
        border-top: 0;
    }

    .tm-portal-domain-readonly-note {
        align-items: flex-start;
        flex-direction: column;
    }

    .tm-portal-domain-list > article {
        align-items: stretch;
        flex-direction: column;
    }

    .tm-portal-domain-inline-badges {
        justify-content: flex-start;
    }
}


/* Phase 7 / 0.7.8.3 – compact dashboard contract + domain overview */
.tm-portal-dashboard-contract-overview-card { grid-column: 1 / -1; min-width: 0; }
.tm-portal-dashboard-contract-overview-heading { align-items: center; }
.tm-portal-dashboard-contract-overview-heading h2 { margin-bottom: .2rem; }
.tm-portal-dashboard-contract-overview-heading p { max-width: 52rem; margin: .2rem 0 0; color: var(--tm-muted); font-size: .75rem; line-height: 1.5; }
.tm-portal-dashboard-contract-overview-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .65rem; }
.tm-portal-dashboard-contract-overview-list { display: grid; margin-top: .35rem; }
.tm-portal-dashboard-contract-row { display: grid; gap: .65rem; min-width: 0; border-top: 1px solid var(--tm-border-soft); padding: .85rem 0; }
.tm-portal-dashboard-contract-row:first-child { border-top: 0; padding-top: .35rem; }
.tm-portal-dashboard-contract-row:last-child { padding-bottom: .35rem; }
.tm-portal-dashboard-contract-row > header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.tm-portal-dashboard-contract-identity { display: flex; flex-wrap: wrap; align-items: baseline; gap: .45rem .85rem; min-width: 0; }
.tm-portal-dashboard-contract-identity .tm-entity-link { font-size: .83rem; font-weight: 800; white-space: nowrap; }
.tm-portal-dashboard-contract-identity strong { overflow-wrap: anywhere; font-size: .88rem; }
.tm-portal-dashboard-contract-domains { display: grid; grid-template-columns: 5rem minmax(0, 1fr); align-items: start; gap: .35rem .8rem; }
.tm-portal-dashboard-contract-domains > span { color: var(--tm-muted); font-size: .69rem; font-weight: 750; }
.tm-portal-dashboard-contract-domains > small { color: var(--tm-muted); font-size: .72rem; }
.tm-portal-dashboard-contract-domains ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .28rem 1rem; min-width: 0; margin: 0; padding: 0; list-style: none; }
.tm-portal-dashboard-contract-domains li { display: flex; align-items: baseline; gap: .4rem; min-width: 0; font-size: .76rem; }
.tm-portal-dashboard-contract-domains li::before { content: ''; flex: 0 0 auto; width: .32rem; height: .32rem; border: 1px solid var(--tm-brand-strong); border-radius: 50%; }
.tm-portal-dashboard-contract-domains li a { min-width: 0; color: var(--tm-text); overflow-wrap: anywhere; text-decoration: none; }
.tm-portal-dashboard-contract-domains li a:hover, .tm-portal-dashboard-contract-domains li a:focus-visible { color: var(--tm-brand-strong); text-decoration: underline; }
.tm-portal-dashboard-contract-domains li.is-inactive a { color: var(--tm-muted); text-decoration: line-through; }
.tm-portal-dashboard-contract-domains li small { color: var(--tm-muted); font-size: .64rem; white-space: nowrap; }
.tm-portal-dashboard-contract-pagination { display: flex; align-items: center; justify-content: center; gap: .6rem; border-top: 1px solid var(--tm-border-soft); margin-top: .5rem; padding-top: .9rem; }
.tm-portal-dashboard-contract-page-numbers { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem; }
.tm-portal-dashboard-contract-page-numbers a, .tm-portal-dashboard-contract-page-numbers span { display: inline-grid; min-width: 2rem; min-height: 2rem; place-items: center; border: 1px solid var(--tm-border-soft); border-radius: .58rem; background: var(--tm-control-bg); color: var(--tm-text-soft); padding: .25rem .4rem; font-size: .72rem; font-weight: 750; text-decoration: none; }
.tm-portal-dashboard-contract-page-numbers span[aria-current='page'] { border-color: var(--tm-brand-strong); background: var(--tm-brand-soft); color: var(--tm-brand-strong); }
.tm-portal-dashboard-contract-overview-empty { display: grid; gap: .2rem; border-top: 1px solid var(--tm-border-soft); margin-top: .35rem; padding-top: .9rem; color: var(--tm-muted); font-size: .75rem; }
.tm-portal-dashboard-contract-overview-empty strong { color: var(--tm-text); }
@media (max-width: 760px) {
    .tm-portal-dashboard-contract-overview-heading { align-items: flex-start; }
    .tm-portal-dashboard-contract-overview-actions { width: 100%; justify-content: flex-start; }
    .tm-portal-dashboard-contract-domains { grid-template-columns: 1fr; }
    .tm-portal-dashboard-contract-domains ul { grid-template-columns: 1fr; }
    .tm-portal-dashboard-contract-pagination { flex-wrap: wrap; }
}
@media (max-width: 480px) {
    .tm-portal-dashboard-contract-row > header { align-items: flex-start; }
    .tm-portal-dashboard-contract-identity { display: grid; gap: .2rem; }
}

/* Phase 7 / 0.7.9.3 – restrained cancellation action + structured confirmation pages */
.tm-portal-domain-card-heading-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: .42rem;
}

.tm-domain-icon-action {
    display: inline-grid;
    width: 1.8rem;
    height: 1.8rem;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--tm-border);
    border-radius: .52rem;
    background: var(--tm-control-bg);
    color: var(--tm-muted);
    text-decoration: none;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.tm-domain-icon-action svg {
    width: .92rem;
    height: .92rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.tm-domain-icon-action:hover,
.tm-domain-icon-action:focus-visible {
    border-color: var(--tm-input-hover);
    background: var(--tm-secondary-hover);
    color: var(--tm-text);
}

.tm-domain-icon-action-danger:hover,
.tm-domain-icon-action-danger:focus-visible {
    border-color: color-mix(in srgb, var(--tm-danger) 45%, var(--tm-border));
    background: color-mix(in srgb, var(--tm-danger-soft) 58%, var(--tm-card-bg));
    color: var(--tm-danger-text);
}

.tm-portal-cancellation-page {
    width: min(100%, 58rem);
    margin: 0 auto;
}

.tm-cancellation-entry-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1.25rem;
    padding: .85rem 1.2rem;
    border-color: var(--tm-border-soft);
    box-shadow: none;
}

.tm-cancellation-entry-copy {
    flex: 1 1 26rem;
    min-width: 0;
}

.tm-cancellation-entry-copy h2 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.35;
}

.tm-cancellation-entry-copy p {
    margin: .2rem 0 0;
    color: var(--tm-text-soft);
    font-size: .875rem;
    line-height: 1.5;
}

.tm-cancellation-entry-action:not(:hover) {
    background: transparent;
}

@media (max-width: 700px) {
    .tm-cancellation-entry-card { padding-inline: .95rem; }
}

.tm-cancellation-card {
    padding: 1.45rem 1.55rem;
}

.tm-cancellation-heading {
    display: grid;
    gap: .3rem;
    margin-bottom: 1rem;
}

.tm-cancellation-heading .tm-card-eyebrow {
    margin-bottom: .15rem;
}

.tm-cancellation-heading h1 {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.tm-cancellation-heading p {
    max-width: 48rem;
    margin: 0;
    color: var(--tm-text-soft);
    font-size: .82rem;
    line-height: 1.55;
}

.tm-cancellation-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
    margin: 0;
}

.tm-cancellation-facts > div {
    min-width: 0;
    border: 1px solid var(--tm-border-soft);
    border-radius: .72rem;
    background: var(--tm-surface-raised);
    padding: .72rem .8rem;
}

.tm-cancellation-facts dt {
    margin: 0 0 .22rem;
    color: var(--tm-muted);
    font-size: .68rem;
    font-weight: 700;
}

.tm-cancellation-facts dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--tm-text);
    font-size: .84rem;
    font-weight: 700;
}

.tm-callout {
    margin-top: .85rem;
    border: 1px solid var(--tm-border-soft);
    border-radius: .76rem;
    background: var(--tm-control-bg);
    padding: .78rem .88rem;
}

.tm-callout strong {
    display: block;
    margin-bottom: .18rem;
    font-size: .8rem;
}

.tm-callout p {
    margin: 0;
    color: var(--tm-text-soft);
    font-size: .78rem;
    line-height: 1.55;
}

.tm-callout-warning {
    border-color: color-mix(in srgb, #d88a00 34%, var(--tm-border));
    background: color-mix(in srgb, #d88a00 7%, var(--tm-card-bg));
}

.tm-callout-danger {
    border-color: color-mix(in srgb, var(--tm-danger) 38%, var(--tm-border));
    background: color-mix(in srgb, var(--tm-danger-soft) 48%, var(--tm-card-bg));
}

.tm-callout-danger strong {
    color: var(--tm-danger-text);
}

.tm-cancellation-domain-list {
    margin-top: .85rem;
    border: 1px solid var(--tm-border-soft);
    border-radius: .76rem;
    background: var(--tm-surface-raised);
    padding: .82rem .9rem;
}

.tm-cancellation-domain-list > strong {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .8rem;
}

.tm-cancellation-domain-list ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .32rem 1rem;
    margin: .65rem 0 0;
    padding: 0;
    list-style: none;
}

.tm-cancellation-domain-list li {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--tm-text-soft);
    font-size: .77rem;
}

.tm-cancellation-domain-list li::before {
    content: '•';
    margin-right: .4rem;
    color: var(--tm-brand-strong);
}

.tm-cancellation-form {
    display: grid;
    gap: .85rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--tm-border-soft);
}

.tm-cancellation-form .tm-field textarea {
    min-height: 5.4rem;
}

.tm-check-row {
    display: flex;
    align-items: flex-start;
    gap: .58rem;
    color: var(--tm-text-soft);
    font-size: .78rem;
    line-height: 1.5;
}

.tm-check-row input {
    flex: 0 0 auto;
    margin-top: .18rem;
}

.tm-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: .58rem;
}

.tm-button-danger {
    border-color: color-mix(in srgb, var(--tm-danger) 52%, transparent);
    background: var(--tm-danger);
    color: #fff;
}

.tm-button-danger:hover,
.tm-button-danger:focus-visible {
    filter: brightness(.96);
}

@media (max-width: 700px) {
    .tm-portal-domain-card-heading-actions {
        align-items: flex-start;
    }

    .tm-cancellation-card {
        padding: 1rem;
    }

    .tm-cancellation-facts,
    .tm-cancellation-domain-list ul {
        grid-template-columns: minmax(0, 1fr);
    }

    .tm-form-actions {
        justify-content: flex-start;
    }
}


/* Phase 7 / 0.7.9.4 – customer Transfer-Out/Auth-Code */
.tm-callout-info {
    border-color: color-mix(in srgb, var(--tm-brand-strong) 28%, var(--tm-border));
    background: color-mix(in srgb, var(--tm-brand-soft) 52%, var(--tm-card-bg));
}

.tm-transfer-code-box {
    display: grid;
    gap: .45rem;
    margin-top: .95rem;
    border: 1px solid var(--tm-border-soft);
    border-radius: .76rem;
    background: var(--tm-surface-raised);
    padding: .9rem;
}

.tm-transfer-code-box > label {
    color: var(--tm-muted);
    font-size: .7rem;
    font-weight: 750;
}

.tm-transfer-code-row {
    display: flex;
    align-items: stretch;
    gap: .55rem;
}

.tm-transfer-code-row input {
    min-width: 0;
    flex: 1 1 auto;
    border: 1px solid var(--tm-border);
    border-radius: .65rem;
    background: var(--tm-control-bg);
    color: var(--tm-text);
    padding: .66rem .75rem;
    font: 700 .88rem/1.35 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    letter-spacing: .02em;
}

.tm-transfer-copy {
    flex: 0 0 auto;
}

.tm-transfer-copy-status {
    min-height: 1.15em;
    color: var(--tm-muted);
    font-size: .68rem;
}

.tm-transfer-result-actions {
    margin-top: 1rem;
}

@media (max-width: 560px) {
    .tm-transfer-code-row {
        align-items: stretch;
        flex-direction: column;
    }
    .tm-transfer-copy {
        align-self: flex-start;
    }
}

/* Phase 7 / 0.7.9.4.5 – registrar action button spacing */
.tm-cancellation-provider-actions .tm-inline-form + .tm-inline-form {
    margin-top: .45rem;
}


.tm-portal-contract-status-badges {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
}

@media (max-width: 720px) {
    .tm-portal-contract-status-badges {
        justify-content: flex-start;
    }
}

/* Phase 7 / 0.7.10 customer hosting read */
.tm-portal-hosting-stack {
    display: grid;
    gap: var(--tm-card-stack-gap, .45rem);
}

.tm-card.tm-portal-hosting-overview-card {
    min-width: 0;
    padding: .9rem 1rem;
}

.tm-portal-hosting-card-heading,
.tm-portal-hosting-card-footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.tm-portal-hosting-card-heading h2 {
    margin: .2rem 0 .2rem;
    font-size: 1.05rem;
    overflow-wrap: anywhere;
}

.tm-portal-hosting-card-heading p {
    margin: 0;
    color: var(--tm-muted);
}

.tm-portal-hosting-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: .75rem 0 0;
    padding-top: .7rem;
    border-top: 1px solid var(--tm-border-soft);
}

.tm-portal-hosting-facts > div {
    min-width: 0;
    padding: 0 .8rem;
    border-left: 1px solid var(--tm-border-soft);
}

.tm-portal-hosting-facts > div:first-child {
    padding-left: 0;
    border-left: 0;
}

.tm-portal-hosting-facts > div:last-child {
    padding-right: 0;
}

.tm-portal-hosting-facts dt,
.tm-portal-hosting-limit-list dt {
    color: var(--tm-muted);
    font-size: .68rem;
    font-weight: 750;
}

.tm-portal-hosting-facts dd,
.tm-portal-hosting-limit-list dd {
    margin: .2rem 0 0;
    overflow-wrap: anywhere;
}

.tm-portal-hosting-service-counts {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: .75rem;
}

.tm-portal-hosting-service-counts > span {
    display: inline-flex;
    align-items: baseline;
    gap: .3rem;
    border-radius: 999px;
    background: var(--tm-brand-soft);
    color: var(--tm-text-soft);
    padding: .38rem .62rem;
    font-size: .72rem;
}

.tm-portal-hosting-service-counts strong {
    color: var(--tm-brand-strong);
}

.tm-portal-hosting-card-footer {
    align-items: center;
    margin-top: .85rem;
    border-top: 1px solid var(--tm-border-soft);
    padding-top: .75rem;
}

.tm-portal-hosting-detail-header .tm-text-link {
    display: inline-flex;
    margin-bottom: .55rem;
}

.tm-portal-hosting-summary-grid,
.tm-portal-hosting-data-grid,
.tm-portal-hosting-services-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--tm-card-stack-gap, .45rem);
}

.tm-portal-hosting-section {
    min-width: 0;
}

.tm-portal-hosting-services-grid h3 {
    margin: 0 0 .55rem;
    font-size: .9rem;
}

.tm-portal-hosting-limit-list {
    display: grid;
    gap: .45rem;
    margin: 0;
}

.tm-portal-hosting-limit-list > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .75rem;
    border-bottom: 1px solid var(--tm-border-soft);
    padding-bottom: .42rem;
}

.tm-portal-hosting-limit-list dd {
    text-align: right;
    font-weight: 700;
}

.tm-portal-hosting-limit-list dd small {
    display: block;
    color: var(--tm-muted);
    font-weight: 500;
}

.tm-portal-hosting-feature-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .45rem .8rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tm-portal-hosting-feature-list li {
    border: 1px solid var(--tm-border-soft);
    border-radius: .65rem;
    background: var(--tm-surface-raised);
    padding: .55rem .7rem;
    overflow-wrap: anywhere;
}

@media (max-width: 700px) {
    .tm-portal-hosting-card-heading,
    .tm-portal-hosting-card-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .tm-portal-hosting-facts,
    .tm-portal-hosting-summary-grid,
    .tm-portal-hosting-data-grid,
    .tm-portal-hosting-services-grid,
    .tm-portal-hosting-feature-list {
        grid-template-columns: 1fr;
    }

    .tm-portal-hosting-facts {
        gap: .55rem;
    }

    .tm-portal-hosting-facts > div {
        padding: 0 0 .55rem;
        border-left: 0;
        border-bottom: 1px solid var(--tm-border-soft);
    }

    .tm-portal-hosting-facts > div:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }

    .tm-portal-hosting-card-footer .tm-button {
        width: 100%;
    }
}

/* Phase 7 / 0.7.10.2 – Hosting spacing browser iteration
   Keep compact data tables while restoring the established portal card rhythm. */
.tm-portal-hosting-index-header .tm-card-eyebrow,
.tm-portal-hosting-detail-header .tm-card-eyebrow,
.tm-portal-hosting-card-heading .tm-card-eyebrow,
.tm-portal-hosting-summary-grid .tm-card-eyebrow,
.tm-portal-hosting-section .tm-card-eyebrow,
.tm-portal-hosting-data-grid .tm-card-eyebrow {
    margin-bottom: .4rem;
}

.tm-portal-hosting-stack {
    gap: 1rem;
}

.tm-card.tm-portal-hosting-overview-card {
    padding: 1.15rem 1.25rem;
}

.tm-portal-hosting-summary-grid,
.tm-portal-hosting-data-grid,
.tm-portal-hosting-services-grid {
    gap: 1rem;
}

.tm-portal-hosting-summary-grid {
    margin-bottom: 1rem;
}

.tm-portal-hosting-section {
    margin-bottom: 1rem;
}

.tm-portal-hosting-section.tm-table-card > .tm-card-heading,
.tm-portal-hosting-data-grid .tm-table-card > .tm-card-heading {
    padding: 1.15rem 1.2rem .8rem;
}

.tm-portal-hosting-section.tm-table-card > .tm-card-heading h2,
.tm-portal-hosting-data-grid .tm-table-card > .tm-card-heading h2 {
    line-height: 1.35;
}

.tm-portal-hosting-section.tm-table-card > .tm-muted,
.tm-portal-hosting-data-grid .tm-table-card > .tm-muted {
    margin: 0;
    padding: 0 1.2rem 1.15rem;
}

.tm-portal-hosting-section .tm-table th,
.tm-portal-hosting-section .tm-table td,
.tm-portal-hosting-data-grid .tm-table th,
.tm-portal-hosting-data-grid .tm-table td {
    padding-inline: 1.2rem;
}

@media (max-width: 700px) {
    .tm-card.tm-portal-hosting-overview-card {
        padding: 1rem;
    }

    .tm-portal-hosting-section.tm-table-card > .tm-card-heading,
    .tm-portal-hosting-data-grid .tm-table-card > .tm-card-heading {
        padding: 1rem .95rem .72rem;
    }

    .tm-portal-hosting-section.tm-table-card > .tm-muted,
    .tm-portal-hosting-data-grid .tm-table-card > .tm-muted {
        padding: 0 .95rem 1rem;
    }

    .tm-portal-hosting-section .tm-table th,
    .tm-portal-hosting-section .tm-table td,
    .tm-portal-hosting-data-grid .tm-table th,
    .tm-portal-hosting-data-grid .tm-table td {
        padding-inline: .95rem;
    }

}


/* Phase 7 / 0.7.11 – prominent, target-grouped Plesk SSO entry */
.tm-portal-plesk-card {
    grid-column: 1 / -1;
    display: grid;
    gap: .9rem;
}
.tm-portal-plesk-heading {
    align-items: center;
    gap: 1rem;
}
.tm-portal-plesk-heading > div {
    min-width: 0;
}
.tm-portal-plesk-heading h2 {
    margin-bottom: .2rem;
}
.tm-portal-plesk-heading p {
    max-width: 52rem;
    margin: .2rem 0 0;
    color: var(--tm-muted);
    font-size: .76rem;
    line-height: 1.5;
}
.tm-portal-plesk-primary-action {
    flex: 0 0 auto;
}
.tm-portal-plesk-target-list {
    display: grid;
    gap: .6rem;
    border-top: 1px solid var(--tm-border-soft);
    padding-top: .9rem;
}
.tm-portal-plesk-target-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.tm-portal-plesk-target-row > div {
    display: grid;
    gap: .2rem;
    min-width: 0;
}
.tm-portal-plesk-target-row span {
    color: var(--tm-muted);
    font-size: .68rem;
}
.tm-portal-plesk-target-row strong {
    overflow-wrap: anywhere;
    font-size: .82rem;
}
.tm-portal-plesk-note {
    margin: 0;
    color: var(--tm-muted);
    font-size: .7rem;
}
@media (max-width: 720px) {
    .tm-portal-plesk-card { grid-column: auto; }
    .tm-portal-plesk-heading { align-items: stretch; }
    .tm-portal-plesk-heading,
    .tm-portal-plesk-target-row {
        flex-direction: column;
        align-items: stretch;
    }
    .tm-portal-plesk-primary-action,
    .tm-portal-plesk-primary-action .tm-button,
    .tm-portal-plesk-target-row form,
    .tm-portal-plesk-target-row .tm-button {
        width: 100%;
    }
}

/* Phase 7 / 0.7.12 – Customer invoices + PDF */
.tm-portal-invoice-header { margin-bottom: 1rem; }
.tm-portal-invoice-warning,
.tm-portal-invoice-card,
.tm-portal-invoice-boundary { margin-bottom: 1rem; }
.tm-portal-invoice-warning { padding: 1rem 1.2rem; }
.tm-portal-invoice-warning strong { display: block; margin-bottom: .3rem; }
.tm-portal-invoice-warning p { margin: 0; color: var(--tm-muted); }
.tm-portal-invoice-card { overflow: hidden; }
.tm-portal-invoice-card .tm-table-wrap { overflow-x: auto; }
.tm-portal-invoice-table th,
.tm-portal-invoice-table td { padding-inline: 1.2rem; vertical-align: middle; }
.tm-portal-invoice-table td small { display: block; margin-top: .2rem; color: var(--tm-muted); }
.tm-portal-invoice-table th.tm-portal-invoice-action-heading,
.tm-portal-invoice-table td.tm-portal-invoice-action-cell { text-align: right; }
.tm-portal-invoice-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .5rem; }
.tm-portal-invoice-pdf,
.tm-portal-invoice-pay { white-space: nowrap; }
/* Document families keep the language links together and do not duplicate invoice rows. */
.tm-portal-invoice-table td.tm-portal-invoice-amount { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tm-portal-invoice-actions { align-items: center; gap: .55rem; }
.tm-portal-invoice-document-group {
    display: flex; flex-direction: column; align-self: stretch;
    justify-content: flex-start; align-items: center; gap: .3rem; text-align: center;
    min-width: 9.5rem; max-width: 15rem;
    padding: .5rem .65rem; border: 1px solid var(--tm-border-soft);
    border-radius: .65rem; background: var(--tm-surface-raised);
}
.tm-portal-invoice-document-title { font-weight: 700; font-size: .79rem; line-height: 1.35; overflow-wrap: anywhere; }
.tm-portal-invoice-document-number { font-size: .72rem; color: var(--tm-muted); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tm-portal-invoice-document-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; margin-top: auto; width: 100%; }
.tm-portal-invoice-document-links .tm-portal-invoice-pdf {
    min-height: 2rem; min-width: 2.5rem; padding: .35rem .65rem;
    border-radius: .5rem; font-size: .76rem; background: var(--tm-card-bg); gap: .3rem;
}
.tm-portal-invoice-document-links .tm-portal-invoice-pdf-icon { width: .95rem; height: .95rem; flex: 0 0 .95rem; }
.tm-portal-invoice-document-links .tm-portal-invoice-pdf:hover { background: var(--tm-secondary-hover); }
.tm-portal-invoice-document-links .tm-portal-invoice-pdf:focus-visible { outline: 2px solid var(--tm-brand); outline-offset: 2px; }
.tm-portal-invoice-document-group--historical-test { border-color: var(--tm-warning); }
@media (max-width: 760px) {
    .tm-portal-invoice-card { background: transparent; border: 0; box-shadow: none; overflow: visible; }
    .tm-portal-invoice-card .tm-table-wrap { overflow: visible; }
    .tm-portal-invoice-table,
    .tm-portal-invoice-table tbody,
    .tm-portal-invoice-table tr,
    .tm-portal-invoice-table td { display: block; width: 100%; }
    .tm-portal-invoice-table thead { display: none; }
    .tm-portal-invoice-table tr {
        margin-bottom: 1rem;
        border: 1px solid var(--tm-border-soft);
        border-radius: .85rem;
        background: var(--tm-surface);
        box-shadow: var(--tm-shadow-soft);
        padding: .45rem 1rem;
    }
    .tm-portal-invoice-table td {
        display: grid;
        grid-template-columns: minmax(7.5rem, 38%) 1fr;
        gap: .75rem;
        align-items: center;
        padding: .65rem 0;
        border-bottom: 1px solid var(--tm-border-soft);
        text-align: left;
    }
    .tm-portal-invoice-table td { grid-template-columns: minmax(0, 40%) minmax(0, 1fr); overflow-wrap: anywhere; }
    .tm-portal-invoice-table td .tm-badge { white-space: normal; max-width: 100%; }
    .tm-portal-invoice-table td:last-child { border-bottom: 0; }
    .tm-portal-invoice-table td::before {
        content: attr(data-label);
        color: var(--tm-muted);
        font-size: .72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .04em;
    }
    .tm-portal-invoice-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
    .tm-portal-invoice-table td.tm-portal-invoice-action-cell { grid-template-columns: minmax(0, 1fr); gap: .45rem; text-align: left; }
    .tm-portal-invoice-action-cell .tm-button { width: 100%; }
    .tm-portal-invoice-document-group { min-width: 0; max-width: none; gap: .4rem; }
    .tm-portal-invoice-document-links { margin: 0; }
    .tm-portal-invoice-document-links .tm-portal-invoice-pdf { width: auto; min-height: 2.75rem; min-width: 2.75rem; }
}

/* Phase 7 / 0.7.13 – Customer payments, open amounts and credit */
.tm-portal-payment-header { margin-bottom: var(--tm-card-stack-gap); }
.tm-portal-payment-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--tm-card-stack-gap);
    margin-bottom: var(--tm-card-stack-gap);
}
.tm-portal-payment-summary-card { display: grid; gap: .5rem; }
.tm-portal-payment-summary-card h2 { margin: 0; }
.tm-portal-payment-summary-card small { color: var(--tm-muted); line-height: 1.45; }
.tm-portal-payment-money-stack { display: grid; gap: .15rem; }
.tm-portal-payment-money-stack strong { font-size: 1.15rem; }
.tm-portal-payment-card,
.tm-portal-payment-boundary { margin-bottom: var(--tm-card-stack-gap); }
.tm-portal-payment-card .tm-table-wrap { overflow-x: auto; }
.tm-portal-payment-card .tm-portal-card-heading { padding: 1rem 1.2rem .6rem; }
.tm-portal-payment-card .tm-portal-card-heading p { margin: .25rem 0 0; color: var(--tm-muted); }
.tm-portal-payment-empty { display: grid; gap: .25rem; padding: .6rem 1.2rem 1.2rem; }
.tm-portal-payment-empty span { color: var(--tm-muted); }
.tm-portal-payment-table th,
.tm-portal-payment-table td { padding-inline: 1.2rem; vertical-align: middle; }
.tm-portal-payment-table td small { display: block; margin-top: .2rem; }
.tm-portal-payment-table tr.is-attention td { background: color-mix(in srgb, var(--tm-warning) 7%, transparent); }
@media (max-width: 760px) {
    .tm-portal-payment-summary-grid { grid-template-columns: 1fr; }
    .tm-portal-payment-card { background: transparent; border: 0; box-shadow: none; overflow: visible; }
    .tm-portal-payment-card .tm-portal-card-heading { padding-inline: 0; }
    .tm-portal-payment-card .tm-table-wrap { overflow: visible; }
    .tm-portal-payment-table,
    .tm-portal-payment-table tbody,
    .tm-portal-payment-table tr,
    .tm-portal-payment-table td { display: block; width: 100%; }
    .tm-portal-payment-table thead { display: none; }
    .tm-portal-payment-table tr {
        margin-bottom: var(--tm-card-stack-gap);
        border: 1px solid var(--tm-border-soft);
        border-radius: .85rem;
        background: var(--tm-surface);
        box-shadow: var(--tm-shadow-soft);
        padding: .45rem 1rem;
    }
    .tm-portal-payment-table td {
        display: grid;
        grid-template-columns: minmax(7.5rem, 38%) 1fr;
        gap: .75rem;
        align-items: center;
        padding: .65rem 0;
        border-bottom: 1px solid var(--tm-border-soft);
    }
    .tm-portal-payment-table td:last-child { border-bottom: 0; }
    .tm-portal-payment-table td::before {
        content: attr(data-label);
        color: var(--tm-muted);
        font-size: .72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .04em;
    }
}

/* Phase 7 / 0.7.14 – customer account + authenticated password change */
.tm-portal-account-header { margin-bottom: var(--tm-card-stack-gap); }
.tm-portal-account-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--tm-card-stack-gap);
    margin-bottom: var(--tm-card-stack-gap);
}
.tm-portal-account-card,
.tm-portal-account-password-card,
.tm-portal-account-boundary { min-width: 0; }
.tm-portal-account-facts { display: grid; gap: .8rem; margin: 0; }
.tm-portal-account-facts > div {
    display: grid;
    grid-template-columns: minmax(8.5rem, .8fr) minmax(0, 1.2fr);
    gap: .8rem;
    align-items: center;
    border-bottom: 1px solid var(--tm-border-soft);
    padding-bottom: .7rem;
}
.tm-portal-account-facts > div:last-child { border-bottom: 0; padding-bottom: 0; }
.tm-portal-account-facts dt { color: var(--tm-muted); font-size: .76rem; font-weight: 700; }
.tm-portal-account-facts dd { margin: 0; overflow-wrap: anywhere; }
.tm-portal-account-note { margin: .9rem 0 0; color: var(--tm-muted); line-height: 1.5; }
.tm-portal-account-memberships { display: grid; gap: .55rem; }
.tm-portal-account-membership {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    border: 1px solid var(--tm-border-soft);
    border-radius: .75rem;
    background: var(--tm-surface-raised);
    padding: .75rem .85rem;
}
.tm-portal-account-membership span { color: var(--tm-muted); font-size: .78rem; }
.tm-portal-account-password-card { margin-bottom: var(--tm-card-stack-gap); }
.tm-portal-account-password-card .tm-card-heading p { margin: .25rem 0 0; color: var(--tm-muted); }
.tm-portal-account-password-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem 1rem;
    margin-top: 1rem;
}
.tm-portal-account-password-wide { grid-column: 1 / -1; }
.tm-portal-account-password-actions { display: flex; justify-content: flex-end; }
.tm-portal-account-boundary {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: .9rem;
    align-items: start;
    margin-bottom: var(--tm-card-stack-gap);
}
.tm-portal-account-boundary p { margin: .3rem 0 0; color: var(--tm-muted); }
@media (max-width: 760px) {
    .tm-portal-account-grid,
    .tm-portal-account-password-form { grid-template-columns: minmax(0, 1fr); }
    .tm-portal-account-password-wide { grid-column: auto; }
    .tm-portal-account-facts > div { grid-template-columns: minmax(0, 1fr); gap: .25rem; }
    .tm-portal-account-membership { align-items: flex-start; flex-direction: column; }
    .tm-portal-account-boundary { grid-template-columns: minmax(0, 1fr); }
    .tm-portal-account-password-actions .tm-button { width: 100%; }
}

/* Phase 7 / 0.7.14.1 – verified sign-in email change */
.tm-portal-account-email-card { margin-bottom: var(--tm-card-stack-gap); }
.tm-portal-account-email-card .tm-card-heading p { margin: .25rem 0 0; color: var(--tm-muted); }
.tm-portal-account-email-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem 1rem;
    margin-top: 1rem;
}
.tm-portal-account-email-wide { grid-column: 1 / -1; }
.tm-portal-account-email-actions { display: flex; justify-content: flex-end; }
.tm-portal-account-email-pending {
    display: grid;
    gap: .8rem;
    margin-top: .9rem;
    padding: .9rem;
    border: 1px solid var(--tm-border-soft);
    border-radius: .8rem;
    background: var(--tm-surface-raised);
}
.tm-portal-account-email-pending p { margin: .25rem 0 0; color: var(--tm-muted); line-height: 1.5; }
.tm-portal-account-code-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: .75rem;
    align-items: end;
}
@media (max-width: 760px) {
    .tm-portal-account-email-form,
    .tm-portal-account-code-form { grid-template-columns: minmax(0, 1fr); }
    .tm-portal-account-email-wide { grid-column: auto; }
    .tm-portal-account-email-actions .tm-button,
    .tm-portal-account-code-form .tm-button,
    .tm-portal-account-email-pending form > .tm-button { width: 100%; }
}

/* Phase 7 / 0.7.15.22.5 – existing-customer order checkout browser spacing */
.tm-portal-order-page-header {
    margin-bottom: 1.5rem;
}
.tm-portal-order-page-header .tm-card-eyebrow {
    margin-bottom: .45rem;
}
.tm-portal-order-stack {
    display: grid;
    gap: 1rem;
}
.tm-portal-order-stack > * {
    min-width: 0;
    margin-top: 0;
    margin-bottom: 0;
}
.tm-portal-order-form {
    gap: 1rem;
}
.tm-card.tm-portal-order-card {
    display: grid;
    gap: .75rem;
    min-width: 0;
}
.tm-portal-order-card > h2,
.tm-portal-order-card > p,
.tm-portal-order-card > ul {
    margin-block: 0;
}
.tm-portal-order-card > p {
    max-width: 52rem;
}
.tm-portal-order-card .tm-card-eyebrow {
    margin-bottom: 0;
}
.tm-portal-order-option-list,
.tm-portal-order-domain-list {
    display: grid;
    gap: .6rem;
}
.tm-portal-order-option-list .tm-check-row {
    min-height: 1.55rem;
}
.tm-portal-order-blocker {
    gap: .5rem;
}
.tm-portal-order-blocker ul {
    display: grid;
    gap: .28rem;
    padding-left: 1.15rem;
    color: var(--tm-text-soft);
    line-height: 1.5;
}
.tm-portal-order-card-actions {
    margin-top: .1rem;
}
.tm-portal-order-refresh-actions {
    padding-top: .1rem;
}
.tm-portal-order-summary-card .tm-portal-account-facts {
    margin-top: .1rem;
}

@media (max-width: 700px) {
    .tm-portal-order-page-header {
        margin-bottom: 1.25rem;
    }
    .tm-portal-order-stack,
    .tm-portal-order-form {
        gap: .85rem;
    }
    .tm-portal-order-refresh-actions .tm-button,
    .tm-portal-order-card-actions .tm-button {
        width: 100%;
    }
}

.tm-portal-order-card > .tm-button {
    justify-self: start;
}

/* Phase 7 / 0.7.15.22.6 – intent-first existing-customer ordering */
.tm-portal-order-intent-card .tm-portal-card-heading {
    margin-bottom: .15rem;
}
.tm-portal-order-intent-card .tm-portal-card-heading p {
    max-width: 60rem;
    margin: .35rem 0 0;
}
.tm-portal-order-intent-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
}
.tm-portal-order-intent-option {
    display: grid;
    align-content: start;
    gap: .72rem;
    min-width: 0;
    border: 1px solid var(--tm-border-soft);
    border-radius: .9rem;
    background: var(--tm-surface-raised);
    padding: 1rem;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.tm-portal-order-intent-option.is-selected {
    border-color: color-mix(in srgb, var(--tm-brand) 52%, var(--tm-border-soft));
    background: color-mix(in srgb, var(--tm-brand-soft) 42%, var(--tm-surface-raised));
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--tm-brand-soft) 72%, transparent);
}
.tm-portal-order-intent-option.is-muted {
    opacity: .78;
}
.tm-portal-order-intent-option-wide {
    grid-column: 1 / -1;
}
.tm-portal-order-intent-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
}
.tm-portal-order-intent-heading h3 {
    margin: 0;
    font-size: .93rem;
    line-height: 1.35;
}
.tm-portal-order-intent-option p {
    margin: 0;
    color: var(--tm-text-soft);
    font-size: .79rem;
    line-height: 1.55;
}
.tm-portal-order-intent-option > .tm-button {
    justify-self: start;
    margin-top: auto;
}
.tm-portal-order-intent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}
.tm-portal-order-domain-help {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .6rem;
}
.tm-portal-order-domain-help > div {
    display: grid;
    gap: .2rem;
    border-left: 3px solid var(--tm-border);
    padding: .2rem 0 .2rem .7rem;
}
.tm-portal-order-domain-help strong {
    font-size: .75rem;
}
.tm-portal-order-domain-help span {
    color: var(--tm-muted);
    font-size: .71rem;
    line-height: 1.45;
}

@media (max-width: 760px) {
    .tm-portal-order-intent-grid,
    .tm-portal-order-domain-help {
        grid-template-columns: minmax(0, 1fr);
    }
    .tm-portal-order-intent-option-wide {
        grid-column: auto;
    }
    .tm-portal-order-intent-heading {
        flex-direction: column;
        gap: .45rem;
    }
    .tm-portal-order-intent-option > .tm-button,
    .tm-portal-order-intent-actions .tm-button {
        width: 100%;
    }
}


/* Phase 7 / 0.7.15.22.7 – intent action anchors */
.tm-portal-order-scroll-target {
    scroll-margin-top: 5.5rem;
}

/* Phase 7 / 0.7.15.22.8 – progressive domain availability flow */
.tm-portal-order-domain-row {
    display: grid;
    gap: .55rem;
    min-width: 0;
}
.tm-portal-order-domain-fields {
    display: grid;
    grid-template-columns: minmax(11rem, .82fr) minmax(16rem, 1fr) max-content;
    gap: .65rem;
    align-items: end;
}
.tm-portal-order-domain-name {
    min-width: 0;
}
.tm-portal-order-domain-check {
    align-self: stretch;
    white-space: nowrap;
}
.tm-portal-order-domain-result {
    border: 1px solid var(--tm-border-soft);
    border-radius: .7rem;
    padding: .65rem .75rem;
    font-size: .78rem;
    line-height: 1.5;
}
.tm-portal-order-domain-result.is-success {
    border-color: color-mix(in srgb, #2f8f5b 45%, var(--tm-border-soft));
    background: color-mix(in srgb, #2f8f5b 9%, var(--tm-surface-raised));
}
.tm-portal-order-domain-result.is-warning {
    border-color: color-mix(in srgb, #a56a00 42%, var(--tm-border-soft));
    background: color-mix(in srgb, #a56a00 8%, var(--tm-surface-raised));
}
.tm-portal-order-domain-result.is-error {
    border-color: color-mix(in srgb, #b74646 42%, var(--tm-border-soft));
    background: color-mix(in srgb, #b74646 8%, var(--tm-surface-raised));
}
.tm-portal-order-domain-result.is-info {
    background: var(--tm-surface-raised);
}
.tm-portal-order-domain-row.is-disabled {
    opacity: .58;
}
.tm-portal-order-without-domain {
    border-top: 1px solid var(--tm-border-soft);
    padding-top: .7rem;
}
.tm-portal-order-without-domain span {
    display: grid;
    gap: .15rem;
}
.tm-portal-order-without-domain small {
    color: var(--tm-muted);
    font-weight: 400;
    line-height: 1.45;
}

@media (max-width: 860px) {
    .tm-portal-order-domain-fields {
        grid-template-columns: minmax(0, 1fr);
    }
    .tm-portal-order-domain-check {
        width: 100%;
    }
}
.tm-portal-order-stack [hidden] {
    display: none !important;
}

/* Phase 7 / 0.7.15.22.11 – domain alternatives + preserved intent navigation */
.tm-portal-order-domain-suggestions {
    display: grid;
    gap: .55rem;
    padding: .15rem .05rem .1rem;
}
.tm-portal-order-domain-suggestions > strong {
    font-size: .76rem;
}
.tm-portal-order-domain-suggestion-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.tm-portal-order-domain-suggestion {
    min-height: 2.25rem;
}
@media (max-width: 620px) {
    .tm-portal-order-domain-suggestion-actions,
    .tm-portal-order-domain-suggestion {
        width: 100%;
    }
}

/* Phase 7 / 0.7.15.22.13 – single-purpose domain-only row */
.tm-portal-order-domain-fields.is-domain-only {
    grid-template-columns: minmax(0, 1fr) max-content;
}
@media (max-width: 860px) {
    .tm-portal-order-domain-fields.is-domain-only {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Phase 7 / 0.7.15.22.15 – live server-rendered order summary */
.tm-portal-order-summary-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}
.tm-portal-order-summary-heading h2 { margin: 0; }
button.tm-domain-icon-action { padding: 0; cursor: pointer; font: inherit; }
.tm-portal-order-summary-card[aria-busy='true'] .tm-portal-order-summary-content {
    opacity: .62;
    transition: opacity .15s ease;
}
.tm-portal-order-summary-card[aria-busy='false'] .tm-portal-order-summary-content {
    opacity: 1;
    transition: opacity .15s ease;
}
@media (prefers-reduced-motion: reduce) {
    .tm-portal-order-summary-card .tm-portal-order-summary-content { transition: none; }
}

/* Phase 7 / 0.7.15.22.17 – compact horizontal payment choices */
.tm-portal-order-payment-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}
.tm-portal-order-payment-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: .75rem;
    min-height: 4.35rem;
    padding: .8rem .9rem;
    border: 1px solid var(--tm-border-soft);
    border-radius: .8rem;
    background: var(--tm-surface-raised);
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.tm-portal-order-payment-option:has(input:checked) {
    border-color: color-mix(in srgb, var(--tm-brand) 58%, var(--tm-border-soft));
    background: color-mix(in srgb, var(--tm-brand-soft) 38%, var(--tm-surface-raised));
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--tm-brand-soft) 66%, transparent);
}
.tm-portal-order-payment-option input[type="radio"] {
    flex: 0 0 auto;
    margin: 0;
}
.tm-portal-order-payment-icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 2.45rem;
    width: 2.45rem;
    height: 2.45rem;
    border: 1px solid var(--tm-border-soft);
    border-radius: .65rem;
    background: var(--tm-surface);
    color: var(--tm-text);
}
.tm-portal-order-payment-icon svg {
    width: 1.45rem;
    height: 1.45rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.tm-portal-order-paypal-mark {
    font-size: 1.45rem;
    font-weight: 800;
    font-style: italic;
    line-height: 1;
}
.tm-portal-order-payment-label {
    min-width: 0;
    font-weight: 650;
}
@media (max-width: 620px) {
    .tm-portal-order-payment-options {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Phase 7 / 0.7.15.22.20 – completion markers + stale-domain auto refresh UX */
.tm-portal-order-status-card {
    position: relative;
    padding-right: 3.55rem;
}
.tm-portal-order-complete {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: inline-grid;
    place-items: center;
    width: 1.8rem;
    height: 1.8rem;
    border: 1px solid color-mix(in srgb, #2f8f5b 48%, var(--tm-border-soft));
    border-radius: 999px;
    background: color-mix(in srgb, #2f8f5b 13%, var(--tm-surface-raised));
    color: #2f8f5b;
}
.tm-portal-order-complete svg {
    width: 1.05rem;
    height: 1.05rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.35;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.tm-portal-order-summary-card.tm-portal-order-status-card {
    padding-right: 6.2rem;
}
.tm-portal-order-summary-card .tm-portal-order-complete {
    right: 3.65rem;
}
@media (max-width: 620px) {
    .tm-portal-order-status-card {
        padding-right: 3.35rem;
    }
    .tm-portal-order-summary-card.tm-portal-order-status-card {
        padding-right: 5.8rem;
    }
}
@media (forced-colors: active) {
    .tm-portal-order-complete {
        border-color: ButtonText;
        color: ButtonText;
        background: Canvas;
    }
}


/* Phase 7 / 0.7.15.22.22 – summary actions alignment + domain discard */
.tm-portal-order-summary-card.tm-portal-order-status-card {
    padding-right: 5.65rem;
}
.tm-portal-order-summary-card .tm-portal-order-complete {
    right: 1rem;
}
.tm-portal-order-summary-heading [data-order-summary-refresh] {
    position: absolute;
    top: 1rem;
    right: 3.25rem;
    z-index: 1;
}
.tm-portal-order-domain-fields {
    grid-template-columns: minmax(11rem, .82fr) minmax(16rem, 1fr) max-content max-content;
}
.tm-portal-order-domain-fields.is-domain-only {
    grid-template-columns: minmax(0, 1fr) max-content max-content;
}
.tm-portal-order-domain-discard {
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .38rem;
    white-space: nowrap;
}
.tm-portal-order-domain-discard svg {
    width: .95rem;
    height: .95rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
@media (max-width: 860px) {
    .tm-portal-order-domain-fields,
    .tm-portal-order-domain-fields.is-domain-only {
        grid-template-columns: minmax(0, 1fr);
    }
    .tm-portal-order-domain-discard {
        width: 100%;
    }
}
@media (max-width: 620px) {
    .tm-portal-order-summary-card.tm-portal-order-status-card {
        padding-right: 5.45rem;
    }
    .tm-portal-order-summary-heading [data-order-summary-refresh] {
        right: 3.05rem;
    }
}

/* Phase 7 / 0.7.15.22.23 – compact spacing between order summary line items */
.tm-portal-order-summary-content > .tm-portal-account-membership + .tm-portal-account-membership {
    margin-top: .3rem;
}

/* Phase 7 / 0.7.15.23.3 – plan-change badge alignment + non-binding proration preview */
.tm-portal-order-plan-change-option .tm-badge {
    position: relative;
    top: -.08rem;
}
.tm-portal-order-plan-change-preview {
    display: grid;
    gap: .7rem;
    margin-top: .15rem;
    padding: .9rem 1rem;
    border: 1px solid var(--tm-border-soft);
    border-radius: .8rem;
    background: var(--tm-control-bg);
}
.tm-portal-order-plan-change-preview-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .3rem 1rem;
}
.tm-portal-order-plan-change-preview-heading > span {
    color: var(--tm-muted);
    font-size: .72rem;
}
.tm-portal-order-plan-change-proration-facts {
    gap: .55rem;
}
.tm-portal-order-plan-change-proration-facts > div {
    padding-bottom: .55rem;
}
.tm-portal-order-plan-change-proration-result dd strong {
    font-size: 1.02rem;
}
.tm-portal-order-plan-change-proration-result.is-credit dd strong {
    color: var(--tm-success);
}
.tm-portal-order-plan-change-proration-result.is-additional_payment dd strong {
    color: var(--tm-brand-strong);
}
.tm-portal-order-plan-change-proration-note {
    margin: 0;
    font-size: .72rem;
    line-height: 1.5;
}
@media (max-width: 620px) {
    .tm-portal-order-plan-change-preview-heading {
        display: grid;
    }
}


/* Phase 7 / 0.7.15.23.5 – aligned plan-change choices + explicit proration status */
.tm-portal-order-plan-change-choice {
    display: grid;
    grid-template-columns: 1rem 7.5rem 6.8rem 10.75rem;
    align-items: center;
    justify-content: start;
    gap: .28rem .6rem;
}
.tm-portal-order-plan-change-choice > input {
    margin-top: 0;
}
.tm-portal-order-plan-change-choice-name {
    min-width: 0;
}
.tm-portal-order-plan-change-choice-name > strong {
    display: block;
}
.tm-portal-order-plan-change-choice-name > small {
    display: block;
}
.tm-portal-order-plan-change-choice-badge {
    position: static;
    justify-self: start;
}
.tm-portal-order-plan-change-choice-price {
    justify-self: start;
    white-space: nowrap;
}
.tm-portal-order-plan-change-unavailable-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(15rem, 21rem);
    gap: .8rem 1rem;
    align-items: stretch;
}
.tm-portal-order-plan-change-unavailable-copy {
    display: grid;
    align-content: start;
    gap: .45rem;
}
.tm-portal-order-plan-change-status {
    display: grid;
    grid-template-columns: 1.8rem minmax(0, 1fr);
    gap: .65rem;
    align-items: center;
    padding: .72rem .8rem;
    border: 1px solid color-mix(in srgb, var(--tm-brand) 24%, var(--tm-border-soft));
    border-radius: .72rem;
    background: color-mix(in srgb, var(--tm-brand-soft) 48%, var(--tm-control-bg));
}
.tm-portal-order-plan-change-status-icon {
    display: inline-grid;
    place-items: center;
    width: 1.8rem;
    height: 1.8rem;
    border: 1px solid color-mix(in srgb, var(--tm-brand) 38%, transparent);
    border-radius: 50%;
    color: var(--tm-brand-strong);
    font-size: .82rem;
    font-weight: 850;
}
.tm-portal-order-plan-change-status-copy {
    display: grid;
    gap: .08rem;
    min-width: 0;
}
.tm-portal-order-plan-change-status-copy small {
    color: var(--tm-muted);
    font-size: .62rem;
    font-weight: 750;
    letter-spacing: .035em;
    text-transform: uppercase;
}
.tm-portal-order-plan-change-status-copy strong {
    color: var(--tm-text);
    font-size: .78rem;
}
.tm-portal-order-plan-change-status-copy > span {
    color: var(--tm-text-soft);
    font-size: .68rem;
    line-height: 1.35;
}
@media (max-width: 760px) {
    .tm-portal-order-plan-change-choice {
        grid-template-columns: 1rem minmax(0, 1fr) max-content;
    }
    .tm-portal-order-plan-change-choice-badge {
        grid-column: 3;
        grid-row: 1;
    }
    .tm-portal-order-plan-change-choice-price {
        grid-column: 2 / 4;
        grid-row: 2;
    }
    .tm-portal-order-plan-change-unavailable-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Phase 7F / 0.7.15.24.17 – Transfer-In browser correction */
.tm-portal-order-domain-fields.is-domain-only,
.tm-portal-order-domain-fields.is-transfer-in {
    grid-template-columns: minmax(0, 1fr) repeat(2, minmax(9.5rem, 9.5rem));
}
.tm-portal-order-domain-fields.is-domain-only .tm-portal-order-domain-check,
.tm-portal-order-domain-fields.is-domain-only .tm-portal-order-domain-discard,
.tm-portal-order-domain-fields.is-transfer-in .tm-portal-order-domain-check,
.tm-portal-order-domain-fields.is-transfer-in .tm-portal-order-domain-discard {
    width: 100%;
    min-width: 0;
}
@media (max-width: 860px) {
    .tm-portal-order-domain-fields.is-domain-only,
    .tm-portal-order-domain-fields.is-transfer-in {
        grid-template-columns: minmax(0, 1fr);
    }
    .tm-portal-order-domain-fields.is-domain-only .tm-portal-order-domain-check,
    .tm-portal-order-domain-fields.is-domain-only .tm-portal-order-domain-discard,
    .tm-portal-order-domain-fields.is-transfer-in .tm-portal-order-domain-check,
    .tm-portal-order-domain-fields.is-transfer-in .tm-portal-order-domain-discard {
        width: 100%;
    }
}

/* Phase 7 / 0.7.15.24.26 – simplified order entry + unified commerce flow */
.tm-portal-order-entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.tm-portal-order-management-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .38rem;
    margin-top: .9rem;
    color: var(--tm-muted);
    font-size: .78rem;
}
.tm-portal-order-management-links a {
    color: var(--tm-text-soft);
    font-weight: 650;
    text-decoration-thickness: .08em;
    text-underline-offset: .16em;
}
.tm-portal-order-selected-flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: .85rem;
    padding-bottom: .85rem;
}
.tm-portal-order-selected-flow > div {
    display: grid;
    gap: .2rem;
    min-width: 0;
}
.tm-portal-order-selected-flow strong {
    font-size: .96rem;
}
.tm-portal-order-selected-flow .tm-button-compact {
    flex: 0 0 auto;
    min-height: 2.25rem;
    padding: .42rem .72rem;
}
.tm-portal-order-domain-help-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.tm-portal-order-domain-fields.is-transfer-in {
    grid-template-columns: minmax(11rem, .82fr) minmax(16rem, 1fr) repeat(2, minmax(9.5rem, 9.5rem));
}
@media (max-width: 860px) {
    .tm-portal-order-entry-grid,
    .tm-portal-order-domain-help-three,
    .tm-portal-order-domain-fields.is-transfer-in {
        grid-template-columns: minmax(0, 1fr);
    }
    .tm-portal-order-selected-flow {
        align-items: stretch;
        flex-direction: column;
    }
    .tm-portal-order-selected-flow .tm-button-compact {
        width: 100%;
    }
}


/* Phase 7 / 0.7.15.24.27 – guided transfer, equal entry actions, downgrade warning + session freshness */
.tm-portal-order-plan-change-domain-warning {
    margin-top: .85rem;
    margin-bottom: 0;
}
.tm-portal-order-plan-change-domain-warning strong {
    display: block;
    margin-bottom: .2rem;
    color: inherit;
}
.tm-portal-order-plan-change-domain-warning p {
    margin: 0;
}

/* Phase 7F / 0.7.15.25 – completed order review + final submit step */
.tm-portal-order-review-section {
    display: grid;
    gap: .65rem;
}
.tm-portal-order-review-section + .tm-portal-order-review-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--tm-border-soft);
}
.tm-portal-order-review-section > h3 {
    margin: 0;
    font-size: 1rem;
}
.tm-portal-order-summary-plan-row,
.tm-portal-order-summary-domain-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: start;
    gap: 1rem;
}
.tm-portal-order-summary-plan-row > span,
.tm-portal-order-summary-domain-copy {
    display: grid;
    gap: .15rem;
    min-width: 0;
}
.tm-portal-order-summary-plan-row small,
.tm-portal-order-summary-domain-copy small {
    color: var(--tm-text-soft);
    line-height: 1.4;
}
.tm-portal-order-summary-domain-list {
    display: grid;
    gap: .7rem;
}
.tm-portal-order-summary-domain-row {
    padding: .72rem .8rem;
    border: 1px solid var(--tm-border-soft);
    border-radius: .75rem;
    background: var(--tm-control-bg);
}
.tm-portal-order-summary-contract-facts {
    margin-top: .1rem;
}
.tm-portal-order-summary-total {
    padding-top: 1rem;
}
.tm-portal-order-final-intro-card {
    gap: .55rem;
}
.tm-portal-order-final-blockers {
    display: grid;
    gap: .4rem;
}
.tm-portal-order-final-blockers > p {
    margin: 0;
}
.tm-portal-order-final-blockers ul {
    margin: 0;
    padding-left: 1.2rem;
    display: grid;
    gap: .25rem;
}
.tm-portal-order-submit-card {
    gap: .7rem;
}
.tm-portal-order-submit-button {
    justify-self: start;
    min-width: min(100%, 18rem);
}
.tm-portal-order-submit-button:disabled {
    cursor: not-allowed;
    opacity: .55;
    box-shadow: none;
}
@media (max-width: 620px) {
    .tm-portal-order-summary-plan-row,
    .tm-portal-order-summary-domain-row {
        grid-template-columns: minmax(0, 1fr);
        gap: .35rem;
    }
    .tm-portal-order-submit-button {
        width: 100%;
    }
}

/* Phase 7F / 0.7.15.25.1 – transfer contact + deferred Auth-Code UX */
.tm-portal-order-transfer-contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem 1rem;
    margin: .35rem 0 .85rem;
}
.tm-portal-order-transfer-contact-item {
    display: grid;
    gap: .18rem;
    min-width: 0;
    padding: .7rem .8rem;
    border: 1px solid var(--tm-border-soft);
    border-radius: .75rem;
    background: var(--tm-control-bg);
}
.tm-portal-order-transfer-contact-item > span {
    color: var(--tm-text-soft);
    font-size: .82rem;
    font-weight: 600;
}
.tm-portal-order-transfer-contact-item strong {
    overflow-wrap: anywhere;
}
.tm-portal-order-transfer-contact-address {
    grid-column: 1 / -1;
}
.tm-portal-order-transfer-contact-address address {
    display: grid;
    gap: .12rem;
    margin: 0;
    font-style: normal;
    line-height: 1.45;
}
.tm-portal-order-transfer-auth-defer {
    margin-top: .4rem;
}
.tm-portal-order-receipt-domain-list {
    display: grid;
    gap: .75rem;
}
.tm-portal-order-receipt-domain-row {
    display: grid;
    gap: .65rem;
    padding: .85rem;
    border: 1px solid var(--tm-border-soft);
    border-radius: .8rem;
    background: var(--tm-control-bg);
}
.tm-portal-order-receipt-domain-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
}
.tm-portal-order-receipt-domain-heading > div {
    display: grid;
    gap: .15rem;
    min-width: 0;
}
.tm-portal-order-receipt-domain-heading small {
    color: var(--tm-text-soft);
}
.tm-portal-order-deferred-auth-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: end;
    gap: .65rem .8rem;
}
.tm-portal-order-deferred-auth-form > small {
    grid-column: 1 / -1;
}
@media (max-width: 620px) {
    .tm-portal-order-transfer-contact-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .tm-portal-order-transfer-contact-address {
        grid-column: auto;
    }
    .tm-portal-order-receipt-domain-heading {
        display: grid;
    }
    .tm-portal-order-deferred-auth-form {
        grid-template-columns: minmax(0, 1fr);
    }
    .tm-portal-order-deferred-auth-form > small {
        grid-column: auto;
    }
    .tm-portal-order-deferred-auth-form .tm-button {
        width: 100%;
    }
}

/* Phase 7 / 0.7.16.2 – checkout legal UX + accessible document layer */
.tm-portal-order-legal-card {
    gap: .9rem;
}
.tm-portal-order-legal-terms,
.tm-portal-order-early-performance,
.tm-portal-order-legal-information {
    display: grid;
    gap: .5rem;
}
.tm-portal-order-legal-information {
    padding-top: .15rem;
}
.tm-portal-order-legal-information > p {
    margin: 0;
    color: var(--tm-text-soft);
}
.tm-portal-order-legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem 1rem;
    align-items: baseline;
}
.tm-inline-link-button {
    display: inline;
    appearance: none;
    border: 0;
    padding: 0;
    background: transparent;
    font: inherit;
    font-weight: 700;
    line-height: inherit;
    white-space: normal;
    cursor: pointer;
}
.tm-portal-legal-dialog {
    width: min(58rem, calc(100vw - 2rem));
    max-height: min(50rem, calc(100vh - 2rem));
    margin: auto;
    padding: 0;
    border: 1px solid var(--tm-border);
    border-radius: 1rem;
    background: var(--tm-surface);
    color: var(--tm-text);
    box-shadow: 0 24px 70px rgba(15, 23, 42, .24);
}
.tm-portal-legal-dialog::backdrop {
    background: rgba(15, 23, 42, .56);
}
.tm-portal-legal-dialog-shell {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    max-height: min(50rem, calc(100vh - 2rem));
}
.tm-portal-legal-dialog-header,
.tm-portal-legal-dialog-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
    background: var(--tm-surface-raised);
}
.tm-portal-legal-dialog-header {
    border-bottom: 1px solid var(--tm-border-soft);
}
.tm-portal-legal-dialog-footer {
    justify-content: flex-end;
    border-top: 1px solid var(--tm-border-soft);
}
.tm-portal-legal-dialog-header h2 {
    margin: 0;
    font-size: 1.08rem;
}
.tm-portal-legal-dialog-close-icon {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid var(--tm-border);
    border-radius: .7rem;
    background: var(--tm-surface);
    color: var(--tm-text);
    font: inherit;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
}
.tm-portal-legal-dialog-close-icon:hover,
.tm-portal-legal-dialog-close-icon:focus-visible {
    background: var(--tm-surface-raised);
}
.tm-portal-legal-dialog-content {
    min-height: 0;
    overflow: auto;
    padding: 1.2rem;
}
.tm-portal-legal-document-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font: inherit;
    line-height: 1.58;
}
@media (max-width: 620px) {
    .tm-portal-order-legal-links {
        display: grid;
        justify-items: start;
    }
    .tm-portal-legal-dialog {
        width: calc(100vw - 1rem);
        max-height: calc(100vh - 1rem);
    }
    .tm-portal-legal-dialog-shell {
        max-height: calc(100vh - 1rem);
    }
}
.tm-portal-order-legal-fallback-link {
    margin-left: .45rem;
}

/* Phase 7 / 0.7.16.4 – customer order history */
.tm-portal-order-history-header,
.tm-portal-order-detail-header {
    align-items: center;
}
.tm-portal-order-history-card .tm-portal-card-heading {
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--tm-border-soft);
}
.tm-portal-order-history-card .tm-portal-card-heading h2 {
    margin: 0;
}
.tm-portal-order-history-card .tm-table-wrap {
    overflow-x: auto;
}
.tm-portal-order-history-table tr.is-attention {
    background: color-mix(in srgb, var(--tm-warning-bg) 45%, transparent);
}
.tm-portal-order-history-action {
    white-space: nowrap;
}
.tm-portal-order-detail-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .65rem;
    flex-wrap: wrap;
}
.tm-portal-order-detail-page {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.tm-portal-order-detail-page > .tm-card,
.tm-portal-order-detail-page > .tm-portal-order-detail-header {
    margin: 0;
}
.tm-portal-order-paypal-card p {
    max-width: none;
    margin: .55rem 0 1rem;
}
.tm-portal-order-paypal-card form {
    margin: 0;
}
@media (max-width: 760px) {
    .tm-portal-order-history-header,
    .tm-portal-order-detail-header {
        align-items: stretch;
    }
    .tm-portal-order-history-header > .tm-button,
    .tm-portal-order-detail-actions .tm-button {
        width: 100%;
        justify-content: center;
    }
    .tm-portal-order-detail-actions {
        justify-content: stretch;
    }
}


/* Phase 7I – 0.7.16.6.1 bank-transfer settlement closure iteration */
.tm-bank-transfer-action-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    padding-block: 1rem;
}
.tm-bank-transfer-action-copy { min-width: 0; }
.tm-bank-transfer-action-copy h2 { margin-bottom: .3rem; }
.tm-bank-transfer-action-copy p { margin: 0; color: var(--tm-text-soft); }
.tm-bank-transfer-action-cta { flex: 0 0 auto; }
.tm-bank-transfer-review-card { padding-bottom: 1rem; }
.tm-bank-transfer-review-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .45rem;
}
.tm-bank-transfer-review-head h2 { margin-bottom: 0; }
.tm-bank-transfer-amount { flex: 0 0 auto; font-size: 1.1rem; }
.tm-bank-transfer-confirm-card {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
    padding-block: 1rem;
}
.tm-bank-transfer-confirm-copy { display: grid; min-width: 0; flex: 1 1 auto; gap: .4rem; }
.tm-bank-transfer-date-field { max-width: 18rem; }
.tm-bank-transfer-date-field small { color: var(--tm-muted); font-size: .7rem; line-height: 1.4; }
.tm-bank-transfer-confirmation { margin: .35rem 0 0; }
.tm-bank-transfer-confirm-actions { flex: 0 0 auto; margin: 0; justify-content: flex-end; }
@media (max-width: 760px) {
    .tm-bank-transfer-action-card,
    .tm-bank-transfer-confirm-card,
    .tm-bank-transfer-review-head {
        align-items: stretch;
        flex-direction: column;
    }
    .tm-bank-transfer-action-cta,
    .tm-bank-transfer-action-cta .tm-button,
    .tm-bank-transfer-confirm-actions,
    .tm-bank-transfer-confirm-actions .tm-button,
    .tm-bank-transfer-date-field {
        width: 100%;
        max-width: none;
    }
}

/* Compact staging bank-transfer action, independent of other billing cards. */
.tm-staging-bank-payment-card {
    flex-wrap: wrap;
    gap: .85rem 1.25rem;
    background: linear-gradient(105deg, var(--tm-brand-soft), transparent 50%), var(--tm-card-bg);
}
.tm-staging-bank-payment-intro {
    display: flex;
    flex: 1 1 22rem;
    align-items: center;
    gap: .85rem;
    min-width: 0;
}
.tm-staging-bank-payment-icon {
    display: grid;
    place-items: center;
    flex: 0 0 2.75rem;
    block-size: 2.75rem;
    border-radius: .85rem;
    background: var(--tm-brand-soft);
    color: var(--tm-card-eyebrow);
}
.tm-staging-bank-payment-icon svg { inline-size: 1.3rem; block-size: 1.3rem; }
.tm-staging-bank-payment-card .tm-card-eyebrow { margin-bottom: .25rem; }
.tm-staging-bank-payment-card .tm-bank-transfer-action-copy h2 { margin-bottom: .2rem; }
.tm-staging-bank-payment-card .tm-bank-transfer-action-copy p { font-size: .9rem; line-height: 1.45; }
.tm-staging-bank-payment-cta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .75rem 1rem;
}
.tm-staging-bank-payment-balance {
    margin: 0;
    padding: .45rem .75rem;
    border: 1px solid var(--tm-border-soft);
    border-radius: .7rem;
    background: var(--tm-surface-raised);
}
.tm-staging-bank-payment-balance dt { color: var(--tm-text-soft); font-size: .73rem; }
.tm-staging-bank-payment-balance dd {
    margin: .12rem 0 0;
    font-size: 1.1rem;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}
.tm-staging-bank-payment-balance dd span { color: var(--tm-text-soft); font-size: .72rem; font-weight: 650; }
@media (max-width: 760px) {
    .tm-staging-bank-payment-intro { flex-basis: auto; }
    .tm-staging-bank-payment-cta .tm-button { flex: 1 1 12rem; width: auto; text-align: center; }
}
@media (max-width: 440px) {
    .tm-staging-bank-payment-cta { display: grid; }
    .tm-staging-bank-payment-cta .tm-button { width: 100%; }
}

/* Phase 7I – 0.7.16.6.2 reference alignment + payment action polish */
.tm-bank-transfer-boundary-note {
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px solid var(--tm-border-soft);
    max-width: 74rem;
}
.tm-bank-transfer-action-panel {
    display: block;
    padding: 0;
    overflow: hidden;
}
.tm-bank-transfer-action-panel-head {
    padding: 1rem 1.15rem .9rem;
    border-bottom: 1px solid var(--tm-border-soft);
    background: color-mix(in srgb, var(--tm-surface-raised) 62%, transparent);
}
.tm-bank-transfer-action-panel-head h2 {
    margin: .2rem 0 .28rem;
}
.tm-bank-transfer-action-panel-head p {
    margin: 0;
    max-width: 54rem;
    color: var(--tm-text-soft);
}
.tm-bank-transfer-action-grid {
    display: grid;
    grid-template-columns: minmax(17rem, .8fr) minmax(24rem, 1.2fr);
    gap: 1rem;
    align-items: stretch;
    padding: 1rem 1.15rem 1.15rem;
}
.tm-bank-transfer-action-grid .tm-bank-transfer-date-field {
    max-width: none;
    align-content: start;
    padding: .9rem;
    border: 1px solid var(--tm-border-soft);
    border-radius: .85rem;
    background: var(--tm-surface-raised);
}
.tm-bank-transfer-confirmation-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem;
    border: 1px solid var(--tm-border-soft);
    border-radius: .85rem;
    background: var(--tm-surface-raised);
}
.tm-bank-transfer-confirmation-panel .tm-bank-transfer-confirmation {
    margin: 0;
    align-items: flex-start;
}
.tm-bank-transfer-confirmation-panel .tm-bank-transfer-confirm-actions {
    padding-top: .8rem;
    border-top: 1px solid var(--tm-border-soft);
}

.tm-bank-transfer-action-grid-with-amount .tm-bank-transfer-input-panel {
    display: grid;
    gap: .9rem;
    padding: .9rem;
    border: 1px solid var(--tm-border-soft);
    border-radius: .85rem;
    background: var(--tm-surface-raised);
}
.tm-bank-transfer-action-grid-with-amount .tm-bank-transfer-date-field,
.tm-bank-transfer-action-grid-with-amount .tm-bank-transfer-amount-field {
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.tm-bank-transfer-action-grid-with-amount .tm-bank-transfer-amount-field input {
    font-variant-numeric: tabular-nums;
}
@media (max-width: 840px) {
    .tm-bank-transfer-action-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 620px) {
    .tm-bank-transfer-action-panel-head,
    .tm-bank-transfer-action-grid {
        padding-left: .9rem;
        padding-right: .9rem;
    }
    .tm-bank-transfer-confirmation-panel .tm-bank-transfer-confirm-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
    .tm-bank-transfer-confirmation-panel .tm-button {
        width: 100%;
        justify-content: center;
    }
}

/* Phase 7I – 0.7.16.7.12.1 admin order workflow progress */
.tm-order-next-step {
    margin-top: .34rem;
    color: var(--tm-text-soft);
}
.tm-order-next-step strong {
    color: var(--tm-text);
    font-weight: 700;
}
.tm-order-workflow-card {
    overflow: hidden;
}
.tm-order-workflow-card > .tm-alert {
    margin-top: .85rem;
}
.tm-order-workflow-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.tm-order-workflow-heading h2 {
    margin: .18rem 0 0;
}
.tm-order-detail-workflow-heading {
    align-items: center;
    flex-wrap: wrap;
}
.tm-order-workflow-header-tools,
.tm-order-workflow-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: .5rem;
    min-width: 0;
}
.tm-order-workflow-header-tools {
    margin-inline-start: auto;
}
.tm-order-workflow-header-actions .tm-button {
    gap: .45rem;
    max-width: 100%;
    padding-inline: .85rem;
    text-align: center;
}
.tm-order-workflow-header-actions .tm-button-primary {
    box-shadow: none;
}
.tm-order-workflow-header-actions svg {
    flex: 0 0 1rem;
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.tm-order-workflow-next {
    display: grid;
    gap: .18rem;
    min-width: 12rem;
    padding: .65rem .8rem;
    border: 1px solid var(--tm-border-soft);
    border-radius: .8rem;
    background: var(--tm-surface-raised);
}
.tm-order-workflow-next > span:not(.tm-badge) {
    color: var(--tm-muted);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.tm-order-workflow-next > .tm-badge {
    justify-self: start;
}
.tm-order-workflow-next strong {
    color: var(--tm-text);
    font-size: .92rem;
}
.tm-order-workflow-next-link {
    color: inherit;
    text-decoration: none;
}
.tm-order-workflow-next-link:hover strong {
    text-decoration: underline;
    text-underline-offset: .18em;
}
.tm-order-workflow-scroll {
    overflow-x: auto;
    padding: .25rem .1rem .55rem;
    scrollbar-width: thin;
}
.tm-order-workflow-track {
    display: grid;
    grid-template-columns: repeat(7, minmax(7.5rem, 1fr));
    min-width: 58rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.tm-billing-lifecycle-track {
    grid-template-columns: repeat(5, minmax(8rem, 1fr));
    min-width: 43rem;
}
.tm-billing-lifecycle-card .tm-order-workflow-note {
    max-width: none;
    width: 100%;
    margin-top: .55rem;
}
.tm-billing-lifecycle-target {
    scroll-margin-top: 6rem;
}
.tm-order-workflow-step {
    position: relative;
    display: grid;
    justify-items: stretch;
    min-width: 0;
    padding: 0 .35rem;
    text-align: center;
}
.tm-order-workflow-content {
    display: grid;
    justify-items: center;
    gap: .32rem;
    min-width: 0;
    color: inherit;
    text-decoration: none;
    border-radius: .65rem;
}
.tm-order-workflow-link {
    cursor: pointer;
}
.tm-order-workflow-link:hover strong {
    text-decoration: underline;
    text-underline-offset: .18em;
}
.tm-order-workflow-link:focus-visible,
.tm-order-workflow-next-link:focus-visible {
    outline: 3px solid var(--tm-focus);
    outline-offset: 3px;
}
.tm-order-workflow-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 1rem;
    left: calc(50% + 1.08rem);
    right: calc(-50% + 1.08rem);
    height: 2px;
    background: var(--tm-border);
    z-index: 0;
}
.tm-order-workflow-marker {
    position: relative;
    z-index: 1;
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 2px solid var(--tm-border);
    border-radius: 999px;
    background: var(--tm-surface);
    color: var(--tm-muted);
    font-size: .78rem;
    font-weight: 800;
    line-height: 1;
}
.tm-order-workflow-step strong {
    color: var(--tm-text);
    font-size: .8rem;
    line-height: 1.2;
}
.tm-order-workflow-step small {
    color: var(--tm-muted);
    font-size: .69rem;
    line-height: 1.25;
}
.tm-order-workflow-step.is-completed .tm-order-workflow-marker {
    border-color: var(--tm-success);
    background: var(--tm-success-soft);
    color: var(--tm-success);
}
.tm-order-workflow-step.is-completed:not(:last-child)::after {
    background: color-mix(in srgb, var(--tm-success) 55%, var(--tm-border));
}
.tm-order-workflow-step.is-current .tm-order-workflow-marker {
    border-color: var(--tm-warning);
    background: var(--tm-warning-soft);
    color: var(--tm-warning-text);
}
.tm-order-workflow-step.is-current strong {
    color: var(--tm-warning-text);
}
.tm-order-workflow-step.is-problem .tm-order-workflow-marker {
    border-color: var(--tm-danger);
    background: var(--tm-danger-soft);
    color: var(--tm-danger-text);
}
.tm-order-workflow-step.is-problem strong {
    color: var(--tm-danger-text);
}
.tm-order-workflow-step.is-skipped .tm-order-workflow-marker,
.tm-order-workflow-step.is-cancelled .tm-order-workflow-marker {
    border-style: dashed;
    background: var(--tm-surface-raised);
}
.tm-order-workflow-note {
    margin: .75rem 0 0;
    padding-top: .75rem;
    border-top: 1px solid var(--tm-border-soft);
    color: var(--tm-muted);
    font-size: .78rem;
}
@media (max-width: 720px) {
    .tm-order-workflow-heading {
        display: grid;
    }
    .tm-order-detail-workflow-heading {
        grid-template-columns: minmax(0, 1fr);
    }
    .tm-order-workflow-header-tools {
        margin-inline-start: 0;
        justify-content: flex-start;
    }
    .tm-order-workflow-header-actions {
        justify-content: flex-start;
    }
    .tm-order-workflow-next {
        min-width: 0;
    }
}
@media (forced-colors: active) {
    .tm-order-workflow-marker {
        forced-color-adjust: auto;
    }
}

/* Phase 7J – 0.7.16.7.13.5 admin mail preview + payment reminder */
.tm-admin-mail-preview-card { overflow: hidden; }
.tm-admin-mail-preview-meta {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(8rem, .6fr);
    gap: .7rem;
    margin: .75rem 0 1rem;
}
.tm-admin-mail-preview-meta > div {
    display: grid;
    gap: .18rem;
    padding: .65rem .75rem;
    border: 1px solid var(--tm-border);
    border-radius: .65rem;
    background: var(--tm-control-bg);
}
.tm-admin-mail-preview-meta strong { font-size: .72rem; color: var(--tm-text-soft); }
.tm-admin-mail-preview-meta span { overflow-wrap: anywhere; }
.tm-admin-mail-preview-body {
    max-width: 48rem;
    padding: 1rem 1.05rem;
    border: 1px solid var(--tm-border);
    border-radius: .75rem;
    background: var(--tm-surface-soft);
}
.tm-admin-mail-preview-body p { max-width: none; margin: 0 0 .8rem; }
.tm-admin-mail-preview-body h3 { margin: 1rem 0 .35rem; font-size: .95rem; }
.tm-admin-mail-preview-summary { display: flex; flex-wrap: wrap; gap: .45rem 1.2rem; margin: .8rem 0 1rem; }
.tm-admin-mail-preview-link { display: inline-flex; margin: .1rem 0 .45rem; }
.tm-admin-mail-preview-bank { display: grid; gap: .3rem; margin: .55rem 0 .9rem; }
.tm-admin-mail-preview-bank > div { display: grid; grid-template-columns: minmax(7rem, .35fr) minmax(0, 1fr); gap: .75rem; }
.tm-admin-mail-preview-bank dt { color: var(--tm-text-soft); }
.tm-admin-mail-preview-bank dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 760px) {
    .tm-admin-mail-preview-meta { grid-template-columns: 1fr; }
    .tm-admin-mail-preview-bank > div { grid-template-columns: 1fr; gap: .1rem; }
}

/* Phase 7J – 0.7.16.7.13.8 payment choice layout correction + EPC/GiroCode */
.tm-portal-order-payment-choice-card > h2 {
    margin-bottom: .9rem;
}
.tm-portal-order-payment-choice-grid {
    display: grid;
    grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
    gap: 1.15rem;
    align-items: stretch;
}
.tm-portal-order-payment-choice-option {
    display: block;
    min-width: 0;
    min-height: 0;
    padding: 1.1rem;
    border: 1px solid var(--tm-border);
    border-radius: .85rem;
    background: var(--tm-surface-soft);
    cursor: default;
}
.tm-portal-order-payment-choice-option h3,
.tm-portal-order-payment-choice-option h4 {
    margin: 0 0 .55rem;
}
.tm-portal-order-payment-choice-option p {
    max-width: none;
    margin: 0 0 .9rem;
}
.tm-portal-order-payment-choice-option form {
    margin: 0;
}
.tm-portal-order-payment-choice-option-paypal .tm-button {
    margin-top: .15rem;
}
.tm-portal-order-bank-selected-intro span {
    display: block;
}
.tm-portal-order-bank-transfer-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(10rem, 12.5rem);
    gap: 1rem;
    align-items: start;
}
.tm-portal-order-bank-facts {
    display: grid;
    gap: .35rem;
    margin: 0;
    min-width: 0;
}
.tm-portal-order-bank-facts > div {
    display: grid;
    grid-template-columns: minmax(7rem, .38fr) minmax(0, 1fr);
    gap: .7rem;
    min-width: 0;
}
.tm-portal-order-bank-facts dt {
    color: var(--tm-text-soft);
}
.tm-portal-order-bank-facts dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: normal;
}
.tm-portal-order-bank-qr-panel {
    display: grid;
    justify-items: center;
    align-content: start;
    gap: .45rem;
    min-width: 0;
    text-align: center;
}
@media (min-width: 681px) {
    .tm-portal-order-payment-choice-option-bank-selected .tm-portal-order-bank-qr-panel {
        margin-top: -7.5rem;
    }
}
.tm-portal-order-bank-qr-panel h4 {
    margin: .15rem 0 0;
}
.tm-portal-order-bank-qr-panel p {
    margin: 0;
    font-size: .92rem;
    line-height: 1.4;
}
.tm-portal-order-bank-qr {
    display: grid;
    place-items: center;
    width: 100%;
    max-width: 12.5rem;
    aspect-ratio: 1;
    padding: .45rem;
    border: 1px solid var(--tm-border);
    border-radius: .65rem;
    background: #fff;
}
.tm-portal-order-bank-qr svg {
    display: block;
    width: 100%;
    height: auto;
}
.tm-portal-order-payment-warning {
    margin: 1rem 0 0;
}
[data-paypal-submit-button][disabled] {
    cursor: wait;
    opacity: .75;
}
@media (max-width: 980px) {
    .tm-portal-order-payment-choice-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 680px) {
    .tm-portal-order-bank-transfer-body,
    .tm-portal-order-bank-facts > div {
        grid-template-columns: 1fr;
    }
    .tm-portal-order-bank-facts > div {
        gap: .08rem;
    }
    .tm-portal-order-bank-qr-panel {
        justify-items: start;
        text-align: left;
        padding-top: .85rem;
        border-top: 1px solid var(--tm-border-soft);
    }
    .tm-portal-order-bank-qr {
        max-width: 12.5rem;
    }
}
@media (forced-colors: active) {
    .tm-portal-order-payment-choice-option,
    .tm-portal-order-bank-qr {
        border: 1px solid CanvasText;
    }
}

/* Phase 7J – 0.7.16.7.13.10 PayPal same-origin relay + progress layer */
.tm-portal-paypal-progress-dialog {
    width: min(34rem, calc(100vw - 2rem));
}
.tm-portal-paypal-progress-content {
    display: grid;
    grid-template-columns: 3.25rem minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    padding: 1.3rem 1.4rem;
}
.tm-portal-paypal-progress-content h2 {
    margin: 0 0 .35rem;
    font-size: 1.05rem;
}
.tm-portal-paypal-progress-content p {
    max-width: none;
    margin: 0;
    color: var(--tm-text-soft);
}
.tm-portal-paypal-progress-spinner {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    border: 4px solid color-mix(in srgb, var(--tm-accent) 18%, transparent);
    border-top-color: var(--tm-accent);
    animation: tm-paypal-progress-spin .9s linear infinite;
}
@keyframes tm-paypal-progress-spin {
    to { transform: rotate(360deg); }
}
@media (max-width: 520px) {
    .tm-portal-paypal-progress-content {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }
}
@media (prefers-reduced-motion: reduce) {
    .tm-portal-paypal-progress-spinner {
        animation: none;
    }
}
@media (forced-colors: active) {
    .tm-portal-paypal-progress-spinner {
        border-color: CanvasText;
        border-top-color: Highlight;
    }
}

/* Phase 7J – 0.7.16.7.13.13 PayPal finalize confirmation polish */
.tm-portal-paypal-finalize-page {
    min-height: clamp(22rem, 52vh, 34rem);
    display: grid;
    place-items: start center;
    padding-top: clamp(1rem, 4vw, 3rem);
}
.tm-card.tm-portal-paypal-finalize-card {
    width: min(100%, 46rem);
    overflow: hidden;
    padding: 0;
}
.tm-portal-paypal-finalize-hero {
    display: grid;
    grid-template-columns: 4.25rem minmax(0, 1fr);
    gap: 1.2rem;
    align-items: center;
    padding: 1.6rem 1.7rem 1.35rem;
    background: linear-gradient(135deg, color-mix(in srgb, var(--tm-brand) 8%, var(--tm-card-bg)), var(--tm-card-bg) 72%);
}
.tm-portal-paypal-finalize-check {
    width: 4.25rem;
    height: 4.25rem;
    display: grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--tm-success) 28%, var(--tm-border));
    border-radius: 50%;
    background: var(--tm-success-soft);
    color: var(--tm-success);
    box-shadow: 0 0 0 .45rem color-mix(in srgb, var(--tm-success) 7%, transparent);
}
.tm-portal-paypal-finalize-check svg {
    width: 2rem;
    height: 2rem;
}
.tm-portal-paypal-finalize-copy .tm-card-eyebrow {
    margin-bottom: .35rem;
}
.tm-portal-paypal-finalize-copy h1 {
    margin: 0;
    font-size: clamp(1.35rem, 2.4vw, 1.7rem);
    line-height: 1.2;
}
.tm-portal-paypal-finalize-copy p {
    max-width: none;
    margin: .55rem 0 0;
    color: var(--tm-text-soft);
    line-height: 1.6;
}
.tm-portal-paypal-finalize-progress {
    display: grid;
    margin: 0 1.7rem;
    border-block: 1px solid var(--tm-border-soft);
}
.tm-portal-paypal-finalize-step {
    display: grid;
    grid-template-columns: 2.4rem minmax(0, 1fr);
    gap: .85rem;
    align-items: center;
    padding: 1rem 0;
}
.tm-portal-paypal-finalize-step + .tm-portal-paypal-finalize-step {
    border-top: 1px solid var(--tm-border-soft);
}
.tm-portal-paypal-finalize-step-mark,
.tm-portal-paypal-finalize-spinner {
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 50%;
}
.tm-portal-paypal-finalize-step-mark {
    display: grid;
    place-items: center;
    background: var(--tm-success-soft);
    color: var(--tm-success);
}
.tm-portal-paypal-finalize-step-mark svg {
    width: 1.1rem;
    height: 1.1rem;
}
.tm-portal-paypal-finalize-spinner {
    border: 3px solid color-mix(in srgb, var(--tm-brand) 18%, transparent);
    border-top-color: var(--tm-brand);
    animation: tm-paypal-finalize-spin .9s linear infinite;
}
@keyframes tm-paypal-finalize-spin {
    to { transform: rotate(360deg); }
}
.tm-portal-paypal-finalize-step-copy {
    display: grid;
    gap: .18rem;
    min-width: 0;
}
.tm-portal-paypal-finalize-step-copy strong {
    font-size: .9rem;
}
.tm-portal-paypal-finalize-step-copy > span {
    color: var(--tm-text-soft);
    font-size: .82rem;
    line-height: 1.5;
}
.tm-portal-paypal-finalize-form {
    display: flex;
    justify-content: flex-end;
    padding: 1.25rem 1.7rem 1.55rem;
    margin: 0;
}
.tm-portal-paypal-finalize-noscript {
    margin: -1rem 1.7rem 1.55rem;
    font-size: .8rem;
}
@media (max-width: 620px) {
    .tm-portal-paypal-finalize-page {
        min-height: 0;
        padding-top: .25rem;
    }
    .tm-portal-paypal-finalize-hero {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        padding-inline: 1.2rem;
    }
    .tm-portal-paypal-finalize-progress {
        margin-inline: 1.2rem;
    }
    .tm-portal-paypal-finalize-form {
        padding-inline: 1.2rem;
    }
    .tm-portal-paypal-finalize-form .tm-button {
        width: 100%;
    }
    .tm-portal-paypal-finalize-noscript {
        margin-inline: 1.2rem;
        text-align: center;
    }
}
@media (prefers-reduced-motion: reduce) {
    .tm-portal-paypal-finalize-spinner {
        animation: none;
    }
}
@media (forced-colors: active) {
    .tm-portal-paypal-finalize-check,
    .tm-portal-paypal-finalize-step-mark,
    .tm-portal-paypal-finalize-spinner {
        border: 2px solid CanvasText;
    }
    .tm-portal-paypal-finalize-spinner {
        border-top-color: Highlight;
    }
}

.tm-settlement-source-comparison { margin-top: 1rem; }
.tm-settlement-source-comparison .tm-dashboard-card { align-content: start; }
.tm-settlement-source-note { margin-top: .9rem; }
@media (max-width: 760px) {
    .tm-settlement-source-comparison { grid-template-columns: 1fr; }
}

/* Phase 7J – 0.7.16.7.15.2 PayPal refund submit feedback */
.tm-admin-action-progress-dialog {
    width: min(36rem, calc(100vw - 2rem));
    margin: auto;
    padding: 0;
    border: 1px solid var(--tm-border);
    border-radius: 1rem;
    background: var(--tm-surface);
    color: var(--tm-text);
    box-shadow: 0 24px 70px rgba(15, 23, 42, .24);
}
.tm-admin-action-progress-dialog::backdrop {
    background: rgba(15, 23, 42, .56);
}
.tm-admin-action-progress-content {
    display: grid;
    grid-template-columns: 3.25rem minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    padding: 1.35rem 1.45rem;
}
.tm-admin-action-progress-content h2 {
    margin: 0 0 .35rem;
    font-size: 1.08rem;
}
.tm-admin-action-progress-content p {
    max-width: none;
    margin: 0;
    color: var(--tm-text-soft);
}
.tm-admin-action-progress-spinner {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    border: 4px solid color-mix(in srgb, var(--tm-accent) 18%, transparent);
    border-top-color: var(--tm-accent);
    animation: tm-admin-action-progress-spin .9s linear infinite;
}
.tm-form-stack[aria-busy="true"] [data-paypal-refund-cancel].is-disabled {
    pointer-events: none;
    opacity: .58;
}
@keyframes tm-admin-action-progress-spin {
    to { transform: rotate(360deg); }
}
@media (max-width: 520px) {
    .tm-admin-action-progress-content {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }
}
@media (prefers-reduced-motion: reduce) {
    .tm-admin-action-progress-spinner {
        animation: none;
    }
}
@media (forced-colors: active) {
    .tm-admin-action-progress-dialog {
        border-color: CanvasText;
    }
    .tm-admin-action-progress-spinner {
        border-color: CanvasText;
        border-top-color: Highlight;
    }
}


/* Phase 7 / 0.7.16.7.58 – portal Plesk service page + help catalog */
.tm-portal-help-header,
.tm-portal-plesk-page,
.tm-portal-plesk-help-card {
    margin-bottom: var(--tm-card-stack-gap);
}

.tm-portal-help-search {
    display: grid;
    gap: .5rem;
    margin-top: 1rem;
}

.tm-portal-help-search > label {
    font-size: .78rem;
    font-weight: 750;
    color: var(--tm-text-soft);
}

.tm-portal-help-search-row {
    display: flex;
    align-items: stretch;
    gap: .55rem;
    flex-wrap: wrap;
}

.tm-portal-help-search-row input[type="search"] {
    flex: 1 1 18rem;
    min-width: 0;
    border: 1px solid var(--tm-border);
    border-radius: .72rem;
    background: var(--tm-control-bg);
    color: var(--tm-text);
    padding: .72rem .82rem;
    font: inherit;
}

.tm-portal-help-category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: 1rem;
}

.tm-portal-help-category-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 2.35rem;
    border: 1px solid var(--tm-border);
    border-radius: 999px;
    background: var(--tm-control-bg);
    color: var(--tm-text);
    padding: .45rem .72rem;
    font-size: .78rem;
    font-weight: 700;
    text-decoration: none;
}

.tm-portal-help-category-nav a:hover {
    border-color: color-mix(in srgb, var(--tm-brand) 48%, var(--tm-border));
    background: color-mix(in srgb, var(--tm-brand-soft) 45%, var(--tm-control-bg));
}

.tm-portal-help-category {
    scroll-margin-top: 6rem;
    margin-bottom: var(--tm-card-stack-gap);
}

.tm-portal-help-article-list {
    display: grid;
    gap: .55rem;
}

.tm-portal-help-article {
    border: 1px solid var(--tm-border);
    border-radius: .8rem;
    background: color-mix(in srgb, var(--tm-control-bg) 68%, transparent);
    overflow: clip;
}

.tm-portal-help-article > summary {
    display: grid;
    gap: .2rem;
    cursor: pointer;
    padding: .9rem 1rem;
    font-weight: 760;
    list-style-position: inside;
}

.tm-portal-help-article > summary small {
    display: block;
    color: var(--tm-text-soft);
    font-size: .78rem;
    font-weight: 500;
    line-height: 1.45;
}

.tm-portal-help-article[open] > summary {
    border-bottom: 1px solid var(--tm-border);
    background: color-mix(in srgb, var(--tm-brand-soft) 26%, var(--tm-control-bg));
}

.tm-portal-help-article-body {
    padding: .95rem 1rem 1rem;
}

.tm-portal-help-article-body p {
    margin: 0 0 .8rem;
    max-width: 62rem;
    line-height: 1.62;
}

.tm-portal-help-article-body ol {
    margin: .2rem 0 .95rem 1.35rem;
    padding: 0;
}

.tm-portal-help-article-body li + li {
    margin-top: .35rem;
}

.tm-portal-help-article-body pre {
    overflow-x: auto;
    border: 1px solid var(--tm-border);
    border-radius: .65rem;
    background: var(--tm-surface);
    padding: .8rem;
    white-space: pre;
}

.tm-portal-help-note {
    border-left: 3px solid var(--tm-brand);
    padding-left: .8rem;
    color: var(--tm-text-soft);
}

.tm-portal-help-action {
    margin-top: .15rem;
}

.tm-portal-help-support-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}

.tm-portal-plesk-page-primary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid var(--tm-border);
    border-radius: .85rem;
    background: color-mix(in srgb, var(--tm-brand-soft) 34%, var(--tm-card-bg));
    padding: 1rem;
}

.tm-portal-plesk-page-primary > div {
    display: grid;
    gap: .2rem;
    min-width: 0;
}

.tm-portal-plesk-page-primary span {
    color: var(--tm-text-soft);
    font-size: .76rem;
}

.tm-portal-plesk-page-primary strong {
    overflow-wrap: anywhere;
}

@media (max-width: 640px) {
    .tm-portal-help-search-row,
    .tm-portal-plesk-page-primary,
    .tm-portal-plesk-help-card .tm-portal-card-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .tm-portal-help-search-row .tm-button,
    .tm-portal-plesk-page-primary .tm-button,
    .tm-portal-plesk-help-card .tm-button {
        width: 100%;
        justify-content: center;
    }
}

/* Phase 7 / 0.7.16.7.59.4-.59.5 – customer DNS read/snapshot surface */
.tm-portal-dns-selector-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 25rem);
    align-items: end;
    gap: 1rem 1.4rem;
    margin-bottom: 1rem;
    padding: 1rem 1.15rem;
}

.tm-portal-dns-selector-copy {
    min-width: 0;
}

.tm-portal-dns-selector-copy h2 {
    margin: .18rem 0 .25rem;
    font-size: 1rem;
}

.tm-portal-dns-selector-copy p {
    margin: 0;
    color: var(--tm-muted);
    font-size: .78rem;
    line-height: 1.45;
}

.tm-portal-dns-selector-field {
    min-width: 0;
}

.tm-portal-dns-load-error {
    margin-bottom: 1rem;
}

.tm-portal-dns-zone-stage {
    min-height: 9rem;
    transition: opacity .16s ease;
}

.tm-portal-dns-zone-stage[aria-busy="true"] {
    opacity: .58;
}

.tm-card.tm-portal-dns-zone-card {
    min-width: 0;
    padding: 1.05rem 1.15rem;
}

.tm-portal-dns-zone-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.tm-portal-dns-zone-heading h2 {
    margin: .18rem 0 .18rem;
    font-size: 1.08rem;
    overflow-wrap: anywhere;
}

.tm-portal-dns-zone-heading p {
    margin: .08rem 0 0;
    color: var(--tm-muted);
    overflow-wrap: anywhere;
}

.tm-portal-dns-counts {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .7rem;
    padding-top: .7rem;
    border-top: 1px solid var(--tm-border-soft);
}

.tm-portal-dns-counts > span {
    display: inline-flex;
    align-items: baseline;
    gap: .28rem;
    border-radius: 999px;
    background: var(--tm-brand-soft);
    color: var(--tm-text-soft);
    padding: .32rem .56rem;
    font-size: .7rem;
}

.tm-portal-dns-counts strong {
    color: var(--tm-brand-strong);
}

.tm-portal-dns-details {
    margin-top: .78rem;
    border: 1px solid var(--tm-border-soft);
    border-radius: .75rem;
    background: var(--tm-surface-raised);
    overflow: hidden;
}

.tm-portal-dns-details > summary {
    cursor: pointer;
    padding: .66rem .8rem;
    font-weight: 750;
}

.tm-portal-dns-details[open] > summary {
    border-bottom: 1px solid var(--tm-border-soft);
}

.tm-portal-dns-details .tm-table-wrap {
    margin: 0;
    border: 0;
    border-radius: 0;
}

.tm-portal-dns-table {
    table-layout: fixed;
}

.tm-portal-dns-table th,
.tm-portal-dns-table td {
    padding-top: .52rem;
    padding-bottom: .52rem;
    vertical-align: middle;
}

.tm-portal-dns-table .tm-portal-dns-col-type { width: 4.4rem; }
.tm-portal-dns-table .tm-portal-dns-col-host { width: 13rem; }
.tm-portal-dns-table .tm-portal-dns-col-ttl { width: 6.8rem; }

.tm-portal-dns-table code {
    color: inherit;
    font-size: .76rem;
    overflow-wrap: anywhere;
    white-space: normal;
}

.tm-portal-dns-host code {
    line-height: 1.35;
}

.tm-portal-dns-value-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 2.35rem;
    align-items: center;
    gap: .38rem;
    min-width: 0;
}

.tm-portal-dns-value-control input {
    width: 100%;
    min-width: 0;
    height: 2.25rem;
    border: 1px solid var(--tm-border);
    border-radius: .58rem;
    background: var(--tm-control-bg);
    color: var(--tm-text);
    padding: .42rem .58rem;
    font: 600 .74rem/1.3 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    text-overflow: ellipsis;
}

.tm-portal-dns-value-control input:focus {
    outline: 2px solid var(--tm-brand-soft);
    outline-offset: 1px;
}

.tm-portal-dns-copy-button {
    display: inline-grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--tm-border);
    border-radius: .58rem;
    background: var(--tm-control-bg);
    color: var(--tm-brand-strong);
    cursor: pointer;
}

.tm-portal-dns-copy-button:hover,
.tm-portal-dns-copy-button:focus-visible {
    border-color: var(--tm-brand);
    background: var(--tm-brand-soft);
}

.tm-portal-dns-copy-button.is-copied {
    border-color: color-mix(in srgb, var(--tm-success) 38%, var(--tm-border));
    background: var(--tm-success-soft);
    color: var(--tm-success);
}

.tm-portal-dns-copy-button svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tm-portal-dns-value small {
    display: block;
    margin-top: .18rem;
    color: var(--tm-muted);
    font-size: .66rem;
    overflow-wrap: anywhere;
}

.tm-portal-dns-restore-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
    margin-top: .8rem;
}

.tm-portal-dns-restore-card {
    min-width: 0;
    border: 1px solid var(--tm-border-soft);
    border-radius: .75rem;
    background: var(--tm-surface-raised);
    padding: .82rem;
}

.tm-portal-dns-restore-card h3 {
    margin: .18rem 0 .32rem;
    font-size: .92rem;
}

.tm-portal-dns-restore-card > p {
    margin: 0;
    color: var(--tm-muted);
    font-size: .76rem;
    line-height: 1.45;
}

.tm-portal-dns-restore-card dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
    margin: .65rem 0 0;
}

.tm-portal-dns-restore-card dt {
    color: var(--tm-muted);
    font-size: .66rem;
    font-weight: 750;
}

.tm-portal-dns-restore-card dd {
    margin: .12rem 0 0;
    font-weight: 700;
}

.tm-portal-dns-snapshot-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .7rem;
}

.tm-portal-dns-snapshot-heading h3 {
    margin-right: auto;
}

.tm-portal-dns-snapshot-list {
    display: grid;
    gap: .38rem;
    margin: .62rem 0 0;
    padding: 0;
    list-style: none;
}

.tm-portal-dns-snapshot-list li {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: baseline;
    gap: .55rem;
    border-top: 1px solid var(--tm-border-soft);
    padding-top: .38rem;
}

.tm-portal-dns-snapshot-list li:first-child {
    border-top: 0;
    padding-top: 0;
}

.tm-portal-dns-snapshot-list span,
.tm-portal-dns-snapshot-list small,
.tm-portal-dns-muted {
    color: var(--tm-muted);
}

.tm-portal-dns-muted {
    margin-top: .62rem !important;
}

@media (max-width: 980px) {
    .tm-portal-dns-table .tm-portal-dns-col-host { width: 10rem; }
}

@media (max-width: 760px) {
    .tm-portal-dns-selector-card,
    .tm-portal-dns-restore-grid {
        grid-template-columns: 1fr;
    }

    .tm-portal-dns-zone-heading {
        flex-direction: column;
    }

    .tm-portal-dns-table {
        table-layout: auto;
    }

    .tm-portal-dns-table .tm-portal-dns-col-type,
    .tm-portal-dns-table .tm-portal-dns-col-host,
    .tm-portal-dns-table .tm-portal-dns-col-ttl {
        width: auto;
    }

    .tm-portal-dns-snapshot-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .tm-portal-dns-snapshot-heading .tm-button {
        width: 100%;
        justify-content: center;
    }

    .tm-portal-dns-snapshot-list li {
        grid-template-columns: 1fr;
        gap: .1rem;
    }
}

/* Phase 7M – Customer DNS mutation UI */
.tm-portal-dns-create {
    margin-top: .78rem;
    border: 1px solid var(--tm-border-soft);
    border-radius: .75rem;
    background: var(--tm-surface-raised);
    overflow: hidden;
}

.tm-portal-dns-create > summary {
    cursor: pointer;
    padding: .66rem .8rem;
    font-weight: 750;
}

.tm-portal-dns-create[open] > summary {
    border-bottom: 1px solid var(--tm-border-soft);
}

.tm-portal-dns-create-form {
    display: grid;
    grid-template-columns: 7.5rem minmax(10rem, .9fr) minmax(14rem, 1.7fr) minmax(8rem, .7fr) 7rem auto;
    align-items: end;
    gap: .65rem;
    padding: .8rem .8rem .45rem;
}

.tm-portal-dns-create-form .tm-field {
    min-width: 0;
}

.tm-portal-dns-create-form input,
.tm-portal-dns-create-form select,
.tm-portal-dns-inline-control,
.tm-portal-dns-option-edit input {
    width: 100%;
    min-width: 0;
    height: 2.25rem;
    border: 1px solid var(--tm-border);
    border-radius: .58rem;
    background: var(--tm-control-bg);
    color: var(--tm-text);
    padding: .42rem .58rem;
    font: 600 .74rem/1.3 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.tm-portal-dns-create-form input:focus,
.tm-portal-dns-create-form select:focus,
.tm-portal-dns-inline-control:focus,
.tm-portal-dns-option-edit input:focus {
    outline: 2px solid var(--tm-brand-soft);
    outline-offset: 1px;
}

.tm-portal-dns-create-action {
    align-self: end;
}

.tm-portal-dns-create-action .tm-button {
    min-height: 2.25rem;
    white-space: nowrap;
}

.tm-portal-dns-create > .tm-portal-dns-muted {
    margin: 0 !important;
    padding: 0 .8rem .78rem;
}

.tm-portal-dns-table .tm-portal-dns-col-type { width: 6rem; }
.tm-portal-dns-table .tm-portal-dns-col-host { width: 13.5rem; }
.tm-portal-dns-table .tm-portal-dns-col-actions { width: 8.8rem; }

.tm-portal-dns-host-input {
    font-size: .72rem;
}

.tm-portal-dns-ttl-input {
    width: 100%;
    max-width: 6.4rem;
}

.tm-portal-dns-option-edit {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: .4rem;
    margin-top: .25rem;
    color: var(--tm-muted);
    font-size: .66rem;
}

.tm-portal-dns-option-edit input {
    height: 1.95rem;
    padding-block: .3rem;
    font-size: .68rem;
}

.tm-portal-dns-actions {
    white-space: nowrap;
}

.tm-portal-dns-action-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .35rem;
}

.tm-portal-dns-zone-card .tm-button-compact {
    min-height: 2.15rem;
    padding: .42rem .62rem;
    font-size: .72rem;
}

.tm-portal-dns-action-buttons .tm-button-danger {
    display: inline-grid;
    place-items: center;
    width: 2.15rem;
    min-width: 2.15rem;
    padding: 0;
}

.tm-portal-dns-action-buttons .tm-button-danger svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 1180px) {
    .tm-portal-dns-create-form {
        grid-template-columns: 7rem minmax(9rem, 1fr) minmax(13rem, 1.8fr) minmax(8rem, 1fr);
    }

    .tm-portal-dns-create-ttl,
    .tm-portal-dns-create-action {
        grid-column: auto;
    }
}

@media (max-width: 760px) {
    .tm-portal-dns-create-form {
        grid-template-columns: 1fr;
    }

    .tm-portal-dns-create-action .tm-button {
        width: 100%;
        justify-content: center;
    }

    .tm-portal-dns-action-buttons {
        justify-content: flex-start;
    }
}

/* Phase 7M – 0.7.16.7.59.18.2/.3 DNS guarded-action progress layer + visual polish */
.tm-portal-dns-progress-dialog {
    width: min(39rem, calc(100vw - 2rem));
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--tm-brand) 22%, var(--tm-border));
    border-radius: 1.15rem;
    background: linear-gradient(145deg, color-mix(in srgb, var(--tm-brand-soft) 36%, var(--tm-card-bg)), var(--tm-surface) 72%);
    color: var(--tm-text);
    box-shadow: 0 28px 90px rgba(15, 23, 42, .32), 0 0 0 1px color-mix(in srgb, var(--tm-brand) 5%, transparent);
}
.tm-portal-dns-progress-dialog::backdrop {
    background: rgba(15, 23, 42, .62);
    backdrop-filter: blur(3px);
}
.tm-portal-dns-progress-accent {
    height: .28rem;
    background: linear-gradient(90deg, var(--tm-brand), var(--tm-brand-strong), var(--tm-success));
}
.tm-portal-dns-progress-content {
    display: grid;
    grid-template-columns: 4.6rem minmax(0, 1fr);
    gap: 1.2rem;
    align-items: center;
    padding: 1.55rem 1.65rem 1.45rem;
}
.tm-portal-dns-progress-visual {
    position: relative;
    display: grid;
    width: 4.6rem;
    height: 4.6rem;
    place-items: center;
    color: var(--tm-brand-strong);
}
.tm-portal-dns-progress-halo {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--tm-brand-soft);
    box-shadow: 0 0 0 .45rem color-mix(in srgb, var(--tm-brand) 6%, transparent);
    animation: tm-portal-dns-progress-pulse 1.8s ease-in-out infinite;
}
.tm-portal-dns-progress-spinner {
    position: absolute;
    inset: .28rem;
    border-radius: 50%;
    border: 3px solid color-mix(in srgb, var(--tm-brand) 18%, transparent);
    border-top-color: var(--tm-brand);
    border-right-color: color-mix(in srgb, var(--tm-success) 70%, var(--tm-brand));
    animation: tm-portal-dns-progress-spin .9s linear infinite;
}
.tm-portal-dns-progress-icon {
    position: relative;
    z-index: 1;
    width: 2rem;
    height: 2rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.tm-portal-dns-progress-copy {
    min-width: 0;
}
.tm-portal-dns-progress-kicker {
    display: block;
    margin-bottom: .28rem;
    color: var(--tm-brand-strong);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .075em;
    text-transform: uppercase;
}
.tm-portal-dns-progress-content h2 {
    margin: 0 0 .38rem;
    font-size: clamp(1.08rem, 2.4vw, 1.24rem);
    line-height: 1.25;
}
.tm-portal-dns-progress-content > .tm-portal-dns-progress-copy > p:not(.tm-portal-dns-progress-hint) {
    max-width: none;
    margin: 0;
    color: var(--tm-text-soft);
    line-height: 1.55;
}
.tm-portal-dns-progress-track {
    position: relative;
    height: .34rem;
    margin-top: 1rem;
    overflow: hidden;
    border-radius: 999px;
    background: color-mix(in srgb, var(--tm-brand) 12%, var(--tm-border-soft));
}
.tm-portal-dns-progress-track > span {
    position: absolute;
    inset-block: 0;
    left: -42%;
    width: 42%;
    border-radius: inherit;
    background: linear-gradient(90deg, color-mix(in srgb, var(--tm-brand) 55%, transparent), var(--tm-brand), var(--tm-success));
    animation: tm-portal-dns-progress-track 1.35s ease-in-out infinite;
}
.tm-portal-dns-progress-hint {
    display: flex;
    gap: .45rem;
    align-items: flex-start;
    margin: .85rem 0 0;
    padding-top: .75rem;
    border-top: 1px solid var(--tm-border-soft);
    color: var(--tm-muted);
    font-size: .72rem;
    line-height: 1.45;
}
.tm-portal-dns-progress-hint svg {
    flex: 0 0 auto;
    width: 1rem;
    height: 1rem;
    margin-top: .08rem;
    fill: none;
    stroke: var(--tm-success);
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}
@keyframes tm-portal-dns-progress-spin {
    to { transform: rotate(360deg); }
}
@keyframes tm-portal-dns-progress-pulse {
    0%, 100% { transform: scale(.96); opacity: .78; }
    50% { transform: scale(1.04); opacity: 1; }
}
@keyframes tm-portal-dns-progress-track {
    0% { left: -42%; }
    58%, 100% { left: 100%; }
}
@media (max-width: 520px) {
    .tm-portal-dns-progress-content {
        grid-template-columns: 1fr;
        gap: 1rem;
        justify-items: center;
        padding: 1.35rem 1.15rem 1.25rem;
        text-align: center;
    }
    .tm-portal-dns-progress-hint {
        justify-content: center;
        text-align: left;
    }
}
@media (prefers-reduced-motion: reduce) {
    .tm-portal-dns-progress-spinner,
    .tm-portal-dns-progress-halo,
    .tm-portal-dns-progress-track > span {
        animation: none;
    }
    .tm-portal-dns-progress-track > span {
        left: 0;
        width: 100%;
        opacity: .45;
    }
}
@media (forced-colors: active) {
    .tm-portal-dns-progress-dialog {
        border: 2px solid CanvasText;
        background: Canvas;
        box-shadow: none;
    }
    .tm-portal-dns-progress-accent {
        background: Highlight;
    }
    .tm-portal-dns-progress-halo {
        background: Canvas;
        box-shadow: none;
    }
    .tm-portal-dns-progress-spinner,
    .tm-portal-dns-progress-track {
        border: 1px solid CanvasText;
    }
    .tm-portal-dns-progress-spinner {
        border-top-color: Highlight;
    }
    .tm-portal-dns-progress-track > span {
        background: Highlight;
    }
    .tm-portal-dns-progress-icon,
    .tm-portal-dns-progress-hint svg {
        color: CanvasText;
        stroke: CanvasText;
    }
}

/* Phase 7M – 0.7.16.7.59.18.4 Customer DNS mobile record cards */
@media (max-width: 760px) {
    .tm-portal-dns-zone-card,
    .tm-portal-dns-details,
    .tm-portal-dns-details .tm-table-wrap {
        min-width: 0;
        max-width: 100%;
    }

    .tm-portal-dns-details .tm-table-wrap {
        overflow: visible;
    }

    .tm-portal-dns-table {
        display: block;
        width: 100%;
    }

    .tm-portal-dns-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .tm-portal-dns-table tbody {
        display: grid;
        gap: .72rem;
        padding: .72rem;
    }

    .tm-portal-dns-table tbody tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas:
            "type ttl"
            "host host"
            "value value"
            "actions actions";
        gap: .62rem .72rem;
        min-width: 0;
        border: 1px solid var(--tm-border-soft);
        border-radius: .78rem;
        background: var(--tm-card-bg);
        padding: .72rem;
    }

    .tm-portal-dns-table tbody tr:last-child td,
    .tm-portal-dns-table tbody td {
        display: grid;
        gap: .3rem;
        min-width: 0;
        border: 0;
        padding: 0;
    }

    .tm-portal-dns-table tbody td::before {
        content: attr(data-label);
        color: var(--tm-muted);
        font-size: .62rem;
        font-weight: 750;
        letter-spacing: .04em;
        line-height: 1.25;
        text-transform: uppercase;
    }

    .tm-portal-dns-table tbody td:first-child {
        grid-area: type;
    }

    .tm-portal-dns-table .tm-portal-dns-host {
        grid-area: host;
    }

    .tm-portal-dns-table .tm-portal-dns-value {
        grid-area: value;
    }

    .tm-portal-dns-table .tm-portal-dns-ttl {
        grid-area: ttl;
    }

    .tm-portal-dns-table .tm-portal-dns-actions {
        grid-area: actions;
    }

    .tm-portal-dns-table .tm-portal-dns-actions::before {
        display: none;
    }

    .tm-portal-dns-table .tm-portal-dns-value-control {
        grid-template-columns: minmax(0, 1fr) 2.5rem;
        width: 100%;
    }

    .tm-portal-dns-table .tm-portal-dns-value-control input,
    .tm-portal-dns-table .tm-portal-dns-inline-control,
    .tm-portal-dns-table .tm-portal-dns-host-input,
    .tm-portal-dns-table .tm-portal-dns-ttl-input,
    .tm-portal-dns-table .tm-portal-dns-option-edit input {
        width: 100%;
        max-width: none;
        min-width: 0;
    }

    .tm-portal-dns-table .tm-portal-dns-option-edit {
        grid-template-columns: 1fr;
        gap: .24rem;
        margin-top: .32rem;
    }

    .tm-portal-dns-table .tm-portal-dns-action-buttons {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 2.5rem;
        gap: .5rem;
        width: 100%;
    }

    .tm-portal-dns-table .tm-portal-dns-action-buttons .tm-button-secondary {
        width: 100%;
        justify-content: center;
    }

    .tm-portal-dns-table .tm-portal-dns-action-buttons .tm-button-danger {
        width: 2.5rem;
        min-width: 2.5rem;
        height: 2.5rem;
    }
}

@media (max-width: 420px) {
    .tm-portal-dns-table tbody {
        gap: .62rem;
        padding: .58rem;
    }

    .tm-portal-dns-table tbody tr {
        gap: .55rem .6rem;
        padding: .62rem;
    }
}

/* Phase 7M – 0.7.16.7.59.18.5 fresh managed-default DNS restore confirmation */
.tm-portal-dns-default-card {
    position: relative;
}
.tm-portal-dns-default-dialog {
    width: min(38rem, calc(100vw - 2rem));
    margin: auto;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--tm-brand) 24%, var(--tm-border));
    border-radius: 1rem;
    background: var(--tm-card-bg);
    color: var(--tm-text);
    box-shadow: 0 28px 90px rgba(15, 23, 42, .3);
}
.tm-portal-dns-default-dialog::backdrop {
    background: rgba(15, 23, 42, .58);
    backdrop-filter: blur(3px);
}
.tm-portal-dns-default-dialog-content {
    padding: 1.35rem;
}
.tm-portal-dns-default-dialog-content h3 {
    margin: .2rem 0 .45rem;
    font-size: 1.15rem;
}
.tm-portal-dns-default-dialog-content > p {
    margin: 0 0 .9rem;
    color: var(--tm-text-soft);
    line-height: 1.55;
}
.tm-portal-dns-default-snapshot-choice {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: .7rem;
    align-items: start;
    margin-top: .95rem;
    padding: .85rem;
    border: 1px solid var(--tm-border-soft);
    border-radius: .75rem;
    background: var(--tm-surface-raised);
    cursor: pointer;
}
.tm-portal-dns-default-snapshot-choice input {
    width: 1.05rem;
    height: 1.05rem;
    margin-top: .08rem;
}
.tm-portal-dns-default-snapshot-choice span {
    display: grid;
    gap: .18rem;
}
.tm-portal-dns-default-snapshot-choice small {
    color: var(--tm-muted);
    line-height: 1.45;
}
.tm-portal-dns-default-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: .55rem;
    margin-top: 1rem;
}
@media (max-width: 520px) {
    .tm-portal-dns-default-dialog {
        width: calc(100vw - 1rem);
    }
    .tm-portal-dns-default-dialog-content {
        padding: 1rem;
    }
    .tm-portal-dns-default-dialog-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
    .tm-portal-dns-default-dialog-actions .tm-button {
        width: 100%;
    }
}
@media (forced-colors: active) {
    .tm-portal-dns-default-dialog,
    .tm-portal-dns-default-snapshot-choice {
        border-color: CanvasText;
        background: Canvas;
        box-shadow: none;
    }
}

/* 0.8.2.6.4.3.15 – keep recurring bank-payment review/action cards visually separated. */
.tm-bank-transfer-review-card + .tm-mutation-form,
.tm-bank-transfer-review-card + .tm-recurring-accounting-retry-form {
    margin-top: var(--tm-card-stack-gap);
}

/* Hosting 0.8.2.6.4.3.26.4 – Notification Center detail presentation */
.tm-notification-summary-card {
    min-height: 0;
}
.tm-notification-summary-card .tm-card-eyebrow,
.tm-notification-action-card .tm-card-eyebrow,
.tm-notification-retry-card .tm-card-eyebrow {
    margin-bottom: .45rem;
}
.tm-notification-summary-card h2 {
    line-height: 1.35;
}
.tm-notification-summary-card p {
    margin: .38rem 0 0;
}
.tm-notification-action-card p {
    margin: .5rem 0 0;
}
.tm-notification-action-card .tm-table-note {
    margin-top: .7rem;
    padding-top: .7rem;
}
.tm-notification-action-card .tm-mutation-actions {
    margin: .9rem 0 0;
}
.tm-notification-detail-card {
    min-width: 0;
}
.tm-notification-detail-section-heading {
    padding: 1.15rem 1.35rem .85rem;
}
.tm-notification-detail-section-heading .tm-card-eyebrow {
    margin-bottom: .35rem;
}
.tm-notification-detail-section-heading h2 {
    margin: 0;
    line-height: 1.35;
}
.tm-notification-detail-meta {
    margin: 0;
    padding: 0 1.35rem 1rem;
}
.tm-notification-detail-meta > div:first-child {
    border-top-color: var(--tm-border-soft);
}
.tm-notification-detail-meta dd {
    max-width: 62%;
    overflow-wrap: anywhere;
}
.tm-notification-detail-card .tm-table-scroll {
    border-top: 1px solid var(--tm-border-soft);
}
.tm-notification-detail-card .tm-table th,
.tm-notification-detail-card .tm-table td {
    padding-inline: 1.35rem;
}
.tm-notification-boundary-notice {
    margin-bottom: 0;
}
.tm-notification-boundary-notice + .tm-notification-boundary-notice {
    margin-top: .65rem;
}
.tm-notification-retry-card .tm-detail-list {
    margin-top: .85rem;
}
.tm-notification-retry-confirm-card .tm-mutation-actions {
    margin: .9rem 0 0;
}

@media (max-width: 700px) {
    .tm-notification-detail-section-heading {
        padding: 1rem 1rem .75rem;
    }
    .tm-notification-detail-meta {
        padding: 0 1rem .85rem;
    }
    .tm-notification-detail-meta > div {
        align-items: flex-start;
    }
    .tm-notification-detail-meta dd {
        max-width: 58%;
    }
    .tm-notification-detail-card .tm-table th,
    .tm-notification-detail-card .tm-table td {
        padding-inline: 1rem;
    }
}

@media (max-width: 520px) {
    .tm-notification-detail-meta > div {
        display: grid;
        gap: .25rem;
    }
    .tm-notification-detail-meta dd {
        max-width: none;
        text-align: left;
    }
}

/* Phase 8 / 0.8.2.6.4.3.27.6.1 – consistent table-card content padding */
.tm-table-card > .tm-card-eyebrow:first-child {
    display: block;
    padding: 1.15rem 1.2rem 0;
}
.tm-table-card > .tm-card-eyebrow:first-child + h2,
.tm-table-card > h2:first-child {
    margin-top: 0;
    padding: .28rem 1.2rem 0;
}
.tm-table-card > h2:first-child {
    padding-top: 1.15rem;
}
.tm-table-card > .tm-card-eyebrow:first-child + h2 + .tm-muted,
.tm-table-card > h2:first-child + .tm-muted {
    margin-top: 0;
    padding: 0 1.2rem .9rem;
}
.tm-table-card > .tm-card-heading {
    padding: 1.15rem 1.2rem .8rem;
}
@media (max-width: 700px) {
    .tm-table-card > .tm-card-eyebrow:first-child { padding: 1rem .95rem 0; }
    .tm-table-card > .tm-card-eyebrow:first-child + h2,
    .tm-table-card > h2:first-child { padding-left: .95rem; padding-right: .95rem; }
    .tm-table-card > .tm-card-heading { padding: 1rem .95rem .72rem; }
}

/* 0.8.2.6.4.3.27.6.1.2.2.1.1.5 – apply the shared card-stack spacing inside customer portal pages too. */
.tm-portal-main-content > .tm-card + .tm-card {
    margin-top: var(--tm-card-stack-gap);
}

/* Phase 8 / 0.8.4.6.14 – Billing detail: compact payments card, aligned with existing card spacing.
   Scope exclusively to the payments section; other admin/portal cards retain their shared layout. */
.tm-billing-payments-card .tm-customer-related-heading .tm-card-eyebrow {
    margin-bottom: .25rem;
}
.tm-billing-payments-card > .tm-detail-list {
    padding: .15rem 1.2rem .35rem;
}
.tm-billing-payments-card > .tm-empty-state {
    padding: .65rem 1.2rem .8rem;
}
.tm-billing-payments-card > .tm-empty-state p {
    margin: 0;
    max-width: none;
}
.tm-billing-payments-card > .tm-mutation-actions {
    margin: 0;
    padding: .4rem 1.2rem 1.05rem;
}
@media (max-width: 700px) {
    .tm-billing-payments-card > .tm-detail-list {
        padding-inline: .95rem;
    }
    .tm-billing-payments-card > .tm-empty-state {
        padding-inline: .95rem;
    }
    .tm-billing-payments-card > .tm-mutation-actions {
        padding-inline: .95rem;
    }
}

/* Phase 8: cancellation form. Isolated from the bank-transfer grid so fields
   retain predictable native control heights at every desktop/mobile width. */
.tm-credit-note-confirm-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
        "reason explanation"
        "invoice explanation"
        "confirm confirm";
    gap: .9rem 1rem;
    align-items: stretch;
    padding: 1rem 1.15rem 1.15rem;
}
.tm-credit-note-reason { grid-area: reason; }
.tm-credit-note-invoice { grid-area: invoice; }
.tm-credit-note-text { grid-area: explanation; }
.tm-credit-note-checkbox { grid-area: confirm; margin: 0; }
.tm-credit-note-confirm-grid .tm-field { min-width: 0; }
.tm-credit-note-confirm-grid .tm-field input,
.tm-credit-note-confirm-grid .tm-field select {
    height: 2.8rem;
    min-height: 2.8rem;
    box-sizing: border-box;
}
.tm-credit-note-confirm-grid .tm-credit-note-text {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
}
.tm-credit-note-confirm-grid .tm-credit-note-text textarea {
    height: 100%;
    min-height: 0;
    resize: vertical;
    box-sizing: border-box;
}
@media (max-width: 840px) {
    .tm-credit-note-confirm-grid {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "reason" "invoice" "explanation" "confirm";
    }
    .tm-credit-note-confirm-grid .tm-credit-note-text textarea {
        height: auto;
        min-height: 7rem;
    }
}

/* 0.8.4.6.18.7 – Reuse established card/field spacing for credit-note review.
   No page-specific heights or global spacing overrides. */
.tm-credit-note-status-card > p {
    margin-block: .8rem 1.15rem;
}
.tm-credit-note-status-check-form {
    margin-block: 0 1rem;
}

/* Hosting 0.8.4.6.18.12 – invoice first-mail confirmation; scoped presentation only.
   Reuses global card and action spacing; no new client-side authority. */
.tm-invoice-mail-confirm-card .tm-card-eyebrow { margin-bottom: .4rem; }
.tm-invoice-mail-confirm-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.tm-invoice-mail-confirm-heading h2 { margin: 0; line-height: 1.35; }
.tm-invoice-mail-staging-label {
    display: inline-flex;
    align-items: center;
    flex: none;
    border: 1px solid var(--tm-border);
    background: var(--tm-brand-soft);
    color: var(--tm-text);
    padding: .35rem .65rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
}
.tm-invoice-mail-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
    gap: .7rem;
}
.tm-invoice-mail-summary-item {
    min-width: 0;
    padding: .85rem 1rem;
    border: 1px solid var(--tm-border-soft);
    border-radius: .75rem;
    background: var(--tm-surface);
}
.tm-invoice-mail-summary-item dt {
    color: var(--tm-muted);
    font-size: .73rem;
    margin-bottom: .35rem;
}
.tm-invoice-mail-summary-item dd {
    margin: 0;
    font-size: .9rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}
.tm-invoice-mail-summary-item .tm-invoice-mail-number {
    font-size: 1.15rem;
    font-variant-numeric: tabular-nums;
}
.tm-invoice-mail-summary-meta {
    display: block;
    font-size: .76rem;
    color: var(--tm-text-soft);
    margin-top: .3rem;
    line-height: 1.45;
}
.tm-invoice-mail-delivery-state { color: var(--tm-text); }
.tm-invoice-mail-safety-note {
    border-left: 3px solid var(--tm-brand);
    border-radius: .4rem;
    background: var(--tm-brand-soft);
    padding: .85rem 1rem;
    margin-top: 1rem;
}
.tm-invoice-mail-safety-note strong { display: block; font-size: .85rem; }
.tm-invoice-mail-safety-note p {
    margin: .3rem 0 0;
    font-size: .83rem;
    line-height: 1.5;
    max-width: 55rem;
}
.tm-invoice-mail-confirm-form {
    display: grid;
    gap: .35rem;
    margin-top: 1.25rem;
}
.tm-invoice-mail-confirm-number { max-width: 27rem; min-width: 0; }
.tm-invoice-mail-confirm-number input { font-variant-numeric: tabular-nums; }
.tm-invoice-mail-field-help {
    margin: 0;
    font-size: .77rem;
    color: var(--tm-text-soft);
}
.tm-invoice-mail-confirm-actions { margin: 1rem 0 0; }
@media (max-width: 640px) {
    .tm-invoice-mail-summary { grid-template-columns: minmax(0, 1fr); }
    .tm-invoice-mail-confirm-heading { align-items: center; }
    .tm-invoice-mail-confirm-actions .tm-button { flex: 1 1 12rem; }
}
@media (forced-colors: active) {
    .tm-invoice-mail-staging-label,
    .tm-invoice-mail-summary-item,
    .tm-invoice-mail-safety-note { border-color: CanvasText; }
}

/* Phase 0.8.4.6.18.13.1: visibly disabled invoice resend buttons */
.tm-invoice-mail-confirm-actions .tm-button:disabled { opacity: .43; filter: grayscale(.35); box-shadow: none; cursor: not-allowed; }


/* Hosting 0.8.4.6.18.15.1 – Admin responsive shell and billing lifecycle.
   Does not change customer portal, business actions or existing spacing tokens. */
.tm-admin-menu-toggle { display: none; }

@media (max-width: 900px) {
    .tm-admin-shell, .tm-sidebar, .tm-admin-content,
    .tm-main, .tm-main-content, .tm-topbar {
        min-width: 0;
        max-width: 100%;
    }
    .tm-sidebar-brand {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: .75rem;
        min-width: 0;
        padding: .7rem 1rem;
    }
    .tm-admin-menu-toggle {
        flex: 0 0 auto;
        align-items: center;
        gap: .5rem;
        min-height: 2.75rem;
        border: 1px solid var(--tm-border);
        border-radius: .7rem;
        background: var(--tm-control-bg);
        color: var(--tm-text);
        padding: .45rem .8rem;
        font: inherit;
        font-size: .84rem;
        font-weight: 750;
    }
    .tm-sidebar.is-menu-ready .tm-admin-menu-toggle { display: inline-flex; }
    .tm-admin-menu-toggle[aria-expanded="true"] {
        border-color: var(--tm-brand);
        background: var(--tm-brand-soft);
    }
    .tm-admin-menu-toggle:focus-visible {
        outline: 3px solid var(--tm-brand);
        outline-offset: 2px;
    }
    /* No-JS fallback: show a usable stacked menu. JS enhances to collapsed. */
    .tm-sidebar .tm-nav {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: .5rem;
        width: 100%;
        max-height: min(65dvh, 31rem);
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: .5rem 1rem 1rem;
    }
    .tm-sidebar .tm-nav-group {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: .2rem;
        min-width: 0;
    }
    .tm-sidebar .tm-nav-group + .tm-nav-group { margin-top: .25rem; }
    .tm-sidebar .tm-nav-label { display: block; margin: .35rem 0 0; }
    .tm-sidebar .tm-nav-link {
        min-height: 2.75rem;
        min-width: 0;
        overflow-wrap: anywhere;
    }
    .tm-sidebar .tm-nav-icon { flex: 0 0 1.2rem; }
    .tm-sidebar.is-menu-ready:not(.is-menu-open) .tm-nav { display: none; }
    .tm-topbar > div:first-child, .tm-topbar-actions { min-width: 0; }
    .tm-topbar strong, .tm-card p, .tm-card dd, .tm-card li,
    .tm-card .tm-dashboard-notice, .tm-main-content .tm-kicker {
        overflow-wrap: anywhere;
    }
    .tm-dashboard-section-grid > *, .tm-card { min-width: 0; }
}

@media (max-width: 720px) {
    /* Invoice status becomes a complete, readable vertical sequence.
       The generic seven-stage order timeline remains unchanged. */
    .tm-billing-lifecycle-card .tm-order-workflow-scroll {
        overflow: visible;
        padding: .3rem 0 .2rem;
    }
    .tm-billing-lifecycle-track {
        grid-template-columns: minmax(0, 1fr);
        min-width: 0;
        gap: .45rem;
    }
    .tm-billing-lifecycle-track .tm-order-workflow-step {
        padding: 0;
        text-align: left;
    }
    .tm-billing-lifecycle-track .tm-order-workflow-content {
        display: grid;
        grid-template-columns: 2rem minmax(0, 1fr);
        grid-template-rows: auto auto;
        align-content: center;
        align-items: center;
        justify-items: start;
        gap: .1rem .75rem;
        min-height: 3rem;
        padding: .25rem .15rem;
    }
    .tm-billing-lifecycle-track .tm-order-workflow-marker {
        grid-column: 1;
        grid-row: 1 / span 2;
    }
    .tm-billing-lifecycle-track .tm-order-workflow-content strong,
    .tm-billing-lifecycle-track .tm-order-workflow-content small {
        grid-column: 2;
        min-width: 0;
        overflow-wrap: anywhere;
    }
    .tm-billing-lifecycle-track .tm-order-workflow-content strong { grid-row: 1; }
    .tm-billing-lifecycle-track .tm-order-workflow-content small { grid-row: 2; }
    .tm-billing-lifecycle-track .tm-order-workflow-step:not(:last-child)::after {
        top: 2.6rem;
        bottom: -.5rem;
        left: 1.15rem;
        right: auto;
        width: 2px;
        height: auto;
    }
    .tm-billing-lifecycle-card .tm-order-workflow-note {
        line-height: 1.5;
        overflow-wrap: anywhere;
    }
}

@media (forced-colors: active) {
    .tm-admin-menu-toggle { border-color: ButtonText; }
}

/* Phase 8 / 0.8.4.10.0 – recurring invoice payment options, isolated from ordering checkout. */
.tm-recurring-payment-choice > h2 { margin-bottom: 1rem; }
.tm-recurring-payment-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    gap: 1rem;
    align-items: stretch;
}
.tm-recurring-payment-choice .tm-recurring-payment-option {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.3rem;
    gap: 0;
    border-radius: 1rem;
    background: var(--tm-surface);
    border-color: var(--tm-border-soft);
    box-shadow: 0 6px 20px rgba(24, 36, 51, .035);
}
.tm-recurring-payment-choice .tm-recurring-payment-option-paypal {
    background: linear-gradient(155deg, var(--tm-brand-soft), var(--tm-surface) 45%);
    border-color: var(--tm-border);
}
.tm-recurring-payment-method-header { display: flex; align-items: center; gap: .85rem; min-width: 0; margin-bottom: 1rem; }
.tm-recurring-payment-method-icon {
    display: grid;
    place-items: center;
    flex: 0 0 3rem;
    width: 3rem;
    height: 3rem;
    border-radius: .85rem;
    color: var(--tm-brand-strong);
    background: var(--tm-brand-soft);
}
.tm-recurring-payment-option-bank .tm-recurring-payment-method-icon { color: var(--tm-text-soft); background: var(--tm-surface-raised); }
.tm-recurring-payment-method-copy { min-width: 0; }
.tm-recurring-payment-method-label { display: block; color: var(--tm-muted); font-size: .73rem; font-weight: 650; letter-spacing: .045em; margin-bottom: .22rem; }
.tm-recurring-payment-choice .tm-recurring-payment-method-copy h3 { margin: 0; font-size: 1.06rem; line-height: 1.35; }
.tm-recurring-payment-choice .tm-recurring-payment-description { color: var(--tm-text-soft); font-size: .94rem; line-height: 1.6; margin: 0 0 1.1rem; }
.tm-recurring-payment-paypal-amount {
    display: grid;
    gap: .28rem;
    padding: 1.1rem 1.15rem;
    border-radius: .82rem;
    border: 1px solid var(--tm-border-soft);
    background: var(--tm-surface);
}
.tm-recurring-payment-paypal-amount span { font-size: .77rem; color: var(--tm-muted); }
.tm-recurring-payment-paypal-amount strong { font-size: 1.45rem; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.tm-recurring-payment-paypal-bottom { margin-top: auto; padding-top: 1.15rem; }
.tm-recurring-payment-paypal-bottom .tm-button { display: inline-flex; justify-content: center; min-height: 2.75rem; width: 100%; margin: 0; }
.tm-recurring-payment-choice .tm-recurring-payment-sandbox-note { margin: .8rem 0 0; color: var(--tm-muted); font-size: .8rem; line-height: 1.5; }
.tm-recurring-payment-choice .tm-recurring-payment-bank-body {
    grid-template-columns: minmax(0, 1fr) minmax(9rem, 11.2rem);
    gap: 1rem;
    align-items: start;
}
.tm-recurring-payment-choice .tm-recurring-payment-bank-facts { gap: 0; }
.tm-recurring-payment-choice .tm-recurring-payment-bank-facts > div {
    display: grid;
    grid-template-columns: minmax(5.6rem, .53fr) minmax(0, 1fr);
    gap: .6rem;
    align-items: start;
    padding: .48rem 0;
    border-bottom: 1px solid var(--tm-border-soft);
}
.tm-recurring-payment-choice .tm-recurring-payment-bank-facts > div:first-child { padding-top: 0; }
.tm-recurring-payment-choice .tm-recurring-payment-bank-facts > div:last-child { border-bottom: 0; }
.tm-recurring-payment-choice .tm-recurring-payment-bank-facts dt { font-size: .82rem; }
.tm-recurring-payment-choice .tm-recurring-payment-bank-facts dd { font-size: .89rem; line-height: 1.5; overflow-wrap: anywhere; }
.tm-recurring-payment-choice .tm-recurring-payment-bank-highlight dd { color: var(--tm-brand-strong); font-variant-numeric: tabular-nums; }
.tm-recurring-payment-choice .tm-recurring-payment-bank-reference { grid-template-columns: minmax(0, 1fr) !important; gap: .18rem !important; padding-top: .85rem !important; }
.tm-recurring-payment-choice .tm-recurring-payment-bank-reference dd { font-weight: 650; }
.tm-recurring-payment-choice .tm-recurring-payment-qr-panel {
    padding: .8rem;
    border: 1px solid var(--tm-border-soft);
    border-radius: .85rem;
    background: var(--tm-surface-raised);
    gap: .4rem;
}
.tm-recurring-payment-choice .tm-recurring-payment-qr-panel .tm-portal-order-bank-qr { max-width: 9.4rem; padding: .3rem; border-radius: .5rem; }
.tm-recurring-payment-choice .tm-recurring-payment-qr-panel h4 { margin: .15rem 0 0; font-size: .85rem; }
.tm-recurring-payment-choice .tm-recurring-payment-qr-panel p { margin: 0; color: var(--tm-muted); font-size: .74rem; line-height: 1.4; }
.tm-recurring-payment-choice .tm-recurring-payment-warning {
    margin: 1rem 0 0;
    padding: .8rem .95rem;
    border-radius: .7rem;
    background: var(--tm-surface-raised);
    color: var(--tm-text-soft);
    line-height: 1.5;
    max-width: none;
}
@media (max-width: 1100px) {
    .tm-recurring-payment-grid { grid-template-columns: 1fr; }
    .tm-recurring-payment-paypal-bottom { margin-top: 0; }
}
@media (max-width: 640px) {
    .tm-recurring-payment-choice .tm-recurring-payment-option { padding: 1rem; }
    .tm-recurring-payment-choice .tm-recurring-payment-bank-body { grid-template-columns: 1fr; }
    .tm-recurring-payment-choice .tm-recurring-payment-bank-facts > div { grid-template-columns: minmax(5.4rem, .55fr) minmax(0, 1fr); }
    .tm-recurring-payment-choice .tm-recurring-payment-qr-panel { justify-items: center; text-align: center; }
}
@media (max-width: 375px) {
    .tm-recurring-payment-choice .tm-recurring-payment-bank-facts > div { grid-template-columns: 1fr; gap: .12rem; }
}
@media (forced-colors: active) {
    .tm-recurring-payment-choice .tm-recurring-payment-option,
    .tm-recurring-payment-choice .tm-recurring-payment-paypal-amount,
    .tm-recurring-payment-choice .tm-recurring-payment-qr-panel { border: 1px solid CanvasText; }
}

/* Phase 8 / 0.8.4.11.0 - Portal invoice pagination, cleaner Plesk access */
.tm-portal-invoice-filter-card { margin-bottom: var(--tm-card-stack-gap); padding: 1.05rem 1.2rem; }
.tm-portal-invoice-filter-form { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; }
.tm-portal-invoice-filter-search { display: grid; gap: .35rem; flex: 1 1 20rem; min-width: 0; }
.tm-portal-invoice-filter-size { display: grid; gap: .35rem; flex: 0 1 10rem; min-width: 8rem; }
.tm-portal-invoice-filter-form label { font-size: .78rem; font-weight: 700; color: var(--tm-text-soft); }
.tm-portal-invoice-filter-form input, .tm-portal-invoice-filter-form select { width: 100%; min-height: 2.65rem; padding: .55rem .75rem; border: 1px solid var(--tm-border); border-radius: .68rem; background: var(--tm-control-bg); color: var(--tm-text); font: inherit; }
.tm-portal-invoice-filter-form .tm-button { min-height: 2.65rem; }
.tm-portal-invoice-filter-count { margin: .8rem 0 0; color: var(--tm-text-soft); font-size: .82rem; }
.tm-portal-invoice-pagination { display: flex; align-items: center; justify-content: space-between; gap: .9rem; flex-wrap: wrap; padding: .9rem 1.15rem; border: 1px solid var(--tm-border); border-radius: .85rem; background: var(--tm-card-bg); margin-bottom: var(--tm-card-stack-gap); }
.tm-portal-invoice-pagination > span { color: var(--tm-text-soft); font-size: .84rem; }
.tm-portal-invoice-pages { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.tm-portal-page-number { display: inline-grid; place-items: center; min-width: 2.45rem; min-height: 2.45rem; border: 1px solid var(--tm-border); border-radius: .6rem; text-decoration: none; font-weight: 750; color: var(--tm-text); background: var(--tm-card-bg); }
.tm-portal-page-number.is-current { border-color: var(--tm-brand); background: var(--tm-brand-soft); color: var(--tm-brand); }
.tm-portal-page-disabled { padding: .55rem .7rem; color: var(--tm-text-soft); opacity: .55; }
.tm-portal-plesk-modern-target { align-items: center; gap: 1.15rem; padding: 1.1rem 1.2rem; }
.tm-portal-plesk-target-content { flex: 1 1 0; min-width: 0; display: grid; gap: .6rem; }
.tm-portal-plesk-modern-target .tm-portal-plesk-target-count { font-size: 1.05rem; color: var(--tm-text); }
.tm-portal-plesk-domain-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.tm-portal-plesk-modern-target .tm-portal-plesk-domain-chip { display: inline-flex; align-items: center; font-size: .8rem; line-height: 1.4; font-weight: 650; overflow-wrap: anywhere; padding: .36rem .62rem; border: 1px solid var(--tm-border); border-radius: .55rem; background: var(--tm-card-bg); color: var(--tm-text); }
.tm-portal-plesk-modern-target form { flex: 0 0 auto; }
.tm-portal-plesk-modern-target .tm-button { white-space: normal; min-width: 8rem; }
.tm-portal-plesk-info-note { margin-top: .9rem; }
@media (max-width: 640px) {
  .tm-portal-invoice-filter-form .tm-button { flex: 1 1 auto; }
  .tm-portal-invoice-pagination { align-items: stretch; flex-direction: column; }
  .tm-portal-invoice-pages { justify-content: flex-start; }
  .tm-portal-plesk-modern-target { flex-direction: column; align-items: stretch; }
  .tm-portal-plesk-modern-target .tm-button { width: 100%; }
}


/* Phase 8E Staging Test Account: compact customer detail utility at the end of related objects. */
.tm-staging-test-account { display: grid; gap: 1rem; }
.tm-staging-test-account-heading { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: .8rem 1rem; }
.tm-staging-test-account .tm-card-eyebrow { margin-bottom: .35rem; }
.tm-staging-test-account-heading h2 { margin: 0; }
.tm-staging-test-account-badge { display: inline-flex; align-items: center; min-height: 1.8rem; border: 1px solid var(--tm-border); border-radius: 999px; padding: .27rem .7rem; background: var(--tm-pill-bg); color: var(--tm-text-soft); font-size: .73rem; font-weight: 750; }
.tm-staging-test-account-badge-active { background: var(--tm-success-soft); color: var(--tm-success); border-color: color-mix(in srgb, var(--tm-success) 25%, var(--tm-border)); }
.tm-staging-test-account-badge-warning { border-color: #d9b178; background: #fff8ed; color: #714214; }
.tm-staging-test-account-facts { display: grid; grid-template-columns: minmax(15rem, 1fr) minmax(15rem, 1.25fr); gap: .7rem; }
.tm-staging-test-account-fact { display: grid; align-content: start; gap: .32rem; min-width: 0; padding: .85rem 1rem; background: var(--tm-control-bg); border: 1px solid var(--tm-border-soft); border-radius: .75rem; }
.tm-staging-test-account-fact > span { font-size: .72rem; color: var(--tm-muted); }
.tm-staging-test-account-fact strong { font-size: .91rem; color: var(--tm-text); font-weight: 700; overflow-wrap: anywhere; }
.tm-staging-test-account-fact a { color: var(--tm-brand); text-underline-offset: .2em; overflow-wrap: anywhere; }
.tm-staging-test-account-fact a:hover { text-decoration: underline; }
.tm-staging-test-account-customers { display: grid; gap: .28rem; margin: 0; padding-left: 1.1rem; font-size: .88rem; }
.tm-staging-test-account-warning { margin: 0; max-width: none !important; padding: .75rem .9rem; border: 1px solid #d9b178; border-radius: .68rem; background: #fff8ed; color: #714214 !important; font-size: .83rem; }
.tm-staging-test-account-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1rem; padding-top: .9rem; border-top: 1px solid var(--tm-border-soft); }
.tm-staging-test-account .tm-staging-test-account-hint { margin: 0; flex: 1 1 18rem; max-width: none; font-size: .78rem; line-height: 1.45; color: var(--tm-muted); }
.tm-staging-test-account-form { display: grid; justify-items: end; gap: .5rem; margin-left: auto; max-width: 33rem; }
.tm-staging-test-account-form .tm-button { max-width: 100%; white-space: normal; text-align: center; }
.tm-staging-test-account-form small { display: block; max-width: 27rem; font-size: .73rem; color: var(--tm-muted); text-align: right; }
.tm-staging-test-account-confirm { display: flex; gap: .55rem; align-items: start; max-width: 33rem; font-size: .8rem; line-height: 1.5; color: var(--tm-text-soft); }
.tm-staging-test-account-confirm input { flex: 0 0 auto; margin-top: .25rem; }
@media (max-width: 740px) {
    .tm-staging-test-account-facts { grid-template-columns: minmax(0, 1fr); }
    .tm-staging-test-account-footer { align-items: stretch; }
    .tm-staging-test-account-form { width: 100%; max-width: none; justify-items: stretch; }
    .tm-staging-test-account-form small { max-width: none; text-align: left; }
}
@media (forced-colors: active) {
    .tm-staging-test-account-badge-warning, .tm-staging-test-account-warning { border-color: CanvasText; background: Canvas; color: CanvasText !important; }
}

/* 0.8.4.14.8 – Staging first-order portal usability */
.tm-portal-unpaid-orders { border-color: var(--tm-border); }
.tm-portal-unpaid-orders + .tm-portal-dashboard-grid { margin-top: var(--tm-card-stack-gap); }
.tm-portal-unpaid-order-list { display: grid; gap: .7rem; }
.tm-portal-unpaid-order-row { display: flex; align-items: center; flex-wrap: wrap; gap: .85rem; padding: .85rem 1rem; border: 1px solid var(--tm-border); border-radius: .7rem; }
.tm-portal-unpaid-order-row > div { flex: 1 1 15rem; min-width: 0; }
.tm-portal-unpaid-order-row > div small { display: block; color: var(--tm-text-soft); margin-top: .2rem; }
.tm-portal-unpaid-order-row > strong { white-space: nowrap; }
.tm-portal-order-payment-choice-option-bank-selected .tm-portal-order-bank-qr-panel { margin-top: 0; }
.tm-portal-order-bank-facts > div { grid-template-columns: minmax(8rem, .44fr) minmax(0, 1fr); }
.tm-portal-order-bank-facts dd { overflow-wrap: anywhere; word-break: break-word; line-height: 1.45; }
.tm-portal-profile-account-actions .tm-button[href*="/edit"] { background: var(--tm-accent, #167dba); border-color: var(--tm-accent, #167dba); color: #fff; font-weight: 700; }
.tm-portal-profile-account-actions .tm-button[href*="/edit"]:hover,
.tm-portal-profile-account-actions .tm-button[href*="/edit"]:focus-visible { filter: brightness(.91); }
@media(max-width:680px){.tm-portal-unpaid-order-row .tm-button{width:100%;}.tm-portal-order-bank-facts > div{grid-template-columns:1fr;}}

.tm-portal-plesk-empty-panel { display: grid; grid-template-columns: 5rem minmax(0,1fr); align-items: center; gap: 1.3rem; padding: 1.5rem; border: 1px solid var(--tm-border); background: var(--tm-surface-muted, rgba(70,135,180,.06)); border-radius: .9rem; }
.tm-portal-plesk-empty-panel h3 { margin: .25rem 0 .5rem; }
.tm-portal-plesk-empty-panel p { margin: .2rem 0 .65rem; max-width: 48rem; }
.tm-portal-plesk-empty-symbol { width: 4.5rem; height: 4.5rem; display: grid; place-items: center; border-radius: 1rem; color: var(--tm-accent); background: color-mix(in srgb, var(--tm-accent) 11%, var(--tm-card-bg)); }
@media(max-width:600px){ .tm-portal-plesk-empty-panel { grid-template-columns:1fr; } }

/* 0.8.4.14.9 – bank QR starts level with the bank payment heading, not mid-card. */
.tm-portal-order-payment-choice-option-bank {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(10rem, 12.5rem);
    column-gap: 1rem;
    align-content: start;
}
.tm-portal-order-payment-choice-option-bank > h3 { grid-column: 1; grid-row: 1; }
.tm-portal-order-payment-choice-option-bank > .tm-portal-order-bank-selected-intro,
.tm-portal-order-payment-choice-option-bank > p:not(.tm-table-note) { grid-column: 1; grid-row: 2; }
.tm-portal-order-payment-choice-option-bank > .tm-portal-order-bank-transfer-body { grid-column: 1; grid-row: 3; display: block; min-width: 0; }
.tm-portal-order-payment-choice-option-bank > .tm-portal-order-bank-qr-panel { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; align-self: start; }
.tm-portal-order-payment-choice-option-bank-selected .tm-portal-order-bank-qr-panel { margin-top: 0; }
.tm-plesk-early-access-order-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--tm-border); }
.tm-plesk-early-access-order-row p { margin: .35rem 0 0; }
@media (max-width: 680px) {
    .tm-portal-order-payment-choice-option-bank { grid-template-columns: minmax(0,1fr); }
    .tm-portal-order-payment-choice-option-bank > .tm-portal-order-bank-qr-panel { grid-column: 1; grid-row: 4; justify-self: start; }
}

/* 0.8.4.14.10 — Customer early-Plesk request (Admin) */
.tm-order-early-plesk { display: grid; gap: 1.15rem; }
.tm-order-early-plesk-heading { display: flex; align-items: flex-start; gap: 1.1rem; flex-wrap: wrap; }
.tm-order-early-plesk-icon { width: 3.25rem; height: 3.25rem; flex: 0 0 3.25rem; display: grid; place-items: center; color: var(--tm-accent); background: color-mix(in srgb, var(--tm-accent) 11%, var(--tm-surface)); border: 1px solid var(--tm-border-soft); border-radius: .95rem; }
.tm-order-early-plesk-icon svg { width: 1.6rem; height: 1.6rem; }
.tm-order-early-plesk-heading-main { flex: 1 1 17rem; min-width: 0; }
.tm-order-early-plesk-heading-main h2 { margin: .25rem 0 .35rem; }
.tm-order-early-plesk-heading-main p { margin: 0; max-width: 54rem; color: var(--tm-text-soft); }
.tm-order-early-plesk-status { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .75rem; font-size: .78rem; font-weight: 700; border-radius: 999px; background: var(--tm-warning-soft); color: var(--tm-warning-text); border: 1px solid var(--tm-border-soft); }
.tm-order-early-plesk-status.is-approved { background: var(--tm-success-soft); color: var(--tm-success); }
.tm-order-early-plesk-status.is-declined { background: var(--tm-surface-raised); color: var(--tm-text-soft); }
.tm-order-early-plesk-dot { width: .47rem; height: .47rem; border-radius: 100%; flex: 0 0 .47rem; background: currentColor; }
.tm-order-early-plesk-details { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .85rem; }
.tm-order-early-plesk-detail { padding: .95rem 1rem; border: 1px solid var(--tm-border-soft); border-radius: .8rem; background: var(--tm-surface-raised); }
.tm-order-early-plesk-detail strong { display: block; font-size: .88rem; }
.tm-order-early-plesk-detail p { margin: .35rem 0 0; line-height: 1.5; font-size: .87rem; color: var(--tm-text-soft); }
.tm-order-early-plesk-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1rem; padding-top: .95rem; border-top: 1px solid var(--tm-border-soft); }
.tm-order-early-plesk-footnote { flex: 1 1 16rem; margin: 0; font-size: .86rem; line-height: 1.5; color: var(--tm-text-soft); }
.tm-order-early-plesk-footer .tm-action-row { margin: 0; }
@media (max-width: 720px) { .tm-order-early-plesk-details { grid-template-columns: 1fr; } .tm-order-early-plesk-status { margin-left: 4.3rem; } }
@media (max-width: 460px) { .tm-order-early-plesk-icon { display: none; } .tm-order-early-plesk-status { margin-left: 0; } .tm-order-early-plesk-footer .tm-action-row { width: 100%; } }

/* 0.8.4.14.14: ordered early-Plesk workflow inside existing Admin card */
.tm-order-early-workflow { display: grid; gap: .8rem; border-top: 1px solid var(--tm-border-soft); padding-top: 1rem; }
.tm-order-early-workflow > div > strong { font-size: .95rem; }
.tm-order-early-workflow > div > p { color: var(--tm-text-soft); margin: .35rem 0 0; }
.tm-order-early-workflow-stats { display: flex; gap: .55rem; flex-wrap: wrap; }
.tm-order-early-workflow-stats span { border-radius: .65rem; padding: .6rem .75rem; border: 1px solid var(--tm-border-soft); background: var(--tm-surface-raised); font-size: .83rem; }
.tm-order-early-workflow-form { display: grid; gap: .8rem; justify-items: start; }
.tm-order-early-workflow-check { display: flex; align-items: flex-start; gap: .65rem; font-size: .88rem; line-height: 1.5; }
.tm-order-early-workflow-check input { margin-top: .25rem; }
.tm-order-early-workflow-note { margin: 0; font-size: .82rem; color: var(--tm-text-soft); }
.tm-order-early-workflow-done { margin: 0; color: var(--tm-success); font-weight: 600; }

/* 8I: completed early Plesk access is a secondary, accessible disclosure */
.tm-order-early-plesk-archive { padding-block: 1.05rem; }
.tm-order-early-plesk-archive details > summary { cursor: pointer; list-style-position: inside; }
.tm-order-early-plesk-archive-summary { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; }
.tm-order-early-plesk-archive-summary > span:first-child { display: grid; gap: .3rem; }
.tm-order-early-plesk-archive details[open] > p { margin-top: 1rem; }
.tm-order-early-plesk-archive summary:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }

/* Phase 8I: directly actionable Admin dashboard work and contextual provider help */
.tm-dashboard-action-queue { margin-bottom: 1rem; }
.tm-dashboard-action-summary { display: flex; flex-wrap: wrap; gap: .7rem; margin: .9rem 0; }
.tm-dashboard-action-summary a { border: 1px solid var(--tm-border-soft); border-radius: .7rem; padding: .65rem .85rem; text-decoration: none; color: inherit; }
.tm-dashboard-action-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: .65rem; }
.tm-dashboard-action-items a { display: flex; gap: .8rem; align-items: center; justify-content: space-between; border: 1px solid var(--tm-border-soft); border-radius: .65rem; padding: .75rem .9rem; text-decoration: none; color: inherit; }
.tm-dashboard-action-items a:hover, .tm-dashboard-action-items a:focus-visible, .tm-dashboard-action-summary a:hover { border-color: var(--tm-accent); }
.tm-dashboard-provider-help { margin-bottom: .9rem; }
.tm-dashboard-provider-help summary { cursor: pointer; font-weight: 600; }
.tm-dashboard-provider-help p { margin: .5rem 0 0; color: var(--tm-text-soft); line-height: 1.55; }


/* Phase 8I / 0.8.4.23.0: accessible initial invoice action and state presentation. */
.tm-portal-initial-invoice-card {
    border-color: color-mix(in srgb, var(--tm-brand) 22%, var(--tm-border));
    background: linear-gradient(125deg, color-mix(in srgb, var(--tm-brand-soft) 45%, var(--tm-card-bg)) 0%, var(--tm-card-bg) 70%);
}
.tm-portal-initial-invoice-layout {
    display: grid;
    grid-template-columns: 3.2rem minmax(0, 1fr);
    gap: 1.05rem;
    align-items: start;
}
.tm-portal-initial-invoice-icon {
    display: grid;
    place-items: center;
    width: 3.2rem;
    height: 3.2rem;
    border: 1px solid var(--tm-border-soft);
    border-radius: .95rem;
    background: var(--tm-brand-soft);
    color: var(--tm-link);
}
.tm-portal-initial-invoice-icon svg { width: 1.7rem; height: 1.7rem; }
.tm-portal-initial-invoice-content { min-width: 0; }
.tm-portal-initial-invoice-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .6rem 1rem;
}
.tm-portal-initial-invoice-heading h2 { margin: .22rem 0 .45rem; }
.tm-portal-initial-invoice-state {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .4rem .65rem;
    border: 1px solid var(--tm-border-soft);
    border-radius: 999px;
    background: var(--tm-brand-soft);
    color: var(--tm-link);
    font-size: .78rem;
    font-weight: 650;
    line-height: 1.3;
}
.tm-portal-initial-invoice-state::before { content: ''; display: block; width: .42rem; height: .42rem; border-radius: 50%; background: currentColor; flex: 0 0 .42rem; }
.tm-portal-initial-invoice-card--issued .tm-portal-initial-invoice-icon,
.tm-portal-initial-invoice-card--issued .tm-portal-initial-invoice-state { background: var(--tm-success-soft); color: var(--tm-success); }
.tm-portal-initial-invoice-card--review .tm-portal-initial-invoice-icon,
.tm-portal-initial-invoice-card--review .tm-portal-initial-invoice-state { background: var(--tm-warning-soft); color: var(--tm-warning-text); }
.tm-portal-initial-invoice-intro { max-width: 65ch; margin: 0; color: var(--tm-text-soft); line-height: 1.6; }
.tm-portal-initial-invoice-benefits {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
}
.tm-portal-initial-invoice-benefits li {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    padding: .8rem .85rem;
    border-radius: .75rem;
    border: 1px solid var(--tm-border-soft);
    background: var(--tm-surface-raised);
    font-size: .89rem;
    line-height: 1.45;
}
.tm-portal-initial-invoice-benefits li::before { content: '✓'; flex: 0 0 auto; color: var(--tm-success); font-weight: 800; }
.tm-portal-initial-invoice-actions { display: flex; flex-wrap: wrap; align-items: center; margin: 1.05rem 0 0; }
.tm-portal-initial-invoice-actions .tm-button { min-height: 2.7rem; }
.tm-portal-initial-invoice-feedback { margin: .5rem 0 .75rem; }
.tm-portal-initial-invoice-feedback--success,
.tm-portal-initial-invoice-feedback--warning {
    padding: .85rem .95rem;
    border-radius: .7rem;
    border: 1px solid var(--tm-border-soft);
    line-height: 1.5;
}
.tm-portal-initial-invoice-feedback--success { background: var(--tm-success-soft); color: var(--tm-text); }
.tm-portal-initial-invoice-feedback--warning { background: var(--tm-warning-soft); color: var(--tm-warning-text); }
@media (max-width: 650px) {
    .tm-portal-initial-invoice-layout { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
    .tm-portal-initial-invoice-benefits { grid-template-columns: minmax(0, 1fr); }
    .tm-portal-initial-invoice-actions .tm-button { width: 100%; justify-content: center; }
}
@media (forced-colors: active) {
    .tm-portal-initial-invoice-card, .tm-portal-initial-invoice-icon,
    .tm-portal-initial-invoice-benefits li, .tm-portal-initial-invoice-state { border: 1px solid CanvasText; }
}

/* Phase 8I: Order receipt amounts and headings share the same right edge. */
.tm-table.tm-portal-order-position-table th.tm-portal-order-amount-column,
.tm-table.tm-portal-order-position-table td.tm-portal-order-amount-column {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Staging Registrar – distinct test-only surface with a single-domain action. */
.tm-staging-registrar { display: grid; gap: 1rem; }
.tm-staging-registrar-header { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 1rem; }
.tm-staging-registrar-icon { flex: 0 0 3.1rem; width: 3.1rem; height: 3.1rem; display: grid; place-items: center; border-radius: .9rem; border: 1px solid var(--tm-border-soft); background: var(--tm-brand-soft); color: var(--tm-accent); }
.tm-staging-registrar-icon svg { width: 1.5rem; height: 1.5rem; }
.tm-staging-registrar-heading-main { flex: 1 1 20rem; min-width: 0; }
.tm-staging-registrar-heading-main h2 { margin: .2rem 0 .35rem; }
.tm-staging-registrar-heading-main p { margin: 0; color: var(--tm-text-soft); max-width: 65ch; font-size: .9rem; line-height: 1.55; }
.tm-staging-registrar-badge { white-space: nowrap; display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .75rem; border: 1px solid var(--tm-border-soft); border-radius: 999px; font-size: .78rem; font-weight: 750; background: var(--tm-warning-soft); color: var(--tm-warning-text); }
.tm-staging-registrar-badge.is-done { background: var(--tm-success-soft); color: var(--tm-success); }
.tm-staging-registrar-badge.is-blocked { background: var(--tm-warning-soft); color: var(--tm-warning-text); }
.tm-staging-registrar-progress { padding-inline: .05rem; }
.tm-staging-registrar-progress-track { height: .48rem; border-radius: 999px; overflow: hidden; background: var(--tm-surface-raised); border: 1px solid var(--tm-border-soft); }
.tm-staging-registrar-progress-track > span { display: block; height: 100%; border-radius: inherit; background: var(--tm-accent); transition: width .2s ease; }
.tm-staging-registrar-safety { display: flex; align-items: center; gap: .7rem; padding: .8rem .95rem; border-radius: .7rem; background: var(--tm-surface-raised); border: 1px solid var(--tm-border-soft); font-size: .85rem; color: var(--tm-text-soft); line-height: 1.45; }
.tm-staging-registrar-safety svg { width: 1.3rem; height: 1.3rem; flex: 0 0 1.3rem; color: var(--tm-success); }
.tm-staging-registrar-domain-list { display: grid; padding: 0; margin: 0; border: 1px solid var(--tm-border-soft); border-radius: .8rem; overflow: hidden; list-style: none; }
.tm-staging-registrar-domain-row { display: flex; align-items: center; gap: .9rem; min-width: 0; padding: .85rem 1rem; }
.tm-staging-registrar-domain-row + .tm-staging-registrar-domain-row { border-top: 1px solid var(--tm-border-soft); }
.tm-staging-registrar-domain-index { flex: 0 0 2rem; height: 2rem; display: grid; place-items: center; border-radius: .6rem; background: var(--tm-surface-raised); font-weight: 700; color: var(--tm-text-soft); font-size: .8rem; }
.tm-staging-registrar-domain-main { display: grid; gap: .1rem; flex: 1 1 auto; min-width: 0; }
.tm-staging-registrar-domain-main strong { overflow-wrap: anywhere; font-size: .95rem; }
.tm-staging-registrar-domain-main > span { font-size: .8rem; color: var(--tm-text-soft); }
.tm-staging-registrar-domain-state { display: inline-flex; align-items: center; gap: .42rem; flex: 0 0 auto; font-size: .8rem; font-weight: 680; border-radius: 999px; padding: .35rem .6rem; color: var(--tm-text-soft); background: var(--tm-surface-raised); }
.tm-staging-registrar-domain-state.is-succeeded { background: var(--tm-success-soft); color: var(--tm-success); }
.tm-staging-registrar-domain-state.is-pending,.tm-staging-registrar-domain-state.is-uncertain,.tm-staging-registrar-domain-state.is-rejected { background: var(--tm-warning-soft); color: var(--tm-warning-text); }
.tm-staging-registrar-domain-dot { width: .4rem; height: .4rem; flex: 0 0 .4rem; border-radius: 50%; background: currentColor; }
.tm-staging-registrar-action { display: grid; grid-template-columns: minmax(10rem, .75fr) minmax(15rem, 1.25fr); gap: 1.1rem; padding: 1.2rem; border: 1px solid var(--tm-border-soft); border-radius: .9rem; background: var(--tm-surface-raised); }
.tm-staging-registrar-next { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.tm-staging-registrar-next > span { font-size: .72rem; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; color: var(--tm-text-soft); }
.tm-staging-registrar-next strong { font-size: 1.05rem; overflow-wrap: anywhere; }
.tm-staging-registrar-next small { color: var(--tm-text-soft); }
.tm-staging-registrar-action form { display: grid; justify-items: start; gap: .75rem; }
.tm-staging-registrar-field { display: grid; gap: .35rem; width: 100%; font-size: .86rem; font-weight: 650; }
.tm-staging-registrar-field select { width: 100%; max-width: 26rem; }
.tm-staging-registrar-confirm { display: flex; align-items: flex-start; gap: .5rem; font-size: .84rem; line-height: 1.4; color: var(--tm-text-soft); cursor: pointer; }
.tm-staging-registrar-confirm input { margin: .15rem 0 0; flex: 0 0 auto; }
.tm-staging-registrar-action .tm-button { margin: 0; }
.tm-staging-registrar-note { margin: 0; padding: .85rem 1rem; border-radius: .75rem; border: 1px solid var(--tm-border-soft); background: var(--tm-surface-raised); color: var(--tm-text-soft); }
.tm-order-accounting-hint { display: flex; align-items: center; gap: .85rem; flex-wrap: wrap; padding: .85rem 1rem; margin-top: .8rem; border: 1px solid var(--tm-border-soft); border-radius: .8rem; background: var(--tm-surface-raised); }
.tm-order-accounting-hint-icon { width: 1.65rem; height: 1.65rem; flex: 0 0 1.65rem; display: grid; place-items: center; border-radius: 50%; background: var(--tm-warning-soft); color: var(--tm-warning-text); font-weight: 800; }
.tm-order-accounting-hint > div { flex: 1 1 19rem; min-width: 0; }
.tm-order-accounting-hint strong { font-size: .89rem; }
.tm-order-accounting-hint p { margin: .18rem 0 0; color: var(--tm-text-soft); font-size: .81rem; line-height: 1.45; }
.tm-order-accounting-hint .tm-button { white-space: normal; text-align: center; }
@media (max-width: 720px) { .tm-staging-registrar-action { grid-template-columns: 1fr; } }
@media (max-width: 500px) { .tm-staging-registrar-icon { display: none; } .tm-staging-registrar-domain-row { flex-wrap: wrap; } .tm-staging-registrar-domain-state { margin-left: 2.9rem; } .tm-staging-registrar-badge { margin-left: 0; } }
@media (prefers-reduced-motion: reduce) { .tm-staging-registrar-progress-track > span { transition: none; } }

/* Staging-only completion mail: shared card language and isolated HTML preview. */
.tm-staging-completion-card, .tm-staging-mail-review { display: grid; gap: 1rem; }
.tm-staging-mail-header { display: flex; align-items: flex-start; flex-wrap: wrap; gap: .95rem; }
.tm-staging-mail-icon { flex: 0 0 3.1rem; height: 3.1rem; width: 3.1rem; display: grid; place-items: center; border: 1px solid var(--tm-border-soft); border-radius: .9rem; background: var(--tm-brand-soft); color: var(--tm-accent); }
.tm-staging-mail-icon svg { width: 1.5rem; height: 1.5rem; }
.tm-staging-mail-heading { flex: 1 1 21rem; min-width: 0; }
.tm-staging-mail-heading .tm-card-eyebrow { margin: 0 0 .45rem; }
.tm-staging-mail-heading h2 { margin: 0 0 .45rem; font-size: 1.18rem; }
.tm-staging-mail-heading p { margin: 0; max-width: 68ch; color: var(--tm-text-soft); font-size: .9rem; line-height: 1.55; }
.tm-staging-mail-notice { display: flex; flex-direction: column; gap: .3rem; padding: .9rem 1.05rem; background: var(--tm-surface-raised); border: 1px solid var(--tm-border-soft); border-radius: .8rem; font-size: .88rem; line-height: 1.5; color: var(--tm-text-soft); }
.tm-staging-mail-notice strong { color: var(--tm-text); }
.tm-staging-mail-notice.is-success { background: var(--tm-success-soft); }
.tm-staging-mail-summary-action { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border: 1px solid var(--tm-border-soft); background: var(--tm-surface-raised); padding: 1rem; border-radius: .85rem; }
.tm-staging-mail-summary-action > div { display: grid; gap: .3rem; min-width: 0; }
.tm-staging-mail-summary-action strong { font-size: .92rem; }
.tm-staging-mail-summary-action span { font-size: .82rem; color: var(--tm-text-soft); }
.tm-staging-mail-summary-action .tm-button { margin: 0; }
.tm-staging-mail-metadata { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; }
.tm-staging-mail-metadata-item { display: grid; align-content: start; gap: .38rem; padding: .95rem 1rem; border: 1px solid var(--tm-border-soft); border-radius: .8rem; min-width: 0; }
.tm-staging-mail-metadata-item > span { font-size: .7rem; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; color: var(--tm-text-soft); }
.tm-staging-mail-metadata-item strong { font-size: .88rem; font-weight: 690; overflow-wrap: anywhere; }
.tm-staging-mail-metadata-item small { font-size: .78rem; color: var(--tm-text-soft); }
.tm-staging-mail-preview-section { overflow: hidden; border: 1px solid var(--tm-border-soft); border-radius: .9rem; }
.tm-staging-mail-preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1.05rem; border-bottom: 1px solid var(--tm-border-soft); }
.tm-staging-mail-preview-heading .tm-card-eyebrow { margin: 0 0 .25rem; }
.tm-staging-mail-preview-heading h3 { margin: 0; font-size: .98rem; }
.tm-staging-mail-preview-tag { border-radius: .4rem; border: 1px solid var(--tm-border-soft); padding: .2rem .55rem; color: var(--tm-text-soft); font-size: .7rem; font-weight: 760; }
.tm-staging-mail-html-frame { display: block; width: 100%; height: 660px; border: 0; background: #f4f8fb; }
.tm-staging-mail-send-form { display: grid; gap: 1rem; padding: 1rem; background: var(--tm-surface-raised); border: 1px solid var(--tm-border-soft); border-radius: .9rem; }
.tm-staging-mail-confirm { display: flex; align-items: flex-start; gap: .65rem; cursor: pointer; line-height: 1.5; font-size: .88rem; }
.tm-staging-mail-confirm input { flex: 0 0 auto; margin-top: .25rem; }
.tm-staging-mail-action-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .8rem; }
.tm-staging-mail-action-row > span { flex: 1 1 18rem; color: var(--tm-text-soft); font-size: .79rem; }
.tm-staging-mail-action-row .tm-button { margin: 0; }
@media (max-width: 700px) { .tm-staging-mail-metadata { grid-template-columns: 1fr; } .tm-staging-mail-html-frame { height: 560px; } }
@media (max-width: 500px) { .tm-staging-mail-icon { display: none; } .tm-staging-mail-action-row .tm-button { width: 100%; } }
@media (forced-colors: active) { .tm-staging-mail-icon, .tm-staging-mail-summary-action, .tm-staging-mail-notice, .tm-staging-mail-send-form { border: 1px solid CanvasText; } }

/* Phase 8J – payment-return automatic processing & paid invoice transparency. */
.tm-paypal-auto-submit-form { display: none; }
.tm-portal-order-setup-card h2 { margin: .35rem 0 .65rem; }
.tm-portal-order-setup-card p { margin: 0; color: var(--tm-text-soft); line-height: 1.6; }


/* Phase 8J – 0.8.4.38.0: coherent billing operator cards, local read-only progress. */
.tm-phase8j-billing-card {
    align-items: center;
    padding: 1.25rem 1.4rem;
    gap: 1.5rem;
}
.tm-phase8j-billing-card .tm-bank-transfer-action-copy {
    flex: 1 1 auto;
    display: grid;
    gap: .45rem;
    min-width: 0;
}
.tm-phase8j-billing-card .tm-card-eyebrow {
    margin-bottom: .4rem;
}
.tm-phase8j-billing-card .tm-bank-transfer-action-copy h2 {
    margin: 0;
}
.tm-phase8j-billing-card .tm-bank-transfer-action-copy p {
    margin: 0;
    max-width: 52rem;
    line-height: 1.55;
}
.tm-phase8j-billing-card .tm-bank-transfer-action-cta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
/* Staging test-invoice and credit-note review share one responsive row.
   A single visible operator card keeps the full available width. */
.tm-staging-finance-action-grid > .tm-phase8j-billing-card--staging {
    grid-column: auto;
}
.tm-staging-finance-action-grid > .tm-bank-transfer-action-card {
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: .9rem;
}
.tm-staging-finance-action-grid > .tm-bank-transfer-action-card .tm-bank-transfer-action-cta {
    margin-top: auto;
    justify-content: flex-start;
}
.tm-staging-finance-action-grid > :only-child {
    grid-column: 1 / -1;
}
.tm-phase8j-billing-progress {
    padding: .6rem .8rem;
    border: 1px solid var(--tm-border-soft);
    border-radius: .65rem;
    background: var(--tm-pill-bg);
}
.tm-phase8j-billing-progress strong {
    display: inline-block;
    margin-right: .3rem;
    color: var(--tm-text);
}
@media (max-width: 760px) {
    .tm-phase8j-billing-card {
        align-items: stretch;
        padding: 1.1rem;
    }
    .tm-phase8j-billing-card .tm-bank-transfer-action-cta {
        justify-content: stretch;
    }
}

/* Phase 8J workflow attention: make the remaining operator step legible. */
.tm-order-next-step-attention { color: var(--tm-color-warning, #8b5c16); font-weight: 500; }


/* Phase 8J – paid initial-order invoice preview, presentation only. */
.tm-paid-invoice-quote { display: grid; gap: 1.15rem; }
.tm-paid-invoice-quote-header { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 1rem; }
.tm-paid-invoice-quote-icon { display: grid; place-items: center; width: 3.1rem; height: 3.1rem; flex: 0 0 3.1rem; border-radius: .9rem; border: 1px solid var(--tm-border-soft); background: var(--tm-brand-soft); color: var(--tm-accent); }
.tm-paid-invoice-quote-icon svg { width: 1.5rem; height: 1.5rem; }
.tm-paid-invoice-quote-heading { min-width: 0; flex: 1 1 20rem; }
.tm-paid-invoice-quote-heading h2 { margin: .2rem 0 .35rem; }
.tm-paid-invoice-quote-heading p { margin: 0; max-width: 64ch; font-size: .9rem; line-height: 1.55; color: var(--tm-text-soft); }
.tm-paid-invoice-quote-preview-badge { display: inline-flex; align-items: center; border: 1px solid var(--tm-border-soft); background: var(--tm-surface-raised); border-radius: 999px; padding: .43rem .73rem; font-size: .76rem; font-weight: 750; color: var(--tm-text-soft); white-space: nowrap; }
.tm-paid-invoice-quote-progress { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; padding: .85rem 1rem; border: 1px solid var(--tm-border-soft); border-radius: .8rem; background: var(--tm-surface-raised); }
.tm-paid-invoice-quote-progress > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: .45rem; }
.tm-paid-invoice-quote-progress-label { font-size: .8rem; color: var(--tm-text-soft); }
.tm-paid-invoice-quote-progress strong { font-size: .91rem; }
.tm-paid-invoice-quote-state { display: inline-flex; align-items: center; gap: .4rem; width: max-content; max-width: 100%; padding: .3rem .6rem; font-size: .76rem; font-weight: 700; border-radius: 999px; white-space: nowrap; background: var(--tm-warning-soft); color: var(--tm-warning-text); }
.tm-paid-invoice-quote-state.is-full_success { background: var(--tm-success-soft); color: var(--tm-success); }
.tm-paid-invoice-quote-dot { display: block; width: .42rem; height: .42rem; flex: 0 0 .42rem; border-radius: 100%; background: currentColor; }
.tm-paid-invoice-quote-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.tm-paid-invoice-quote-kpi { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; gap: .3rem; padding: 1rem; border: 1px solid var(--tm-border-soft); border-radius: .85rem; background: var(--tm-surface-raised); }
.tm-paid-invoice-quote-kpi > span { color: var(--tm-text-soft); font-size: .78rem; font-weight: 650; }
.tm-paid-invoice-quote-kpi strong { font-size: clamp(1.16rem, 2vw, 1.48rem); font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: var(--tm-text); }
.tm-paid-invoice-quote-kpi small { font-size: .76rem; line-height: 1.35; color: var(--tm-text-soft); }
.tm-paid-invoice-quote-items { min-width: 0; }
.tm-paid-invoice-quote-items h3 { margin: 0 0 .65rem; font-size: .95rem; }
.tm-paid-invoice-quote-table-wrap { overflow-x: auto; border: 1px solid var(--tm-border-soft); border-radius: .85rem; }
.tm-paid-invoice-quote-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.tm-paid-invoice-quote-table th { padding: .7rem .9rem; color: var(--tm-text-soft); font-size: .69rem; font-weight: 750; text-align: left; text-transform: uppercase; letter-spacing: .04em; background: var(--tm-surface-raised); }
.tm-paid-invoice-quote-table td { padding: .72rem .9rem; border-top: 1px solid var(--tm-border-soft); vertical-align: middle; }
.tm-paid-invoice-quote-table th:last-child { text-align: right; }
.tm-paid-invoice-quote-table td:first-child { min-width: 15rem; }
.tm-paid-invoice-quote-item-number { display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; margin-right: .55rem; border-radius: .5rem; background: var(--tm-surface-raised); color: var(--tm-text-soft); font-size: .75rem; font-weight: 750; vertical-align: middle; }
.tm-paid-invoice-quote-item-description { display: inline; line-height: 1.55; overflow-wrap: anywhere; }
.tm-paid-invoice-quote-item-amount { font-weight: 750; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tm-paid-invoice-quote-review { display: flex; align-items: flex-start; gap: .8rem; border: 1px solid var(--tm-warning-border, #eac58c); border-radius: .85rem; padding: 1rem; background: var(--tm-warning-soft); color: var(--tm-warning-text); }
.tm-paid-invoice-quote-review-icon { display: grid; place-items: center; flex: 0 0 1.55rem; height: 1.55rem; border: 1px solid currentColor; border-radius: 50%; font-size: .9rem; font-weight: 800; }
.tm-paid-invoice-quote-review > div:last-child { min-width: 0; }
.tm-paid-invoice-quote-review strong { display: block; margin-bottom: .3rem; font-size: .89rem; }
.tm-paid-invoice-quote-review p { margin: 0 0 .45rem; line-height: 1.5; }
.tm-paid-invoice-quote-review ul { margin: .3rem 0 0; padding-left: 1.2rem; }
.tm-paid-invoice-quote-review li { line-height: 1.5; margin: .2rem 0; }
.tm-paid-invoice-quote-ledger-link { margin-top: .3rem; max-width: 100%; white-space: normal; text-align: center; }
.tm-paid-invoice-quote-technical { margin-top: .7rem; font-size: .78rem; }
.tm-paid-invoice-quote-technical summary { width: max-content; max-width: 100%; cursor: pointer; font-weight: 650; }
.tm-paid-invoice-quote-technical code { display: block; padding-top: .45rem; overflow-wrap: anywhere; font-size: .75rem; }
.tm-paid-invoice-quote-neutral-notice { padding: .9rem 1rem; border-radius: .8rem; border: 1px solid var(--tm-border-soft); background: var(--tm-surface-raised); }
.tm-paid-invoice-quote-neutral-notice strong { font-size: .86rem; }
.tm-paid-invoice-quote-neutral-notice p { margin: .3rem 0 0; color: var(--tm-text-soft); font-size: .84rem; }
.tm-paid-invoice-quote-footer { display: flex; align-items: flex-start; gap: .6rem; margin: 0; font-size: .83rem; line-height: 1.55; color: var(--tm-text-soft); }
.tm-paid-invoice-quote-footer svg { flex: 0 0 1.1rem; height: 1.1rem; margin-top: .08rem; }
@media (max-width: 750px) { .tm-paid-invoice-quote-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tm-paid-invoice-quote-kpi:last-child { grid-column: 1 / -1; } }
@media (max-width: 520px) { .tm-paid-invoice-quote-icon { display: none; } .tm-paid-invoice-quote-kpis { grid-template-columns: minmax(0, 1fr); } .tm-paid-invoice-quote-kpi:last-child { grid-column: auto; } .tm-paid-invoice-quote-table { min-width: 34rem; } }
@media (forced-colors: active) { .tm-paid-invoice-quote-icon, .tm-paid-invoice-quote-progress, .tm-paid-invoice-quote-kpi, .tm-paid-invoice-quote-table-wrap, .tm-paid-invoice-quote-review { border: 1px solid CanvasText; } }

/* Phase 8J – paid initial-order invoice: Staging confirmation page only. */
.tm-paid-invoice-confirm { max-width: 900px; display: grid; gap: 1.1rem; }
.tm-paid-invoice-confirm-header { display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.tm-paid-invoice-confirm-icon { display: grid; place-items: center; flex: 0 0 3.1rem; height: 3.1rem; border-radius: .9rem; background: var(--tm-brand-soft); color: var(--tm-brand-strong); border: 1px solid var(--tm-border-soft); }
.tm-paid-invoice-confirm-icon svg { width: 1.45rem; height: 1.45rem; }
.tm-paid-invoice-confirm-header-copy { flex: 1 1 22rem; min-width: 0; }
.tm-paid-invoice-confirm .tm-card-eyebrow { margin: .05rem 0 .7rem; }
.tm-paid-invoice-confirm-header h2 { margin: 0 0 .5rem; font-size: 1.18rem; }
.tm-paid-invoice-confirm-header p { margin: 0; max-width: 64ch; font-size: .9rem; line-height: 1.6; }
.tm-paid-invoice-confirm-environment { display: inline-flex; align-items: center; border: 1px solid var(--tm-border-soft); background: var(--tm-surface-raised); color: var(--tm-text-soft); border-radius: 999px; font-size: .75rem; font-weight: 750; padding: .42rem .75rem; white-space: nowrap; }
.tm-paid-invoice-confirm-ready { display: flex; gap: .8rem; align-items: flex-start; padding: 1rem; border: 1px solid color-mix(in srgb, var(--tm-success) 30%, var(--tm-border-soft)); border-radius: .85rem; background: var(--tm-success-soft); }
.tm-paid-invoice-confirm-ready-icon { display: grid; place-items: center; height: 1.55rem; flex: 0 0 1.55rem; border-radius: 50%; color: var(--tm-success); background: var(--tm-card-bg); font-weight: 800; }
.tm-paid-invoice-confirm-ready strong { display: block; font-size: .92rem; color: var(--tm-text); }
.tm-paid-invoice-confirm-ready p { margin: .3rem 0 0; font-size: .84rem; }
.tm-paid-invoice-confirm-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.tm-paid-invoice-confirm-fact { display: flex; flex-direction: column; gap: .4rem; min-width: 0; border: 1px solid var(--tm-border-soft); border-radius: .85rem; padding: 1rem; background: var(--tm-surface-raised); }
.tm-paid-invoice-confirm-fact span { color: var(--tm-text-soft); font-size: .78rem; font-weight: 650; }
.tm-paid-invoice-confirm-fact strong { font-size: 1rem; color: var(--tm-text); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.tm-paid-invoice-confirm-payment-note { display: flex; align-items: flex-start; gap: .7rem; padding: .2rem .2rem .3rem; }
.tm-paid-invoice-confirm-note-icon { display: grid; place-items: center; margin-top: .08rem; height: 1.2rem; flex: 0 0 1.2rem; border: 1px solid var(--tm-brand); border-radius: 50%; color: var(--tm-brand-strong); font-weight: 800; font-size: .73rem; }
.tm-paid-invoice-confirm-payment-note p { margin: 0; font-size: .82rem; line-height: 1.6; }
.tm-paid-invoice-confirm-form { display: grid; gap: 1rem; }
.tm-paid-invoice-confirm-confirmation { display: grid; gap: .95rem; border: 1px solid var(--tm-border-soft); border-radius: .85rem; background: var(--tm-surface-raised); padding: 1.05rem; }
.tm-paid-invoice-confirm-confirmation h3 { margin: 0; font-size: .98rem; }
.tm-paid-invoice-confirm-confirmation > p { margin: -.35rem 0 0; font-size: .84rem; }
.tm-paid-invoice-confirm-field { display: grid; gap: .45rem; max-width: 27rem; }
.tm-paid-invoice-confirm-field label { color: var(--tm-text-soft); font-size: .84rem; font-weight: 650; line-height: 1.55; }
.tm-paid-invoice-confirm-field label strong { display: block; color: var(--tm-text); font-size: .9rem; }
.tm-paid-invoice-confirm-field input { width: 100%; min-height: 2.65rem; border: 1px solid var(--tm-border); border-radius: .7rem; background: var(--tm-surface-input); color: var(--tm-text); padding: .65rem .8rem; font: inherit; }
.tm-paid-invoice-confirm-field input:focus { outline: 2px solid var(--tm-brand); outline-offset: 2px; }
.tm-paid-invoice-confirm-field small { color: var(--tm-muted); font-size: .75rem; }
.tm-paid-invoice-confirm-check { display: flex; align-items: flex-start; gap: .7rem; font-size: .84rem; line-height: 1.55; cursor: pointer; }
.tm-paid-invoice-confirm-check input { flex: 0 0 auto; width: 1.1rem; height: 1.1rem; margin: .15rem 0 0; accent-color: var(--tm-brand-strong); }
.tm-paid-invoice-confirm-check span { min-width: 0; }
.tm-paid-invoice-confirm-warning { display: flex; align-items: flex-start; gap: .8rem; border: 1px solid color-mix(in srgb, var(--tm-warning) 38%, var(--tm-border-soft)); border-radius: .85rem; background: var(--tm-warning-soft); color: var(--tm-warning-text); padding: 1rem; }
.tm-paid-invoice-confirm-warning-icon { display: grid; place-items: center; height: 1.5rem; flex: 0 0 1.5rem; border: 1px solid currentColor; border-radius: 50%; font-weight: 800; }
.tm-paid-invoice-confirm-warning strong { display: block; font-size: .87rem; }
.tm-paid-invoice-confirm-warning p { margin: .35rem 0 0; color: inherit; font-size: .84rem; line-height: 1.55; }
.tm-paid-invoice-confirm-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
@media (max-width: 720px) { .tm-paid-invoice-confirm-facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .tm-paid-invoice-confirm-fact:last-child { grid-column: 1 / -1; } }
@media (max-width: 520px) { .tm-paid-invoice-confirm-icon { display: none; } .tm-paid-invoice-confirm-facts { grid-template-columns: minmax(0, 1fr); } .tm-paid-invoice-confirm-fact:last-child { grid-column: auto; } .tm-paid-invoice-confirm-actions { align-items: stretch; flex-direction: column; } .tm-paid-invoice-confirm-actions .tm-button { width: 100%; } }
@media (forced-colors: active) { .tm-paid-invoice-confirm-ready, .tm-paid-invoice-confirm-fact, .tm-paid-invoice-confirm-confirmation, .tm-paid-invoice-confirm-warning { border: 1px solid CanvasText; } }

/* Phase 8N – invoice/customer recovery: concise operator summary; evidence stays available on demand. */
.tm-paid-invoice-review { display: grid; gap: 1rem; min-width: 0; }
.tm-paid-invoice-review-head h3 { margin: 0 0 .3rem; font-size: 1.02rem; line-height: 1.4; }
.tm-paid-invoice-review-head p { margin: 0; font-size: .87rem; color: var(--tm-text-soft); line-height: 1.55; }
.tm-paid-invoice-review-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.tm-paid-invoice-review-summary-item { min-width: 0; display: grid; gap: .25rem; border: 1px solid var(--tm-border-soft); border-radius: .75rem; background: var(--tm-surface-raised); padding: .85rem 1rem; }
.tm-paid-invoice-review-summary-item span { font-size: .78rem; font-weight: 650; color: var(--tm-text-soft); }
.tm-paid-invoice-review-summary-item strong { font-size: .94rem; overflow-wrap: anywhere; color: var(--tm-text); }
.tm-paid-invoice-review-action { display: grid; gap: .85rem; border: 1px solid var(--tm-border-soft); border-radius: .85rem; padding: 1rem; }
.tm-paid-invoice-review-action h4 { font-size: .98rem; line-height: 1.4; margin: 0; }
.tm-paid-invoice-review-action > p { margin: 0; color: var(--tm-text-soft); font-size: .85rem; line-height: 1.55; }
.tm-paid-invoice-review-approval { padding: .9rem 1rem; border: 1px solid var(--tm-border-soft); border-radius: .75rem; background: var(--tm-surface-raised); }
.tm-paid-invoice-review-approval:focus-within { outline: 2px solid var(--tm-brand); outline-offset: 2px; }
.tm-paid-invoice-review-next { font-size: .8rem !important; }
.tm-paid-invoice-review-details { min-width: 0; border-top: 1px solid var(--tm-border-soft); padding-top: .8rem; font-size: .84rem; }
.tm-paid-invoice-review-details > summary { cursor: pointer; width: fit-content; color: var(--tm-brand-strong); font-weight: 700; }
.tm-paid-invoice-review-details > summary:focus-visible { outline: 2px solid var(--tm-brand); outline-offset: 3px; }
.tm-paid-invoice-review-details > p { margin: .65rem 0; color: var(--tm-text-soft); line-height: 1.55; }
.tm-paid-invoice-review-data { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; margin: .75rem 0 0; }
.tm-paid-invoice-review-data > div { min-width: 0; padding: .7rem .8rem; border: 1px solid var(--tm-border-soft); border-radius: .65rem; }
.tm-paid-invoice-review-data dt { font-size: .75rem; font-weight: 650; color: var(--tm-text-soft); }
.tm-paid-invoice-review-data dd { margin: .3rem 0 0; font-size: .82rem; font-weight: 700; overflow-wrap: anywhere; }
@media (max-width: 520px) { .tm-paid-invoice-review-summary, .tm-paid-invoice-review-data { grid-template-columns: minmax(0, 1fr); } }
@media (forced-colors: active) { .tm-paid-invoice-review-summary-item, .tm-paid-invoice-review-action, .tm-paid-invoice-review-approval, .tm-paid-invoice-review-data > div { border: 1px solid CanvasText; } }


/* 0.8.4.42.7 – Initial-order payment reconciliation, shared Admin card rhythm */
.tm-initial-accounting-sync-card,.tm-initial-accounting-sync-confirm{display:grid;gap:1.2rem}
.tm-initial-accounting-sync-header{display:grid;grid-template-columns:3.2rem minmax(0,1fr) auto;gap:1rem;align-items:start}
.tm-initial-accounting-sync-icon{display:grid;place-items:center;width:3.2rem;height:3.2rem;border-radius:.85rem;background:var(--tm-brand-soft);color:var(--tm-brand-strong)}
.tm-initial-accounting-sync-icon svg{width:1.45rem;height:1.45rem}
.tm-initial-accounting-sync-header h2{margin:.35rem 0 .4rem;font-size:1.12rem}
.tm-initial-accounting-sync-header p{margin:0;max-width:68ch;line-height:1.6;font-size:.9rem}
.tm-initial-accounting-sync-tag{white-space:nowrap;align-self:start;padding:.45rem .7rem;border-radius:999px;background:var(--tm-surface-raised);border:1px solid var(--tm-border-soft);font-weight:700;font-size:.75rem;color:var(--tm-text-soft)}
.tm-initial-accounting-sync-status{display:flex;align-items:flex-start;gap:.8rem;padding:1rem;background:var(--tm-surface-raised);border:1px solid var(--tm-border-soft);border-radius:.85rem}
.tm-initial-accounting-sync-status-icon{display:grid;place-items:center;flex:0 0 1.5rem;width:1.5rem;height:1.5rem;border:1px solid var(--tm-brand);color:var(--tm-brand-strong);border-radius:50%;font-size:.8rem;font-weight:800}
.tm-initial-accounting-sync-status strong{display:block;font-size:.93rem}
.tm-initial-accounting-sync-status p{margin:.35rem 0 0;line-height:1.6;font-size:.84rem}
.tm-initial-accounting-sync-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.7rem}
.tm-initial-accounting-sync-facts>div{display:flex;flex-direction:column;gap:.5rem;background:var(--tm-surface-raised);border:1px solid var(--tm-border-soft);border-radius:.85rem;padding:.95rem;min-width:0}
.tm-initial-accounting-sync-facts span{font-size:.78rem;color:var(--tm-text-soft);font-weight:650}
.tm-initial-accounting-sync-facts strong{font-size:.98rem;color:var(--tm-text);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.tm-initial-accounting-sync-confirm h2{margin:0;font-size:1.05rem}
.tm-initial-accounting-sync-confirm>p{margin:-.5rem 0 0;line-height:1.6;font-size:.88rem}
.tm-initial-accounting-sync-check{display:flex;align-items:flex-start;gap:.75rem;padding:1rem;border:1px solid var(--tm-border-soft);border-radius:.85rem;background:var(--tm-surface-raised);font-size:.89rem;line-height:1.6;cursor:pointer}
.tm-initial-accounting-sync-check input{flex:0 0 auto;margin:.17rem 0 0;width:1.1rem;height:1.1rem;accent-color:var(--tm-brand-strong)}
.tm-initial-accounting-sync-actions{display:flex;flex-wrap:wrap;align-items:center;gap:.7rem}
@media(max-width:940px){.tm-initial-accounting-sync-facts{grid-template-columns:repeat(2,minmax(0,1fr))}.tm-initial-accounting-sync-header{grid-template-columns:3.2rem minmax(0,1fr)}.tm-initial-accounting-sync-tag{grid-column:2;justify-self:start}}
@media(max-width:540px){.tm-initial-accounting-sync-facts{grid-template-columns:1fr}.tm-initial-accounting-sync-header{grid-template-columns:minmax(0,1fr)}.tm-initial-accounting-sync-icon{display:none}.tm-initial-accounting-sync-tag{grid-column:1}.tm-initial-accounting-sync-actions{flex-direction:column;align-items:stretch}.tm-initial-accounting-sync-actions .tm-button{width:100%}}
@media(forced-colors:active){.tm-initial-accounting-sync-status,.tm-initial-accounting-sync-facts>div,.tm-initial-accounting-sync-check{border:1px solid CanvasText}}

/* Phase 8L: compact read-only reconciliation review summary. */
.tm-reconciliation-review-card .tm-card-eyebrow { margin-bottom: .55rem; }
.tm-reconciliation-review-row { display: flex; justify-content: space-between; align-items: center; gap: .75rem 1rem; flex-wrap: wrap; }
.tm-reconciliation-review-summary { min-width: 0; flex: 1 1 22rem; }
.tm-reconciliation-review-summary .tm-muted { margin: .2rem 0 0; }
.tm-reconciliation-review-row > .tm-button { flex: 0 0 auto; margin-left: auto; }

/* Phase 8 – Portalkennzeichnung und kompakte Hinweise: einmalig, keine Footer-Doppelboxen. */
.tm-portal-pagebar { gap: .7rem 1.25rem; justify-content: space-between; }
.tm-portal-pagebar .tm-portal-staging-indicator {
    display: inline-flex; align-items: center; flex: 0 0 auto; gap: .45rem;
    padding: .3rem .6rem; border: 1px solid var(--tm-border);
    border-radius: 999px; background: var(--tm-surface);
    color: var(--tm-text-soft); font-weight: 750; font-size: .73rem;
    white-space: nowrap;
}
.tm-portal-staging-indicator-mark {
    width: .45rem; height: .45rem; border-radius: 50%;
    background: var(--tm-warning, #b77515); flex: 0 0 auto;
}
.tm-portal-empty-card .tm-portal-pending-service-hint {
    margin-top: .7rem; color: var(--tm-muted); max-width: 56rem;
}
@media (max-width: 590px) {
    .tm-portal-pagebar { flex-wrap: wrap; }
    .tm-portal-pagebar .tm-portal-staging-indicator { white-space: normal; }
}

/* Phase 8 – compact early Plesk request confirmation, reuse portal legal/progress layers. */

/* 0.8.4.88.0 – Plesk provider compatibility, local read-only admin presentation. */
.tm-plesk-compat .tm-card-eyebrow,.tm-plesk-sso .tm-card-eyebrow,.tm-plesk-operations .tm-card-eyebrow{margin-bottom:.35rem}
.tm-plesk-compat-heading,.tm-plesk-operations-heading{display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:.85rem 1.25rem}
.tm-plesk-compat-heading>div,.tm-plesk-operations-heading>div{min-width:0;flex:1 1 28rem}
.tm-plesk-compat-heading h2,.tm-plesk-sso h2,.tm-plesk-operations-heading h2{font-size:1.16rem;letter-spacing:-.015em}
.tm-plesk-compat-heading .tm-muted,.tm-plesk-sso .tm-muted,.tm-plesk-operations-heading .tm-muted{margin:.4rem 0 0;font-size:.84rem}
.tm-plesk-compat-heading>.tm-badge{flex:0 0 auto}
.tm-plesk-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.7rem;margin-top:1.1rem}
.tm-plesk-stat{min-width:0;display:flex;flex-direction:column;gap:.32rem;padding:.9rem 1rem;border:1px solid var(--tm-border-soft);border-radius:.85rem;background:var(--tm-control-bg)}
.tm-plesk-stat>span{color:var(--tm-text-soft);font-size:.74rem;font-weight:650}
.tm-plesk-stat>strong{color:var(--tm-text);font-size:1.6rem;font-weight:750;letter-spacing:-.035em;font-variant-numeric:tabular-nums}
.tm-plesk-stat>strong.tm-plesk-stat-word{font-size:.96rem;letter-spacing:0;line-height:1.7}
.tm-plesk-stat>small{font-size:.7rem;line-height:1.4;color:var(--tm-muted)}
.tm-plesk-boundary{display:flex;gap:.5rem;align-items:flex-start;margin:.85rem 0 0!important;font-size:.75rem;line-height:1.5!important;color:var(--tm-muted)!important}
.tm-plesk-boundary>span{flex:0 0 auto;color:var(--tm-brand-strong)}
.tm-plesk-sso-layout{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:1rem 1.4rem}
.tm-plesk-sso-copy{min-width:0;flex:1 1 29rem}
.tm-plesk-sso-state{display:flex;align-items:center;flex-wrap:wrap;gap:.55rem .8rem;margin-top:.85rem}
.tm-plesk-sso-state>span:not(.tm-badge){flex:1 1 18rem;color:var(--tm-muted);font-size:.73rem;line-height:1.5}
.tm-plesk-sso-action{flex:0 0 auto;white-space:nowrap}
.tm-plesk-operations{padding:1.35rem 0 0;overflow:hidden}
.tm-plesk-operations-heading{padding:0 1.35rem 1.1rem}
.tm-plesk-operations-heading .tm-count-pill{flex:0 0 auto}
.tm-plesk-operation-group{border-top:1px solid var(--tm-border-soft)}
.tm-plesk-operation-group>summary{display:flex;align-items:center;gap:.75rem;padding:.95rem 1.35rem;cursor:pointer;list-style:none;background:var(--tm-card-bg)}
.tm-plesk-operation-group>summary::-webkit-details-marker,.tm-plesk-operation-details>summary::-webkit-details-marker{display:none}
.tm-plesk-operation-group>summary:hover{background:var(--tm-control-bg)}
.tm-plesk-operation-group>summary:focus-visible,.tm-plesk-operation-details>summary:focus-visible{outline:2px solid var(--tm-brand-strong);outline-offset:-2px}
.tm-plesk-group-heading{display:grid;gap:.2rem;min-width:0;flex:1}
.tm-plesk-group-heading strong{font-size:.86rem;color:var(--tm-text)}
.tm-plesk-group-heading small{font-size:.74rem;color:var(--tm-muted);line-height:1.4}
.tm-plesk-group-count{padding:.2rem .6rem;border:1px solid var(--tm-border-soft);background:var(--tm-control-bg);border-radius:999px;font-size:.74rem;font-weight:700;font-variant-numeric:tabular-nums}
.tm-plesk-chevron{width:.5rem;height:.5rem;border-right:2px solid var(--tm-text-soft);border-bottom:2px solid var(--tm-text-soft);transform:rotate(45deg);margin:0 .2rem 3px .35rem;transition:transform .18s ease}
.tm-plesk-operation-group[open]>.tm-plesk-group-heading,.tm-plesk-operation-group[open]>.tm-plesk-group-count{color:var(--tm-brand-strong)}
.tm-plesk-operation-group[open] .tm-plesk-chevron{transform:rotate(225deg);margin-top:5px}
.tm-plesk-operation-table{table-layout:fixed}
.tm-plesk-operation-table th:first-child{width:31%}
.tm-plesk-operation-table th:nth-child(2){width:16%}
.tm-plesk-operation-table th:nth-child(3){width:21%}
.tm-plesk-operation-table th:nth-child(4){width:32%}
.tm-plesk-operation-table td{vertical-align:top;padding:.8rem .9rem}
.tm-plesk-operation-table tbody tr:nth-child(even){background:color-mix(in srgb,var(--tm-control-bg) 40%,transparent)}
.tm-plesk-operation-name strong{display:block;color:var(--tm-text);font-size:.81rem;line-height:1.45}
.tm-plesk-operation-name code{display:block;overflow-wrap:anywhere;margin-top:.25rem;color:var(--tm-muted);font-size:.69rem}
.tm-plesk-operation-details{margin-top:.45rem;max-width:100%}
.tm-plesk-operation-details>summary{width:max-content;max-width:100%;cursor:pointer;color:var(--tm-brand-strong);font-weight:700;font-size:.72rem;list-style:none}
.tm-plesk-operation-details>summary:after{content:' ▾';font-size:.72rem}
.tm-plesk-operation-details[open]>summary:after{content:' ▴'}
.tm-plesk-operation-details dl{display:grid;gap:.6rem;margin:.65rem 0 0;padding:.7rem;border:1px solid var(--tm-border-soft);border-radius:.7rem;background:var(--tm-control-bg)}
.tm-plesk-operation-details dl>div{min-width:0}
.tm-plesk-operation-details dt{font-size:.7rem;color:var(--tm-muted)}
.tm-plesk-operation-details dd{margin:.16rem 0 0;font-size:.73rem;overflow-wrap:anywhere}
.tm-plesk-operation-details code{white-space:normal;overflow-wrap:anywhere;font-size:.69rem}
.tm-plesk-operation-details ul{margin:.35rem 0 0;padding-left:1.1rem}
.tm-plesk-operation-details li+li{margin-top:.45rem}
.tm-plesk-operation-details li span{display:block;line-height:1.45}
.tm-plesk-operations-footer{padding:.85rem 1.35rem;margin:0!important;border-top:1px solid var(--tm-border-soft);font-size:.73rem;line-height:1.5!important;color:var(--tm-muted)!important}
@media(max-width:1020px){.tm-plesk-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.tm-plesk-operation-table{min-width:700px}}
@media(max-width:620px){.tm-plesk-stats{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.tm-plesk-stat{padding:.75rem}.tm-plesk-operations{padding-top:1rem}.tm-plesk-operation-group>summary,.tm-plesk-operations-heading{padding-left:1rem;padding-right:1rem}.tm-plesk-sso-action{width:100%;text-align:center}.tm-plesk-compat-heading>.tm-badge{margin-top:.25rem}}
@media(max-width:390px){.tm-plesk-stats{grid-template-columns:1fr}}
@media(forced-colors:active){.tm-plesk-stat,.tm-plesk-operation-details dl{border:1px solid CanvasText}}

/* Phase 8 / 0.8.4.132.0: reviewed paid-order Plesk gate – shared Admin card rhythm. */
.tm-paid-plesk-gate { display: grid; gap: 1rem; }
.tm-paid-plesk-gate-header { display: flex; align-items: flex-start; gap: 1rem; }
.tm-paid-plesk-gate-icon { display: grid; place-items: center; flex: 0 0 3rem; width: 3rem; height: 3rem; border: 1px solid var(--tm-border-soft); border-radius: .85rem; color: var(--tm-accent); background: var(--tm-brand-soft); }
.tm-paid-plesk-gate-icon svg { width: 1.5rem; height: 1.5rem; }
.tm-paid-plesk-gate-heading-main { min-width: 0; flex: 1; }
.tm-paid-plesk-gate .tm-card-eyebrow { margin: 0 0 .35rem; }
.tm-paid-plesk-gate-heading-main h2 { margin: 0 0 .35rem; }
.tm-paid-plesk-gate-heading-main p { margin: 0; font-size: .89rem; line-height: 1.55; color: var(--tm-text-soft); }
.tm-paid-plesk-gate-evidence { display: flex; flex-wrap: wrap; gap: .5rem; }
.tm-paid-plesk-gate-evidence span { display: inline-flex; align-items: center; gap: .45rem; padding: .42rem .65rem; border-radius: 999px; border: 1px solid var(--tm-border-soft); background: var(--tm-success-soft); color: var(--tm-success); font-size: .8rem; font-weight: 700; }
.tm-paid-plesk-gate-evidence span::before { content: '✓'; font-weight: 800; }
.tm-paid-plesk-gate-boundary { padding: .85rem 1rem; border: 1px solid var(--tm-border-soft); border-radius: .75rem; background: var(--tm-surface-raised); }
.tm-paid-plesk-gate-boundary strong { display: block; font-size: .88rem; }
.tm-paid-plesk-gate-boundary p { margin: .28rem 0 0; font-size: .84rem; line-height: 1.5; color: var(--tm-text-soft); }
.tm-paid-plesk-gate-form { display: grid; gap: .85rem; }
.tm-paid-plesk-gate-confirm { display: flex; align-items: flex-start; gap: .8rem; cursor: pointer; padding: .9rem 1rem; border: 1px solid var(--tm-border-soft); border-radius: .75rem; background: var(--tm-card-bg); }
.tm-paid-plesk-gate-confirm:focus-within { outline: 2px solid var(--tm-accent); outline-offset: 2px; }
.tm-paid-plesk-gate-confirm input { flex: 0 0 auto; width: 1.05rem; height: 1.05rem; margin: .1rem 0 0; accent-color: var(--tm-accent); cursor: pointer; }
.tm-paid-plesk-gate-confirm-copy { min-width: 0; display: grid; gap: .22rem; font-size: .86rem; line-height: 1.5; }
.tm-paid-plesk-gate-confirm-copy strong { color: var(--tm-text); }
.tm-paid-plesk-gate-confirm-copy > span { color: var(--tm-text-soft); }
.tm-paid-plesk-gate-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1.25rem; padding-top: .85rem; border-top: 1px solid var(--tm-border-soft); }
.tm-paid-plesk-gate-action-note { font-size: .8rem; line-height: 1.45; color: var(--tm-text-soft); }
.tm-paid-plesk-gate-actions .tm-button { margin: 0; }
.tm-paid-plesk-gate-status { margin: 0; padding: .75rem .85rem; border: 1px solid var(--tm-border-soft); border-radius: .65rem; font-size: .84rem; background: var(--tm-surface-raised); }
.tm-paid-plesk-gate-status.is-done { color: var(--tm-success); background: var(--tm-success-soft); }
.tm-paid-plesk-gate-status.is-blocked { color: var(--tm-warning-text); background: var(--tm-warning-soft); }
@media (max-width: 620px) {
    .tm-paid-plesk-gate-header { gap: .75rem; }
    .tm-paid-plesk-gate-icon { flex-basis: 2.6rem; width: 2.6rem; height: 2.6rem; }
    .tm-paid-plesk-gate-actions { align-items: stretch; flex-direction: column; }
    .tm-paid-plesk-gate-actions .tm-button { width: 100%; }
}
@media (forced-colors: active) {
    .tm-paid-plesk-gate-icon, .tm-paid-plesk-gate-evidence span, .tm-paid-plesk-gate-boundary, .tm-paid-plesk-gate-confirm { border: 1px solid CanvasText; }
}

/* Phase 8 – Plesk Create API-contract review, aligned with global Admin card spacing. */
.tm-plesk-contract-review { max-width: 960px; display: grid; gap: 1rem; }
.tm-plesk-contract-review-header { display: flex; gap: .9rem; align-items: flex-start; flex-wrap: wrap; }
.tm-plesk-contract-review-icon { width: 2.7rem; height: 2.7rem; flex: 0 0 2.7rem; display: grid; place-items: center; border-radius: .75rem; background: var(--tm-brand-soft); border: 1px solid var(--tm-border-soft); color: var(--tm-brand-strong); font-weight: 800; }
.tm-plesk-contract-review-heading { flex: 1 1 24rem; min-width: 0; }
.tm-plesk-contract-review .tm-card-eyebrow { margin: 0 0 .35rem; }
.tm-plesk-contract-review-heading h2 { font-size: 1.14rem; margin: 0 0 .35rem; }
.tm-plesk-contract-review-heading p { margin: 0; font-size: .88rem; line-height: 1.55; color: var(--tm-text-soft); }
.tm-plesk-contract-review-status { display: grid; gap: .25rem; border: 1px solid var(--tm-border-soft); border-radius: .75rem; padding: .85rem 1rem; }
.tm-plesk-contract-review-status.is-ready { background: var(--tm-success-soft); color: var(--tm-success); }
.tm-plesk-contract-review-status.is-blocked { background: var(--tm-danger-soft); color: var(--tm-danger-text); }
.tm-plesk-contract-review-status strong { font-size: .88rem; }
.tm-plesk-contract-review-status span { color: var(--tm-text-soft); font-size: .83rem; }
.tm-plesk-contract-review-facts { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: .65rem; }
.tm-plesk-contract-review-facts > div { min-width: 0; padding: .85rem; border: 1px solid var(--tm-border-soft); border-radius: .7rem; background: var(--tm-surface-raised); display: grid; gap: .2rem; }
.tm-plesk-contract-review-facts small { color: var(--tm-text-soft); font-size: .74rem; }
.tm-plesk-contract-review-facts strong { overflow-wrap: anywhere; font-size: .93rem; font-variant-numeric: tabular-nums; }
.tm-plesk-contract-review-fingerprint { display: grid; gap: .35rem; padding: .85rem 1rem; border: 1px solid var(--tm-border-soft); border-radius: .75rem; }
.tm-plesk-contract-review-fingerprint span { color: var(--tm-text-soft); font-size: .78rem; }
.tm-plesk-contract-review-fingerprint code { overflow-wrap: anywhere; font-size: .8rem; }
.tm-plesk-contract-review-form { display: grid; gap: 1rem; }
.tm-plesk-contract-review-boundary, .tm-plesk-contract-review-warning { padding: .85rem 1rem; border-radius: .75rem; border: 1px solid var(--tm-border-soft); background: var(--tm-surface-raised); }
.tm-plesk-contract-review-boundary strong, .tm-plesk-contract-review-warning strong { font-size: .87rem; }
.tm-plesk-contract-review-boundary p, .tm-plesk-contract-review-warning p { margin: .3rem 0 0; font-size: .83rem; line-height: 1.55; }
.tm-plesk-contract-review-warning { color: var(--tm-danger-text); background: var(--tm-danger-soft); }
.tm-plesk-contract-review-checks { display: grid; gap: .5rem; }
.tm-plesk-contract-review-checks label { display: flex; align-items: flex-start; gap: .7rem; cursor: pointer; padding: .8rem; border: 1px solid var(--tm-border-soft); border-radius: .75rem; font-size: .84rem; }
.tm-plesk-contract-review-checks input { margin: .17rem 0 0; width: 1.05rem; height: 1.05rem; flex: 0 0 1.05rem; accent-color: var(--tm-brand-strong); }
.tm-plesk-contract-review-checks label:focus-within { outline: 2px solid var(--tm-brand); outline-offset: 2px; }
.tm-plesk-contract-review-actions, .tm-plesk-contract-review-footer { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; padding-top: .8rem; border-top: 1px solid var(--tm-border-soft); }
.tm-order-plesk-contract-entry { display: flex; justify-content: space-between; gap: .8rem 1.25rem; flex-wrap: wrap; align-items: center; padding: .85rem 1rem; border-radius: .75rem; border: 1px solid var(--tm-border-soft); background: var(--tm-surface-raised); }
.tm-order-plesk-contract-entry strong { font-size: .85rem; }
.tm-order-plesk-contract-entry p { margin: .3rem 0 0; max-width: 60ch; font-size: .82rem; line-height: 1.45; color: var(--tm-text-soft); }
@media(max-width: 620px) {
  .tm-plesk-contract-review-actions { align-items: stretch; flex-direction: column; }
  .tm-plesk-contract-review-actions .tm-button, .tm-order-plesk-contract-entry .tm-button { width: 100%; text-align: center; }
}
@media(forced-colors: active) { .tm-plesk-contract-review-status, .tm-plesk-contract-review-facts > div, .tm-plesk-contract-review-checks label { border: 1px solid CanvasText; } }


/* Phase 8O / 0.8.4.145.0 – verified PayPal capture fees: compact, responsive billing overview. */
.tm-billing-payments-card .tm-paypal-fee-summary {
    margin: .8rem 1.2rem 1rem;
    padding: 1rem;
    border: 1px solid var(--tm-border-soft);
    border-radius: 12px;
    background: var(--tm-secondary-bg);
}
.tm-paypal-fee-summary-head { margin-bottom: .8rem; }
.tm-paypal-fee-summary-head .tm-card-eyebrow { margin: 0 0 .22rem; }
.tm-paypal-fee-summary-head h3 { margin: 0; font-size: 1rem; font-weight: 650; }
.tm-paypal-fee-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .7rem;
    margin: 0;
}
.tm-paypal-fee-metric {
    min-width: 0;
    padding: .85rem .95rem;
    border-radius: 10px;
    border: 1px solid var(--tm-border-soft);
    background: var(--tm-card-bg);
}
.tm-paypal-fee-metric dt { margin: 0 0 .4rem; color: var(--tm-text-soft); font-size: .78rem; line-height: 1.35; }
.tm-paypal-fee-metric dd { margin: 0; font-size: clamp(1.12rem, 1.8vw, 1.5rem); font-weight: 750; line-height: 1.25; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tm-paypal-fee-metric dd small { font-size: .7em; font-weight: 550; color: var(--tm-text-soft); }
.tm-paypal-fee-metric-fee dd { color: var(--tm-warning); }
.tm-paypal-fee-metric-net { border-color: var(--tm-success); }
.tm-paypal-fee-metric-net dd { color: var(--tm-success); }
.tm-paypal-fee-summary-note { margin: .7rem 0 0; color: var(--tm-text-soft); font-size: .78rem; line-height: 1.5; max-width: 90ch; }
@media (max-width: 780px) {
    .tm-paypal-fee-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tm-paypal-fee-metric-net { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
    .tm-billing-payments-card .tm-paypal-fee-summary { margin-inline: .95rem; padding: .8rem; }
    .tm-paypal-fee-metrics { grid-template-columns: 1fr; }
    .tm-paypal-fee-metric-net { grid-column: auto; }
}
@media (forced-colors: active) {
    .tm-paypal-fee-summary, .tm-paypal-fee-metric, .tm-paypal-fee-metric-net { border: 1px solid CanvasText; }
}

/* Phase 8O: visible, accessible progress for the already-authorized Accounting correction. */
.tm-accounting-correction-layer[hidden] { display: none !important; }
.tm-accounting-correction-layer { position: fixed; z-index: 1200; inset: 0; display: grid; place-items: center; padding: 1rem; background: rgb(12 25 41 / .64); }
.tm-accounting-correction-layer-panel { width: min(100%, 32rem); display: grid; justify-items: center; gap: .9rem; padding: 2rem; border-radius: 1rem; border: 1px solid var(--tm-border); background: var(--tm-surface, #fff); color: var(--tm-text); text-align: center; box-shadow: 0 1rem 3rem rgb(0 0 0 / .22); }
.tm-accounting-correction-layer-panel p { margin: 0; line-height: 1.5; }
.tm-accounting-correction-spinner { display: block; width: 2.2rem; height: 2.2rem; border: .22rem solid var(--tm-border); border-top-color: var(--tm-brand, #0982ca); border-radius: 50%; animation: tm-accounting-correction-spin 1s linear infinite; }
@keyframes tm-accounting-correction-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .tm-accounting-correction-spinner { animation: none; } }

/* 0.8.4.149.0 – Payment-source hierarchy: live invoice payment before compact PayPal audit trail. */
.tm-settlement-history-card { padding: 0; overflow: hidden; }
.tm-settlement-history-heading { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: .65rem 1rem; padding: 1.15rem 1.2rem 1rem; border-bottom: 1px solid var(--tm-border-soft); }
.tm-settlement-history-heading .tm-card-eyebrow { display: block; margin-bottom: .3rem; }
.tm-settlement-history-heading h2 { margin: 0; font-size: 1.1rem; }
.tm-settlement-history-heading p { margin: .4rem 0 0; color: var(--tm-text-soft); font-size: .85rem; line-height: 1.5; max-width: 70ch; }
.tm-settlement-history-badge { flex: 0 0 auto; border-radius: 99px; padding: .3rem .65rem; background: var(--tm-surface-raised); color: var(--tm-text-soft); font-size: .73rem; font-weight: 700; }
.tm-settlement-history-events { margin: 0; padding: .4rem 1.2rem; list-style: none; }
.tm-settlement-history-event { display: flex; gap: .75rem; align-items: center; min-width: 0; padding: .75rem 0; }
.tm-settlement-history-event + .tm-settlement-history-event { border-top: 1px solid var(--tm-border-soft); }
.tm-settlement-history-step { width: 1.65rem; height: 1.65rem; flex: 0 0 1.65rem; display: grid; place-items: center; border: 1px solid var(--tm-border); border-radius: 50%; background: var(--tm-secondary-bg); color: var(--tm-text-soft); font-weight: 750; font-size: .76rem; }
.tm-settlement-history-event.is-refund .tm-settlement-history-step { background: var(--tm-success-soft); color: var(--tm-success); border-color: var(--tm-success); }
.tm-settlement-history-event-copy { display: grid; gap: .18rem; min-width: 0; flex: 1; }
.tm-settlement-history-event-copy strong { font-size: .88rem; font-weight: 680; }
.tm-settlement-history-event-copy small { color: var(--tm-text-soft); font-size: .77rem; overflow-wrap: anywhere; }
.tm-settlement-history-amount { flex: 0 0 auto; text-align: right; font-size: .96rem; font-weight: 740; font-variant-numeric: tabular-nums; }
.tm-settlement-history-event.is-refund .tm-settlement-history-amount { color: var(--tm-success); }
.tm-settlement-history-current { display: flex; align-items: baseline; flex-wrap: wrap; gap: .35rem .5rem; margin: .2rem 1.2rem 1rem; padding: .75rem .9rem; border: 1px solid var(--tm-border-soft); border-radius: 10px; background: var(--tm-secondary-bg); color: var(--tm-text-soft); font-size: .82rem; line-height: 1.45; }
.tm-settlement-history-current-dot { display: inline-block; align-self: center; width: .45rem; height: .45rem; flex: 0 0 .45rem; border-radius: 50%; background: var(--tm-success); }
.tm-settlement-history-current a { color: var(--tm-link); font-weight: 650; }
.tm-settlement-history-details { border-top: 1px solid var(--tm-border-soft); }
.tm-settlement-history-details > summary { cursor: pointer; padding: .85rem 1.2rem; color: var(--tm-link); font-size: .82rem; font-weight: 670; }
.tm-settlement-history-details > summary:hover { background: var(--tm-secondary-bg); }
.tm-settlement-history-details > summary:focus-visible { outline: 2px solid var(--tm-brand); outline-offset: -3px; }
.tm-settlement-history-details .tm-paypal-fee-summary { margin: 0 1.2rem 1rem; padding: .85rem; border: 1px solid var(--tm-border-soft); border-radius: 10px; background: var(--tm-secondary-bg); }
.tm-settlement-history-details .tm-paypal-fee-metric { padding: .7rem .8rem; }
.tm-settlement-history-details .tm-paypal-fee-metric dd { font-size: 1.1rem; }
.tm-settlement-history-details .tm-paypal-fee-metric-net { border-color: var(--tm-border-soft); }
.tm-settlement-history-details .tm-paypal-fee-metric-net dd { color: var(--tm-text); }
@media(max-width: 560px) {
    .tm-settlement-history-heading { padding: 1rem .95rem .85rem; }
    .tm-settlement-history-events { padding: .35rem .95rem; }
    .tm-settlement-history-event { flex-wrap: wrap; gap: .4rem .65rem; }
    .tm-settlement-history-amount { margin-left: 2.3rem; }
    .tm-settlement-history-current { margin-inline: .95rem; }
    .tm-settlement-history-details > summary { padding-inline: .95rem; }
    .tm-settlement-history-details .tm-paypal-fee-summary { margin-inline: .95rem; }
}
@media(forced-colors: active) { .tm-settlement-history-step, .tm-settlement-history-badge, .tm-settlement-history-current { border: 1px solid CanvasText; } }

/* 0.8.4.161.0 – local additional bank-credit decision modal */
.tm-additional-bank-credit-dialog { border:1px solid var(--tm-border,#d3dce5); border-radius:16px; width:min(34rem,calc(100vw - 2rem)); max-width:100%; padding:0; color:inherit; background:var(--tm-surface,#fff); box-shadow:0 18px 50px rgba(21,46,71,.22); }
.tm-additional-bank-credit-dialog::backdrop { background:rgba(17,30,45,.55); }
.tm-additional-bank-credit-dialog-content { padding:1.5rem; }
.tm-additional-bank-credit-dialog-content h2 { margin:0 0 .8rem; font-size:1.25rem; }
.tm-additional-bank-credit-dialog-content p { margin:0 0 1.2rem; line-height:1.6; }

/* 0.8.4.177.0 – compact order/nonpayment and payment review actions. */
.tm-order-nonpayment-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem 1.2rem;
}
.tm-order-nonpayment-content > div:first-child { flex: 1 1 22rem; min-width: 0; }
.tm-order-nonpayment-content h2 { margin: .28rem 0 .35rem; }
.tm-order-nonpayment-content p { margin: 0; color: var(--tm-text-soft); }
.tm-review-action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin: .65rem 0 0;
}
.tm-order-nonpayment-content > .tm-review-action-row { margin: 0; }
.tm-review-action-row .tm-button { width: auto; max-width: 100%; min-height: 2.25rem; padding: .46rem .76rem; font-size: .8rem; white-space: normal; text-align: center; }
.tm-payment-pending-card > .tm-review-action-row { margin-top: .65rem; }
@media (max-width: 560px) {
    .tm-order-nonpayment-content > .tm-review-action-row { width: 100%; }
}

/* P11F-05 / Staging portal fixture credential management: existing global card gap. */
.tm-staging-fixture-settings { max-width: 920px; }
.tm-staging-fixture-form { display: grid; gap: var(--tm-card-stack-gap, 16px); margin-top: 18px; }
.tm-staging-fixture-form .tm-field { display: flex; flex-direction: column; gap: 7px; }
.tm-staging-fixture-form .tm-field input { width: 100%; box-sizing: border-box; min-height: 43px; padding: 10px 12px; border: 1px solid var(--tm-border); border-radius: 9px; background: var(--tm-surface, #fff); color: var(--tm-text, #203347); }
.tm-staging-fixture-passwords { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--tm-card-stack-gap, 16px); }
.tm-staging-fixture-note { color: var(--tm-text-soft); font-size: .85rem; line-height: 1.5; }
.tm-staging-fixture-actions { display: flex; justify-content: flex-end; }
@media (max-width: 740px) { .tm-staging-fixture-passwords { grid-template-columns: 1fr; } .tm-staging-fixture-actions .tm-button { width: 100%; } }

/* Phase 8P – consistent paid state and legible, single payment-method note. */
.tm-portal-order-payment-confirmed { font-size: .96rem; line-height: 1.5; }
.tm-portal-order-payment-confirmed strong { font-size: 1.05rem; }
.tm-portal-order-payment-confirmed p { margin: .3rem 0 0; }
.tm-portal-order-payment-guidance {
    margin: .85rem 0 1rem;
    padding: .75rem .95rem;
    border-radius: .65rem;
    border: 1px solid var(--tm-border-soft);
    background: var(--tm-control-bg);
    color: var(--tm-text-soft);
    font-size: .94rem;
    line-height: 1.5;
}

/* Phase 8Q: PayPal response evidence uses the established admin spacing and controls. */
.tm-payment-api-response-details + .tm-payment-api-response-details { margin-top: .75rem; }
.tm-payment-api-response-summary { cursor: pointer; }
.tm-payment-api-response-summary:focus-visible { outline: 2px solid var(--tm-brand); outline-offset: 3px; }
.tm-payment-api-response-body {
    max-height: 26rem;
    overflow: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    padding: .75rem;
    border-radius: .5rem;
    background: var(--tm-control-bg);
}

/* Admin customers: small, accessible recurring-billing exclusion warning. */
.tm-customer-billing-identity { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .4rem; }
.tm-recurring-exclusion-icon { color: var(--tm-danger); display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; flex: 0 0 auto; }
.tm-recurring-exclusion-icon svg { width: 1rem; height: 1rem; display: block; }
.tm-recurring-exclusion-detail { margin: .15rem 0 1rem; display: flex; align-items: flex-start; gap: .48rem; color: var(--tm-text-soft); font-size: .82rem; line-height: 1.5; }
.tm-recurring-exclusion-detail .tm-recurring-exclusion-icon { margin-top: .1rem; }
.tm-recurring-exclusion-detail strong { color: var(--tm-danger-text); }

/* A paid advance is not the service finalization. Keep the status compact. */
.tm-order-advance-final-invoice-notice {
    display: grid;
    gap: .35rem;
    margin-top: .85rem;
    padding: .75rem 1rem;
    border: 1px solid var(--tm-border);
    border-left: 3px solid var(--tm-warning);
    border-radius: var(--tm-radius-sm, .5rem);
    background: var(--tm-surface-raised);
    font-size: .82rem;
    color: var(--tm-text);
}
.tm-order-advance-final-invoice-notice span { color: var(--tm-muted); }
.tm-order-manual-completion-comment { white-space: pre-wrap; overflow-wrap: anywhere; }

/* 0.8.4.236.0 – compact staging customer order-test approval card */
.tm-staging-commerce-checkout { display: grid; align-content: start; gap: 1rem; }
.tm-staging-commerce-checkout-header { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1.25rem; }
.tm-staging-commerce-checkout-heading { flex: 1 1 23rem; min-width: 0; }
.tm-staging-commerce-checkout-heading .tm-card-eyebrow { display: block; margin-bottom: .35rem; }
.tm-staging-commerce-checkout-heading h2 { margin: 0; font-size: 1.05rem; }
.tm-staging-commerce-checkout-heading p { margin: .45rem 0 0; color: var(--tm-text-soft); font-size: .84rem; line-height: 1.5; max-width: 65rem; }
.tm-staging-commerce-checkout-header > .tm-staging-test-account-badge { margin-top: .1rem; flex: 0 0 auto; }
.tm-staging-commerce-checkout-warning { display: flex; align-items: flex-start; gap: .65rem; padding: .78rem .9rem; border: 1px solid color-mix(in srgb, var(--tm-warning) 35%, var(--tm-border)); border-radius: .72rem; color: var(--tm-warning-text); background: var(--tm-warning-soft); }
.tm-staging-commerce-checkout-warning svg { width: 1.05rem; height: 1.05rem; flex: 0 0 auto; margin-top: .12rem; }
.tm-staging-commerce-checkout-warning p { margin: 0; max-width: none; color: inherit; font-size: .83rem; line-height: 1.48; }
.tm-staging-commerce-checkout-footer { border-top: 1px solid var(--tm-border-soft); padding-top: .9rem; }
.tm-staging-commerce-checkout-footer.is-actionable { display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, 1.05fr); align-items: center; column-gap: 1.5rem; row-gap: .9rem; }
.tm-staging-commerce-checkout-hint { margin: 0; max-width: none; color: var(--tm-muted); font-size: .77rem; line-height: 1.5; }
.tm-staging-commerce-checkout-form { display: flex; gap: .7rem 1rem; align-items: center; justify-content: flex-end; flex-wrap: wrap; min-width: 0; }
.tm-staging-commerce-checkout-confirm { display: flex; align-items: flex-start; gap: .55rem; flex: 1 1 14rem; min-width: 0; font-size: .8rem; line-height: 1.45; color: var(--tm-text-soft); cursor: pointer; }
.tm-staging-commerce-checkout-confirm input { flex: 0 0 auto; margin: .2rem 0 0; }
.tm-staging-commerce-checkout-form .tm-button { flex: 0 0 auto; max-width: 100%; white-space: normal; text-align: center; }
@media (max-width: 850px) {
    .tm-staging-commerce-checkout-footer.is-actionable { grid-template-columns: minmax(0, 1fr); }
    .tm-staging-commerce-checkout-form { justify-content: flex-start; }
}
@media (max-width: 580px) {
    .tm-staging-commerce-checkout-form { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: stretch; }
    .tm-staging-commerce-checkout-form .tm-button { width: 100%; }
}
@media (forced-colors: active) {
    .tm-staging-commerce-checkout-warning { border-color: CanvasText; background: Canvas; color: CanvasText; }
}

/* Order detail: documented PayPal refund after partial fulfilment. */
.tm-partial-refund {
    display: grid;
    gap: 1rem;
    min-width: 0;
    scroll-margin-top: 1rem;
    container: partial-refund / inline-size;
}
.tm-partial-refund-header { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.tm-partial-refund-icon {
    display: grid;
    place-items: center;
    flex: 0 0 2.9rem;
    height: 2.9rem;
    border: 1px solid var(--tm-border-soft);
    border-radius: .82rem;
    background: var(--tm-brand-soft);
    color: var(--tm-accent);
}
.tm-partial-refund-icon svg { width: 1.42rem; height: 1.42rem; }
.tm-partial-refund-heading { flex: 1 1 14rem; min-width: 0; }
.tm-partial-refund-heading .tm-card-eyebrow { margin: 0 0 .22rem; }
.tm-partial-refund-header .tm-badge { max-width: 100%; white-space: normal; }
.tm-partial-refund-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.24fr);
    gap: .7rem;
    margin: 0;
}
.tm-partial-refund-value {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: .23rem;
    min-width: 0;
    padding: .82rem .9rem;
    border: 1px solid var(--tm-border-soft);
    border-radius: .8rem;
    background: var(--tm-surface-raised);
    overflow-wrap: anywhere;
}
.tm-partial-refund-value dt { color: var(--tm-text-soft); font-size: .76rem; font-weight: 650; }
.tm-partial-refund-value dd { margin: 0; }
.tm-partial-refund-value strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.tm-partial-refund-amount { background: var(--tm-brand-soft); }
.tm-partial-refund-amount strong {
    color: var(--tm-text);
    font-size: clamp(1.55rem, 3vw, 2rem);
    line-height: 1.15;
    letter-spacing: -.025em;
}
.tm-partial-refund-meta { color: var(--tm-text-soft); font-size: .78rem; }
.tm-partial-refund-reference { font-family: ui-monospace, monospace; font-size: .85rem; font-weight: 650; }
.tm-partial-refund-payment-link { color: var(--tm-link); font-size: .8rem; font-weight: 650; text-underline-offset: .18em; }
.tm-partial-refund-form { gap: .9rem; padding-top: 1rem; border-top: 1px solid var(--tm-border-soft); min-width: 0; }
.tm-partial-refund-intro h3 { margin: 0; color: var(--tm-text); font-size: .95rem; font-weight: 700; }
.tm-partial-refund-intro p { margin: .2rem 0 0; font-size: .85rem; }
.tm-partial-refund-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.tm-partial-refund-fields .tm-field { min-width: 0; align-content: end; }
.tm-partial-refund-fields input { min-width: 0; max-width: 100%; min-height: 2.7rem; font: inherit; font-size: .92rem; }
.tm-partial-refund-fields input[aria-invalid="true"] { border-color: var(--tm-danger); }
.tm-partial-refund-check {
    gap: .65rem;
    padding: .75rem .85rem;
    border: 1px solid var(--tm-border-soft);
    border-radius: .7rem;
    background: var(--tm-surface-raised);
    font-size: .85rem;
    cursor: pointer;
}
.tm-partial-refund-check input { width: 1rem; height: 1rem; accent-color: var(--tm-brand); }
.tm-partial-refund-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .65rem; }
.tm-partial-refund-actions p { margin: 0; font-size: .8rem; }
@container partial-refund (max-width: 35rem) {
    .tm-partial-refund-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tm-partial-refund-summary > div:last-child { grid-column: 1 / -1; }
    .tm-partial-refund-fields { grid-template-columns: minmax(0, 1fr); }
}
@container partial-refund (max-width: 21rem) {
    .tm-partial-refund-header .tm-badge { margin-inline-start: 0; }
    .tm-partial-refund-heading { flex-basis: calc(100% - 3.65rem); }
    .tm-partial-refund-actions .tm-button { width: 100%; }
}
@media (forced-colors: active) {
    .tm-partial-refund-fields input:focus-visible { outline: 2px solid Highlight; }
}

/* Analytics network details. The popover is in the top layer, not the table. */
.tm-analytics-visit-card .tm-table-scroll { position: relative; }
.tm-analytics-event-page { min-width: 10rem; max-width: 28rem; white-space: normal; }
.tm-analytics-event-page code { overflow-wrap: anywhere; white-space: normal; }
.tm-analytics-own-visits { border-bottom: 1px solid var(--tm-border-soft); }
.tm-analytics-own-visits > summary { cursor: pointer; padding: .8rem .9rem; font-size: .8rem; }
.tm-analytics-own-visits > summary:hover { background: var(--tm-control-bg); }
.tm-analytics-own-visits > summary:focus-visible { outline: 2px solid var(--tm-brand-strong); outline-offset: -2px; }
.tm-analytics-own-visits > summary strong { margin-inline-end: .65rem; }
.tm-analytics-own-totals { display: inline-flex; flex-wrap: wrap; gap: .25rem .85rem; color: var(--tm-text-soft); }
.tm-analytics-own-totals > span { white-space: nowrap; }

.tm-analytics-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem 1rem; }
.tm-analytics-toolbar .tm-filter-actions { flex-wrap: wrap; }
.tm-analytics-current-ip { margin-inline-start: auto; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .45rem .7rem; max-width: 100%; }
.tm-analytics-current-ip code { overflow-wrap: anywhere; }
.tm-analytics-current-ip .tm-analytics-ip-refresh { min-height: 2.1rem; padding: .35rem .55rem; font-size: .75rem; }
.tm-analytics-plesk-modal:modal {
    position: fixed;
    inset: 0;
    margin: auto;
    block-size: fit-content;
    max-block-size: calc(100dvh - 2rem);
    overflow: auto;
}
.tm-analytics-ip-label { display: inline-flex; align-items: center; gap: .3rem; max-width: 100%; }
.tm-analytics-ip-label code { overflow-wrap: anywhere; }
.tm-analytics-ip-flag { flex: 0 0 auto; font-size: 1.1em; }
.tm-analytics-ip-trigger {
    max-width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: start;
    text-decoration: underline dotted;
    text-underline-offset: .2em;
    cursor: pointer;
}
.tm-analytics-ip-popover {
    position: fixed;
    inset: auto;
    margin: 0;
    width: max-content;
    max-width: min(19rem, calc(100vw - 1rem));
    max-height: calc(100dvh - 1rem);
    overflow: auto;
    padding: .58rem .75rem;
    border: 1px solid var(--tm-border);
    border-radius: .55rem;
    background: var(--tm-surface-raised);
    color: var(--tm-text);
    box-shadow: 0 .35rem 1rem rgba(0, 0, 0, .18);
    font-size: .82rem;
    line-height: 1.5;
    white-space: normal;
    overflow-wrap: anywhere;
}
.tm-analytics-ip-popover > div + div { margin-top: .2rem; }
.tm-analytics-ip-popover:not(:popover-open) { display: none; }
@supports not selector(:popover-open) {
    .tm-analytics-ip-popover { display: none; }
}

/* Phase 8U: compact invoice first-issue repair, scoped to its own admin view. */
.tm-card.tm-first-issue-card { display: grid; gap: 1.05rem; padding: 1.2rem 1.35rem; }
.tm-first-issue-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1.25rem; }
.tm-first-issue-heading { display: flex; align-items: center; gap: .85rem; min-width: 0; }
.tm-first-issue-heading .tm-card-eyebrow { margin: 0 0 .2rem; }
.tm-first-issue-heading h2 { font-size: 1.22rem; line-height: 1.2; overflow-wrap: anywhere; }
.tm-first-issue-symbol { display: grid; place-items: center; flex: 0 0 2.5rem; height: 2.5rem; border-radius: .75rem; background: var(--tm-brand-soft); color: var(--tm-brand-strong); font-size: 1.15rem; font-weight: 800; }
.tm-first-issue-badge { display: inline-flex; align-items: center; gap: .42rem; padding: .4rem .75rem; border: 1px solid var(--tm-border); border-radius: 999px; font-size: .75rem; line-height: 1.3; font-weight: 750; }
.tm-first-issue-badge.is-blocked { border-color: color-mix(in srgb, var(--tm-warning) 30%, var(--tm-border)); background: var(--tm-warning-soft); color: var(--tm-warning-text); }
.tm-first-issue-badge.is-ready { border-color: color-mix(in srgb, var(--tm-success) 30%, var(--tm-border)); background: var(--tm-success-soft); color: var(--tm-success); }
.tm-first-issue-badge-dot { width: .42rem; height: .42rem; border-radius: 100%; background: currentColor; }
.tm-first-issue-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin: 0; }
.tm-first-issue-metrics > div { min-width: 0; display: grid; align-content: center; gap: .3rem; border: 1px solid var(--tm-border-soft); border-radius: .8rem; background: var(--tm-surface-raised); padding: .78rem .95rem; }
.tm-first-issue-metrics dt { color: var(--tm-muted); font-size: .72rem; }
.tm-first-issue-metrics dd { margin: 0; color: var(--tm-text); font-size: .87rem; font-weight: 700; overflow-wrap: anywhere; }
.tm-first-issue-metrics .tm-first-issue-amount { font-size: 1.38rem; line-height: 1.2; font-weight: 800; font-variant-numeric: tabular-nums; }
.tm-first-issue-content { display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); align-items: start; gap: .85rem; }
.tm-first-issue-explainer { min-width: 0; padding: .25rem .15rem; }
.tm-first-issue-explainer h3, .tm-first-issue-action h3 { margin: 0 0 .35rem; color: var(--tm-text); font-size: .93rem; }
.tm-first-issue-explainer p, .tm-first-issue-action p { margin: .4rem 0 0; font-size: .83rem; line-height: 1.55; }
.tm-first-issue-explainer .tm-first-issue-safety { margin-top: .65rem; color: var(--tm-muted); font-size: .74rem; }
.tm-first-issue-alert, .tm-first-issue-action { min-width: 0; display: grid; gap: .7rem; border: 1px solid color-mix(in srgb, var(--tm-warning) 38%, var(--tm-border)); border-radius: .8rem; background: var(--tm-warning-soft); padding: .85rem 1rem; }
.tm-first-issue-alert-heading { display: flex; align-items: start; gap: .65rem; }
.tm-first-issue-alert-symbol { display: grid; place-items: center; flex: 0 0 1.45rem; height: 1.45rem; margin-top: .05rem; border-radius: 50%; background: color-mix(in srgb, var(--tm-warning) 17%, transparent); color: var(--tm-warning-text); font-size: .84rem; font-weight: 800; }
.tm-first-issue-alert strong { display: block; color: var(--tm-warning-text); font-size: .85rem; }
.tm-first-issue-alert p { margin: .2rem 0 0; color: var(--tm-text-soft); font-size: .77rem; line-height: 1.5; }
.tm-first-issue-alert ul { margin: 0; padding-left: 1.1rem; color: var(--tm-warning-text); font-size: .82rem; line-height: 1.55; overflow-wrap: anywhere; }
.tm-first-issue-recheck { justify-self: start; }
.tm-first-issue-action { border-color: color-mix(in srgb, var(--tm-brand) 32%, var(--tm-border)); background: var(--tm-surface-raised); }
.tm-first-issue-action .tm-field { min-width: 0; }
.tm-first-issue-action .tm-button { justify-self: start; }
@media (max-width: 760px) {
    .tm-card.tm-first-issue-card { padding: 1rem; }
    .tm-first-issue-metrics, .tm-first-issue-content { grid-template-columns: minmax(0, 1fr); }
    .tm-first-issue-heading { align-items: flex-start; }
    .tm-first-issue-heading h2 { font-size: 1.05rem; }
}

/* 0.8.4.315.0 – inline read-only recheck result in Admin repair */
.tm-first-issue-checked {
    margin: .65rem 0 1rem;
    color: var(--tm-text-soft);
    font-size: .82rem;
    line-height: 1.5;
}
.tm-first-issue-checked strong { color: var(--tm-text); font-weight: 650; }

/* Phase 8F: compact withdrawal review; scoped to this Admin surface. */
.tm-withdrawal-review { display:grid; gap: .9rem; min-width:0; }
.tm-withdrawal-review > .tm-muted { margin:0; }
.tm-withdrawal-panel { min-width:0; display:grid; gap:.7rem; padding:1rem; border:1px solid var(--tm-border); border-radius:12px; background:var(--tm-surface); }
.tm-withdrawal-panel h3 { margin:0; font-size:.98rem; font-weight:700; }
.tm-withdrawal-panel h4 { margin:.65rem 0 0; font-size:.85rem; font-weight:700; }
.tm-withdrawal-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.55rem; margin:0; }
.tm-withdrawal-summary > div { min-width:0; padding:.7rem .8rem; background:var(--tm-surface-raised); border:1px solid var(--tm-border-soft); border-radius:.65rem; }
.tm-withdrawal-summary dt { color:var(--tm-muted); font-size:.72rem; margin-bottom:.35rem; }
.tm-withdrawal-summary dd { margin:0; font-size:.84rem; font-weight:650; overflow-wrap:anywhere; }
.tm-withdrawal-summary-line { display:flex; align-items:center; gap:.4rem; flex-wrap:wrap; }
.tm-withdrawal-summary-value { display:block; color:var(--tm-text-soft); font-size:.78rem; font-weight:500; font-variant-numeric:tabular-nums; }
.tm-withdrawal-summary-value + .tm-withdrawal-summary-line, .tm-withdrawal-summary-line + .tm-withdrawal-summary-line { margin-top:.5rem; }
.tm-withdrawal-hints { margin:.35rem 0 0; padding-inline-start:1.2rem; }
.tm-withdrawal-details { border:1px solid var(--tm-border-soft); border-radius:.6rem; min-width:0; }
.tm-withdrawal-details > summary { cursor:pointer; padding:.6rem .8rem; font-size:.82rem; font-weight:650; color:var(--tm-text); background:var(--tm-surface-raised); border-radius:.6rem; }
.tm-withdrawal-details > summary > .tm-count-pill { margin-inline-start:.5rem; padding:.1rem .45rem; }
.tm-withdrawal-details[open] > summary { border-bottom:1px solid var(--tm-border-soft); border-radius:.6rem .6rem 0 0; }
.tm-withdrawal-table th,.tm-withdrawal-table td { padding:.55rem .7rem; }
.tm-withdrawal-empty { padding:.6rem .8rem; margin:0; }
.tm-withdrawal-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.8rem; }
.tm-withdrawal-decision-panel { border-inline-start:3px solid var(--tm-brand); }
.tm-withdrawal-panel > .tm-button { justify-self:start; }
.tm-withdrawal-retraction-body { display:grid; gap:.7rem; padding:.8rem; }
@media(max-width:700px) { .tm-withdrawal-grid,.tm-withdrawal-summary { grid-template-columns:1fr; } .tm-withdrawal-panel { padding:.75rem; } }

/* Closed withdrawal correspondence remains available without occupying the contract overview. */
.tm-portal-withdrawal-history > summary { cursor: pointer; list-style-position: inside; }
.tm-portal-withdrawal-history[open] > summary { margin-bottom: .75rem; }

.tm-withdrawal-actions { padding: 0; }
.tm-withdrawal-actions > .tm-cancellation-entry-card + .tm-cancellation-entry-card { border-top: 1px solid var(--tm-border-soft); }

/* Contract detail: align the withdrawal card-to-summary gap with the shared card stack. */
.tm-portal-main-content > .tm-portal-contract-section + .tm-portal-contract-summary-grid {
    margin-top: var(--tm-card-stack-gap);
}

/* Phase 8F: shared card spacing and read-only reversal progress. */
.tm-portal-main-content > .tm-portal-contract-section + .tm-portal-contracts-stack { margin-top: var(--tm-card-stack-gap); }
.tm-withdrawal-progress { display:grid; gap:.4rem; font-size:.84rem; }
.tm-withdrawal-progress progress { width:100%; height:.65rem; accent-color:var(--tm-brand); }

/* 0.8.5.36.1 – manual refund form: reuse standard Admin controls. */
.tm-withdrawal-refund { display:grid; gap:.85rem; min-width:0; border-top:1px solid var(--tm-border-soft); padding-top:1rem; }
.tm-withdrawal-refund > p { margin:0; }
.tm-withdrawal-refund-balance { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:.4rem 1rem; padding:.75rem .9rem; border:1px solid var(--tm-border-soft); border-radius:.65rem; background:var(--tm-surface-raised); }
.tm-withdrawal-refund-balance > span { color:var(--tm-text-soft); font-size:.8rem; }
.tm-withdrawal-refund-balance > strong { color:var(--tm-text); font-size:1.15rem; font-variant-numeric:tabular-nums; }
.tm-withdrawal-refund-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.8rem; }
.tm-withdrawal-refund-fields .tm-field { min-width:0; }
.tm-withdrawal-refund-fields .tm-field input, .tm-withdrawal-refund-fields .tm-field select { min-width:0; box-sizing:border-box; }
.tm-withdrawal-refund .tm-withdrawal-refund-confirm { padding:.75rem .9rem; margin:0; border:1px solid var(--tm-border-soft); border-radius:.65rem; background:var(--tm-surface-raised); }
.tm-withdrawal-refund .tm-mutation-actions { margin-bottom:0; }
.tm-withdrawal-refund-history { display:grid; gap:.4rem; }
.tm-withdrawal-refund-history h4 { margin:0; }
.tm-withdrawal-refund-history-row { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem .8rem; padding:.65rem 0; border-bottom:1px solid var(--tm-border-soft); font-size:.8rem; }
.tm-withdrawal-refund-history-row > strong { margin-inline-start:auto; font-variant-numeric:tabular-nums; }
@media (max-width:760px) { .tm-withdrawal-refund-fields { grid-template-columns:minmax(0,1fr); } .tm-withdrawal-refund-history-row > strong { margin-inline-start:0; } }

/* 0.8.6.5.0 – Order detail and approval presentation. */
.tm-order-approval-review + .tm-mutation-form,
.tm-main-content > .tm-card + .tm-staging-registrar { margin-top: var(--tm-card-stack-gap); }
.tm-order-reference-detail small { display:block; margin-top:.3rem; color:var(--tm-muted); font-weight:400; font-size:.72rem; }
.tm-staging-registrar-progress-track > span { background:var(--tm-brand); }
.tm-staging-registrar-progress-track > span.is-success { background:var(--tm-success); }

/* Order detail: equal-height master-data/amount cards; other grids unchanged. */
.tm-order-detail-grid { align-items: stretch; }
.tm-order-detail-compact > .tm-card-eyebrow,
.tm-order-detail-compact .tm-customer-related-heading .tm-card-eyebrow { margin-bottom: .35rem; }
.tm-order-detail-compact > .tm-empty-state { padding: .8rem 1rem; }
.tm-order-detail-compact > .tm-empty-state p { margin: 0; }
.tm-order-detail-compact > .tm-detail-list > div { padding-block: .6rem; }
.tm-order-detail-compact .tm-dashboard-section-grid h3 { margin: .55rem 0 .3rem; }
.tm-order-detail-compact .tm-dashboard-section-grid ul { margin-block: .3rem; }

/* Phase 8G: external DNS guidance for technical hosting addresses. */
.tm-portal-dns-guide { padding: 1.25rem; display: grid; gap: .85rem; min-width: 0; }
.tm-portal-dns-guide .tm-portal-card-heading { margin: 0; }
.tm-portal-dns-guide h2, .tm-portal-dns-guide h3, .tm-portal-dns-guide p { margin: 0; }
.tm-portal-dns-guide h3 { font-size: 1rem; }
.tm-portal-dns-guide p { color: var(--tm-muted); line-height: 1.55; }
.tm-technical-address-list { display: grid; gap: .4rem; padding: .85rem 1rem; border: 1px solid var(--tm-border, #d6e0ea); border-radius: .75rem; background: var(--tm-surface-soft, #f1f5f9); overflow-wrap: anywhere; min-width: 0; }
.tm-technical-address-list p { margin: 0; }
.tm-dns-guide-steps { list-style: none; counter-reset: dns-guide; margin: 0; padding: 0; display: grid; gap: 1rem; }
.tm-dns-guide-steps > li { counter-increment: dns-guide; display: grid; grid-template-columns: 2rem minmax(0,1fr); align-items: start; gap: .75rem; }
.tm-dns-guide-steps > li::before { content: counter(dns-guide); background: #e6f3fa; color: #087bb6; border-radius: 50%; width: 2rem; height: 2rem; display: grid; place-items: center; font-weight: 700; }
.tm-dns-guide-steps > li > div { display: grid; gap: .5rem; min-width: 0; }
.tm-dns-guide-records { border: 1px solid var(--tm-border, #d6e0ea); border-radius: .75rem; padding: .8rem; display: grid; gap: .5rem; overflow-wrap: anywhere; }
.tm-dns-guide-table-wrap { overflow-x: auto; }
.tm-dns-guide-table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; }
.tm-dns-guide-table th, .tm-dns-guide-table td { border-bottom: 1px solid var(--tm-border, #d6e0ea); padding: .55rem; text-align: left; }
.tm-dns-guide-table th { background: var(--tm-surface-soft, #f1f5f9); }
@media (max-width: 600px) { .tm-portal-dns-guide { padding: .9rem; } .tm-dns-guide-steps > li { gap: .5rem; } }
.tm-technical-domain-note { display: grid; gap: .35rem; padding-top: .55rem; border-top: 1px solid var(--tm-border, #d6e0ea); }
.tm-technical-domain-note p { margin: 0; color: var(--tm-muted); }

/* 0.8.6.21.0 – actionable Auth-Code follow-up, using shared portal cards. */
.tm-portal-auth-code-attention { border-color: color-mix(in srgb, var(--tm-danger) 38%, var(--tm-border)); }
.tm-portal-auth-code-attention .tm-card-eyebrow { color: var(--tm-danger-text); }
.tm-portal-auth-code-attention .tm-portal-unpaid-order-row strong { overflow-wrap: anywhere; }
.tm-portal-auth-code-attention + .tm-portal-dashboard-grid { margin-top: var(--tm-card-stack-gap); }
#auth-code-required { scroll-margin-top: 6rem; }
@media (max-width: 680px) {
    .tm-portal-auth-code-attention .tm-portal-card-heading { flex-wrap: wrap; }
}

/* Phase 8G – compact, distinct billing operator cards; no workflow changes. */
.tm-card.tm-finance-operator-card {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    justify-content: space-between;
    gap: .85rem 1.15rem;
    padding: 1rem 1.2rem;
    background: linear-gradient(110deg, var(--tm-finance-tint), transparent 65%), var(--tm-card-bg);
}
.tm-finance-operator-card--reset { --tm-finance-tint: var(--tm-warning-soft); }
.tm-finance-operator-card--bank { --tm-finance-tint: var(--tm-brand-soft); }
.tm-finance-operator-intro {
    display: flex;
    flex: 1 1 24rem;
    align-items: flex-start;
    gap: .85rem;
    min-width: 0;
}
.tm-finance-operator-icon {
    display: grid;
    place-items: center;
    flex: 0 0 2.65rem;
    block-size: 2.65rem;
    border-radius: .8rem;
    background: var(--tm-brand-soft);
    color: var(--tm-card-eyebrow);
}
.tm-finance-operator-card--reset .tm-finance-operator-icon {
    background: var(--tm-warning-soft);
    color: var(--tm-warning-text);
}
.tm-finance-operator-icon svg { width: 1.35rem; height: 1.35rem; }
.tm-finance-operator-card .tm-finance-operator-copy {
    display: grid;
    flex: 1 1 auto;
    min-width: 0;
    gap: .4rem;
}
.tm-finance-operator-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .65rem; }
.tm-finance-operator-card .tm-card-eyebrow { margin: 0; }
.tm-finance-operator-card .tm-finance-operator-copy h2 { margin: 0; font-weight: 700; }
.tm-finance-operator-card .tm-finance-operator-copy p { margin: 0; max-width: none; line-height: 1.5; font-size: .88rem; }
.tm-finance-operator-card .tm-finance-operator-copy .tm-finance-operator-note { color: var(--tm-muted); font-size: .78rem; }
.tm-finance-operator-facts { display: flex; flex-wrap: wrap; gap: .4rem .65rem; margin: .1rem 0; }
.tm-finance-operator-facts > div { min-width: 0; padding: .4rem .65rem; border: 1px solid var(--tm-border); border-radius: .6rem; background: var(--tm-surface-raised); }
.tm-finance-operator-facts dt { font-size: .72rem; color: var(--tm-text-soft); }
.tm-finance-operator-facts dd { margin: .13rem 0 0; font-size: .94rem; font-weight: 750; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tm-finance-operator-card .tm-finance-operator-cta { display: flex; justify-content: flex-end; align-items: center; margin: 0 0 0 auto; max-width: 100%; }
.tm-finance-operator-cta form { margin: 0; max-width: 100%; }
.tm-finance-operator-card .tm-finance-reset-button { color: var(--tm-danger-text); border-color: color-mix(in srgb, var(--tm-danger) 45%, var(--tm-border)); background: var(--tm-card-bg); gap: .45rem; }
.tm-finance-reset-button svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.tm-finance-operator-card .tm-finance-reset-button:hover,
.tm-finance-operator-card .tm-finance-reset-button:focus-visible { background: var(--tm-danger-soft); }
/* Existing finance grid retains its one-card/full-width and two-card modes. */
.tm-staging-finance-action-grid > .tm-finance-operator-card { flex-flow: row wrap; align-items: center; }
.tm-staging-finance-action-grid > .tm-finance-operator-card .tm-finance-operator-cta { justify-content: flex-end; margin: 0 0 0 auto; }
@media (max-width: 760px) {
    .tm-card.tm-finance-operator-card { flex-direction: column; align-items: stretch; padding: .95rem; }
    .tm-finance-operator-intro { flex-basis: auto; }
    .tm-finance-operator-card .tm-finance-operator-cta,
    .tm-finance-operator-card .tm-finance-operator-cta form,
    .tm-finance-operator-card .tm-finance-operator-cta .tm-button { width: 100%; justify-content: center; }
}
@media (max-width: 420px) {
    .tm-finance-operator-intro { gap: .6rem; }
    .tm-finance-operator-icon { flex-basis: 2.1rem; block-size: 2.1rem; }
}


/* 0.8.6.30.0 – compact TEST finalization card inside the order workflow. */
.tm-test-final-card {
    display: grid; gap: .75rem; min-width: 0; margin-top: .85rem;
    padding: .95rem 1rem; border: 1px solid var(--tm-border); border-radius: .8rem;
    background: linear-gradient(110deg, var(--tm-brand-soft), transparent 70%), var(--tm-card-bg);
    color: var(--tm-text); font-size: .85rem; overflow-wrap: anywhere;
}
.tm-test-final-header { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .65rem .85rem; }
.tm-test-final-copy { flex: 1 1 16rem; min-width: 0; display: grid; gap: .3rem; }
.tm-test-final-copy .tm-card-eyebrow, .tm-test-final-copy h3, .tm-test-final-copy p { margin: 0; }
.tm-test-final-copy h3 { font-size: 1rem; font-weight: 700; }
.tm-test-final-copy p { color: var(--tm-text-soft); line-height: 1.5; }
.tm-test-final-safety { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem 1rem; background: var(--tm-surface-raised); border: 1px solid var(--tm-border-soft); border-radius: .6rem; padding: .6rem .75rem; font-size: .79rem; color: var(--tm-text-soft); }
.tm-test-final-safety svg { flex: 0 0 1.15rem; width: 1.15rem; height: 1.15rem; color: var(--tm-success); }
.tm-test-final-form { display: grid; gap: .65rem; margin: 0; }
.tm-test-final-date { max-width: 22rem; }
.tm-test-final-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .65rem 1rem; border-top: 1px solid var(--tm-border-soft); padding-top: .7rem; }
.tm-test-final-actions > span, .tm-test-final-confirm { flex: 1 1 18rem; min-width: 0; }
.tm-test-final-confirm { display: flex; align-items: flex-start; gap: .5rem; cursor: pointer; color: var(--tm-text); line-height: 1.45; }
.tm-test-final-confirm input { flex: 0 0 auto; width: 1rem; height: 1rem; margin: .15rem 0 0; accent-color: var(--tm-brand-strong); }
.tm-test-final-actions .tm-button { margin-left: auto; max-width: 100%; text-align: center; white-space: normal; }
.tm-test-final-actions .tm-button:disabled { opacity: .48; box-shadow: none; cursor: not-allowed; filter: none; transform: none; }
.tm-test-final-result { display: grid; gap: .3rem; padding: .65rem .75rem; border: 1px solid var(--tm-border-soft); border-radius: .6rem; }
.tm-test-final-result.is-success { background: var(--tm-success-soft); }
.tm-test-final-result.is-warning { background: var(--tm-warning-soft); color: var(--tm-warning-text); }
@media (max-width: 680px) {
    .tm-test-final-card { padding: .8rem; }
    .tm-test-final-actions .tm-button, .tm-test-final-actions > form { width: 100%; justify-content: center; }
}

/* Phase 8G: compact credit confirmation; reuse the standard surface and controls. */
.tm-bank-transfer-credit-card { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,1fr); align-items:center; gap:1rem; padding:1rem 1.15rem; margin-block:1rem; }
.tm-bank-transfer-credit-copy { display:grid; gap:.3rem; min-width:0; }
.tm-bank-transfer-credit-copy h2,.tm-bank-transfer-credit-copy p { margin:0; }
.tm-bank-transfer-credit-copy p { color:var(--tm-text-soft); }
.tm-bank-transfer-credit-amounts { display:flex; flex-wrap:wrap; gap:.6rem; margin:.45rem 0 0; }
.tm-bank-transfer-credit-amounts > div { background:var(--tm-surface-raised); border:1px solid var(--tm-border-soft); border-radius:.65rem; padding:.45rem .7rem; }
.tm-bank-transfer-credit-amounts dt { font-size:.75rem; color:var(--tm-text-soft); }
.tm-bank-transfer-credit-amounts dd { margin:0; font-weight:700; font-variant-numeric:tabular-nums; }
.tm-bank-transfer-credit-form { display:grid; gap:.75rem; padding:.8rem; border:1px solid var(--tm-border-soft); border-radius:.85rem; background:var(--tm-surface-raised); }
.tm-bank-transfer-credit-form .tm-bank-transfer-confirmation { margin:0; align-items:flex-start; }
.tm-bank-transfer-credit-form .tm-mutation-actions { margin:0; }
@media (max-width:760px) { .tm-bank-transfer-credit-card { grid-template-columns:1fr; padding:.9rem; } .tm-bank-transfer-credit-form .tm-button { width:100%; } }

/* 0.8.6.43.0 – explicit owner credit confirmation for a bound upgrade only. */
.tm-portal-upgrade-payment-summary { padding: .9rem 1rem; margin-bottom: 1rem; border: 1px solid var(--tm-border); border-radius: .85rem; background: var(--tm-surface-soft); }
.tm-portal-upgrade-payment-totals { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin: 0; gap: .75rem; align-items: center; }
.tm-portal-upgrade-payment-totals > div { min-width: 0; padding: .35rem .65rem; }
.tm-portal-upgrade-payment-totals dt { color: var(--tm-text-soft); font-size: .85rem; }
.tm-portal-upgrade-payment-totals dd { margin: .25rem 0 0; font-size: 1.15rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.tm-portal-upgrade-payment-totals .tm-portal-upgrade-credit-value { color: var(--tm-text); }
.tm-portal-upgrade-payment-totals .tm-portal-upgrade-payment-due { border-left: 1px solid var(--tm-border); }
.tm-portal-upgrade-payment-due dd { font-size: 1.45rem; color: var(--tm-accent); }
.tm-portal-upgrade-payment-summary > p { margin: .55rem .65rem 0; }
.tm-portal-upgrade-payment-grid { grid-template-columns: minmax(0,.72fr) minmax(0,1.28fr); align-items: start; }
.tm-portal-upgrade-payment-grid .tm-portal-order-payment-choice-option-paypal .tm-button { margin-top: .25rem; }
.tm-portal-upgrade-credit-preview .tm-portal-order-payment-choice-option > strong { display: block; margin-bottom: .45rem; }
.tm-portal-upgrade-credit-preview .tm-portal-order-payment-choice-option > p:last-child { margin-bottom: 0; }
@media (max-width: 850px) { .tm-portal-upgrade-payment-grid { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 600px) { .tm-portal-upgrade-payment-totals { grid-template-columns: minmax(0,1fr); gap: .15rem; } .tm-portal-upgrade-payment-totals > div { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; } .tm-portal-upgrade-payment-totals .tm-portal-upgrade-payment-due { border-left: 0; border-top: 1px solid var(--tm-border); } }



/* 0.8.6.45.0 – bound upgrade only: aligned cards, local PayPal-colour CTA.
   No external SDK, new network origins or changes to payment authority. */
.tm-portal-upgrade-payment-grid {
    grid-template-columns: minmax(0,.82fr) minmax(0,1.18fr);
    align-items: stretch;
}
.tm-portal-upgrade-payment-grid > .tm-portal-order-payment-choice-option {
    min-width: 0;
    align-self: stretch;
}
.tm-portal-upgrade-payment-grid > .tm-portal-order-payment-choice-option-paypal {
    display: flex;
    flex-direction: column;
}
.tm-portal-upgrade-paypal-content {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: .85rem;
    flex: 1 1 auto;
    padding: .65rem 0;
    min-width: 0;
    text-align: center;
}
.tm-portal-upgrade-paypal-content > p { margin: 0; }
.tm-portal-upgrade-paypal-amount {
    font-size: 1.65rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}
.tm-portal-upgrade-paypal-content > form { width: 100%; max-width: 21rem; }
.tm-portal-upgrade-payment-grid .tm-portal-upgrade-paypal-content [data-paypal-submit-button] {
    width: 100%;
    min-height: 3rem;
    margin: 0;
    padding: .75rem 1rem;
    border: 1px solid #d5a527;
    border-radius: .65rem;
    background: #ffc439;
    color: #003087;
    box-shadow: none;
    font-size: .96rem;
    font-weight: 750;
    line-height: 1.35;
    white-space: normal;
    text-align: center;
    cursor: pointer;
}
.tm-portal-upgrade-payment-grid .tm-portal-upgrade-paypal-content [data-paypal-submit-button]:hover:not(:disabled) {
    background: #f4b92d;
    filter: none;
}
.tm-portal-upgrade-payment-grid .tm-portal-upgrade-paypal-content [data-paypal-submit-button]:focus-visible {
    outline: 2px solid #003087;
    outline-offset: 3px;
}
.tm-portal-upgrade-payment-grid .tm-portal-upgrade-paypal-content [data-paypal-submit-button]:disabled { cursor: wait; }
.tm-portal-upgrade-payment-grid > .tm-portal-order-payment-choice-option-bank {
    grid-template-columns: minmax(0,1fr) minmax(8rem,10.5rem);
    gap: .55rem .85rem;
    align-content: start;
}
.tm-portal-upgrade-payment-grid .tm-portal-order-payment-choice-option-bank > h3,
.tm-portal-upgrade-payment-grid .tm-portal-order-payment-choice-option-bank > p { margin: 0; }
.tm-portal-upgrade-payment-grid .tm-portal-order-bank-facts > div {
    grid-template-columns: minmax(5.5rem,.38fr) minmax(0,1fr);
    gap: .55rem;
}
.tm-portal-upgrade-payment-grid .tm-portal-order-bank-qr-panel p { font-size: .8rem; }
@media (max-width: 1100px) {
    .tm-portal-upgrade-payment-grid { grid-template-columns: minmax(0,1fr); }
    .tm-portal-upgrade-paypal-content { padding: .5rem 0; }
}
@media (max-width: 680px) {
    .tm-portal-upgrade-payment-grid > .tm-portal-order-payment-choice-option-bank,
    .tm-portal-upgrade-payment-grid .tm-portal-order-bank-facts > div { grid-template-columns: minmax(0,1fr); }
    .tm-portal-upgrade-payment-grid .tm-portal-order-bank-facts > div { gap: .15rem; }
}
@media (forced-colors: active) {
    .tm-portal-upgrade-payment-grid .tm-portal-upgrade-paypal-content [data-paypal-submit-button] {
        background: ButtonFace; color: ButtonText; border-color: ButtonText;
    }
}


/* 0.8.6.45.1 – shared customer PayPal start/resume presentation; no SDK. */
.tm-button[data-paypal-brand-button] {
    min-height: 3rem;
    min-width: min(100%, 12rem);
    max-width: 100%;
    border: 1px solid #d5a527;
    border-radius: .65rem;
    background: #ffc439;
    color: #003087;
    box-shadow: none;
    padding: .6rem 1rem;
    line-height: 1.2;
}
.tm-button[data-paypal-brand-button]:hover:not(:disabled) {
    background: #f4b92d;
    filter: none;
}
.tm-button[data-paypal-brand-button]:focus-visible {
    outline: 2px solid #003087;
    outline-offset: 3px;
}
.tm-button[data-paypal-brand-button]:disabled { opacity: .65; cursor: not-allowed; }
.tm-paypal-button-brand { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; }
.tm-paypal-button-brand img { display: block; width: auto; height: 1.65rem; flex: none; }
.tm-paypal-wordmark { font-family: Arial, sans-serif; font-size: 1.4rem; font-weight: 800; font-style: italic; letter-spacing: -.045em; white-space: nowrap; }
.tm-paypal-wordmark > span:first-child { color: #003087; }
.tm-paypal-wordmark > span:last-child { color: #0070ba; }
.tm-paypal-payment-amount { display: block; font-size: 1.25rem; font-variant-numeric: tabular-nums; margin: .25rem 0 .65rem; }
@media (forced-colors: active) {
    .tm-button[data-paypal-brand-button] { background: ButtonFace; color: ButtonText; border-color: ButtonText; }
    .tm-paypal-wordmark > span { color: ButtonText !important; }
}


/* 0.8.6.45.2 – compact Admin tariff change, using the existing paid Plesk card. */
.tm-plan-change-gate { gap: .75rem; }
.tm-plan-change-gate .tm-paid-plesk-gate-form { margin: 0; }
.tm-plan-change-gate .tm-paid-plesk-gate-actions { gap: .75rem 1rem; padding-top: .75rem; }
.tm-plan-change-gate .tm-paid-plesk-gate-confirm {
    flex: 1 1 18rem;
    min-width: 0;
    align-items: center;
    padding: .65rem .85rem;
    background: var(--tm-surface-raised);
}
.tm-plan-change-gate .tm-paid-plesk-gate-confirm input { margin-top: 0; }
.tm-plan-change-gate .tm-paid-plesk-gate-actions .tm-button { margin-inline-start: auto; }
.tm-order-detail-grid .tm-order-amounts-note {
    margin: .55rem 0 .7rem;
    padding: .65rem .8rem;
    background: var(--tm-surface-raised);
    border: 1px solid var(--tm-border-soft);
    border-radius: .65rem;
    font-size: .84rem;
    line-height: 1.5;
}
@media (max-width: 620px) {
    .tm-plan-change-gate .tm-paid-plesk-gate-confirm { flex-basis: auto; }
    .tm-plan-change-gate .tm-paid-plesk-gate-actions .tm-button { margin-inline-start: 0; }
}
