/* 
=============================================
CLEAN PREMIUM DASHBOARD — CYBER-GLASS v2
Deep Obsidian + Royal Blue + Cyan Glow
============================================= 
*/

/* --- Variables & Core Setup --- */
:root {
    --cp-bg: #060814;
    /* Deep Obsidian — matches site-wide */
    --cp-card-bg: rgba(15, 23, 42, 0.6);
    /* Dark Navy glass */
    --cp-border: rgba(34, 211, 238, 0.06);
    --cp-border-hover: rgba(34, 211, 238, 0.15);
    --cp-text-main: #f1f5f9;
    /* Silver White */
    --cp-text-muted: #94a3b8;
    /* Slate 400 */

    --cp-blue: #2b50bc;
    /* Royal Blue */
    --cp-blue-soft: rgba(43, 80, 188, 0.1);
    --cp-cyan: #22d3ee;
    /* Cyan Glow */
    --cp-indigo: #6366f1;
    /* Indigo */
    --cp-indigo-soft: rgba(99, 102, 241, 0.1);
    --cp-violet: #a855f7;
    /* Violet */
    --cp-emerald: #10b981;
    /* Emerald 500 */
    --cp-emerald-soft: rgba(16, 185, 129, 0.1);
    --cp-amber: #f59e0b;
    /* Amber 500 */
    --cp-amber-soft: rgba(245, 158, 11, 0.1);
    --cp-red: #ef4444;
    /* Red 500 */
    --cp-red-soft: rgba(239, 68, 68, 0.1);

    --cp-radius-lg: 24px;
    --cp-radius-md: 14px;
    --cp-radius-sm: 10px;

    --cp-shadow-soft: 0 10px 40px -10px rgba(0, 0, 0, 0.4), 0 0 15px rgba(34, 211, 238, 0.03);
    --cp-shadow-hover: 0 20px 50px -15px rgba(0, 0, 0, 0.5), 0 0 25px rgba(34, 211, 238, 0.05);
    --cp-gradient-accent: linear-gradient(135deg, #22d3ee 0%, #a855f7 100%);

    --cp-transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

.cp-dashboard-page {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--cp-bg);
    color: var(--cp-text-main);
    min-height: calc(100vh - 80px);
    padding: 60px 0;
    position: relative;
    overflow-x: clip;
}

[dir="rtl"] .cp-dashboard-page {
    font-family: 'Cairo', 'Inter', system-ui, sans-serif;
}

/* Ambient glow spots */
.cp-dashboard-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 600px 400px at 15% 10%, rgba(34, 211, 238, 0.04), transparent),
        radial-gradient(ellipse 500px 350px at 85% 60%, rgba(168, 85, 247, 0.03), transparent),
        radial-gradient(ellipse 400px 300px at 50% 90%, rgba(43, 80, 188, 0.04), transparent);
    z-index: 0;
    pointer-events: none;
}

/* Subtle grid texture */
.cp-dashboard-page::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(43, 80, 188, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(43, 80, 188, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 20%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}

.cp-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 10;
}

/* --- Header Section --- */
.cp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.cp-user-profile {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cp-avatar {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #22d3ee, #2b50bc, #a855f7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 20px rgba(34, 211, 238, 0.2), 0 0 30px rgba(43, 80, 188, 0.1);
    border: 2px solid rgba(34, 211, 238, 0.15);
}

.cp-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
}

.cp-subtitle {
    font-size: 1rem;
    color: var(--cp-text-muted);
    margin: 4px 0 0 0;
}

/* --- Main Layout --- */
.cp-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 40px;
    align-items: start;
}

/* --- Sidebar Navigation --- */
.cp-sidebar {
    background: transparent;
}

.cp-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cp-nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--cp-text-muted);
    background: transparent;
    border: none;
    border-radius: var(--cp-radius-md);
    cursor: pointer;
    transition: var(--cp-transition);
    text-align: left;
    outline: none;
}

