:root {
    color-scheme: dark;
    --bg: #0c1210;
    --surface: #131d19;
    --field: #0e1713;
    --border: #293e34;
    --accent: #88ddbf;
    --text: #edf5f0;
    --muted: #92a89e;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background:
        radial-gradient(
            ellipse at 50% 0%,
            #19372b 0%,
            var(--bg) 49%
        );
    background-attachment: fixed;
    color: var(--text);
    font-family: Inter, -apple-system, BlinkMacSystemFont,
                 "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }

.recovery-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 25px;
    padding: 40px 20px;
}

.accent { color: var(--accent); }

.recovery-card {
    width: 100%;
    max-width: 444px;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 32px;
    background: var(--surface);
    box-shadow: 0 24px 70px rgba(0,0,0,.15);
}

.eyebrow {
    font-size: 10px;
    letter-spacing: 2.5px;
    font-weight: 750;
    color: var(--accent);
    margin-bottom: 24px;
}

.step-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: #203b31;
    border: 1px solid #345b49;
    color: var(--accent);
    margin-bottom: 24px;
}

.step-icon svg { width: 27px; height: 27px; }

h1 {
    font-size: 28px;
    letter-spacing: -1.2px;
    line-height: 1.2;
    margin: 0 0 12px;
}

.description {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
    margin: 0 0 24px;
}

label {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.field {
    width: 100%;
    height: 52px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid #344b40;
    background: var(--field);
    color: var(--text);
    font-size: 16px;
    outline: none;
}

.field::placeholder { color: #63796d; }

.field:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px #88ddbf1a;
}

.primary-button {
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 10px;
    color: #10271d;
    background: var(--accent);
    font-size: 13px;
    font-weight: 750;
    margin-top: 24px;
    transition: background .15s ease;
}

.primary-button:hover { background: #a7ebd3; }

.primary-button:disabled {
    opacity: .6;
    cursor: wait;
}

.email-address {
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
    margin: -12px 0 26px;
    overflow-wrap: anywhere;
}

.otp-wrap { position: relative; }
.otp-cells { display: none; }

.otp-wrap.enhanced .otp-cells {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
}

.otp-wrap.enhanced .otp-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: text;
}

.otp-cell {
    display: grid;
    place-items: center;
    height: 58px;
    border: 1px solid #344b40;
    border-radius: 10px;
    background: var(--field);
    font-size: 25px;
    font-weight: 650;
}

.otp-wrap:focus-within .otp-cell.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px #88ddbf1a;
}

.otp-cell.filled { border-color: #568b72; }

.resend-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    color: var(--muted);
    font-size: 12px;
}

.resend-button,
.password-toggle {
    padding: 6px;
    border: 0;
    background: transparent;
    color: var(--accent);
    font-size: 12px;
    font-weight: 650;
}

.resend-button:disabled {
    color: var(--muted);
    opacity: .65;
    cursor: default;
}

.password-field {
    position: relative;
    margin-bottom: 18px;
}

.password-field .field { padding-right: 64px; }

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.password-requirements {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.7;
}

.hint {
    color: var(--muted);
    font-size: 12px;
    text-align: center;
    line-height: 1.7;
    margin: 20px 0 24px;
}

.security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
}

.security-note svg {
    width: 17px;
    height: 17px;
    color: var(--accent);
}

.alert {
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.6;
}

.alert-error {
    background: #38201f;
    border: 1px solid #6c3934;
    color: #ffb2aa;
}

.alert-success {
    background: #19392b;
    border: 1px solid #386d52;
    color: var(--accent);
}

.back-link, .secondary-link {
    display: block;
    text-align: center;
    color: var(--accent);
    font-size: 12px;
    font-weight: 650;
}

.secondary-link { margin-bottom: 24px; }

footer { color: #64786e; font-size: 11px; }

@media (max-width: 480px) {
    .recovery-page { padding: 24px 16px; gap: 20px; }
    .recovery-card { padding: 24px; border-radius: 20px; }
    .otp-cell { height: 48px; font-size: 22px; }
    .otp-wrap.enhanced .otp-cells { gap: 5px; }
    h1 { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}

.continue-button {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Original Coinsense brand */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 29px;
    font-weight: 750;
    letter-spacing: -1.4px;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    color: var(--accent);
    background: #172923;
    border-radius: 13px;
}

.brand-mark svg {
    width: 30px;
    height: 30px;
}

.logout-button {
    border: 0;
    background: none;
    color: var(--accent);
    padding: 5px;
    font-size: 12px;
    font-weight: 650;
}
