/* =====================================================================
   NOVA — Modern WHMCS Client Area Theme
   ---------------------------------------------------------------------
   This stylesheet is the primary visual layer of the Nova theme. It is
   loaded automatically by includes/head.tpl (WHMCS looks for
   css/custom.css on every system theme) and is applied on top of the
   original Six theme markup/CSS. A handful of .tpl files (header,
   footer, clientareahome, login) were lightly restructured to support
   the app-shell sidebar and the split-screen login — every other
   template in the theme is untouched Six markup, styled entirely
   through the generic component rules below (panels, tables, tabs,
   list-groups, badges, forms, alerts) so the ~170 other page templates
   inherit the same look without per-page edits.

   Table of contents:
     1.  Design tokens (colors, radius, shadows, spacing)
     2.  Base / reset / typography
     3.  Top bar (#header)
     4.  Primary navigation (#main-menu)
     5.  Homepage hero + quick links
     6.  Buttons
     7.  Forms
     8.  Cards / panels
     9.  Sidebar navigation
     10. Dashboard stat tiles
     11. Tables & DataTables
     12. Status badges / labels
     13. Alerts & flash messages
     14. Login / register / password reset
     15. Page headers & breadcrumbs
     16. Modals & popovers
     17. Footer
     18. Misc utilities
     19. Responsive tweaks
     20. Scrollbar & selection
     21. Content pages — KB / Downloads / Store cart / Tickets / Account
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---------------------------------------------------------------------
   1. Design tokens — mirrors the Aksoy Software brand system
   (shared 1:1 with aksoysoftware.com and the AksoySoft WiseCP theme:
   primary #938be6 / accent #7debd4 / Inter typeface)
   ------------------------------------------------------------------- */
:root {
    --nova-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --nova-font-display: var(--nova-font);

    /* Brand */
    --nova-primary: #938be6;
    --nova-primary-dark: #7d74d6;
    --nova-primary-darker: #655bc4;
    --nova-primary-light: #f4f3ff;
    --nova-accent: #7debd4;

    --nova-gradient: linear-gradient(135deg, #938be6 0%, #7debd4 100%);
    --nova-gradient-hero: linear-gradient(135deg, #f8f7ff 0%, #ffffff 55%, #f0fdf9 100%);
    --nova-gradient-dark: linear-gradient(135deg, #1a1a2e 0%, #2d2b55 50%, #1a1a2e 100%);

    /* Neutrals */
    --nova-ink: #1a1a2e;
    --nova-body: #334155;
    --nova-muted: #64748b;
    --nova-faint: #94a3b8;
    --nova-border: #e2e8f0;
    --nova-border-strong: #d7dbe6;
    --nova-bg: #f8f9ff;
    --nova-surface: #ffffff;
    --nova-surface-alt: #f8f7ff;

    /* Status */
    --nova-success: #22c55e;
    --nova-success-bg: #ecfdf5;
    --nova-warning: #f59e0b;
    --nova-warning-bg: #fffbeb;
    --nova-danger: #ef4444;
    --nova-danger-bg: #fef2f2;
    --nova-info: #32abe1;
    --nova-info-bg: #eaf6fc;
    --nova-neutral-bg: #f1f5f9;

    /* Elevation — matches the AksoySoft shadow scale */
    --nova-shadow-xs: 0 2px 8px rgba(15, 16, 32, 0.04);
    --nova-shadow-sm: 0 2px 8px rgba(15, 16, 32, 0.05);
    --nova-shadow-md: 0 8px 24px rgba(15, 16, 32, 0.08);
    --nova-shadow-lg: 0 18px 50px rgba(15, 16, 32, 0.12);
    --nova-shadow-xl: 0 30px 80px rgba(147, 139, 230, 0.22);
    --nova-shadow-primary: 0 8px 24px rgba(147, 139, 230, 0.32);
    --nova-shadow-primary-hover: 0 14px 34px rgba(147, 139, 230, 0.45);

    /* Shape */
    --nova-radius-sm: 8px;
    --nova-radius-md: 12px;
    --nova-radius-lg: 16px;
    --nova-radius-xl: 24px;
    --nova-radius-pill: 999px;

    --nova-transition: 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------------------------------------------------------------------
   2. Base / reset / typography
   ------------------------------------------------------------------- */
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
    font-family: var(--nova-font);
    background-color: var(--nova-bg) !important;
    color: var(--nova-body);
    font-size: 14.5px;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--nova-font-display);
    color: var(--nova-ink);
    font-weight: 600;
    letter-spacing: -0.01em;
}

a { color: var(--nova-primary); }
a:hover, a:focus { color: var(--nova-primary-dark); }

::selection { background: var(--nova-primary); color: #fff; }

hr { border-top-color: var(--nova-border); }

.container { max-width: 1240px; }

/* ---------------------------------------------------------------------
   3. Top bar (#header)
   ------------------------------------------------------------------- */
#header {
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(15, 16, 32, 0.06);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 1030;
}

#header .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; }

#header .logo,
#header .logo.logo-text {
    font-family: var(--nova-font-display);
    font-weight: 700;
    font-size: 21px;
    color: var(--nova-ink);
    letter-spacing: -0.02em;
    order: 1;
}

#header .logo img { display: block; height: 38px; width: auto; max-width: 220px; }

#header .top-nav {
    order: 2;
    display: flex;
    align-items: center;
    gap: 4px;
    /* auto left margin keeps the utility menu pinned to the right edge */
    margin: 0 0 0 auto;
    float: none;
}

#header .top-nav > li { float: none; display: flex; }

#header .top-nav > li > a {
    color: var(--nova-muted);
    font-weight: 500;
    font-size: 13.5px;
    padding: 9px 14px;
    border-radius: var(--nova-radius-pill);
    transition: background-color .15s ease, color .15s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

#header .top-nav > li > a:hover,
#header .top-nav > li > a:focus {
    background-color: var(--nova-surface-alt);
    color: var(--nova-ink);
    text-decoration: none;
}

#header .top-nav > li.primary-action > a.btn {
    background: var(--nova-gradient);
    color: #fff !important;
    font-weight: 600;
    padding: 9px 20px;
    box-shadow: var(--nova-shadow-sm);
}

#header .top-nav > li.primary-action > a.btn:hover { filter: brightness(1.06); }

#header .top-nav .btn-logged-in-admin {
    background: var(--nova-warning-bg);
    color: var(--nova-warning) !important;
}

#header .top-nav .label.label-info {
    background: var(--nova-danger);
    border-radius: var(--nova-radius-pill);
    font-size: 10px;
    padding: 2px 6px;
    vertical-align: top;
}

#languageChooserContent,
#accountNotificationsContent {
    background: var(--nova-surface);
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-radius-md);
    box-shadow: var(--nova-shadow-md);
    padding: 6px;
    min-width: 260px;
}

#languageChooserContent ul,
#accountNotificationsContent ul { margin: 0; padding: 0; list-style: none; }

#languageChooserContent li a,
#accountNotificationsContent li a {
    display: block;
    padding: 8px 12px;
    border-radius: var(--nova-radius-sm);
    color: var(--nova-body);
}

#languageChooserContent li a:hover,
#accountNotificationsContent li a:hover {
    background: var(--nova-surface-alt);
    text-decoration: none;
}

