/* ============================================================
   MY HAIR NATURALS — Auth Pages Design System v2
   Shared by register.php, user-login.php, forgot-password.php
   ============================================================ */

.authpage-body {
    margin: 0; padding: 0;
    font-family: var(--font-sans);
    background:
        radial-gradient(1100px 600px at 12% -10%, rgba(197,160,89,0.10), transparent 60%),
        radial-gradient(900px 500px at 105% 15%, rgba(26,46,26,0.07), transparent 55%),
        linear-gradient(160deg, #fbf8f1 0%, #f6f0e2 45%, #f1e9d7 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    color: var(--text);
}

/* ---- decorative leaf sprigs (inline SVG, positioned) ---- */
.leaf-deco { position: fixed; pointer-events: none; opacity: 0.55; z-index: 0; }
.leaf-deco svg { display: block; }
.leaf-tl { top: -30px; left: -40px; width: 260px; transform: rotate(-8deg); }
.leaf-br { bottom: -40px; right: -30px; width: 300px; transform: rotate(178deg); }
@media (max-width: 780px) { .leaf-deco { opacity: 0.35; width: 160px !important; } }

/* ---- outer scaffold ---- */
.authpage-shell {
    position: relative; z-index: 1;
    min-height: 100vh;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 36px 18px 44px;
}

.authpage-brand { text-align: center; margin-bottom: 22px; }
.authpage-brand img { width: 64px; height: 64px; object-fit: contain; margin-bottom: 8px; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.08)); }
.authpage-brand .word { font-family: var(--font-serif); font-size: 1.55rem; letter-spacing: 3px; color: var(--primary); font-weight: 600; line-height: 1; margin: 0; }
.authpage-brand .word span { color: var(--accent); }
.authpage-brand .tag { font-size: 10px; letter-spacing: 2.5px; color: var(--muted); text-transform: uppercase; margin-top: 6px; font-weight: 600; }

.authpage-grid {
    width: 100%; max-width: 1180px;
    display: flex;
    align-items: flex-start;
    gap: 28px;
}
.authpage-features { width: 220px; flex: 0 0 220px; margin-top: 34px; }
.authpage-card { width: 500px; flex: 0 1 500px; }
.authpage-showcase { flex: 1 1 auto; min-width: 0; margin-top: 34px; }
@media (max-width: 1080px) { .authpage-features, .authpage-showcase { display: none; } .authpage-card { flex: 1 1 auto; width: 100%; max-width: 520px; margin: 0 auto; } }

/* ---- left feature rail ---- */
.authpage-features { display: flex; flex-direction: column; gap: 26px; padding-top: 6px; }
.af-item { display: flex; align-items: center; gap: 12px; }
.af-icon { width: 40px; height: 40px; border-radius: 50%; background: rgba(197,160,89,0.14); display: flex; align-items: center; justify-content: center; color: var(--accent); flex-shrink: 0; }
.af-icon svg { width: 18px; height: 18px; }
.af-label { font-family: var(--font-serif); font-size: 13.5px; color: var(--primary); line-height: 1.3; font-weight: 600; }

.authpage-rail-foot { margin-top: 40px; padding-top: 18px; border-top: 1px solid rgba(26,46,26,0.15); }
.authpage-rail-foot .l1 { font-size: 11px; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; font-weight: 700; margin-bottom: 2px; }
.authpage-rail-foot .l2 { font-family: var(--font-serif); font-style: italic; font-size: 19px; color: var(--primary); }

/* ---- center glass card ---- */
.authpage-card {
    width: 100%;
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
    border: 1px solid rgba(255,255,255,0.85);
    border-radius: 26px;
    box-shadow: 0 20px 50px rgba(26,46,26,0.10), 0 2px 10px rgba(197,160,89,0.10);
    padding: 30px 28px;
    box-sizing: border-box;
}
@media (max-width: 480px) { .authpage-card { padding: 24px 18px; border-radius: 20px; } }

