/* ============================================================================
   LYLIX portal design system (WHMCS templates/lx-2026).
   Mirrors the marketing site palette and typography. Two-column layout:
   left sidebar nav + main content composed of section/panel boxes.
   ============================================================================ */

:root {
    /* Palette */
    --lx-blue-900: #0f2942;
    --lx-blue-700: #1e3a5f;
    --lx-blue-500: #2563a4;
    --lx-blue-100: #e8eef5;
    --lx-gray-900: #1a1a1a;
    --lx-gray-700: #3b4250;
    --lx-gray-500: #6b7280;
    --lx-gray-300: #d1d5db;
    --lx-gray-100: #f5f6f8;
    --lx-white:    #ffffff;
    --lx-rose:     #7e5861;
    --lx-rose-d:   #6b4a52;
    --lx-sage:     #7a8e7c;  /* quiet secondary accent */
    --lx-sage-d:   #5e7261;
    --lx-green:    #1f8a4c;
    --lx-green-bg: #e7f4ec;
    --lx-amber:    #b25f00;
    --lx-amber-bg: #fdf3e1;
    --lx-red:      #b8332a;
    --lx-red-bg:   #fbe7e5;

    /* Typography */
    --lx-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
               "Helvetica Neue", Arial, sans-serif;
    --lx-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

    /* Layout */
    --lx-content-max: 1320px;
    /* Public / logged-out pages match the marketing site's content width so the
       brand hand-off (lylix.net -> homepage / login / guest order) is seamless.
       Authenticated app pages keep the wider --lx-content-max (room for the
       sidebar + data tables). */
    --lx-content-marketing: 1100px;
    --lx-sidebar-w:   220px;
    --lx-gutter:      28px;
    --lx-radius:      0;
    --lx-shadow:      0 1px 2px rgba(15,41,66,0.06);
    --lx-shadow-lg:   0 4px 18px rgba(15,41,66,0.08);
}

/* ----- Reset / baseline ----- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--lx-font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--lx-gray-900);
    background: var(--lx-gray-100);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
/* #454 sticky footer — scoped to the customer layout (<body class="lx-body">)
   so no other layout is affected. The shell grows to fill leftover vertical
   space, pushing the footer to the bottom on short pages. width:100% is
   required: without it the shell's `margin:0 auto` centering makes it collapse
   to content width as a flex item. */
.lx-body { min-height: 100vh; display: flex; flex-direction: column; }
.lx-body .lx-shell { width: 100%; flex: 1 0 auto; }
img { max-width: 100%; height: auto; }

/* ----- Typography ----- */
h1, h2, h3, h4, h5 {
    font-family: var(--lx-font);
    color: var(--lx-blue-900);
    line-height: 1.25;
    margin: 0 0 0.5em 0;
    font-weight: 600;
    letter-spacing: -0.01em;
}
h1 { font-size: 1.75rem; }
h2 { font-size: 1.35rem; margin-top: 1em; }
h3 { font-size: 1.1rem; margin-top: 0.8em; }
h4 { font-size: 1rem; margin-top: 0.6em; }

p { margin: 0 0 1em 0; }
strong { color: var(--lx-gray-900); }
small { font-size: 0.85em; color: var(--lx-gray-500); }

a {
    color: var(--lx-blue-500);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.12s ease;
}
a:hover { border-bottom-color: var(--lx-blue-500); }
a:focus-visible { outline: 2px solid var(--lx-blue-500); outline-offset: 2px; }

ul, ol { padding-left: 1.4em; margin: 0 0 1em 0; }
li { margin: 0.2em 0; }

code, kbd, samp {
    font-family: var(--lx-font-mono);
    font-size: 0.92em;
    background: var(--lx-gray-100);
    padding: 1px 5px;
    border-radius: 3px;
}

/* Fenced code blocks. `<code>` is inline, so the inline rule above would
   otherwise leak its left-padding onto the FIRST line only (a ~5px indent)
   and paint a per-line-fragment background. Move the box to the <pre> and
   neutralise the inline decoration on nested <code>. */
pre {
    background: var(--lx-gray-100);
    border: 1px solid var(--lx-gray-300);
    border-radius: 6px;
    padding: 12px 14px;
    margin: 0 0 1em 0;
    overflow-x: auto;
    font-family: var(--lx-font-mono);
    font-size: 0.86rem;
    line-height: 1.55;
    -moz-tab-size: 4;
    tab-size: 4;
}
pre code, pre kbd, pre samp {
    background: none;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
}

hr {
    border: 0;
    border-top: 1px solid var(--lx-gray-300);
    margin: 28px 0;
}

/* ============================================================================
   Header / top bar
   ============================================================================ */
.lx-header {
    background: var(--lx-white);
    border-bottom: 1px solid var(--lx-gray-300);
    position: sticky; top: 0; z-index: 100;
}
.lx-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    max-width: var(--lx-content-max);
    margin: 0 auto;
    padding: 0 24px;
}
.lx-logo { display: inline-flex; align-items: center; border: 0; }
.lx-logo:hover { border: 0; }
.lx-logo img { display: block; }

.lx-nav { display: flex; align-items: center; gap: 6px; }
.lx-nav a {
    color: var(--lx-gray-700);
    padding: 8px 12px;
    border: 0;
    border-radius: var(--lx-radius);
    font-size: 0.92rem;
    font-weight: 500;
}
.lx-nav a:hover { background: var(--lx-gray-100); color: var(--lx-blue-900); }
.lx-nav a.lx-nav--active { background: var(--lx-blue-100); color: var(--lx-blue-900); }

.lx-nav__back {
    color: var(--lx-gray-500);
    font-size: 0.85rem;
    padding: 6px 10px;
    border: 0;
}
.lx-nav__back:hover { color: var(--lx-blue-700); background: var(--lx-gray-100); }