#accountNotificationsContent .client-alerts li a { display: flex; gap: 10px; align-items: flex-start; }
#accountNotificationsContent .client-alerts li.none { padding: 14px 12px; color: var(--nova-faint); text-align: center; }
#accountNotificationsContent .message { font-size: 13px; }

/* ---------------------------------------------------------------------
   4. Primary navigation (#main-menu)
   ------------------------------------------------------------------- */
#main-menu {
    background: var(--nova-surface) !important;
    border-bottom: 1px solid var(--nova-border);
}

#main-menu .navbar.navbar-main {
    background: transparent;
    border: none;
    margin-bottom: 0;
    min-height: auto;
}

#main-menu .navbar-nav { display: flex; align-items: center; }

#main-menu .navbar-nav > li > a {
    color: var(--nova-muted);
    font-weight: 500;
    font-size: 14px;
    padding: 14px 16px;
    border-radius: 0;
    position: relative;
    transition: color .15s ease;
}

#main-menu .navbar-nav > li > a:hover,
#main-menu .navbar-nav > li > a:focus,
.navbar-main .navbar-nav > li > a:hover,
.navbar-main .navbar-nav > li > a:focus {
    background: transparent !important;
    color: var(--nova-primary) !important;
}

#main-menu .navbar-nav > li.active > a,
#main-menu .navbar-nav > li > a.active,
.navbar-main .navbar-nav > .active > a,
.navbar-main .navbar-nav > .active > a:hover,
.navbar-main .navbar-nav > .active > a:focus,
.navbar-main .navbar-nav > .open > a,
.navbar-main .navbar-nav > .open > a:hover,
.navbar-main .navbar-nav > .open > a:focus {
    background: transparent !important;
    color: var(--nova-primary) !important;
}

#main-menu .navbar-nav > li > a::after {
    content: '';
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 0;
    height: 2px;
    background: var(--nova-gradient);
    border-radius: 2px 2px 0 0;
    opacity: 0;
    transform: scaleX(0.6);
    transition: opacity .15s ease, transform .15s ease;
}

#main-menu .navbar-nav > li:hover > a::after,
#main-menu .navbar-nav > li.active > a::after {
    opacity: 1;
    transform: scaleX(1);
}

#main-menu .dropdown-menu {
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-radius-md);
    box-shadow: var(--nova-shadow-md);
    padding: 6px;
    margin-top: 8px;
}

#main-menu .dropdown-menu > li > a {
    border-radius: var(--nova-radius-sm);
    padding: 9px 12px;
    font-size: 13.5px;
    color: var(--nova-body);
}

#main-menu .dropdown-menu > li > a:hover {
    background: var(--nova-primary-light);
    color: var(--nova-primary-dark);
}

#main-menu .navbar-toggle {
    border-color: var(--nova-border);
    border-radius: var(--nova-radius-sm);
}

/* ---------------------------------------------------------------------
   4b. App shell — persistent left sidebar (client area)
   ------------------------------------------------------------------- */
.nova-topbar-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 28px;
}

.nova-topbar .logo,
.nova-topbar .logo.logo-text { order: 0; }

.nova-topbar .top-nav { order: 2; margin-left: auto; }

/* Primary marketing navigation (Home / Services / About / Contact) shown
   between the logo and the account utility menu. */
.nova-main-nav {
    order: 1;
    display: flex;
    align-items: center;
    gap: 2px;
}
.nova-main-nav a {
    color: var(--nova-muted);
    font-weight: 600;
    font-size: 13.5px;
    padding: 9px 14px;
    border-radius: var(--nova-radius-pill);
    transition: background-color .15s ease, color .15s ease;
}
.nova-main-nav a:hover,
.nova-main-nav a:focus {
    background-color: var(--nova-surface-alt);
    color: var(--nova-ink);
    text-decoration: none;
}
.nova-main-nav a { white-space: nowrap; }
/* logo + 5 nav links + utility menu need ~1120px; below that the header
   gets cramped and links wrap, so collapse the marketing nav earlier */
@media (max-width: 1129px) {
    .nova-main-nav { display: none; }
}

.nova-mobile-toggle {
    order: -1;
    display: none;
    background: var(--nova-surface-alt);
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-radius-sm);
    padding: 9px 11px;
    margin-right: 4px;
}
.nova-mobile-toggle .icon-bar {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 1px;
    background: var(--nova-ink);
}
.nova-mobile-toggle .icon-bar + .icon-bar { margin-top: 3px; }

.nova-user-menu > a { display: flex; align-items: center; gap: 6px; }

.nova-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--nova-gradient);
    color: #fff;
    font-weight: 700;
    font-size: 12.5px;
}

.nova-shell-container > .row { display: flex; flex-wrap: wrap; align-items: flex-start; }

.nova-app-sidebar {
    position: sticky;
    top: 82px;
    align-self: flex-start;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding-top: 24px;
    padding-bottom: 24px;
}

.nova-sidebar-collapse { background: transparent; box-shadow: none; }

ul.nova-sidebar-nav {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    background: var(--nova-surface);
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-radius-lg);
    box-shadow: var(--nova-shadow-sm);
    padding: 8px;
}

ul.nova-sidebar-nav > li { position: relative; }

ul.nova-sidebar-nav > li > a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--nova-radius-sm);
    font-weight: 500;
    font-size: 13.5px;
    color: var(--nova-body);
    margin-bottom: 2px;
}

ul.nova-sidebar-nav > li > a:hover,
ul.nova-sidebar-nav > li > a:focus {
    background: var(--nova-surface-alt);
    color: var(--nova-primary-dark);
    text-decoration: none;
}

ul.nova-sidebar-nav > li.active > a,
ul.nova-sidebar-nav > li > a.active {
    background: var(--nova-gradient) !important;
    color: #fff !important;
    box-shadow: var(--nova-shadow-sm);
}

ul.nova-sidebar-nav > li > a > i:first-child {
    width: 18px;
    text-align: center;
    color: var(--nova-muted);
    font-size: 15px;
}
ul.nova-sidebar-nav > li.active > a > i:first-child,
ul.nova-sidebar-nav > li > a:hover > i:first-child { color: inherit; }

ul.nova-sidebar-nav .badge {
    margin-left: auto;
    background: var(--nova-danger);
    border-radius: var(--nova-radius-pill);
}

ul.nova-sidebar-nav .caret { margin-left: auto; }

/* flyout submenu for nav items with children */
ul.nova-sidebar-nav .dropdown-menu {
    position: static;
    display: none;
    float: none;
    box-shadow: none;
    border: none;
    background: var(--nova-surface-alt);
    border-radius: var(--nova-radius-sm);
    margin: 2px 0 6px 26px;
    padding: 2px;
    width: auto;
}
ul.nova-sidebar-nav li.open > .dropdown-menu,
ul.nova-sidebar-nav li:hover > .dropdown-menu { display: block; }
ul.nova-sidebar-nav .dropdown-menu > li > a {
    padding: 8px 10px;
    font-size: 13px;
    border-radius: 6px;
    color: var(--nova-muted);
}
ul.nova-sidebar-nav .dropdown-menu > li > a:hover {
    background: var(--nova-surface);
    color: var(--nova-primary-dark);
}

.nova-sidebar-section-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--nova-faint);
    padding: 0 10px;
    margin: 4px 0 8px;
}

.nova-no-sidebar .nova-app-sidebar,
.nova-no-sidebar .nova-mobile-toggle { display: none; }

