﻿/* Trang Đăng nhập / Đăng ký / Quên mật khẩu — Nước Hoa Charme */
:root {
    --auth-gold: #c9a24b;
    --auth-gold-light: #f3e3b0;
    --auth-gold-dark: #9c7a2c;
    --auth-ink: #14110d;
    --auth-ink-soft: #2a241b;
    --auth-text: #2b2620;
    --auth-muted: #7a7266;
    --auth-line: #e6e0d4;
    --auth-bg: #faf8f4;
    --auth-danger: #c0392b;
    --auth-success: #2e8b57;
    --auth-radius: 12px;
}

.auth-body {
    margin: 0;
    font-family: 'Be Vietnam Pro', 'Segoe UI', Roboto, Arial, sans-serif;
    color: var(--auth-text);
    background: var(--auth-bg);
    -webkit-font-smoothing: antialiased;
}

.auth-body *,
.auth-body *::before,
.auth-body *::after { box-sizing: border-box; }

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    min-height: 100vh;
}

/* ---------- Cột thương hiệu ---------- */
.auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 56px;
    color: #fff;
    background:
        radial-gradient(900px 500px at 85% -10%, rgba(201, 162, 75, .28), transparent 60%),
        radial-gradient(700px 500px at -10% 110%, rgba(201, 162, 75, .18), transparent 60%),
        linear-gradient(160deg, var(--auth-ink) 0%, var(--auth-ink-soft) 100%);
    overflow: hidden;
}

.auth-brand::after {
    content: '';
    position: absolute;
    right: -140px;
    bottom: -140px;
    width: 420px;
    height: 420px;
    border: 1px solid rgba(201, 162, 75, .35);
    border-radius: 50%;
    box-shadow: 0 0 0 60px rgba(201, 162, 75, .05), 0 0 0 130px rgba(201, 162, 75, .03);
    pointer-events: none;
}

.auth-brand__logo { display: inline-block; width: 120px; }
.auth-brand__logo img { display: block; width: 100%; height: auto; }

.auth-brand__body { position: relative; z-index: 1; max-width: 460px; }

.auth-brand__eyebrow {
    margin: 0 0 14px;
    font-size: 12px;
    letter-spacing: .28em;
    text-transform: uppercase;
    color: var(--auth-gold);
}

.auth-brand__title {
    margin: 0 0 18px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 40px;
    line-height: 1.2;
    font-weight: 600;
    color: #fff;
}

.auth-brand__title em { font-style: italic; color: var(--auth-gold-light); }

.auth-brand__lead { margin: 0 0 28px; font-size: 15px; line-height: 1.7; color: rgba(255, 255, 255, .72); }

.auth-perks { margin: 0; padding: 0; list-style: none; }

.auth-perks__item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
    font-size: 14px;
    line-height: 1.55;
    color: rgba(255, 255, 255, .85);
}

.auth-perks__icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(201, 162, 75, .16);
    border: 1px solid rgba(201, 162, 75, .45);
    color: var(--auth-gold-light);
}

.auth-perks__icon svg { width: 18px; height: 18px; }
.auth-perks__item strong { display: block; color: #fff; font-weight: 600; }

.auth-brand__foot { position: relative; z-index: 1; font-size: 12px; color: rgba(255, 255, 255, .5); }

/* ---------- Cột form ---------- */
.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.auth-card { width: 100%; max-width: 440px; }

.auth-mobile-logo { display: none; margin-bottom: 24px; text-align: center; }
.auth-mobile-logo img { width: 84px; height: auto; background: var(--auth-ink); padding: 10px 12px; border-radius: 12px; }

.auth-card__head { margin-bottom: 28px; }

.auth-card__title {
    margin: 0 0 8px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 32px;
    font-weight: 600;
    color: var(--auth-ink);
}

.auth-card__sub { margin: 0; font-size: 14px; color: var(--auth-muted); line-height: 1.6; }

/* Alert */
.auth-alert {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13.5px;
    line-height: 1.5;
    color: #8a2a1f;
    background: #fdecea;
    border: 1px solid #f5c6c0;
}

.auth-alert ul { margin: 0; padding-left: 16px; }
.auth-alert svg { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 1px; }
.auth-alert.validation-summary-valid { display: none; }

/* Trường nhập */
.auth-field { margin-bottom: 18px; }

.auth-field__label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--auth-text);
}

