/* =========================================================
   MyDD Points Admin Portal - Main Stylesheet
   Modern, clean, professional admin theme
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Geomini:wght@200..800&display=swap');

:root {
    --primary:        #0f766e;
    --primary-dark:   #189c92;
    --primary-light:  #effffe;
    --secondary:      #64748b;
    --success:        #10b981;
    --success-light:  #d1fae5;
    --warning:        #f59e0b;
    --warning-light:  #fef3c7;
    --danger:         #ef4444;
    --danger-light:   #fee2e2;
    --info:           #3b82f6;
    --info-light:     #dbeafe;
    --light:          #f8fafc;
    --lighter:        #f1f5f9;
    --dark:           #1e293b;
    --darker:         #0f172a;
    --gray-100:       #f1f5f9;
    --gray-200:       #e2e8f0;
    --gray-300:       #cbd5e1;
    --gray-400:       #94a3b8;
    --gray-500:       #64748b;
    --gray-600:       #475569;
    --gray-700:       #334155;
    --gray-800:       #1e293b;
    --border:         #e2e8f0;
    --shadow-sm:      0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow:         0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px 0 rgba(0,0,0,0.06);
    --shadow-md:      0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg:      0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --radius:         8px;
    --radius-sm:      6px;
    --radius-lg:      12px;
    --sidebar-w:      260px;
    --topbar-h:       60px;
    --font:           "Geomini", "Georama", "Geologica", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --transition:     all 0.2s ease;
}

/* ============== Reset ============== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--gray-800);
    background: var(--light);
    -webkit-font-smoothing: antialiased;
}
input, select, textarea, button, .form-control, .form-select, .form-textarea, .whmcs-input-text, .sys-search-input {
    font-family: "Geomini", "Georama", "Geologica", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ============== Auth pages ============== */
.auth-body {
    min-height: 100vh;
    background: linear-gradient(196deg, #30bcb1 0%, #0c5d57 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.auth-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 900px;
    width: 100%;
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.auth-card { padding: 48px 40px; }
.auth-side {
    padding: 48px 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
@media (max-width: 768px) {
    .auth-wrapper { grid-template-columns: 1fr; }
    .auth-side { display: none !important; }
    .auth-card { padding: 36px 28px; }
}
.auth-side h2 { font-size: 28px; margin: 0 0 12px; }
.auth-side p { opacity: 0.9; margin-bottom: 24px; }
.auth-features { list-style: none; padding: 0; margin: 0; }
.auth-features li { padding: 8px 0; opacity: 0.95; }
.auth-header { text-align: center; margin-bottom: 32px; }
.auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    height: 64px;
    padding: 0 8px;
    line-height: 1;
    text-align: center;
    background: var(--primary);
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    border-radius: 16px;
    margin-bottom: 16px;
    box-shadow: 0 8px 20px -8px rgba(79, 70, 229, 0.6);
}
.auth-header h1 { font-size: 22px; margin: 0 0 6px; color: var(--dark); }
.auth-header p { color: var(--gray-500); margin: 0; }
.auth-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--gray-500);
}
.auth-footer code {
    background: var(--gray-100);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

/* ============== App layout ============== */
.app-body {
    display: block;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w);
    background: #fff;
    border-right: 1px solid var(--border);
    z-index: 100;
    overflow-y: auto;
    transition: transform 0.3s ease;
}
.sidebar-header {
    height: var(--topbar-h);
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}
.sidebar-logo {
    display: flex; align-items: center; gap: 10px;
    color: var(--dark);
    font-weight: 700;
    font-size: 16px;
}
.sidebar-logo:hover { text-decoration: none; }
.logo-mark {
    width: 32px; height: 32px;
    background: var(--primary);
    color: #fff;
    border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700;
}
.logo-text em { color: var(--primary); font-style: normal; }
.sidebar-toggle { display: none; background: none; border: 0; font-size: 20px; cursor: pointer; }