@media (max-width: 767px) {
    .nova-app-sidebar {
        position: static;
        max-height: none;
        width: 100%;
        flex: 0 0 100%;
    }
    .nova-mobile-toggle { display: inline-block; }
    .nova-topbar-inner { padding: 0 16px; flex-wrap: wrap; }
}

/* ---------------------------------------------------------------------
   5. Homepage hero + quick links
   ------------------------------------------------------------------- */
#home-banner {
    background: var(--nova-gradient-hero);
    padding: 64px 0;
    position: relative;
    overflow: hidden;
}

#home-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 30%, rgba(147, 139, 230, 0.12), transparent 60%),
                radial-gradient(circle at 82% 75%, rgba(125, 235, 212, 0.14), transparent 55%);
    pointer-events: none;
}

.nova-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(147, 139, 230, 0.1);
    border: 1px solid rgba(147, 139, 230, 0.2);
    color: var(--nova-primary-darker);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .02em;
    padding: 7px 16px;
    border-radius: var(--nova-radius-pill);
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}
.nova-hero-badge i { color: var(--nova-primary); }

#home-banner h2 {
    color: var(--nova-ink);
    font-size: 36px;
    font-weight: 800;
    font-family: var(--nova-font-display);
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

#home-banner .form-control {
    border: 1px solid var(--nova-border);
    height: 54px;
    border-radius: var(--nova-radius-pill) 0 0 var(--nova-radius-pill);
    box-shadow: var(--nova-shadow-md);
}

#home-banner .input-group-btn .btn {
    height: 54px;
    border-radius: 0 var(--nova-radius-pill) var(--nova-radius-pill) 0 !important;
    background: var(--nova-gradient) !important;
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0 26px;
    box-shadow: var(--nova-shadow-primary);
}

.home-shortcuts {
    background: transparent;
    padding: 0 0 40px;
    color: var(--nova-body);
    position: relative;
    z-index: 2;
}

.home-shortcuts .container > .row {
    background: var(--nova-surface);
    border-radius: var(--nova-radius-lg);
    box-shadow: var(--nova-shadow-lg);
    margin-top: -38px;
    padding: 26px 24px;
    align-items: center;
}

.home-shortcuts .lead { color: var(--nova-ink); font-weight: 600; font-family: var(--nova-font-display); }

.home-shortcuts ul { display: flex; flex-wrap: wrap; gap: 12px; }

.home-shortcuts li {
    float: none;
    width: auto;
    flex: 1 1 180px;
    border: 1px solid var(--nova-border) !important;
    border-radius: var(--nova-radius-md);
    padding: 0;
    background: var(--nova-surface-alt);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.home-shortcuts li:hover {
    transform: translateY(-3px);
    box-shadow: var(--nova-shadow-md);
    border-color: var(--nova-primary) !important;
}

.home-shortcuts li a { padding: 18px 16px; text-align: center; color: var(--nova-ink) !important; }
.home-shortcuts li i { color: var(--nova-primary); font-size: 24px; }
.home-shortcuts li p { color: var(--nova-ink); font-weight: 600; font-size: 12.5px; letter-spacing: .03em; }
.home-shortcuts li span { display: none !important; }

/* ---------------------------------------------------------------------
   6. Buttons
   ------------------------------------------------------------------- */
.btn {
    font-family: var(--nova-font);
    font-weight: 600;
    font-size: 13.5px;
    border-radius: var(--nova-radius-md);
    padding: 9px 18px;
    border: 1px solid transparent;
    transition: all var(--nova-transition);
    box-shadow: none;
}

.btn-primary {
    background: var(--nova-gradient);
    border-color: transparent;
    color: #fff;
    box-shadow: var(--nova-shadow-primary);
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background: var(--nova-gradient);
    border-color: transparent;
    color: #fff;
    box-shadow: var(--nova-shadow-primary-hover);
    transform: translateY(-1px);
}

.btn-default {
    background: var(--nova-surface);
    border-color: var(--nova-border-strong);
    color: var(--nova-body);
}
.btn-default:hover, .btn-default:focus {
    background: var(--nova-surface-alt);
    border-color: var(--nova-primary);
    color: var(--nova-primary-dark);
}

.btn-info { background: var(--nova-info); border-color: var(--nova-info); }
.btn-info:hover { background: #2490c4; border-color: #2490c4; }

.btn-success { background: var(--nova-success); border-color: var(--nova-success); }
.btn-danger { background: var(--nova-danger); border-color: var(--nova-danger); }
.btn-warning { background: var(--nova-warning); border-color: var(--nova-warning); }

.btn-lg { border-radius: var(--nova-radius-md); padding: 13px 26px; }
.btn-sm { padding: 6px 12px; border-radius: 7px; }
.btn-xs { padding: 3px 9px; border-radius: 6px; font-size: 11px; }

.btn-block { border-radius: var(--nova-radius-sm); }

/* ---------------------------------------------------------------------
   7. Forms
   ------------------------------------------------------------------- */
.form-control {
    font-family: var(--nova-font);
    border: 1px solid var(--nova-border-strong);
    border-radius: var(--nova-radius-sm);
    padding: 10px 14px;
    height: auto;
    box-shadow: none;
    background-color: var(--nova-surface);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.form-control:focus {
    border-color: var(--nova-primary);
    box-shadow: 0 0 0 3px var(--nova-primary-light);
}

label { font-weight: 600; color: var(--nova-ink); font-size: 13px; }

.input-group-addon {
    background: var(--nova-surface-alt);
    border-color: var(--nova-border-strong);
    border-radius: var(--nova-radius-sm);
}

.checkbox label, .radio label { font-weight: 400; color: var(--nova-body); }

select.form-control { cursor: pointer; }

/* ---------------------------------------------------------------------
   8. Cards / panels
   ------------------------------------------------------------------- */
.panel {
    background: var(--nova-surface);
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-radius-lg);
    box-shadow: var(--nova-shadow-sm);
    margin-bottom: 22px;
}

.panel-heading {
    background: var(--nova-surface) !important;
    border-bottom: 1px solid var(--nova-border);
    border-radius: var(--nova-radius-lg) var(--nova-radius-lg) 0 0 !important;
    padding: 16px 22px;
}

.panel-title {
    font-family: var(--nova-font-display);
    font-size: 15px;
    font-weight: 600;
    color: var(--nova-ink);
}

.panel-title strong { font-weight: 600; }

.panel-body { padding: 22px; }

.panel-footer {
    background: var(--nova-surface-alt) !important;
    border-top: 1px solid var(--nova-border);
    border-radius: 0 0 var(--nova-radius-lg) var(--nova-radius-lg) !important;
    padding: 14px 22px;
}

.panel-default, .panel-primary, .panel-info, .panel-success, .panel-warning, .panel-danger {
    border: 1px solid var(--nova-border);
}
.panel-default > .panel-heading,
.panel-primary > .panel-heading,
.panel-info > .panel-heading,
.panel-success > .panel-heading,
.panel-warning > .panel-heading,
.panel-danger > .panel-heading {
    color: var(--nova-ink);
}

/* colored accent bar on dashboard widget panels */
.panel[class*="panel-accent-"] { border-top: 3px solid var(--nova-primary); }
.panel-accent-blue { border-top-color: var(--nova-info); }
.panel-accent-green { border-top-color: var(--nova-success); }
.panel-accent-red { border-top-color: var(--nova-danger); }
.panel-accent-gold, .panel-accent-yellow { border-top-color: var(--nova-warning); }
.panel-accent-aqua { border-top-color: #06b6d4; }
.panel-accent-purple { border-top-color: var(--nova-accent); }

/* ---------------------------------------------------------------------
   9. Sidebar navigation
   ------------------------------------------------------------------- */
.sidebar { margin-bottom: 22px; }

.panel-sidebar {
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-radius-lg);
    overflow: hidden;
    box-shadow: var(--nova-shadow-sm);
}

.panel-sidebar > .panel-heading {
    background: var(--nova-surface) !important;
    border-bottom: 1px solid var(--nova-border);
    padding: 16px 20px;
}

.panel-sidebar .panel-title {
    font-family: var(--nova-font-display);
    font-weight: 600;
    font-size: 14px;
    color: var(--nova-ink);
}

.panel-sidebar .list-group { border-radius: 0; padding: 8px; }

.panel-sidebar .list-group-item {
    border: none;
    border-radius: var(--nova-radius-sm) !important;
    margin-bottom: 2px;
    padding: 10px 12px;
    font-weight: 500;
    font-size: 13.5px;
    color: var(--nova-body);
    transition: background-color .15s ease, color .15s ease;
}

.panel-sidebar a.list-group-item:hover {
    background: var(--nova-surface-alt);
    color: var(--nova-primary-dark);
}
.panel-sidebar a.list-group-item:hover i.fas,
.panel-sidebar a.list-group-item:hover i.far {
    color: var(--nova-primary-dark) !important;
}

.panel-sidebar a.list-group-item.active,
.panel-sidebar a.list-group-item.active:focus,
.panel-sidebar a.list-group-item.active:hover {
    background: var(--nova-gradient) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: var(--nova-shadow-sm);
}
.panel-sidebar a.list-group-item.active i { color: #fff !important; }

.panel-sidebar .panel-footer { background: var(--nova-surface-alt) !important; }

/* ---------------------------------------------------------------------
   10. Dashboard stat tiles
   ------------------------------------------------------------------- */
.tiles .tile {
    background: var(--nova-surface);
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-radius-lg);
    padding: 20px 20px 18px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
    box-shadow: var(--nova-shadow-sm);
}

.tiles .tile:hover { transform: translateY(-3px); box-shadow: var(--nova-shadow-md); }

.tiles .tile a { display: block; }

.tiles .tile .icon {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--nova-radius-md);
    background: var(--nova-primary-light);
    color: var(--nova-primary);
    font-size: 18px;
    margin-bottom: 14px;
}

.tiles .tile .stat {
    font-family: var(--nova-font-display);
    font-size: 30px;
    font-weight: 700;
    color: var(--nova-ink);
    margin-top: 0;
    line-height: 1.1;
}

.tiles .tile .title {
    color: var(--nova-muted);
    font-weight: 600;
    font-size: 11.5px;
    letter-spacing: .04em;
    margin-top: 4px;
}

.tiles .tile .highlight { display: none; }

.home-kb-search { margin: 6px 0 26px; position: relative; }
.home-kb-search .form-control {
    padding-left: 46px;
    height: 52px;
    border-radius: var(--nova-radius-md);
}
.home-kb-search i {
    position: absolute;
    left: 18px;
    top: 17px;
    color: var(--nova-faint);
}

.nova-welcome-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: var(--nova-surface);
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-radius-lg);
    box-shadow: var(--nova-shadow-sm);
    padding: 24px 26px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}