.lx-nav__user {
    margin-left: 8px;
    padding-left: 14px;
    border-left: 1px solid var(--lx-gray-300);
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--lx-gray-700);
    font-size: 0.9rem;
}
.lx-nav__user-name { font-weight: 600; color: var(--lx-blue-900); }
.lx-nav__logout {
    color: var(--lx-gray-500);
    font-size: 0.85rem;
    padding: 6px 10px;
    border: 1px solid var(--lx-gray-300);
    border-radius: var(--lx-radius);
    background: var(--lx-white);
    cursor: pointer;
    font-family: var(--lx-font);
}
.lx-nav__logout:hover {
    color: var(--lx-blue-700);
    border-color: var(--lx-blue-500);
    background: var(--lx-white);
}

.lx-nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--lx-gray-300);
    padding: 6px 10px;
    border-radius: var(--lx-radius);
    color: var(--lx-gray-700);
    cursor: pointer;
}

/* ============================================================================
   Layout: two-column shell
   ============================================================================ */
.lx-shell {
    max-width: var(--lx-content-max);
    margin: 0 auto;
    padding: var(--lx-gutter) 24px;
    display: grid;
    grid-template-columns: var(--lx-sidebar-w) 1fr;
    gap: var(--lx-gutter);
    align-items: start;
}
.lx-shell--noaside { grid-template-columns: 1fr; }

/* Logged-out pages (no sidebar) narrow to the marketing content width so the
   header, content, and footer all align with lylix.net. Authenticated pages
   (with the sidebar) keep --lx-content-max. Scoped to .lx-body--guest, set by
   the customer layout when no client/contact is signed in — so an authenticated
   user placing an order (who has the sidebar) is unaffected. */
.lx-body--guest .lx-shell,
.lx-body--guest .lx-header__inner,
.lx-body--guest .lx-footer__inner { max-width: var(--lx-content-marketing); }

/* ---- Sidebar / portal nav ---- */
.lx-aside {
    background: var(--lx-white);
    border: 1px solid var(--lx-gray-300);
    border-radius: var(--lx-radius);
    padding: 12px 0;
    position: sticky;
    top: 84px;
    box-shadow: var(--lx-shadow);
}
.lx-aside__group { padding: 4px 0; }
.lx-aside__label {
    font-size: 0.72rem;
    color: var(--lx-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    padding: 10px 18px 4px;
}
.lx-aside ul { list-style: none; padding: 0; margin: 0; }
.lx-aside li { margin: 0; }
.lx-aside a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 8px 18px;
    color: var(--lx-gray-700);
    border: 0;
    font-size: 0.92rem;
    border-left: 3px solid transparent;
}
/* Nav icon — inherits currentColor so it tracks the active/hover text colour.
   Full opacity + geometricPrecision so the thin strokes stay crisp, not washy. */
.lx-aside__icon { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.85; shape-rendering: geometricPrecision; }
.lx-aside a:hover {
    background: var(--lx-gray-100);
    color: var(--lx-blue-900);
    border-left-color: var(--lx-blue-100);
}
.lx-aside a.lx-aside--active {
    background: var(--lx-blue-100);
    color: var(--lx-blue-900);
    border-left-color: var(--lx-blue-700);
    font-weight: 600;
}
/* Buttons rendered inside the aside need to keep their own colors, not
   inherit .lx-aside a's gray-700 / border-left-transparent rules. */
.lx-aside a.lx-btn {
    color: var(--lx-white);
    border-left: 1px solid var(--lx-blue-700);
    padding: 9px 20px;
}
.lx-aside a.lx-btn:hover {
    color: var(--lx-white);
    background: var(--lx-rose);
    border-left-color: var(--lx-rose);
}
.lx-aside a.lx-btn.lx-btn--cta {
    color: var(--lx-white);
    border-left: 1px solid var(--lx-rose);
}
.lx-aside a.lx-btn.lx-btn--cta:hover {
    color: var(--lx-white);
    background: var(--lx-rose-d);
    border-left-color: var(--lx-rose-d);
}