.sidebar-nav { padding: 12px 0; }
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list li a {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 20px;
    color: var(--gray-700);
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: var(--transition);
    position: relative;
}
/* FA icon inside the nav link */
.nav-list li a > .nav-icon,
.nav-list li a > i.nav-icon,
.nav-list li a > i.fa-solid,
.nav-list li a > i.fa-regular,
.nav-list li a > i.fa-brands {
    width: 20px;
    min-width: 20px;
    text-align: center;
    font-size: 15px;
    color: var(--gray-500);
    transition: color 0.2s ease, transform 0.2s ease;
    line-height: 1;
}
.nav-list li a:hover {
    background: var(--gray-100);
    color: var(--primary);
    text-decoration: none;
}
.nav-list li a:hover > i,
.nav-list li a:hover > .nav-icon { color: var(--primary); transform: translateX(2px); }
.nav-list li.active a {
    background: var(--primary-light);
    color: var(--primary);
    border-left-color: var(--primary);
}
.nav-list li.active a > i,
.nav-list li.active a > .nav-icon { color: var(--primary); }
.nav-list li a > .nav-badge { margin-left: auto; }
.nav-icon { font-size: 15px; width: 20px; text-align: center; display: inline-block; }
.nav-icon.fa, .nav-icon.fas { font-size: 15px; }

/* ============== Sidebar dropdown submenus (WHMCS-style) ============== */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}
.nav-dropdown-toggle .nav-caret {
    margin-left: auto;
    font-size: 10px;
    color: var(--gray-500);
    transition: transform 0.18s ease;
}
.nav-dropdown.open > .nav-dropdown-toggle .nav-caret {
    transform: rotate(90deg);
    color: var(--primary);
}
.nav-sublist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: none;
    background: var(--gray-100);
}
.nav-dropdown.open > .nav-sublist {
    display: block !important;
}
.nav-sublist li a {
    padding: 8px 20px 8px 44px;
    font-size: 13px;
    font-weight: 400;
    color: var(--gray-700);
    border-left: 0;
    gap: 10px;
}
.nav-sublist li a > i,
.nav-sublist li a > .nav-icon { font-size: 12px; width: 16px; min-width: 16px; }
.nav-sublist li a:hover { background: var(--gray-200); }
.nav-sublist li.active a {
    color: var(--primary);
    background: var(--primary-light);
    font-weight: 500;
}


/* Font Awesome icon wrappers */
.fa-fw { width: 1.28571em; text-align: center; }
.nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 10px;
}
.nav-divider {
    height: 1px;
    background: var(--border);
    margin: 12px 20px;
}
.nav-list-compact li a { padding: 6px 20px; font-size: 13px; }

.sidebar-section {
    padding: 16px 20px 8px;
    border-top: 1px solid var(--border);
    margin-top: 12px;
}
.sidebar-section h4 {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--gray-400);
    margin: 0 0 8px;
    letter-spacing: 0.5px;
}
.system-info {
    font-size: 12px;
    color: var(--gray-500);
    line-height: 1.6;
}
.system-info strong { color: var(--gray-700); }

.main-wrapper {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: var(--topbar-h);
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-toggle {
    display: none;
    background: none; border: 0;
    font-size: 22px; cursor: pointer;
    color: var(--gray-600);
}
.topbar-title { font-size: 18px; margin: 0; color: var(--dark); font-weight: 600; }

.topbar-right { display: flex; align-items: center; gap: 12px; }
/* .topbar-search defined in Intelligent Header Search section below */

.topbar-icon {
    width: 36px; height: 36px;
    border-radius: 8px;
    border: 0;
    background: var(--gray-100);
    cursor: pointer;
    position: relative;
    color: var(--gray-700);
    font-size: 16px;
}
.topbar-icon:hover { background: var(--gray-200); }
.topbar-badge {
    position: absolute;
    top: -4px; right: -4px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    min-width: 18px; height: 18px;
    border-radius: 9px;
    padding: 0 5px;
    line-height: 18px;
}

.topbar-user {
    display: flex; align-items: center; gap: 8px;
    padding: 4px 10px 4px 4px;
    border: 0;
    background: transparent;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}
.topbar-user:hover { background: var(--gray-100); }
.user-avatar {
    width: 32px; height: 32px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 600;
    font-size: 13px;
}
.user-name { font-size: 13px; font-weight: 500; color: var(--gray-700); }
.user-caret { font-size: 10px; color: var(--gray-500); }

.main-content {
    flex: 1;
    padding: 24px;
}

.app-footer {
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 12px 24px;
    font-size: 12px;
    color: var(--gray-500);
    display: flex;
    justify-content: space-between;
}

/* ============== Mobile ============== */
@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-wrapper { margin-left: 0; }
    .sidebar-toggle, .topbar-toggle { display: inline-block; }
    .topbar-search input { width: 160px; }
}
@media (max-width: 576px) {
    .topbar-search { display: none; }
    .main-content { padding: 16px; }
}

