/* =====================================================================
   4U Computer Solutions - Custom console theme (child of Nexus)
   ---------------------------------------------------------------------
   Upgrade-safe: this file overrides templates/nexus/css/custom.css.
   It re-maps Nexus's --primary palette (grey by default) to the 4U
   green->blue brand, and styles the custom footer.
   ===================================================================== */

/* Self-hosted Plus Jakarta Sans (variable font: one file per subset covers
   weights 400-800). latin-ext carries Maori macrons. Upgrade-safe, no CDN. */
@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../fonts/plus-jakarta-sans-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../fonts/plus-jakarta-sans-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    /* Make Jakarta the theme's base sans-serif everywhere */
    --font-family-sans-serif: 'Plus Jakarta Sans', 'Open Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --white: #fff;

    /* Neutral shades (unchanged from Nexus) */
    --neutral-50: #fbf9fa;
    --neutral-100: #f4f5f7;
    --neutral-200: #e4e4e7;
    --neutral-300: #d0d5dd;
    --neutral-400: #9ca3af;
    --neutral-500: #6b7280;
    --neutral-600: #4b5563;
    --neutral-700: #374151;
    --neutral-800: #1f2937;
    --neutral-900: #111827;
    --neutral-950: #030712;

    /* ---- 4U brand palette (sampled from the logo) ---- */
    --brand-green: #82bb54;
    --brand-blue:  #2f7eb1;
    --brand-blue-deep: #2c6a8f;
    --brand-gradient: linear-gradient(90deg, #82bb54 0%, #4a9c8c 45%, #2f7eb1 100%);

    /* Primary ramp = brand blue (replaces Nexus's neutral ramp) */
    --primary-50:  #eef6fb;
    --primary-100: #d6e9f4;
    --primary-200: #aed4e8;
    --primary-300: #7fbad9;
    --primary-400: #4f9cc4;
    --primary-500: #2f7eb1;
    --primary-600: #2c6a8f;
    --primary-700: #255574;
    --primary-800: #21485f;
    --primary-900: #1e3d50;
    --primary-950: #132734;

    /* Primary colors -> brand blue */
    --primary: var(--primary-500);
    --primary-lifted: var(--primary-600);
    --primary-accented: var(--primary-700);

    /* Secondary colors (unchanged) */
    --secondary: var(--neutral-500);
    --secondary-lifted: var(--neutral-600);
    --secondary-accented: var(--neutral-700);

    /* Semantic colors (unchanged from Nexus) */
    --success: #00a63e;
    --success-lifted: #008236;
    --success-accented: #016630;
    --info: #2f7eb1;
    --info-lifted: #2c6a8f;
    --info-accented: #255574;
    --notice: #7f22fe;
    --notice-lifted: #7008e7;
    --notice-accented: #5d0ec0;
    --warning: #f54a00;
    --warning-lifted: #ca3500;
    --warning-accented: #9f2d00;
    --error: #e7000b;
    --error-lifted: #c10007;
    --error-accented: #9f0712;

    --grayscale: var(--neutral-900);
    --grayscale-lifted: var(--neutral-800);
    --grayscale-accented: var(--neutral-700);

    --neutral: var(--neutral-500);
    --neutral-lifted: var(--neutral-600);
    --neutral-accented: var(--neutral-700);

    /* Text neutral colors */
    --text-inverted: var(--white);
    --text-muted: var(--neutral-400);
    --text-lifted: var(--neutral-500);
    --text-accented: var(--neutral-600);
    --text: var(--neutral-900);

    /* Border neutral colors */
    --border-muted: var(--neutral-200);
    --border: var(--neutral-300);
    --border-lifted: var(--neutral-400);
    --border-accented: var(--neutral-600);

    /* Background neutral colors */
    --ds-surface: #faf9f6;          /* soft off-white for raised surfaces (replaces pure #fff — warmer, less clinical) */
    --bg: var(--ds-surface);        /* cards, inputs, header, panels, form fields */
    --bg-muted: var(--neutral-50);
    --bg-lifted: #f1efe9;           /* warm page canvas (#main-body); was cool --neutral-100 #f4f5f7 */
    --bg-accented: var(--neutral-200);
    --bg-inverted: var(--neutral-900);

    /* Additional colors */
    --yellow-200: #fff085;
    --yellow-300: #ffdf20;
    --teal-300: #46edd5;
    --teal-400: #00d5be;
    --emerald-300: #5ee9b5;
    --pink-400: #fb64b6;

    /* Font sizes */
    --text-xs: 0.625rem;
    --text-sm: 0.75rem;
    --text-md: 0.875rem;
    --text-lg: 1rem;

    /* Spacing / outline */
    --outline-sm: 1px;
    --outline-md: 2px;
    --outline-lg: 3px;

    /* Rounding */
    --rounding-sm: 0.25rem;
    --rounding-md: 0.5rem;
    --rounding-lg: 0.75rem;

    --letter-spacing: 0em;
    --disabled-opacity: 25%;

    /* ---- Footer tokens ---- */
    --footer-bg: #13303f;
    --footer-bg-2: #0e2531;
    --footer-text: #9db4c2;
    --footer-heading: #ffffff;
    --footer-link: #c4d3dd;
    --footer-border: rgba(255, 255, 255, 0.09);

    /* ---- Design-system primitives (canonical; see consistent-styling rule) ---- */
    --ds-radius: 10px;          /* inputs, buttons, cards, alerts */
    --ds-radius-pill: 999px;    /* badges / pills */
    --ds-focus-ring: 0 0 0 3px rgba(47, 126, 177, 0.15);
    --ds-shadow-soft: 0 1px 2px rgba(16, 40, 60, 0.05), 0 8px 24px -14px rgba(16, 40, 60, 0.20);
    --ds-ctrl-h: 44px;          /* default input & button height */
    --ds-ctrl-h-lg: 48px;       /* auth-context controls (login/register/reset) */
    /* Shared select caret (single source; was duplicated per page) */
    --ds-caret: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%236b7280' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
}

/* =====================================================================
   4U DESIGN SYSTEM · COMPONENTS
   Reusable, brand-tokened components. Build once here, reuse everywhere
   (per the consistent-styling rule: no per-page one-offs).
   ===================================================================== */

/* ---- Alert / notice --------------------------------------------------
   Restyles Bootstrap .alert-* globally: clean surface + semantic left
   accent + icon + soft shadow. Because WHMCS emits these classes from
   core PHP, every system message adopts the look with no template edits.
   Icon = FontAwesome 6 Pro (already loaded by Nexus). */
