/* ============================================================================
   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: 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;
}
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;
}

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; }

/* ---- 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: block;
    padding: 8px 18px;
    color: var(--lx-gray-700);
    border: 0;
    font-size: 0.92rem;
    border-left: 3px solid transparent;
}
.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); }

/* ============================================================================
   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 {
    padding: 14px 22px;
    border-bottom: 1px solid var(--lx-gray-300);
    background: var(--lx-white);
    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; }
.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: 8px 12px;
    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);
}
.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; }

/* ----- <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: 9px 20px;
    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; }
.lx-btn--danger { background: var(--lx-red); border-color: var(--lx-red); }
.lx-btn--danger:hover { background: #962a23; border-color: #962a23; }

/* 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: 9px 20px;
    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; }

/* 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;
}
.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;
}

/* ============================================================================
   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; }

