* {
    box-sizing: border-box;
}

main {
    min-height: calc(100vh - var(--header-height));
}

.auth-container {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border: 1px solid #e8e8ec;
    border-radius: 20px;
    padding: 36px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.045);
    margin: auto;
}

.auth-header {
    margin-bottom: 30px;
}

.auth-header h1 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.8px;
    margin: 0 0 10px;
}

.auth-header p {
    font-size: 14px;
    color: #71717a;
    line-height: 1.5;
    margin: 0;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

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

.field label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.field input {
    width: 100%;
    height: 48px;
    border: 1px solid #dedee4;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 15px;
    color: #171717;
    outline: none;
    transition: border 0.2s, box-shadow 0.2s;
    background: #fff;
    font-family: system-ui;
}

.field input:focus {
    border-color: #111827;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

.field input:disabled {
    background: #f5f5f6;
    color: #71717a;
    cursor: not-allowed;
}

.primary-btn {
    height: 48px;
    width: 100%;
    border: none;
    border-radius: 10px;
    background: #171717;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
}

.primary-btn:hover {
    opacity: 0.88;
}

.primary-btn:active {
    transform: scale(0.98);
}

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

.switch-text {
    text-align: center;
    font-size: 13px;
    color: #71717a;
    margin-top: 24px;
}

.switch-text button {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-weight: 600;
    color: #171717;
    cursor: pointer;
    margin-left: 4px;
}

.switch-text button:hover {
    text-decoration: underline;
}

.message {
    font-size: 13px;
    line-height: 1.5;
    padding: 12px 14px;
    border-radius: 10px;
    display: none;
}

.message.success {
    display: block;
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #dcfce7;
}

.message.error {
    display: block;
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fee2e2;
}

.otp-container {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.otp-input {
    width: 48px !important;
    height: 56px !important;
    text-align: center;
    font-size: 22px !important;
    font-weight: 600;
    padding: 0 !important;
    border-radius: 10px !important;
    border: 1px solid #b4b4b4;
}

.otp-info {
    text-align: center;
    color: #71717a;
    font-size: 13px;
    line-height: 1.6;
}

.otp-info strong {
    color: #171717;
    font-weight: 600;
}

.resend-row {
    display: flex;
    justify-content: center;
    gap: 5px;
    font-size: 13px;
    color: #71717a;
}

.resend-btn {
    border: none;
    background: none;
    color: #171717;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.resend-btn:disabled {
    color: #a1a1aa;
    cursor: not-allowed;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    background: none;
    border: none;
    padding: 0;
    margin-bottom: 8px;
    color: #71717a;
    font-size: 13px;
    cursor: pointer;
}

.back-btn:hover {
    color: #171717;
}

[hidden] {
    display: none !important;
}

@media (max-width: 480px) {
    .auth-container {
        padding: 28px 22px;
    }

    .otp-container {
        gap: 7px;
    }

    .otp-input {
        width: 42px !important;
        height: 52px !important;
    }
}