/* ==========================================================================
   KHEWEUL CLIENT AREA (hPanel / Hostinger Style)
   ========================================================================== */

/* Variables & Base */
:root {
    --kw-app-bg: #f8fafc;
    --kw-app-sidebar-bg: #ffffff;
    --kw-app-sidebar-width: 240px;
    --kw-app-sidebar-collapsed-width: 72px;
    --kw-app-text: #0f172a;
    --kw-app-text-muted: #64748b;
    --kw-app-border: #e2e8f0;

    --kw-brand-primary: #E89548;
    --kw-brand-accent: #E89548;
}

body.kheweul-theme {
    background-color: var(--kw-app-bg);
    font-family: 'Inter', sans-serif;
    color: var(--kw-app-text);
}

/* -----------------------------------------
   APP LAYOUT ARCHITECTURE
----------------------------------------- */
.kw-app-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* -----------------------------------------
   SIDEBAR
----------------------------------------- */
.kw-app-sidebar {
    width: var(--kw-app-sidebar-width);
    flex-shrink: 0;
    background-color: var(--kw-app-sidebar-bg);
    border-right: 1px solid var(--kw-app-border);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 1040;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

/* Collapsed State */
.kw-sidebar-collapsed .kw-app-sidebar {
    width: var(--kw-app-sidebar-collapsed-width);
}

.kw-sidebar-header {
    height: 70px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid transparent;
    transition: padding 0.25s ease;
}

.kw-sidebar-collapsed .kw-sidebar-header {
    padding: 0 15px;
    justify-content: center;
}

.kw-logo-full {
    display: block;
}

.kw-logo-mini {
    display: none;
    width: 32px;
    height: 32px;
}

.kw-sidebar-collapsed .kw-logo-full {
    display: none;
}

.kw-sidebar-collapsed .kw-logo-mini {
    display: block;
}

.kw-app-logo {
    max-height: 40px;
    width: auto;
}

.kw-app-text-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--kw-brand-primary);
    letter-spacing: -0.5px;
}

.kw-sidebar-nav {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px 16px;
}

/* Menu Items */
.kw-app-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.kw-app-menu-item {
    margin-bottom: 4px;
}

.kw-app-menu-item a {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: var(--kw-app-text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.kw-app-menu-item a i {
    width: 24px;
    margin-right: 12px;
    font-size: 1.1rem;
    text-align: center;
    color: #9ca3af;
    transition: color 0.2s ease;
}

.kw-app-menu-item:hover a,
.kw-app-menu-item.active a {
    background-color: #f3f4f6;
    color: var(--kw-app-text);
}

.kw-app-menu-item.active a {
    background-color: rgba(37, 99, 235, 0.08);
    color: var(--kw-brand-primary);
    font-weight: 600;
}

.kw-app-menu-item:hover a i,
.kw-app-menu-item.active a i {
    color: var(--kw-brand-primary);
}

.kw-sidebar-collapse-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--kw-app-border);
    background: var(--kw-bg-page);
    color: var(--kw-app-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.kw-sidebar-collapse-btn:hover {
    background: var(--kw-primary-light);
    color: var(--kw-primary);
    border-color: var(--kw-primary);
}

.kw-sidebar-collapsed .kw-sidebar-collapse-btn {
    display: none !important;
    /* Hide inside sidebar when collapsed, or reposition */
}

/* We could add a toggle button in the topbar too */

.kw-app-menu-item a span {
    transition: opacity 0.25s ease, visibility 0.25s ease;
    white-space: nowrap;
}

.kw-sidebar-collapsed .kw-app-menu-item a span {
    opacity: 0;
    visibility: hidden;
    position: absolute;
}

.kw-sidebar-collapsed .kw-app-menu-item a i {
    margin-right: 0;
}

.kw-app-menu-divider {
    height: 1px;
    background-color: var(--kw-app-border);
    margin: 16px 0;
}

/* Submenu Styles */
.kw-has-submenu a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kw-submenu-arrow {
    transition: transform 0.3s ease;
    font-size: 0.8rem !important;
    width: auto !important;
    margin-right: 0 !important;
}

.kw-has-submenu a:not(.collapsed) .kw-submenu-arrow {
    transform: rotate(180deg);
}

.kw-submenu {
    background-color: transparent;
}

.kw-submenu-list {
    list-style: none;
    padding: 4px 0 4px 36px;
    /* Indented for hierarchical look */
    margin: 0;
}

.kw-submenu-list li {
    margin-bottom: 2px;
}

.kw-submenu-list li a {
    padding: 8px 16px;
    font-size: 0.9rem;
    color: var(--kw-app-text-muted);
    border-radius: 6px;
    display: block;
    transition: all 0.2s ease;
}

.kw-submenu-list li a:hover,
.kw-submenu-list li.active a {
    color: var(--kw-brand-primary);
    background-color: transparent;
    font-weight: 600;
}

.kw-submenu-list li.active a {
    background-color: rgba(37, 99, 235, 0.05);
}

/* -----------------------------------------
   MAIN CONTENT AREA
----------------------------------------- */
.kw-app-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    /* Prevents flex flex-grow overflow issues */
}

/* -----------------------------------------
   TOPBAR
----------------------------------------- */
.kw-app-topbar {
    height: 70px;
    background-color: #ffffff;
    border-bottom: 1px solid #dde3ed;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.kw-topbar-search {
    position: relative;
    display: flex;
    align-items: center;
    background: #f1f4f9;
    border: 1px solid #d4dae6;
    border-radius: 10px;
    padding: 0 16px;
    width: 320px;
    transition: all 0.2s ease;
}

.kw-topbar-search:focus-within {
    background: #ffffff;
    border-color: #93afd4;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.kw-topbar-search i {
    color: #64748b;
    margin-right: 10px;
}

.kw-search-input {
    border: none;
    background: transparent;
    padding: 10px 0;
    font-size: 0.9rem;
    width: 100%;
    outline: none;
    color: #0f172a;
}

.kw-search-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.kw-search-shortcut {
    font-size: 0.72rem;
    font-weight: 600;
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
    padding: 2px 7px;
    border-radius: 5px;
    color: #475569;
    margin-left: 10px;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.kw-topbar-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.kw-btn-promo {
    display: inline-flex;
    align-items: center;
    background-color: rgba(232, 149, 72, 0.12);
    border: 1px solid rgba(232, 149, 72, 0.3);
    color: #c4701f;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 7px 15px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.kw-btn-promo:hover {
    background-color: rgba(232, 149, 72, 0.22);
    border-color: rgba(232, 149, 72, 0.5);
    color: #a85e18;
    text-decoration: none;
}

.kw-cart-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: #f1f4f9;
    border: 1px solid #d4dae6;
    border-radius: 10px;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.kw-cart-btn:hover {
    border-color: #93afd4;
    color: #1d4ed8;
    background: #eef2ff;
    text-decoration: none;
}

.kw-cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    line-height: 1;
    padding: 0 3px;
}

body.dark-mode .kw-cart-btn {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    color: #9ca3af;
}

body.dark-mode .kw-cart-btn:hover {
    border-color: var(--kw-brand-primary);
    color: var(--kw-brand-primary);
}

body.dark-mode .kw-cart-badge {
    border-color: #1e2433;
}

.kw-user-profile {
    display: flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
}

.kw-user-profile:hover {
    text-decoration: none;
}

.kw-user-avatar {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #e8f0fe, #dbeafe);
    border: 1.5px solid #bfdbfe;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.kw-user-profile:hover .kw-user-avatar {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border-color: #93c5fd;
    color: #1d4ed8;
}

.kw-sidebar-toggle {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: var(--kw-app-text-muted);
    cursor: pointer;
    padding: 0;
}

.kw-sidebar-close {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: var(--kw-app-text-muted);
    cursor: pointer;
}

/* -----------------------------------------
   CONTENT CONTAINER OVERRIDES
----------------------------------------- */
.kw-app-content-container {
    flex-grow: 1;
    max-width: 1400px;
}

/* Hide native WHMCS elements that duplicate sidebar functionality */
.kw-app-main .sidebar {
    display: none !important;
}

/* -----------------------------------------
   RESPONSIVE DESIGN
----------------------------------------- */
@media (max-width: 991.98px) {
    .kw-app-sidebar {
        position: fixed;
        left: -100%;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1);
    }

    .kw-app-sidebar.active {
        left: 0;
    }

    .kw-app-topbar {
        padding: 0 20px;
    }
}

/* -----------------------------------------
   DASHBOARD CARDS (clientareahome.tpl)
----------------------------------------- */
.kw-dash-welcome {
    margin-bottom: 2rem;
}

.kw-dash-welcome-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--kw-app-text);
    margin: 0;
    letter-spacing: -0.5px;
}

.kw-promo-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--kw-app-text);
}

.kw-promo-header p {
    color: var(--kw-app-text-muted);
    font-size: 1rem;
}

.kw-promo-card {
    background-color: #ffffff;
    border: 1px solid var(--kw-app-border);
    border-radius: 12px;
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.kw-promo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.kw-promo-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--kw-app-text);
    margin-bottom: 8px;
}

