/*
 * Giao diện trang Đăng nhập / Đăng ký / Quên mật khẩu / Thiết lập mật khẩu mới
 * Chỉ nạp ở route auth.* (xem app/layouts/master.blade.php), body có class "hhnt-auth".
 * Dùng chung bảng màu với khu vực thành viên (app-ui.css).
 */
:root {
    --hhnt-brand: #dd71c2;
    --hhnt-brand-strong: #c4479f;
    --hhnt-brand-ink: #a8337f;
    --hhnt-brand-soft: #fbeaf6;
    --hhnt-bg: #fbf7fa;
    --hhnt-surface: #ffffff;
    --hhnt-line: #eadde5;
    --hhnt-ink: #24161f;
    --hhnt-muted: #7a6873;
    --hhnt-danger: #d93a4a;
}

body.hhnt-auth {
    background-image: none;
    background-color: var(--hhnt-bg);
    color: var(--hhnt-ink);
}
/* Bỏ hàng link "Tìm bạn..." ở trang đăng nhập/đăng ký: đẩy form xuống gần nửa màn hình trên mobile */
body.hhnt-auth .hhnt-guest-links { display: none !important; }
body.hhnt-auth main { padding-top: 62px; min-height: 100vh !important; }
body.hhnt-auth.is-webview main { padding-top: 0; }

.hhnt-auth-wrap {
    position: relative;
    padding: 20px 16px 56px;
    background:
        radial-gradient(600px 260px at 50% -40px, #f7cfe9 0%, rgba(247, 207, 233, 0) 70%),
        var(--hhnt-bg);
}
.hhnt-auth-card {
    max-width: 420px;
    margin: 0 auto;
    background: var(--hhnt-surface);
    border-radius: 20px;
    padding: 24px 22px 22px;
    box-shadow: 0 12px 40px rgba(120, 30, 90, .10);
}
.hhnt-auth-brand { text-align: center; margin-bottom: 18px; }
.hhnt-auth-brand h1 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--hhnt-ink);
}
.hhnt-auth-brand p { margin: 0; color: var(--hhnt-muted); font-size: 14px; }

.hhnt-auth-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: -6px 0 10px -4px;
    padding: 4px 8px 4px 4px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--hhnt-muted) !important;
    text-decoration: none !important;
}
.hhnt-auth-back:hover { background: var(--hhnt-bg); }
.hhnt-auth-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Ô nhập */
.hhnt-field { margin-bottom: 14px; }
.hhnt-field > label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--hhnt-ink);
    margin-bottom: 6px;
}
.hhnt-input {
    position: relative;
    display: flex;
    align-items: center;
}
.hhnt-input > svg {
    position: absolute;
    left: 14px;
    width: 18px; height: 18px;
    fill: none; stroke: var(--hhnt-muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
    pointer-events: none;
}
.hhnt-input .form-control {
    height: 48px;
    border-radius: 12px;
    border: 1.5px solid var(--hhnt-line);
    padding-left: 42px;
    font-size: 16px; /* >= 16px để iOS không tự phóng to khi chạm vào ô */
    color: var(--hhnt-ink);
    background: #fff;
    box-shadow: none;
}
.hhnt-input select.form-control { padding-left: 42px; }
.hhnt-input .form-control:focus {
    border-color: var(--hhnt-brand);
    box-shadow: 0 0 0 3px rgba(221, 113, 194, .2);
}
.hhnt-input .form-control::placeholder { color: #b3a3ad; }
.hhnt-input.has-toggle .form-control { padding-right: 64px; }
.hhnt-toggle {
    position: absolute;
    right: 6px;
    height: 36px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--hhnt-brand-ink);
    font-size: 13px;
    font-weight: 600;
}
.hhnt-toggle:hover { background: var(--hhnt-brand-soft); }
.hhnt-toggle:focus-visible { outline: 2px solid var(--hhnt-brand); outline-offset: 1px; }
.hhnt-hint { display: block; font-size: 12.5px; color: var(--hhnt-muted); margin-top: 5px; }

.hhnt-otp .form-control {
    letter-spacing: .4em;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    padding-left: 14px;
}

/* Chọn giới tính dạng nút */
.hhnt-choice { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.hhnt-choice label { margin: 0; }
.hhnt-choice input { position: absolute; opacity: 0; pointer-events: none; }
.hhnt-choice span {
    display: block;
    text-align: center;
    padding: 11px 0;
    border: 1.5px solid var(--hhnt-line);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--hhnt-ink);
    cursor: pointer;
    background: #fff;
}
.hhnt-choice input:checked + span {
    border-color: var(--hhnt-brand-strong);
    background: var(--hhnt-brand-soft);
    color: var(--hhnt-brand-ink);
}
.hhnt-choice input:focus-visible + span { outline: 2px solid var(--hhnt-brand); outline-offset: 2px; }

.hhnt-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 2px 0 16px;
    font-size: 14px;
}
.hhnt-check { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; margin: 4px 0 16px; line-height: 1.45; }
.hhnt-check input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--hhnt-brand-strong); flex: 0 0 auto; }

.hhnt-auth-wrap a { color: var(--hhnt-brand-ink); }
.hhnt-auth-wrap a:hover { color: var(--hhnt-brand-strong); }