.nova-welcome-bar h1 {
    font-family: var(--nova-font-display);
    font-size: 21px;
    font-weight: 700;
    color: var(--nova-ink);
    margin: 0 0 4px;
}
.nova-welcome-bar p { margin: 0; color: var(--nova-muted); font-size: 13.5px; }
.nova-welcome-bar .btn-primary { white-space: nowrap; }

.nova-renewals-panel .table { margin-bottom: 0; }
.nova-renewals-panel .panel-heading { position: relative; }

/* ---------------------------------------------------------------------
   11. Tables & DataTables
   ------------------------------------------------------------------- */
.table-container {
    background: var(--nova-surface);
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-radius-lg);
    box-shadow: var(--nova-shadow-sm);
    padding: 4px;
}

/* generic Bootstrap .table baseline — used on pages that don't opt into the
   DataTables-driven .table-list (upgrade, config options, ticket print view,
   masspay, whois, etc.) so every table in the theme shares the same look */
.table {
    font-size: 13.5px;
    color: var(--nova-body);
}
.table > thead > tr > th {
    border-bottom: 2px solid var(--nova-border);
    color: var(--nova-muted);
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
}
.table > tbody > tr > td,
.table > tbody > tr > th {
    border-top: 1px solid var(--nova-border);
    vertical-align: middle;
    padding: 12px 14px;
}
.table-striped > tbody > tr:nth-of-type(odd) { background-color: var(--nova-surface-alt); }
.table-hover > tbody > tr:hover { background-color: var(--nova-surface-alt); }
.table-bordered, .table-bordered > thead > tr > th, .table-bordered > tbody > tr > td {
    border: 1px solid var(--nova-border);
}
.table > tbody > tr > td select.form-control,
.table > tbody > tr > td input.form-control { min-width: 140px; }

table.table-list { margin-bottom: 0; }

.table-list > thead > tr > th {
    background: transparent;
    border-bottom: 1px solid var(--nova-border) !important;
    color: var(--nova-muted);
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 14px 16px;
}

.table-list > tbody > tr > td {
    background-color: transparent !important;
    border-top: 1px solid var(--nova-border) !important;
    padding: 14px 16px;
    vertical-align: middle;
    color: var(--nova-body);
}

.table-list > tbody > tr:nth-child(even) > td { background-color: transparent !important; }

.table-list > tbody > tr:hover > td { background-color: var(--nova-surface-alt) !important; }

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: var(--nova-radius-sm) !important;
    border-color: var(--nova-border) !important;
    margin-left: 4px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--nova-gradient) !important;
    border-color: transparent !important;
    color: #fff !important;
}
.dataTables_wrapper .dataTables_filter input {
    border-radius: var(--nova-radius-sm);
    border: 1px solid var(--nova-border-strong);
    padding: 6px 12px;
}

.view-filter-btns .list-group-item {
    border-radius: var(--nova-radius-pill) !important;
    display: inline-block;
    margin: 3px;
    border: 1px solid var(--nova-border-strong);
}
.view-filter-btns .list-group-item.active {
    background: var(--nova-ink) !important;
    border-color: var(--nova-ink) !important;
    color: #fff !important;
}

/* ---------------------------------------------------------------------
   12. Status badges / labels
   ------------------------------------------------------------------- */
.label.status {
    display: inline-block;
    font-family: var(--nova-font);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: .02em;
    text-transform: uppercase;
    padding: 4px 11px;
    border-radius: var(--nova-radius-pill);
    background: var(--nova-neutral-bg);
    color: var(--nova-muted) !important;
    border: none;
}

.status-active, .status-open, .status-completed, .status-paid,
.status-accepted, .status-delivered { background: var(--nova-success-bg); color: var(--nova-success) !important; }

.status-pending, .status-pending-transfer, .status-pending-registration,
.status-redemption, .status-grace, .status-suspended, .status-customer-reply { background: var(--nova-warning-bg); color: var(--nova-warning) !important; }