/* ============== Support Module Clean Classes ============== */

/* Top Auto Refresh & Page Actions */
.auto-refresh-bar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.auto-refresh-select {
    width: auto;
    height: 36px;
    font-size: 13px;
    padding: 6px 12px;
    box-sizing: border-box;
    border-radius: var(--radius);
    line-height: 1.4;
}

/* Primary Tabs Bar */
.support-primary-tabs {
    display: flex;
    gap: 16px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 16px;
    padding-bottom: 0;
}

/* Search / Filter Card & Form Table */
.search-filter-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 20px;
    padding: 16px;
    overflow: visible !important;
    position: relative;
}
.filter-form-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    color: #334155;
    overflow: visible !important;
}
.filter-form-table tr {
    border-bottom: 1px solid #e2e8f0;
    overflow: visible !important;
}
.filter-form-table td.filter-label {
    width: 140px;
    padding: 8px 12px;
    text-align: right;
    font-weight: 600;
    color: #475569;
    vertical-align: middle;
}
.filter-form-table td.filter-input {
    padding: 8px 12px;
    overflow: visible !important;
    position: relative;
}

/* Status Tag Multi-Pill Container */
.status-pill-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 6px;
}
.status-pill-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #cbd5e1;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}
.status-pill-label.selected {
    background: #e2e8f0;
    border-color: #94a3b8;
}
.status-pill-close {
    color: #94a3b8;
    font-size: 11px;
    margin-left: 2px;
}

/* Client Combobox in Filter */
.filter-client-select-wrapper {
    position: relative !important;
    z-index: 999999 !important;
}
.filter-client-input {
    padding-right: 36px;
    background: #fff;
    border: 1px solid #cbd5e1;
    padding: 6px 12px;
    border-radius: 4px;
    width: 100%;
}
.filter-combo-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    width: 100%;
    max-height: 260px;
    overflow-y: auto;
    background: #ffffff !important;
    border: 2px solid #6366f1 !important;
    border-radius: 6px;
    box-shadow: 0 20px 35px rgba(0,0,0,0.2) !important;
    z-index: 999999 !important;
    margin-top: 0;
}
.filter-combo-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #e2e8f0;
    font-size: 13px;
    color: #1e293b;
    background: #ffffff;
    transition: background 0.1s ease;
}
.filter-combo-item:hover {
    background: #eff6ff !important;
}
.filter-combo-item.header-item {
    font-weight: 600;
    color: #64748b;
    background: #f8fafc !important;
}

/* Filter Submit Actions */
.filter-actions {
    text-align: center;
    margin-top: 16px;
}
.btn-search-submit {
    background: #0f766e;
    color: #ffffff;
    font-weight: 600;
    padding: 8px 24px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease;
}
.btn-search-submit:hover {
    background: #189c92;
    color: #ffffff;
}

/* Per Page Bar & Flag Column */
.table-top-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 8px 16px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    margin-bottom: 16px;
}
.per-page-select {
    width: auto;
    height: 30px;
    font-size: 12px;
    display: inline-block;
}
.flag-star {
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
}
.flag-star.flagged { color: #ef4444; }
.flag-star.unflagged { color: #cbd5e1; }
.flag-star:hover { opacity: 0.8; }
.th-flag { width: 36px; }
.th-id { width: 70px; }
.th-actions { text-align: right; }

/* Empty Table State */
.table-empty-state {
    padding: 40px;
    text-align: center;
}
.table-empty-icon {
    font-size: 32px;
    color: #cbd5e1;
    margin-bottom: 8px;
}

/* Table Rows & Pagination */
.ticket-subject-link {
    font-weight: 600;
    text-decoration: none;
    color: var(--gray-800);
}
.ticket-subject-link:hover {
    color: var(--primary);
}
.ticket-tags-wrap {
    margin-top: 2px;
}
.badge-tag {
    font-size: 10px;
}
.pagination-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 12px;
}
.pagination-controls {
    display: flex;
    gap: 4px;
}
.pagination-indicator {
    padding: 4px 12px;
    font-size: 13px;
    align-self: center;
    font-weight: 600;
}

/* ============== Client Profile 360° View Styles ============== */

/* Top Selector & Subheader */
.client-profile-header {
    margin-bottom: 16px;
}
.client-selector-wrap {
    margin-bottom: 12px;
}
.client-selector-select {
    width: 420px;
    max-width: 100%;
    height: 34px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #ffffff;
    padding: 4px 10px;
}

/* Tabs Bar */
.profile-tabs-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 4px;
    margin-bottom: 16px;
}
.profile-tab {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    border-radius: 4px;
    background: transparent;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}