.auth-field__label a { font-weight: 500; font-size: 13px; color: var(--auth-gold-dark); text-decoration: none; }
.auth-field__label a:hover { text-decoration: underline; }
.auth-field__opt { font-weight: 400; color: var(--auth-muted); }

.auth-field__control { position: relative; }

.auth-field__icon {
    position: absolute;
    top: 50%;
    left: 14px;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    color: #a89f8f;
    pointer-events: none;
    transition: color .2s;
}

.auth-input {
    display: block;
    width: 100%;
    height: 50px;
    padding: 0 44px 0 42px;
    font: inherit;
    font-size: 15px;
    color: var(--auth-text);
    background: #fff;
    border: 1.5px solid var(--auth-line);
    border-radius: var(--auth-radius);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.auth-input::placeholder { color: #b5ad9f; }
.auth-input:hover { border-color: #d3c9b4; }
.auth-input:focus { border-color: var(--auth-gold); box-shadow: 0 0 0 4px rgba(201, 162, 75, .18); }
.auth-field__control:focus-within .auth-field__icon { color: var(--auth-gold-dark); }

.auth-input.input-validation-error { border-color: var(--auth-danger); background: #fffafa; }
.auth-input.input-validation-error:focus { box-shadow: 0 0 0 4px rgba(192, 57, 43, .14); }
.auth-input.is-valid { border-color: var(--auth-success); }

.auth-field__toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    width: 38px;
    height: 38px;
    margin-top: -19px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #8f8777;
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

.auth-field__toggle:hover { color: var(--auth-ink); background: #f3efe6; }
.auth-field__toggle:focus-visible { outline: 2px solid var(--auth-gold); }
.auth-field__toggle svg { width: 20px; height: 20px; }
.auth-field__toggle .is-off { display: none; }
.auth-field__toggle[aria-pressed="true"] .is-on { display: none; }
.auth-field__toggle[aria-pressed="true"] .is-off { display: block; }

.auth-field__msg { margin-top: 6px; font-size: 12.5px; line-height: 1.4; color: var(--auth-danger); }
.auth-field__msg:empty { display: none; }
.auth-field__hint { margin-top: 6px; font-size: 12.5px; color: var(--auth-muted); }
.auth-field__caps { display: none; margin-top: 6px; font-size: 12.5px; color: #b9770e; }
.auth-field__caps.is-show { display: block; }

/* Độ mạnh mật khẩu */
.auth-strength { margin-top: 10px; display: none; }
.auth-strength.is-show { display: block; }
.auth-strength__bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.auth-strength__bar { height: 4px; border-radius: 4px; background: var(--auth-line); transition: background .25s; }
.auth-strength__text { margin-top: 6px; font-size: 12.5px; color: var(--auth-muted); }
.auth-strength[data-level="1"] .auth-strength__bar:nth-child(-n+1) { background: #e74c3c; }
.auth-strength[data-level="2"] .auth-strength__bar:nth-child(-n+2) { background: #e69b22; }
.auth-strength[data-level="3"] .auth-strength__bar:nth-child(-n+3) { background: #c9b12b; }
.auth-strength[data-level="4"] .auth-strength__bar { background: var(--auth-success); }

/* Hàng 2 cột */
.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Checkbox */
.auth-check { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 22px; font-size: 13.5px; line-height: 1.5; color: var(--auth-text); cursor: pointer; }
.auth-check input { position: absolute; opacity: 0; width: 0; height: 0; }

.auth-check__box {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1.5px solid #cfc5b0;
    border-radius: 6px;
    transition: all .15s;
}

.auth-check__box svg { width: 12px; height: 12px; color: #fff; opacity: 0; transform: scale(.6); transition: all .15s; }
.auth-check input:checked + .auth-check__box { background: var(--auth-ink); border-color: var(--auth-ink); }
.auth-check input:checked + .auth-check__box svg { opacity: 1; transform: scale(1); }
.auth-check input:focus-visible + .auth-check__box { box-shadow: 0 0 0 4px rgba(201, 162, 75, .3); }
.auth-check a { color: var(--auth-gold-dark); font-weight: 600; text-decoration: none; }
.auth-check a:hover { text-decoration: underline; }
.auth-check.is-error .auth-check__box { border-color: var(--auth-danger); }

/* Nút */
.auth-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 52px;
    padding: 0 20px;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .02em;
    color: #fff;
    background: linear-gradient(135deg, #1d1810 0%, #3a2f1c 100%);
    border: 0;
    border-radius: var(--auth-radius);
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(20, 17, 13, .22);
    transition: transform .15s, box-shadow .2s, filter .2s;
}

.auth-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(20, 17, 13, .3); filter: brightness(1.08); }
.auth-btn:active { transform: translateY(0); }
.auth-btn:focus-visible { outline: 3px solid rgba(201, 162, 75, .55); outline-offset: 2px; }
.auth-btn svg { width: 18px; height: 18px; color: var(--auth-gold-light); }
.auth-btn[disabled] { cursor: wait; filter: none; opacity: .85; transform: none; }

.auth-btn__spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: auth-spin .7s linear infinite;
}

.auth-btn.is-loading .auth-btn__spinner { display: inline-block; }
.auth-btn.is-loading svg { display: none; }

@keyframes auth-spin { to { transform: rotate(360deg); } }

/* Phân cách + MXH */
.auth-divider { display: flex; align-items: center; gap: 14px; margin: 26px 0 20px; font-size: 12.5px; color: var(--auth-muted); text-transform: uppercase; letter-spacing: .08em; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--auth-line); }

.auth-social { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }

.auth-social__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 48px;
    padding: 0 14px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--auth-text);
    background: #fff;
    border: 1.5px solid var(--auth-line);
    border-radius: var(--auth-radius);
    cursor: pointer;
    transition: border-color .2s, background .2s, box-shadow .2s;
}

.auth-social__btn:hover { border-color: var(--auth-gold); background: #fffdf7; box-shadow: 0 4px 12px rgba(0, 0, 0, .06); }
.auth-social__btn:focus-visible { outline: 3px solid rgba(201, 162, 75, .45); }
.auth-social__btn img { width: 20px; height: 20px; }

.auth-switch { margin: 28px 0 0; text-align: center; font-size: 14px; color: var(--auth-muted); }
.auth-switch a { margin-left: 4px; font-weight: 700; color: var(--auth-ink); text-decoration: none; border-bottom: 2px solid var(--auth-gold); }
.auth-switch a:hover { color: var(--auth-gold-dark); }

.auth-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 22px; font-size: 13px; color: var(--auth-muted); text-decoration: none; }
.auth-back:hover { color: var(--auth-ink); }
.auth-back svg { width: 16px; height: 16px; }

.auth-secure { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 18px; font-size: 12px; color: var(--auth-muted); }
.auth-secure svg { width: 14px; height: 14px; color: var(--auth-success); }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
    .auth-mobile-logo { display: block; }
    .auth-main { align-items: flex-start; padding: 32px 16px 40px; }
}

@media (max-width: 480px) {
    .auth-card__title { font-size: 27px; }
    .auth-row { grid-template-columns: 1fr; gap: 0; }
    .auth-input { font-size: 16px; } /* tránh iOS tự zoom */
}

@media (prefers-reduced-motion: reduce) {
    .auth-btn, .auth-input, .auth-social__btn { transition: none; }
    .auth-btn__spinner { animation-duration: 1.6s; }
}
