/* ============================================
   GLOBAL BASE STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

/* Remove any old background colors */
.main-content,
.content-wrapper,
.page-wrapper,
#main-body {
    background: var(--bg-primary) !important;
}

/* Container backgrounds */
.container,
.container-fluid {
    background: transparent;
}

/* ============================================
   CARD COMPONENTS
   ============================================ */

.card,
.panel,
.box,
.widget {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}

.card:hover,
.panel:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.card-header,
.panel-heading {
    background: transparent !important;
    border-bottom: none !important;
    color: var(--text-primary) !important;
    padding: 20px;
}

.card-body,
.panel-body {
    background: transparent !important;
    color: var(--text-secondary);
    padding: 25px;
}

.card-footer,
.panel-footer {
    background: transparent !important;
    border-top: none !important;
    padding: 15px 20px;
}

/* ============================================
   SIDEBAR NAVIGATION
   ============================================ */

.sidebar,
.sidebar-menu,
.main-sidebar {
    background: var(--bg-sidebar) !important;
    border-right: none !important;
}

.sidebar-menu li a,
.nav-link {
    color: var(--text-secondary) !important;
    transition: var(--transition-normal);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    margin: 4px 8px;
}

.sidebar-menu li a:hover,
.nav-link:hover {
    color: var(--text-primary) !important;
    background: rgba(0, 102, 255, 0.1) !important;
}

.sidebar-menu li.active a,
.nav-link.active {
    color: var(--text-primary) !important;
    background: var(--accent-blue) !important;
    box-shadow: var(--shadow-glow);
}

/* ============================================
   BUTTONS
   ============================================ */

/* Primary Buttons */
.btn-primary,
.btn-success,
button[type="submit"] {
    background: var(--accent-blue) !important;
    border: 2px solid var(--accent-blue) !important;
    color: var(--text-primary) !important;
    padding: 12px 30px;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover,
.btn-success:hover {
    background: var(--accent-blue-dark) !important;
    border-color: var(--accent-blue-dark) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-hover);
}

/* Secondary Buttons */
.btn-secondary,
.btn-default,
.btn-outline {
    background: transparent !important;
    border: 2px solid var(--accent-blue) !important;
    color: var(--accent-blue) !important;
    padding: 12px 30px;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: var(--transition-normal);
}

.btn-secondary:hover,
.btn-default:hover {
    background: var(--accent-blue) !important;
    color: var(--text-primary) !important;
}

/* Danger Buttons */
.btn-danger,
.btn-delete {
    background: var(--error) !important;
    border: 2px solid var(--error) !important;
    color: var(--text-primary) !important;
}

.btn-danger:hover {
    background: #e63946 !important;
    border-color: #e63946 !important;
}

/* Link Buttons */
.btn-link {
    color: var(--accent-blue) !important;
    text-decoration: none;
}

.btn-link:hover {
    color: var(--accent-blue-light) !important;
    text-decoration: underline;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
}

.form-control:focus,
input:focus,
textarea:focus,
select:focus {
    background: var(--bg-card) !important;
    border-color: var(--accent-blue) !important;
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-blue-glow);
}

.form-control::placeholder,
input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

.form-label,
label {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 8px;
}

/* ============================================
   TABLES
   ============================================ */

.table,
table {
    background: var(--bg-card) !important;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.table thead,
table thead {
    background: var(--bg-secondary) !important;
}

.table th,
table th {
    color: var(--text-primary) !important;
    border: none !important;
    padding: 15px;
}

.table td,
table td {
    color: var(--text-secondary) !important;
    border: none !important;
    padding: 12px 15px;
}

.table tbody tr:hover,
table tbody tr:hover {
    background: rgba(0, 102, 255, 0.05) !important;
}

/* ============================================
   NAVIGATION & HEADER
   ============================================ */

.navbar,
.header,
.top-nav {
    background: var(--bg-secondary) !important;
    border-bottom: none !important;
    box-shadow: var(--shadow-sm);
}

.navbar-brand,
.logo {
    color: var(--text-primary) !important;
}

.navbar-nav .nav-link {
    color: var(--text-secondary) !important;
    padding: 10px 18px;
    transition: var(--transition-normal);
}

.navbar-nav .nav-link:hover {
    color: var(--text-primary) !important;
    background: rgba(0, 102, 255, 0.1);
    border-radius: var(--radius-md);
}

.navbar-nav .nav-link.active {
    color: var(--accent-blue) !important;
}

/* ============================================
   DROPDOWNS
   ============================================ */

.dropdown-menu {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.dropdown-item {
    color: var(--text-secondary) !important;
    transition: var(--transition-fast);
}

.dropdown-item:hover {
    background: rgba(0, 102, 255, 0.1) !important;
    color: var(--text-primary) !important;
    cursor: pointer;
}

.dropdown-divider {
    border-color: var(--divider-color) !important;
}

/* ============================================
   MODALS
   ============================================ */

.modal-content {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background: var(--bg-secondary) !important;
    border-bottom: none !important;
    color: var(--text-primary);
}

.modal-body {
    background: var(--bg-card) !important;
    color: var(--text-secondary);
}

.modal-footer {
    background: var(--bg-secondary) !important;
    border-top: none !important;
}

.close,
.modal-close {
    color: var(--text-primary) !important;
    opacity: 0.8;
}

.close:hover {
    opacity: 1;
    color: var(--accent-blue) !important;
}

/* ============================================
   ALERTS & NOTIFICATIONS
   ============================================ */

.alert {
    border-radius: var(--radius-md);
    border: 1px solid;
    padding: 15px 20px;
}

.alert-success {
    background: rgba(0, 208, 132, 0.1) !important;
    border-color: var(--success) !important;
    color: var(--success) !important;
}

.alert-warning {
    background: rgba(255, 184, 0, 0.1) !important;
    border-color: var(--warning) !important;
    color: var(--warning) !important;
}

.alert-danger,
.alert-error {
    background: rgba(255, 71, 87, 0.1) !important;
    border-color: var(--error) !important;
    color: var(--error) !important;
}

.alert-info {
    background: rgba(0, 102, 255, 0.1) !important;
    border-color: var(--info) !important;
    color: var(--info) !important;
}

/* ============================================
   BADGES & LABELS
   ============================================ */

.badge,
.label {
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 13px;
}

.badge-primary {
    background: var(--accent-blue) !important;
    color: var(--text-primary);
}

.badge-success {
    background: var(--success) !important;
    color: var(--text-primary);
}

.badge-warning {
    background: var(--warning) !important;
    color: #000;
}

.badge-danger {
    background: var(--error) !important;
    color: var(--text-primary);
}

/* ============================================
   LINKS
   ============================================ */

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--accent-blue-light);
    text-decoration: none;
}

