/* css/login.css */

/* --- Layout & Background --- */
.login-view-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--background-color);
    background-image:
        radial-gradient(at 0% 0%, hsla(175, 70%, 90%, 1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, hsla(210, 70%, 93%, 1) 0px, transparent 50%);
    padding: var(--spacing-md);
    overflow-y: auto;
}

/* Dark mode background adjustment */
/* Moved to Media Queries section */

.dark .login-view-wrapper {
    background-image:
        radial-gradient(at 0% 0%, hsla(175, 50%, 10%, 1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, hsla(210, 50%, 15%, 1) 0px, transparent 50%);
}

/* --- Card Design --- */
.login-card-premium {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.85);
    /* Fallback */
    background: var(--surface-color);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 20px 25px -5px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(0, 0, 0, 0.03);
    /* Subtle border ring */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Moved to Media Queries section */

.dark .login-card-premium {
    background: rgba(30, 41, 59, 0.7);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Note: slideUpFade replaced by fadeInUp from animations.css */

/* --- Typography --- */
.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 400;
}

/* --- Form Elements --- */
.input-group-premium {
    margin-bottom: 1.25rem;
    position: relative;
}

.input-label-premium {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-left: 2px;
}

.input-field-premium {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid transparent;
    /* Placeholder for border */
    background-color: var(--background-color);
    border-radius: 12px;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
    box-shadow: 0 0 0 1px var(--border-color);
    /* Inner border simulation */
}

.input-field-premium:focus {
    outline: none;
    background-color: var(--surface-color);
    box-shadow: 0 0 0 2px var(--primary-color);
}

.forgot-password-link {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: color 0.2s;
}

.forgot-password-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* --- Buttons --- */
.btn-premium-primary {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(13, 148, 136, 0.25);
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.btn-premium-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 10px rgba(13, 148, 136, 0.3);
}

.btn-premium-primary:active {
    transform: translateY(0);
    opacity: 0.95;
}

.btn-premium-google {
    width: 100%;
    padding: 0.875rem;
    background-color: var(--surface-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.2s;
    margin-bottom: 1.5rem;
}

.btn-premium-google:hover {
    background-color: var(--background-color);
    border-color: #cbd5e1;
}

.divider-premium {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.divider-premium::before,
.divider-premium::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--border-color);
}

.divider-premium span {
    padding: 0 1rem;
}

/* --- Footer --- */
.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.login-footer-link {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}

.login-footer-link:hover {
    color: var(--primary-dark);
}

/* --- Error --- */
.error-banner {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: shake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

/* Note: shake keyframes are in animations.css */

/* Moved to Media Queries section */

.dark .error-banner {
    background-color: rgba(127, 29, 29, 0.2);
    border-color: rgba(127, 29, 29, 0.5);
    color: #fca5a5;
}

/* --- Success Banner --- */
.success-banner {
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: fadeIn 0.3s ease;
}

/* Moved to Media Queries section */

.dark .success-banner {
    background-color: rgba(6, 78, 59, 0.2);
    border-color: rgba(6, 78, 59, 0.5);
    color: #6ee7b7;
}

/* --- Password Reset Modal --- */
.password-reset-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

.password-reset-modal.hidden {
    display: none;
}

/* Note: fadeIn keyframes are in animations.css */

.password-reset-content {
    width: 100%;
    max-width: 400px;
    background-color: var(--surface-color);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

/* Note: scaleIn/scaleUp keyframes are in animations.css */

/* Moved to Media Queries section */

.dark .password-reset-content {
    background-color: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.password-reset-body {
    padding: 1.5rem;
    text-align: center;
}

.password-reset-icon-wrapper {
    margin: 0 auto 1rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 3.5rem;
    width: 3.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.15), rgba(20, 184, 166, 0.1));
}

.password-reset-icon-wrapper svg {
    height: 1.75rem;
    width: 1.75rem;
    color: var(--primary-color);
}

.password-reset-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.password-reset-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.password-reset-input-group {
    margin-bottom: 1rem;
    text-align: left;
}

.password-reset-input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.password-reset-input-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid transparent;
    background-color: var(--background-color);
    border-radius: 10px;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
    box-shadow: 0 0 0 1px var(--border-color);
}

.password-reset-input-group input:focus {
    outline: none;
    background-color: var(--surface-color);
    box-shadow: 0 0 0 2px var(--primary-color);
}

.password-reset-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 0.625rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Moved to Media Queries section */

.dark .password-reset-error {
    background-color: rgba(127, 29, 29, 0.2);
    border-color: rgba(127, 29, 29, 0.5);
    color: #fca5a5;
}

.password-reset-success {
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
    padding: 0.625rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Moved to Media Queries section */

.dark .password-reset-success {
    background-color: rgba(6, 78, 59, 0.2);
    border-color: rgba(6, 78, 59, 0.5);
    color: #6ee7b7;
}

.password-reset-actions {
    background-color: var(--background-color);
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Moved to Media Queries section */

.btn-reset-primary {
    width: 100%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(13, 148, 136, 0.2);
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-reset-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(13, 148, 136, 0.3);
}

.btn-reset-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-reset-cancel {
    width: 100%;
    display: inline-flex;
    justify-content: center;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    background-color: var(--surface-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-reset-cancel:hover {
    background-color: var(--background-color);
}

/* Moved to Media Queries section */

/* --- Responsive Polish --- */
/* Moved to Media Queries section */

/* Moved to Media Queries section */

/* =========================================
   Media Queries
   ========================================= */

/* Mobile Polishing */
@media (max-width: 480px) {
    .login-card-premium {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }

    .login-logo {
        font-size: 1.75rem;
    }
}

/* Tablet / Desktop Utilities */
@media (min-width: 640px) {
    .password-reset-actions {
        flex-direction: row-reverse;
    }

    .btn-reset-primary,
    .btn-reset-cancel {
        width: auto;
    }
}

@media (min-width: 1024px) {
    /* Optional: Side-by-side layout adjustments */
}

/* Dark Mode Overrides */
@media (prefers-color-scheme: dark) {
    .login-view-wrapper {
        background-image:
            radial-gradient(at 0% 0%, hsla(175, 50%, 10%, 1) 0px, transparent 50%),
            radial-gradient(at 100% 100%, hsla(210, 50%, 15%, 1) 0px, transparent 50%);
    }

    .login-card-premium {
        background: rgba(30, 41, 59, 0.7);
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
        border: 1px solid rgba(255, 255, 255, 0.05);
    }

    .error-banner {
        background-color: rgba(127, 29, 29, 0.2);
        border-color: rgba(127, 29, 29, 0.5);
        color: #fca5a5;
    }

    .success-banner {
        background-color: rgba(6, 78, 59, 0.2);
        border-color: rgba(6, 78, 59, 0.5);
        color: #6ee7b7;
    }

    .password-reset-content {
        background-color: #1e293b;
        border: 1px solid rgba(255, 255, 255, 0.05);
    }

    .password-reset-error {
        background-color: rgba(127, 29, 29, 0.2);
        border-color: rgba(127, 29, 29, 0.5);
        color: #fca5a5;
    }

    .password-reset-success {
        background-color: rgba(6, 78, 59, 0.2);
        border-color: rgba(6, 78, 59, 0.5);
        color: #6ee7b7;
    }
}