.profile-tab:hover {
    background: #e2e8f0;
    color: #1e293b;
}
.profile-tab.active {
    background: #ffffff;
    color: #1e293b;
    border-color: #cbd5e1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Sub-Header & Settings Bar */
.profile-subheader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
.profile-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}
.account-settings-bar {
    font-size: 12px;
    color: #64748b;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 6px 12px;
    border-radius: 4px;
}
.setting-item span.val-yes {
    color: #059669;
    font-weight: 600;
    text-decoration: underline;
}
.setting-item span.val-no {
    color: #dc2626;
    font-weight: 600;
    text-decoration: underline;
}

/* 4-Column Grid */
.profile-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
@media (max-width: 1200px) {
    .profile-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .profile-summary-grid {
        grid-template-columns: 1fr;
    }
}

.profile-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 16px;
}
.profile-card-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
    color: #0f766e;
    border-radius: 5px 5px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.profile-card-body {
    padding: 12px 14px;
    font-size: 12px;
}
.profile-info-table {
    width: 100%;
    border-collapse: collapse;
}
.profile-info-table tr td:first-child {
    color: #64748b;
    font-weight: 500;
    padding: 4px 0;
    width: 42%;
}
.profile-info-table tr td:last-child {
    color: #1e293b;
    padding: 4px 0;
    font-weight: 500;
}
.profile-card-actions {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.profile-card-actions .btn,
.profile-card-actions .btn-secondary,
.profile-card .btn-secondary {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #1e3a5f;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    cursor: pointer;
    transition: all 0.15s ease;
}
.profile-card-actions .btn:hover,
.profile-card-actions .btn-secondary:hover,
.profile-card .btn-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0284c7;
}
.profile-card-actions .btn i,
.profile-card-actions .btn-secondary i,
.profile-card .btn-secondary i {
    color: #1e3a5f;
    font-size: 12px;
}
.profile-card-actions .btn:hover i,
.profile-card-actions .btn-secondary:hover i,
.profile-card .btn-secondary:hover i {
    color: #0284c7;
}

/* Invoices/Billing Card Action Buttons (Matching media_1789737554452.png) */
.cv-inv-actions-list {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.cv-inv-action-link {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #1e3a5f !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 5px 12px !important;
    border-radius: 4px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    text-decoration: none !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    width: auto !important;
    box-sizing: border-box !important;
}
.cv-inv-action-link:hover {
    background: #f8fafc !important;
    border-color: #94a3b8 !important;
    color: #0284c7 !important;
    text-decoration: none !important;
}
.cv-inv-action-icon {
    font-size: 12px;
    width: 14px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* WHMCS Indigo Tables */
.whmcs-card-table {
    margin-bottom: 20px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #cbd5e1;
}
.whmcs-table-title {
    background: #0f766e;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 14px;
    text-align: center;
}
.whmcs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    background: #ffffff;
}
.whmcs-table th {
    background: #0f766e;
    color: #ffffff;
    font-weight: 600;
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #189c92;
}
.whmcs-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
}
.whmcs-table tr:hover {
    background: #f8fafc;
}
.whmcs-table td.empty-td {
    text-align: left;
    color: #64748b;
    padding: 12px;
    font-style: normal;
}

/* Bottom Bulk Actions Bar */
.bottom-bulk-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 10px 16px;
    margin-top: 16px;
}
.bulk-btn-danger {
    background: #dc2626;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.bulk-btn-danger:hover {
    background: #b91c1c;
}

