/* --- PAGE FADE IN --- */
body {
    margin: 0;
    background: #f7f7fb;
    font-family: "Segoe UI", sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    animation: pageFadeIn 0.4s ease;
}

@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* --- AUTH HEADER --- */
.auth-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo {
    width: 60px;
    height: 60px;
    background: #111;
    border-radius: 14px;
    margin: 0 auto 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

.title {
    font-size: 22px;
    font-weight: 700;
    color: #111;
}

.subtitle {
    font-size: 14px;
    color: #6b6b6b;
    margin-top: 6px;
}

/* --- CARD --- */
.card {
    width: 420px;
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
    animation: cardSlideUp 0.45s ease;
}

@keyframes cardSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- FORM ELEMENTS --- */
label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    margin-top: 18px;
    text-align: left;
}

input {
    width: 100%;
    padding: 11px 14px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    font-size: 16px;
    background: #f9fafb;
    box-sizing: border-box;
    color: #111;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

input:focus {
    outline: none;
    border-color: #111;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(17,17,17,0.06);
}

/* --- MESSAGES --- */
.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 10px 14px;
    margin-bottom: 4px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    display: none;
    animation: errorShake 0.35s ease;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-6px); }
    40%       { transform: translateX(6px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}

.success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #16a34a;
    padding: 10px 14px;
    margin-bottom: 4px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    display: none;
    animation: successPop 0.3s ease;
}

@keyframes successPop {
    from { opacity: 0; transform: scale(0.97); }
    to   { opacity: 1; transform: scale(1); }
}

/* --- BUTTON --- */
.reset-btn {
    width: 100%;
    background: #111;
    border: none;
    color: white;
    font-size: 15px;
    padding: 12px;
    border-radius: 9px;
    margin-top: 22px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.reset-btn:hover:not(:disabled) {
    background: #222;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}
.reset-btn:active:not(:disabled) { transform: translateY(0); }
.reset-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* --- LINKS --- */
.links {
    display: flex;
    justify-content: center;
    margin-top: 18px;
    font-size: 13px;
}

.links a {
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}
.links a:hover { color: #111; text-decoration: underline; }

/* --- MOBILE --- */
@media (max-width: 480px) {
    body {
        padding: 16px;
        align-items: flex-start;
        padding-top: 40px;
    }

    .page-wrapper { width: 100%; }

    .logo {
        width: 52px;
        height: 52px;
        font-size: 20px;
        border-radius: 12px;
    }

    .title    { font-size: 18px; }
    .subtitle { font-size: 13px; }

    .auth-container { margin-bottom: 14px; }

    .card {
        width: 100%;
        padding: 24px 18px;
        border-radius: 14px;
    }

    label { font-size: 13px; margin-top: 14px; }

    input {
        padding: 11px 12px;
        font-size: 16px; /* Prevents iOS auto-zoom */
    }

    .reset-btn {
        padding: 13px;
        font-size: 15px;
        margin-top: 18px;
    }

    .links { margin-top: 16px; }
}