.status-unpaid, .status-cancelled, .status-fraud, .status-lost, .status-dead,
.status-collections, .status-inprogress { background: var(--nova-danger-bg); color: var(--nova-danger) !important; }

.status-answered, .status-closed, .status-terminated, .status-expired,
.status-transferred-away, .status-onhold, .status-refunded { background: var(--nova-neutral-bg); color: var(--nova-muted) !important; }

.status-custom { background: var(--nova-surface); border: 1px solid currentColor !important; }

/* generic bootstrap labels (non-status, e.g. new ticket replies) */
.label-info { background: var(--nova-info); border-radius: var(--nova-radius-pill); }
.label-danger { background: var(--nova-danger); border-radius: var(--nova-radius-pill); }
.label-success { background: var(--nova-success); border-radius: var(--nova-radius-pill); }
.label-warning { background: var(--nova-warning); border-radius: var(--nova-radius-pill); }
.label-default { background: var(--nova-neutral-bg); color: var(--nova-muted); border-radius: var(--nova-radius-pill); font-weight: 600; }
.label { font-weight: 600; padding: .35em .7em; }

.badge {
    background: var(--nova-primary);
    border-radius: var(--nova-radius-pill);
    font-weight: 700;
    padding: 2px 7px;
}
.list-group-item.active > .badge, a.list-group-item.active > .badge { background: #fff; color: var(--nova-primary-dark); }

/* ---------------------------------------------------------------------
   13. Alerts & flash messages
   ------------------------------------------------------------------- */
.alert {
    border: 1px solid transparent;
    border-radius: var(--nova-radius-md);
    padding: 14px 18px;
    font-size: 13.5px;
}

.alert-success { background: var(--nova-success-bg); color: #15803d; border-color: #bbf7d0; }
.alert-danger { background: var(--nova-danger-bg); color: #b91c1c; border-color: #fecaca; }
.alert-warning { background: var(--nova-warning-bg); color: #b45309; border-color: #fde68a; }
.alert-info { background: var(--nova-info-bg); color: #1d4ed8; border-color: #bfdbfe; }

/* ---------------------------------------------------------------------
   14. Login / register / password reset
   ------------------------------------------------------------------- */
.logincontainer {
    background: var(--nova-surface);
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-radius-lg);
    box-shadow: var(--nova-shadow-md);
    padding: 40px 40px 32px;
    margin: 48px auto 100px;
}

.logincontainer .header-lined { border: none; margin-bottom: 26px; text-align: center; }
.logincontainer .header-lined h1 {
    font-size: 22px;
    font-weight: 700;
}
.logincontainer .header-lined small { display: block; color: var(--nova-muted); font-size: 13px; margin-top: 4px; }

.logincontainer .login-form .form-group { margin-bottom: 18px; }

.logincontainer #login {
    width: 100%;
    padding: 12px;
    border-radius: var(--nova-radius-sm);
    font-size: 14.5px;
}

.logincontainer div[align="center"] { display: flex; flex-direction: column; gap: 10px; }
.logincontainer div[align="center"] .btn-default { width: 100%; }

/* Split-screen auth layout (login, used on login.tpl) */
.logincontainer.nova-auth-split {
    max-width: 1040px;
    padding: 0;
    overflow: hidden;
    margin: 48px auto 100px;
}
.nova-auth-row { display: flex; flex-wrap: wrap; margin: 0; }
.nova-auth-form-col {
    padding: 44px 44px 36px;
    flex: 0 0 50%;
    max-width: 50%;
}
.nova-auth-form-col .header-lined { border: none; margin-bottom: 24px; text-align: left; padding-bottom: 0; }
.nova-auth-form-col .header-lined h1 { font-size: 26px; }
.nova-auth-brand-col {
    flex: 0 0 50%;
    max-width: 50%;
    display: flex;
}
.nova-auth-brand-panel {
    background: var(--nova-gradient);
    color: #fff;
    padding: 48px 40px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.nova-auth-brand-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 85% 15%, rgba(255,255,255,0.18), transparent 55%),
                radial-gradient(circle at 10% 90%, rgba(255,255,255,0.14), transparent 50%);
    pointer-events: none;
}
.nova-auth-brand-logo { display: inline-block; margin-bottom: 28px; position: relative; z-index: 1; }
.nova-auth-brand-logo img { height: 30px; width: auto; filter: brightness(0) invert(1); }
.nova-auth-brand-panel h2 {
    color: #fff;
    font-size: 26px;
    line-height: 1.3;
    margin: 0 0 14px;
    position: relative;
    z-index: 1;
}
.nova-auth-brand-desc {
    color: rgba(255,255,255,0.85);
    font-size: 14.5px;
    line-height: 1.6;
    margin-bottom: 26px;
    position: relative;
    z-index: 1;
}
.nova-auth-features {
    list-style: none;
    margin: 0 0 30px;
    padding: 0;
    position: relative;
    z-index: 1;
}
.nova-auth-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #fff;
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 12px;
}
.nova-auth-features li i { color: #fff; opacity: .9; margin-top: 2px; }
.nova-auth-quote {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--nova-radius-md);
    padding: 18px 20px;
    position: relative;
    z-index: 1;
}
.nova-auth-quote i { color: rgba(255,255,255,0.6); font-size: 13px; }
.nova-auth-quote p { color: #fff; font-size: 13.5px; font-style: italic; margin: 8px 0; line-height: 1.5; }
.nova-auth-quote span { color: rgba(255,255,255,0.75); font-size: 12px; font-weight: 600; }

.nova-auth-social { margin-top: 22px; }
.nova-auth-social-divider {
    text-align: center;
    position: relative;
    margin-bottom: 16px;
    color: var(--nova-faint);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.nova-auth-social-divider::before, .nova-auth-social-divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 42%;
    border-top: 1px solid var(--nova-border);
}
.nova-auth-social-divider::before { left: 0; }
.nova-auth-social-divider::after { right: 0; }
.nova-auth-social-divider span { background: var(--nova-surface); padding: 0 10px; position: relative; }

.nova-auth-register-hint {
    text-align: center;
    margin-top: 22px;
    color: var(--nova-muted);
    font-size: 13.5px;
}
.nova-auth-register-hint a { font-weight: 600; }

@media (max-width: 991px) {
    .nova-auth-brand-col { display: none; }
    .nova-auth-form-col { flex: 0 0 100%; max-width: 100%; }
}

/* ---------------------------------------------------------------------
   15. Page headers & breadcrumbs
   ------------------------------------------------------------------- */
.header-lined {
    border-bottom: 1px solid var(--nova-border);
    padding-bottom: 16px;
    margin-bottom: 22px;
}

.header-lined h1 {
    font-size: 24px;
    margin: 0;
}

.header-lined h1 small {
    font-size: 13.5px;
    color: var(--nova-muted);
    font-weight: 400;
    display: block;
    margin-top: 4px;
}

.breadcrumb {
    background: transparent;
    padding: 8px 0 0;
    margin: 0;
    font-size: 12.5px;
}

.breadcrumb > li + li::before { color: var(--nova-faint); }
.breadcrumb a { color: var(--nova-muted); }

/* ---------------------------------------------------------------------
   16. Modals & popovers
   ------------------------------------------------------------------- */
.modal-content {
    border: none;
    border-radius: var(--nova-radius-lg);
    box-shadow: var(--nova-shadow-lg);
    overflow: hidden;
}

.modal-header.panel-heading {
    background: var(--nova-surface) !important;
    border-bottom: 1px solid var(--nova-border);
}

.modal-footer.panel-footer {
    background: var(--nova-surface-alt) !important;
    border-top: 1px solid var(--nova-border);
}

.popover {
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-radius-md);
    box-shadow: var(--nova-shadow-md);
}

.popover-title {
    background: var(--nova-surface);
    border-bottom: 1px solid var(--nova-border);
    font-weight: 600;
    border-radius: var(--nova-radius-md) var(--nova-radius-md) 0 0;
}

/* ---------------------------------------------------------------------
   17. Footer
   ------------------------------------------------------------------- */
#footer {
    background: #0d0d1a;
    color: rgba(255, 255, 255, 0.55);
    padding: 56px 0 0;
    margin-top: 40px;
    font-size: 13.5px;
    text-align: left;
}
#footer a { color: rgba(255, 255, 255, 0.7); }
#footer a:hover { color: #fff; text-decoration: none; }