/* ============== WHMCS Style Pagination & Send Message Actions ============== */
.whmcs-pagination-wrap {
    display: inline-flex;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.whmcs-pagination-item {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 500;
    color: #0f766e;
    text-decoration: none;
    background: #ffffff;
    border-right: 1px solid #cbd5e1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}
.whmcs-pagination-item:last-child {
    border-right: none;
}
.whmcs-pagination-item:hover {
    background: #e2e8f0;
    color: #189c92;
}
.whmcs-pagination-item.active {
    background: #0f766e !important;
    color: #ffffff !important;
    font-weight: 700;
}
.whmcs-pagination-item.disabled {
    color: #94a3b8 !important;
    cursor: not-allowed;
    background: #ffffff !important;
}
.whmcs-pagination-item.dots {
    color: #64748b;
    background: #ffffff;
    cursor: default;
}

/* ============== Clean Utility Classes ============== */
.flex-row-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
}
.flex-row-gap-6 { display: flex; gap: 6px; }
.flex-row-gap-8 { display: flex; gap: 8px; }
.flex-row-gap-10 { display: flex; gap: 10px; }
.flex-row-gap-12 { display: flex; gap: 12px; }
.flex-row-gap-16 { display: flex; gap: 16px; flex-wrap: wrap; }
.flex-col-gap-6 { display: flex; flex-direction: column; gap: 6px; }
.flex-right-gap-8 { display: flex; justify-content: flex-end; gap: 8px; }
.flex-center { display: flex; justify-content: center; align-items: center; }

.width-full { width: 100%; }
.width-380 { width: 380px; max-width: 100%; }
.width-420 { width: 420px; max-width: 100%; }

.font-size-11 { font-size: 11px; }
.font-size-12 { font-size: 12px; }
.font-size-13 { font-size: 13px; }

.font-weight-500 { font-weight: 500; }
.font-weight-600 { font-weight: 600; }
.font-weight-700 { font-weight: 700; }

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

.text-color-dark { color: #1e293b; }
.text-color-slate { color: #475569; }
.text-color-muted { color: #64748b; }
.text-color-indigo { color: #0f766e; }
.text-color-danger { color: #dc2626; }

.bg-white { background: #ffffff !important; }
.bg-light-gray { background: #f8fafc; }

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999999;
    align-items: center;
    justify-content: center;
}
.modal-box-medium {
    background: #fff;
    width: 480px;
    max-width: 90%;
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 20px 30px rgba(0,0,0,0.2);
}
.modal-box-large {
    background: #fff;
    width: 520px;
    max-width: 92%;
    border-radius: 6px;
    padding: 24px;
    box-shadow: 0 20px 35px rgba(0,0,0,0.2);
}

.btn-with-selected {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #1e293b;
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 4px;
    font-weight: 600;
}
.btn-with-selected:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.modal-header-title {
    margin-top: 0;
    font-size: 16px;
    color: #1e293b;
    font-weight: 700;
}
.modal-sub-text {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 16px;
}
.modal-field-label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    display: block;
    margin-bottom: 4px;
}
.btn-indigo-submit {
    background: #0f766e !important;
    border-color: #0f766e !important;
    font-weight: 600;
    color: #ffffff !important;
}
.btn-indigo-submit:hover {
    background: #189c92 !important;
    border-color: #189c92 !important;
}

/* ============== Billing Module Styles ============== */
.billing-toggle-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
}
.billing-panel-box {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.billing-metrics-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    align-items: stretch;
}
.summary-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.summary-icon-sq {
    width: 48px;
    height: 48px;
    background: #64748b;
    color: #ffffff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}
.client-badge-link {
    background: #10b981;
    color: #ffffff !important;
    padding: 2px 8px;
    border-radius: 3px;
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
    display: inline-block;
}
.client-badge-link:hover {
    background: #059669;
}
.table-indigo-header th {
    background: #0f766e !important;
    color: #ffffff !important;
}

.bulk-btn-danger {
    background: #dc2626;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}
.bulk-btn-danger:hover {
    background: #b91c1c;
    color: #ffffff;
}

/* ============== Automation Status Module Styles ============== */
.auto-header-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}
.auto-banner-card {
    border-radius: 6px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    color: #ffffff;
}
.auto-banner-card.banner-error {
    background: #b91c1c;
    cursor: pointer;
}
.auto-banner-card.banner-warning {
    background: #d97706;
}
.auto-banner-card.banner-secondary {
    background: #94a3b8;
}
.auto-banner-icon {
    font-size: 28px;
    width: 40px;
    text-align: center;
}
.auto-banner-icon-lg {
    font-size: 32px;
}
.auto-banner-val {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}
.auto-banner-lbl {
    font-size: 12px;
    opacity: 0.9;
}

.auto-chart-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 24px;
}
.auto-chart-filters {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 16px;
}
.auto-chart-select {
    font-size: 12px;
    padding: 4px 10px;
    width: auto;
}
.auto-chart-wrapper {
    height: 220px;
    position: relative;
}

.auto-main-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
    align-items: start;
}
.auto-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}
.auto-section-meta {
    font-size: 13px;
    color: #94a3b8;
}

.auto-action-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.auto-action-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 14px;
    position: relative;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.auto-action-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.auto-action-icon {
    position: absolute;
    top: 14px;
    right: 14px;
    color: #cbd5e1;
    font-size: 20px;
}
.auto-action-lbl {
    font-size: 15px;
    color: #1e293b;
    margin-bottom: 2px;
    font-weight: 500;
}
.auto-action-val {
    font-size: 24px;
    font-weight: 700;
    color: #0f766e;
    line-height: 1.1;
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.auto-action-sub {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
}
.auto-action-val-disabled {
    font-size: 20px;
    font-weight: 700;
    color: #94a3b8;
    line-height: 1.1;
}
.auto-action-disabled-lbl {
    font-size: 11px;
    font-weight: 400;
    color: #94a3b8;
}
.auto-action-failed-lbl {
    font-size: 11px;
    font-weight: 600;
    color: #ef4444;
    margin-left: auto;
}

.auto-system-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}
.auto-system-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px;
    position: relative;
}
.auto-system-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    color: #cbd5e1;
    font-size: 18px;
}
.auto-system-title {
    font-size: 12px;
    font-weight: 600;
    color: #334155;
}
.auto-system-status-error {
    font-size: 11px;
    color: #dc2626;
    margin-top: 2px;
}
.auto-system-status-ok {
    font-size: 11px;
    color: #16a34a;
    margin-top: 2px;
}

.auto-info-banner {
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    color: #0369a1;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auto-mini-cal-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px;
}
.auto-mini-cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #e2e8f0;
    padding: 6px 12px;
    border-radius: 4px;
    margin-bottom: 12px;
}
.auto-mini-cal-navbtn {
    border: none;
    background: none;
    cursor: pointer;
    color: #475569;
}
.auto-mini-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 6px;
}
.auto-mini-cal-dates {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 11px;
    row-gap: 6px;
    color: #334155;
}
.auto-mini-cal-date-muted {
    color: #cbd5e1;
}
.auto-mini-cal-today {
    background: #fef08a;
    color: #854d0e;
    font-weight: 700;
    border-radius: 4px;
    padding: 2px 0;
}
.auto-mini-cal-date {
    cursor: pointer;
    padding: 3px 0;
    border-radius: 4px;
    transition: background 0.15s ease;
}
.auto-mini-cal-date:hover {
    background: #cbd5e1;
}
.auto-mini-cal-selected {
    background: #0f766e !important;
    color: #ffffff !important;
    font-weight: 700;
}

