/* Subscription — Dashboard Styles */

/* ---------- BDE Dashboard Layout ---------- */
.bde-dashboard-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.bde-sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.02);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    position: fixed;
    height: 100vh;
    z-index: 50;
}

.bde-sidebar .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.bde-main {
    flex-grow: 1;
    margin-left: 280px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 2rem 3rem;
    background: radial-gradient(circle at top right, rgba(195, 14, 110, 0.05) 0%, transparent 40%),
        radial-gradient(circle at bottom left, rgba(162, 155, 254, 0.03) 0%, transparent 40%);
}

/* ---------- Subscription Overview Card ---------- */
.sub-overview-card {
    background: linear-gradient(135deg, rgba(195, 14, 110, 0.08) 0%, rgba(162, 155, 254, 0.05) 100%);
    border: 1px solid rgba(195, 14, 110, 0.15);
    border-radius: 24px;
    padding: 32px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.sub-overview-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(195, 14, 110, 0.1), transparent 70%);
    pointer-events: none;
}

.sub-overview-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    position: relative;
}

.sub-plan-info h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 6px 0;
}

.sub-plan-info .plan-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(195, 14, 110, 0.15);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.sub-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.sub-status.active {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.sub-status.past-due {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}

.sub-status.canceled {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.sub-status .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.sub-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    position: relative;
}

.sub-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sub-detail-item .detail-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}

.sub-detail-item .detail-value {
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
}

/* ---------- Usage Cards ---------- */
.usage-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 2rem;
}

.usage-card {
    background: rgba(20, 20, 25, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.usage-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
}

.usage-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.usage-card-header h4 {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    margin: 0;
}

.usage-card-header .usage-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
}

.usage-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.usage-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(90deg, var(--primary-color), var(--accent-purple));
}

.usage-bar-fill.warning {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.usage-bar-fill.danger {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.usage-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ---------- Action Cards ---------- */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 2rem;
}

.action-card {
    background: rgba(20, 20, 25, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: inherit;
}

.action-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-3px);
}

.action-card .action-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.action-icon.icon-brand {
    background: rgba(195, 14, 110, 0.12);
    color: var(--primary-color);
}

.action-icon.icon-purple {
    background: rgba(162, 155, 254, 0.12);
    color: var(--accent-purple);
}

.action-icon.icon-orange {
    background: rgba(255, 118, 117, 0.12);
    color: var(--accent-orange);
}

.action-icon.icon-red {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.action-card .action-text h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #fff;
}