.nova-footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
    gap: 32px 24px;
    padding-bottom: 36px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nova-footer-brand-name {
    font-family: var(--nova-font-display);
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px;
    letter-spacing: -0.01em;
}
.nova-footer-brand p { color: rgba(255, 255, 255, 0.5); line-height: 1.65; margin: 0 0 18px; max-width: 320px; }

.nova-footer-social { display: flex; gap: 10px; }
.nova-footer-social a {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}
.nova-footer-social a:hover { background: var(--nova-gradient); border-color: transparent; color: #fff; }

.nova-footer-col h4 {
    color: #fff;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 700;
    margin: 0 0 18px;
}
.nova-footer-col ul { list-style: none; margin: 0; padding: 0; }
.nova-footer-col li { margin-bottom: 11px; }
.nova-footer-col li:last-child { margin-bottom: 0; }
.nova-footer-col > ul > li > a { font-size: 13.5px; color: rgba(255, 255, 255, 0.55); }
.nova-footer-col > ul > li > a:hover { color: #fff; }

.nova-footer-contact li { display: flex; gap: 9px; align-items: flex-start; color: rgba(255, 255, 255, 0.55); }
.nova-footer-contact i { margin-top: 3px; width: 14px; color: rgba(255, 255, 255, 0.35); }

.nova-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 20px 0;
}
.nova-footer-bottom p { margin: 0; color: rgba(255, 255, 255, 0.4); font-size: 12.5px; }

.nova-footer-legal { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; }
.nova-footer-legal a { color: rgba(255, 255, 255, 0.4); font-size: 12.5px; }
.nova-footer-legal a:hover { color: #fff; }

#footer .back-to-top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}
#footer .back-to-top:hover { color: var(--nova-accent); border-color: var(--nova-accent); background: transparent; }

@media (max-width: 991px) {
    .nova-footer-grid { grid-template-columns: 1fr 1fr; }
    .nova-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 575px) {
    .nova-footer-grid { grid-template-columns: 1fr; }
    .nova-footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------------------------------------------------------------------
   18. Misc utilities
   ------------------------------------------------------------------- */
.well {
    background: var(--nova-surface-alt);
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-radius-md);
    box-shadow: none;
}

.nav-tabs { border-bottom: 1px solid var(--nova-border); }
.nav-tabs > li > a {
    border-radius: var(--nova-radius-sm) var(--nova-radius-sm) 0 0;
    color: var(--nova-muted);
    font-weight: 600;
    font-size: 13px;
    border: none;
}
.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
    color: var(--nova-primary);
    border: none;
    border-bottom: 2px solid var(--nova-primary);
    background: transparent;
}

.pagination > li > a, .pagination > li > span {
    border-color: var(--nova-border);
    color: var(--nova-body);
}
.pagination > .active > a { background: var(--nova-gradient); border-color: transparent; }

progress, .progress { border-radius: var(--nova-radius-pill); overflow: hidden; background: var(--nova-neutral-bg); }
.progress-bar { background: var(--nova-gradient); }

code { background: var(--nova-surface-alt); color: var(--nova-accent); border-radius: 4px; }

/* ---------------------------------------------------------------------
   18b. Invoice detail & support ticket thread
   ------------------------------------------------------------------- */
.invoice-container {
    background: var(--nova-surface);
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-radius-lg);
    box-shadow: var(--nova-shadow-sm);
    padding: 32px;
}

.invoice-container .invoice-status {
    font-family: var(--nova-font-display);
    font-size: 22px;
    letter-spacing: .04em;
    padding: 6px 18px;
    border-radius: var(--nova-radius-pill);
    display: inline-block;
    background: var(--nova-neutral-bg);
}
.invoice-container .invoice-status .draft { color: var(--nova-muted); }
.invoice-container .invoice-status .unpaid { color: var(--nova-danger); }
.invoice-container .invoice-status .paid { color: var(--nova-success); }
.invoice-container .invoice-status .refunded { color: var(--nova-info); }
.invoice-container .invoice-status .cancelled { color: var(--nova-muted); }
.invoice-container .invoice-status .collections { color: var(--nova-warning); }

.invoice-container .table > thead > tr > th {
    border-bottom: 1px solid var(--nova-border);
    color: var(--nova-muted);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: .04em;
}
.invoice-container .table > tbody > tr > td { border-top: 1px solid var(--nova-border); }

.panel-collapsable > .panel-heading { cursor: pointer; }
.panel-collapsable > .panel-heading:hover { background: var(--nova-surface-alt) !important; }

.ticket-reply {
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-radius-md);
    overflow: hidden;
    margin: 0 0 16px;
}
.ticket-reply.staff { border-color: var(--nova-primary-light); }
.ticket-reply .user {
    background: var(--nova-surface-alt);
    padding: 10px 14px;
}
.ticket-reply.staff .user { background: var(--nova-primary-light); }
.ticket-reply .message { padding: 16px; }
.ticket-reply .date { color: var(--nova-faint); }

.requestor-type-operator, .requestor-type-owner, .requestor-type-authorizeduser,
.requestor-type-registereduser, .requestor-type-subaccount, .requestor-type-guest {
    border-radius: var(--nova-radius-pill);
    font-weight: 600;
    letter-spacing: .02em;
}

/* ---------------------------------------------------------------------
   19. Responsive tweaks
   ------------------------------------------------------------------- */
@media (max-width: 991px) {
    #header .container { justify-content: space-between; }
    #header .top-nav { order: 3; width: 100%; justify-content: flex-end; margin-top: 12px; }
    .logincontainer { padding: 28px 22px; margin: 24px 12px 60px; }
}

@media (max-width: 767px) {
    #home-banner h2 { font-size: 22px; }
    .home-shortcuts ul { flex-direction: column; }
    .tiles .tile { text-align: left; }
}

/* ---------------------------------------------------------------------
   20. Scrollbar & selection
   ------------------------------------------------------------------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--nova-border-strong); border-radius: var(--nova-radius-pill); }
::-webkit-scrollbar-thumb:hover { background: var(--nova-faint); }

/* ---------------------------------------------------------------------
   21. Content pages — KB / Downloads / Store cart / Tickets / Account
   ------------------------------------------------------------------- */

/* -- section headings inside content (h2/h3 used as in-page dividers,
      e.g. clientareahome, knowledgebase, downloads, security) -- */