/* Page Header & Section Header Clean Classes */
.auto-page-header {
    margin-bottom: 16px;
}
.auto-section-hdr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.auto-info-icon {
    font-size: 14px;
}

/* Mini Calendar Font & Components */
.auto-mini-cal-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px;
    font-family: var(--font), inherit;
}
.auto-mini-cal-selects {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    justify-content: center;
}
.auto-mini-cal-select {
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 2px 0;
    outline: none;
    font-family: inherit;
}
.auto-mini-cal-footer {
    text-align: center;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
}
.auto-mini-cal-todaybtn {
    font-size: 11px;
    padding: 3px 12px;
    width: 100%;
    font-family: inherit;
}

/* ============================================================
   Intelligent Header Search Dropdown (WHMCS-style)
   ============================================================ */
.topbar-search-wrapper {
    position: relative;
}

.topbar-search {
    position: relative;
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0 10px 0 14px;
    transition: all 0.2s ease;
}

.topbar-search:focus-within {
    background: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.topbar-search input {
    width: 270px;
    height: 36px;
    padding: 0 24px 0 0;
    border: none;
    background: transparent;
    font-size: 13.5px;
    color: #1e293b;
    font-family: inherit;
}

.topbar-search input::placeholder {
    color: #64748b;
    font-weight: 400;
}

.topbar-search input:focus {
    outline: none;
    box-shadow: none;
    border: none;
    background: transparent;
}

.topbar-search-clear {
    position: absolute;
    right: 34px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 50%;
}

.topbar-search-clear:hover {
    color: #334155;
}

.topbar-search-submit {
    background: transparent;
    border: none;
    color: #475569;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
}

.topbar-search-submit:hover {
    color: #0284c7;
}

/* Dropdown Container */
.hsearch-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 500px;
    max-width: calc(100vw - 32px);
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22), 0 2px 6px rgba(0, 0, 0, 0.08);
    z-index: 999999;
    display: none;
    font-family: inherit;
    overflow: hidden;
    animation: hsearchSlideDown 0.15s ease-out;
}