/* ---- Main content ---- */
.lx-main { min-width: 0; }
.lx-pageheader {
    margin-bottom: 18px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.lx-pageheader h1 { margin: 0; }
.lx-pageheader__crumbs {
    font-size: 0.85rem;
    color: var(--lx-gray-500);
    margin-bottom: 4px;
}
.lx-pageheader__crumbs a { color: var(--lx-gray-500); }
.lx-pageheader__crumbs a:hover { color: var(--lx-blue-700); }

/* Standard "back to list" link — a long left arrow + label, e.g.
   "← All invoices". Used at the BOTTOM of every detail page for a
   consistent return path. */
.lx-backlink {
    display: inline-block;
    color: var(--lx-gray-600);
    text-decoration: none;
    /* Kill the global a{border-bottom} so hover shows a SINGLE underline
       (text-decoration) instead of a stacked border + underline. */
    border-bottom: 0;
    font-size: 0.9rem;
}
.lx-backlink:hover { color: var(--lx-blue-700); text-decoration: underline; border-bottom: 0; }

/* ============================================================================
   Pagination (pagination::lylix view) — text arrows, no Tailwind SVGs
   ============================================================================ */
.lx-pagination {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.lx-pagination__link {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid var(--lx-gray-300);
    border-radius: 6px;
    color: var(--lx-blue-600, #2563eb);
    background: var(--lx-white);
    text-decoration: none;
    font-size: 0.88rem;
    line-height: 1.2;
}
.lx-pagination__link:hover { border-color: var(--lx-blue-500); background: var(--lx-gray-50, #f8fafc); }
.lx-pagination__link--disabled { color: var(--lx-gray-400); background: var(--lx-gray-50, #f8fafc); cursor: default; }
.lx-pagination__link--disabled:hover { border-color: var(--lx-gray-300); background: var(--lx-gray-50, #f8fafc); }
.lx-pagination__summary { color: var(--lx-gray-600); font-size: 0.85rem; }

/* ============================================================================
   Section / panel boxes — primary content container
   ============================================================================ */
.lx-panel {
    background: var(--lx-white);
    border: 1px solid var(--lx-gray-300);
    border-radius: var(--lx-radius);
    margin-bottom: 18px;
    box-shadow: var(--lx-shadow);
    overflow: hidden;
}
.lx-panel__head {
    /* Fixed height + centered content so a header with a button is the same
       height as one without (#454) — the button no longer inflates it. */
    min-height: 40px;
    padding: 6px 22px;
    border-bottom: 1px solid var(--lx-gray-300);
    /* #454 whisper-faint grey wash — just a notch deeper than the page
       background (#f5f6f8) so the header separates from the white panel body
       without standing out. */
    background: #f0f1f4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.lx-panel__head h2,
.lx-panel__head h3 {
    margin: 0;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--lx-gray-700);
    font-weight: 600;
}
.lx-panel__head--rose { border-bottom-color: var(--lx-rose); border-bottom-width: 2px; }
.lx-panel__body { padding: 22px; }
.lx-panel__body--tight { padding: 14px 22px; }
.lx-panel__foot {
    padding: 12px 22px;
    border-top: 1px solid var(--lx-gray-300);
    background: var(--lx-gray-100);
    font-size: 0.88rem;
    color: var(--lx-gray-500);
}

/* Compact stat blocks */
.lx-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.lx-stat {
    background: var(--lx-white);
    border: 1px solid var(--lx-gray-300);
    border-radius: var(--lx-radius);
    padding: 14px 18px;
    box-shadow: var(--lx-shadow);
    position: relative;
}
.lx-stat__icon {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 18px;
    height: 18px;
    color: var(--lx-sage);
    opacity: 0.7;
}
.lx-stat__label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--lx-sage);
    font-weight: 600;
    margin-bottom: 4px;
}
.lx-stat__value {
    font-size: 1.55rem;
    color: var(--lx-blue-900);
    font-weight: 700;
    line-height: 1.1;
}
.lx-stat__sub { font-size: 0.85rem; color: var(--lx-gray-500); margin-top: 2px; }

/* Key/value infobox — a responsive 2-col grid of labelled facts (ticket
   info, service summary, etc.). Each direct child is a dt/dd pair. */
.lx-infobox { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 24px; margin: 0; }
.lx-infobox > div { min-width: 0; }
.lx-infobox dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--lx-gray-500); font-weight: 600; margin-bottom: 3px; }
.lx-infobox dd { margin: 0; color: var(--lx-blue-900); }
.lx-stat--alert .lx-stat__value { color: var(--lx-rose); }
.lx-stat--alert .lx-stat__icon { color: var(--lx-rose); opacity: 0.85; }

/* ============================================================================
   Tables
   ============================================================================ */
.lx-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}
.lx-table th {
    text-align: left;
    padding: 10px 16px;
    background: var(--lx-gray-100);
    border-bottom: 1px solid var(--lx-gray-300);
    color: var(--lx-gray-700);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.74rem;
    font-weight: 600;
}
.lx-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--lx-gray-100);
    vertical-align: middle;
    color: var(--lx-gray-900);
}
.lx-table tbody tr:hover td { background: var(--lx-gray-100); }
.lx-table tbody tr:last-child td { border-bottom: 0; }
.lx-table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* Status badges */
.lx-badge {
    display: inline-block;
    padding: 2px 9px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.6;
}
.lx-badge--ok    { background: var(--lx-green-bg); color: var(--lx-green); }
.lx-badge--warn  { background: var(--lx-amber-bg); color: var(--lx-amber); }
.lx-badge--alert { background: var(--lx-red-bg);   color: var(--lx-red); }
.lx-badge--info  { background: var(--lx-blue-100); color: var(--lx-blue-700); }
.lx-badge--muted { background: var(--lx-gray-100); color: var(--lx-gray-500); }
.lx-badge--lg    { padding: 5px 14px; font-size: 0.85rem; line-height: 1.8; }

/* ============================================================================
   Forms
   ============================================================================ */
.lx-form { max-width: 460px; }
.lx-form--wide { max-width: 720px; }
.lx-form-row { margin-bottom: 14px; }
.lx-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--lx-gray-700);
    margin-bottom: 4px;
}
.lx-form input[type=text],
.lx-form input[type=email],
.lx-form input[type=password],
.lx-form input[type=number],
.lx-form input[type=url],
.lx-form input[type=search],
.lx-form input[type=tel],
.lx-form select,
.lx-form textarea,
input[type=text],
input[type=email],
input[type=password],
input[type=number],
input[type=url],
input[type=search],
input[type=tel],
select,
textarea {
    width: 100%;
    max-width: 460px;
    padding: 6px 10px;
    border: 1px solid var(--lx-gray-300);
    border-radius: var(--lx-radius);
    font-family: var(--lx-font);
    font-size: 0.95rem;
    background: var(--lx-white);
    color: var(--lx-gray-900);
    transition: border-color 0.12s ease;
}
.lx-form input:focus,
.lx-form select:focus,
.lx-form textarea:focus,
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--lx-blue-500);
    box-shadow: 0 0 0 3px rgba(37,99,164,0.15);
}
/* Password input-group (x-password-field): the wrapper is the visual field, so
   surface focus on it (its inner input is borderless and never shows a ring). */
.lx-pwgroup:focus-within {
    border-color: var(--lx-blue-500);
    box-shadow: 0 0 0 3px rgba(37,99,164,0.15);
}
.lx-form textarea, textarea { min-height: 120px; resize: vertical; }
.lx-form .lx-help { font-size: 0.82rem; color: var(--lx-gray-500); margin-top: 4px; }
.lx-form-row--inline { display: flex; align-items: center; gap: 8px; }

/* New-ticket form: main fields (Department / Subject / Priority) on the left,
   Related services alongside on the right. Collapses to a single column on
   narrow screens — the aside then falls in source order, after Priority. */
.lx-ticket-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
    gap: 20px;
    align-items: start;
    margin-bottom: 14px;
}
@media (max-width: 760px) {
    .lx-ticket-form-grid { grid-template-columns: 1fr; }
}

/* ----- <select> appearance: flatten the browser-default chrome and draw
   our own caret. The OPEN dropdown list itself is rendered by the OS and
   can't be CSS-styled (rounded corners + native selection color come from
   the OS), but the closed control and arrow now match the brand. */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 32px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M0 0 L5 6 L10 0 Z' fill='%231e3a5f'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px 6px;
}
select::-ms-expand { display: none; }