.action-card .action-text p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.action-card .action-arrow {
    margin-left: auto;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.action-card:hover .action-arrow {
    transform: translateX(4px);
    color: var(--primary-color);
}

/* ---------- Alert Banner ---------- */
.sub-alert {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-radius: 16px;
    margin-bottom: 16px;
}

.sub-alert.alert-warning {
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.sub-alert.alert-error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.sub-alert.alert-info {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.sub-alert .alert-icon {
    flex-shrink: 0;
}

.alert-warning .alert-icon {
    color: #fbbf24;
}

.alert-error .alert-icon {
    color: #ef4444;
}

.alert-info .alert-icon {
    color: #3b82f6;
}

.sub-alert .alert-content {
    flex-grow: 1;
}

.sub-alert .alert-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 2px 0;
    color: #fff;
}

.sub-alert .alert-content p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.sub-alert .alert-action {
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.alert-warning .alert-action {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.alert-error .alert-action {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.alert-info .alert-action {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.sub-alert .alert-action:hover {
    transform: translateY(-1px);
    filter: brightness(1.2);
}

/* ---------- Settings Form ---------- */
.settings-card {
    background: rgba(20, 20, 25, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 28px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.settings-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: #fff;
}

.settings-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.settings-form-grid .auth-form-group {
    margin-bottom: 0;
}

.settings-form-grid .full-width {
    grid-column: span 2;
}

.settings-save-btn {
    padding: 12px 28px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 16px;
}

.settings-save-btn:hover {
    box-shadow: 0 8px 24px rgba(195, 14, 110, 0.3);
    transform: translateY(-2px);
}

/* ---------- Cancel Confirmation Modal ---------- */
.cancel-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cancel-modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.cancel-modal {
    background: #1c1c1e;
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 20px;
    padding: 32px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    transform: translateY(20px) scale(0.96);
    transition: transform 0.3s ease;
}

.cancel-modal-overlay.active .cancel-modal {
    transform: translateY(0) scale(1);
}

.cancel-modal .cancel-icon {
    width: 64px;
    height: 64px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: #ef4444;
}

.cancel-modal h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.cancel-modal p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 24px;
}

.cancel-modal-actions {
    display: flex;
    gap: 12px;
}

.cancel-modal-actions .btn-keep {
    flex: 1;
    padding: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-family);
    transition: all 0.3s ease;
}

.cancel-modal-actions .btn-keep:hover {
    background: rgba(255, 255, 255, 0.1);
}

.cancel-modal-actions .btn-cancel-confirm {
    flex: 1;
    padding: 12px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    color: #ef4444;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-family);
    transition: all 0.3s ease;
}

.cancel-modal-actions .btn-cancel-confirm:hover {
    background: rgba(239, 68, 68, 0.25);
}

/* ---------- Success Toast ---------- */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #1c1c1e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 5000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.toast.visible {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    border-color: rgba(34, 197, 94, 0.3);
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.3);
}

.toast .toast-icon {
    flex-shrink: 0;
}

.toast.success .toast-icon {
    color: #22c55e;
}

.toast.error .toast-icon {
    color: #ef4444;
}

.toast .toast-msg {
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .pricing-page {
        padding-top: 100px;
    }

    .pricing-header h1 {
        font-size: 2rem;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
    }

    .bde-sidebar {
        transform: translateX(-100%);
    }

    .bde-main {
        margin-left: 0;
        padding: 1.5rem;
    }

    .sub-details-grid,
    .usage-grid {
        grid-template-columns: 1fr;
    }

    .actions-grid {
        grid-template-columns: 1fr;
    }

    .settings-form-grid {
        grid-template-columns: 1fr;
    }

    .settings-form-grid .full-width {
        grid-column: span 1;
    }

    .cancel-modal-actions {
        flex-direction: column;
    }

    .auth-modal {
        margin: 20px;
    }
}

/* ========================================================================
   SUBSCRIPTION GATE OVERLAY
   ======================================================================== */
#subscription-gate {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 20, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 12px;
}

/* ---------- Pricing Highlight Flash ---------- */
@keyframes pricingFlash {
    0% { box-shadow: 0 0 0 0 rgba(255, 0, 127, 0.4); }
    50% { box-shadow: 0 0 30px 8px rgba(255, 0, 127, 0.25); }
    100% { box-shadow: 0 0 0 0 rgba(255, 0, 127, 0); }
}

.pricing-highlight {
    animation: pricingFlash 1s ease-in-out 2;
}

.sub-gate-content {
    text-align: center;
    max-width: 400px;
    padding: 48px 32px;
    background: var(--card-bg, #1a1a2e);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: gateAppear 0.4s ease;
}

@keyframes gateAppear {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.sub-gate-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px;
}

.sub-gate-content p {
    font-size: 0.95rem;
    color: var(--text-muted, #9ca3af);
    line-height: 1.6;
    margin: 0 0 28px;
}

.sub-gate-content .auth-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary-color, #FF007F), #ff4da6);
    color: #fff;
    transition: all 0.25s ease;
}

.sub-gate-content .auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 0, 127, 0.3);
}

/* ========================================================================
   SETTINGS COLOR PICKER (in dashboard)
   ======================================================================== */
#settings-color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

#settings-color-picker .color-swatch {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    outline: none;
    padding: 0;
}

#settings-color-picker .color-swatch:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#settings-color-picker .color-swatch.active {
    border-color: #fff;
    transform: scale(1.15);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15), 0 4px 12px rgba(0, 0, 0, 0.3);
}

#settings-color-picker .color-swatch.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* ========================================= */
/* Auth Choice View (Modal Landing)         */
/* ========================================= */

.auth-choice-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 24px;
}

.auth-choice-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-family: var(--font-family, 'Inter', sans-serif);
}

.auth-choice-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(195, 14, 110, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.auth-choice-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, rgba(195, 14, 110, 0.15), rgba(254, 225, 64, 0.08));
    color: #C30E6E;
}

.auth-choice-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-choice-card p {
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

/* ---- Auth Back to Choice Button ---- */
.auth-back-to-choice {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 0;
    margin-bottom: 16px;
    transition: color 0.2s ease;
    font-family: var(--font-family, 'Inter', sans-serif);
}

.auth-back-to-choice:hover {
    color: white;
}

/* ---- Auth Admin Notice ---- */
.auth-admin-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(195, 14, 110, 0.06);
    border: 1px solid rgba(195, 14, 110, 0.12);
    border-radius: 12px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 20px;
    line-height: 1.4;
}

.auth-admin-notice svg {
    flex-shrink: 0;
    color: #C30E6E;
    opacity: 0.7;
}

@media (max-width: 500px) {
    .auth-choice-cards {
        grid-template-columns: 1fr;
    }
}