[dir="rtl"] .cp-nav-item {
    text-align: right;
}

.cp-nav-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    transition: var(--cp-transition);
}

.cp-nav-item:hover {
    color: var(--cp-text-main);
    background: rgba(255, 255, 255, 0.03);
}

.cp-nav-item.active {
    color: #22d3ee;
    background: rgba(34, 211, 238, 0.06);
    border: 1px solid rgba(34, 211, 238, 0.12);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), 0 0 20px rgba(34, 211, 238, 0.05);
}

.cp-nav-item.active i {
    color: #22d3ee;
    filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.4));
}

/* --- Cards & Content Areas --- */
.cp-card {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.6), rgba(6, 8, 20, 0.8));
    backdrop-filter: blur(16px) saturate(1.6);
    -webkit-backdrop-filter: blur(16px) saturate(1.6);
    border: 1px solid rgba(34, 211, 238, 0.06);
    border-radius: var(--cp-radius-lg);
    box-shadow: var(--cp-shadow-soft);
    overflow: hidden;
    transition: var(--cp-transition);
    position: relative;
}

/* Premium top edge highlight */
.cp-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.15), rgba(168, 85, 247, 0.1), transparent);
    z-index: 1;
}

.cp-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--cp-shadow-hover);
    border-color: var(--cp-border-hover);
}

.cp-card-header {
    padding: 28px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.01);
}

.cp-card-body {
    padding: 32px;
}

.cp-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.3px;
    background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cp-section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 28px;
    background: linear-gradient(135deg, #ffffff 0%, #22d3ee 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- Stats Grid --- */
.cp-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.cp-stat-card {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.5), rgba(6, 8, 20, 0.7));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(34, 211, 238, 0.05);
    border-radius: var(--cp-radius-lg);
    padding: 28px;
    display: flex;
    align-items: center;
    gap: 24px;
    box-shadow: var(--cp-shadow-soft);
    transition: var(--cp-transition);
    position: relative;
    overflow: hidden;
}

.cp-stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.03), transparent);
    transition: left 0.6s ease;
}

.cp-stat-card:hover::after {
    left: 100%;
}

.cp-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--cp-shadow-hover);
    border-color: rgba(34, 211, 238, 0.12);
}

.cp-stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.cp-stat-card:hover .cp-stat-icon {
    transform: scale(1.08) rotate(3deg);
    filter: brightness(1.15);
}

.bg-blue-soft {
    background: linear-gradient(135deg, rgba(43, 80, 188, 0.15), rgba(37, 99, 235, 0.05));
}

.text-blue {
    color: #60a5fa;
}

.bg-indigo-soft {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(79, 70, 229, 0.05));
}

.text-indigo {
    color: #818cf8;
}

.bg-amber-soft {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.05));
}

.text-amber {
    color: #fbbf24;
}

.bg-emerald-soft {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.05));
}

.text-emerald {
    color: #34d399;
}

.cp-stat-label {
    font-size: 0.9rem;
    color: var(--cp-text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 0 8px 0;
}

.cp-stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #fff, #22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cp-currency {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--cp-text-muted);
    -webkit-text-fill-color: var(--cp-text-muted);
}

/* --- Tables & Lists --- */
.cp-table {
    width: 100%;
    border-collapse: collapse;
}

.cp-table th {
    text-align: left;
    padding: 18px 28px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--cp-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
}

[dir="rtl"] .cp-table th {
    text-align: right;
}

.cp-table td {
    padding: 20px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.cp-table tbody tr {
    transition: background 0.3s ease;
}

.cp-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.cp-list-group {
    display: flex;
    flex-direction: column;
}

.cp-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: var(--cp-transition);
}

.cp-list-item:hover {
    background: rgba(255, 255, 255, 0.02);
    padding-left: 34px;
    /* subtle slide effect */
}

[dir="rtl"] .cp-list-item:hover {
    padding-left: 30px;
    padding-right: 34px;
}

