﻿/* =====================================================
   AUTH SYSTEM CSS - Modern Flip Clock
   ===================================================== */

/* ---- Navbar auth buttons ---- */
.auth-login-btn {
    background: linear-gradient(135deg, var(--clr-accent), var(--clr-accent-2)) !important;
    color: #fff !important;
    border-radius: 2rem !important;
    padding: 0.35rem 1rem !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    border: none !important;
    transition: all 0.2s ease;
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.35);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.auth-login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 18px rgba(99, 102, 241, 0.5);
    color: #fff !important;
}

.auth-profile-btn {
    color: var(--clr-accent) !important;
    background: rgba(99, 102, 241, 0.12) !important;
    border-radius: 2rem !important;
    padding: 0.35rem 0.9rem !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    border: 1px solid rgba(99, 102, 241, 0.3) !important;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.2s ease;
}

.auth-profile-btn:hover {
    background: rgba(99, 102, 241, 0.22) !important;
}

.auth-profile-btn.dropdown-toggle::after {
    margin-left: 4px;
}

/* ---- Dropdown menu ---- */
.auth-dropdown-menu {
    background: rgba(15, 15, 30, 0.97) !important;
    backdrop-filter: blur(20px) saturate(1.6);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(99, 102, 241, 0.25) !important;
    border-radius: 0.9rem !important;
    padding: 0.4rem !important;
    min-width: 190px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .auth-dropdown-menu {
    background: rgba(255, 255, 255, 0.97) !important;
    border-color: rgba(99, 102, 241, 0.2) !important;
}

.auth-dropdown-item {
    color: var(--clr-text-primary) !important;
    background: transparent !important;
    border-radius: 0.6rem !important;
    padding: 0.55rem 0.85rem !important;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.15s ease;
    width: 100%;
    text-align: left;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.auth-dropdown-item:hover {
    background: rgba(99, 102, 241, 0.12) !important;
    color: var(--clr-accent) !important;
}

.auth-dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.12) !important;
    color: var(--clr-danger) !important;
}

.auth-divider {
    border-color: var(--clr-border) !important;
    margin: 0.3rem 0 !important;
}

/* ---- Auth Modal ---- */
.auth-modal-dialog {
    max-width: 420px;
}

.auth-modal-content {
    background: rgba(12, 12, 24, 0.97) !important;
    backdrop-filter: blur(28px) saturate(1.8);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(99, 102, 241, 0.2) !important;
    border-radius: 1.4rem !important;
    color: #fff !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(99, 102, 241, 0.1);
    overflow: hidden;
}

[data-theme="light"] .auth-modal-content {
    background: rgba(245, 246, 255, 0.98) !important;
    border-color: rgba(99, 102, 241, 0.2) !important;
    color: var(--clr-text-primary) !important;
}

/* ---- Tab Switcher ---- */
.auth-tab-switcher {
    display: flex;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2rem;
    padding: 3px;
    gap: 2px;
    flex: 1;
}

[data-theme="light"] .auth-tab-switcher {
    background: rgba(0, 0, 0, 0.07);
}

.auth-tab-btn {
    flex: 1;
    padding: 0.45rem 1rem;
    border-radius: 2rem;
    border: none;
    background: transparent;
    color: var(--clr-text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.auth-tab-btn.active {
    background: var(--clr-accent);
    color: #fff;
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.4);
}

.auth-tab-btn:not(.active):hover {
    color: var(--clr-text-primary);
}

/* ---- Logo / Welcome ---- */
.auth-brand-icon {
    font-size: 2.2rem;
    background: linear-gradient(135deg, var(--clr-accent), var(--clr-accent-3));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
    margin-bottom: 0.3rem;
}

.auth-welcome-text {
    font-size: 0.95rem;
    color: var(--clr-text-muted);
    margin: 0;
    font-weight: 500;
}

.auth-modal-title {
    color: var(--clr-text-primary) !important;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.auth-modal-title .bi {
    color: var(--clr-accent);
}

/* ---- Fields ---- */
.auth-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--clr-text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
    display: block;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 0.85rem;
    color: var(--clr-text-muted);
    font-size: 0.95rem;
    pointer-events: none;
    z-index: 2;
}

.auth-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 0.75rem !important;
    color: var(--clr-text-primary) !important;
    padding: 0.65rem 1rem 0.65rem 2.4rem !important;
    font-size: 0.9rem;
    font-family: var(--font-ui);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

[data-theme="light"] .auth-input {
    background: rgba(99, 102, 241, 0.06) !important;
    border-color: rgba(99, 102, 241, 0.2) !important;
    color: var(--clr-text-primary) !important;
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

[data-theme="light"] .auth-input::placeholder {
    color: rgba(0, 0, 0, 0.3);
}

.auth-input:focus {
    border-color: var(--clr-accent) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18) !important;
    background: rgba(255, 255, 255, 0.09) !important;
}

.auth-input.auth-input-with-eye {
    padding-right: 2.8rem !important;
}

.auth-eye-btn {
    position: absolute;
    right: 0.75rem;
    background: transparent;
    border: none;
    color: var(--clr-text-muted);
    cursor: pointer;
    padding: 0;
    font-size: 1rem;
    transition: color 0.15s ease;
    z-index: 2;
}

.auth-eye-btn:hover {
    color: var(--clr-accent);
}

.auth-input.is-invalid {
    border-color: var(--clr-danger) !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.18) !important;
}