#content-container h2, .content-wrapper h2, #main-body h2 {
    font-size: 19px;
    margin: 34px 0 16px;
    padding-top: 4px;
}
#content-container h2:first-child, .content-wrapper h2:first-child, #main-body h2:first-child { margin-top: 6px; }
.section-title { font-size: 17px; margin: 28px 0 14px; }

/* -- large search bars (knowledgebase, downloads) -- */
.kb-search.input-group { margin-bottom: 28px; }
.kb-search .form-control {
    height: 48px;
    border-radius: var(--nova-radius-md) 0 0 var(--nova-radius-md) !important;
    border-right: none;
    box-shadow: none;
}
.kb-search .input-group-btn .btn {
    height: 48px;
    padding: 0 22px;
    border-radius: 0 var(--nova-radius-md) var(--nova-radius-md) 0 !important;
}

/* -- knowledgebase / downloads category tiles --
      (.row.kbcategories > .col-sm-4 > a, .row > .col-sm-6 > a) */
.kbcategories { margin-bottom: 6px; }
.kbcategories > div > a,
a[href*="knowledgebase-category-view"],
a[href*="download-by-cat"] {
    display: block;
    background: var(--nova-surface);
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-radius-lg);
    padding: 18px 20px;
    margin-bottom: 18px;
    font-weight: 600;
    color: var(--nova-ink);
    box-shadow: var(--nova-shadow-sm);
    transition: var(--nova-transition);
}
.kbcategories > div > a:hover,
a[href*="knowledgebase-category-view"]:hover,
a[href*="download-by-cat"]:hover {
    border-color: var(--nova-primary);
    box-shadow: var(--nova-shadow-md);
    transform: translateY(-2px);
    color: var(--nova-primary-dark);
}
.kbcategories > div > a i, a[href*="knowledgebase-category-view"] i, a[href*="download-by-cat"] i {
    color: var(--nova-primary);
    margin-right: 6px;
}
.kbcategories > div > p { color: var(--nova-muted); font-size: 13px; margin: 8px 0 0; }

.kbarticles { display: flex; flex-direction: column; gap: 2px; }
.kbarticles > a {
    display: block;
    padding: 14px 16px;
    border-radius: var(--nova-radius-md);
    color: var(--nova-ink);
    font-weight: 600;
    transition: var(--nova-transition);
}
.kbarticles > a:hover { background: var(--nova-surface-alt); color: var(--nova-primary-dark); }
.kbarticles > a p { color: var(--nova-muted); font-weight: 400; font-size: 13px; margin: 4px 0 0; }

/* -- generic list-group (downloads list, related items) -- */
.list-group { margin-bottom: 20px; }
.list-group-item {
    background: var(--nova-surface);
    border: 1px solid var(--nova-border);
    padding: 16px 18px;
    transition: var(--nova-transition);
}
.list-group-item:first-child { border-top-left-radius: var(--nova-radius-lg); border-top-right-radius: var(--nova-radius-lg); }
.list-group-item:last-child { border-bottom-left-radius: var(--nova-radius-lg); border-bottom-right-radius: var(--nova-radius-lg); }
.list-group-item + .list-group-item { border-top-width: 1px; margin-top: -1px; }
a.list-group-item:hover, a.list-group-item:focus {
    background: var(--nova-surface-alt);
    color: var(--nova-primary-dark);
    border-color: var(--nova-border);
    z-index: 1;
    position: relative;
}
.list-group-item i.fa-download, .list-group-item i.fa-lock { color: var(--nova-primary); }
.list-group-item small { color: var(--nova-faint); }

/* -- store / cart / order form -- */
.store-order-container { background: var(--nova-surface); border: 1px solid var(--nova-border); border-radius: var(--nova-radius-lg); box-shadow: var(--nova-shadow-sm); padding: 30px 32px; margin-bottom: 24px; }
.store-order-container h2 { margin-top: 0; }
.payment-term { background: var(--nova-surface-alt); border-radius: var(--nova-radius-md); padding: 16px 18px; }
.payment-term h4 { margin-top: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--nova-muted); }
.store-domain-tabs { margin-top: 8px; }
.store-domain-tab-content { background: var(--nova-surface-alt); border: 1px solid var(--nova-border); border-top: none; border-radius: 0 0 var(--nova-radius-md) var(--nova-radius-md); padding: 20px; margin-bottom: 22px; }
.domain-validation { font-weight: 600; font-size: 13px; }
.domain-validation.ok, .domain-validation .fa-check { color: var(--nova-success); }
.domain-validation .fa-times { color: var(--nova-danger); }
.store-order-container .card { border: 1px solid var(--nova-border); border-radius: var(--nova-radius-md); margin: 20px 0; }
.store-order-container .card-body { padding: 20px; }
.store-promoted-product {
    background: var(--nova-gradient);
    color: #fff;
    border-radius: var(--nova-radius-lg);
    padding: 26px 28px;
    margin-top: 24px;
    box-shadow: var(--nova-shadow-primary);
}
.store-promoted-product h3, .store-promoted-product h4 { color: #fff; margin: 0 0 6px; }
.store-promoted-product p { color: rgba(255,255,255,0.85); }
.store-promoted-product .features { list-style: none; padding: 0; margin: 14px 0; }
.store-promoted-product .features li { color: #fff; font-size: 13.5px; margin-bottom: 6px; }
.store-promoted-product .features li i { margin-right: 8px; color: #fff; }
.store-promoted-product .btn-success { background: #fff; color: var(--nova-primary-dark); border: none; font-weight: 700; }
.store-promoted-product .btn-success:hover { background: rgba(255,255,255,0.9); }
.store-promoted-product .icon img { max-width: 100%; border-radius: var(--nova-radius-md); }

/* -- ticket extras: star ratings, attachments -- */
/* Stars sit in the DOM as 5..1, so row-reverse renders them 1..5 left-to-
   right; "hovered star + its DOM-following siblings" then equals "this star
   and every star below it", giving the expected cumulative fill. */
.rating, .rating-done { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.rating .star, .rating-done .star {
    display: inline-block;
    width: 20px; height: 20px;
    color: var(--nova-border-strong);
    font-size: 18px;
    cursor: pointer;
    transition: color .1s ease, transform .1s ease;
}
.rating .star::before, .rating-done .star::before { content: "\2605"; }
.rating .star:hover,
.rating .star:hover ~ .star,
.rating .star.active,
.rating-done .star.active { color: var(--nova-warning); }
.rating .star:hover { transform: scale(1.15); }
.rated { font-size: 12px; color: var(--nova-muted); margin-top: 4px; }
.attachments { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--nova-border); }
.attachments ul { list-style: none; padding: 0; margin: 8px 0 0; }
.attachments li { padding: 4px 0; color: var(--nova-body); }
.attachments li i { color: var(--nova-primary); margin-right: 6px; }
.ticket-attachments-message { font-size: 12px; margin-top: 6px; }

/* -- account / security / email preference pages -- */
.marketing-email-optin {
    background: var(--nova-surface-alt);
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-radius-md);
    padding: 18px 20px;
    margin: 22px 0;
}
.marketing-email-optin h4 { margin-top: 0; }
.toggle-switch-success { accent-color: var(--nova-success); width: 38px; height: 20px; cursor: pointer; vertical-align: middle; }
.controls.checkbox label { display: block; font-weight: 500; margin-bottom: 6px; }

/* -- generic Bootstrap4-ism cleanup for store templates mixed with Bootstrap 3 -- */
.card { background: var(--nova-surface); border: 1px solid var(--nova-border); border-radius: var(--nova-radius-md); }
.mb-3 { margin-bottom: 16px; }
.form-label { font-weight: 600; font-size: 13px; margin-bottom: 6px; display: inline-block; }

/* -- admin inline edit links (kb/downloads, shown to staff previewing as client) -- */
.admin-inline-edit { margin-left: 10px; font-size: 12px; color: var(--nova-faint); }

@media (max-width: 767px) {
    .store-order-container { padding: 22px 18px; }
}

/* -- horizontal forms (payment method pages use col-sm-4 labels) -- */
.control-label { font-weight: 600; color: var(--nova-ink); padding-top: 8px; }
.form-horizontal .form-group { margin-bottom: 16px; }
.field-error-msg { color: var(--nova-danger); font-size: 12px; display: block; margin-top: 4px; }
.field-help-text { color: var(--nova-muted); font-size: 12px; }

/* -- payment method selection (creditcard.tpl / payment/card/select.tpl) -- */
.three-column-grid {
    display: grid;
    grid-template-columns: auto auto 1fr 1fr auto;
    align-items: center;
    gap: 10px 14px;
    background: var(--nova-surface);
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-radius-lg);
    padding: 18px 20px;
    margin-bottom: 22px;
    box-shadow: var(--nova-shadow-sm);
}
.paymethod-info { font-size: 13.5px; }
.paymethod-info label { font-weight: 500; color: var(--nova-body); margin: 0; }
.paymethod-info i { color: var(--nova-primary); font-size: 20px; }
.cc-details { padding: 16px 18px; background: var(--nova-surface-alt); border-radius: var(--nova-radius-md); margin-bottom: 14px !important; }
.icheck-button { width: 18px; height: 18px; accent-color: var(--nova-primary); cursor: pointer; }
#cvvWhereLink.btn-link { color: var(--nova-primary); font-weight: 500; padding: 6px 0 0 10px; }

@media (max-width: 767px) {
    .three-column-grid { grid-template-columns: auto auto 1fr; }
}

/* -- service / product details page (clientareaproductdetails.tpl) -- */
.product-status {
    background: var(--nova-surface-alt);
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-radius-lg);
    padding: 26px 20px;
    margin-bottom: 18px;
}
.product-status .fa-stack { width: 3em; height: 3em; margin-bottom: 10px; }
.product-status .fa-stack-2x { color: var(--nova-primary-light); }
.product-status .fa-stack-1x { color: var(--nova-primary-dark); font-size: .9em; }
.product-status h3 { margin: 6px 0 0; font-size: 18px; }
.product-status h4 { margin: 2px 0 0; font-size: 13px; color: var(--nova-muted); font-weight: 500; }
.product-status-text {
    text-align: center;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--nova-border);
    font-weight: 700;
    letter-spacing: .02em;
}
.product-status-active .product-status-text { color: var(--nova-success); }
.product-status-suspended .product-status-text,
.product-status-terminated .product-status-text,
.product-status-cancelled .product-status-text { color: var(--nova-danger); }
.product-status-pending .product-status-text { color: var(--nova-warning); }
.product-actions-wrapper { margin-top: 14px; gap: 8px; display: flex; flex-direction: column; }
.product-actions-wrapper .col-xs-12 { padding: 0; }
.product-details h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--nova-muted); margin: 18px 0 2px; }
.product-details h4:first-child { margin-top: 0; }

