/* Customer Dashboard Styles - Modern Theme - v2.0 */

/* Dashboard flex row for customer info cards */
.dashboard-flex-row {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
}

/* Customer info cards with modern styling */
.customer-info-card {
    flex: 1;
    min-width: 0;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 20px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 
                0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Gradient border effect */
.customer-info-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(135deg, transparent, rgba(96, 165, 250, 0.3), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* Shine effect */
.customer-info-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.customer-info-card:hover::before {
    opacity: 1;
    left: 100%;
    top: 100%;
}

.customer-info-card:hover::after {
    opacity: 1;
}

.customer-info-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(96, 165, 250, 0.4);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 
                0 0 0 1px rgba(96, 165, 250, 0.3),
                0 0 40px rgba(96, 165, 250, 0.2);
}


/* Progress card specific styling */
.progress-card {
    align-items: stretch;
}

.progress-card .card-content-full {
    width: 100%;
    z-index: 1;
}

/* Card content styling */
.card-content {
    position: relative;
    z-index: 1;
}

.card-value {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, #60a5fa, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
    line-height: 1.2;
}

.discount-card .card-value {
    background: linear-gradient(135deg, #10b981, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card-label {
    font-size: 14px;
    color: #94a3b8;
    font-weight: 500;
    margin: 0;
}

/* QR Generate Button */
.qr-generate-btn {
    padding: 16px 40px !important;
    font-size: 18px !important;
    border-radius: 15px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Modern card styling */
.modern-card {
    background: rgba(15, 23, 42, 0.9) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.15) !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 
                0 0 0 1px rgba(255, 255, 255, 0.05);
}

.modern-card-header {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.1), rgba(168, 85, 247, 0.1)) !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1) !important;
    color: #f1f5f9 !important;
    padding: 20px 24px;
    border-radius: 20px 20px 0 0 !important;
}

.modern-card-header h5 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.modern-card-header svg {
    stroke: #60a5fa;
}

.modern-card-body {
    color: #f1f5f9 !important;
    padding: 24px;
}

/* Modern table styling */
.modern-table {
    margin-bottom: 0;
    color: #f1f5f9;
}

.modern-table thead {
    background: rgba(30, 41, 59, 0.5);
}

.modern-table thead th {
    border-bottom: 2px solid rgba(148, 163, 184, 0.2);
    color: #94a3b8;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px;
}

.modern-table tbody tr {
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    transition: all 0.3s ease;
}

.modern-table tbody tr:hover {
    background: rgba(30, 41, 59, 0.3);
}

.modern-table tbody td {
    padding: 16px;
    vertical-align: middle;
}

.modern-table .badge {
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
}

/* Mobile card view for history table */
.mobile-history-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.mobile-history-card:hover {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(96, 165, 250, 0.3);
}

.mobile-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.mobile-card-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.mobile-card-label {
    font-size: 12px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.mobile-card-value {
    font-size: 14px;
    color: #f1f5f9;
    font-weight: 500;
}

/* Progress bar modern styling */
.progress-card .progress {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.progress-card .progress-bar {
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 12px;
    transition: width 0.6s ease;
    font-weight: 600;
    font-size: 14px;
}

/* Text colors for modern theme */
.progress-card .text-warning {
    color: #fbbf24 !important;
}

.progress-card .text-success {
    color: #10b981 !important;
}

/* Welcome header styling */
h2.text-center {
    color: #f1f5f9;
    font-weight: 700;
    font-size: 32px;
    margin-bottom: 32px;
    background: linear-gradient(135deg, #f1f5f9, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Responsive design */
@media (max-width: 992px) {
    .dashboard-flex-row {
        flex-direction: column;
        gap: 20px;
    }

    .card-value {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .dashboard-flex-row {
        flex-direction: column;
        gap: 16px;
    }

    .customer-info-card {
        padding: 24px;
    }

    .card-value {
        font-size: 28px;
    }

    .qr-generate-btn {
        width: 100%;
        padding: 14px 32px !important;
        font-size: 16px !important;
    }

    h2.text-center {
        font-size: 24px;
        margin-bottom: 24px;
    }

    /* Mobile history cards spacing */
    .mobile-history-card {
        padding: 14px;
        margin-bottom: 10px;
    }

    .mobile-card-label {
        font-size: 11px;
    }

    .mobile-card-value {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .customer-info-card {
        padding: 20px;
    }

    .card-value {
        font-size: 24px;
    }

    .card-label {
        font-size: 13px;
    }

    .modern-card-header {
        padding: 16px 20px;
    }

    .modern-card-body {
        padding: 20px;
    }

    /* Extra small mobile adjustments for history cards */
    .mobile-history-card {
        padding: 12px;
    }

    .mobile-card-row {
        margin-bottom: 8px;
        padding-bottom: 8px;
    }

    .modern-table thead th,
    .modern-table tbody td {
        padding: 12px 8px;
        font-size: 13px;
    }
}

/* Light Theme Overrides for Customer Dashboard */
[data-theme="light"] .welcome-message,
[data-theme="light"] .welcome-text {
    color: #1a1a1a !important;
}

[data-theme="light"] .customer-info-card {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .modern-card {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .modern-card-header {
    background: rgba(240, 240, 240, 0.9) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: #1a1a1a !important;
}

[data-theme="light"] .modern-card-header h5 {
    color: #1a1a1a !important;
}

[data-theme="light"] .modern-card-body {
    color: #1a1a1a !important;
}

[data-theme="light"] .modern-table {
    color: #1a1a1a !important;
}

[data-theme="light"] .modern-table tbody td {
    color: #1a1a1a !important;
}

[data-theme="light"] .mobile-history-card {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .mobile-history-card:hover {
    background: rgba(240, 240, 240, 0.9) !important;
    border-color: rgba(96, 165, 250, 0.5) !important;
}

[data-theme="light"] .mobile-card-label {
    color: #6b7280 !important;
}

[data-theme="light"] .mobile-card-value {
    color: #1a1a1a !important;
}

[data-theme="light"] h2.text-center {
    color: #1a1a1a !important;
    background: linear-gradient(135deg, #1a1a1a, #4b5563) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

/* QR Modal footer border-radius */
#qrModal .modal-footer {
    border-radius: 0 0 20px 20px !important;
}

/* Light theme QR code modal styles */
[data-theme="light"] #qrModal .modal-content,
[data-theme="light"] .qr-modal-content {
    background: white !important;
}

[data-theme="light"] #qrModal .qr-code-container,
[data-theme="light"] .qr-code-wrapper {
    background: white !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] #qrModal .btn-secondary,
[data-theme="light"] #qrModal button[type="button"] {
    background: rgba(100, 116, 139, 0.9) !important;
    color: white !important;
    border: none !important;
}

[data-theme="light"] #qrModal .btn-secondary:hover,
[data-theme="light"] #qrModal button[type="button"]:hover {
    background: rgba(71, 85, 105, 1) !important;
}

[data-theme="light"] #qrModal .badge-success,
[data-theme="light"] .qr-valid-badge {
    background: #10b981 !important;
    color: white !important;
}

[data-theme="light"] #qrModal .progress {
    background: rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] #qrModal .progress-bar {
    background: #10b981 !important;
}

[data-theme="light"] #qrModal .modal-footer,
[data-theme="light"] .modal-footer {
    background: white !important;
    border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
}

/* QR Modal body border-radius */
#qrModal .modal-body.text-center.p-4,
[data-theme="light"] #qrModal .modal-body.text-center.p-4,
.modal-dialog .modal-content .modal-body.text-center.p-4 {
    border-radius: 15px !important;
}
