/* ===================================================================
   Login / register page
=================================================================== */

.cw-login {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px 50px;
    background:
        radial-gradient(900px 340px at 50% -80px, var(--brand-soft), transparent 70%),
        var(--white);
    min-height: 100vh;
    min-height: 100dvh;
}

.cw-login__card {
    width: 100%;
    max-width: 420px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 18px 44px rgba(33, 28, 27, .08);
    padding: 28px 24px 24px;
    text-align: center;
}

.cw-login__brand { display: inline-flex; flex-direction: column; line-height: 1.2; margin-bottom: 18px; }
.cw-login__brand-title { font-size: 24px; font-weight: 800; color: var(--brand); }
.cw-login__brand-sub { font-size: 11px; color: var(--muted); }

.cw-login__title { font-size: 18px; font-weight: 800; margin: 0 0 6px; }
.cw-login__lead { font-size: 12.5px; color: var(--muted); line-height: 2; margin: 0 0 20px; }

.cw-login__form { text-align: start; }
.cw-login__label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 8px; }

.cw-login__field {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 48px;
    padding: 0 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color .18s ease, background .18s ease;
}
.cw-login__field:focus-within { border-color: var(--brand); background: var(--white); }
.cw-login__field svg { width: 18px; height: 18px; color: var(--muted); flex: 0 0 auto; }
.cw-login__field input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    background: transparent;
    outline: none;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--ink);
}
.cw-login__field input::placeholder { font-weight: 500; letter-spacing: .5px; color: var(--muted); }

.cw-login__field.has-error { border-color: #D6455F; background: #FDF1F3; }

.cw-login__error {
    min-height: 18px;
    margin: 7px 2px 0;
    font-size: 11.5px;
    font-weight: 600;
    color: #C32B49;
}

.cw-login__submit {
    width: 100%;
    height: 48px;
    margin-top: 10px;
    border: 0;
    border-radius: var(--radius-sm);
    background: var(--brand);
    color: #fff;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 800;
    cursor: pointer;
    transition: background .18s ease;
}
.cw-login__submit:hover { background: var(--brand-dark); }

.cw-login__notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: start;
    margin-top: 18px;
    padding: 14px;
    border: 1px dashed var(--brand);
    border-radius: var(--radius-md);
    background: var(--brand-soft);
    animation: cw-notice-in .22s ease;
}
.cw-login__notice svg { width: 20px; height: 20px; color: var(--brand); flex: 0 0 auto; margin-top: 2px; }
.cw-login__notice strong { display: block; font-size: 13px; color: var(--brand-dark); margin-bottom: 4px; }
.cw-login__notice p { margin: 0; font-size: 12px; line-height: 2; color: #6A5B57; }

@keyframes cw-notice-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.cw-login__terms { margin: 18px 0 0; font-size: 11px; line-height: 2; color: var(--muted); }
.cw-login__terms a { color: var(--brand); font-weight: 700; }

.cw-login__back { display: inline-block; margin-top: 14px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.cw-login__back:hover { color: var(--brand); }

.cw-login__back--top {
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    float: right;
}

.cw-login__otp-step::after {
    content: '';
    display: block;
    clear: both;
}

.cw-login__otp-boxes {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.cw-login__otp-input {
    width: 100%;
    height: 54px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    text-align: center;
    font-family: inherit;
    font-size: 20px;
    font-weight: 800;
    outline: none;
    direction: ltr;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.cw-login__otp-input:focus {
    border-color: var(--brand);
    background: var(--white);
    box-shadow: 0 0 0 3px var(--brand-soft);
}

.cw-login__timer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    font-size: 12px;
    color: var(--muted);
}

.cw-login__timer span:first-child {
    min-width: 42px;
    color: var(--brand-dark);
    font-weight: 800;
    direction: ltr;
}

.cw-login__resend {
    display: block;
    width: 100%;
    margin-top: 14px;
    border: 0;
    background: transparent;
    color: var(--brand);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 800;
    cursor: pointer;
}

.cw-login__resend:disabled {
    opacity: .55;
    cursor: default;
}

.cw-login__submit:disabled {
    opacity: .65;
    cursor: wait;
}

.cw-login [hidden] {
    display: none !important;
}
