/* ==================== DASHBOARD ==================== */
.dashboard-content {
    padding: 0;
}

.dash-hero {
    background: var(--bg-tertiary);
    padding: 1.5rem 1.5rem 2rem;
}

.dash-hero-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.dash-greeting {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
}

.dash-greeting strong {
    color: #1a1a2e;
    font-weight: 600;
}

.dash-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.06);
    border: none;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dash-icon-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1a1a2e;
}

.dash-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dash-install-btn {
    display: none;
    opacity: 1;
    color: #64748b;
}

/* Logout Confirmation Modal */
.dash-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.dash-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.dash-modal {
    background: #ffffff;
    border-radius: 24px;
    padding: 2rem 1.5rem;
    width: 100%;
    max-width: 320px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.dash-modal-overlay.show .dash-modal {
    transform: scale(1) translateY(0);
}

.dash-modal-icon {
    width: 64px;
    height: 64px;
    background: rgba(26, 26, 46, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    color: #1a1a2e;
}

.dash-modal-icon i {
    width: 28px;
    height: 28px;
}

.dash-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 0.5rem;
}

.dash-modal-text {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0 0 1.5rem;
    line-height: 1.5;
}

.dash-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dash-modal-btn-primary {
    width: 100%;
    padding: 14px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    background: #1a1a2e;
    color: #ffffff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.dash-modal-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 26, 46, 0.3);
}

.dash-modal-btn-secondary {
    width: 100%;
    padding: 14px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    background: transparent;
    color: #64748b;
    border: 1.5px solid #e2e8f0;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dash-modal-btn-secondary:hover {
    background: #f8fafc;
    color: #1a1a2e;
    border-color: #cbd5e1;
}

/* Balance Section */
.dash-balance-section {
    text-align: center;
    margin-bottom: 1.5rem;
}

.dash-balance-label {
    color: #64748b;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 0.5rem 0;
}

.dash-balance {
    color: #1a1a2e;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.02em;
}

/* Card Carousel */
.dash-card-carousel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.dash-card-nav {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.06);
    border: none;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.dash-card-nav:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1a1a2e;
}

.dash-card-nav:active {
    transform: scale(0.95);
}

.dash-card-nav i {
    width: 20px;
    height: 20px;
}

.dash-card-container {
    display: flex;
    justify-content: center;
}

.dash-card {
    width: 280px;
    height: 157px;
    border-radius: 16px;
    background-color: transparent;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease;
    border: none;
    outline: none;
}

.dash-card:hover {
    transform: translateY(-4px);
}

.dash-card-info {
    position: absolute;
    bottom: 0.75rem;
    left: 1rem;
    right: auto;
    max-width: 60%;
}

.dash-card-number {
    color: rgba(255,255,255,0.9);
    font-size: 0.7rem;
    font-family: monospace;
    letter-spacing: 1.5px;
    margin-bottom: 0.25rem;
}

.dash-card-holder {
    color: rgba(255,255,255,0.7);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Card Name */
.dash-card-name {
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
    margin: 0.75rem 0 0;
    font-weight: 500;
}

/* Card Navigation Footer */
.dash-card-nav-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.dash-card-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.dash-card-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
}

.dash-card-dot.active {
    background: #1a1a2e;
}

.dash-view-all-cards {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 20px;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dash-view-all-cards:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1a1a2e;
    border-color: rgba(0, 0, 0, 0.25);
}

.dash-view-all-cards i {
    width: 14px;
    height: 14px;
}

/* Status Section */
.dash-status-section {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1rem 0;
    flex-wrap: wrap;
}

.dash-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.875rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.dash-status-badge.on {
    background: rgba(52, 211, 153, 0.1);
    color: var(--color-success);
}

.dash-status-badge.off {
    background: rgba(248, 113, 113, 0.1);
    color: var(--color-error);
}

.dash-status-badge.disabled {
    background: rgba(100, 116, 139, 0.1);
    color: #94a3b8;
}

.dash-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* Dashboard Sections */
.dash-section {
    padding: 0 1rem;
    margin-bottom: 1.5rem;
}

.dash-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.875rem;
}

.dash-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* Actions Grid */
.dash-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.dash-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-accent);
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.dash-action-card:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
}

.dash-action-card.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.dash-action-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

.dash-action-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
}

/* Controls List */
.dash-controls-list {
    background: var(--bg-secondary);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-accent);
}

.dash-control-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--bg-tertiary);
}

.dash-control-item:last-child {
    border-bottom: none;
}

.dash-control-item.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.dash-control-info {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.dash-control-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

.dash-control-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.dash-control-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

.dash-control-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Toggle Switch */
.dash-toggle {
    position: relative;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.dash-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.dash-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #dc2626;
    transition: 0.3s ease;
    border-radius: 28px;
}

.dash-toggle-slider::before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.dash-toggle input:checked + .dash-toggle-slider {
    background: var(--color-success);
}

.dash-toggle input:checked + .dash-toggle-slider::before {
    transform: translateX(24px);
}

.dash-toggle input:disabled + .dash-toggle-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

.dash-control-item.processing {
    pointer-events: none;
}

.dash-control-item.processing .dash-control-desc {
    color: var(--color-info);
}


/* PIN Exceeded Alert */
.pin-exceeded-alert {
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 16px;
    padding: 16px;
    margin: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.pin-exceeded-alert .alert-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.pin-exceeded-alert .alert-content {
    flex: 1;
}

.pin-exceeded-alert .alert-title {
    font-size: 16px;
    font-weight: 600;
    color: #DC2626;
    margin: 0 0 6px 0;
}

.pin-exceeded-alert .alert-message {
    font-size: 14px;
    color: #991B1B;
    margin: 0;
    line-height: 1.5;
}

/* Toast Notifications */
.dash-toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 2rem);
    max-width: 400px;
    background: var(--bg-secondary);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    border: 1px solid var(--border-accent);
}

.dash-toast.show {
    bottom: 2rem;
    opacity: 1;
}

.dash-toast.error {
    border-color: rgba(220, 38, 38, 0.3);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(220, 38, 38, 0.05) 100%);
}

.dash-toast.success {
    border-color: rgba(16, 185, 129, 0.3);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(16, 185, 129, 0.05) 100%);
}

.dash-toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dash-toast.error .dash-toast-icon {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.dash-toast.success .dash-toast-icon {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.dash-toast-icon i {
    width: 22px;
    height: 22px;
}

.dash-toast-content {
    flex: 1;
    min-width: 0;
}

.dash-toast-message {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
}

.dash-toast-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}

.dash-toast-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.dash-toast-close i {
    width: 18px;
    height: 18px;
}

/* Responsive */
@media (max-width: 380px) {
    .dash-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .dash-balance {
        font-size: 2rem;
    }
    .dash-card {
        width: 240px;
        height: 135px;
    }
}
