/* ── Password Reset — CourtyCLUB Design System ── */

.password-reset-body {
    background: var(--dark);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    margin: 0;
    position: relative;
    overflow: hidden;
    font-family: var(--font);
}

/* Grid texture — same as hero */
.password-reset-body::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}

/* Blue accent glow — same as hero */
.password-reset-body::after {
    content: '';
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0,51,153,0.25) 0%, transparent 68%);
    pointer-events: none;
}

.password-reset-container {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

/* ── Card ── */
.password-reset-card {
    background: #fff;
    border-radius: 20px;
    padding: 2.5rem 2.5rem 2rem;
    box-shadow: 0 24px 64px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.06);
    animation: cardIn 0.5s cubic-bezier(0.16,1,0.3,1) both;
}

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

/* ── Logo Section ── */
.logo-section {
    text-align: center;
    margin-bottom: 2rem;
}

.app-icon-large {
    width: 88px;
    height: 88px;
    background: #fff;
    border: 2px solid var(--border);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    box-shadow: 0 4px 16px rgba(0,51,153,0.12);
    overflow: hidden;
}

.app-icon-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-section h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    margin: 0;
}

/* ── Form Section ── */
.form-section {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    display: none;
}

.form-section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.form-section h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.375rem;
    text-align: center;
}

.form-section > p {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 1.75rem;
    line-height: 1.6;
}

/* ── Form ── */
.reset-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-group label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.01em;
}

.form-group input {
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-family: var(--font);
    font-size: 0.9375rem;
    color: var(--dark);
    background: var(--bg);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.form-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,51,153,0.1);
}

.form-group input.error {
    border-color: var(--danger);
}

/* ── Password Requirements ── */
.password-requirements {
    margin-top: 0.5rem;
    padding: 0.875rem 1rem;
    background: var(--bg-subtle);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.requirement-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    color: var(--text-light);
}

.requirement.met {
    color: #16a34a;
}

.requirement.met .requirement-icon {
    color: #16a34a;
}

/* ── Error Messages ── */
.error-message {
    font-size: 0.8125rem;
    color: var(--danger);
    display: none;
}

.error-message.show { display: block; }

.global-error {
    background: var(--danger-light);
    border: 1px solid rgba(239,68,68,0.2);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
    display: none;
    align-items: flex-start;
    gap: 0.75rem;
}

.global-error.show { display: flex; }

.global-error .error-icon {
    color: var(--danger);
    font-size: 1.125rem;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 1px;
}

.global-error .error-content h4 {
    color: var(--danger);
    margin: 0 0 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.global-error .error-content p {
    color: #b91c1c;
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.5;
}

/* ── Button ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8125rem 1.5rem;
    border-radius: 10px;
    font-family: var(--font);
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,51,153,0.25);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,51,153,0.35);
}

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

.btn-full { width: 100%; }

.btn-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

/* ── Spinner ── */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Success State ── */
.success-message {
    text-align: center;
    padding: 1.5rem 1rem;
}

.success-icon {
    width: 64px;
    height: 64px;
    background: #dcfce7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.75rem;
    color: #16a34a;
}

.success-message h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.success-message p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* ── Help Section ── */
.help-section {
    text-align: center;
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.help-section p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 0.375rem;
}

.help-link {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

.help-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* ── Error Help ── */
.error-help {
    margin-top: 0.75rem;
    padding: 0.875rem;
    background: var(--bg-subtle);
    border-radius: 8px;
    text-align: left;
}

.error-help p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 0.375rem;
    line-height: 1.5;
}

.error-help p:last-child { margin-bottom: 0; }

/* ── Responsive ── */
@media (max-width: 480px) {
    .password-reset-card {
        padding: 2rem 1.5rem 1.75rem;
    }

    .app-icon-large {
        width: 72px;
        height: 72px;
        border-radius: 18px;
    }

    .logo-section h1 { font-size: 1.5rem; }
}
