/* ==========================================================================
   Apple Premium Partner - Password Recovery & Reset Stylesheet
   Consistent with Login Page Design System
   ========================================================================== */

:root {
    --bg-page: #ffffff;
    --bg-card: #ffffff;
    --bg-card-inner: #fbfbfd;
    --bg-input: #ffffff;
    
    --border-light: #e5e5ea;
    --border-medium: #d2d2d7;
    --border-dark: #000000;
    
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-tertiary: #86868b;
    --text-white: #ffffff;
    
    --shadow-card: 0 16px 48px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.03);
    --shadow-button: 0 4px 14px rgba(0, 0, 0, 0.12);
    
    --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --radius-pill: 999px;
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    min-height: 100%;
    height: 100%;
    width: 100%;
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: var(--font-family);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

::selection {
    background: #000000;
    color: #ffffff;
}

/* ── Subtle Apple Clean Background Grid ── */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image: 
        linear-gradient(to right, rgba(0, 0, 0, 0.035) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.035) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(circle at 50% 50%, black 35%, transparent 85%);
    -webkit-mask-image: radial-gradient(circle at 50% 50%, black 35%, transparent 85%);
    pointer-events: none;
    z-index: 0;
}

/* ── Page Layout ── */
.page-root {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.reset-shell {
    width: 100%;
    max-width: 1100px;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 28px;
    align-items: stretch;
}

/* ── Left: Apple Brand Authority & Recovery Guide ── */
.brand-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 48px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.brand-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.identity-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.apple-mark-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #000000;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.apple-mark-box svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    display: block;
}

.identity-titles {
    display: flex;
    flex-direction: column;
}

.identity-titles h1 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: #000000;
    line-height: 1.25;
}

.identity-titles span {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    background: #ffffff;
    border: 1px solid var(--border-light);
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-secondary);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34c759;
    box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.2);
}

.partner-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.badge-premium {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    background: #000000;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: -0.01em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.badge-premium svg {
    width: 14px;
    height: 14px;
    fill: #ffffff;
    display: inline-block;
    vertical-align: middle;
    margin-top: -2px;
    flex-shrink: 0;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 13px;
    border-radius: var(--radius-pill);
    background: #f5f5f7;
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.badge-pill svg {
    width: 13px;
    height: 13px;
    fill: #000000;
    display: inline-block;
    vertical-align: middle;
    margin-top: -2px;
    flex-shrink: 0;
}

.brand-content {
    margin: 40px 0;
}

.hero-heading {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: #000000;
    margin-bottom: 14px;
}

.hero-desc {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 440px;
    margin-bottom: 28px;
}

/* Step Progression Cards */
.steps-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.step-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: var(--bg-card-inner);
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.step-card.active {
    background: #ffffff;
    border-color: #000000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.step-badge {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #e5e5ea;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.step-card.active .step-badge {
    background: #000000;
    color: #ffffff;
}

.step-card.done .step-badge {
    background: #34c759;
    color: #ffffff;
}

.step-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.step-title {
    font-size: 13px;
    font-weight: 700;
    color: #000000;
}

.step-desc {
    font-size: 11.5px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.brand-footer {
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    color: var(--text-tertiary);
}

/* ── Right: Apple Form Panel ── */
.recovery-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 48px 42px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 24px;
    transition: color 0.15s ease, transform 0.15s ease;
    width: fit-content;
}

.back-link:hover {
    color: #000000;
    transform: translateX(-3px);
}

.recovery-header {
    margin-bottom: 28px;
}

.recovery-header-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.recovery-header-badge svg {
    width: 14px;
    height: 14px;
    fill: #000000;
    display: inline-block;
    vertical-align: middle;
    margin-top: -2px;
    flex-shrink: 0;
}

.recovery-title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: #000000;
    margin-bottom: 6px;
}

.recovery-subtitle {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Notice & Error Banners */
.banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 22px;
    font-size: 12.5px;
    line-height: 1.5;
}

.banner svg {
    flex-shrink: 0;
    margin-top: 1px;
}

.banner.error {
    background: #fff2f2;
    border: 1px solid #ffccd0;
    color: #b00020;
}

.banner.notice {
    background: #f0f7ff;
    border: 1px solid #d0e4ff;
    color: #0055b3;
}

.banner.success {
    background: #f2faf5;
    border: 1px solid #c7ebd4;
    color: #1a7f37;
}

/* Form */
.recovery-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-label {
    font-size: 13px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: 0.01em;
}

.input-box {
    position: relative;
    display: flex;
    align-items: center;
    border-radius: var(--radius-md);
    background: var(--bg-input);
    border: 1px solid var(--border-medium);
    padding: 0 14px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.input-box:hover {
    border-color: #86868b;
}

.input-box.is-focused,
.input-box:focus-within {
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.input-icon {
    color: var(--text-tertiary);
    margin-right: 12px;
    flex-shrink: 0;
    transition: color 0.18s ease;
}

.input-box:focus-within .input-icon {
    color: #000000;
}

.input-box input {
    width: 100%;
    height: 48px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 14.5px;
    color: #000000;
    outline: none;
}

.input-box input::placeholder {
    color: #86868b;
    font-size: 14px;
}

.otp-input-field {
    letter-spacing: 12px !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    font-family: "DM Mono", ui-monospace, monospace !important;
}

.toggle-btn {
    background: transparent;
    border: none;
    padding: 6px;
    margin-right: -4px;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    transition: color 0.15s ease, background 0.15s ease;
}

.toggle-btn:hover {
    color: #000000;
    background: #f5f5f7;
}

.hint-text {
    font-size: 11.5px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-top: 4px;
}

/* Pure Apple Action Button */
.action-btn {
    width: 100%;
    height: 50px;
    margin-top: 8px;
    border: none;
    border-radius: var(--radius-md);
    background: #000000;
    color: #ffffff;
    font-family: var(--font-family);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    box-shadow: var(--shadow-button);
    transition: background 0.18s ease, transform 0.12s ease;
}

.action-btn:hover {
    background: #1d1d1f;
    transform: translateY(-1px);
}

.action-btn:active {
    transform: scale(0.985);
    background: #333336;
}

.action-btn:disabled {
    opacity: 0.65;
    cursor: wait;
    transform: none;
}

.btn-arrow {
    transition: transform 0.18s ease;
}

.action-btn:hover .btn-arrow {
    transform: translateX(3px);
}

.resend-box {
    margin-top: 20px;
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
}

.resend-box a {
    color: #000000;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.resend-box small {
    display: block;
    margin-top: 4px;
    color: var(--text-tertiary);
    font-size: 11px;
}

/* Help & Security Box */
.security-box {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.security-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-secondary);
}

.security-item svg {
    color: #000000;
    flex-shrink: 0;
}

.security-footnote {
    font-size: 11.5px;
    color: var(--text-tertiary);
    line-height: 1.5;
    margin-top: 4px;
}

/* ── Responsive Adaptations ── */
@media (max-width: 960px) {
    .reset-shell {
        grid-template-columns: 1fr;
        max-width: 580px;
        gap: 24px;
    }

    .brand-panel {
        padding: 36px 28px;
    }

    .brand-content {
        margin: 28px 0;
    }

    .hero-heading {
        font-size: 28px;
    }

    .recovery-panel {
        padding: 38px 28px;
    }
}

@media (max-width: 480px) {
    .page-root {
        padding: 16px 12px;
    }

    .brand-panel {
        padding: 24px 20px;
        border-radius: var(--radius-md);
    }

    .hero-heading {
        font-size: 24px;
    }

    .recovery-panel {
        padding: 28px 20px;
        border-radius: var(--radius-md);
    }
}
