/* ==========================================================================
   REFINEGROUP — WHMCS Theme
   Lagom-inspired child theme with RefineGroup brand colours
   ========================================================================== */

/* ---------- Design Tokens ---------- */
:root {
    --rg-primary: #4CAF50;
    --rg-primary-dark: #3d8b40;
    --rg-primary-light: #6ec071;
    --rg-primary-rgb: 76, 175, 80;
    --rg-secondary: #2E7D32;
    --rg-accent: #66BB6A;
    --rg-dark: #1a1a1a;
    --rg-darker: #111111;
    --rg-body-bg: #f0f2f5;
    --rg-card-bg: #ffffff;
    --rg-text: #333333;
    --rg-text-light: #6b7280;
    --rg-border: #e2e5ea;
    --rg-success: #4CAF50;
    --rg-warning: #FF9800;
    --rg-danger: #f44336;
    --rg-info: #2196F3;
    --rg-radius: 10px;
    --rg-radius-lg: 14px;
    --rg-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --rg-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.1);
    --rg-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --rg-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---------- Dark Mode ---------- */
body.rg-dark {
    --rg-body-bg: #0d0d0d;
    --rg-card-bg: #1a1a1a;
    --rg-text: #d4d4d8;
    --rg-text-light: #8b8b98;
    --rg-border: #2a2a2e;
    --rg-dark: #0a0a0a;
    --rg-darker: #050505;
    --rg-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    --rg-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.4);
}

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

/* ---------- Base ---------- */
body {
    font-family: var(--rg-font);
    background: var(--rg-body-bg);
    color: var(--rg-text);
    font-size: 14.5px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--rg-font);
    font-weight: 700;
    color: var(--rg-dark);
}

body.rg-dark h1, body.rg-dark h2, body.rg-dark h3,
body.rg-dark h4, body.rg-dark h5, body.rg-dark h6 {
    color: #e8e8ec;
}

a {
    color: var(--rg-primary);
    transition: var(--rg-transition);
}
a:hover {
    color: var(--rg-primary-dark);
    text-decoration: none;
}

/* ---------- Navbar ---------- */
.navbar, nav.navbar {
    background: var(--rg-dark) !important;
    border: none;
    padding: 0.5rem 1.5rem;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    min-height: 62px;
    transition: var(--rg-transition);
}

.navbar-brand img {
    max-height: 38px;
}

.navbar .navbar-nav .nav-link {
    color: rgba(255,255,255,0.78) !important;
    font-weight: 500;
    font-size: 13.5px;
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    transition: var(--rg-transition);
}
.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link:focus {
    color: #fff !important;
    background: rgba(76, 175, 80, 0.2);
}
.navbar .navbar-nav .nav-item.active .nav-link,
.navbar .navbar-nav .nav-link.active {
    color: #fff !important;
    background: var(--rg-primary);
}

.navbar .dropdown-menu {
    background: var(--rg-card-bg);
    border: 1px solid var(--rg-border);
    border-radius: var(--rg-radius);
    box-shadow: var(--rg-shadow-hover);
    padding: 0.4rem;
    margin-top: 0.4rem;
    min-width: 210px;
}
.navbar .dropdown-menu .dropdown-item {
    border-radius: 6px;
    padding: 0.45rem 0.9rem;
    font-size: 13.5px;
    color: var(--rg-text);
    transition: var(--rg-transition);
}
.navbar .dropdown-menu .dropdown-item:hover {
    background: rgba(76,175,80,0.08);
    color: var(--rg-primary);
}

/* Breadcrumbs */
.rg-breadcrumb-bar {
    background: var(--rg-darker);
    padding: 0.35rem 1.5rem;
}
.breadcrumb {
    background: transparent;
    padding: 0; margin: 0;
    font-size: 13px;
}
.breadcrumb-item a { color: rgba(255,255,255,0.55); }
.breadcrumb-item.active { color: rgba(255,255,255,0.85); }

/* ---------- Main Content ---------- */
.main-content, #main-body {
    padding-top: 2rem;
    padding-bottom: 3rem;
    min-height: 60vh;
}