.ap-title { font-family: var(--font-serif); font-size: 1.8rem; color: var(--primary); margin: 0 0 4px; font-weight: 600; text-align: center; }
.ap-title .accent { color: var(--accent); }
.ap-subtitle { color: var(--muted); font-size: 12.5px; text-align: center; letter-spacing: 0.2px; margin: 0 0 22px; line-height: 1.5; }

.ap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ap-group { margin-bottom: 12px; }
.ap-group.full { grid-column: 1 / -1; }
.ap-label { display: block; font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: 1.2px; margin-bottom: 6px; text-transform: uppercase; }

.ap-field { position: relative; }
.ap-field .ic { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #a99a7d; display: flex; pointer-events: none; }
.ap-field .ic svg { width: 16px; height: 16px; }
.ap-input {
    width: 100%; padding: 12px 14px 12px 40px;
    border: 1.5px solid rgba(197,160,89,0.28);
    border-radius: 999px;
    font-family: var(--font-sans); font-size: 13px;
    outline: none; transition: 0.25s;
    background: rgba(255,255,255,0.75);
    color: var(--primary);
    box-sizing: border-box;
}
textarea.ap-input { border-radius: 20px; resize: vertical; min-height: 60px; padding-top: 11px; }
.ap-input::placeholder { color: #a99a86; }
.ap-input:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px rgba(197,160,89,0.12); }
.ap-pw-toggle { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: #9a9a9a; padding: 0; display: flex; }
.ap-pw-toggle:hover { color: var(--accent); }
.ap-field.has-toggle .ap-input { padding-right: 40px; }

#pincode-status { font-size: 10.5px; margin-top: 5px; font-weight: 700; padding-left: 14px; }

.ap-btn {
    width: 100%; padding: 13px; border: none; border-radius: 999px;
    background: linear-gradient(135deg, #cfa856, var(--accent) 55%, #b8934a);
    color: #fff; font-weight: 700; letter-spacing: 1.4px; font-size: 12px;
    cursor: pointer; transition: 0.25s; display: flex; align-items: center; justify-content: center; gap: 8px;
    box-shadow: 0 8px 20px rgba(197,160,89,0.28);
}
.ap-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(197,160,89,0.38); }
.ap-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.ap-btn.dark { background: var(--primary); box-shadow: 0 8px 20px rgba(26,46,26,0.22); }
.ap-btn.dark:hover { background: #0e1a0e; box-shadow: 0 12px 26px rgba(26,46,26,0.3); }
.ap-btn.outline { background: #fdfcf8; color: var(--primary); border: 1.5px solid rgba(26,46,26,0.18); box-shadow: none; }
.ap-btn.outline:hover { background: #f6f0e2; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.06); }

.ap-divider { display: flex; align-items: center; text-align: center; margin: 18px 0; color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }
.ap-divider::before, .ap-divider::after { content: ''; flex: 1; border-bottom: 1px solid rgba(26,46,26,0.14); }
.ap-divider::before { margin-right: .8em; } .ap-divider::after { margin-left: .8em; }

.ap-link { color: var(--accent); font-weight: 700; text-decoration: none; font-size: 12px; }
.ap-link:hover { color: var(--primary); text-decoration: underline; }
.ap-foot-link { text-align: center; margin-top: 22px; }
.ap-foot-link a { color: var(--muted); font-size: 12px; text-decoration: none; }
.ap-foot-link a:hover { color: var(--accent); }

.ap-terms { margin-top: 16px; padding: 14px 16px; background: rgba(197,160,89,0.08); border: 1px solid rgba(197,160,89,0.25); border-radius: 14px; }
.ap-terms label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.ap-terms input { margin-top: 3px; accent-color: var(--accent); width: 15px; height: 15px; flex-shrink: 0; }
.ap-terms span { font-size: 11px; color: var(--muted); line-height: 1.6; }
.ap-terms a { color: var(--accent); text-decoration: underline; font-weight: 700; }

.ap-otp-box { margin-top: 16px; padding: 18px 12px; background: rgba(255,255,255,0.55); border-radius: 16px; border: 1px solid rgba(197,160,89,0.22); text-align: center; }
.ap-otp-label { font-size: 10.5px; font-weight: 800; letter-spacing: 1.2px; color: var(--primary); text-transform: uppercase; margin-bottom: 16px; display: block; }
.ap-otp-digits { display: flex; gap: 12px; justify-content: center; margin-bottom: 18px; }
.ap-otp-digit { width: 42px; height: 46px; text-align: center; font-size: 19px; font-weight: 700; color: var(--primary); background: #fff; border: 2px solid rgba(26,46,26,0.14); border-radius: 12px; outline: none; transition: 0.25s; font-family: var(--font-sans); }
.ap-otp-digit:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(197,160,89,0.14); }
.ap-otp-single { width: 100%; max-width: 210px; padding: 13px; font-size: 24px; letter-spacing: 10px; text-align: center; font-weight: 700; color: var(--primary); background: #fff; border: 2px solid rgba(26,46,26,0.14); border-radius: 12px; outline: none; margin-bottom: 16px; box-sizing: border-box; }
.ap-otp-single:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(197,160,89,0.14); }
.ap-otp-foot { display: flex; justify-content: space-between; align-items: center; max-width: 250px; margin: 0 auto; }
.ap-otp-foot button { background: none; border: none; color: var(--accent); font-size: 10.5px; font-weight: 800; letter-spacing: 0.5px; cursor: pointer; padding: 0; text-transform: uppercase; }
.ap-otp-foot span { font-size: 10.5px; color: var(--muted); font-weight: 700; }

.ap-alert { padding: 11px 15px; border-radius: 12px; font-size: 12px; margin-bottom: 16px; text-align: center; font-weight: 600; }
.ap-alert.error { background: rgba(200,60,60,0.08); color: #b23a3a; border: 1px solid rgba(200,60,60,0.2); }

.ap-recaptcha { display: flex; justify-content: center; margin-top: 14px; transform: scale(0.94); transform-origin: center; }
.ap-social { display: flex; justify-content: center; margin-top: 20px; }
.ap-social a { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid rgba(26,46,26,0.15); border-radius: 999px; padding: 9px 18px; text-decoration: none; color: var(--primary); font-size: 11px; font-weight: 700; letter-spacing: 1px; background: #fff; transition: 0.25s; }
.ap-social a:hover { border-color: #e1306c; color: #e1306c; }

@media (max-width: 380px) { .ap-grid { grid-template-columns: 1fr; } }

/* ---- right showcase panel ---- */
.authpage-showcase { position: relative; height: 560px; display: flex; align-items: center; justify-content: center; }
.as-frame {
    position: relative; width: 100%; height: 100%;
    background: linear-gradient(155deg, #f3ecdd 0%, #ece2cc 55%, #e7dcc2 100%);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 24px 50px rgba(26,46,26,0.10);
}
.as-ring { position: absolute; top: -60px; right: -60px; width: 220px; height: 220px; border-radius: 50%; border: 10px solid rgba(197,160,89,0.35); }
.as-cursive { position: absolute; top: 34px; right: 40px; text-align: right; font-family: 'Dancing Script', cursive; font-size: 1.7rem; color: var(--primary); line-height: 1.15; z-index: 2; }
.as-cursive .heart { color: #c0704f; }
.as-caption { position: absolute; bottom: 22px; left: 30px; font-size: 10px; letter-spacing: 2.5px; font-weight: 800; color: var(--primary); text-transform: uppercase; line-height: 1.7; opacity: 0.75; z-index: 3; }
.as-leaf-1, .as-leaf-2 { position: absolute; opacity: 0.5; }
.as-leaf-1 { bottom: 90px; left: -10px; width: 90px; transform: rotate(-15deg); }
.as-leaf-2 { top: 120px; left: 0px; width: 70px; transform: rotate(35deg); }

/* botanical bouquet filling the space where the product photo used to sit */
.as-bouquet { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; }
.as-bouquet .branch { position: absolute; width: 230px; opacity: 0.8; }
.as-bouquet .branch.a { left: 44%; bottom: -55px; transform: rotate(-22deg); opacity: 0.85; }
.as-bouquet .branch.b { left: 30%; bottom: -75px; width: 260px; transform: scaleX(-1) rotate(-34deg); opacity: 0.55; }
.as-bouquet .branch.c { left: 58%; bottom: -70px; width: 200px; transform: rotate(4deg); opacity: 0.65; }
.as-bouquet .branch.d { left: 8%; top: 46%; width: 170px; transform: rotate(96deg); opacity: 0.3; }

/* ============================================================
   MOBILE RESPONSIVE FIXES (register / login / forgot-password)
   ============================================================ */
html { -webkit-text-size-adjust: 100%; }
.authpage-body { padding-top: 0 !important; width: 100%; max-width: 100vw; }
.authpage-grid, .authpage-card { min-width: 0; }
.ap-group, .ap-field { min-width: 0; }
.authpage-brand img { max-width: 100%; height: auto; }

@media (max-width: 1080px) {
    .authpage-card { max-width: 560px; }
}

@media (max-width: 600px) {
    .authpage-shell { padding: 22px 12px 32px; justify-content: flex-start; }
    .authpage-brand { margin-bottom: 14px; }
    .authpage-brand img { width: 54px; height: 54px; }
    .authpage-brand .tag { font-size: 9px; letter-spacing: 1.6px; line-height: 1.5; padding: 0 8px; }
    .authpage-grid { gap: 0; }
    .authpage-card { padding: 22px 16px; border-radius: 20px; max-width: 100%; }
    .ap-title { font-size: 1.5rem; }
    .ap-subtitle { font-size: 12px; margin-bottom: 18px; }

    /* single column form so fields never get squeezed */
    .ap-grid { grid-template-columns: 1fr; gap: 0; }

    /* 16px stops iOS Safari from zooming (and breaking the layout) on focus */
    .ap-input { font-size: 16px; padding-top: 13px; padding-bottom: 13px; }
    textarea.ap-input { min-height: 80px; }

    .ap-terms { padding: 12px; }
    .ap-terms span { font-size: 11.5px; }

    .ap-otp-box { padding: 16px 8px; }
    .ap-otp-digits { gap: 10px; }
    .ap-otp-digit { width: 46px; height: 50px; font-size: 20px; }
    .ap-otp-foot { max-width: 100%; }

    .ap-btn { padding: 14px; }
    .leaf-deco { opacity: 0.3; }
    .leaf-tl { width: 130px !important; top: -20px; left: -30px; }
    .leaf-br { width: 150px !important; bottom: -25px; right: -25px; }
}

/* reCAPTCHA is a fixed 304px widget — scale it down so it can't overflow the card */
@media (max-width: 600px) {
    .ap-recaptcha { transform: none; width: 100%; overflow: hidden; justify-content: center; }
    .ap-recaptcha > div { transform: scale(0.92); transform-origin: center top; margin-bottom: -6px; }
}
@media (max-width: 370px) {
    .authpage-shell { padding-left: 8px; padding-right: 8px; }
    .authpage-card { padding: 20px 12px; }
    .ap-recaptcha > div { transform: scale(0.8); margin-bottom: -15px; }
    .ap-otp-digits { gap: 7px; }
    .ap-otp-digit { width: 42px; height: 46px; }
}

/* ROOT-CAUSE FIX: the hide rule near the top of this file was being overridden by the
   later `display:flex` declarations, so the feature rail + showcase panel stayed visible
   on phones/tablets and squeezed the form card. Force-hide them below 1080px. */
@media (max-width: 1080px) {
    .authpage-features,
    .authpage-showcase { display: none !important; }
    .authpage-grid { justify-content: center; }
    .authpage-card { flex: 1 1 auto; width: 100%; margin: 0 auto; }
}