.auth-error {
    font-size: 0.76rem;
    color: var(--clr-danger);
    margin-top: 0.3rem;
    min-height: 1rem;
    font-weight: 500;
}

/* ---- Submit Button ---- */
.auth-submit-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.85rem;
    background: linear-gradient(135deg, var(--clr-accent), var(--clr-accent-2));
    color: #fff;
    border: none;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    box-shadow: 0 4px 18px rgba(99, 102, 241, 0.35);
    font-family: var(--font-ui);
    letter-spacing: 0.02em;
}

.auth-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.5);
}

.auth-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ---- Alert ---- */
.auth-alert {
    padding: 0.75rem 1rem;
    border-radius: 0.7rem;
    font-size: 0.84rem;
    font-weight: 500;
}

.auth-alert.success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.auth-alert.error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

/* ---- Switch link ---- */
.auth-switch-text {
    font-size: 0.82rem;
    color: var(--clr-text-muted);
}

.auth-switch-link {
    color: var(--clr-accent);
    font-weight: 600;
    text-decoration: none;
}

.auth-switch-link:hover {
    color: var(--clr-accent-3);
    text-decoration: underline;
}

/* ---- Profile Modal Body ---- */
.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--clr-accent), var(--clr-accent-2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.profile-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--clr-text-primary);
    margin-bottom: 0.2rem;
    text-align: center;
}

.profile-email {
    font-size: 0.83rem;
    color: var(--clr-text-muted);
    text-align: center;
    margin-bottom: 1.25rem;
}

.profile-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.9rem;
    border-radius: 0.7rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--clr-border);
    margin-bottom: 0.6rem;
    font-size: 0.85rem;
}

[data-theme="light"] .profile-row {
    background: rgba(99, 102, 241, 0.05);
}

.profile-row .bi {
    color: var(--clr-accent);
    font-size: 1rem;
    width: 1.2rem;
    text-align: center;
}

.profile-row-label {
    font-size: 0.72rem;
    color: var(--clr-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    display: block;
    line-height: 1;
}

.profile-row-val {
    color: var(--clr-text-primary);
    font-weight: 600;
    font-size: 0.88rem;
    display: block;
    margin-top: 0.15rem;
}

/* ---- Plan Modal ---- */
.plan-card {
    text-align: center;
    padding: 0.5rem 0;
    position: relative;
}

.plan-badge {
    display: inline-block;
    background: linear-gradient(90deg, var(--clr-accent-warm), #f59e0b);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}

.plan-icon {
    font-size: 2.5rem;
    color: var(--clr-accent);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

.plan-name {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--clr-text-primary);
    margin-bottom: 0.4rem;
}

.plan-desc {
    font-size: 0.83rem;
    color: var(--clr-text-muted);
    margin-bottom: 1.25rem;
}

.plan-pricing {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.plan-old-price {
    font-size: 1.1rem;
    color: var(--clr-text-muted);
    text-decoration: line-through;
}

.plan-sale-price {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--clr-accent), var(--clr-accent-3));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.plan-period {
    font-size: 0.9rem;
    color: var(--clr-text-muted);
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
    text-align: left;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0;
    font-size: 0.87rem;
    color: var(--clr-text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.plan-features li:last-child {
    border-bottom: none;
}

.plan-features li .bi {
    color: var(--clr-success);
    font-size: 0.95rem;
    flex-shrink: 0;
}

.plan-note {
    font-size: 0.75rem;
    color: var(--clr-text-muted);
    margin: 0;
}

/* ── Stripe card element container ───────────────────────────────────── */
.stripe-card-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--clr-border);
    border-radius: 0.6rem;
    padding: 0.75rem 0.9rem;
    transition: border-color 0.2s;
}

[data-theme="light"] .stripe-card-input {
    background: rgba(0, 0, 0, 0.03);
}

.stripe-card-input:focus-within {
    border-color: var(--clr-accent);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Stripe trust badge row */
.stripe-trust-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
    font-size: 0.7rem;
    color: var(--clr-text-muted);
    flex-wrap: wrap;
}

.stripe-trust-row i {
    color: var(--clr-accent);
    margin-right: 0.2rem;
}

.stripe-cancel-btn {
    font-size: 0.78rem;
    color: var(--clr-text-muted) !important;
    text-decoration: none !important;
    padding: 0.2rem 0 !important;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.stripe-cancel-btn:hover {
    opacity: 1;
    color: var(--clr-danger) !important;
}