/* ---------- Cards ---------- */
.card, .panel, .panel-default {
    background: var(--rg-card-bg);
    border: 1px solid var(--rg-border);
    border-radius: var(--rg-radius-lg);
    box-shadow: var(--rg-shadow);
    transition: var(--rg-transition);
    overflow: hidden;
}
.card:hover { box-shadow: var(--rg-shadow-hover); }
.card-header, .panel-heading {
    background: transparent;
    border-bottom: 1px solid var(--rg-border);
    padding: 0.9rem 1.2rem;
    font-weight: 600; font-size: 15px;
}
.card-body, .panel-body { padding: 1.2rem; }
.card-footer, .panel-footer {
    background: rgba(76,175,80,0.03);
    border-top: 1px solid var(--rg-border);
    padding: 0.7rem 1.2rem;
}

/* ---------- Buttons ---------- */
.btn {
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    padding: 0.5rem 1.2rem;
    transition: var(--rg-transition);
    border: none;
    letter-spacing: 0.01em;
}
.btn-primary, .btn-default {
    background: var(--rg-primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(var(--rg-primary-rgb), 0.3);
}
.btn-primary:hover, .btn-default:hover {
    background: var(--rg-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(var(--rg-primary-rgb), 0.4);
    color: #fff;
}
.btn-success {
    background: var(--rg-success);
    box-shadow: 0 4px 14px rgba(var(--rg-primary-rgb), 0.25);
}
.btn-danger {
    background: var(--rg-danger);
    color: #fff;
}
.btn-outline-primary {
    border: 2px solid var(--rg-primary);
    color: var(--rg-primary);
    background: transparent;
}
.btn-outline-primary:hover {
    background: var(--rg-primary);
    color: #fff;
    transform: translateY(-1px);
}
.btn-lg {
    padding: 0.7rem 1.8rem;
    font-size: 15px;
    border-radius: 10px;
}

/* ---------- Forms ---------- */
.form-control, input[type="text"], input[type="email"],
input[type="password"], input[type="number"],
input[type="url"], input[type="tel"], select, textarea {
    border: 1.5px solid var(--rg-border);
    border-radius: 8px;
    padding: 0.5rem 0.85rem;
    font-size: 14px;
    color: var(--rg-text);
    background: var(--rg-card-bg);
    transition: var(--rg-transition);
}
.form-control:focus, input:focus, select:focus, textarea:focus {
    border-color: var(--rg-primary);
    box-shadow: 0 0 0 3px rgba(var(--rg-primary-rgb), 0.12);
    outline: none;
}
label, .form-label {
    font-weight: 500; font-size: 13.5px;
    color: var(--rg-text); margin-bottom: 0.3rem;
}

/* ---------- Tables ---------- */
.table thead th {
    background: var(--rg-body-bg);
    border-bottom: 2px solid var(--rg-border);
    font-weight: 600; font-size: 12px;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--rg-text-light); padding: 0.7rem 1rem;
}
.table tbody td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--rg-border);
    vertical-align: middle; font-size: 14px;
}
.table tbody tr:hover {
    background: rgba(var(--rg-primary-rgb), 0.03);
}

/* ---------- Sidebar ---------- */
.list-group { border-radius: var(--rg-radius-lg); overflow: hidden; }
.list-group-item {
    border: none;
    border-bottom: 1px solid var(--rg-border);
    padding: 0.6rem 1rem;
    font-size: 14px; color: var(--rg-text);
    background: var(--rg-card-bg);
    transition: var(--rg-transition);
}
.list-group-item:hover { background: rgba(var(--rg-primary-rgb),0.05); color: var(--rg-primary); }
.list-group-item.active {
    background: var(--rg-primary);
    border-color: transparent; color: #fff;
}