@keyframes hsearchSlideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.hsearch-summary {
    background: #f1f5f9;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hsearch-body {
    max-height: 380px;
    overflow-y: auto;
}

.hsearch-body::-webkit-scrollbar {
    width: 6px;
}
.hsearch-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.hsearch-cat {
    border-bottom: 1px solid #e2e8f0;
}
.hsearch-cat:last-child {
    border-bottom: none;
}

.hsearch-cat-header {
    padding: 8px 14px;
    font-size: 11.5px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: #ffffff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background 0.1s ease;
}

.hsearch-cat-header:hover {
    background: #f8fafc;
    color: #334155;
}

.hsearch-cat-caret {
    font-size: 11px;
    color: #94a3b8;
    transition: transform 0.2s ease;
}

.hsearch-cat.collapsed .hsearch-cat-caret {
    transform: rotate(-90deg);
}

.hsearch-cat.collapsed .hsearch-cat-list {
    display: none;
}

.hsearch-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hsearch-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px;
    text-decoration: none;
    border-top: 1px solid #f8fafc;
    transition: background 0.12s ease;
    cursor: pointer;
}

.hsearch-item:hover, .hsearch-item.active-nav {
    background: #f0f9ff;
    text-decoration: none;
}

.hsearch-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.hsearch-item-icon {
    font-size: 17px;
    color: #0284c7;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.hsearch-item-content {
    min-width: 0;
    flex: 1;
}

.hsearch-item-title {
    font-size: 13px;
    font-weight: 600;
    color: #0369a1;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hsearch-item:hover .hsearch-item-title {
    color: #0284c7;
}

.hsearch-item-subtitle {
    font-size: 11.5px;
    color: #64748b;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hsearch-item-right {
    margin-left: 12px;
    flex-shrink: 0;
}

.hsearch-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.hsearch-badge.badge-active,
.hsearch-badge.badge-paid {
    background: #16a34a;
    color: #ffffff;
}

.hsearch-badge.badge-pending,
.hsearch-badge.badge-unpaid,
.hsearch-badge.badge-customer_reply {
    background: #ea580c;
    color: #ffffff;
}

.hsearch-badge.badge-closed,
.hsearch-badge.badge-cancelled,
.hsearch-badge.badge-terminated {
    background: #dc2626;
    color: #ffffff;
}

.hsearch-badge.badge-draft,
.hsearch-badge.badge-inactive,
.hsearch-badge.badge-suspended {
    background: #64748b;
    color: #ffffff;
}

.hsearch-badge.badge-open,
.hsearch-badge.badge-answered {
    background: #0284c7;
    color: #ffffff;
}

/* Dropdown Footer */
.hsearch-footer {
    background: #f8fafc;
    padding: 8px 12px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    user-select: none;
}

.hsearch-footer-link {
    background: none;
    border: none;
    color: #475569;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 4px;
}
.hsearch-footer-link:hover {
    color: #0f172a;
    text-decoration: underline;
}

.hsearch-toggles {
    display: flex;
    align-items: center;
    gap: 14px;
}

.hsearch-toggle-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    color: #334155;
    margin: 0;
}

.hsearch-switch {
    display: inline-flex;
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    font-size: 9.5px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.hsearch-switch .sw-on {
    padding: 3px 5px;
    background: #cbd5e1;
    color: #64748b;
}

.hsearch-switch .sw-off {
    padding: 3px 5px;
    background: #f1f5f9;
    color: #64748b;
}

.hsearch-switch.active .sw-on {
    background: #0284c7;
    color: #ffffff;
}

.hsearch-switch.active .sw-off {
    background: #ffffff;
    color: #64748b;
}

.hsearch-empty {
    padding: 24px 16px;
    text-align: center;
    color: #64748b;
    font-size: 12.5px;
}



/* =========================================================
   Statement & Print View Styles
   ========================================================= */
.statement-card {
    max-width: 960px;
    margin: 0 auto 24px auto;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    padding: 28px;
}
.statement-card-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    margin-bottom: 24px;
}