/* ----- Eye toggle button (show/hide password fields) ----- */
.lx-eye-toggle {
    background: transparent;
    border: 0;
    padding: 4px;
    cursor: pointer;
    color: var(--lx-gray-500);
    line-height: 0;
    flex-shrink: 0;
}
.lx-eye-toggle:hover { color: var(--lx-blue-700); }
.lx-eye-toggle svg { vertical-align: middle; }

/* ----- File input "Browse" button: brand styling via the file-selector
   pseudo-element. Works in all modern browsers. */
input[type=file] {
    width: auto;
    max-width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 0.9rem;
}
/* Browse button matches the small / quiet button family (same look as
   "Open new", "Manage", "View" etc.) so file inputs visually belong with
   the rest of the action buttons. */
input[type=file]::file-selector-button,
input[type=file]::-webkit-file-upload-button {
    display: inline-block;
    padding: 4px 10px;
    margin-right: 10px;
    background: var(--lx-white);
    color: var(--lx-gray-700);
    border: 1px solid var(--lx-gray-300);
    border-radius: var(--lx-radius);
    font-family: var(--lx-font);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.12s ease, color 0.12s ease;
}
input[type=file]::file-selector-button:hover,
input[type=file]::-webkit-file-upload-button:hover {
    background: var(--lx-gray-100);
    color: var(--lx-blue-900);
    border-color: var(--lx-gray-300);
}
.lx-form-row--inline label { margin: 0; }

/* Two-column form layout: label on the left, control on the right.
   Used where stacked-label rows waste too much vertical space (credit
   card, server config), and where the form reads as a property sheet
   rather than a free-form input. */
.lx-formgrid { display: block; }
.lx-formgrid__row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 10px 16px;
    align-items: center;
    padding: 6px 0;
}
.lx-formgrid__row > label {
    color: var(--lx-gray-700);
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
}
@media (max-width: 600px) {
    .lx-formgrid__row { grid-template-columns: 1fr; gap: 4px; }
}

/* ============================================================================
   WHMCS password strength meter — JS renders two adjacent divs,
   #pwstrengthpos (filled portion) and #pwstrengthneg (remaining portion).
   Their widths get set as percentages. Without forced float/box-sizing,
   they stack at 0% and 100% because of sub-pixel rounding pushing the
   total > 100%. Force them to float left with zero margins/padding so
   they always sit side-by-side as a single bar.
   ============================================================================ */
#pwstrengthpos, #pwstrengthneg {
    float: left !important;
    height: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    font-size: 0 !important;
    line-height: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    text-indent: -9999px !important;  /* hide any literal text the JS sets */
}
/* Default fill is rose (still in-progress); JS observer below swaps it
   to weak / moderate / strong based on the width percentage. */
#pwstrengthpos                       { background: var(--lx-rose)     !important; }
#pwstrengthpos.lx-pw-weak            { background: var(--lx-red)      !important; }
#pwstrengthpos.lx-pw-moderate        { background: var(--lx-amber)    !important; }
#pwstrengthpos.lx-pw-strong          { background: var(--lx-green)    !important; }
#pwstrengthneg                       { background: var(--lx-gray-300) !important; }
/* Clearfix the row after the bars so they don't bleed into adjacent content */
#pwstrengthneg + * { clear: both; }
/* The wrapping table WHMCS emits is align="center"; flip it left and pin
   each cell width so the strength word changing from Weak → Moderate →
   Strong doesn't shift the bar or the leading label. .lx-pw-table is
   added by the observer in header.tpl. */
table.lx-pw-table { margin: 6px 0 !important; border-collapse: collapse !important; }
table.lx-pw-table td { vertical-align: middle !important; text-align: left !important; padding: 2px 0 !important; }
/* Label cell — give it right-side breathing room via padding. */
table.lx-pw-table td:nth-child(1) { padding-right: 10px !important; }
/* Bar cell — zero side padding so the 30px + 70px floats always fit
   exactly in the 102px container. Stacking returns the moment this
   cell has any padding. */
table.lx-pw-table td:nth-child(2) { width: 102px !important; padding: 0 !important; }
/* Word cell — fixed width so Weak / Moderate / Strong don't shift the
   row, plus left padding so it doesn't kiss the bar. */
table.lx-pw-table td:nth-child(3) { width: 90px !important; padding-left: 10px !important; }
table.lx-pw-table #pwstrength { font-size: 0.85rem; color: var(--lx-gray-700); }

/* ============================================================================
   Buttons
   ============================================================================ */
/* Base .lx-btn — selector is a single class on purpose so modifier classes
   (--quiet, --cta, --danger, --ghost, --sm) can override without losing the
   specificity fight. The previous form (button.lx-btn / input[type=submit].lx-btn)
   was tag+class = (0,1,1), which clobbered the (0,1,0) modifier rules and
   made every "quiet" submit button render as the primary blue. */
.lx-btn {
    display: inline-block;
    padding: 7px 15px;
    background: var(--lx-blue-700);
    color: var(--lx-white);
    border: 1px solid var(--lx-blue-700);
    border-radius: var(--lx-radius);
    font-family: var(--lx-font);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
    line-height: 1.4;
    vertical-align: middle;
}
.lx-btn:hover {
    background: var(--lx-rose);
    border-color: var(--lx-rose);
    color: var(--lx-white);
}
.lx-btn--ghost { background: transparent; color: var(--lx-blue-700); }
.lx-btn--ghost:hover { background: var(--lx-blue-700); color: var(--lx-white); }
.lx-btn--cta { background: var(--lx-rose); border-color: var(--lx-rose); }
.lx-btn--cta:hover { background: var(--lx-rose-d); border-color: var(--lx-rose-d); }
.lx-btn--quiet,
.lx-btn--quiet:link,
.lx-btn--quiet:visited {
    background: var(--lx-white);
    color: var(--lx-gray-700);
    border-color: var(--lx-gray-300);
}
.lx-btn--quiet:hover {
    background: var(--lx-gray-100);
    color: var(--lx-blue-900);
    border-color: var(--lx-gray-300);
}
.lx-btn--sm { padding: 4px 10px; font-size: 0.82rem; }

/* Outlined button — white bg, dark text, subtle border (WHMCS-style
   secondary action). For low-emphasis row actions (Download PDF, etc.)
   where a solid blue fill is too loud. Hover fills a light gray. */