.nav-tabs-overflow { flex-wrap: wrap; }
.product-details-tab-container {
    background: var(--nova-surface);
    border: 1px solid var(--nova-border);
    border-top: none;
    border-radius: 0 0 var(--nova-radius-lg) var(--nova-radius-lg);
    padding: 24px;
    box-shadow: var(--nova-shadow-sm);
}
.product-details-tab-container .row { margin-bottom: 10px; }

/* -- domain pricing / TLD grid (domain-pricing.tpl) -- */
.featured-tld {
    background: var(--nova-surface);
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-radius-lg);
    padding: 18px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: var(--nova-shadow-sm);
    transition: var(--nova-transition);
}
.featured-tld:hover { border-color: var(--nova-primary); box-shadow: var(--nova-shadow-md); transform: translateY(-2px); }
.featured-tld .img-container { height: 40px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.featured-tld .img-container img { max-height: 32px; }
.featured-tld .price { font-weight: 700; color: var(--nova-primary-dark); font-size: 14px; }
.tld-filters { margin: 14px 0 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.tld-filters a.label {
    background: var(--nova-surface-alt) !important;
    color: var(--nova-body) !important;
    border: 1px solid var(--nova-border-strong);
    border-radius: var(--nova-radius-pill) !important;
    padding: 7px 14px !important;
    font-weight: 600;
    font-size: 12.5px;
    display: inline-block;
}
.tld-filters a.label:hover, .tld-filters a.label.label-success {
    background: var(--nova-gradient) !important;
    color: #fff !important;
    border-color: transparent;
}
.tld-sale-group {
    background: var(--nova-warning);
    color: #fff;
    border-radius: var(--nova-radius-pill);
    padding: 1px 8px;
    font-size: 10px;
    font-weight: 700;
    margin-left: 4px;
}
.currency-selector { max-width: 220px; }

/* ---------------------------------------------------------------------
   19. UX polish — accessibility, tables, mobile header
   ------------------------------------------------------------------- */

/* Keyboard users get a clear focus ring; mouse clicks stay outline-free. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--nova-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Anchor jumps (breadcrumb, in-page links) scroll smoothly and never hide
   behind the sticky topbar. */
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Badges and action buttons sit vertically centred in table rows. */
.table-list > tbody > tr > td { vertical-align: middle; }
.table-list td .label { vertical-align: middle; }

/* Flex children default to min-width:auto, which lets wide tables blow the
   content column past the viewport on phones. Allow columns to shrink and
   let tables scroll horizontally inside their card instead. */
.nova-shell-container > .row > [class*="col-"] { min-width: 0; }
.table-container,
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* WHMCS's all.min.css clips page subtitles (div.header-lined small has
   white-space:nowrap + overflow:hidden), cutting off status badges on
   phones. Let subtitles wrap naturally instead. */
div.header-lined small,
.header-lined h1 small { white-space: normal; overflow: visible; }
.header-lined h1 small .label { margin-top: 2px; }
@media (max-width: 767px) {
    .header-lined h1 small .label { display: block; width: max-content; margin-top: 6px; }
}

/* Sidebar visibility contract: always shown alongside content on >=768px,
   collapsed behind the hamburger below that. WHMCS's bundled CSS uses
   !important on .collapse inside media queries, so we must match it. */
@media (min-width: 768px) {
    .nova-sidebar-collapse { display: block !important; }
}
@media (max-width: 767px) {
    .nova-sidebar-collapse { display: none !important; }
    .nova-sidebar-collapse.in { display: block !important; }
}

/* Compact the topbar utility menu on small screens so it never overflows:
   tighter paddings and no wasted gaps. */
@media (max-width: 575px) {
    .nova-topbar-inner { gap: 8px; }
    #header { padding: 10px 0; }
    #header .logo img { height: 30px; }
    #header .top-nav { gap: 0; flex-wrap: wrap; justify-content: flex-end; }
    #header .top-nav > li > a { padding: 7px 9px; font-size: 12.5px; }
    #header .top-nav > li.primary-action > a.btn { padding: 7px 12px; }
}