/* ============================================
   HEADINGS
   ============================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary) !important;
    font-weight: 600;
}

p {
    color: var(--text-secondary);
}

/* ============================================
   PRICING TABLES (Store Pages)
   ============================================ */

.pricing-card,
.product-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}

.pricing-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
    transform: translateY(-5px);
}

/* ============================================
   CLIENT AREA SPECIFIC
   ============================================ */

.client-area-sidebar,
.clientarea-sidebar {
    background: var(--bg-sidebar) !important;
}

.dashboard-widget,
.stats-widget {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
}

/* ============================================
   FOOTER
   ============================================ */

.footer,
.main-footer {
    background: var(--bg-secondary) !important;
    border-top: none !important;
    color: var(--text-secondary);
    padding: 30px 0;
}

.footer a {
    color: var(--text-secondary);
}

.footer a:hover {
    color: var(--accent-blue);
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-blue);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-blue-light);
}

/* ============================================
   CATEGORY TABS (Store Page)
   ============================================ */

.categories-section,
.product-categories {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: var(--radius-lg);
    margin-bottom: 30px;
}

.categories-title {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-tabs,
.product-group-tabs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-tab,
.product-group-tab {
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-align: left;
    cursor: pointer;
    transition: var(--transition-normal);
    font-size: 15px;
    font-weight: 500;
}

.category-tab:hover {
    background: rgba(0, 102, 255, 0.1);
    color: var(--text-primary);
}

.category-tab.active {
    background: var(--accent-blue) !important;
    color: var(--text-primary) !important;
    box-shadow: var(--shadow-glow);
}

/* ============================================
   FOCUSED UPDATE: HEADER & SIDEBAR COLORS
   Matches Store Page Pricing Cards (#0a0d27)
   ============================================ */

/* 1. TOP HEADER STYLING */
.header-container,
.top-header,
.navbar,
.main-header,
header,
.flicko-header {
    /* Added specific class */
    background: #0a0d27 !important;
    border-bottom: none !important;
    padding: 15px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.header-links a,
.navbar-nav a,
.nav-link,
.header-link,
/* Added specific class */
.header-dropdown-btn {
    /* Added specific class */
    color: #8b9dc3 !important;
}

.header-links a:hover,
.navbar-nav a:hover,
.nav-link:hover,
.header-link:hover,
.header-dropdown-btn:hover {
    color: #ffffff !important;
    background: rgba(0, 102, 255, 0.1) !important;
}

/* 2. SIDEBAR NAVIGATION STYLING */
/* Note: .sidebar width/padding is owned by head.tpl inline styles (210px).
   Do not set width/padding here or it overrides the responsive sidebar. */
.main-sidebar,
.left-sidebar,
.clientarea-sidebar,
.flicko-sidebar {
    background: #0a0d27 !important;
    border-right: 1px solid rgba(0, 102, 255, 0.2) !important;
}

.sidebar-menu a,
.menu-item a,
.sidebar-link {
    color: #8b9dc3 !important;
    background: transparent;
    /* Reset default */
}

.sidebar-menu a:hover,
.menu-item a:hover,
.sidebar-link:hover {
    color: #ffffff !important;
    background: rgba(0, 102, 255, 0.1) !important;
}

.sidebar-menu li.active a,
.menu-item.active a,
.sidebar-link.active {
    background: #0066FF !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
}

/* 3. LAYOUT & RESPONSIVE FIXES */
body {
    background: #0a0d27 !important;
    /* Keep main background */
}

@media (max-width: 768px) {
    .flicko-sidebar {
        background: #0a0d27 !important;
    }
}

/* ============================================
   ALIGNMENT FIX: SIDEBAR LOGO & HEADER
   Ensures continuous top bar ("Same Line")
   ============================================ */

:root {
    --header-height: 70px;
    /* Enforce global height var */
}

/* 1. Header Dimensions */
.flicko-header,
.header-container,
.top-header {
    height: var(--header-height) !important;
    min-height: var(--header-height) !important;
    padding: 0 15px !important;
    /* Reset padding to align content */
    display: flex !important;
    align-items: center !important;
}

/* 2. Sidebar Logo Alignment */
.sidebar-logo,
.logo-container {
    height: var(--header-height) !important;
    min-height: var(--header-height) !important;
    background: #0a0d27 !important;
    /* Match Header */
    border-bottom: none !important;
    /* Match Header Border */
    border-right: none !important;
    /* Remove Sidebar Border */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* 3. Ensure Logo Image Fits */
.sidebar-logo img {
    max-height: 40px !important;
    /* Ensure it fits in 70px header */
    width: auto !important;
}

/* 4. Sidebar Top Positioning */
.flicko-sidebar,
.sidebar {
    padding-top: 0 !important;
    /* Remove top padding so logo hits top */
}

/* 5. Fix Mobile Sidebar Header overlap */
@media (max-width: 768px) {
    .sidebar-logo {
        display: none !important;
        /* Usually hidden on mobile or handled differently */
    }
}

/* ============================================
   GLOBAL DESIGN UPDATE (Blue Icons & Dark Theme)
   ============================================ */

/* Force Checkmark Icons to Blue */
.fa-check,
.fa-check-circle,
.fas.fa-check {
    color: var(--accent-blue) !important;
}

/* General Icons - Subtle by default, Blue on hover/active */
i,
.fas,
.fab,
.far {
    transition: color 0.3s ease;
}

/* Header Styling */
.header,
.navbar,
.main-header,
.flicko-header {
    background: var(--bg-card) !important;
    /* Dark Navy #0a0d27 */
    border-bottom: none !important;
}

/* Footer Styling */
.footer,
.main-footer,
#footer {
    background: #0a0d27 !important;
    /* Dark Navy - Seamless match to body */
    border-top: none !important;
    /* Remove separator */
    box-shadow: none !important;
}

/* Navbar Links */
.navbar-nav .nav-link,
.header .nav-item a {
    color: var(--text-secondary) !important;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active,
.header .nav-item a:hover {
    color: var(--accent-blue) !important;
}

/* Button Primary Override */
.btn-primary {
    background-color: var(--accent-blue) !important;
    border-color: var(--accent-blue) !important;
}

.btn-primary:hover {
    background-color: var(--accent-blue-dark) !important;
    border-color: var(--accent-blue-dark) !important;
}

/* Pagination / Active States */
.pagination .page-item.active .page-link {
    background-color: var(--accent-blue) !important;
    border-color: var(--accent-blue) !important;
}

/* ============================================
   REMOVE LEFT SIDE BLUE BORDER (User Request)
   ============================================ */

/* Remove left border from body and main wrappers */
body,
.page-wrapper,
.page-container,
.main-container,
.wrapper,
#wrapper,
.container-fluid,
.content,
.main-content {
    border-left: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Remove any decorative pseudo-elements */
body::before,
body::after,
.page-wrapper::before,
.page-wrapper::after {
    display: none !important;
    border: none !important;
    content: none !important;
}

/* Targeted left border removal - only for layout containers, not cards/forms */
.page-wrapper,
body,
.wrapper,
.main-container {
    border-left: none !important;
}

/* ============================================
   MOBILE SIDEBAR TOGGLE
   ============================================ */

/* Sidebar mobile behavior is owned by head.tpl inline styles.
   Keep only the overlay rules here. */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    display: none;
}

.sidebar-overlay.active {
    display: block !important;
}

/* ============================================
   FIX BORDER CLIPPING
   ============================================ */

/* Ensure borders are not clipped on main containers */
.main-content,
.content-wrapper,
.page-wrapper,
.container,
.container-fluid,
.logincontainer,
.reset-card,
.form-container {
    overflow: visible !important;
}

/* Fix input focus border visibility */
input:focus,
textarea:focus,
select:focus,
.form-control:focus {
    outline: none !important;
    border: 2px solid #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

/* Account dropdown border fix */
.dropdown-toggle:focus,
.dropdown-toggle.show {
    border: 1px solid #3b82f6 !important;
    box-shadow: none !important;
}

/* ============================================
   EXPLICIT VISIBLE BORDERS FOR CARDS/FORMS
   ============================================ */

/* Reset card and login cards - ensure full border is visible */
.reset-card,
.login-card,
.logincontainer .card,
.logincontainer>div[style*="border"] {
    border: 2px solid #3b82f6 !important;
    border-left: 2px solid #3b82f6 !important;
    border-right: 2px solid #3b82f6 !important;
    border-top: 2px solid #3b82f6 !important;
    border-bottom: 2px solid #3b82f6 !important;
}

/* Pricing cards border */
.pricing-card-modern {
    border: 2px solid #3b82f6 !important;
    border-left: 2px solid #3b82f6 !important;
    border-right: 2px solid #3b82f6 !important;
}
/* Autofill Override */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #0a0d27 inset !important;
    -webkit-text-fill-color: #ffffff !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Enforce Password Strength Colors */
.bg-danger { background-color: #dc3545 !important; }
.text-danger { color: #dc3545 !important; }

.bg-warning { background-color: #ffc107 !important; }
.text-warning { color: #ffc107 !important; }

.bg-success { background-color: #198754 !important; }
.text-success { color: #198754 !important; }

/* Success Modal Styling override */
#modalPasswordSuccess .modal-content {
    background: #0d1224; /* Dark Background */
    border: 1px solid #198754; /* Green Border */
}
#modalPasswordSuccess .fa-check-circle {
    color: #198754;
    text-shadow: 0 0 20px rgba(25, 135, 84, 0.4);
}

/* Creative Primary Button */
.btn-creative-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0dcaf0 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(13, 202, 240, 0.3);
}

.btn-creative-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 202, 240, 0.5);
    color: #fff;
}

.btn-creative-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(13, 202, 240, 0.4);
}

/* Modal Responsiveness */
@media (max-width: 576px) {
    #modalFlickoGeneratePassword .modal-footer {
        flex-direction: column-reverse; /* Put primary action on top/bottom as preferred, usually top or full width */
        gap: 10px;
    }
    #modalFlickoGeneratePassword .modal-footer .btn {
        width: 100%;
        margin: 0;
    }
}

/* Affiliate Page Customizations */
@media (max-width: 768px) {
    .aff-link-card {
        padding: 20px !important;
    }
    .aff-link-card h3 {
        font-size: 1.25rem !important;
    }
    .aff-stat-card {
        margin-bottom: 15px;
    }
}

/* Global Mobile Overflow Fix */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

.page-wrapper,
.main-area,
.main-content {
    overflow-x: hidden;
    max-width: 100%;
}

@media (max-width: 480px) {
    .main-content {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    .container, .container-fluid {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    .row {
        margin-left: -6px !important;
        margin-right: -6px !important;
    }
    .row > * {
        padding-left: 6px !important;
        padding-right: 6px !important;
    }
}

/* 404 Page Responsiveness (within main layout) */
.error-page-container {
    text-align: center;
    padding: 40px 20px;
}

.error-page-container .error-code {
    font-size: clamp(60px, 20vw, 140px);
    font-weight: 700;
    background: linear-gradient(135deg, #4F7DF3 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 20px;
}

@media (max-width: 480px) {
    .error-page-container {
        padding: 20px 10px;
    }
    .error-page-container .error-code {
        font-size: 80px;
    }
    .error-page-container h1 {
        font-size: 20px !important;
    }
    .error-page-container p {
        font-size: 13px !important;
    }
    .error-page-container .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Submit Ticket Success Page Button Fix */
.ticket-created .btn,
.ticket-success .btn,
form[action*="submitticket"] .btn,
.submitticket .btn {
    color: #fff !important;
}

.btn-outline-secondary,
.btn-outline-primary {
    color: #3b82f6 !important;
    border-color: #3b82f6 !important;
}
.btn-outline-secondary:hover,
.btn-outline-primary:hover {
    background: #3b82f6 !important;
    color: #fff !important;
}

/* Ensure all buttons have visible text */
.btn:empty::after {
    content: "View Ticket";
}

/* ============================================
   ACCOUNT DROPDOWN MENU
   (extracted from header.tpl inline styles)
   ============================================ */

.account-chev {
    font-size: 10px;
    margin-left: 4px;
}

.account-menu {
    background: var(--bg-primary);
    border: 2px solid var(--accent-blue);
    border-radius: var(--radius-lg);
    padding: 0;
    min-width: 280px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.account-menu-profile {
    background: linear-gradient(135deg, #1e3a5f 0%, var(--bg-primary) 100%);
    padding: 24px 20px;
    border-bottom: 1px solid rgba(79,125,243,0.3);
    display: flex;
    align-items: center;
    gap: 14px;
}

.account-menu-profile--guest {
    text-align: center;
    display: block;
}

.account-menu-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 20px;
    flex-shrink: 0;
}

.account-menu-avatar--guest {
    width: 60px;
    height: 60px;
    background: rgba(79,125,243,0.2);
    color: var(--accent-blue);
    margin: 0 auto 12px;
    font-size: 24px;
}

.account-menu-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 16px;
}

.account-menu-email {
    color: var(--text-muted);
    font-size: 13px;
}

.account-menu-section {
    padding: 12px 0;
}

.account-menu-section--bordered {
    border-top: 1px solid var(--divider-color);
}

.account-menu-section--center {
    text-align: center;
    padding: 12px 20px;
}

.account-menu-section-title {
    padding: 8px 20px;
    color: var(--text-disabled);
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.account-menu-item {
    color: var(--text-primary) !important;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-menu-item i {
    color: var(--accent-blue);
    width: 18px;
}

.account-menu-item--danger {
    color: var(--error) !important;
}

.account-menu-item--danger i {
    color: var(--error);
}

.account-menu-actions {
    padding: 16px 20px;
}

.account-menu-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 10px;
    transition: var(--transition-fast);
}

.account-menu-btn:last-child {
    margin-bottom: 0;
}

.account-menu-btn--primary {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-dark));
    color: var(--text-primary);
}

.account-menu-btn--primary:hover {
    color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}

.account-menu-btn--outline {
    background: transparent;
    border: 1px solid var(--accent-blue);
    color: var(--accent-blue);
}

.account-menu-btn--outline:hover {
    background: var(--accent-blue);
    color: var(--text-primary);
}

.account-menu-forgot {
    color: var(--text-muted);
    font-size: 13px;
    text-decoration: none;
}

.account-menu-forgot i {
    color: var(--accent-blue);
}

/* ============================================
   ORDER FORM (WHMCS standard_cart) — PRODUCT CARD FIXES
   Makes product names readable on the online site.
   ============================================ */

/* Force every product card title to white */
#order-standard_cart .product h1,
#order-standard_cart .product h2,
#order-standard_cart .product h3,
#order-standard_cart .product h4,
#order-standard_cart .product h5,
#order-standard_cart .product header,
#order-standard_cart .product header *,
#order-standard_cart .product .panel-heading,
#order-standard_cart .product .panel-heading *,
#order-standard_cart .product .panel-title,
#order-standard_cart .product .product-name,
#order-standard_cart .product-name,
.main-content .product h1,
.main-content .product h2,
.main-content .product h3,
.main-content .product h4,
.main-content .product header,
.main-content .product header *,
.main-content .product .panel-heading,
.main-content .product .panel-heading *,
.main-content .product .panel-title,
.product-name,
.product .product-name,
.product-card .product-name,
.product-card-title {
    color: #ffffff !important;
    text-shadow: none !important;
    opacity: 1 !important;
    background: transparent !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Plan body text (features) — readable gray */
#order-standard_cart .product,
#order-standard_cart .product p,
#order-standard_cart .product li,
#order-standard_cart .product .panel-body,
#order-standard_cart .product .product-desc,
.main-content .product p,
.main-content .product li {
    color: #c8d0e0 !important;
}

/* Card container — dark navy */
#order-standard_cart .product,
.main-content .product,
.product-card,
.product.panel,
.panel.product {
    background: #0a0d27 !important;
    border: 1px solid rgba(79,125,243,0.35) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 18px rgba(0,0,0,0.35) !important;
    color: #ffffff !important;
}

#order-standard_cart .product:hover,
.main-content .product:hover,
.product-card:hover {
    border-color: #4F7DF3 !important;
    box-shadow: 0 8px 28px rgba(79,125,243,0.25) !important;
}

/* Price block */
#order-standard_cart .product .price,
#order-standard_cart .product .product-price,
.product .price,
.product-price,
.product-card .price {
    color: #ffffff !important;
    font-weight: 700 !important;
}

#order-standard_cart .product .billing-cycle,
.product .billing-cycle,
.product-cycle {
    color: #8b9dc3 !important;
}

/* Order button */
#order-standard_cart .product .btn,
#order-standard_cart .product a.btn-primary,
.product .btn-primary,
.product-card .btn-primary,
.btn-order {
    background: #4F7DF3 !important;
    border: 1px solid #4F7DF3 !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
}

#order-standard_cart .product .btn:hover,
.product .btn-primary:hover {
    background: #3B5FC7 !important;
    border-color: #3B5FC7 !important;
    color: #ffffff !important;
}

/* ============================================
   SUBMIT TICKET / SUPPORT FORMS
   ============================================ */

/* Wrap the ticket form in a soft card */
#main-body form[action*="submitticket.php"],
.main-content form[action*="submitticket.php"] {
    background: linear-gradient(160deg, #11163a 0%, #0a0d27 100%);
    border: 1px solid rgba(79, 125, 243, 0.18);
    border-radius: 16px;
    padding: 32px 32px 28px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
    max-width: 1100px;
    margin: 10px auto 30px;
}

/* Field labels */
.main-content form[action*="submitticket.php"] label,
form[action*="submitticket.php"] label {
    color: #c8d0e0 !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 8px !important;
    display: block;
}

/* Inputs / selects / textarea inside the ticket form — visible blue border on every field */
form[action*="submitticket.php"] input[type="text"],
form[action*="submitticket.php"] input[type="email"],
form[action*="submitticket.php"] input[type="file"],
form[action*="submitticket.php"] select,
form[action*="submitticket.php"] textarea,
form[action*="submitticket.php"] .form-control {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1.5px solid #4F7DF3 !important;
    border-radius: 10px !important;
    color: #ffffff !important;
    padding: 12px 14px !important;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

form[action*="submitticket.php"] input:hover,
form[action*="submitticket.php"] select:hover,
form[action*="submitticket.php"] textarea:hover,
form[action*="submitticket.php"] .form-control:hover {
    border-color: #6E9BFF !important;
}

form[action*="submitticket.php"] input:focus,
form[action*="submitticket.php"] select:focus,
form[action*="submitticket.php"] textarea:focus,
form[action*="submitticket.php"] .form-control:focus {
    border-color: #6E9BFF !important;
    box-shadow: 0 0 0 3px rgba(79, 125, 243, 0.25) !important;
    background: rgba(79, 125, 243, 0.06) !important;
    outline: none !important;
}

form[action*="submitticket.php"] textarea {
    min-height: 180px;
    resize: vertical;
}

/* Attachment row */
form[action*="submitticket.php"] input[type="file"] {
    padding: 9px 12px !important;
}

form[action*="submitticket.php"] input[type="file"]::-webkit-file-upload-button {
    background: rgba(79, 125, 243, 0.15);
    color: #ffffff;
    border: 1px solid rgba(79, 125, 243, 0.35);
    border-radius: 8px;
    padding: 6px 14px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 12px;
}

form[action*="submitticket.php"] input[type="file"]::-webkit-file-upload-button:hover {
    background: rgba(79, 125, 243, 0.28);
}

/* Submit = solid primary; Cancel = ghost */
form[action*="submitticket.php"] button[type="submit"],
form[action*="submitticket.php"] input[type="submit"],
form[action*="submitticket.php"] .btn-primary {
    background: linear-gradient(135deg, #4F7DF3 0%, #3B5FC7 100%) !important;
    border: 1px solid transparent !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    padding: 12px 36px !important;
    border-radius: 10px !important;
    box-shadow: 0 6px 18px rgba(79, 125, 243, 0.35) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
}

form[action*="submitticket.php"] button[type="submit"]:hover,
form[action*="submitticket.php"] .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(79, 125, 243, 0.5) !important;
    background: linear-gradient(135deg, #5b89ff 0%, #4060ce 100%) !important;
}

form[action*="submitticket.php"] a[href*="clientarea"],
form[action*="submitticket.php"] .btn-default,
form[action*="submitticket.php"] .btn-cancel {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #c8d0e0 !important;
    font-weight: 600 !important;
    padding: 12px 36px !important;
    border-radius: 10px !important;
}

form[action*="submitticket.php"] a[href*="clientarea"]:hover,
form[action*="submitticket.php"] .btn-default:hover {
    border-color: rgba(255, 255, 255, 0.35) !important;
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.03) !important;
}

/* "Add More" attachment button */
form[action*="submitticket.php"] #attachmentContainer .btn,
form[action*="submitticket.php"] button[onclick*="attachment"],
form[action*="submitticket.php"] .add-more,
form[action*="submitticket.php"] a.btn-info {
    background: rgba(79, 125, 243, 0.12) !important;
    border: 1px solid rgba(79, 125, 243, 0.4) !important;
    color: #ffffff !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    padding: 10px 18px !important;
}

form[action*="submitticket.php"] .add-more:hover {
    background: rgba(79, 125, 243, 0.22) !important;
}

/* Help text under attachments */
form[action*="submitticket.php"] small,
form[action*="submitticket.php"] .help-block {
    color: #8b9dc3 !important;
    font-size: 12px !important;
}

/* ============================================
   MARKDOWN EDITOR (SimpleMDE) — used in submit ticket
   ============================================ */
.editor-toolbar {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1.5px solid #4F7DF3 !important;
    border-bottom: none !important;
    border-radius: 10px 10px 0 0 !important;
    padding: 6px 8px !important;
    opacity: 1 !important;
}

.editor-toolbar button,
.editor-toolbar a {
    color: #c8d0e0 !important;
    border: 1px solid transparent !important;
    border-radius: 6px !important;
    width: 30px !important;
    height: 30px !important;
    margin: 0 2px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Force FontAwesome font on every toolbar element so old class-name buttons
   (fa fa-bold, fa fa-italic, etc.) render even when only FA6 is loaded. */
.editor-toolbar a,
.editor-toolbar a::before,
.editor-toolbar button,
.editor-toolbar button::before,
.editor-toolbar [class*="fa-"],
.editor-toolbar [class*="fa-"]::before {
    font-family: "Font Awesome 6 Free", "FontAwesome", "Font Awesome 5 Free" !important;
    font-weight: 900 !important;
    -webkit-font-smoothing: antialiased;
}

.editor-toolbar i.fa,
.editor-toolbar i.fas,
.editor-toolbar i.fa-solid,
.editor-toolbar a.fa,
.editor-toolbar button.fa,
.editor-toolbar button[class*="fa-"],
.editor-toolbar a[class*="fa-"] {
    color: #c8d0e0 !important;
    font-size: 15px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

/* Hide all markdown-toolbar buttons EXCEPT Preview + Help.
   Covers SimpleMDE, EasyMDE, and WHMCS's own markdown-toolbar wrappers. */
.editor-toolbar a,
.editor-toolbar button,
.markdown-editor-toolbar a,
.markdown-editor-toolbar button,
.md-toolbar a,
.md-toolbar button,
.markdown-toolbar a,
.markdown-toolbar button,
[class*="markdown"][class*="toolbar"] a,
[class*="markdown"][class*="toolbar"] button,
[class*="md-toolbar"] a,
[class*="md-toolbar"] button,
[class*="editor-toolbar"] a,
[class*="editor-toolbar"] button {
    display: none !important;
}

/* Re-show Preview + Help only */
.editor-toolbar a.preview,
.editor-toolbar button.preview,
.editor-toolbar a.fa-eye,
.editor-toolbar button.fa-eye,
.editor-toolbar a[title*="Preview" i],
.editor-toolbar button[title*="Preview" i],
.editor-toolbar a.fa-question-circle,
.editor-toolbar button.fa-question-circle,
.editor-toolbar a[title*="Help" i],
.editor-toolbar a[title*="Markdown" i],
[class*="toolbar"] a[title*="Preview" i],
[class*="toolbar"] button[title*="Preview" i],
[class*="toolbar"] a[title*="Help" i],
[class*="toolbar"] button[title*="Help" i],
[class*="toolbar"] a[title*="Markdown" i],
[class*="toolbar"] a.preview,
[class*="toolbar"] button.preview,
[class*="toolbar"] a.fa-eye,
[class*="toolbar"] button.fa-eye,
[class*="toolbar"] a.fa-question-circle,
[class*="toolbar"] button.fa-question-circle {
    display: inline-flex !important;
}

/* Hide separator pipes */
.editor-toolbar i.separator,
[class*="toolbar"] i.separator,
[class*="toolbar"] .separator {
    display: none !important;
}

/* Explicit unicode glyphs for each SimpleMDE toolbar button — guaranteed icons */
.editor-toolbar a.fa-bold::before,
.editor-toolbar button.fa-bold::before        { content: "\f032"; }
.editor-toolbar a.fa-italic::before,
.editor-toolbar button.fa-italic::before      { content: "\f033"; }
.editor-toolbar a.fa-header::before,
.editor-toolbar a.fa-heading::before,
.editor-toolbar button.fa-header::before,
.editor-toolbar button.fa-heading::before     { content: "\f1dc"; }
.editor-toolbar a.fa-quote-left::before,
.editor-toolbar button.fa-quote-left::before  { content: "\f10d"; }
.editor-toolbar a.fa-list-ul::before,
.editor-toolbar button.fa-list-ul::before     { content: "\f0ca"; }
.editor-toolbar a.fa-list-ol::before,
.editor-toolbar button.fa-list-ol::before     { content: "\f0cb"; }
.editor-toolbar a.fa-link::before,
.editor-toolbar button.fa-link::before        { content: "\f0c1"; }
.editor-toolbar a.fa-picture-o::before,
.editor-toolbar a.fa-image::before,
.editor-toolbar button.fa-picture-o::before,
.editor-toolbar button.fa-image::before       { content: "\f03e"; }
.editor-toolbar a.fa-code::before,
.editor-toolbar button.fa-code::before        { content: "\f121"; }
.editor-toolbar a.fa-eye::before,
.editor-toolbar button.fa-eye::before         { content: "\f06e"; }
.editor-toolbar a.fa-question-circle::before,
.editor-toolbar button.fa-question-circle::before { content: "\f059"; }
.editor-toolbar a.fa-columns::before,
.editor-toolbar button.fa-columns::before     { content: "\f0db"; }
.editor-toolbar a.fa-arrows-alt::before,
.editor-toolbar button.fa-arrows-alt::before  { content: "\f0b2"; }

.editor-toolbar [class*="fa-"]::before {
    color: #c8d0e0 !important;
    font-size: 15px !important;
    line-height: 1 !important;
    display: inline-block;
}

.editor-toolbar button:hover {
    background: rgba(79, 125, 243, 0.15) !important;
    border-color: rgba(79, 125, 243, 0.4) !important;
    color: #ffffff !important;
}

.editor-toolbar button.active {
    background: rgba(79, 125, 243, 0.25) !important;
    border-color: #4F7DF3 !important;
    color: #ffffff !important;
}

.editor-toolbar i.separator {
    border-left: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-right: none !important;
    margin: 0 6px !important;
}

/* "Preview" button (named action) */
.editor-toolbar button.preview-action,
.editor-toolbar a.fa-eye,
.editor-toolbar button[title*="Preview"] {
    background: linear-gradient(135deg, #4F7DF3 0%, #3B5FC7 100%) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 0 14px !important;
    width: auto !important;
    font-weight: 600 !important;
}

/* The CodeMirror editor area */
.CodeMirror {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1.5px solid #4F7DF3 !important;
    border-top: none !important;
    border-radius: 0 0 10px 10px !important;
    color: #ffffff !important;
    min-height: 180px !important;
}

.CodeMirror-cursor {
    border-left-color: #ffffff !important;
}

.CodeMirror-selected,
.CodeMirror-focused .CodeMirror-selected {
    background: rgba(79, 125, 243, 0.25) !important;
}

.CodeMirror-line span {
    color: #ffffff !important;
}

/* Status bar under the editor */
.editor-statusbar {
    color: #8b9dc3 !important;
    background: rgba(255, 255, 255, 0.02);
    border: 1.5px solid #4F7DF3;
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 6px 12px;
    margin-top: -1px;
    font-size: 12px;
}

/* SimpleMDE preview pane (shown when Preview button toggled) */
.editor-preview,
.editor-preview-side {
    background: #0a0d27 !important;
    border: 1.5px solid #4F7DF3 !important;
    color: #c8d0e0 !important;
    border-radius: 0 0 10px 10px !important;
    padding: 14px 16px !important;
}

.editor-preview a { color: #4F7DF3 !important; }
.editor-preview code { background: rgba(255,255,255,0.05); color: #6E9BFF; padding: 2px 6px; border-radius: 4px; }

/* ============================================
   CONTACT US PAGE
   ============================================ */
.contact-form-wrapper {
    background: linear-gradient(160deg, #11163a 0%, #0a0d27 100%);
    border: 1px solid rgba(79, 125, 243, 0.18);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
    max-width: 900px;
    margin: 10px auto 30px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.contact-form-wrapper .form-field { margin-bottom: 18px; }

.contact-form-wrapper .form-field label {
    display: block;
    color: #c8d0e0;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 8px;
}

.contact-form-wrapper .form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1.5px solid #4F7DF3 !important;
    border-radius: 10px !important;
    color: #ffffff !important;
    padding: 12px 14px !important;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.contact-form-wrapper .form-control:hover { border-color: #6E9BFF !important; }

.contact-form-wrapper .form-control:focus {
    border-color: #6E9BFF !important;
    box-shadow: 0 0 0 3px rgba(79, 125, 243, 0.25) !important;
    background: rgba(79, 125, 243, 0.06) !important;
    outline: none !important;
}

.contact-form-wrapper textarea.form-control {
    min-height: 180px;
    resize: vertical;
}

.contact-form-wrapper .form-actions {
    text-align: center;
    margin-top: 8px;
}

.contact-form-wrapper .btn-primary {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #4F7DF3 0%, #3B5FC7 100%) !important;
    border: 1px solid transparent !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    padding: 13px 40px !important;
    border-radius: 10px !important;
    box-shadow: 0 6px 18px rgba(79, 125, 243, 0.35) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
    cursor: pointer;
}

.contact-form-wrapper .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(79, 125, 243, 0.5) !important;
    background: linear-gradient(135deg, #5b89ff 0%, #4060ce 100%) !important;
    color: #ffffff !important;
}

.flicko-alert {
    padding: 16px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
}

.flicko-alert i { margin-right: 8px; }

.flicko-alert--success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #86efac;
}

.flicko-alert--error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

@media (max-width: 640px) {
    .contact-grid { grid-template-columns: 1fr; }
    .contact-form-wrapper { padding: 22px; }
}

/* Captcha block */
.flicko-captcha {
    margin: 14px 0 22px;
    text-align: center;
}

.flicko-captcha .captcha-help {
    color: #c8d0e0;
    font-size: 13px;
    margin-bottom: 12px;
}

.flicko-captcha .captcha-row {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

.flicko-captcha .captcha-image img {
    background: #ffffff;
    padding: 6px;
    border-radius: 8px;
    height: 44px;
}

.flicko-captcha .captcha-input input {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1.5px solid #4F7DF3 !important;
    border-radius: 10px !important;
    color: #ffffff !important;
    padding: 10px 14px !important;
    width: 160px;
    text-align: center;
    letter-spacing: 2px;
    font-weight: 600;
}

.flicko-captcha .captcha-input input:focus {
    border-color: #6E9BFF !important;
    box-shadow: 0 0 0 3px rgba(79, 125, 243, 0.25) !important;
    outline: none;
}

/* Captcha used inside login / register forms */
.flicko-captcha-wrap {
    text-align: center;
    width: 100%;
}

.flicko-captcha-wrap .flicko-captcha-help {
    color: #c8d0e0;
    font-size: 13px;
    margin: 0 0 10px;
}

.flicko-captcha-wrap .flicko-captcha-row {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.flicko-captcha-wrap .flicko-captcha-image img {
    background: #ffffff;
    padding: 6px;
    border-radius: 8px;
    height: 44px;
}

.flicko-captcha-wrap .flicko-captcha-input input {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1.5px solid #4F7DF3 !important;
    border-radius: 10px !important;
    color: #ffffff !important;
    padding: 10px 14px !important;
    width: 160px;
    text-align: center;
    letter-spacing: 2px;
    font-weight: 600;
}

.flicko-captcha-wrap .flicko-captcha-input input:focus {
    border-color: #6E9BFF !important;
    box-shadow: 0 0 0 3px rgba(79, 125, 243, 0.25) !important;
    outline: none;
}

/* Google reCAPTCHA v2 widget centered */
.flicko-captcha-wrap .g-recaptcha {
    display: inline-block;
}

/* ============================================
   PRODUCT DETAILS (clientarea.php?action=productdetails)
   ============================================ */
.product-details-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
    align-items: start;
}

@media (max-width: 991px) {
    .product-details-container { grid-template-columns: 1fr; }
}

.service-overview-card,
.actions-card,
.main-content-card {
    background: linear-gradient(160deg, #11163a 0%, #0a0d27 100%);
    border: 1px solid rgba(79, 125, 243, 0.18);
    border-radius: 16px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
}

.service-overview-card { padding: 24px; }
.actions-card { padding: 22px; margin-top: 18px; }

.service-icon-large {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4F7DF3 0%, #3B5FC7 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    box-shadow: 0 10px 24px rgba(79, 125, 243, 0.35);
}

.service-icon-large i { color: #ffffff; font-size: 32px; }

.service-title {
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 4px 0;
}

.service-group {
    color: #4F7DF3;
    font-size: 13px;
    text-align: center;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.service-domain {
    color: #c8d0e0;
    font-size: 14px;
    text-align: center;
    margin-bottom: 14px;
}

.status-badge-lg {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin: 8px 0 18px;
}

.status-active   { background: rgba(34,197,94,0.15);  color: #4ade80; border: 1px solid rgba(34,197,94,0.4); }
.status-pending  { background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.4); }
.status-suspended,
.status-cancelled,
.status-terminated,
.status-fraud    { background: rgba(239,68,68,0.15);  color: #fca5a5; border: 1px solid rgba(239,68,68,0.4); }
.status-completed{ background: rgba(79,125,243,0.15); color: #93b4ff; border: 1px solid rgba(79,125,243,0.4); }

.text-center { text-align: center; }

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.detail-row:last-child { border-bottom: none; }

.detail-label { color: #8b9dc3; font-size: 13px; }
.detail-value { color: #ffffff; font-weight: 600; font-size: 14px; text-align: right; }

.actions-title {
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 14px 0;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.btn-action-primary,
.btn-action-danger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    border: 1px solid transparent;
}

.btn-action-primary {
    background: linear-gradient(135deg, #4F7DF3 0%, #3B5FC7 100%);
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(79,125,243,0.32);
}
.btn-action-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(79,125,243,0.5);
    color: #ffffff !important;
}

.btn-action-danger {
    background: transparent;
    border-color: rgba(239,68,68,0.4);
    color: #fca5a5 !important;
}
.btn-action-danger:hover {
    background: rgba(239,68,68,0.12);
    border-color: rgba(239,68,68,0.7);
    color: #ffffff !important;
}

.btn-action-primary.disabled,
.btn-action-danger.disabled { opacity: 0.5; pointer-events: none; }

/* Right side: tabs + content */
.product-details-right .main-content-card { overflow: hidden; }

.product-tabs {
    display: flex;
    gap: 4px;
    padding: 14px 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.15);
    flex-wrap: wrap;
}

.product-tab-link {
    background: transparent;
    border: none;
    color: #8b9dc3;
    padding: 12px 18px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.product-tab-link:hover { color: #ffffff; }

.product-tab-link.active {
    color: #4F7DF3;
    border-bottom-color: #4F7DF3;
}

.product-tab-content { padding: 24px; }
.product-tab-content .tab-pane { display: none; }
.product-tab-content .tab-pane.active { display: block; }

.tab-section-title { color: #ffffff; font-size: 16px; margin: 0 0 10px; font-weight: 700; }
.tab-section-text  { color: #c8d0e0; line-height: 1.6; }

.empty-state { text-align: center; padding: 40px 20px; }
.empty-state i { font-size: 32px; color: #2d3748; margin-bottom: 12px; display: block; }
.empty-state p { color: #8b9dc3; margin: 0; }

.flicko-table {
    width: 100%;
    border-collapse: collapse;
    color: #e4e4e7;
}
.flicko-table th,
.flicko-table td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 14px;
}
.flicko-table th {
    color: #8b9dc3;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    background: rgba(0,0,0,0.15);
}
.flicko-table tbody tr:last-child td { border-bottom: none; }

.mb-3 { margin-bottom: 16px; }

/* ============================================
   INVOICES LIST (clientarea.php?action=invoices)
   ============================================ */
.invoices-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 10px;
}

.invoices-header h1 {
    color: #ffffff;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 4px;
    letter-spacing: 0.3px;
}

.invoices-header p {
    color: #8b9dc3;
    margin: 0;
    font-size: 14px;
}

.invoices-card {
    background: linear-gradient(160deg, #11163a 0%, #0a0d27 100%);
    border: 1px solid rgba(79, 125, 243, 0.18);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
}

.invoices-table {
    width: 100%;
    border-collapse: collapse;
}

.invoices-table th {
    text-align: left;
    padding: 16px 22px;
    color: #8b9dc3;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    background: rgba(79, 125, 243, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    white-space: nowrap;
}

.invoices-table td {
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: #e4e4e7;
    font-size: 14px;
    vertical-align: middle;
}

.invoices-table tbody tr {
    transition: background 0.2s ease;
}

.invoices-table tbody tr:hover {
    background: rgba(79, 125, 243, 0.05);
}

.invoices-table tbody tr:last-child td {
    border-bottom: none;
}

.invoice-num {
    color: #4F7DF3 !important;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.invoice-date { color: #ffffff !important; }
.invoice-due  { color: #c8d0e0 !important; }

.invoice-total {
    color: #ffffff !important;
    font-weight: 700;
    font-size: 15px;
}

.status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border: 1px solid transparent;
}

.status-badge.status-paid,
.status-badge.status-paid-text { background: rgba(34, 197, 94, 0.15); color: #4ade80; border-color: rgba(34, 197, 94, 0.4); }
.status-badge.status-unpaid    { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border-color: rgba(245, 158, 11, 0.4); }
.status-badge.status-overdue   { background: rgba(239, 68, 68, 0.15);  color: #fca5a5; border-color: rgba(239, 68, 68, 0.4); }
.status-badge.status-cancelled,
.status-badge.status-refunded,
.status-badge.status-collections { background: rgba(107, 114, 128, 0.15); color: #9ca3af; border-color: rgba(107, 114, 128, 0.4); }
.status-badge.status-draft     { background: rgba(79, 125, 243, 0.15); color: #93b4ff; border-color: rgba(79, 125, 243, 0.4); }

.btn-view {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #4F7DF3 0%, #3B5FC7 100%);
    color: #ffffff !important;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(79, 125, 243, 0.3);
}

.btn-view:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 125, 243, 0.45);
    color: #ffffff !important;
    text-decoration: none;
}

/* Invoices empty state */
.invoices-card + .empty-state,
.empty-state.invoices-empty {
    background: linear-gradient(160deg, #11163a 0%, #0a0d27 100%);
    border-radius: 16px;
    padding: 60px 20px;
    text-align: center;
    border: 1px solid rgba(79, 125, 243, 0.15);
}

/* Mobile responsive — stack cells as cards */
@media (max-width: 768px) {
    .invoices-header { flex-direction: column; align-items: flex-start; }
    .invoices-header h1 { font-size: 22px; }

    .invoices-table thead { display: none; }
    .invoices-table, .invoices-table tbody, .invoices-table tr, .invoices-table td { display: block; width: 100%; }

    .invoices-table tr {
        padding: 18px 18px 14px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        position: relative;
    }
    .invoices-table tr:last-child { border-bottom: none; }

    .invoices-table td {
        padding: 5px 0;
        border: none;
        font-size: 14px;
    }

    .invoices-table td.invoice-num { font-size: 17px; margin-bottom: 6px; }

    .invoices-table td.invoice-date::before { content: 'Date: '; color: #8b9dc3; font-weight: 600; }
    .invoices-table td.invoice-due::before  { content: 'Due:  '; color: #8b9dc3; font-weight: 600; }
    .invoices-table td.invoice-total::before{ content: 'Total: '; color: #8b9dc3; font-weight: 600; }

    .invoices-table td:last-child { margin-top: 12px; }
    .btn-view { width: 100%; justify-content: center; }
}

/* ============================================
   SOCIAL SIGN-IN BUTTONS (Google etc.)
   Used in login.tpl & clientregister.tpl
   ============================================ */

/* Bootstrap 3 .hidden compatibility — WHMCS still uses it for provider messages
   that the JS template-clones into the feedback area. Without this rule the raw
   placeholder messages and inline script appear as visible text. */
.hidden,
#providerLinkingMessages.hidden,
#providerLinkingMessages {
    display: none !important;
}

/* But the feedback area itself must remain visible so JS can populate it */
.providerLinkingFeedback {
    display: block !important;
}

.flicko-social-block {
    margin: 0 0 4px;
}

/* Bulletproof: never let <script> contents render as text.
   Some Smarty/PHP setups output the inline auth-provider JS in a way
   that the browser leaves it as visible text on the page. */
.flicko-social-block script,
.social-signin-btns script,
.providerPreLinking script {
    display: none !important;
}

/* Remove the empty-space WHMCS wrappers leave above the button */
.flicko-social-block #providerLinkingMessages,
.providerLinkingFeedback:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.flicko-social-block .providerPreLinking {
    margin: 0 !important;
    padding: 0 !important;
}

.flicko-social-block .sub-heading,
.flicko-social-block .sub-heading-borderless,
.flicko-social-block .small.text-muted {
    display: none !important; /* Hide WHMCS default "Sign Up With" headings — we draw our own divider */
}

.flicko-social-block .social-signin-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    width: 100%;
}

/* Make every provider button block-level + centered + responsive */
.flicko-social-block .social-signin-btns > * {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 auto !important;
}

/* Google's official g_id_signin button — centered + responsive */
.flicko-social-block .g_id_signin,
.flicko-social-block .g_id_signin > div,
.flicko-social-block iframe[id^="gsi_"] {
    display: block !important;
    margin: 0 auto !important;
    max-width: 100% !important;
}

/* The Google button itself reports its width via inline style on the inner div.
   Center it inside its wrapper and cap it on small screens. */
.flicko-social-block .g_id_signin > div {
    margin: 0 auto !important;
}

/* Mobile/Tablet: make the Google button stretch to feel prominent */
@media (max-width: 767px) {
    .flicko-social-block .social-signin-btns,
    .flicko-social-block .social-signin-btns > *,
    .flicko-social-block .g_id_signin,
    .flicko-social-block .g_id_signin > div {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .flicko-social-block iframe[id^="gsi_"] {
        width: 100% !important;
        min-width: 0 !important;
    }

    /* Tighten the empty space above the button */
    .flicko-social-block {
        margin-top: -8px !important;
    }
}

/* Fallback generic provider buttons (if WHMCS renders <a> or <button>) */
.flicko-social-block .social-signin-btns a,
.flicko-social-block .social-signin-btns button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    width: 100% !important;
    padding: 11px 16px !important;
    background: #ffffff !important;
    color: #1f2937 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.flicko-social-block .social-signin-btns a:hover,
.flicko-social-block .social-signin-btns button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.35);
    background: #f9fafb !important;
    color: #111827 !important;
}

.flicko-social-block .social-signin-btns img,
.flicko-social-block .social-signin-btns svg {
    height: 18px;
    width: 18px;
}

/* "or continue with email" divider */
.flicko-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 16px;
    color: #6b7a9d;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 600;
}
.flicko-divider::before,
.flicko-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}
.flicko-divider span { white-space: nowrap; }

/* Provider feedback messages styled to fit dark theme */
.providerLinkingFeedback {
    color: #c8d0e0;
    font-size: 13px;
    margin: 10px 0;
    text-align: center;
}
.providerLinkingFeedback p {
    padding: 10px 12px;
    border-radius: 8px;
    margin: 8px 0;
    background: rgba(79, 125, 243, 0.08);
    border: 1px solid rgba(79, 125, 243, 0.25);
}