.lx-btn--outline,
.lx-btn--outline:link,
.lx-btn--outline:visited {
    background: var(--lx-white);
    color: var(--lx-gray-800, #303a45);
    border-color: var(--lx-gray-400, #9aa5b1);
    font-weight: 500;
}
.lx-btn--outline:hover {
    background: var(--lx-gray-100);
    color: var(--lx-blue-900);
    border-color: var(--lx-gray-500, #7b8794);
}

/* Inline filter bar (e.g. the Services list Search + Status + Filter row).
   Forces the inputs, selects, and buttons on the row to a shared 38px box so
   the Filter/Clear buttons sit flush with the fields instead of floating a few
   px above them. */
/* Horizontal filter/search bar. The global input/select rule forces
   width:100% + max-width:460px, which makes every control claim a full
   row and stack ("selectors on new lines"). Here we override to auto
   width so controls sit inline, with the free-text search flex-growing
   to fill the row and everything sharing a 38px height. */
.lx-inline-filter { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.lx-inline-filter input[type=text],
.lx-inline-filter input[type=search],
.lx-inline-filter input[type=date],
.lx-inline-filter input[type=number],
.lx-inline-filter select {
    height: 32px;
    width: auto;
    max-width: none;
    padding: 0 10px;
}
.lx-inline-filter input[type=search],
.lx-inline-filter input[type=text] { flex: 1 1 220px; min-width: 200px; }
.lx-inline-filter input[type=date] { flex: 0 0 auto; min-width: 150px; }
.lx-inline-filter select { flex: 0 0 auto; min-width: 150px; }
/* From/To wrappers: label text + its date input on one line, not stacked. */
.lx-inline-filter label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.lx-inline-filter .lx-btn {
    height: 32px;
    padding-top: 0;
    padding-bottom: 0;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}
/* Table toolbar (#454): "N–M of T" + per-page selector + compact page nav,
   sits directly above a table. Kept small and unobtrusive. */
.lx-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 10px;
    font-size: 0.85rem;
    color: var(--lx-gray-700);
}
.lx-table-toolbar__count { font-variant-numeric: tabular-nums; }
.lx-table-toolbar__ctrls { display: inline-flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.lx-table-toolbar__perpage { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.lx-table-toolbar__perpage select {
    height: 28px;
    width: auto;
    max-width: none;
    padding: 0 26px 0 8px;
    font-size: 0.82rem;
    background-position: right 8px center;
}
.lx-table-toolbar__nav { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.lx-table-toolbar__nav .lx-tt-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--lx-gray-300);
    border-radius: var(--lx-radius);
    color: var(--lx-blue-700);
    text-decoration: none;
    font-size: 1.05rem;
    line-height: 1;
}
.lx-table-toolbar__nav .lx-tt-nav:hover { background: var(--lx-blue-100); border-color: var(--lx-blue-500); }
.lx-table-toolbar__nav .lx-tt-nav--off { color: var(--lx-gray-300); cursor: default; }
.lx-table-toolbar__nav .lx-tt-nav__page { font-variant-numeric: tabular-nums; color: var(--lx-gray-600); }

/* Transactions filter: a single tidy bar — the type checkboxes flow inline
   as chips, then From / To date fields, then the action buttons. */
.lx-txn-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin: 16px 0 20px;
    padding: 12px 14px;
    border: 1px solid var(--lx-gray-300);
    border-radius: 6px;
    background: var(--lx-gray-50, #fafafa);
}
.lx-txn-filter__types { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.lx-txn-filter__label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--lx-gray-600);
    font-weight: 600;
}
.lx-txn-filter__chk {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    white-space: nowrap;
}
.lx-txn-filter__chk input[type=checkbox] { width: auto; margin: 0; }
.lx-txn-filter__date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--lx-gray-600);
    white-space: nowrap;
}
.lx-txn-filter__date input[type=date] { width: auto; height: 32px; padding: 0 10px; }
.lx-txn-filter__actions { display: inline-flex; gap: 8px; margin-left: auto; }

.lx-btn--danger { background: var(--lx-red); border-color: var(--lx-red); }
.lx-btn--danger:hover { background: #962a23; border-color: #962a23; }
/* Green "go" affordance — for "Start" / unambiguously safe positive actions. */
.lx-btn--success { background: #15803d; border-color: #15803d; color: #fff; }
.lx-btn--success:hover { background: #166534; border-color: #166534; }
/* Amber-tinted "caution" affordance — for actions that aren't destructive but
   shouldn't compete with the primary blue (e.g. Close Ticket). Mirrors the
   notice/badge --warn palette so it reads as the same semantic register. */
.lx-btn--warn,
.lx-btn--warn:link,
.lx-btn--warn:visited {
    background: var(--lx-amber-bg);
    color: var(--lx-amber);
    border-color: #f0d6a4;
}
.lx-btn--warn:hover {
    background: #f7e6c2;
    color: var(--lx-amber);
    border-color: var(--lx-amber);
}
/* Solid orange — a middle step between --warn (amber) and --danger (red).
   Used for a hard "Reset" that skips a clean shutdown but isn't a power-cord pull. */
.lx-btn--caution,
.lx-btn--caution:link,
.lx-btn--caution:visited { background: #ea7a24; color: #fff; border-color: #ea7a24; }
.lx-btn--caution:hover { background: #c96417; border-color: #c96417; color: #fff; }

/* Generic submit buttons inside forms get the primary style — but only
   when no .lx-btn class is present. Buttons that opt into the design
   system via .lx-btn / .lx-btn--quiet / etc. should follow their class. */
input[type=submit]:not(.lx-btn), button[type=submit]:not(.lx-btn) {
    display: inline-block;
    padding: 7px 15px;
    background: var(--lx-blue-700);
    color: var(--lx-white);
    border: 1px solid var(--lx-blue-700);
    border-radius: var(--lx-radius);
    font-family: var(--lx-font);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    width: auto;
    max-width: none;
}
input[type=submit]:not(.lx-btn):hover, button[type=submit]:not(.lx-btn):hover {
    background: var(--lx-rose);
    border-color: var(--lx-rose);
}

/* ============================================================================
   Notices
   ============================================================================ */
.lx-notice {
    padding: 12px 16px;
    border-radius: var(--lx-radius);
    margin-bottom: 16px;
    border: 1px solid;
    font-size: 0.92rem;
}
.lx-notice--info  { background: var(--lx-blue-100); border-color: #b6cee6; color: var(--lx-blue-900); }
.lx-notice--ok    { background: var(--lx-green-bg); border-color: #b7dec5; color: var(--lx-green); }
.lx-notice--warn  { background: var(--lx-amber-bg); border-color: #f0d6a4; color: var(--lx-amber); }
.lx-notice--alert { background: var(--lx-red-bg);   border-color: #ecb7b1; color: var(--lx-red); }
.lx-notice p:last-child { margin-bottom: 0; }
.lx-notice strong { color: inherit; }
/* Dismissible notices — the close × is injected by the global handler in the
   customer layout onto any .lx-notice that is NOT .lx-notice--persist. */
.lx-notice--has-dismiss { position: relative; padding-right: 36px; }
.lx-notice__dismiss {
    position: absolute; top: 6px; right: 8px;
    width: 22px; height: 22px; line-height: 20px; padding: 0;
    background: transparent; border: 0; border-radius: 4px;
    color: inherit; opacity: 0.65; cursor: pointer;
    font-size: 1.15rem; text-align: center;
}
.lx-notice__dismiss:hover { opacity: 1; background: rgba(0, 0, 0, 0.08); }

/* Hide the portal-homepage rack schematic on narrow screens. */
@media (max-width: 640px) {
    .lx-portal-hero-graphic { display: none; }
}

/* ============================================================================
   Login / public-portal centered card
   ============================================================================ */
.lx-public {
    min-height: calc(100vh - 64px - 120px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 20px;
    background: linear-gradient(180deg, var(--lx-blue-100) 0%, var(--lx-gray-100) 240px);
}
.lx-public__card {
    background: var(--lx-white);
    border: 1px solid var(--lx-gray-300);
    border-radius: var(--lx-radius);
    box-shadow: var(--lx-shadow-lg);
    padding: 32px 36px;
    width: 100%;
    max-width: 440px;
}
.lx-public__card--wide { max-width: 720px; }
.lx-public__card h1 { margin: 0 0 4px 0; font-size: 1.45rem; }
.lx-public__card p.lead {
    color: var(--lx-gray-500);
    margin: 0 0 22px 0;
    font-size: 0.92rem;
}
.lx-public__card .lx-form, .lx-public__card form { max-width: 100%; }
.lx-public__card input[type=submit] { width: 100%; }
.lx-public__card-foot {
    text-align: center;
    margin-top: 22px;
    color: var(--lx-gray-500);
    font-size: 0.85rem;
}

/* ============================================================================
   Hide leaked WHMCS branding paragraph injected via $footeroutput when the
   license isn't currently registered as branding-free. The license itself is
   supposed to cover branding removal — this rule is a stopgap until the
   license-side status is reconciled with WHMCS billing. Targets the exact
   "Powered by WHMCompleteSolution" paragraph by its child whmcs.com link
   so we don't accidentally hide anything else.
   ============================================================================ */
p:has(> a[href*="whmcs.com"]) {
    display: none !important;
}

/* ============================================================================
   Footer
   ============================================================================ */
.lx-footer {
    background: var(--lx-white);
    border-top: 1px solid var(--lx-gray-300);
    margin-top: 36px;
    padding: 24px 0 28px;
    color: var(--lx-gray-500);
    font-size: 0.85rem;
}
.lx-footer__inner {
    max-width: var(--lx-content-max);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.lx-footer a { color: var(--lx-gray-700); border: 0; }
.lx-footer a:hover { color: var(--lx-blue-700); }
.lx-footer__links a { margin-right: 14px; }
.lx-footer__legal {
    max-width: var(--lx-content-max);
    margin: 14px auto 0;
    padding: 14px 24px 0;
    border-top: 1px solid var(--lx-gray-300);
    color: var(--lx-gray-500);
    font-size: 0.78rem;
    line-height: 1.5;
}

/* ============================================================================
   Misc helpers
   ============================================================================ */
.lx-spacer-sm { height: 12px; }
.lx-spacer    { height: 24px; }
.lx-spacer-lg { height: 40px; }
.lx-text-muted { color: var(--lx-gray-500); }
.lx-text-right { text-align: right; }
.lx-text-center { text-align: center; }
.lx-monospace { font-family: var(--lx-font-mono); }
.lx-mb-0 { margin-bottom: 0 !important; }
.lx-mb-sm { margin-bottom: 8px; }
.lx-mb { margin-bottom: 18px; }

/* ============================================================================
   Section tab subnav (account pages, etc.)
   ============================================================================ */
.lx-tab {
    display: inline-block;
    padding: 8px 14px;
    color: var(--lx-gray-500);
    border: 0;
    border-bottom: 2px solid transparent;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: -1px;
    text-decoration: none;
    white-space: nowrap;   /* don't wrap a label mid-word */
}
.lx-tabs { flex-wrap: wrap; }
.lx-tab:hover {
    color: var(--lx-blue-700);
    border-bottom-color: var(--lx-gray-300);
}
.lx-tab--active, .lx-tab--active:hover {
    color: var(--lx-blue-900);
    border-bottom-color: var(--lx-blue-700);
    font-weight: 600;
}
/* #454 "More" overflow dropdown — the rarely-used account tabs live here so
   the strip stays short. The trigger is a .lx-tab <button>. */
.lx-tab-more { position: relative; display: inline-flex; }
button.lx-tab { background: none; cursor: pointer; font-family: inherit; }
.lx-tab-more__caret { font-size: 0.7rem; margin-left: 3px; }
.lx-tab-more__menu {
    position: absolute; top: 100%; right: 0; margin-top: 2px; z-index: 50;
    background: var(--lx-white); border: 1px solid var(--lx-gray-300);
    border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    min-width: 180px; padding: 4px 0;
}
.lx-tab-more__item {
    display: block; padding: 8px 14px; color: var(--lx-gray-700);
    text-decoration: none; font-size: 0.9rem; white-space: nowrap;
    /* Mirror the sidebar nav: left-bar rail + bg highlight, NO underline.
       border-bottom:0 overrides the global `a` border-bottom (its :hover was
       drawing the stray underline). */
    border-left: 3px solid transparent;
    border-bottom: 0;
}
.lx-tab-more__item:hover {
    background: var(--lx-gray-100); color: var(--lx-blue-900);
    border-left-color: var(--lx-blue-100);
}
.lx-tab-more__item.is-active {
    background: var(--lx-blue-100); color: var(--lx-blue-900);
    border-left-color: var(--lx-blue-700); font-weight: 600;
}

/* ============================================================================
   Anti-spam honeypot — must be invisible to users, accessible to bots
   ============================================================================ */
.lx-hp {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none;
}

/* ============================================================================
   Responsive
   ============================================================================ */
@media (max-width: 900px) {
    .lx-shell { grid-template-columns: 1fr; }
    .lx-aside { position: static; }
    /* Collapse two-column overview on the product details page */
    .lx-panel__body > div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    .lx-panel__body > div[style*="grid-template-columns: 1fr 1fr"] > div[style*="border-right"] {
        border-right: 0 !important;
        border-bottom: 1px solid var(--lx-gray-100) !important;
    }
}
@media (max-width: 760px) {
    body { font-size: 14px; }
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.2rem; }
    .lx-nav { display: none; }
    .lx-nav.lx-nav--open {
        display: flex;
        position: absolute;
        top: 64px; left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        background: var(--lx-white);
        border-bottom: 1px solid var(--lx-gray-300);
        padding: 10px 14px;
        gap: 2px;
        box-shadow: var(--lx-shadow-lg);
    }
    .lx-nav.lx-nav--open .lx-nav__user {
        border-left: 0;
        border-top: 1px solid var(--lx-gray-300);
        padding-left: 0;
        padding-top: 10px;
        margin-top: 6px;
        margin-left: 0;
    }
    .lx-nav-toggle { display: inline-block; }
    .lx-shell { padding: 14px; }
    .lx-panel__body { padding: 16px; }
    .lx-panel__head { padding: 12px 16px; }
    .lx-table { font-size: 0.85rem; }
    .lx-table th, .lx-table td { padding: 8px 10px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}

/* ============================================================================
   Legacy compat — for templates not yet hand-restyled (low-traffic pages
   like domain management, addons, configuressl, affiliates, etc.). These
   selectors keep them readable; they don't have to look polished, just OK.
   ============================================================================ */

/* Box / panel shims */
.frame {
    width: 100%;
    background: var(--lx-white);
    border: 1px solid var(--lx-gray-300);
    border-radius: var(--lx-radius);
    box-shadow: var(--lx-shadow);
    margin-bottom: 18px;
}
.frame > tbody > tr > td > table { width: 100%; }
.fieldarea {
    color: var(--lx-gray-500);
    font-size: 0.88rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Data tables (.data) — match .lx-table look */
table.data {
    width: 100%;
    border-collapse: collapse;
    background: var(--lx-white);
    border: 1px solid var(--lx-gray-300);
    border-radius: var(--lx-radius);
    box-shadow: var(--lx-shadow);
    margin-bottom: 18px;
    overflow: hidden;
}
table.data th {
    text-align: left;
    padding: 10px 14px;
    background: var(--lx-gray-100);
    border-bottom: 1px solid var(--lx-gray-300);
    color: var(--lx-gray-700);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.74rem;
    font-weight: 600;
}
table.data td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--lx-gray-100);
    vertical-align: middle;
    color: var(--lx-gray-900);
    font-size: 0.92rem;
}
table.data tbody tr:hover td { background: var(--lx-gray-100); }
table.data .topleft, table.data .bottomright {
    /* unused legacy corner-rounding cells — let them collapse */
    padding: 0;
    background: transparent;
    border: 0;
}

/* Legacy alert boxes */
.errorbox, .alertbox, .red {
    padding: 10px 14px;
    border: 1px solid #ecb7b1;
    background: var(--lx-red-bg);
    color: var(--lx-red);
    border-radius: var(--lx-radius);
    margin: 0 0 14px 0;
    font-size: 0.92rem;
}
.successbox, .greenbox {
    padding: 10px 14px;
    border: 1px solid #b7dec5;
    background: var(--lx-green-bg);
    color: var(--lx-green);
    border-radius: var(--lx-radius);
    margin: 0 0 14px 0;
    font-size: 0.92rem;
}
.bluebox, .creditbox, .infobox {
    padding: 10px 14px;
    border: 1px solid #b6cee6;
    background: var(--lx-blue-100);
    color: var(--lx-blue-900);
    border-radius: var(--lx-radius);
    margin: 0 0 14px 0;
    font-size: 0.92rem;
}

/* Status row shading (legacy clientareatable* classes) */
tr.clientareatableactive,
tr.clientareatableactive td { background: var(--lx-white); }
tr.clientareatablepending,
tr.clientareatablepending td { background: #fff8e8; }
tr.clientareatablesuspended,
tr.clientareatablesuspended td { background: var(--lx-amber-bg); }
tr.clientareatableterminated,
tr.clientareatableterminated td { background: #f5e9e7; color: var(--lx-gray-500); }
td.clientareatablepending { background: #fff8e8; }
td.clientareatablesuspended { background: var(--lx-amber-bg); }
td.clientareatableterminated { background: #f5e9e7; }

/* Legacy "heading2" subheaders */
.heading2, h2.heading2 {
    color: var(--lx-blue-900);
    font-size: 1.35rem;
    margin: 1em 0 0.5em 0;
}

/* Legacy button classes from default WHMCS theme */
input.button, input.blue, input.buttongo, input.submitbutton, input.grey {
    display: inline-block;
    padding: 7px 16px;
    background: var(--lx-blue-700);
    color: var(--lx-white);
    border: 1px solid var(--lx-blue-700);
    border-radius: var(--lx-radius);
    font-family: var(--lx-font);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.4;
    width: auto;
}
input.button:hover, input.blue:hover, input.buttongo:hover, input.submitbutton:hover {
    background: var(--lx-rose);
    border-color: var(--lx-rose);
}
input.grey {
    background: var(--lx-white);
    color: var(--lx-gray-700);
    border-color: var(--lx-gray-300);
}
input.grey:hover { background: var(--lx-gray-100); color: var(--lx-blue-900); }

/* Legacy ticket reply panels */
.clientticketreplyheader, .adminticketreplyheader {
    background: var(--lx-blue-100);
    border: 1px solid var(--lx-gray-300);
    border-radius: var(--lx-radius) var(--lx-radius) 0 0;
    padding: 8px 14px;
    font-size: 0.9rem;
    color: var(--lx-blue-900);
    margin-top: 18px;
}
.adminticketreplyheader { background: #f3e3e6; color: var(--lx-rose-d); }
.clientticketreply, .adminticketreply {
    background: var(--lx-white);
    border: 1px solid var(--lx-gray-300);
    border-top: 0;
    border-radius: 0 0 var(--lx-radius) var(--lx-radius);
    padding: 16px;
    margin-bottom: 8px;
}

/* KB legacy */
.kbarticle { padding: 10px 0; border-bottom: 1px solid var(--lx-gray-100); }
.kbalsoread { margin-top: 18px; font-weight: 600; color: var(--lx-gray-700); }
.kbviews { color: var(--lx-gray-500); font-size: 0.82rem; }

/* Search input legacy */
input.searchinput {
    width: auto;
    max-width: 240px;
    display: inline-block;
}

/* Misc legacy color helpers */
.black { color: var(--lx-gray-900); }
.unread { font-weight: 700; }
.small { font-size: 0.85em; color: var(--lx-gray-500); }

/* Affiliate / signup table styling */
table.signupbox td { padding: 6px 10px; }

/* #338 AJAX save toast — fixed bottom-center, slides up on show, auto-
   hides after ~3.2s (timing controlled by JS). Two variants: ok (green)
   + error (rose). ARIA role=status handles accessibility. */
.lx-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translate(-50%, 24px);
    opacity: 0;
    pointer-events: none;
    max-width: 480px;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
    z-index: 9999;
    transition: transform 180ms ease-out, opacity 180ms ease-out;
}
.lx-toast--visible {
    opacity: 1;
    transform: translate(-50%, 0);
}
.lx-toast--ok {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}
.lx-toast--error {
    background: #fee2e2;
    color: #7f1d1d;
    border: 1px solid #ef4444;
}

/* ============================================================================
   Order form (ported from lx-2026-orderform/style.css). The order flow uses
   its own layout on top of the portal design system: horizontal step
   indicator, product-card grid, two-column checkout with summary sidebar.
   ============================================================================ */
.lx-order {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 0 36px;
}

/* Step indicator — replaces the plain numbered list that was rendering. */
.lx-steps {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin: 0 0 28px 0;
    border: 1px solid var(--lx-gray-300);
    background: var(--lx-white);
    overflow: hidden;
    border-radius: 4px;
}
.lx-step {
    flex: 1 1 0;
    padding: 12px 16px;
    color: var(--lx-gray-500);
    font-size: 0.85rem;
    border-right: 1px solid var(--lx-gray-300);
    display: flex;
    align-items: center;
    gap: 10px;
}
.lx-step:last-child { border-right: 0; }
.lx-step__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: var(--lx-gray-300);
    color: var(--lx-white);
    border-radius: 50%;
    font-size: 0.78rem;
    font-weight: 700;
    flex-shrink: 0;
}
.lx-step--done    { color: var(--lx-blue-700); }
.lx-step--done .lx-step__num    { background: var(--lx-blue-700); }
.lx-step--current { color: var(--lx-blue-900); background: var(--lx-blue-100); }
.lx-step--current .lx-step__num { background: var(--lx-rose); }

/* Product grid + card (used on /order landing). */
.lx-productgrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}
.lx-productcard {
    background: var(--lx-white);
    border: 1px solid var(--lx-gray-300);
    padding: 24px;
    display: flex;
    flex-direction: column;
    border-radius: 4px;
}
.lx-productcard h3 {
    margin: 0 0 6px 0;
    color: var(--lx-blue-900);
    font-size: 1.15rem;
}
.lx-productcard__price {
    color: var(--lx-rose);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 14px;
}
.lx-productcard__desc {
    color: var(--lx-gray-700);
    font-size: 0.92rem;
    margin-bottom: 18px;
    flex: 1;
}

/* Two-column shell used on the configure + checkout pages. */
.lx-order__cols {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 22px;
    align-items: start;
}
.lx-order__main { min-width: 0; }
.lx-order__side { position: sticky; top: 20px; }

/* Cart summary box (right column). */
.lx-summary {
    background: var(--lx-white);
    border: 1px solid var(--lx-gray-300);
    border-radius: 4px;
}
.lx-summary__head {
    padding: 14px 18px;
    border-bottom: 1px solid var(--lx-gray-300);
    background: var(--lx-gray-100);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--lx-gray-700);
    font-weight: 600;
}
.lx-summary__body { padding: 14px 18px; font-size: 0.92rem; }
.lx-summary__line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid var(--lx-gray-100);
}
.lx-summary__line:last-child { border-bottom: 0; }
.lx-summary__line--total {
    border-top: 2px solid var(--lx-blue-700);
    margin-top: 8px;
    padding-top: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--lx-blue-900);
}

/* Mobile: collapse the two-column into a single stack, drop stickiness. */
@media (max-width: 780px) {
    .lx-order__cols { grid-template-columns: 1fr; }
    .lx-order__side { position: static; }
    .lx-steps { flex-wrap: wrap; }
    .lx-step  { flex: 1 1 50%; border-bottom: 1px solid var(--lx-gray-300); }
}

/* Simple form-row helper used by the contact form + other narrow forms.
   Label sits above the input, tight vertical rhythm. */
.lx-formrow {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}
.lx-formrow > label { font-weight: 500; font-size: 0.92rem; }
.lx-formrow > input,
.lx-formrow > select,
.lx-formrow > textarea { width: 100%; }
.lx-formgrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 640px) {
    .lx-formgrid { grid-template-columns: 1fr; }
}