.alert {
    position: relative;
    background: var(--bg, #fff);
    border: 1px solid var(--border-muted, #e4e4e7);
    border-left: 4px solid var(--neutral-400, #9ca3af);
    border-radius: var(--ds-radius);
    padding: 0.85rem 1rem 0.85rem 2.85rem;
    box-shadow: var(--ds-shadow-soft);
    color: var(--text, #111827);
    font-size: 0.9rem;
}
.alert::before {
    font-family: "Font Awesome 6 Pro", "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f05a"; /* circle-info (default) */
    position: absolute;
    left: 1rem;
    top: 0.92rem;
    font-size: 1.02rem;
    line-height: 1;
    color: var(--neutral-500, #6b7280);
}
/* If an alert already leads with its own icon, drop ours & reclaim space */
.alert:has(> i:first-child)::before,
.alert:has(> svg:first-child)::before { content: none; }
.alert:has(> i:first-child),
.alert:has(> svg:first-child) { padding-left: 1rem; }
/* Keep a dismiss (x) button clear of the text */
.alert.alert-dismissible { padding-right: 2.5rem; }

.alert-success { border-left-color: var(--success, #00a63e); background: rgba(0, 166, 62, 0.08); }
.alert-success::before { content: "\f058"; color: var(--success, #00a63e); } /* circle-check */

.alert-info,
.alert-block.alert-info { border-left-color: var(--brand-blue); background: rgba(47, 126, 177, 0.08); }
.alert-info::before { content: "\f05a"; color: var(--brand-blue); } /* circle-info */

.alert-warning { border-left-color: var(--warning, #f54a00); background: rgba(245, 74, 0, 0.07); }
.alert-warning::before { content: "\f071"; color: var(--warning, #f54a00); } /* triangle-exclamation */

.alert-danger,
.alert-error { border-left-color: var(--error, #e7000b); background: rgba(231, 0, 11, 0.06); }
.alert-danger::before,
.alert-error::before { content: "\f06a"; color: var(--error, #e7000b); } /* circle-exclamation */

/* ---- Buttons ---------------------------------------------------------
   Canonical shape for every Bootstrap .btn: 44px, 10px radius, weight
   600. Primary = brand blue; secondary/default/outline = white + border.
   Destructive/success keep their semantic fill (reshaped) as a signal.
   btn-sm stays compact for dense table row actions. Never btn-lg. */
.btn {
    border-radius: var(--ds-radius);
    font-weight: 600;
    min-height: var(--ds-ctrl-h);
    padding: 0.5rem 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.92rem;
    line-height: 1.2;
    box-shadow: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-sm,
.btn-group-sm > .btn { min-height: 36px; padding: 0.3rem 0.8rem; font-size: 0.82rem; }

.btn-primary {
    background: var(--brand-blue);
    border-color: var(--brand-blue);
    color: #fff;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: var(--brand-blue-deep);
    border-color: var(--brand-blue-deep);
    color: #fff;
}
.btn-secondary,
.btn-default,
.btn-outline-secondary,
.btn-light {
    background: var(--ds-surface);
    border-color: var(--border, #d0d5dd);
    color: var(--neutral-700, #374151);
}
.btn-secondary:hover,
.btn-default:hover,
.btn-outline-secondary:hover,
.btn-light:hover {
    background: var(--bg-lifted, #f4f5f7);
    border-color: var(--border-lifted, #9ca3af);
    color: var(--neutral-800, #1f2937);
}
.btn:focus,
.btn.focus { box-shadow: var(--ds-focus-ring); outline: none; }
/* Full-width block button (restore width after .btn became inline-flex) */
.btn-block { display: flex; width: 100%; }
/* Outline primary = brand blue outline that fills on hover */
.btn-outline-primary {
    background: transparent;
    border-color: var(--brand-blue);
    color: var(--brand-blue);
}
.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background: var(--brand-blue);
    border-color: var(--brand-blue);
    color: #fff;
}
/* Semantic buttons kept as signals (destructive = red, positive = green),
   tied to the theme's semantic tokens so they match alerts/badges. */
.btn-success {
    background: var(--success-lifted, #008236);
    border-color: var(--success-lifted, #008236);
    color: #fff;
}
.btn-success:hover,
.btn-success:focus,
.btn-success:active {
    background: var(--success-accented, #016630);
    border-color: var(--success-accented, #016630);
    color: #fff;
}
.btn-danger {
    background: var(--error-lifted, #c10007);
    border-color: var(--error-lifted, #c10007);
    color: #fff;
}
.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active {
    background: var(--error-accented, #9f0712);
    border-color: var(--error-accented, #9f0712);
    color: #fff;
}

/* ---- Inputs / selects / textareas -----------------------------------
   Canonical flat control: 44px, 10px radius, brand focus ring. Applies
   to Bootstrap .form-control/.custom-select and Nexus's .field pattern.
   Textareas + multi-selects grow; select carets are unified. */
.form-control,
.custom-select,
.field,
select.field {
    height: var(--ds-ctrl-h);
    border: 1px solid var(--border, #d0d5dd);
    border-radius: var(--ds-radius);
    box-shadow: none;
    font-size: 0.92rem;
    padding: 0 13px;
    background-color: var(--ds-surface);
    color: var(--text, #111827);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea.form-control,
textarea.field {
    height: auto;
    min-height: var(--ds-ctrl-h);
    padding: 10px 13px;
}
select[multiple].form-control,
select[size].form-control { height: auto; }

.form-control:focus,
.custom-select:focus,
.field:focus,
select.field:focus {
    border-color: var(--brand-blue);
    box-shadow: var(--ds-focus-ring);
    outline: none;
}

/* Unified dropdown caret on native selects (single source: --ds-caret) */
select.form-control,
select.custom-select,
.custom-select,
select.field {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: var(--ds-caret);
    background-repeat: no-repeat;
    background-position: right 13px center;
    padding-right: 36px;
}
select.form-control::-ms-expand,
.custom-select::-ms-expand { display: none; }

/* ---- Cards -----------------------------------------------------------
   Canonical panel: white surface, 1px muted border, 10px radius, soft
   shadow. Consistent body/header/footer padding. (Auth-form cards are
   deliberately flattened by the .login-split__form scope below.) */
.card {
    background: var(--bg, #fff);
    border: 1px solid var(--border-muted, #e4e4e7);
    border-radius: var(--ds-radius);
    box-shadow: var(--ds-shadow-soft);
}
.card-body { padding: 1.25rem 1.5rem; }
.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-muted, #e4e4e7);
    padding: 1rem 1.5rem;
    font-weight: 700;
    font-size: 1rem;
}
.card-footer {
    background: transparent;
    border-top: 1px solid var(--border-muted, #e4e4e7);
    padding: 1rem 1.5rem;
}
/* Section heading (canonical) */
.card-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.75rem; }

/* ---- Badges / status pills ------------------------------------------
   One pill for all of: Bootstrap .badge-*, BS3 .label-* MODIFIERS, and
   WHMCS .status / .status-* (service/invoice/domain/ticket/quote state).
   NB: bare .label is a form-label in WHMCS -> never styled here, only
   its colour modifiers. Colours grouped into 4 semantic tints + neutral;
   WHMCS assigns the right class per status. */
.badge,
.status,
.label-success, .label-danger, .label-info, .label-warning, .label-default {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    padding: 0.32em 0.75em;
    border-radius: var(--ds-radius-pill);
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
    vertical-align: middle;
}
/* green — positive / complete */
.badge-success, .label-success,
.status-active, .status-accepted, .status-completed, .status-delivered,
.status-paid, .status-closed {
    background: rgba(0, 166, 62, 0.12); color: var(--success, #00a63e);
}
/* red — negative / terminal */
.badge-danger, .label-danger,
.status-cancelled, .status-dead, .status-fraud, .status-lost,
.status-suspended, .status-terminated {
    background: rgba(231, 0, 11, 0.10); color: var(--error, #e7000b);
}
/* amber — attention / waiting */
.badge-warning, .label-warning,
.status-pending, .status-onhold, .status-grace, .status-collections,
.status-redemption, .status-unpaid, .status-expired, .status-customer {
    background: rgba(245, 74, 0, 0.12); color: var(--warning, #f54a00);
}
/* blue — open / in progress / info */
.badge-info, .badge-primary, .label-info,
.status-open, .status-answered, .status-inprogress, .status-payment,
.status-transferred {
    background: rgba(47, 126, 177, 0.12); color: var(--brand-blue);
}
/* neutral — grey */
.badge-secondary, .badge-dark, .badge-light, .label-default,
.status-refunded {
    background: rgba(107, 114, 128, 0.14); color: var(--neutral-600, #4b5563);
}

/* ---- Tables ----------------------------------------------------------
   Clean list table: uppercase muted header, hairline row separators
   (bottom-only, no heavy grid), subtle hover. Covers plain .table and
   WHMCS jQuery DataTables (which carry .table) incl. their search /
   length / info / pagination controls. */
.table {
    width: 100%;
    color: var(--text, #111827);
    margin-bottom: 1rem;
    background: transparent;
}
.table th,
.table td {
    padding: 0.75rem 0.9rem;
    vertical-align: middle;
    border-top: none;
    border-bottom: 1px solid var(--border-muted, #e4e4e7);
}
.table thead th {
    border-top: none;
    border-bottom: 1px solid var(--border, #d0d5dd);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-lifted, #6b7280);
    background: transparent;
    white-space: nowrap;
}
.table tbody tr:last-child td { border-bottom: none; }
.table-sm th,
.table-sm td { padding: 0.45rem 0.6rem; }
/* Subtle striping + hover (hover wins) */
.table-striped tbody tr:nth-of-type(odd) { background: var(--bg-muted, #fbf9fa); }
.table-hover tbody tr:hover,
.table.table-list tbody tr:hover { background: rgba(47, 126, 177, 0.05); }
/* Keep the full-grid variant intact where explicitly requested */
.table-bordered,
.table-bordered th,
.table-bordered td { border: 1px solid var(--border-muted, #e4e4e7); }

/* DataTables controls */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    height: var(--ds-ctrl-h);
    border: 1px solid var(--border, #d0d5dd);
    border-radius: var(--ds-radius);
    box-shadow: none;
    padding: 0 13px;
    font-size: 0.9rem;
    background-color: var(--ds-surface);
    color: var(--text, #111827);
}
.dataTables_wrapper .dataTables_length select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: var(--ds-caret);
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 34px;
}
.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus {
    border-color: var(--brand-blue);
    box-shadow: var(--ds-focus-ring);
    outline: none;
}
.dataTables_wrapper .dataTables_info { color: var(--text-lifted, #6b7280); font-size: 0.85rem; }

/* Pagination — DataTables default (.paginate_button) + Bootstrap (.page-link) */
.dataTables_paginate .paginate_button,
.pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.6rem;
    margin: 0 2px;
    border: 1px solid var(--border-muted, #e4e4e7);
    border-radius: 8px;
    background: var(--ds-surface);
    color: var(--text, #111827) !important;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    cursor: pointer;
}
.dataTables_paginate .paginate_button:hover,
.pagination .page-link:hover { background: var(--bg-lifted, #f4f5f7); }
.dataTables_paginate .paginate_button.current,
.dataTables_paginate .paginate_button.current:hover,
.pagination .page-item.active .page-link {
    background: var(--brand-blue);
    border-color: var(--brand-blue);
    color: #fff !important;
}
.dataTables_paginate .paginate_button.disabled,
.pagination .page-item.disabled .page-link { opacity: 0.5; cursor: default; }

/* ---- Header / navbar -------------------------------------------------
   Site chrome on every logged-in/interior page. Scoped under #header so
   it beats theme.min.css, and it TAMES the global .btn/.form-control/
   .badge components back to chrome-weight ghost styles. Thin brand
   gradient accent at the very top bookends the footer strip. */
#header {
    background: var(--bg, #fff);
    border-bottom: 1px solid var(--border-muted, #e4e4e7);
    box-shadow: 0 1px 3px rgba(16, 40, 60, 0.04);
}
#header::before {
    content: "";
    display: block;
    height: 3px;
    background: var(--brand-gradient);
}

/* Topbar (logged-in strip): compact, muted, ghost buttons */
#header .topbar {
    background: var(--bg-muted, #fbf9fa);
    border-bottom: 1px solid var(--border-muted, #e4e4e7);
    font-size: 0.82rem;
}
#header .topbar .btn {
    min-height: 0;
    height: 34px;
    padding: 0 0.6rem;
    font-size: 0.82rem;
    font-weight: 500;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-lifted, #6b7280);
    box-shadow: none;
}
#header .topbar .btn:hover { background: rgba(0, 0, 0, 0.04); color: var(--text, #111827); }
#header .topbar .input-group-text {
    background: transparent;
    border: none;
    color: var(--text-lifted, #6b7280);
    font-size: 0.82rem;
    padding-right: 0.4rem;
}
#header .topbar .btn-active-client { font-weight: 600; color: var(--brand-blue); }
#header .topbar .btn-return-to-admin { color: var(--warning, #f54a00); }

/* Brand row */
#header .navbar-brand { padding-top: 0; padding-bottom: 0; }
#header .navbar-brand img.logo-img { max-height: 42px; width: auto; }

/* Knowledgebase search -> one unified rounded control */
#header .input-group.search {
    border: 1px solid var(--border, #d0d5dd);
    border-radius: var(--ds-radius);
    overflow: hidden;
    background: var(--ds-surface);
}
#header .input-group.search .form-control {
    border: none;
    height: 40px;
    box-shadow: none;
    background: transparent;
}
#header .input-group.search .form-control:focus { box-shadow: none; }
#header .input-group.search .btn {
    min-height: 0;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text-lifted, #6b7280);
    border-radius: 0;
}
#header .input-group.search:focus-within {
    border-color: var(--brand-blue);
    box-shadow: var(--ds-focus-ring);
}

/* Cart + hamburger -> ghost icon buttons */
#header .navbar .toolbar .btn {
    min-height: 0;
    height: 40px;
    min-width: 40px;
    padding: 0 0.5rem;
    background: transparent;
    border: none;
    color: var(--neutral-700, #374151);
    border-radius: 8px;
    box-shadow: none;
    position: relative;
}
#header .navbar .toolbar .btn:hover { background: rgba(0, 0, 0, 0.04); color: var(--brand-blue); }
#header .cart-btn .badge {
    position: absolute;
    top: 3px;
    right: 1px;
    padding: 0.12em 0.42em;
    font-size: 0.62rem;
    background: var(--brand-blue);
    color: #fff;
}

/* Main nav */
#header .main-navbar-wrapper { border-top: 1px solid var(--border-muted, #e4e4e7); }
#header .main-navbar-wrapper .navbar-nav > li > a {
    display: block;
    padding: 0.7rem 0.9rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--neutral-700, #374151);
    border-bottom: 2px solid transparent;
    text-decoration: none;
    transition: color 0.15s ease;
}
#header .main-navbar-wrapper .navbar-nav > li > a:hover { color: var(--brand-blue); }
#header .main-navbar-wrapper .navbar-nav > li.active > a,
#header .main-navbar-wrapper .navbar-nav > li > a.active {
    color: var(--brand-blue);
    border-bottom-color: var(--brand-blue);
}

/* Dropdown menus (nav + account) */
#header .dropdown-menu {
    border: 1px solid var(--border-muted, #e4e4e7);
    border-radius: var(--ds-radius);
    box-shadow: var(--ds-shadow-soft);
    padding: 0.4rem;
    margin-top: 0.3rem;
}
#header .dropdown-menu > li.dropdown-item { padding: 0 !important; background: transparent !important; }
#header .dropdown-menu a {
    display: block;
    border-radius: 7px;
    padding: 0.5rem 0.7rem !important;
    font-size: 0.88rem;
    color: var(--neutral-700, #374151);
    text-decoration: none;
}
#header .dropdown-menu a:hover {
    background: rgba(47, 126, 177, 0.08);
    color: var(--brand-blue);
}
#header .dropdown-divider { border-color: var(--border-muted, #e4e4e7); margin: 0.3rem 0; }

/* ---- Dashboard: client-area home ------------------------------------
   Home panels (.card.card-accent-*) get ONE brand-blue top accent
   instead of Nexus's 21-colour rainbow, for a consistent dashboard.
   The landing-page action tiles (.action-icon-btns) become branded
   icon cards. */
.card[class*="card-accent-"] { border-top: 3px solid var(--brand-blue); }
.client-home-cards .card-footer {
    background: var(--bg-muted, #fbf9fa);
    font-size: 0.85rem;
}
.client-home-cards .card-header .card-title { margin: 0; font-size: 1.05rem; }

/* Landing-page action tiles */
.action-icon-btns a {
    border: 1px solid var(--border-muted, #e4e4e7);
    border-radius: var(--ds-radius);
    box-shadow: var(--ds-shadow-soft);
    padding: 1.35rem 0.75rem;
    color: var(--neutral-700, #374151);
    font-weight: 600;
    background: var(--ds-surface);
}
.action-icon-btns a:hover {
    color: var(--brand-blue);
    border-color: var(--brand-blue);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px -12px rgba(47, 126, 177, 0.45);
}
.action-icon-btns a .ico-container {
    width: 58px;
    height: 58px;
    margin: 0 auto 0.75rem;
    border-radius: 50%;
    background: rgba(47, 126, 177, 0.10);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 1.5rem;
    transition: background 0.15s ease;
}
.action-icon-btns a .ico-container i { color: var(--brand-blue); }
.action-icon-btns a:hover .ico-container {
    font-size: 1.5rem; /* cancel Nexus's icon zoom-on-hover */
    background: rgba(47, 126, 177, 0.18);
}

/* ---- Tabs / nav / list-group ----------------------------------------
   Flat underline tabs (matches the active-nav + domain-hero style),
   brand pills, and branded list-group secondary nav / KB lists. */
.nav-tabs {
    border-bottom: 1px solid var(--border, #d0d5dd);
    flex-wrap: wrap;
}
.nav-tabs .nav-item { margin-bottom: -1px; }
.nav-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 0.7rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-lifted, #6b7280);
    background: transparent;
}
.nav-tabs .nav-link:hover { color: var(--brand-blue); border-bottom-color: var(--border-lifted, #9ca3af); }
.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
    color: var(--brand-blue);
    background: transparent;
    border-color: transparent;
    border-bottom-color: var(--brand-blue);
}
.tab-content { padding-top: 1.25rem; }

/* Pills */
.nav-pills .nav-link {
    border-radius: var(--ds-radius);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-lifted, #6b7280);
    padding: 0.5rem 1rem;
}
.nav-pills .nav-link:hover:not(.active) { background: rgba(47, 126, 177, 0.08); color: var(--brand-blue); }
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link { background: var(--brand-blue); color: #fff; }

/* List-group (secondary nav / KB lists / tag filters) */
.list-group-item { border-color: var(--border-muted, #e4e4e7); color: var(--text, #111827); }
.list-group-item-action:hover,
.list-group-item-action:focus { background: var(--bg-muted, #fbf9fa); color: var(--brand-blue); }
.list-group-item.active {
    background: var(--brand-blue);
    border-color: var(--brand-blue);
    color: #fff;
}

/* ---- Client-area sidebar (secondary nav) ----------------------------
   Panels are .card.card-sidebar with .list-group-flush nav items, so the
   card + list-group components already cover most of it. This adds the
   sidebar item layout (icon / label / badge row), the collapse chevron,
   and white icons on the active (brand-blue) item. */
.card-sidebar .card-header { cursor: pointer; padding: 0.8rem 1.1rem; }
.card-sidebar .card-title { font-size: 0.95rem; }
.card-sidebar .card-minimise { font-size: 0.8rem; color: var(--text-muted, #9ca3af); }
.card-sidebar .list-group-item {
    padding: 0.6rem 1.1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--neutral-700, #374151);
}
.card-sidebar .list-group-item:last-child { border-bottom: none; }
.sidebar-menu-item-wrapper {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}
.sidebar-menu-item-icon-wrapper { flex: none; width: 1.2rem; text-align: center; }
.sidebar-menu-item-icon { color: var(--text-lifted, #6b7280); }
.sidebar-menu-item-label { flex: 1 1 auto; }
.sidebar-menu-item-badge { margin-left: auto; }
.card-sidebar .list-group-item-action:hover .sidebar-menu-item-icon { color: var(--brand-blue); }
/* Active sidebar item: brand-blue in every state. Needs to beat theme's
   grey .list-group-item-action:focus/:hover (the tab auto-focuses), so it
   carries -action + state selectors for the specificity. */
.card-sidebar .list-group-item-action.active,
.card-sidebar .list-group-item-action.active:hover,
.card-sidebar .list-group-item-action.active:focus {
    background: var(--brand-blue);
    border-color: var(--brand-blue);
    color: #fff;
    z-index: 2;
}
.card-sidebar .list-group-item.active .sidebar-menu-item-icon { color: #fff; }

/* ---- Modals ----------------------------------------------------------
   Consistent surface + rounding + soft depth for Bootstrap modals. */
.modal-content {
    background: var(--ds-surface);
    border: 1px solid var(--border-muted, #e4e4e7);
    border-radius: var(--ds-radius);
    box-shadow: 0 24px 64px -24px rgba(16, 40, 60, 0.45);
}
.modal-header,
.modal-footer { border-color: var(--border-muted, #e4e4e7); }
.modal-title { font-weight: 700; font-size: 1.05rem; }

/* ---- SSL report (live ipinfo.nz data in the SSL modal) -------------- */
.ssl-report { margin-top: 0.75rem; }
.ssl-report-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--brand-blue);
    text-decoration: none;
}
.ssl-report-link:hover { color: var(--brand-blue-deep); text-decoration: underline; }
.ssl-report-loading { padding: 2.5rem 0; text-align: center; color: var(--text-lifted, #6b7280); }
.ssl-report-grade {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.ssl-grade {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    border-radius: 8px;
    background: var(--brand-blue);
    color: #fff;
    font-weight: 800;
}
.ssl-grade--a { background: var(--success-lifted, #008236); }
.ssl-grade--b { background: var(--warning, #f54a00); }
.ssl-grade--f { background: var(--error, #e7000b); }
.ssl-report-h {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-lifted, #6b7280);
    margin: 1.25rem 0 0.5rem;
}
.ssl-san { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.82rem; color: var(--text-accented, #4b5563); word-break: break-all; margin: 0; }
.ssl-proto { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; }
.ssl-proto-item { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; font-weight: 600; }
.ssl-days { color: var(--text-lifted, #6b7280); font-weight: 500; }

/* ---- Registrar module custom pages -----------------------------------
   Synergy sub-pages (Domain Options / DNSSEC / Child Hosts / Email + DNS
   Forwarding) render module templates straight into .primary-content with
   no card. <html> gets .reg-module-page via the fourucs_head hook; card the
   content and normalise the module's BS3-era markup so it matches the tabs. */
.reg-module-page .primary-content {
    background: var(--ds-surface);
    border: 1px solid var(--border-muted, #e4e4e7);
    border-radius: var(--ds-radius);
    box-shadow: var(--ds-shadow-soft);
    padding: 1.5rem 1.75rem;
}
.reg-module-page .primary-content > h2:first-child,
.reg-module-page .primary-content > h1:first-child { margin-top: 0; }
.reg-module-page .primary-content h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 1.75rem 0 0.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-muted, #e4e4e7);
}
.reg-module-page .primary-content > h2:first-child { padding-top: 0; border-top: none; }
.reg-module-page .primary-content .textcenter,
.reg-module-page .primary-content center { text-align: center; }
.reg-module-page .primary-content center { display: block; }
/* BS3-era grid / label classes the module markup uses */
.reg-module-page .col-xs-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.reg-module-page .col-sm-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.reg-module-page .col-sm-offset-3 { margin-left: 25%; }
.reg-module-page .control-label { font-weight: 600; font-size: 0.85rem; color: var(--neutral-700, #374151); }
.reg-module-page .form-horizontal .form-group,
.reg-module-page .form-inline .form-group { margin-bottom: 1rem; }

/* ---- Support ticket: chat interface (viewticket) --------------------
   Staff replies left, the client's own replies right, as bubbles. The
   thread is column-reverse so newest-first $descreplies reads oldest-top
   / newest-bottom (nearest the composer). */
.ticket-chat { max-width: 920px; margin: 0 auto; }
.ticket-chat__head { margin-bottom: 1rem; }
.ticket-chat__headmain { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.ticket-chat__eyebrow { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-lifted, #6b7280); }
.ticket-chat__subject { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.01em; margin: 0.2rem 0 0.6rem; line-height: 1.2; }
/* WHMCS wraps $status in an inline-coloured span; neutralise it so the pill
   uses our consistent status colours (open = blue, closed = green). */
.ticket-chat__headinfo .status span { color: inherit !important; font: inherit; }
.ticket-chat__actions { display: flex; gap: 0.5rem; flex-wrap: wrap; flex: none; }

.chat-thread {
    display: flex;
    flex-direction: column-reverse;
    gap: 1.4rem;
    padding: 0.5rem 0 1.75rem;
}
.chat-msg { display: flex; gap: 0.75rem; align-items: flex-start; }
.chat-msg--client { flex-direction: row-reverse; }
.chat-avatar {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
    margin-top: 1.4rem;
}
.chat-msg--staff .chat-avatar { background: var(--brand-blue); }
.chat-msg--client .chat-avatar { background: var(--brand-green); }
.chat-col { display: flex; flex-direction: column; min-width: 0; max-width: 80%; }
.chat-msg--client .chat-col { align-items: flex-end; }
.chat-meta { display: flex; align-items: center; gap: 0.5rem; font-size: 0.78rem; margin-bottom: 0.35rem; flex-wrap: wrap; }
.chat-msg--client .chat-meta { flex-direction: row-reverse; }
.chat-name { font-weight: 700; color: var(--text, #111827); }
.chat-date { color: var(--text-muted, #9ca3af); }

.chat-bubble {
    background: var(--ds-surface);
    border: 1px solid var(--border-muted, #e4e4e7);
    border-radius: 14px;
    padding: 0.85rem 1.05rem;
    font-size: 0.92rem;
    color: var(--text, #111827);
    box-shadow: var(--ds-shadow-soft);
    overflow-wrap: anywhere;
}
.chat-msg--staff .chat-bubble { border-top-left-radius: 4px; }
.chat-msg--client .chat-bubble {
    background: var(--brand-blue);
    border-color: var(--brand-blue);
    color: #fff;
    border-top-right-radius: 4px;
}
.chat-msg--client .chat-bubble a { color: #fff; text-decoration: underline; }
.chat-bubble > p:last-child,
.chat-bubble > :last-child { margin-bottom: 0; }
.chat-ip { margin-top: 0.6rem; padding-top: 0.5rem; border-top: 1px solid rgba(0, 0, 0, 0.08); font-size: 0.76rem; opacity: 0.85; }
.chat-msg--client .chat-ip { border-top-color: rgba(255, 255, 255, 0.25); }

/* Requestor badge (owner / operator / cc) */
.requestor-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--ds-radius-pill);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    background: var(--bg-lifted, #f1efe9);
    color: var(--text-lifted, #6b7280);
}
.requestor-badge.requestor-type-operator,
.requestor-badge.requestor-type-admin { background: rgba(47, 126, 177, 0.12); color: var(--brand-blue); }

/* Attachment chips */
.chat-attachments { margin-top: 0.5rem; }
.chat-msg--client .chat-attachments { display: flex; flex-direction: column; align-items: flex-end; }
.chat-attachments__label { font-size: 0.75rem; font-weight: 600; color: var(--text-lifted, #6b7280); margin-bottom: 0.35rem; }
.chat-attachments .attachment-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.attachment-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--border-muted, #e4e4e7);
    border-radius: 999px;
    background: var(--ds-surface);
    color: var(--text, #111827);
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    max-width: 260px;
}
.attachment-chip .caption { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-chip:hover { border-color: var(--brand-blue); color: var(--brand-blue); }
.attachment-chip.is-removed { opacity: 0.6; }

.chat-rating { margin-top: 0.4rem; }
.chat-rating .rated { font-size: 0.78rem; color: var(--text-lifted, #6b7280); }

.ticket-composer { margin-top: 1rem; }
.ticket-composer__actions { display: flex; gap: 0.6rem; margin-bottom: 0; }

@media (max-width: 575.98px) {
    .chat-col { max-width: 86%; }
    .ticket-chat__actions { width: 100%; }
}

/* =====================================================================
   Modern cloud footer
   ===================================================================== */
#footer.footer-4u {
    margin-top: 3rem;
    padding: 0;
    background: linear-gradient(180deg, var(--footer-bg) 0%, var(--footer-bg-2) 100%);
    color: var(--footer-text);
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Brand gradient accent strip along the very top of the footer */
#footer.footer-4u .footer-accent {
    height: 4px;
    width: 100%;
    background: var(--brand-gradient);
}

#footer.footer-4u .container {
    padding-top: 2.75rem;
    padding-bottom: 0;
}

/* Main columns */
#footer.footer-4u .footer-main {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem 1.5rem;
    padding-bottom: 2.25rem;
}
#footer.footer-4u .footer-col-brand {
    flex: 1 1 280px;
    min-width: 240px;
    max-width: 360px;
}
#footer.footer-4u .footer-col {
    flex: 1 1 150px;
    min-width: 140px;
}

/* Brand wordmark */
#footer.footer-4u .footer-wordmark {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
    margin: 0 0 0.75rem;
}
#footer.footer-4u .footer-wordmark .fu {
    color: var(--brand-green);
}
#footer.footer-4u .footer-tagline {
    color: var(--footer-text);
    margin: 0 0 1.1rem;
    max-width: 30ch;
}

/* Contact list */
#footer.footer-4u .footer-contact {
    list-style: none;
    padding: 0;
    margin: 0 0 1.1rem;
}
#footer.footer-4u .footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
}
#footer.footer-4u .footer-contact i {
    color: var(--brand-green);
    margin-top: 0.2rem;
    width: 1rem;
    text-align: center;
}
#footer.footer-4u .footer-contact a {
    color: var(--footer-link);
    text-decoration: none;
}
#footer.footer-4u .footer-contact a:hover {
    color: #fff;
}

/* Column headings */
#footer.footer-4u .footer-col h6 {
    color: var(--footer-heading);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 0.9rem;
}
#footer.footer-4u .footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
#footer.footer-4u .footer-col li {
    margin-bottom: 0.55rem;
}
#footer.footer-4u .footer-col a {
    color: var(--footer-link);
    text-decoration: none;
    transition: color 0.15s ease, padding-left 0.15s ease;
}
#footer.footer-4u .footer-col a:hover {
    color: var(--brand-green);
    padding-left: 3px;
}

/* Social icons */
#footer.footer-4u .footer-social {
    display: flex;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
    list-style: none;
}
#footer.footer-4u .footer-social a,
#footer.footer-4u .footer-social .list-inline-item a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.15s ease;
}
#footer.footer-4u .footer-social a:hover {
    background: var(--brand-gradient);
    transform: translateY(-2px);
}

/* Bottom bar */
#footer.footer-4u .footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1.1rem 0 1.4rem;
    border-top: 1px solid var(--footer-border);
}
#footer.footer-4u .footer-bottom .copyright {
    margin: 0;
    color: var(--footer-text);
    font-size: 0.8rem;
}
#footer.footer-4u .footer-bottom-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
#footer.footer-4u .footer-bottom-links a {
    color: var(--footer-link);
    text-decoration: none;
    font-size: 0.8rem;
}
#footer.footer-4u .footer-bottom-links a:hover {
    color: #fff;
}
#footer.footer-4u .footer-lang-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--footer-border);
    color: #fff;
    border-radius: 999px;
    padding: 0.3rem 0.85rem;
    font-size: 0.78rem;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
#footer.footer-4u .footer-lang-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

@media (max-width: 575.98px) {
    #footer.footer-4u .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =====================================================================
   Global typography - Plus Jakarta Sans (self-hosted @font-face above)
   ===================================================================== */
body,
.btn,
input,
select,
textarea,
.navbar,
h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', 'Open Sans', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* =====================================================================
   Split-screen login page (flat, modern)
   Chrome (header/breadcrumb/footer) is hidden only when the split layout
   is on the page, using :has() - no header.tpl override required.
   ===================================================================== */
body:has(.login-split) {
    margin: 0;
    background: var(--ds-surface);
}
body:has(.login-split) #header,
body:has(.login-split) .master-breadcrumb,
body:has(.login-split) .network-issues-notifications,
body:has(.login-split) #footer {
    display: none !important;
}
body:has(.login-split) #main-body {
    padding: 0 !important;
    margin: 0 !important;
}
body:has(.login-split) #main-body > .container {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
body:has(.login-split) #main-body > .container > .row {
    margin: 0 !important;
}
/* Hide the client-area sidebar column (e.g. "Already Registered?" on register)
   and let the split layout take the full width. */
body:has(.login-split) #main-body > .container > .row > .col-lg-4 {
    display: none !important;
}
body:has(.login-split) #main-body .primary-content {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
}

.login-split {
    display: flex;
    min-height: 100vh;
    width: 100%;
}
.login-split__form {
    flex: 0 0 44%;
    max-width: 640px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 4.5rem;
    background: var(--ds-surface);
}
.login-split__hero {
    flex: 1 1 56%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}
.login-split__hero::after {
    content: "";
    position: absolute;
    inset: 0;
    /* Neutral dark overlay for depth + contrast */
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.45) 100%);
}

.login-card {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}
.login-logo {
    display: inline-block;
    margin-bottom: 2.25rem;
}
.login-logo img {
    max-height: 46px;
    width: auto;
}
.login-wordmark {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1f2937;
    letter-spacing: -0.02em;
}
.login-wordmark .fu {
    color: var(--brand-green);
}
.login-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.35rem;
}
.login-subtitle {
    color: #6b7280;
    margin: 0 0 2rem;
    font-size: 0.95rem;
}

.login-form .form-group {
    margin-bottom: 1.15rem;
}
.login-form label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.4rem;
}
.login-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.login-forgot {
    font-size: 0.8rem;
    color: var(--brand-blue);
    text-decoration: none;
    font-weight: 500;
}
.login-forgot:hover {
    text-decoration: underline;
}
.login-form .form-control {
    width: 100%;
    height: 48px;
    border: 1px solid var(--border, #d0d5dd);
    border-radius: 10px;
    padding: 0 14px;
    font-size: 0.95rem;
    background: var(--ds-surface);
    box-shadow: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.login-form .form-control:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(47, 126, 177, 0.15);
    outline: none;
}
.login-remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #4b5563;
    font-weight: 500;
    margin: 0.25rem 0 1.5rem;
}
.login-remember input {
    position: static;
    margin: 0;
    width: auto;
    flex: 0 0 auto;
}
.btn-login {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 10px;
    background: var(--brand-blue);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.15s ease, transform 0.05s ease;
}
.btn-login:hover {
    background: var(--brand-blue-deep);
    color: #fff;
}
.btn-login:active {
    transform: translateY(1px);
}
.login-register {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: #6b7280;
}
.login-register a {
    color: var(--brand-blue);
    font-weight: 600;
    text-decoration: none;
    margin-left: 0.25rem;
}
.login-copyright {
    margin-top: 2rem;
    font-size: 0.75rem;
    color: #9ca3af;
}
.login-form .g-recaptcha,
.login-card .captcha {
    margin-bottom: 1.25rem;
}

@media (max-width: 991.98px) {
    .login-split__hero {
        display: none;
    }
    .login-split__form {
        flex: 1 1 100%;
        max-width: none;
        padding: 2.5rem 1.5rem;
    }
}

/* ---- Generalise the flat form styling to the whole panel (login + reset) ---- */
.login-split__form .form-group {
    margin-bottom: 1.15rem;
}
.login-split__form label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.4rem;
}
.login-split__form .form-control {
    width: 100%;
    height: 48px;
    border: 1px solid var(--border, #d0d5dd);
    border-radius: 10px;
    padding: 0 14px;
    font-size: 0.95rem;
    background: var(--ds-surface);
    box-shadow: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.login-split__form .form-control:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(47, 126, 177, 0.15);
    outline: none;
}
/* Flatten Nexus input-group-merge (icon prepend) inside the panel */
.login-split__form .input-group-prepend,
.login-split__form .input-group-append {
    display: none;
}
.login-split__form .input-group .form-control {
    border-radius: 10px;
}
/* Full-width flat brand button for reset steps (login uses .btn-login) */
.login-split__form .btn-primary {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 10px;
    background: var(--brand-blue);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
}
.login-split__form .btn-primary:hover {
    background: var(--brand-blue-deep);
    color: #fff;
}
/* Reset-step headings to match the login title */
.login-split__form .h3 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.35rem;
}
.login-split__form .mb-4 {
    margin-bottom: 1.75rem !important;
}

/* =====================================================================
   Wide split layout for the register page (long, multi-section form):
   sticky hero, form scrolls inside its own panel.
   ===================================================================== */
.login-split--wide {
    height: 100vh;
    overflow: hidden;
}
.login-split--wide .login-split__form {
    flex: 0 0 60%;
    max-width: 880px;
    height: 100vh;
    overflow-y: auto;
    justify-content: flex-start;
    padding-top: 3rem;
    padding-bottom: 3rem;
}
.login-card--wide {
    max-width: 760px;
}
.login-split__form .subtitle {
    color: #6b7280;
    margin: 0 0 2rem;
    font-size: 0.95rem;
}

/* Flatten the register cards into clean titled sections */
.login-split__form .card {
    border: none;
    box-shadow: none;
    background: transparent;
    margin-bottom: 1.75rem;
}
.login-split__form .card-body {
    padding: 0 !important;
}
.login-split__form .card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border-muted, #e4e4e7);
}
.login-split__form .card-title small {
    font-weight: 500;
    color: #6b7280;
}

/* Tighter, consistent grid gutters inside the panel */
.login-split__form .row {
    margin-left: -8px;
    margin-right: -8px;
}
.login-split__form [class*="col-"] {
    padding-left: 8px;
    padding-right: 8px;
}

/* Flat inputs/selects for the register .field pattern; icons hidden */
.login-split__form .field-icon {
    display: none !important;
}
.login-split__form .field,
.login-split__form select.field {
    width: 100%;
    height: var(--ds-ctrl-h-lg); /* auth-context size (was ad-hoc 46px) */
    border: 1px solid var(--border, #d0d5dd);
    border-radius: var(--ds-radius);
    padding: 0 14px !important;
    font-size: 0.9rem;
    background: var(--ds-surface);
    box-shadow: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.login-split__form textarea.field {
    height: auto;
    padding: 10px 14px !important;
}
.login-split__form .field:focus,
.login-split__form select.field:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(47, 126, 177, 0.15);
    outline: none;
}
.login-split__form .form-group {
    margin-bottom: 1rem;
}
.login-split__form label:not(.field-icon):not(.form-check):not(.form-check-label) {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.4rem;
}
.login-split__form .field-help-text {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Register submit = full-width flat brand (btn-lg) */
.login-split--wide .login-split__form .btn-primary {
    width: 100%;
    height: var(--ds-ctrl-h-lg); /* auth CTA size (was ad-hoc 50px) */
    font-size: 1rem;
}
/* Secondary buttons (e.g. generate password) */
.login-split__form .btn-default {
    border: 1px solid var(--border, #d0d5dd);
    background: var(--ds-surface);
    color: #374151;
    border-radius: 8px;
}
.login-split__form .btn-default:hover {
    background: #f4f5f7;
}

@media (max-width: 991.98px) {
    .login-split--wide {
        height: auto;
        overflow: visible;
    }
    .login-split--wide .login-split__form {
        height: auto;
        overflow: visible;
        flex: 1 1 100%;
        max-width: none;
    }
}

/* =====================================================================
   Create-account 3-step wizard (Personal / Billing / Security)
   ===================================================================== */
.reg-steps {
    list-style: none;
    display: flex;
    padding: 0;
    margin: 0 0 2rem;
}
.reg-step-ind {
    flex: 1 1 0;
    text-align: center;
    position: relative;
    color: #9ca3af;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
}
.reg-step-ind .num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: 0 auto 0.45rem;
    border-radius: 50%;
    background: var(--ds-surface);
    border: 2px solid var(--border, #d0d5dd);
    color: #9ca3af;
    font-size: 0.85rem;
    position: relative;
    z-index: 1;
    transition: all 0.2s ease;
}
.reg-step-ind .lbl {
    display: block;
    padding: 0 4px;
}
.reg-step-ind::before {
    content: "";
    position: absolute;
    top: 17px;
    right: 50%;
    width: 100%;
    height: 2px;
    background: var(--border-muted, #e4e4e7);
    z-index: 0;
}
.reg-step-ind:first-child::before {
    display: none;
}
.reg-step-ind.is-active {
    color: var(--brand-blue);
}
.reg-step-ind.is-active .num,
.reg-step-ind.is-done .num {
    border-color: var(--brand-blue);
    background: var(--brand-blue);
    color: #fff;
}
.reg-step-ind.is-done {
    color: var(--brand-blue-deep);
    cursor: pointer;
}
.reg-step-ind.is-active::before,
.reg-step-ind.is-done::before {
    background: var(--brand-blue);
}

.reg-step {
    display: none;
}
.reg-step.is-active {
    display: block;
}
@keyframes regEnterRight {
    from { opacity: 0; transform: translateX(26px); }
    to   { opacity: 1; transform: none; }
}
@keyframes regEnterLeft {
    from { opacity: 0; transform: translateX(-26px); }
    to   { opacity: 1; transform: none; }
}
.reg-step.reg-enter-right { animation: regEnterRight 0.28s ease both; }
.reg-step.reg-enter-left  { animation: regEnterLeft 0.28s ease both; }

.reg-step-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 1.25rem;
}
.reg-subsection {
    font-size: 0.95rem;
    font-weight: 700;
    color: #111827;
    margin: 1.5rem 0 1rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-muted, #e4e4e7);
}
.reg-marketing { margin-top: 1.5rem; }
.reg-tos { margin-top: 1.25rem; font-size: 0.85rem; color: #4b5563; }
.reg-step .g-recaptcha,
.reg-step .captcha { margin: 1.25rem 0; }

.reg-nav {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.75rem;
}
.reg-nav .reg-back {
    background: var(--ds-surface);
    border: 1px solid var(--border, #d0d5dd);
    color: #374151;
    border-radius: 10px;
    height: 48px;
    padding: 0 22px;
    font-weight: 600;
    font-size: 0.95rem;
}
.reg-nav .reg-back:hover { background: #f4f5f7; }
.login-split--wide .reg-nav .btn-primary {
    flex: 1 1 auto;
    width: auto;
    height: 48px;
}

/* Custom dropdown caret on all selects in the login/register panel
   (country, region, currency, etc.) so they clearly read as dropdowns. */
.login-split__form select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: var(--ds-caret);
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px !important;
}
.login-split__form select::-ms-expand {
    display: none;
}

/* =====================================================================
   Domain details - Overview broken into digestible chunks
   ===================================================================== */
#tabOverview > .card {
    margin-bottom: 1.25rem;
}
.domain-hero .card-body {
    padding: 1.25rem 1.5rem;
}
.domain-hero__main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.domain-hero__label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted, #9ca3af);
}
.domain-hero__name {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0.15rem 0 0;
    line-height: 1.2;
}
.domain-hero__name a {
    color: var(--text, #111827);
    text-decoration: none;
}
.domain-hero__name a:hover {
    color: var(--brand-blue);
}
.domain-hero__status .label,
.domain-hero__status .status {
    font-size: 0.85rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.25rem 1.75rem;
}
.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border-muted, #e4e4e7);
}
.detail-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted, #9ca3af);
}
.detail-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text, #111827);
}

.domain-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.domain-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

/* =====================================================================
   Domain management tabs - tidy & consistent (scoped to .domain-manage).
   Covers base tabs (Auto Renew / Nameservers / Registrar Lock / Release)
   AND the Synergy registrar module output (EPP / Contacts / Child Hosts /
   DNSSEC / Domain Options), without editing module files.
   ===================================================================== */
/* Inputs, selects, card-title and button shape now inherit the global DS
   components (§ Design System). Only the deliberate toggle-panel colour
   override below remains domain-specific. */
.domain-manage .btn-primary,
.domain-manage .btn-success,
.domain-manage .btn-danger {
    background: var(--brand-blue);
    border-color: var(--brand-blue);
    color: #fff;
}
.domain-manage .btn-primary:hover,
.domain-manage .btn-success:hover,
.domain-manage .btn-danger:hover {
    background: var(--brand-blue-deep);
    border-color: var(--brand-blue-deep);
    color: #fff;
}

/* Form rows / labels */
.domain-manage .form-group { margin-bottom: 1rem; }
.domain-manage .form-group.row { align-items: center; }
.domain-manage .col-form-label { font-weight: 600; font-size: 0.85rem; color: #374151; }

/* Status pills now inherit the global badges/status component (§ Design System). */

/* Registrar module (Synergy) output - normalise Bootstrap-3-era markup */
.domain-manage .moduleoutput { margin-top: 0.5rem; }
.domain-manage .moduleoutput .btn { margin: 0 0.35rem 0.5rem 0; }
.domain-manage .moduleoutput .form-horizontal .form-group,
.domain-manage .moduleoutput .form-inline .form-group { margin-bottom: 0.85rem; }
/* BS3 grid classes the module uses (absent in Nexus's BS4) - minimal in-scope polyfill */
.domain-manage .col-xs-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.domain-manage .col-sm-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.domain-manage .col-sm-offset-3 { margin-left: 25%; }
.domain-manage .textcenter { text-align: center; }
/* Synergy sw-* row tables */
.domain-manage .sw-row-table .row { padding: 0.5rem 0; margin: 0; border-bottom: 1px solid var(--border-muted, #e4e4e7); }
.domain-manage .sw-row-table .row:not(#sw-heading):nth-child(even) { background: var(--bg-muted, #fbf9fa); }
.domain-manage .sw-table-form input,
.domain-manage .sw-table-form select { height: 40px; }

/* Domain contact-info form: inputs, selects and buttons inherit the global
   DS components; only the label sizing is specific to this form. */
#frmDomainContactModification .form-group > label {
    font-weight: 600;
    font-size: 0.82rem;
    color: #374151;
}

/* =====================================================================
   Reusable enable/disable panel: status line + badge (Auto Renew,
   Registrar Lock, and any future toggle). One consistent pattern.
   ===================================================================== */
.toggle-status {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
    color: var(--neutral-700, #374151);
}
.toggle-status__label { font-weight: 600; }
.badge-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.4;
}
.badge-status--on { background: rgba(0, 166, 62, 0.12); color: var(--success, #00a63e); }
.badge-status--off { background: rgba(107, 114, 128, 0.14); color: var(--neutral-500, #6b7280); }

/* intl-tel-input phone fields: keep the number clear of the flag / dial code
   (applies wherever a phone field is used - register + domain contacts). */
.iti input.form-control,
.iti input.field {
    padding-left: 52px !important;
}
.iti--separate-dial-code input.form-control,
.iti--separate-dial-code input.field {
    padding-left: 92px !important;
}