/* Screen Header & Filter Bar */
.statement-filter-wrapper {
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e2e8f0;
}
.statement-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
.statement-title {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}
.statement-subtitle {
    margin: 0;
    font-size: 12.5px;
    color: #64748b;
}
.btn-print-statement {
    padding: 6px 16px;
    font-size: 12.5px;
    font-weight: 600;
    background: #6366f1;
    border-color: #6366f1;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 6px;
    cursor: pointer;
}
.btn-print-statement:hover {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #ffffff;
}
.btn-statement-reset {
    font-size: 12px;
    padding: 5px 12px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
    border-radius: 4px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.btn-statement-reset:hover {
    background: #f8fafc;
    color: #0f172a;
    text-decoration: none;
}

.statement-filter-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0;
    background: #f8fafc;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}
.statement-filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
}
.statement-filter-label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}
.statement-date-input-wrap {
    position: relative;
}
.statement-date-input {
    font-size: 12.5px !important;
    padding: 4px 8px 4px 28px !important;
    width: 150px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
}
.statement-date-icon {
    position: absolute;
    left: 9px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 12px;
    pointer-events: none;
}
.statement-search-input-wrap {
    position: relative;
    width: 100%;
}
.statement-search-input {
    font-size: 12.5px !important;
    padding: 4px 10px 4px 28px !important;
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
}
.statement-search-icon {
    position: absolute;
    left: 9px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 11px;
}

/* Statement Header & Address Structure */
.statement-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 28px;
}
.statement-brand-logo {
    max-height: 48px;
    max-width: 220px;
    object-fit: contain;
}
.statement-brand-fallback {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}
.statement-brand-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: #0284c7;
    color: #ffffff;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 900;
}
.statement-period-block {
    text-align: right;
}
.statement-period-label {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.statement-period-value {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    margin-top: 2px;
}

.statement-address-section {
    margin-bottom: 32px;
}
.statement-client-header {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.statement-client-name {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
}
.statement-account-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}
.statement-address-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    font-size: 13px;
    line-height: 1.5;
}
.statement-address-label {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.statement-company-address {
    text-align: right;
}
.statement-address-name {
    font-weight: 700;
    color: #0f172a;
}
.statement-address-line {
    color: #334155;
}

/* Statement Summary Table & Totals */
.statement-summary-heading {
    margin: 0 0 16px 0;
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.3px;
}
.statement-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    margin-bottom: 24px;
}
.statement-table th {
    border-bottom: 2px solid #e2e8f0;
    padding: 10px 12px;
    text-align: left;
    font-weight: 700;
    font-size: 11px;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: transparent;
}
.statement-table td {
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}
.statement-totals-box {
    padding: 16px 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    display: flex;
    justify-content: flex-end;
}
.statement-totals-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.statement-totals-label {
    padding: 4px 12px 4px 0;
    text-align: right;
    font-weight: 700;
    color: #334155;
}
.statement-totals-val {
    padding: 4px 0;
    text-align: right;
    font-weight: 800;
    color: #0f172a;
    width: 130px;
}

/* Print Rules */
@media print {
    @page {
        margin: 6mm 10mm;
    }
    body * {
        visibility: hidden !important;
    }
    .printable-statement-area,
    .printable-statement-area * {
        visibility: visible !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    .printable-statement-area {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
    }
    .statement-card-container,
    .statement-card {
        border: none !important;
        border-top: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        background: transparent !important;
    }
    .statement-print-only {
        display: block !important;
    }
    .printable-statement-area table.whmcs-table th,
    .printable-statement-area table.whmcs-table td,
    .statement-table th,
    .statement-table td {
        padding: 7px 10px !important;
        font-size: 12px !important;
    }
    .printable-statement-area tr,
    .statement-table tr {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    .statement-totals-box {
        padding: 10px 14px !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        margin-top: 8px !important;
    }
    .no-print,
    .filter-bar,
    .actions-bar {
        display: none !important;
    }
    a {
        color: #0f172a !important;
        text-decoration: none !important;
    }
}