.cp-list-item:last-child {
    border-bottom: none;
}

.cp-list-item-content {
    display: flex;
    align-items: center;
    gap: 18px;
}

.cp-icon-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    background: rgba(30, 41, 59, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- Custom Tab Pane Logic --- */
.cp-tab-pane {
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.cp-tab-pane.active {
    display: block;
}

.cp-tab-pane.show {
    opacity: 1;
}

/* --- Badges --- */
.cp-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cp-badge-success {
    background: var(--cp-emerald-soft);
    color: var(--cp-emerald);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.cp-badge-primary {
    background: var(--cp-blue-soft);
    color: var(--cp-blue);
    border: 1px solid rgba(43, 80, 188, 0.2);
}

.cp-badge-sm {
    padding: 4px 8px;
    font-size: 0.7rem;
}

/* --- Buttons --- */
.cp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--cp-radius-md);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: var(--cp-transition);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.cp-btn-primary {
    background: linear-gradient(135deg, #22d3ee 0%, #2b50bc 50%, #a855f7 100%);
    background-size: 200% 100%;
    animation: cp-btn-shift 4s ease infinite;
    color: white;
    box-shadow: 0 4px 15px rgba(34, 211, 238, 0.2), 0 0 20px rgba(43, 80, 188, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes cp-btn-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.cp-btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(34, 211, 238, 0.3), 0 0 40px rgba(43, 80, 188, 0.15);
    filter: brightness(1.1);
    animation: cp-btn-shift 2s ease infinite;
}

.cp-btn-outline {
    background: transparent;
    border: 1px solid var(--cp-border);
    color: var(--cp-text-main);
}

.cp-btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.cp-btn-ghost {
    background: transparent;
    color: var(--cp-text-muted);
}

.cp-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--cp-text-main);
}

.cp-btn-ghost.text-danger:hover {
    color: var(--cp-red);
    background: var(--cp-red-soft);
}

.cp-btn-danger {
    background: var(--cp-red-soft);
    color: var(--cp-red);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.cp-btn-danger:hover {
    background: var(--cp-red);
    color: white;
}

.cp-btn-link {
    background: none;
    border: none;
    color: var(--cp-blue);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0;
}

.cp-btn-link:hover {
    text-decoration: underline;
}

/* --- Forms --- */
.cp-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cp-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--cp-text-muted);
}

.cp-input-group {
    display: flex;
    gap: 12px;
}

.cp-input {
    flex-grow: 1;
    background: rgba(6, 8, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--cp-radius-md);
    padding: 14px 18px;
    color: var(--cp-text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.cp-input:hover {
    border-color: rgba(43, 80, 188, 0.2);
    background: rgba(6, 8, 20, 0.7);
}

.cp-input:focus {
    outline: none;
    border-color: #22d3ee;
    box-shadow:
        0 0 0 3px rgba(34, 211, 238, 0.08),
        0 0 20px rgba(34, 211, 238, 0.08),
        inset 0 0 15px rgba(34, 211, 238, 0.02);
    background: rgba(6, 8, 20, 0.8);
}

.cp-readonly-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid var(--cp-border);
    border-radius: var(--cp-radius-md);
}

.cp-divider {
    border: none;
    border-top: 1px solid var(--cp-border);
    margin: 24px 0;
}

/* --- Custom Toggle Switch --- */
.cp-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: var(--cp-radius-md);
    border: 1px solid var(--cp-border);
}

.cp-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.cp-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cp-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border-radius: 34px;
}

.cp-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.cp-slider {
    background-color: var(--cp-emerald);
}

input:checked+.cp-slider:before {
    transform: translateX(20px);
}

[dir="rtl"] input:checked+.cp-slider:before {
    transform: translateX(-20px);
}

/* --- Empty States --- */
.cp-empty-state {
    text-align: center;
    padding: 40px 20px;
}