.hhnt-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 99px;
    background: var(--hhnt-brand-strong);
    color: #fff !important;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none !important;
}
.hhnt-btn-primary:hover { background: var(--hhnt-brand-ink); }
.hhnt-btn-primary:focus-visible { outline: 3px solid rgba(221, 113, 194, .45); outline-offset: 2px; }
.hhnt-btn-ghost {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    padding: 8px 16px;
    text-align: center;
    border: 1.5px solid var(--hhnt-line);
    border-radius: 99px;
    background: #fff;
    color: var(--hhnt-ink) !important;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none !important;
}
.hhnt-btn-ghost:hover { border-color: var(--hhnt-brand); }
/* Nút nhắn Zalo: màu xanh thương hiệu Zalo */
.hhnt-btn-zalo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    padding: 8px 16px;
    text-align: center;
    border-radius: 99px;
    background: #0068ff;
    color: #fff !important;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none !important;
    box-shadow: 0 6px 16px rgba(0, 104, 255, .25);
    transition: background-color .15s;
}
.hhnt-btn-zalo:hover { background: #0057d6; }
.hhnt-btn-zalo:focus-visible { outline: 3px solid rgba(0, 104, 255, .35); outline-offset: 2px; }
@media (max-width: 400px) { .hhnt-btn-zalo { font-size: 14px; padding: 8px 10px; letter-spacing: -.01em; } }
@media (max-width: 370px) { .hhnt-btn-zalo { font-size: 13px; padding: 8px 8px; } }

.hhnt-auth-alt {
    text-align: center;
    margin: 18px auto 0;
    font-size: 15px;
    color: var(--hhnt-muted);
}
.hhnt-auth-alt a { font-weight: 700; }

.hhnt-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--hhnt-muted);
    font-size: 13px;
    margin: 18px 0;
}
.hhnt-divider::before, .hhnt-divider::after { content: ""; flex: 1; height: 1px; background: var(--hhnt-line); }

/* Danh sách điều kiện tham gia (bước xác nhận đăng ký) */
.hhnt-rules { list-style: none; padding: 0; margin: 0 0 20px; }
.hhnt-rules li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid var(--hhnt-line);
    font-size: 15px;
    line-height: 1.45;
}
.hhnt-rules li:last-child { border-bottom: 0; }
.hhnt-rules svg {
    flex: 0 0 22px;
    width: 22px; height: 22px;
    padding: 4px;
    border-radius: 50%;
    background: var(--hhnt-brand-soft);
    fill: none; stroke: var(--hhnt-brand-ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
}
.hhnt-rules b { display: block; }
.hhnt-rules small { color: var(--hhnt-muted); font-size: 13.5px; }
.hhnt-actions { display: flex; flex-direction: column; gap: 10px; }

.hhnt-steps {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 14px;
}
.hhnt-steps i { width: 26px; height: 4px; border-radius: 4px; background: var(--hhnt-line); }
.hhnt-steps i.on { background: var(--hhnt-brand-strong); }

.hhnt-note {
    background: var(--hhnt-brand-soft);
    color: var(--hhnt-brand-ink);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.5;
}
.hhnt-recaptcha { margin: 4px 0 14px; display: flex; justify-content: center; }

/* Modal "số chưa đăng ký" / "tài khoản đã tồn tại" */
body.hhnt-auth .modal-content { border: 0; border-radius: 18px; }
body.hhnt-auth .modal .btn-primary {
    background: var(--hhnt-brand-strong);
    border-color: var(--hhnt-brand-strong);
    border-radius: 99px;
    height: 46px;
    font-weight: 700;
}

@media (min-width: 768px) {
    .hhnt-auth-wrap { padding-top: 48px; }
    .hhnt-auth-card { padding: 32px 32px 28px; }
}
@media (max-width: 359.98px) {
    .hhnt-choice { grid-template-columns: repeat(2, 1fr); }
}

/* Nút ẩn/hiện mật khẩu dạng icon (trang đăng nhập) */
.hhnt-input.has-icon-toggle .form-control { padding-right: 50px; }
.hhnt-toggle.is-icon {
    width: 40px;
    height: 40px;
    right: 4px;
    padding: 0;
    display: grid;
    place-items: center;
    color: var(--hhnt-muted);
}
.hhnt-toggle.is-icon:hover { color: var(--hhnt-brand-ink); }
.hhnt-toggle.is-icon svg {
    position: static;
    width: 20px; height: 20px;
    fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* Trang kết quả (VD: Đã huỷ đăng ký) */
.hhnt-done { text-align: center; }
.hhnt-done .hhnt-auth-brand p { line-height: 1.55; max-width: 34ch; margin: 0 auto; }
.hhnt-done-icon {
    width: 64px; height: 64px;
    margin: 4px auto 14px;
    border-radius: 50%;
    background: var(--hhnt-brand-soft);
    display: grid;
    place-items: center;
}
.hhnt-done-icon svg {
    width: 30px; height: 30px;
    fill: none; stroke: var(--hhnt-brand-strong); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.hhnt-done .hhnt-auth-brand { margin-bottom: 22px; }