.kw-promo-card-desc {
    color: var(--kw-app-text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.kw-promo-price-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.kw-promo-old-price {
    text-decoration: line-through;
    color: #9ca3af;
    font-size: 0.9rem;
}

.kw-promo-badge {
    background-color: rgba(37, 99, 235, 0.1);
    /* Kheweul Blue */
    color: var(--kw-brand-primary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
}

.kw-promo-main-price {
    margin-bottom: 4px;
    line-height: 1.2;
}

.kw-promo-currency {
    font-size: 0.85rem;
    color: var(--kw-app-text-muted);
}

.kw-promo-main-price strong {
    font-size: 2rem;
    font-weight: 800;
    color: var(--kw-app-text);
}

.kw-promo-period {
    color: var(--kw-app-text-muted);
    font-size: 1rem;
    margin-left: 2px;
}

.kw-promo-commitment {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 24px;
}

.kw-btn-promo-outline {
    border: 2px solid var(--kw-brand-primary);
    color: var(--kw-brand-primary);
    background: transparent;
    font-weight: 600;
    border-radius: 8px;
    padding: 10px 16px;
    transition: all 0.2s ease;
}

.kw-btn-promo-outline:hover {
    background: rgba(37, 99, 235, 0.05);
    color: #1e40af;
    /* Darker blue */
    border-color: #1e40af;
}

/* -----------------------------------------
   MINI STATS (Resume du compte)
----------------------------------------- */
.kw-mini-stat-card {
    display: flex;
    align-items: center;
    padding: 16px;
    background: #ffffff;
    border: 1px solid var(--kw-app-border);
    border-radius: 12px;
    text-decoration: none !important;
    transition: all 0.2s ease;
    height: 100%;
}

.kw-mini-stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: #d1d5db;
}

.kw-mini-stat-card i {
    font-size: 1.5rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-right: 16px;
    flex-shrink: 0;
}

.kw-mini-icon-blue {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.kw-mini-icon-green {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.kw-mini-icon-orange {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.kw-mini-icon-slate {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.kw-mini-stat-info {
    display: flex;
    flex-direction: column;
}

.kw-mini-stat-val {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--kw-app-text);
    line-height: 1.2;
}

.kw-mini-stat-lbl {
    font-size: 0.85rem;
    color: var(--kw-app-text-muted);
    font-weight: 500;
}

/* -----------------------------------------
   WHMCS NATIVE PANELS
----------------------------------------- */
.kw-panels-section {
    margin-top: 2rem;
}

.kw-panel-card {
    background: #ffffff;
    border: 1px solid var(--kw-app-border);
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    overflow: hidden;
}

.kw-panel-header {
    background: #f8f9fa;
    border-bottom: 1px solid var(--kw-app-border);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kw-panel-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--kw-app-text);
    display: flex;
    align-items: center;
}

.kw-panel-icon-native {
    color: var(--kw-app-text-muted);
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.kw-panel-badge {
    background: #e5e7eb;
    color: var(--kw-app-text);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}

.kw-panel-body {
    padding: 24px;
    color: var(--kw-app-text-muted);
    font-size: 0.95rem;
}

.kw-panel-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.kw-panel-list-item {
    border-bottom: 1px solid var(--kw-app-border);
}

.kw-panel-list-item:last-child {
    border-bottom: none;
}

.kw-panel-list-link {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    color: var(--kw-app-text);
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.2s ease;
}

.kw-panel-list-link:hover {
    background: #f9fafb;
    text-decoration: none;
    color: var(--kw-brand-primary);
}

.kw-list-icon {
    color: #9ca3af;
    width: 20px;
    text-align: center;
}

.kw-panel-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--kw-app-border);
    background: #fafafa;
    text-align: center;
}

.kw-panel-footer a {
    color: var(--kw-brand-primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
}

.kw-panel-footer a:hover {
    text-decoration: underline;
}

/* -----------------------------------------
   DARK MODE INTEGRATION
----------------------------------------- */

body.dark-mode {
    --kw-app-bg: #0f172a;
    --kw-app-sidebar-bg: #1e293b;
    --kw-app-text: #e2e8f0;
    --kw-app-text-muted: #94a3b8;
    --kw-app-border: #334155;
    background-color: var(--kw-app-bg);
    color: var(--kw-app-text);
}

body.dark-mode .kw-sidebar-header {
    border-bottom-color: var(--kw-app-border);
}

body.dark-mode .kw-app-menu-item a {
    color: var(--kw-app-text-muted);
}

body.dark-mode .kw-app-menu-item a i {
    color: #64748b;
}

body.dark-mode .kw-app-menu-item:hover a,
body.dark-mode .kw-app-menu-item.active a {
    background-color: #334155;
    color: var(--kw-app-text);
}

body.dark-mode .kw-app-menu-item.active a {
    background-color: rgba(37, 99, 235, 0.15);
    color: var(--kw-brand-primary);
}

body.dark-mode .kw-app-menu-divider {
    background-color: var(--kw-app-border);
}

body.dark-mode .kw-submenu-list li a:hover,
body.dark-mode .kw-submenu-list li.active a {
    color: var(--kw-brand-primary);
}

body.dark-mode .kw-submenu-list li.active a {
    background-color: rgba(37, 99, 235, 0.1);
}

body.dark-mode .kw-app-topbar {
    background-color: #1e293b;
    border-bottom-color: #2d3f55;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

body.dark-mode .kw-topbar-search {
    background: #0f172a;
    border-color: #2d3f55;
}

body.dark-mode .kw-topbar-search:focus-within {
    background: #0f172a;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

body.dark-mode .kw-topbar-search i {
    color: #94a3b8;
}

body.dark-mode .kw-search-shortcut {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

body.dark-mode .kw-user-avatar {
    background: linear-gradient(135deg, #1e3a5f, #1e2d4a);
    border-color: #2d4a6e;
    color: #60a5fa;
}

body.dark-mode .kw-btn-promo {
    background-color: rgba(232, 149, 72, 0.15);
    border-color: rgba(232, 149, 72, 0.25);
    color: #f0a860;
}

body.dark-mode .kw-topbar-search:focus-within {
    background: #1e293b;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.4);
}

body.dark-mode .kw-search-input {
    color: var(--kw-app-text);
}

body.dark-mode .kw-search-shortcut {
    background: #334155;
    color: #cbd5e1;
}

body.dark-mode .kw-user-avatar {
    background-color: #0f172a;
    border-color: var(--kw-app-border);
    color: var(--kw-app-text-muted);
}

body.dark-mode .kw-dash-welcome-title,
body.dark-mode .kw-promo-header h2 {
    color: var(--kw-app-text);
}

body.dark-mode .kw-promo-card {
    background-color: #1e293b;
    border-color: var(--kw-app-border);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body.dark-mode .kw-promo-card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

body.dark-mode .kw-promo-card-title,
body.dark-mode .kw-promo-main-price strong {
    color: var(--kw-app-text);
}

body.dark-mode .kw-promo-old-price {
    color: #64748b;
}

body.dark-mode .kw-promo-commitment {
    color: #64748b;
}

body.dark-mode .kw-mini-stat-card {
    background: #1e293b;
    border-color: var(--kw-app-border);
}

body.dark-mode .kw-mini-stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-color: #475569;
}

body.dark-mode .kw-mini-stat-val {
    color: var(--kw-app-text);
}

body.dark-mode .kw-panel-card {
    background: #1e293b;
    border-color: var(--kw-app-border);
}

body.dark-mode .kw-panel-header {
    background: #0f172a;
    border-bottom-color: var(--kw-app-border);
}

body.dark-mode .kw-panel-title {
    color: var(--kw-app-text);
}

body.dark-mode .kw-panel-badge {
    background: #334155;
    color: var(--kw-app-text);
}

body.dark-mode .kw-panel-list-link {
    color: var(--kw-app-text);
}

body.dark-mode .kw-panel-list-link:hover {
    background: #334155;
    color: var(--kw-brand-primary);
}

body.dark-mode .kw-panel-list-item {
    border-bottom-color: var(--kw-app-border);
}

body.dark-mode .kw-panel-footer {
    background: #0f172a;
    border-top-color: var(--kw-app-border);
}

body.dark-mode .kw-alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fcd34d;
}

body.dark-mode .kw-alert-warning .kw-alert-content strong {
    color: #fde68a;
}

body.dark-mode .kw-alert-warning .kw-alert-sub {
    color: #fef3c7;
    opacity: 0.8;
}

/* Theme Toggle Button */
.kw-theme-toggle {
    background: transparent;
    border: none;
    color: var(--kw-app-text-muted);
    font-size: 1.25rem;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.kw-theme-toggle:hover {
    background: rgba(100, 116, 139, 0.1);
    color: var(--kw-app-text);
}

body.dark-mode .kw-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* -----------------------------------------
   RESPONSIVE ENHANCEMENTS
----------------------------------------- */

/* Mobile Backdrop */
.kw-sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1035;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

@media (max-width: 991.98px) {

    .kw-app-sidebar.active+.kw-sidebar-backdrop,
    .kw-app-sidebar.active~.kw-sidebar-backdrop {
        display: block;
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .kw-app-topbar {
        height: 60px;
        padding: 0 16px;
    }

    .kw-topbar-search {
        display: none !important;
    }

    .kw-dash-welcome-title {
        font-size: 1.4rem;
    }

    .kw-promo-header h2 {
        font-size: 1.25rem;
    }

    .kw-btn-promo {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .kw-theme-toggle {
        font-size: 1.1rem;
        width: 36px;
        height: 36px;
    }

    .kw-user-avatar {
        width: 32px;
        height: 32px;
    }

    .kw-app-content-container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}

@media (max-width: 480px) {
    .kw-mini-stat-card {
        padding: 12px;
    }

    .kw-mini-stat-card i {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
        margin-right: 12px;
    }

    .kw-mini-stat-val {
        font-size: 1.1rem;
    }

    .kw-mini-stat-lbl {
        font-size: 0.75rem;
    }

    .kw-dash-welcome-title {
        font-size: 1.25rem;
    }
}

/* -----------------------------------------
   NOTIFICATION PANIER
----------------------------------------- */
.kw-cart-notif {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1e293b;
    color: #e2e8f0;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: 340px;
}

.kw-cart-notif.show {
    opacity: 1;
    transform: translateY(0);
}

.kw-cart-notif i {
    color: #10b981;
    font-size: 1.1rem;
}

.kw-cart-notif a {
    color: #60a5fa;
    font-weight: 600;
    text-decoration: none;
    margin-left: 4px;
    white-space: nowrap;
}

.kw-cart-notif a:hover {
    color: #93c5fd;
    text-decoration: underline;
}

/* -----------------------------------------
   DROPDOWN PROFIL
------------------------------------------ */
.kw-profile-wrapper {
    position: relative;
}

.kw-user-profile {
    cursor: pointer;
    user-select: none;
}

.kw-chevron-icon {
    transition: transform 0.2s ease;
    color: #6b7280;
}

.kw-profile-dropdown {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    width: 272px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #f1f5f9;
    z-index: 9999;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    pointer-events: none;
}

.kw-profile-dropdown.open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.kw-profile-dropdown-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.kw-profile-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #0f172a;
    margin-bottom: 3px;
    line-height: 1.3;
}

.kw-profile-email {
    font-size: 0.78rem;
    color: #64748b;
    word-break: break-all;
}

.kw-profile-dropdown-body {
    padding: 8px 0;
}

.kw-profile-dropdown-footer {
    border-top: 1px solid #f1f5f9;
    padding: 8px 0;
}

.kw-profile-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    font-size: 0.88rem;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    transition: background 0.12s ease;
    cursor: pointer;
    line-height: 1;
}

.kw-profile-item:hover {
    background: #f8fafc;
    color: #0f172a;
    text-decoration: none;
}

.kw-profile-item i {
    width: 18px;
    text-align: center;
    font-size: 0.92rem;
    color: #6b7280;
    flex-shrink: 0;
    transition: color 0.12s ease;
}

.kw-profile-item:hover i {
    color: var(--kw-brand-primary);
}

.kw-profile-item-value {
    margin-left: auto;
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 500;
}

.kw-profile-item-logout {
    color: #ef4444;
}

.kw-profile-item-logout i {
    color: #ef4444;
}

.kw-profile-item-logout:hover {
    background: rgba(239, 68, 68, 0.05);
    color: #dc2626;
}

.kw-profile-item-logout:hover i {
    color: #dc2626;
}

/* Dark mode */
body.dark-mode .kw-profile-dropdown {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .kw-profile-dropdown-header {
    border-bottom-color: #334155;
}

body.dark-mode .kw-profile-name {
    color: #f1f5f9;
}

body.dark-mode .kw-profile-email {
    color: #94a3b8;
}

body.dark-mode .kw-profile-item {
    color: #cbd5e1;
}

body.dark-mode .kw-profile-item:hover {
    background: #0f172a;
    color: #f1f5f9;
}

body.dark-mode .kw-profile-item i {
    color: #64748b;
}

body.dark-mode .kw-profile-dropdown-body,
body.dark-mode .kw-profile-dropdown-footer {
    border-color: #334155;
}

body.dark-mode .kw-profile-dropdown-footer {
    border-top-color: #334155;
}

/* -----------------------------------------
   MOBILE BOTTOM NAVIGATION
----------------------------------------- */
.kw-mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--kw-bg-card);
    border-top: 1px solid var(--kw-app-border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 10px;
    z-index: 1050;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.kw-mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--kw-app-text-muted);
    text-decoration: none !important;
    gap: 4px;
    flex: 1;
    transition: all 0.2s ease;
}

.kw-mobile-nav-item i {
    font-size: 1.25rem;
}

.kw-mobile-nav-item span {
    font-size: 0.65rem;
    font-weight: 600;
}

.kw-mobile-nav-item.active {
    color: var(--kw-primary);
}

.kw-mobile-nav-item:active {
    transform: scale(0.9);
}

/* Add padding to main content when mobile nav is visible */
@media (max-width: 991.98px) {
    .kw-app-main {
        padding-bottom: 74px !important;
    }
}

/* ==========================================================================
   PAYMENT METHODS PAGE — Hostinger hPanel Premium Style
   Namespace: .kw-pm-*
   ========================================================================== */

/* -----------------------------------------
   PAGE LAYOUT
----------------------------------------- */
.kw-pm-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px;
}

/* -----------------------------------------
   ALERTS
----------------------------------------- */
.kw-pm-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 0.925rem;
    font-weight: 500;
    margin-bottom: 24px;
    animation: kwPmSlideDown 0.3s ease;
}

.kw-pm-alert i {
    font-size: 1.15rem;
    flex-shrink: 0;
}

.kw-pm-alert-success {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #047857;
}

.kw-pm-alert-warning {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #b91c1c;
}

@keyframes kwPmSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* -----------------------------------------
   PAGE HEADER
----------------------------------------- */
.kw-pm-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 32px;
    gap: 20px;
    flex-wrap: wrap;
}

.kw-pm-header-manage {
    flex-direction: column;
}

.kw-pm-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--kw-app-text, #0f172a);
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.kw-pm-title-icon {
    color: #E89548;
    font-size: 1.3rem;
}

.kw-pm-subtitle {
    color: var(--kw-app-text-muted, #64748b);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.5;
}

.kw-pm-header-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.kw-pm-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--kw-app-text-muted, #64748b);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 12px;
    transition: color 0.2s ease;
}

.kw-pm-back-link:hover {
    color: #E89548;
    text-decoration: none;
}

/* -----------------------------------------
   BUTTONS
----------------------------------------- */
.kw-pm-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    line-height: 1.4;
}

.kw-pm-btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.kw-pm-btn-primary {
    background: linear-gradient(135deg, #E89548, #d17f3a);
    color: #fff;
    box-shadow: 0 4px 15px rgba(232, 149, 72, 0.3);
}

.kw-pm-btn-primary:hover {
    background: linear-gradient(135deg, #d17f3a, #c06a28);
    box-shadow: 0 6px 22px rgba(232, 149, 72, 0.45);
    color: #fff;
}

.kw-pm-btn-outline {
    background: transparent;
    border-color: var(--kw-app-border, #e2e8f0);
    color: var(--kw-app-text, #0f172a);
}

.kw-pm-btn-outline:hover {
    border-color: #E89548;
    color: #E89548;
    background: rgba(232, 149, 72, 0.04);
}

.kw-pm-btn-ghost {
    background: transparent;
    color: var(--kw-app-text-muted, #64748b);
    border-color: transparent;
    padding: 10px 18px;
}

.kw-pm-btn-ghost:hover {
    background: #f1f5f9;
    color: var(--kw-app-text, #0f172a);
}

.kw-pm-btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.kw-pm-btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.4);
    color: #fff;
}

.kw-pm-btn-lg {
    padding: 13px 28px;
    font-size: 0.95rem;
}

/* -----------------------------------------
   PAYMENT METHOD CARDS GRID
----------------------------------------- */
.kw-pm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.kw-pm-card {
    background: #ffffff;
    border: 1px solid var(--kw-app-border, #e2e8f0);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.kw-pm-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    border-color: #d1d5db;
}

.kw-pm-card-default {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.08);
}

.kw-pm-card-default:hover {
    border-color: rgba(16, 185, 129, 0.6);
}

.kw-pm-card-expired {
    border-color: rgba(239, 68, 68, 0.3);
    opacity: 0.85;
}

/* Card Header */
.kw-pm-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}

.kw-pm-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.kw-pm-card:hover .kw-pm-card-icon {
    background: linear-gradient(135deg, #fef3e2, #fde8cd);
    color: #E89548;
}

.kw-pm-card-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    flex-grow: 1;
    padding-top: 4px;
}

/* Badges */
.kw-pm-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.kw-pm-badge-default {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
    animation: kwPmPulseGreen 2s ease-in-out infinite;
}

@keyframes kwPmPulseGreen {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.2);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
}

.kw-pm-badge-expired {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
}

/* Actions Dropdown */
.kw-pm-card-actions {
    position: relative;
    margin-left: auto;
    flex-shrink: 0;
}

.kw-pm-actions-trigger {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.kw-pm-actions-trigger:hover,
.kw-pm-actions-trigger:focus {
    background: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}

.kw-pm-actions-menu {
    min-width: 200px;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    animation: kwPmDropIn 0.2s ease;
}

@keyframes kwPmDropIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.kw-pm-action-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #334155;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
}

.kw-pm-action-item:hover {
    background: #f8fafc;
    color: #0f172a;
    text-decoration: none;
}

.kw-pm-action-item i {
    width: 18px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
}

.kw-pm-action-danger {
    color: #dc2626;
}

.kw-pm-action-danger:hover {
    background: rgba(239, 68, 68, 0.06);
    color: #b91c1c;
}

.kw-pm-action-danger i {
    color: #ef4444;
}

/* Card Body */
.kw-pm-card-body {
    margin-bottom: 14px;
}

.kw-pm-card-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--kw-app-text, #0f172a);
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.kw-pm-card-desc {
    font-size: 0.85rem;
    color: var(--kw-app-text-muted, #64748b);
}

/* Card Footer / Status */
.kw-pm-card-footer {
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.kw-pm-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.kw-pm-status i {
    font-size: 0.45rem;
}

.kw-pm-status-active {
    color: #10b981;
}

.kw-pm-status-expired {
    color: #ef4444;
}

/* -----------------------------------------
   EMPTY STATE
----------------------------------------- */
.kw-pm-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 30px;
    background: #ffffff;
    border: 2px dashed #e2e8f0;
    border-radius: 20px;
}

.kw-pm-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    border-radius: 24px;
    background: linear-gradient(135deg, #fef3e2, #fde8cd);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #E89548;
    animation: kwPmFloat 3s ease-in-out infinite;
}

@keyframes kwPmFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.kw-pm-empty-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--kw-app-text, #0f172a);
    margin-bottom: 10px;
}

.kw-pm-empty-text {
    color: var(--kw-app-text-muted, #64748b);
    font-size: 0.95rem;
    max-width: 420px;
    margin: 0 auto 28px;
    line-height: 1.6;
}

.kw-pm-empty-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* -----------------------------------------
   SECURITY NOTICE
----------------------------------------- */
.kw-pm-security-notice {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
    background: rgba(16, 185, 129, 0.04);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 14px;
    margin-bottom: 32px;
}

.kw-pm-security-notice>i {
    color: #10b981;
    font-size: 1.25rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.kw-pm-security-notice strong {
    display: block;
    font-size: 0.925rem;
    color: #047857;
    margin-bottom: 4px;
}

.kw-pm-security-notice p {
    margin: 0;
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.5;
}

/* -----------------------------------------
   MODAL STYLES
----------------------------------------- */
.kw-pm-modal {
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.kw-pm-modal-header {
    padding: 24px 28px 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 14px;
}

.kw-pm-modal-header .close {
    margin: 0;
    padding: 0;
    opacity: 0.5;
}

.kw-pm-modal-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.kw-pm-modal-icon-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.kw-pm-modal-icon-primary {
    background: rgba(232, 149, 72, 0.1);
    color: #E89548;
}

.kw-pm-modal-body {
    padding: 24px 28px;
}

.kw-pm-modal-footer {
    padding: 16px 28px 24px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* -----------------------------------------
   FORM CONTAINER (Manage Page)
----------------------------------------- */
.kw-pm-form-container {
    max-width: 720px;
}

.kw-pm-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Sections */
.kw-pm-section {
    background: #ffffff;
    border: 1px solid var(--kw-app-border, #e2e8f0);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 20px;
    transition: box-shadow 0.2s ease;
}

.kw-pm-section:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.kw-pm-section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--kw-app-text, #0f172a);
    margin: 0 0 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.kw-pm-section-title i {
    color: #E89548;
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

/* -----------------------------------------
   TYPE SELECTOR CARDS
----------------------------------------- */
.kw-pm-type-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.kw-pm-type-card {
    flex: 1;
    min-width: 140px;
    cursor: pointer;
    margin: 0;
}

.kw-pm-type-card input[type="radio"] {
    display: none;
}

.kw-pm-type-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 22px 16px;
    border: 2px solid var(--kw-app-border, #e2e8f0);
    border-radius: 14px;
    background: #fafbfc;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.kw-pm-type-card input:checked+.kw-pm-type-card-inner {
    border-color: #E89548;
    background: rgba(232, 149, 72, 0.04);
    box-shadow: 0 0 0 3px rgba(232, 149, 72, 0.12);
}

.kw-pm-type-card:hover .kw-pm-type-card-inner {
    border-color: #cbd5e1;
    background: #ffffff;
}

.kw-pm-type-card input:checked+.kw-pm-type-card-inner:hover {
    border-color: #E89548;
}

.kw-pm-type-icon {
    font-size: 1.5rem;
    color: #94a3b8;
    transition: color 0.2s ease;
}

.kw-pm-type-card input:checked+.kw-pm-type-card-inner .kw-pm-type-icon {
    color: #E89548;
}

.kw-pm-type-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--kw-app-text, #0f172a);
}

/* -----------------------------------------
   CREDIT CARD PREVIEW (ANIMATED)
----------------------------------------- */
.kw-pm-card-preview {
    margin-bottom: 28px;
    display: flex;
    justify-content: center;
}

.kw-pm-card-visual {
    width: 360px;
    max-width: 100%;
    height: 210px;
    border-radius: 18px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #334155 100%);
    padding: 28px;
    position: relative;
    overflow: hidden;
    color: #ffffff;
    box-shadow: 0 15px 45px rgba(15, 23, 42, 0.35);
    transition: transform 0.3s ease;
}

.kw-pm-card-visual:hover {
    transform: scale(1.02) rotateY(-2deg);
}

.kw-pm-card-visual::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 70% 30%, rgba(232, 149, 72, 0.15), transparent 50%);
    pointer-events: none;
}

.kw-pm-card-visual::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.kw-pm-card-visual-chip {
    width: 44px;
    height: 32px;
    border-radius: 6px;
    background: linear-gradient(135deg, #d4a853, #c49b38);
    margin-bottom: 22px;
    position: relative;
    overflow: hidden;
}

.kw-pm-card-visual-chip::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 4px;
    right: 4px;
    height: 1px;
    background: rgba(0, 0, 0, 0.15);
}

.kw-pm-card-visual-chip::before {
    content: '';
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 50%;
    width: 1px;
    background: rgba(0, 0, 0, 0.1);
}

.kw-pm-card-visual-number {
    font-family: 'Courier New', monospace;
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 3px;
    margin-bottom: 20px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.kw-pm-card-visual-details {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.kw-pm-card-visual-label {
    display: block;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 3px;
}

.kw-pm-card-visual-value {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.kw-pm-card-visual-brand {
    position: absolute;
    top: 24px;
    right: 28px;
    font-size: 2rem;
    opacity: 0.6;
}

/* -----------------------------------------
   FORM FIELDS
----------------------------------------- */
.kw-pm-field-group {
    margin-bottom: 20px;
}

.kw-pm-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--kw-app-text, #0f172a);
    margin-bottom: 8px;
}

.kw-pm-optional {
    font-weight: 400;
    color: var(--kw-app-text-muted, #94a3b8);
    font-size: 0.8rem;
}

.kw-pm-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--kw-app-border, #e2e8f0);
    border-radius: 12px;
    font-size: 0.925rem;
    font-family: 'Inter', sans-serif;
    color: var(--kw-app-text, #0f172a);
    background: #fafbfc;
    transition: all 0.2s ease;
    outline: none;
    box-sizing: border-box;
}

.kw-pm-input:focus {
    border-color: #E89548;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(232, 149, 72, 0.1);
}

.kw-pm-input::placeholder {
    color: #94a3b8;
}

.kw-pm-input-wrapper {
    position: relative;
}

.kw-pm-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.9rem;
    pointer-events: none;
    transition: color 0.2s ease;
    z-index: 1;
}

.kw-pm-input-wrapper:focus-within .kw-pm-input-icon {
    color: #E89548;
}

.kw-pm-input-with-icon {
    padding-left: 42px;
}

.kw-pm-field-error {
    display: none;
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 6px;
}

.has-error .kw-pm-field-error,
.has-error .field-error-msg {
    display: block;
}

.has-error .kw-pm-input {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}

.kw-pm-field-row {
    display: flex;
    gap: 16px;
}

.kw-pm-field-half {
    flex: 1;
    min-width: 0;
}

.kw-pm-help-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--kw-app-text-muted, #64748b);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: color 0.2s ease;
}

.kw-pm-help-link:hover {
    color: #E89548;
}

/* Radio Row (Bank Account Type) */
.kw-pm-radio-row {
    display: flex;
    gap: 12px;
}

.kw-pm-radio-card {
    flex: 1;
    cursor: pointer;
    margin: 0;
}

.kw-pm-radio-card input[type="radio"] {
    display: none;
}

.kw-pm-radio-card span {
    display: block;
    text-align: center;
    padding: 12px 16px;
    border: 1.5px solid var(--kw-app-border, #e2e8f0);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--kw-app-text, #0f172a);
    background: #fafbfc;
    transition: all 0.2s ease;
}

.kw-pm-radio-card input:checked+span {
    border-color: #E89548;
    background: rgba(232, 149, 72, 0.04);
    color: #E89548;
    font-weight: 600;
    box-shadow: 0 0 0 3px rgba(232, 149, 72, 0.1);
}

.kw-pm-radio-card:hover span {
    border-color: #cbd5e1;
}

/* Select */
.kw-pm-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%2394a3b8'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

/* Add Address Link */
.kw-pm-add-address-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #E89548;
    text-decoration: none;
    margin-top: 12px;
    transition: color 0.2s ease;
}

.kw-pm-add-address-link:hover {
    color: #d17f3a;
    text-decoration: none;
}

/* -----------------------------------------
   LOADING STATE
----------------------------------------- */
.kw-pm-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 48px 24px;
    color: var(--kw-app-text-muted, #64748b);
    font-size: 0.925rem;
}

.kw-pm-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e2e8f0;
    border-top-color: #E89548;
    border-radius: 50%;
    animation: kwPmSpin 0.8s linear infinite;
}

@keyframes kwPmSpin {
    to {
        transform: rotate(360deg);
    }
}

/* -----------------------------------------
   FORM ACTIONS
----------------------------------------- */
.kw-pm-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    padding-top: 24px;
    border-top: 1px solid #f1f5f9;
}

/* -----------------------------------------
   RESPONSIVE
----------------------------------------- */
@media (max-width: 768px) {
    .kw-pm-header {
        flex-direction: column;
    }

    .kw-pm-header-actions {
        width: 100%;
    }

    .kw-pm-header-actions .kw-pm-btn {
        flex: 1;
        justify-content: center;
    }

    .kw-pm-grid {
        grid-template-columns: 1fr;
    }

    .kw-pm-card-visual {
        width: 100%;
        height: 190px;
        padding: 22px;
    }

    .kw-pm-card-visual-number {
        font-size: 1.1rem;
        letter-spacing: 2px;
    }

    .kw-pm-field-row {
        flex-direction: column;
        gap: 0;
    }

    .kw-pm-type-grid {
        flex-direction: column;
    }

    .kw-pm-section {
        padding: 20px;
    }

    .kw-pm-form-actions {
        flex-direction: column;
    }

    .kw-pm-form-actions .kw-pm-btn {
        justify-content: center;
    }

    .kw-pm-radio-row {
        flex-direction: column;
    }

    .kw-pm-empty {
        padding: 40px 20px;
    }
}

/* -----------------------------------------
   DARK MODE
----------------------------------------- */
body.dark-mode .kw-pm-card {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .kw-pm-card:hover {
    border-color: #475569;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

body.dark-mode .kw-pm-card-icon {
    background: linear-gradient(135deg, #334155, #1e293b);
    color: #94a3b8;
}

body.dark-mode .kw-pm-card:hover .kw-pm-card-icon {
    background: linear-gradient(135deg, rgba(232, 149, 72, 0.15), rgba(232, 149, 72, 0.08));
}

body.dark-mode .kw-pm-card-footer {
    border-color: #334155;
}

body.dark-mode .kw-pm-empty {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .kw-pm-section {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .kw-pm-section-title {
    border-color: #334155;
}

body.dark-mode .kw-pm-input {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

body.dark-mode .kw-pm-input:focus {
    background: #1e293b;
    border-color: #E89548;
}

body.dark-mode .kw-pm-type-card-inner {
    background: #0f172a;
    border-color: #334155;
}

body.dark-mode .kw-pm-type-card:hover .kw-pm-type-card-inner {
    background: #1e293b;
    border-color: #475569;
}

body.dark-mode .kw-pm-radio-card span {
    background: #0f172a;
    border-color: #334155;
}

body.dark-mode .kw-pm-modal {
    background: #1e293b;
}

body.dark-mode .kw-pm-modal-header,
body.dark-mode .kw-pm-modal-footer {
    border-color: #334155;
}

body.dark-mode .kw-pm-security-notice {
    background: rgba(16, 185, 129, 0.06);
    border-color: rgba(16, 185, 129, 0.15);
}

body.dark-mode .kw-pm-actions-menu {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

body.dark-mode .kw-pm-action-item {
    color: #cbd5e1;
}

body.dark-mode .kw-pm-action-item:hover {
    background: #0f172a;
    color: #f1f5f9;
}

body.dark-mode .kw-pm-btn-ghost:hover {
    background: #334155;
}

body.dark-mode .kw-pm-btn-outline {
    border-color: #475569;
    color: #cbd5e1;
}

body.dark-mode .kw-pm-btn-outline:hover {
    border-color: #E89548;
    color: #E89548;
    background: rgba(232, 149, 72, 0.06);
}

body.dark-mode .kw-pm-card-visual {
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5);
}

body.dark-mode .kw-pm-alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
}

body.dark-mode .kw-pm-alert-warning {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
}

/* ==========================================================================
   INVOICES PAGE — Hostinger hPanel Style
   Namespace: .kw-inv-*
   ========================================================================== */

.kw-inv-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

/* -----------------------------------------
   STATS BAR
----------------------------------------- */
.kw-inv-page .kw-inv-stats {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 16px !important;
    margin-bottom: 28px !important;
    list-style: none !important;
    padding: 0 !important;
}

.kw-inv-page .kw-inv-stat-card {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    padding: 20px 24px !important;
    background: #ffffff !important;
    border: 1px solid var(--kw-app-border, #e2e8f0) !important;
    border-radius: 14px !important;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02) !important;
}

.kw-inv-page .kw-inv-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06) !important;
}

.kw-inv-page .kw-inv-stat-icon {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    border-radius: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.2rem !important;
    flex-shrink: 0 !important;
}

.kw-inv-stat-icon-blue {
    background: rgba(37, 99, 235, 0.1) !important;
    color: #2563eb !important;
}

.kw-inv-stat-icon-orange {
    background: rgba(232, 149, 72, 0.12) !important;
    color: #E89548 !important;
}

.kw-inv-stat-icon-green {
    background: rgba(16, 185, 129, 0.1) !important;
    color: #10b981 !important;
}

.kw-inv-page .kw-inv-stat-info {
    display: flex !important;
    flex-direction: column !important;
}

.kw-inv-page .kw-inv-stat-val {
    font-family: 'Poppins', sans-serif !important;
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    color: var(--kw-app-text, #0f172a) !important;
    line-height: 1.2 !important;
}

.kw-inv-page .kw-inv-stat-lbl {
    font-size: 0.825rem !important;
    color: var(--kw-app-text-muted, #64748b) !important;
    font-weight: 500 !important;
}

/* -----------------------------------------
   FILTER PILLS
----------------------------------------- */
.kw-inv-page .kw-inv-filters {
    display: flex !important;
    gap: 8px !important;
    margin-bottom: 20px !important;
    flex-wrap: wrap !important;
    padding: 0 !important;
}

.kw-inv-page .kw-inv-filters.list-group {
    border: none !important;
    background: transparent !important;
}

.kw-inv-page .kw-inv-filter-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 8px 18px !important;
    border-radius: 50px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: var(--kw-app-text-muted, #64748b) !important;
    background: #ffffff !important;
    border: 1.5px solid var(--kw-app-border, #e2e8f0) !important;
    text-decoration: none !important;
    transition: all 0.2s ease;
    cursor: pointer !important;
}

.kw-inv-page .kw-inv-filter-pill:hover {
    border-color: #cbd5e1 !important;
    color: var(--kw-app-text, #0f172a) !important;
    text-decoration: none !important;
    background: #f8fafc !important;
}

.kw-inv-page .kw-inv-filter-pill.active {
    background: linear-gradient(135deg, #E89548, #d17f3a) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: 0 4px 12px rgba(232, 149, 72, 0.25) !important;
}

.kw-inv-filter-pill.active:hover {
    color: #ffffff;
}

.kw-inv-filter-pill i {
    font-size: 0.7rem;
}

.kw-inv-filter-pill .badge {
    background: rgba(255, 255, 255, 0.25);
    color: inherit;
    font-size: 0.72rem;
    padding: 2px 7px;
    border-radius: 20px;
    font-weight: 700;
}

.kw-inv-filter-pill:not(.active) .badge {
    background: #f1f5f9;
    color: var(--kw-app-text-muted, #64748b);
}

/* -----------------------------------------
   TABLE CONTAINER
----------------------------------------- */
.kw-inv-table-container {
    background: #ffffff;
    border: 1px solid var(--kw-app-border, #e2e8f0);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    margin-bottom: 32px;
}

.kw-inv-table {
    margin: 0 !important;
    border-collapse: collapse;
    width: 100% !important;
}

.kw-inv-table thead th {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    padding: 14px 20px !important;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--kw-app-text-muted, #64748b);
    white-space: nowrap;
}

.kw-inv-table thead th i {
    margin-right: 6px;
    font-size: 0.75rem;
    opacity: 0.6;
}

.kw-inv-table tbody td {
    padding: 16px 20px !important;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    font-size: 0.925rem;
}

.kw-inv-row {
    cursor: pointer;
    transition: background 0.15s ease;
}

.kw-inv-row:hover {
    background: #fafbfc !important;
}

.kw-inv-num {
    font-weight: 700;
    color: var(--kw-app-text, #0f172a);
    font-family: 'Poppins', sans-serif;
}

.kw-inv-date {
    color: var(--kw-app-text-muted, #64748b);
    font-size: 0.875rem;
}

.kw-inv-amount {
    font-weight: 700;
    color: var(--kw-app-text, #0f172a);
    font-family: 'Poppins', sans-serif;
}

/* Status Badges */
.kw-inv-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* Override native WHMCS .label.status base styles */
.kw-inv-table .label.status.kw-inv-badge {
    border: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
    line-height: 1.4;
}

/* List-group-item reset for filter pills */
.kw-inv-filters .list-group-item {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-flex !important;
    border-radius: 0 !important;
}

.kw-inv-filters .list-group-item.kw-inv-filter-pill {
    padding: 8px 18px !important;
    border: 1.5px solid var(--kw-app-border, #e2e8f0) !important;
    border-radius: 50px !important;
    background: #ffffff !important;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--kw-app-text-muted, #64748b);
    transition: all 0.2s ease;
}

.kw-inv-filters .list-group-item.kw-inv-filter-pill:hover {
    border-color: #cbd5e1 !important;
    color: var(--kw-app-text, #0f172a);
    background: #f8fafc !important;
}

.kw-inv-filters .list-group-item.kw-inv-filter-pill.active {
    background: linear-gradient(135deg, #E89548, #d17f3a) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: 0 4px 12px rgba(232, 149, 72, 0.25);
}

.kw-inv-badge-paid,
.kw-inv-badge-Paid {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
}

.kw-inv-badge-unpaid,
.kw-inv-badge-Unpaid {
    background: rgba(232, 149, 72, 0.12);
    color: #c4701f;
}

.kw-inv-badge-overdue,
.kw-inv-badge-Overdue {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
}

.kw-inv-badge-cancelled,
.kw-inv-badge-Cancelled {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.kw-inv-badge-refunded,
.kw-inv-badge-Refunded {
    background: rgba(99, 102, 241, 0.1);
    color: #4f46e5;
}

.kw-inv-badge-draft,
.kw-inv-badge-Draft {
    background: rgba(168, 162, 158, 0.1);
    color: #78716c;
}

.kw-inv-badge-collections,
.kw-inv-badge-Collections {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
}

.kw-inv-badge-payment-pending,
.kw-inv-badge-Payment\ Pending {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

/* Loading */
.kw-inv-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 48px 24px;
    color: var(--kw-app-text-muted, #64748b);
}

/* DataTables Overrides */
.kw-inv-table-container .dataTables_wrapper {
    padding: 0;
}

.kw-inv-table-container .dataTables_filter {
    padding: 16px 20px;
    margin: 0;
}

.kw-inv-table-container .dataTables_filter input {
    border: 1.5px solid var(--kw-app-border, #e2e8f0);
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.2s ease;
    min-width: 220px;
}

.kw-inv-table-container .dataTables_filter input:focus {
    border-color: #E89548;
    box-shadow: 0 0 0 3px rgba(232, 149, 72, 0.1);
}

.kw-inv-table-container .dataTables_info {
    padding: 14px 20px;
    font-size: 0.825rem;
    color: var(--kw-app-text-muted, #64748b);
}

.kw-inv-table-container .dataTables_length {
    padding: 16px 20px;
}

.kw-inv-table-container .dataTables_length select {
    border: 1.5px solid var(--kw-app-border, #e2e8f0);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
    outline: none;
}

.kw-inv-table-container .dataTables_paginate {
    padding: 14px 20px;
}

.kw-inv-table-container .dataTables_paginate .paginate_button {
    padding: 6px 12px !important;
    border-radius: 8px !important;
    border: 1.5px solid var(--kw-app-border, #e2e8f0) !important;
    margin: 0 3px;
    font-size: 0.825rem;
    font-weight: 600;
    transition: all 0.15s ease;
}

.kw-inv-table-container .dataTables_paginate .paginate_button.current {
    background: linear-gradient(135deg, #E89548, #d17f3a) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(232, 149, 72, 0.3);
}

.kw-inv-table-container .dataTables_paginate .paginate_button:hover {
    background: #f8fafc !important;
    border-color: #E89548 !important;
    color: #E89548 !important;
}

/* ==========================================================================
   ADD FUNDS PAGE — Hostinger hPanel Style
   Namespace: .kw-af-*
   ========================================================================== */

.kw-af-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px;
}

.kw-af-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 28px;
    align-items: start;
}

.kw-af-form-col {
    min-width: 0;
}

/* -----------------------------------------
   QUICK AMOUNTS
----------------------------------------- */
.kw-af-quick-amounts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.kw-af-quick-btn {
    padding: 14px 12px;
    border: 2px solid var(--kw-app-border, #e2e8f0);
    border-radius: 12px;
    background: #fafbfc;
    color: var(--kw-app-text, #0f172a);
    font-size: 0.9rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.kw-af-quick-btn:hover {
    border-color: #E89548;
    background: rgba(232, 149, 72, 0.04);
    color: #E89548;
}

.kw-af-quick-btn.active {
    border-color: #E89548;
    background: rgba(232, 149, 72, 0.08);
    color: #E89548;
    box-shadow: 0 0 0 3px rgba(232, 149, 72, 0.12);
}

/* -----------------------------------------
   AMOUNT INPUT
----------------------------------------- */
.kw-af-amount-input {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    font-family: 'Poppins', sans-serif !important;
    padding: 16px 16px 16px 46px !important;
}

/* -----------------------------------------
   GATEWAY SELECTOR
----------------------------------------- */
.kw-af-gateway-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kw-af-gateway-card {
    cursor: pointer;
    margin: 0;
    display: block;
}

.kw-af-gateway-card input[type="radio"] {
    display: none;
}

.kw-af-gateway-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border: 1.5px solid var(--kw-app-border, #e2e8f0);
    border-radius: 12px;
    background: #fafbfc;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.kw-af-gateway-card input:checked+.kw-af-gateway-inner {
    border-color: #E89548;
    background: rgba(232, 149, 72, 0.04);
    box-shadow: 0 0 0 3px rgba(232, 149, 72, 0.1);
}

.kw-af-gateway-card:hover .kw-af-gateway-inner {
    border-color: #cbd5e1;
    background: #ffffff;
}

.kw-af-gateway-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 1rem;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.kw-af-gateway-card input:checked+.kw-af-gateway-inner .kw-af-gateway-icon {
    background: linear-gradient(135deg, #fef3e2, #fde8cd);
    color: #E89548;
}

.kw-af-gateway-logo {
    height: 28px;
    width: auto;
    max-width: 56px;
    object-fit: contain;
    border-radius: 6px;
    background: #ffffff;
    padding: 3px 5px;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.kw-af-gateway-card input:checked+.kw-af-gateway-inner .kw-af-gateway-logo {
    border-color: #E89548;
    box-shadow: 0 0 0 2px rgba(232, 149, 72, 0.2);
}

.kw-af-gateway-icon > i {
    font-size: 1.15rem;
}

.kw-af-icon-paypal {
    color: #003087;
    background: linear-gradient(135deg, #f0f4ff, #dce6ff);
}

.kw-af-icon-stripe {
    color: #635bff;
    background: linear-gradient(135deg, #f0efff, #e0deff);
}

.kw-af-gateway-card input:checked+.kw-af-gateway-inner .kw-af-icon-paypal {
    background: linear-gradient(135deg, #dce6ff, #c4d4ff);
    color: #003087;
}

.kw-af-gateway-card input:checked+.kw-af-gateway-inner .kw-af-icon-stripe {
    background: linear-gradient(135deg, #e0deff, #c9c5ff);
    color: #635bff;
}

.kw-af-gateway-name {
    font-size: 0.925rem;
    font-weight: 600;
    color: var(--kw-app-text, #0f172a);
    flex-grow: 1;
}

.kw-af-gateway-check {
    color: transparent;
    font-size: 1.1rem;
    transition: color 0.2s ease;
}

.kw-af-gateway-card input:checked+.kw-af-gateway-inner .kw-af-gateway-check {
    color: #E89548;
}

/* -----------------------------------------
   SUBMIT
----------------------------------------- */
.kw-af-submit-section {
    margin-top: 4px;
}

.kw-af-submit-btn {
    width: 100%;
    justify-content: center;
}

/* -----------------------------------------
   INFO SIDEBAR
----------------------------------------- */
.kw-af-info-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.kw-af-info-card {
    background: #ffffff;
    border: 1px solid var(--kw-app-border, #e2e8f0);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.kw-af-info-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 18px;
}

.kw-af-info-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--kw-app-text, #0f172a);
    margin: 0 0 18px;
}

.kw-af-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.kw-af-info-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
}

.kw-af-info-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.kw-af-info-list li>i {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 0.8rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.kw-af-info-label {
    display: block;
    font-size: 0.8rem;
    color: var(--kw-app-text-muted, #64748b);
    font-weight: 500;
    margin-bottom: 2px;
}

.kw-af-info-value {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--kw-app-text, #0f172a);
    font-family: 'Poppins', sans-serif;
}

/* Notice */
.kw-af-notice {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    background: rgba(232, 149, 72, 0.05);
    border: 1px solid rgba(232, 149, 72, 0.15);
    border-radius: 14px;
}

.kw-af-notice>i {
    color: #E89548;
    font-size: 1.1rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.kw-af-notice strong {
    display: block;
    font-size: 0.875rem;
    color: #c4701f;
    margin-bottom: 4px;
}

.kw-af-notice p {
    margin: 0;
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.5;
}

/* -----------------------------------------
   RESPONSIVE
----------------------------------------- */
@media (max-width: 991.98px) {
    .kw-inv-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .kw-inv-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .kw-inv-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }

    .kw-inv-filter-pill {
        flex-shrink: 0;
    }

    .kw-inv-table thead th {
        padding: 12px 14px !important;
        font-size: 0.72rem;
    }

    .kw-inv-table tbody td {
        padding: 12px 14px !important;
        font-size: 0.85rem;
    }

    .kw-af-layout {
        grid-template-columns: 1fr;
    }

    .kw-af-quick-amounts {
        grid-template-columns: repeat(2, 1fr);
    }

    .kw-af-info-col {
        order: -1;
    }
}

/* -----------------------------------------
   DARK MODE — INVOICES
----------------------------------------- */
body.dark-mode .kw-inv-stat-card {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .kw-inv-stat-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

body.dark-mode .kw-inv-filter-pill,
body.dark-mode .kw-inv-filters .list-group-item.kw-inv-filter-pill {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #94a3b8;
}

body.dark-mode .kw-inv-filter-pill:hover,
body.dark-mode .kw-inv-filters .list-group-item.kw-inv-filter-pill:hover {
    background: #0f172a !important;
    border-color: #475569 !important;
    color: #f1f5f9;
}

body.dark-mode .kw-inv-filter-pill.active,
body.dark-mode .kw-inv-filters .list-group-item.kw-inv-filter-pill.active {
    background: linear-gradient(135deg, #E89548, #d17f3a) !important;
    color: #fff !important;
    border-color: transparent !important;
}

body.dark-mode .kw-inv-table-container {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .kw-inv-table thead th {
    background: #0f172a;
    border-color: #334155;
    color: #94a3b8;
}

body.dark-mode .kw-inv-table tbody td {
    border-color: #1e293b;
}

body.dark-mode .kw-inv-row:hover {
    background: #0f172a !important;
}

body.dark-mode .kw-inv-table-container .dataTables_filter input {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

body.dark-mode .kw-inv-table-container .dataTables_filter input:focus {
    border-color: #E89548;
}

body.dark-mode .kw-inv-table-container .dataTables_paginate .paginate_button {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #94a3b8 !important;
}

body.dark-mode .kw-inv-table-container .dataTables_paginate .paginate_button.current {
    background: linear-gradient(135deg, #E89548, #d17f3a) !important;
    border-color: transparent !important;
    color: #fff !important;
}

/* -----------------------------------------
   DARK MODE — ADD FUNDS
----------------------------------------- */
body.dark-mode .kw-af-quick-btn {
    background: #0f172a;
    border-color: #334155;
    color: #cbd5e1;
}

body.dark-mode .kw-af-quick-btn:hover,
body.dark-mode .kw-af-quick-btn.active {
    border-color: #E89548;
    color: #E89548;
    background: rgba(232, 149, 72, 0.06);
}

body.dark-mode .kw-af-gateway-inner {
    background: #0f172a;
    border-color: #334155;
}

body.dark-mode .kw-af-gateway-card:hover .kw-af-gateway-inner {
    background: #1e293b;
    border-color: #475569;
}

body.dark-mode .kw-af-gateway-logo {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .kw-af-gateway-card input:checked+.kw-af-gateway-inner .kw-af-gateway-logo {
    border-color: #E89548;
    background: #0f172a;
}

body.dark-mode .kw-af-icon-paypal {
    background: linear-gradient(135deg, #1e2a4a, #1a2244);
    color: #7b9eff;
}

body.dark-mode .kw-af-icon-stripe {
    background: linear-gradient(135deg, #1e1b4b, #1a1840);
    color: #8b85ff;
}

body.dark-mode .kw-af-gateway-icon {
    background: linear-gradient(135deg, #334155, #1e293b);
    color: #94a3b8;
}

body.dark-mode .kw-af-info-card {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .kw-af-info-list li {
    border-color: #334155;
}

body.dark-mode .kw-af-info-list li>i {
    background: #0f172a;
    color: #94a3b8;
}

body.dark-mode .kw-af-notice {
    background: rgba(232, 149, 72, 0.06);
    border-color: rgba(232, 149, 72, 0.15);
}

/* =========================================================================
   DESIGN TOKENS (Premium Variables)
   ========================================================================= */
:root {
    --kh-bg-card: #ffffff;
    --kh-border-light: #e2e8f0;
    --kh-radius-md: 12px;
    --kh-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --kh-text-dark: #0f172a;
    --kh-text-muted: #64748b;
}

body.dark-mode {
    --kh-bg-card: #1e293b;
    --kh-border-light: #334155;
    --kh-text-dark: #f8fafc;
    --kh-text-muted: #94a3b8;
}

/* =========================================================================
   GLOBAL KH-CHECKOUT-CARD (Premium Cards)
   ========================================================================= */

.kh-checkout-card {
    background: var(--kh-bg-card, #ffffff);
    border: 1px solid var(--kh-border-light, #e2e8f0);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.kh-checkout-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

body.dark-mode .kh-checkout-card {
    background: #1e293b;
    border-color: #334155;
    color: #f8fafc;
}

/* =========================================================================
   DOMAIN DETAILS DASHBOARD RE-DESIGN 
   ========================================================================= */

.kw-domain-dash-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (min-width: 992px) {
    .kw-domain-dash-grid {
        grid-template-columns: repeat(12, 1fr);
    }

    .kw-dash-card {
        grid-column: span 6;
        /* Half-width for billing, ssl, etc */
    }

    .kw-dash-status-card {
        grid-column: span 12;
        /* Full width for Status */
    }

    .kw-dash-actions-card {
        grid-column: span 12;
        /* Full width for Quick Actions */
    }
}

.kw-dash-card {
    display: flex;
    flex-direction: column;
    padding: 24px !important;
}

.kw-dash-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--kh-border-light);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.kw-dash-card-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--kh-text-dark);
}

.kw-domain-status-badge {
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.kw-domain-status-badge.status-active {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.kw-domain-status-badge.status-expired {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.kw-domain-name {
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 5px;
    word-break: break-all;
}

.kw-domain-name a {
    color: var(--kh-text-dark);
    text-decoration: none;
}

.kw-dash-meta-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.kw-meta-item {
    display: flex;
    flex-direction: column;
}

.kw-meta-label,
.kw-list-label {
    font-size: 0.85rem;
    color: var(--kh-text-muted);
    margin-bottom: 4px;
}

.kw-meta-val,
.kw-list-val {
    font-weight: 600;
    color: var(--kh-text-dark);
}

.kw-dash-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.kw-dash-list li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--kh-border-light);
}

.kw-dash-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.kw-ssl-status {
    padding: 20px;
    border-radius: var(--kh-radius-md);
    background: rgba(34, 197, 94, 0.05);
    border: 1px dashed rgba(34, 197, 94, 0.3);
}

.kw-ssl-status.ssl-inactive {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.3);
}

.kw-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.kw-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #ffffff;
    border: 1px solid var(--kh-border-light, #e2e8f0);
    border-radius: 12px;
    padding: 24px 15px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--kh-text-dark, #0f172a);
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.kw-action-btn i {
    font-size: 28px;
    margin-bottom: 12px;
    color: #4b5563;
    /* neutral dark gray */
    transition: color 0.2s ease;
}

.kw-action-btn:hover {
    border-color: #6366f1;
    /* purple/indigo for primary hover */
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
    color: #6366f1;
    text-decoration: none;
}

.kw-action-btn:hover i {
    color: #6366f1;
}

.kw-action-renew:hover {
    border-color: #10b981;
    /* Green for renew */
    color: #10b981;
}

/* =========================================================================
   MY DETAILS RE-DESIGN (Kheweul Orange Accent)
   ========================================================================= */

.kw-btn-pill {
    border-radius: 50px !important;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

.kw-btn-primary {
    background-color: #E89548 !important;
    /* Kheweul Orange */
    border-color: #E89548 !important;
    color: #fff !important;
}

.kw-btn-primary:hover,
.kw-btn-primary:focus,
.kw-btn-primary:active {
    background-color: #d1853f !important;
    border-color: #cc823d !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(232, 149, 72, 0.3) !important;
}

/* Form input default state - Premium Hostinger style */
.kh-checkout-card .form-control,
.kh-checkout-card .custom-select {
    background-color: #f8fafc;
    /* Very light slate gray */
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: #0f172a;
    transition: all 0.2s ease-in-out;
    height: auto;
    /* overrides bootstrap fixed height */
}

/* Form inputs on focus */
.kh-checkout-card .form-control:focus,
.kh-checkout-card .custom-select:focus {
    background-color: #ffffff;
    border-color: #E89548;
    box-shadow: 0 0 0 3px rgba(232, 149, 72, 0.15);
    /* Softer, broader focus ring */
    outline: none;
}

/* Premium Labels */
.kh-checkout-card .col-form-label,
.kh-checkout-card label:not(.form-check-label) {
    font-weight: 600;
    font-size: 0.85rem;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
    padding-top: 0;
}

body.dark-mode .kh-checkout-card .form-control,
body.dark-mode .kh-checkout-card .custom-select {
    background-color: #0f172a;
    border-color: #334155;
    color: #f8fafc;
}

body.dark-mode .kh-checkout-card .form-control:focus,
body.dark-mode .kh-checkout-card .custom-select:focus {
    background-color: #1e293b;
    border-color: #E89548;
    box-shadow: 0 0 0 3px rgba(232, 149, 72, 0.25);
}

body.dark-mode .kw-dash-card-header h4 {
    color: #f8fafc;
}

body.dark-mode .kh-checkout-card .col-form-label,
body.dark-mode .kh-checkout-card label:not(.form-check-label) {
    color: #94a3b8;
}

body.dark-mode .kh-checkout-card .text-muted {
    color: #94a3b8 !important;
}

.kw-action-renew:hover i {
    color: #10b981;
}

/* Dark Mode Overrides for Dashboard */
body.dark-mode .kw-dash-card-header h4,
body.dark-mode .kw-domain-name a,
body.dark-mode .kw-meta-val,
body.dark-mode .kw-list-val {
    color: #f8fafc;
}

body.dark-mode .kw-dash-card-header,
body.dark-mode .kw-dash-list li {
    border-color: #334155;
}

body.dark-mode .kw-ssl-status {
    background: rgba(34, 197, 94, 0.1);
}

body.dark-mode .kw-ssl-status.ssl-inactive {
    background: rgba(239, 68, 68, 0.1);
}

/* -----------------------------------------
   NOTIFICATIONS DROPDOWN (PREMIUM CLOCHE)
----------------------------------------- */
.kw-notifications-wrapper {
    position: relative;
    display: inline-block;
}

.kw-notifications-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: transparent;
    border-radius: 10px;
    color: #475569;
    font-size: 1.15rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.kw-notifications-toggle:hover {
    background: #f1f4f9;
    border-color: #d4dae6;
    color: var(--kw-brand-primary);
}

body.dark-mode .kw-notifications-toggle {
    color: #9ca3af;
}

.kw-notifications-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
    animation: pulse-ring-notif 2s infinite;
}

@keyframes pulse-ring-notif {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.kw-notifications-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: -60px; /* Align generally to the right */
    width: 360px;
    background: #ffffff;
    border: 1px solid var(--kw-app-border);
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1050;
    display: flex;
    flex-direction: column;
}

.kw-notifications-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 73px;
    width: 10px;
    height: 10px;
    background: #ffffff;
    border-left: 1px solid var(--kw-app-border);
    border-top: 1px solid var(--kw-app-border);
    transform: rotate(45deg);
}

.kw-notifications-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.kw-notifications-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--kw-app-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border-radius: 14px 14px 0 0;
}

.kw-notifications-title {
    font-weight: 700;
    color: var(--kw-app-text);
    font-size: 1.05rem;
}

.kw-notifications-body {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px 0;
}

.kw-notifications-body::-webkit-scrollbar {
    width: 6px;
}
.kw-notifications-body::-webkit-scrollbar-track {
    background: transparent;
}
.kw-notifications-body::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 10px;
}

.kw-notification-item {
    display: flex;
    padding: 12px 20px;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none !important;
    transition: background 0.2s ease;
    align-items: flex-start;
}

.kw-notification-item:last-child {
    border-bottom: none;
}

.kw-notification-item:hover {
    background: #f8fafc;
}

.kw-notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
    margin-right: 12px;
}

.kw-notification-content {
    flex-grow: 1;
}

.kw-notification-message {
    color: var(--kw-app-text);
    font-size: 0.9rem;
    line-height: 1.4;
    font-weight: 500;
}

.kw-notification-empty {
    padding: 40px 20px;
    text-align: center;
}

.kw-empty-icon {
    font-size: 2.5rem;
    color: #cbd5e1;
    margin-bottom: 16px;
}

.kw-empty-title {
    font-weight: 700;
    color: var(--kw-app-text);
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.kw-empty-desc {
    color: var(--kw-app-text-muted);
    font-size: 0.9rem;
}

.kw-notifications-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--kw-app-border);
    text-align: center;
    background: #f8fafc;
    border-radius: 0 0 14px 14px;
}

.kw-notifications-footer a {
    color: var(--kw-brand-primary);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.kw-notifications-footer a:hover {
    color: #c97d39;
}

/* Dark Mode Overrides for Notifications */
body.dark-mode .kw-notifications-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .kw-notifications-dropdown {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

body.dark-mode .kw-notifications-dropdown::before {
    background: #1e293b;
    border-bottom-color: transparent !important;
    border-right-color: transparent !important;
    border-left-color: #334155;
    border-top-color: #334155;
}

body.dark-mode .kw-notifications-header {
    background: rgba(15, 23, 42, 0.4);
    border-bottom-color: #334155;
}

body.dark-mode .kw-notifications-title {
    color: #f8fafc;
}

body.dark-mode .kw-notification-item {
    border-bottom-color: #334155;
}

body.dark-mode .kw-notification-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

body.dark-mode .kw-notification-message,
body.dark-mode .kw-empty-title {
    color: #f8fafc;
}

body.dark-mode .kw-empty-desc {
    color: #94a3b8;
}

body.dark-mode .kw-notifications-footer {
    background: rgba(15, 23, 42, 0.4);
    border-top-color: #334155;
}

body.dark-mode .kw-notifications-badge {
    border-color: #1e293b;
}

@media (max-width: 576.98px) {
    .kw-notifications-dropdown {
        position: fixed;
        top: 70px; /* Topbar height */
        right: 10px;
        left: 10px;
        width: auto;
        transform: translateY(-10px);
    }
    
    .kw-notifications-dropdown::before {
        display: none;
    }
}

/* ════════════════════════════════════════════════════════════════
   DASHBOARD REDESIGN — clientareahome.tpl
   ════════════════════════════════════════════════════════════════ */

/* ── EN-TÊTE ──────────────────────────────────────────────────── */
.kw-dash-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.kw-dash-welcome-subtitle {
    font-size: 0.9rem;
    color: var(--kw-app-text-muted);
    margin: 0.2rem 0 0;
}

.kw-dash-addfunds-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--kw-brand-primary, #E89548);
    color: #fff;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
    white-space: nowrap;
}
.kw-dash-addfunds-btn:hover {
    background: #d4843f;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

/* ── BARRE DE STATS ───────────────────────────────────────────── */
.kw-dash-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.875rem;
    margin-bottom: 1.75rem;
}

.kw-stat-card {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    background: #ffffff;
    border: 1px solid var(--kw-app-border, #e2e8f0);
    border-radius: 12px;
    padding: 1rem 1.125rem;
    text-decoration: none;
    transition: box-shadow 0.2s, transform 0.15s, border-color 0.2s;
    min-width: 0;
}
.kw-stat-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.07);
    transform: translateY(-2px);
    border-color: #cbd5e1;
    text-decoration: none;
}
.kw-stat-card-danger {
    border-color: #fecaca;
    background: #fff8f8;
}

.kw-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.kw-stat-icon-blue   { background: #eff6ff; color: #3b82f6; }
.kw-stat-icon-green  { background: #f0fdf4; color: #10b981; }
.kw-stat-icon-red    { background: #fff1f2; color: #ef4444; }
.kw-stat-icon-orange { background: #fff7ed; color: #E89548; }
.kw-stat-icon-purple { background: #f5f3ff; color: #8b5cf6; }
.kw-stat-icon-slate  { background: #f8fafc; color: #64748b; }

.kw-stat-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}
.kw-stat-val {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--kw-app-text, #0f172a);
    line-height: 1.2;
}
.kw-stat-val-sm {
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.4;
}
.kw-stat-lbl {
    font-size: 0.76rem;
    color: var(--kw-app-text-muted, #64748b);
    line-height: 1.3;
    margin-top: 2px;
}

/* ── SECTIONS ─────────────────────────────────────────────────── */
.kw-dash-section {
    background: #ffffff;
    border: 1px solid var(--kw-app-border, #e2e8f0);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.kw-dash-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid var(--kw-app-border, #e2e8f0);
    background: #f8fafc;
}

.kw-dash-section-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}
.kw-dash-section-title > i { color: #64748b; font-size: 0.95rem; }
.kw-dash-section-title h2 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--kw-app-text, #0f172a);
}

.kw-dash-section-badge {
    background: #e2e8f0;
    color: #475569;
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 0.73rem;
    font-weight: 700;
}
.kw-dash-section-badge-danger { background: #fee2e2; color: #b91c1c; }

.kw-dash-section-link {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--kw-brand-primary, #E89548);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: color 0.2s;
}
.kw-dash-section-link:hover { color: #d4843f; text-decoration: none; }

/* ── LIGNES D'ITEMS ───────────────────────────────────────────── */
.kw-dash-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--kw-app-border, #e2e8f0);
    transition: background 0.12s;
}
.kw-dash-item:last-child { border-bottom: none; }
.kw-dash-item:hover { background: #f8fafc; }

.kw-dash-item-icon {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}
.kw-dash-item-icon-green  { background: linear-gradient(135deg, #f0fdf4, #dcfce7); color: #10b981; }
.kw-dash-item-icon-orange { background: linear-gradient(135deg, #fff7ed, #fed7aa); color: #E89548; }

.kw-dash-item-main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}
.kw-dash-item-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--kw-app-text, #0f172a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.kw-dash-domain-name { font-family: 'Courier New', monospace; font-size: 0.85rem; }
.kw-dash-item-sub {
    font-size: 0.76rem;
    color: var(--kw-app-text-muted, #64748b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

/* Badges d'expiration */
.kw-dash-expiry-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.76rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
    white-space: nowrap;
}
.kw-dash-expiry-ok      { background: #f0fdf4; color: #15803d; }
.kw-dash-expiry-warning { background: #fff7ed; color: #c2410c; }
.kw-dash-expiry-danger  { background: #fff1f2; color: #b91c1c; }

/* Statut */
.kw-dash-item-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--kw-app-text-muted, #64748b);
    flex-shrink: 0;
    min-width: 64px;
}
.kw-dash-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.kw-dash-status-active    { background: #10b981; }
.kw-dash-status-suspended { background: #f59e0b; }
.kw-dash-status-expired   { background: #ef4444; }

/* Bouton Gérer */
.kw-dash-item-action { flex-shrink: 0; }

.kw-dash-btn-manage {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.875rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--kw-app-text, #0f172a);
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
}
.kw-dash-btn-manage:hover {
    background: var(--kw-brand-primary, #E89548);
    border-color: var(--kw-brand-primary, #E89548);
    color: #fff;
    text-decoration: none;
}

/* ── ÉTATS VIDES ──────────────────────────────────────────────── */
.kw-dash-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2.25rem 1.5rem;
    gap: 0.6rem;
    text-align: center;
}
.kw-dash-empty-sm { padding: 1.5rem; }
.kw-dash-empty > i { font-size: 2.25rem; color: #cbd5e1; }
.kw-dash-empty p { color: var(--kw-app-text-muted, #64748b); font-size: 0.875rem; margin: 0; }
.kw-dash-empty-link { color: var(--kw-brand-primary, #E89548); font-size: 0.85rem; font-weight: 600; text-decoration: none; }
.kw-dash-empty-link:hover { text-decoration: underline; }

/* ── RANGÉE DU BAS (2 colonnes) ──────────────────────────────── */
.kw-dash-bottom-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    align-items: start;
}
.kw-dash-section-half { margin-bottom: 0; }

/* ── FACTURES ─────────────────────────────────────────────────── */
.kw-dash-invoice-item { flex-wrap: wrap; }

.kw-dash-invoice-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.kw-dash-invoice-amount {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
}
.kw-dash-inv-total {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--kw-app-text, #0f172a);
}
.kw-dash-inv-status {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 20px;
    margin-top: 3px;
}
.kw-inv-unpaid  { background: #fef9c3; color: #854d0e; }
.kw-inv-overdue { background: #fee2e2; color: #b91c1c; }

.kw-dash-btn-pay {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.875rem;
    background: var(--kw-brand-primary, #E89548);
    border-radius: 7px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    transition: background 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}
.kw-dash-btn-pay:hover { background: #d4843f; color: #fff; text-decoration: none; }

/* ── ACTIONS RAPIDES ──────────────────────────────────────────── */
.kw-quick-action {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.8rem 1.25rem;
    text-decoration: none;
    color: var(--kw-app-text, #0f172a);
    border-bottom: 1px solid var(--kw-app-border, #e2e8f0);
    transition: background 0.12s;
}
.kw-quick-action:last-child { border-bottom: none; }
.kw-quick-action:hover { background: #f8fafc; text-decoration: none; color: var(--kw-app-text, #0f172a); }

.kw-quick-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.kw-quick-icon-blue   { background: #eff6ff; color: #3b82f6; }
.kw-quick-icon-green  { background: #f0fdf4; color: #10b981; }
.kw-quick-icon-purple { background: #f5f3ff; color: #8b5cf6; }
.kw-quick-icon-orange { background: #fff7ed; color: #E89548; }
.kw-quick-icon-slate  { background: #f8fafc; color: #64748b; }

.kw-quick-action > span { flex: 1; font-size: 0.85rem; font-weight: 500; }
.kw-quick-arrow { color: #cbd5e1; font-size: 0.72rem; }
.kw-quick-action:hover .kw-quick-arrow { color: var(--kw-brand-primary, #E89548); }

/* ── STATUT TICKETS ───────────────────────────────────────────── */
.kw-dash-ticket-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
    white-space: nowrap;
}
.kw-tkt-open     { background: #eff6ff; color: #1d4ed8; }
.kw-tkt-answered { background: #f0fdf4; color: #166534; }
.kw-tkt-reply    { background: #fff7ed; color: #c2410c; }

/* ── DARK MODE ────────────────────────────────────────────────── */
body.dark-mode .kw-stat-card { background: #1e293b; border-color: #334155; }
body.dark-mode .kw-stat-card:hover { border-color: #475569; box-shadow: 0 4px 16px rgba(0,0,0,0.25); }
body.dark-mode .kw-stat-card-danger { background: #1c0808; border-color: #7f1d1d; }
body.dark-mode .kw-stat-icon-blue   { background: #1e3a5f; color: #60a5fa; }
body.dark-mode .kw-stat-icon-green  { background: #052e16; color: #34d399; }
body.dark-mode .kw-stat-icon-red    { background: #450a0a; color: #f87171; }
body.dark-mode .kw-stat-icon-orange { background: #431407; color: #fb923c; }
body.dark-mode .kw-stat-icon-purple { background: #2e1065; color: #a78bfa; }
body.dark-mode .kw-stat-icon-slate  { background: #1e293b; color: #94a3b8; }
body.dark-mode .kw-stat-val { color: #f8fafc; }
body.dark-mode .kw-dash-addfunds-btn { background: #d4843f; }
body.dark-mode .kw-dash-section { background: #1e293b; border-color: #334155; }
body.dark-mode .kw-dash-section-header { background: #0f172a; border-color: #334155; }
body.dark-mode .kw-dash-section-title h2 { color: #f1f5f9; }
body.dark-mode .kw-dash-section-badge { background: #334155; color: #94a3b8; }
body.dark-mode .kw-dash-item { border-color: #334155; }
body.dark-mode .kw-dash-item:hover { background: #0f172a; }
body.dark-mode .kw-dash-item-icon { background: linear-gradient(135deg, #1e3a5f, #1e2a4a); color: #60a5fa; }
body.dark-mode .kw-dash-item-icon-green  { background: linear-gradient(135deg, #052e16, #064e3b); color: #34d399; }
body.dark-mode .kw-dash-item-icon-orange { background: linear-gradient(135deg, #431407, #451a03); color: #fb923c; }
body.dark-mode .kw-dash-item-name { color: #f1f5f9; }
body.dark-mode .kw-dash-btn-manage { background: #334155; border-color: #475569; color: #e2e8f0; }
body.dark-mode .kw-dash-btn-manage:hover { background: var(--kw-brand-primary, #E89548); border-color: var(--kw-brand-primary, #E89548); color: #fff; }
body.dark-mode .kw-dash-expiry-ok      { background: #052e16; color: #86efac; }
body.dark-mode .kw-dash-expiry-warning { background: #431407; color: #fed7aa; }
body.dark-mode .kw-dash-expiry-danger  { background: #450a0a; color: #fca5a5; }
body.dark-mode .kw-dash-empty > i { color: #475569; }
body.dark-mode .kw-dash-empty p { color: #94a3b8; }
body.dark-mode .kw-dash-inv-total { color: #f1f5f9; }
body.dark-mode .kw-inv-unpaid  { background: #422006; color: #fcd34d; }
body.dark-mode .kw-inv-overdue { background: #450a0a; color: #fca5a5; }
body.dark-mode .kw-dash-btn-pay { background: #d4843f; }
body.dark-mode .kw-quick-action { color: #e2e8f0; border-color: #334155; }
body.dark-mode .kw-quick-action:hover { background: #0f172a; color: #e2e8f0; }
body.dark-mode .kw-quick-icon-blue   { background: #1e3a5f; color: #60a5fa; }
body.dark-mode .kw-quick-icon-green  { background: #052e16; color: #34d399; }
body.dark-mode .kw-quick-icon-purple { background: #2e1065; color: #a78bfa; }
body.dark-mode .kw-quick-icon-orange { background: #431407; color: #fb923c; }
body.dark-mode .kw-quick-icon-slate  { background: #1e293b; color: #94a3b8; }
body.dark-mode .kw-quick-action > span { color: #e2e8f0; }
body.dark-mode .kw-quick-arrow { color: #475569; }
body.dark-mode .kw-tkt-open     { background: #1e3a5f; color: #93c5fd; }
body.dark-mode .kw-tkt-answered { background: #052e16; color: #86efac; }
body.dark-mode .kw-tkt-reply    { background: #431407; color: #fed7aa; }
body.dark-mode .kw-dash-welcome-subtitle { color: #94a3b8; }

/* ── RESPONSIVE ───────────────────────────────────────────────── */
@media (max-width: 1199px) {
    .kw-dash-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 767px) {
    .kw-dash-stats { grid-template-columns: repeat(2, 1fr); }
    .kw-dash-bottom-row { grid-template-columns: 1fr; }
    .kw-dash-section-half { margin-bottom: 1.5rem; }
    .kw-dash-item { padding: 0.75rem 1rem; flex-wrap: wrap; }
    .kw-dash-invoice-item { flex-direction: column; align-items: flex-start; }
    .kw-dash-invoice-amount { align-items: flex-start; }
    .kw-dash-header-row { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
    .kw-dash-stats { grid-template-columns: 1fr 1fr; }
    .kw-stat-val { font-size: 1.25rem; }
    .kw-stat-icon { width: 38px; height: 38px; font-size: 1rem; }
    .kw-dash-section-header { padding: 0.75rem 1rem; }
}