.cp-empty-icon {
    font-size: 3rem;
    color: var(--cp-text-muted);
    opacity: 0.5;
    margin-bottom: 20px;
}

/* --- Grid Utilities --- */
.cp-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 991px) {
    .cp-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cp-sidebar {
        margin-bottom: 10px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .cp-nav {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 8px;
        padding-bottom: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .cp-nav::-webkit-scrollbar {
        display: none;
    }

    .cp-nav-item {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 10px 16px;
        font-size: 0.85rem;
        justify-content: center;
        text-align: center;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid var(--cp-border);
        border-radius: 10px;
    }

    .cp-nav-item i {
        font-size: 1rem;
    }

    [dir="rtl"] .cp-nav-item {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .cp-dashboard-page {
        padding: 30px 0;
    }

    .cp-container {
        padding: 0 12px;
    }

    .cp-stats-grid,
    .cp-grid-2 {
        grid-template-columns: 1fr;
    }

    .cp-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .cp-header-actions {
        width: 100%;
    }

    .cp-title {
        font-size: 1.3rem;
    }

    .cp-avatar {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }

    .cp-card-header {
        padding: 16px 18px;
    }

    .cp-card-body {
        padding: 18px;
    }

    .cp-list-item {
        padding: 16px 14px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .cp-stat-card {
        padding: 18px;
        gap: 16px;
    }

    .cp-stat-icon {
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
        border-radius: 14px;
    }

    .cp-stat-value {
        font-size: 1.6rem;
    }

    .cp-table th,
    .cp-table td {
        padding: 12px 14px;
        font-size: 0.85rem;
    }

    .cp-btn-ghost {
        width: 100%;
        justify-content: center;
        border: 1px solid var(--cp-red-soft);
    }

    .cp-input-group {
        flex-direction: column;
    }

    .cp-readonly-field {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    /* Wallet credit card on mobile */
    .wallet-nexus-container {
        max-width: 100% !important;
    }

    .nexus-card-premium {
        padding: 20px !important;
        border-radius: 16px !important;
    }

    .nexus-balance-value {
        font-size: 2.2rem !important;
    }

    .nexus-card-gz-logo {
        top: 20px !important;
        right: 20px !important;
    }

    .gz-logo-text {
        font-size: 2rem !important;
    }

    .nexus-contactless {
        top: 25px !important;
        right: 65px !important;
        font-size: 1.1rem !important;
    }

    .nexus-value {
        font-size: 0.9rem !important;
    }
}

/* --- Dashboard Enhancements --- */
.cp-stat-card.premium-glass {
    position: relative;
    overflow: hidden;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.cp-stat-icon-wrapper {
    position: relative;
    z-index: 1;
}

.cp-stat-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    filter: blur(20px);
    opacity: 0.3;
    border-radius: 50%;
    z-index: -1;
}

.cp-stat-glow.bg-blue {
    background: #2b50bc;
}

.cp-stat-glow.bg-indigo {
    background: #6366f1;
}

.cp-quick-actions h4 {
    color: var(--cp-text-muted);
}

.cp-actions-row {
    display: flex;
    gap: 15px;
}

.cp-action-node {
    flex: 1;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px 15px;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--cp-text-muted);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
}

.cp-action-node i {
    font-size: 1.4rem;
    color: var(--cp-blue);
}

.cp-action-node span {
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.cp-action-node:hover {
    background: rgba(43, 80, 188, 0.08);
    border-color: rgba(43, 80, 188, 0.3);
    color: #fff;
    transform: translateY(-5px);
}

@media (max-width: 768px) {
    .cp-actions-row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .cp-action-node {
        padding: 15px 10px;
    }

    .cp-action-node i {
        font-size: 1.1rem;
    }

    .cp-action-node span {
        font-size: 0.65rem;
    }
}

/* Mobile Layout Overrides */
@media (max-width: 991px) {
    .cp-sidebar {
        margin-bottom: 15px !important;
        overflow-x: visible !important;
        -webkit-overflow-scrolling: auto !important;
    }
}

@media (max-width: 768px) {

    /* Prevent global x-axis overflow / zoom bugs */
    .cp-dashboard-page {
        padding: 15px 0 !important;
        overflow-x: clip;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }

    .cp-container {
        padding: 0 16px !important;
        box-sizing: border-box;
        max-width: 100%;
        overflow-x: hidden;
    }

    .cp-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }

    .cp-header-actions {
        width: 100%;
    }

    .cp-title {
        font-size: 1.15rem !important;
        word-break: break-word;
    }

    .cp-subtitle {
        font-size: 0.85rem !important;
        word-break: break-all;
    }

    .cp-avatar {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.1rem !important;
    }

    .cp-card {
        border-radius: 14px !important;
        max-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
    }

    .cp-card:hover {
        transform: none !important;
    }

    .cp-card-header {
        padding: 12px 14px !important;
        flex-wrap: wrap;
        gap: 8px;
    }

    .cp-card-body {
        padding: 12px !important;
        max-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
    }

    .cp-card-body.p-0 {
        padding: 0 12px !important;
    }

    .cp-card-title {
        font-size: 1rem !important;
    }

    /* Section Titles */
    .cp-section-title {
        font-size: 1.3rem !important;
        word-break: break-word;
    }

    /* Stats Grid Enhancements for Mobile */
    .cp-stats-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        margin-bottom: 20px !important;
    }

    .cp-stat-card {
        padding: 14px 16px !important;
        gap: 16px !important;
        border-radius: 14px !important;
    }

    .cp-stat-card:hover {
        transform: none !important;
    }

    .cp-stat-icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.1rem !important;
        border-radius: 10px !important;
        flex-shrink: 0;
    }

    .cp-stat-label {
        font-size: 0.75rem !important;
        margin-bottom: 4px !important;
    }

    .cp-stat-value {
        font-size: 1.4rem !important;
    }

    /* Two-column grid → single column on mobile */
    .cp-grid-2 {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    /* Quick Operations Actions Row */
    .cp-actions-row {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
        overflow-x: hidden;
        max-width: 100%;
    }

    /* Quick Actions Container */
    .cp-quick-actions {
        max-width: 100%;
        overflow: hidden;
    }

    .cp-quick-actions h4 {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .cp-action-node {
        padding: 14px 8px !important;
        gap: 8px !important;
        border-radius: 14px !important;
        min-width: 0;
    }

    .cp-action-node:hover {
        transform: none !important;
    }

    .cp-action-node i {
        font-size: 1.1rem !important;
    }

    .cp-action-node span {
        font-size: 0.65rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        display: block;
        text-align: center;
    }

    /* Fix Table Cutoffs */
    .cp-table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 10px;
    }

    .cp-table {
        min-width: 420px;
    }

    .cp-table th,
    .cp-table td {
        padding: 10px 12px !important;
        font-size: 0.8rem !important;
    }

    /* Fix List Item Text Overflows */
    .cp-list-item {
        padding: 12px 14px !important;
        flex-wrap: wrap !important;
        gap: 8px;
    }

    .cp-list-item:hover {
        padding-left: 14px !important;
    }

    [dir="rtl"] .cp-list-item:hover {
        padding-right: 14px !important;
    }

    .cp-list-item-content {
        min-width: 0;
        flex: 1;
        overflow: hidden;
    }

    .cp-list-item-content div {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .cp-list-item-action {
        flex-shrink: 0;
    }

    /* Logout Button Mobile */
    .cp-logout-btn-premium {
        width: 100%;
        display: block !important;
    }

    .logout-btn-inner {
        padding: 10px 16px !important;
        font-size: 0.7rem !important;
        justify-content: center;
    }

    /* Security Pane Alerts */
    .cp-alert {
        padding: 14px !important;
        border-radius: 12px !important;
        font-size: 0.85rem !important;
    }

    .cp-alert-success {
        background: rgba(16, 185, 129, 0.08);
        border: 1px solid rgba(16, 185, 129, 0.2);
        border-radius: 12px;
        padding: 14px;
    }

    .cp-alert-warning {
        background: rgba(245, 158, 11, 0.08);
        border: 1px solid rgba(245, 158, 11, 0.2);
        border-radius: 12px;
        padding: 14px;
    }

    /* Toggle Row Mobile */
    .cp-toggle-row {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px !important;
    }

    /* Readonly Field Mobile */
    .cp-readonly-field {
        flex-direction: column !important;
        gap: 8px !important;
        align-items: flex-start !important;
    }

    .cp-field-data {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px;
        word-break: break-all;
    }

    /* Input Group Mobile */
    .cp-input-group {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .cp-input-group .cp-btn {
        width: 100%;
        justify-content: center;
    }

    /* Empty States */
    .cp-empty-state {
        padding: 30px 20px !important;
        overflow: hidden;
        text-align: center;
        max-width: 100%;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .cp-empty-state h4 {
        font-size: 1rem !important;
        overflow-wrap: break-word;
        word-wrap: break-word;
        word-break: break-word;
        max-width: 100%;
        white-space: normal !important;
    }

    .cp-empty-state p {
        font-size: 0.85rem !important;
        line-height: 1.5;
        overflow-wrap: break-word;
        word-wrap: break-word;
        word-break: break-word;
        max-width: 100%;
        white-space: normal !important;
    }

    .cp-empty-icon {
        font-size: 2.2rem !important;
    }

    /* Ensure tab panes never overflow */
    .cp-tab-pane {
        overflow-x: hidden;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Card body overflow protection */
    .cp-card-body {
        overflow: hidden;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Content container for tab content */
    .cp-content {
        overflow-x: hidden;
        max-width: 100%;
        min-width: 0 !important;
        width: 100% !important;
        box-sizing: border-box;
    }

    /* Force all grid children to respect column width */
    .cp-layout>* {
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
    }

    /* Wallet Card Mobile */
    .wallet-nexus-container {
        max-width: 100% !important;
    }

    .nexus-card-premium {
        padding: 20px !important;
        border-radius: 16px !important;
        aspect-ratio: auto !important;
        min-height: 180px;
    }

    .nexus-balance-value {
        font-size: 2rem !important;
    }

    .nexus-card-gz-logo {
        top: 15px !important;
        right: 15px !important;
    }

    .gz-logo-text {
        font-size: 1.6rem !important;
    }

    .nexus-contactless {
        top: 20px !important;
        right: 50px !important;
        font-size: 1rem !important;
    }

    .nexus-value {
        font-size: 0.8rem !important;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nexus-card-footer {
        flex-wrap: wrap;
        gap: 10px;
    }

    /* Danger Zone / Delete Account Button */
    .cp-btn-danger {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .cp-btn-ghost {
        width: 100%;
        justify-content: center;
        border: 1px solid var(--cp-red-soft);
    }

    /* Badges */
    .cp-badge {
        font-size: 0.7rem !important;
        padding: 4px 10px !important;
    }

    /* Section header text */
    .cp-section-header p {
        font-size: 0.85rem !important;
        line-height: 1.5;
    }

    /* Instant Top-Up Banner in Wallet Pane */
    .cp-tab-pane>div[style*="border-left: 4px"] {
        padding: 18px 14px !important;
        gap: 14px !important;
        border-radius: 12px !important;
    }

    .cp-tab-pane>div[style*="border-left: 4px"] h3 {
        font-size: 1rem !important;
    }

    .cp-tab-pane>div[style*="border-left: 4px"] p {
        font-size: 0.8rem !important;
    }

    .cp-tab-pane>div[style*="border-left: 4px"] a {
        padding: 12px 20px !important;
        font-size: 0.75rem !important;
        width: 100%;
        text-align: center;
    }
}