/* ---------- Badges ---------- */
.badge {
    font-weight: 500; font-size: 11.5px;
    padding: 0.35em 0.65em; border-radius: 6px;
}
.badge-primary, .badge-info { background: var(--rg-primary); }
.badge-success { background: var(--rg-success); }
.badge-warning { background: var(--rg-warning); color: #fff; }
.badge-danger { background: var(--rg-danger); }

/* Status labels */
.label-active, .label-success, .status-active {
    background: rgba(var(--rg-primary-rgb),0.1);
    color: var(--rg-success); border-radius: 6px;
    padding: 0.25em 0.65em; font-weight: 500;
}
.label-pending, .label-warning, .status-pending {
    background: rgba(255,152,0,0.1);
    color: var(--rg-warning); border-radius: 6px;
    padding: 0.25em 0.65em; font-weight: 500;
}
.label-overdue, .label-danger, .status-overdue {
    background: rgba(244,67,54,0.1);
    color: var(--rg-danger); border-radius: 6px;
    padding: 0.25em 0.65em; font-weight: 500;
}

/* ---------- Alerts ---------- */
.alert {
    border: none; border-radius: var(--rg-radius);
    padding: 0.9rem 1.2rem; font-size: 14px; border-left: 4px solid;
}
.alert-info    { background: rgba(33,150,243,0.07);  border-left-color: var(--rg-info);    color: #1565c0; }
.alert-success { background: rgba(76,175,80,0.07);   border-left-color: var(--rg-success); color: #2e7d32; }
.alert-warning { background: rgba(255,152,0,0.07);   border-left-color: var(--rg-warning); color: #e65100; }
.alert-danger  { background: rgba(244,67,54,0.07);   border-left-color: var(--rg-danger);  color: #c62828; }

/* ---------- Pagination ---------- */
.pagination .page-item .page-link {
    border: 1px solid var(--rg-border); color: var(--rg-text);
    border-radius: 8px; margin: 0 2px; font-size: 13px;
    padding: 0.35rem 0.7rem; transition: var(--rg-transition);
}
.pagination .page-item.active .page-link {
    background: var(--rg-primary); border-color: transparent; color: #fff;
    box-shadow: 0 3px 10px rgba(var(--rg-primary-rgb),0.3);
}
.pagination .page-item .page-link:hover {
    background: rgba(var(--rg-primary-rgb),0.08);
    color: var(--rg-primary); border-color: var(--rg-primary);
}

/* ---------- Modal ---------- */
.modal-content {
    border: none; border-radius: var(--rg-radius-lg);
    box-shadow: 0 20px 60px rgba(0,0,0,0.18); overflow: hidden;
}
.modal-header {
    background: var(--rg-primary); color: #fff;
    border: none; padding: 1rem 1.4rem;
}
.modal-header .modal-title { font-weight: 600; color: #fff; }
.modal-header .close, .modal-header .btn-close { color: #fff; opacity: 0.8; }
.modal-body { padding: 1.4rem; }
.modal-footer { border-top: 1px solid var(--rg-border); padding: 0.7rem 1.4rem; }

/* ---------- Footer ---------- */
footer, .footer-container {
    background: var(--rg-dark); color: rgba(255,255,255,0.65);
    padding: 2.5rem 0 1.5rem;
}
footer a { color: rgba(255,255,255,0.65); transition: var(--rg-transition); }
footer a:hover { color: #fff; }
footer .social-icons a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,0.08); margin: 0 3px;
    transition: var(--rg-transition);
}
footer .social-icons a:hover {
    background: var(--rg-primary); transform: translateY(-2px);
}

/* ---------- Login / Register ---------- */
.login-container, .register-container { max-width: 460px; margin: 3rem auto; }
.login-container .card, .register-container .card {
    border-radius: var(--rg-radius-lg);
    box-shadow: 0 10px 40px rgba(0,0,0,0.08); border: none;
}
.login-container .card-header, .register-container .card-header {
    background: var(--rg-primary); color: #fff;
    text-align: center; padding: 1.4rem; border: none;
}
.login-container .card-header h3, .register-container .card-header h3 { color: #fff; margin: 0; }

/* ---------- Domain Search ---------- */
.domain-search-container {
    background: var(--rg-primary); border-radius: var(--rg-radius-lg);
    padding: 2.5rem; margin-bottom: 2rem;
}
.domain-search-container h2, .domain-search-container h3 { color: #fff; }

/* ---------- Dark Mode Toggle ---------- */
.rg-dark-toggle {
    cursor: pointer; padding: 0.35rem 0.75rem; border-radius: 20px;
    background: rgba(255,255,255,0.08); border: none;
    color: rgba(255,255,255,0.75); font-size: 13.5px;
    transition: var(--rg-transition);
    display: flex; align-items: center; gap: 5px;
}
.rg-dark-toggle:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* ---------- Animations ---------- */
@keyframes rgFadeInUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes rgFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: var(--rg-body-bg); }
::-webkit-scrollbar-thumb { background: var(--rg-primary-light); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--rg-primary); }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .navbar { padding: 0.4rem 1rem; }
}
@media (max-width: 767px) {
    .domain-search-container { padding: 1.5rem; }
    .login-container, .register-container { margin: 1.5rem auto; padding: 0 1rem; }
}

/* ==========================================================================
   FIXES APPENDED — portal UI issues
   ========================================================================== */

/* ---- Hide stuck Pace.js progress bar (prevents the empty red bar on invoice page) ---- */
.pace, .pace-progress, .pace-activity, .pace-inactive { display: none !important; }

/* ---- Hide empty alerts that WHMCS sometimes renders with no content ---- */
.alert:empty { display: none !important; }

/* ---- Dashboard stat cards (Services / Domains / Tickets / Invoices) ---- */
/* WHMCS renders these as a plain row of columns; wrap each in a subtle card */
.home-shortcuts,
.client-home-panels,
.panel-dashboard,
.widget-content > .row.text-center {
    background: var(--rg-card-bg);
    border: 1px solid var(--rg-border);
    border-radius: var(--rg-radius-lg);
    box-shadow: var(--rg-shadow);
    padding: 1.2rem 0.5rem;
    margin-bottom: 1.5rem;
}
.home-shortcuts .col-sm-3,
.home-shortcuts .col-md-3,
.client-home-panels .col-sm-3,
.client-home-panels .col-md-3 {
    border-right: 1px solid var(--rg-border);
}
.home-shortcuts .col-sm-3:last-child,
.home-shortcuts .col-md-3:last-child,
.client-home-panels .col-sm-3:last-child,
.client-home-panels .col-md-3:last-child {
    border-right: none;
}
/* Accessibility: numbers visible in both modes */
.home-shortcuts h3, .home-shortcuts h4,
.client-home-panels h3, .client-home-panels h4 { color: var(--rg-primary); }

/* ---- "Submit Payment" button: hide duplicate "Please Wait…" label that WHMCS leaves visible ---- */
/* WHMCS inserts a second label span used during submit; hide it until the form is submitting */
.btn .loading-text,
.btn [data-loading],
button[type="submit"] .btn-loading:not(.show),
input[type="submit"][data-loading-text] + .btn-loading { display: none !important; }

/* ---- Invoice pay-form safety: ensure submit button renders cleanly ---- */
#btnSubmitPayment .loading,
#btnSubmit .loading,
.payment-buttons .loading { display: none !important; }

/* ==========================================================================
   FAQ ACCORDION — moved from homepage.css so it always loads
   ========================================================================== */
.rg-faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
}
.rg-faq-list .rg-faq-item {
    background: #f8f9fa;
    border: 1px solid #e2e5ea;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    list-style: none;
}
.rg-faq-list .rg-faq-item.active {
    background: #fff;
    border-color: var(--rg-primary);
    box-shadow: 0 6px 24px rgba(76,175,80,0.12);
}
.rg-faq-list .rg-faq-q {
    all: unset;
    box-sizing: border-box;
    display: flex;
    width: 100%;
    padding: 1.1rem 1.3rem;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: var(--rg-font);
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    text-align: left;
    background: transparent;
    border: none;
    appearance: none;
    -webkit-appearance: none;
}
.rg-faq-list .rg-faq-q:hover { color: var(--rg-primary); }
.rg-faq-list .rg-faq-q:focus { outline: 2px solid rgba(76,175,80,0.3); outline-offset: -2px; }
.rg-faq-list .rg-faq-q > span { flex: 1; padding-right: 1rem; }
.rg-faq-list .rg-faq-q i {
    font-size: 13px;
    transition: transform 0.3s ease;
    color: #6b7280;
    flex-shrink: 0;
}
.rg-faq-list .rg-faq-item.active .rg-faq-q i {
    transform: rotate(180deg);
    color: var(--rg-primary);
}
.rg-faq-list .rg-faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0 1.3rem;
}
.rg-faq-list .rg-faq-item.active .rg-faq-a {
    max-height: 400px;
    padding: 0 1.3rem 1.1rem;
}
.rg-faq-list .rg-faq-a p {
    font-size: 14.5px;
    color: #4b5563;
    line-height: 1.7;
    margin: 0;
}
body.rg-dark .rg-faq-list .rg-faq-item { background: #1a1a1a; border-color: #2a2a2e; }
body.rg-dark .rg-faq-list .rg-faq-item.active { background: #111; }
body.rg-dark .rg-faq-list .rg-faq-q { color: #e8e8ec; }
body.rg-dark .rg-faq-list .rg-faq-a p { color: #a8a8b3; }

/* ==========================================================================
   Top bar (logged-in users) — notifications + "logged in as"
   ========================================================================== */
.rg-topbar {
    background: #0d0d0d;
    color: rgba(255,255,255,0.65);
    font-size: 12px;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.rg-topbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.rg-topbar-left, .rg-topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.rg-notif-link {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    position: relative;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    transition: background 0.15s ease, color 0.15s ease;
}
.rg-notif-link:hover { color: #fff; background: rgba(255,255,255,0.06); text-decoration: none; }
.rg-notif-link .badge {
    background: var(--rg-primary, #4CAF50);
    color: #fff;
    font-size: 10px;
    padding: 0.15rem 0.35rem;
    border-radius: 10px;
    font-weight: 700;
    min-width: 16px;
    text-align: center;
}
.rg-logged-in {
    color: rgba(255,255,255,0.55);
    font-size: 12px;
}
.rg-logged-in strong { color: rgba(255,255,255,0.9); font-weight: 600; }
.rg-topbar-logout {
    color: rgba(255,255,255,0.55);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    transition: background 0.15s ease, color 0.15s ease;
}
.rg-topbar-logout:hover { color: #fff; background: rgba(255,255,255,0.06); text-decoration: none; }

/* ==========================================================================
   Main nav right-side widgets
   ========================================================================== */
.rg-mainnav .rg-nav-right { gap: 0.25rem; }

/* Search form */
.rg-search-form {
    position: relative;
    margin-right: 0.5rem;
}
.rg-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.4);
    font-size: 12px;
    pointer-events: none;
}
.rg-search-input {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    font-size: 13px;
    padding: 0.4rem 0.75rem 0.4rem 2rem;
    border-radius: 20px;
    width: 200px;
    transition: background 0.15s ease, border-color 0.15s ease, width 0.2s ease;
    outline: none;
}
.rg-search-input::placeholder { color: rgba(255,255,255,0.4); }
.rg-search-input:focus {
    background: rgba(255,255,255,0.12);
    border-color: rgba(76,175,80,0.5);
    width: 240px;
}
@media (max-width: 991px) {
    .rg-search-form { margin: 0.5rem 0; width: 100%; }
    .rg-search-input { width: 100%; }
    .rg-search-input:focus { width: 100%; }
}

/* Cart link */
.rg-cart-link {
    position: relative;
    color: rgba(255,255,255,0.8);
    padding: 0.5rem 0.75rem;
    display: inline-flex;
    align-items: center;
    border-radius: 6px;
    transition: background 0.15s ease, color 0.15s ease;
    margin-right: 0.25rem;
}
.rg-cart-link:hover { color: #fff; background: rgba(255,255,255,0.08); text-decoration: none; }
.rg-cart-link i { font-size: 15px; }
.rg-cart-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--rg-primary, #4CAF50);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    line-height: 1.3;
}

/* Language / currency switcher */
.rg-lang-switch .nav-link {
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    padding: 0.5rem 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.rg-lang-switch .nav-link:hover { color: #fff; }
.rg-lang-switch .rg-lang-flag {
    width: 18px;
    height: 12px;
    display: inline-block;
    background: #888;
    border-radius: 2px;
    vertical-align: middle;
}
.rg-lang-menu {
    min-width: 220px;
    padding: 0.5rem 0;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    border-radius: 8px;
}
.rg-lang-menu .dropdown-header {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    padding: 0.4rem 1rem;
    font-weight: 700;
    margin: 0;
}
.rg-lang-menu .dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 13px;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.rg-lang-menu .dropdown-item:hover { background: #f3f4f6; color: var(--rg-primary, #4CAF50); }
.rg-lang-menu .dropdown-item.active { background: rgba(76,175,80,0.08); color: var(--rg-primary, #4CAF50); font-weight: 600; }
.rg-lang-menu .dropdown-divider { margin: 0.35rem 0; }

/* Account dropdown — sectioned menu */
.rg-account-drop .nav-link {
    color: rgba(255,255,255,0.9);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
}
.rg-account-drop .nav-link:hover { color: #fff; }
.rg-account-drop .nav-link i { font-size: 16px; }
.rg-account-menu {
    min-width: 260px;
    padding: 0.5rem 0;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 8px 24px rgba(0,0,0,0.14);
    border-radius: 8px;
}
.rg-account-menu .dropdown-header {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    padding: 0.6rem 1.1rem 0.35rem;
    font-weight: 700;
    margin: 0;
}
.rg-account-menu .dropdown-item {
    padding: 0.5rem 1.1rem;
    font-size: 13.5px;
    color: #2d2d30;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    transition: background 0.12s ease, color 0.12s ease;
}
.rg-account-menu .dropdown-item i {
    width: 16px;
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
}
.rg-account-menu .dropdown-item:hover {
    background: #f3f4f6;
    color: var(--rg-primary, #4CAF50);
}
.rg-account-menu .dropdown-item:hover i { color: var(--rg-primary, #4CAF50); }
.rg-account-menu .dropdown-item.text-danger { color: #dc2626; }
.rg-account-menu .dropdown-item.text-danger:hover { background: #fef2f2; color: #dc2626; }
.rg-account-menu .dropdown-item.text-danger i { color: #dc2626; }
.rg-account-menu .dropdown-divider { margin: 0.35rem 0; border-color: rgba(0,0,0,0.06); }

/* Dark mode variants for dropdown menus */
body.rg-dark .rg-lang-menu,
body.rg-dark .rg-account-menu {
    background: #1a1a1a;
    border-color: #2a2a2e;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
body.rg-dark .rg-lang-menu .dropdown-header,
body.rg-dark .rg-account-menu .dropdown-header { color: #9ca3af; }
body.rg-dark .rg-lang-menu .dropdown-item,
body.rg-dark .rg-account-menu .dropdown-item { color: #d4d4d8; }
body.rg-dark .rg-lang-menu .dropdown-item:hover,
body.rg-dark .rg-account-menu .dropdown-item:hover { background: #252528; color: var(--rg-primary, #4CAF50); }
body.rg-dark .rg-lang-menu .dropdown-divider,
body.rg-dark .rg-account-menu .dropdown-divider { border-color: rgba(255,255,255,0.08); }

/* Responsive: collapse top bar on small screens */
@media (max-width: 767px) {
    .rg-topbar { font-size: 11px; padding: 0.3rem 0; }
    .rg-topbar .container { flex-direction: column; gap: 0.3rem; }
    .rg-nav-right { flex-wrap: wrap; }
    .rg-search-form { order: 100; }
}

/* ==========================================================================
   Tables — defensive rules for WHMCS invoice/service/domain DataTables
   ========================================================================== */

/* Hide Bootstrap/WHMCS sort-helper spans (ISO dates hidden from visual render). */
.table td .hidden,
.table td .d-none,
.table td .sr-only,
.table td .visually-hidden,
.dataTable td .hidden,
.dataTable td .d-none,
.dataTable td .sr-only,
.dataTable td .visually-hidden { display: none !important; }

/* Make DataTable rows feel clickable once JS has wired them. */
body.clientareainvoices .table tbody tr,
body.clientareaproducts .table tbody tr,
body.clientareadomains  .table tbody tr {
    transition: background-color 0.12s ease;
}
body.clientareainvoices .table tbody tr:hover,
body.clientareaproducts .table tbody tr:hover,
body.clientareadomains  .table tbody tr:hover {
    background: rgba(76,175,80,0.06);
}
body.rg-dark.clientareainvoices .table tbody tr:hover,
body.rg-dark.clientareaproducts .table tbody tr:hover,
body.rg-dark.clientareadomains  .table tbody tr:hover {
    background: rgba(76,175,80,0.12);
}

/* ==========================================================================
   FAQ accordion — HIGH-SPECIFICITY override in case parent CSS bleeds in.
   Guards against stale browser cache or rogue form-control rules.
   ========================================================================== */
body .rg-faq-list button.rg-faq-q,
body .rg-faq-list .rg-faq-q {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    color: #1a1a1a;
    cursor: pointer;
    display: flex !important;
    width: 100% !important;
    padding: 1.1rem 1.3rem !important;
    justify-content: space-between;
    align-items: center;
    font-family: var(--rg-font) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-align: left !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    outline: none;
}
body .rg-faq-list button.rg-faq-q::-webkit-details-marker,
body .rg-faq-list .rg-faq-q::-webkit-details-marker { display: none; }

/* ==========================================================================
   Search + account dropdown refinements (v1.0.5)
   ========================================================================== */

/* Wider search so placeholder fits */
.rg-search-input { width: 300px; }
.rg-search-input:focus { width: 340px; }
@media (max-width: 1199px) {
    .rg-search-input { width: 240px; }
    .rg-search-input:focus { width: 280px; }
}
@media (max-width: 991px) {
    .rg-search-input, .rg-search-input:focus { width: 100%; }
}

/* Widen account dropdown to fit chip rows */
.rg-account-menu { min-width: 300px; }

/* Static label rows inside the dropdown (non-clickable descriptors) */
.rg-account-menu .dropdown-item-static {
    padding: 0.5rem 1.1rem 0.25rem;
    font-size: 13px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.rg-account-menu .dropdown-item-static i { width: 16px; text-align: center; color: #9ca3af; }
.rg-account-menu .dropdown-item-static strong { color: #2d2d30; font-weight: 600; margin-left: auto; }

/* Dark-toggle as a dropdown item (logged-in users) */
.rg-account-menu #rgDarkToggleMenu i { transition: transform 0.25s ease; }
body.rg-dark .rg-account-menu #rgDarkToggleMenu i { color: #ffcd4a; }

/* Chip-row for inline language & currency choices */
.rg-account-menu .dropdown-submenu { padding-bottom: 0.35rem; }
.rg-account-menu .rg-inline-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    padding: 0.1rem 1.1rem 0.55rem;
}
.rg-account-menu .rg-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.7rem;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    text-decoration: none !important;
    transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.rg-account-menu .rg-chip:hover {
    background: #e8f5e9;
    border-color: rgba(76,175,80,0.35);
    color: var(--rg-primary, #4CAF50);
}
.rg-account-menu .rg-chip.active {
    background: var(--rg-primary, #4CAF50);
    border-color: var(--rg-primary, #4CAF50);
    color: #fff;
}
body.rg-dark .rg-account-menu .dropdown-item-static { color: #9ca3af; }
body.rg-dark .rg-account-menu .dropdown-item-static strong { color: #e8e8ec; }
body.rg-dark .rg-account-menu .rg-chip {
    background: #252528;
    border-color: #2a2a2e;
    color: #d4d4d8;
}
body.rg-dark .rg-account-menu .rg-chip:hover {
    background: #2d3b2e;
    border-color: rgba(76,175,80,0.5);
    color: var(--rg-primary, #4CAF50);
}

/* Payment Methods page: give the form card some breathing room */
body.clientareapaymentmethods .card,
body.clientareapaymentmethodsadd .card { border-radius: 10px; }

/* Kill orphan empty boxes below payment forms (belt-and-braces; JS also handles) */
form .card:empty, form .well:empty, form .panel:empty { display: none !important; }

/* ==========================================================================
   v1.0.6 — Preference selects, tighter account menu, Create Ticket btn
   ========================================================================== */

/* Retire the old chip rows (kept selector for safety if cache serves old TPL) */
.rg-account-menu .rg-inline-choices { display: none !important; }

/* Language / currency SELECT rows inside account dropdown */
.rg-account-menu .rg-pref-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1.1rem;
    font-size: 13px;
}
.rg-account-menu .rg-pref-label {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
    margin: 0;
    min-width: 80px;
}
.rg-account-menu .rg-pref-label i { width: 16px; text-align: center; color: #9ca3af; font-size: 13px; }
.rg-account-menu .rg-pref-select {
    flex: 1 1 auto;
    padding: 0.35rem 0.6rem;
    font-size: 13px;
    color: #2d2d30;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    outline: none;
    max-width: 180px;
}
.rg-account-menu .rg-pref-select:focus {
    border-color: var(--rg-primary, #4CAF50);
    box-shadow: 0 0 0 3px rgba(76,175,80,0.15);
}
body.rg-dark .rg-account-menu .rg-pref-label { color: #9ca3af; }
body.rg-dark .rg-account-menu .rg-pref-select {
    background: #1a1a1a;
    border-color: #2a2a2e;
    color: #e8e8ec;
}

/* Create Ticket button */
.rg-create-ticket-btn {
    padding: 0.5rem 1.1rem;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    margin-left: auto;
}
.rg-create-ticket-floating {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10;
}
.main-content { position: relative; }

/* Tidy: when a container has Create Ticket btn alongside a heading */
.main-content h1:has(.rg-create-ticket-btn),
.main-content h2:has(.rg-create-ticket-btn) { margin-bottom: 1rem; }
