/* Sign-in / sign-up pages — split screen, brown & gold */
*, *::before, *::after { box-sizing: border-box; }
:root {
    --primary: #85521f;
    --primary-dark: #4a2c12;
    --primary-light: #d49b00;
    --gold: #f2b705;
    --text: #2b1d10;
    --muted: #7c6a55;
    --border: #dcc69c;
}
html, body { margin: 0; padding: 0; }
body {
    display: flex; height: 100vh; overflow: hidden;
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--text); background: #f8f1e3;
}

/* LEFT 50% — full-height image. Drop a photo at uploads/welfare-bg.jpg (used automatically); without it the brown gradient shows. */
.left {
    width: 50%; flex-shrink: 0; position: relative;
    background:
        radial-gradient(circle at 78% 22%, rgba(242,183,5,.35) 0%, transparent 42%),
        linear-gradient(145deg, #2e1b0b 0%, #6b3f1a 55%, #a0682c 100%);
}
.left-art { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.left-art span { position: absolute; border-radius: 50%; border: 2px solid rgba(242,183,5,.22); }
.left-art span:nth-child(1) { width: 420px; height: 420px; top: -120px; right: -120px; }
.left-art span:nth-child(2) { width: 260px; height: 260px; top: 30%; left: -90px; border-color: rgba(255,255,255,.10); }
.left-art span:nth-child(3) { width: 140px; height: 140px; top: 18%; left: 42%; background: rgba(242,183,5,.10); border: 0; }
.left-overlay {
    position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 44px 52px;
    background: linear-gradient(to bottom, rgba(46,27,11,.05) 0%, rgba(46,27,11,.15) 40%, rgba(30,17,6,.85) 100%);
}
.left-badge {
    display: inline-flex; align-items: center; gap: 8px; width: fit-content; margin-bottom: 18px; padding: 6px 15px;
    border-radius: 20px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); backdrop-filter: blur(4px);
    color: #fff; font-size: 12.5px; font-weight: 600;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(242,183,5,.35); }
.left-overlay h2 { margin: 0 0 12px; color: #fff; font-size: 34px; font-weight: 800; line-height: 1.2; letter-spacing: -.8px; text-shadow: 0 2px 10px rgba(0,0,0,.35); }
.left-overlay h2 em { font-style: normal; color: var(--gold); }
.left-overlay p { margin: 0; max-width: 460px; color: rgba(255,255,255,.86); font-size: 14.5px; line-height: 1.75; }
.left-points { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 22px; color: rgba(255,255,255,.9); font-size: 13px; font-weight: 600; }
.left-points i { color: var(--gold); margin-right: 6px; }

/* RIGHT 50% — form */
.right {
    width: 50%; flex-shrink: 0; position: relative; display: flex; flex-direction: column; justify-content: center;
    padding: 48px 52px; overflow-y: auto; box-shadow: -4px 0 24px rgba(0,0,0,.10);
    background:
        radial-gradient(circle at 92% 4%, rgba(133,82,31,.14) 0%, transparent 50%),
        radial-gradient(circle at -8% 98%, rgba(242,183,5,.20) 0%, transparent 48%),
        linear-gradient(160deg, #fbf1dc 0%, #fffaf0 45%, #f6e8c8 100%);
}
.right.tall { justify-content: flex-start; }
.right-inner { width: 100%; max-width: 400px; margin: 0 auto; }
.right-inner.wide { max-width: 560px; }

.logo-area { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; margin-bottom: 26px; }
.logo-icon {
    width: 62px; height: 62px; display: grid; place-items: center; border-radius: 18px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: var(--gold); font-size: 26px;
    box-shadow: 0 10px 24px rgba(74,44,18,.28);
}
.logo-text .name { font-size: 24px; font-weight: 800; letter-spacing: -.5px; color: var(--primary-dark); line-height: 1.2; }
.logo-text .sub { margin-top: 4px; font-size: 13px; color: var(--muted); }

.login-box { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 30px 28px; box-shadow: 0 8px 28px rgba(74,44,18,.10); }
.box-title { margin: 0 0 4px; font-size: 20px; font-weight: 800; letter-spacing: -.4px; }
.box-sub   { margin: 0 0 22px; font-size: 13px; color: var(--muted); }
.box-section { display: flex; align-items: center; gap: 8px; margin: 6px 0 14px; padding-bottom: 8px; border-bottom: 1px dashed var(--border); font-size: 13px; font-weight: 800; color: var(--primary); text-transform: uppercase; letter-spacing: .05em; }
.box-section i { color: var(--primary-light); }

.alert { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 18px; padding: 11px 13px; border-radius: 10px; background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; font-size: 13px; line-height: 1.5; }
.alert i { margin-top: 2px; }
.alert-info { background: #fff8e1; border-color: #f6d47a; color: #7a4e00; }
.alert ul { margin: 0; padding-left: 18px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
.form-group { margin-bottom: 18px; }
.form-label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 600; color: #4a2c12; }
.form-label .req { color: #c0392b; }
.input-wrap { position: relative; }
.input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #b58b55; font-size: 14px; pointer-events: none; }
.form-control {
    width: 100%; height: 48px; padding: 0 44px; border: 1.5px solid var(--border); border-radius: 10px; background: #fff; color: var(--text);
    font-family: inherit; font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.form-control::placeholder { color: #b9a685; }
.form-control:hover { border-color: #c9a46a; }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(242,183,5,.25); }
.hint { margin-top: 5px; font-size: 11.5px; color: var(--muted); }

.password-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: #b58b55; cursor: pointer; }
.password-toggle:hover { color: var(--primary); background: #fbf1dc; }
.password-toggle:focus-visible { outline: 2px solid var(--primary); }

.btn-login {
    width: 100%; height: 50px; margin-top: 4px; border: 0; border-radius: 10px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    background: var(--primary); color: #fff; font-family: inherit; font-size: 15px; font-weight: 700; transition: background .15s;
}
.btn-login:hover { background: var(--primary-dark); }
.btn-login:focus-visible { outline: 3px solid rgba(242,183,5,.5); outline-offset: 2px; }

.auth-links { margin-top: 20px; text-align: center; font-size: 14px; color: var(--muted); }
.auth-links a { color: var(--primary); font-weight: 700; text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }
.signin-footer { margin-top: 26px; text-align: center; font-size: 12px; color: #a08e74; }

/* Status popup (suspended welfare, new account code) */
.pf-overlay { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(30,17,6,.55); backdrop-filter: blur(3px); animation: pfFade .2s ease; }
.pf-modal { width: 100%; max-width: 420px; background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 30px 70px rgba(0,0,0,.3); animation: pfUp .25s cubic-bezier(.2,.8,.2,1); }
.pf-head { padding: 26px 24px 20px; text-align: center; color: #fff; background: linear-gradient(135deg, #b91c1c, #ef4444); }
.pf-icon { width: 62px; height: 62px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.2); border: 2px solid rgba(255,255,255,.4); font-size: 26px; }
.pf-head h3 { margin: 0; font-size: 19px; font-weight: 800; }
.pf-head p { margin: 4px 0 0; font-size: 13px; opacity: .9; }
.pf-body { padding: 20px 24px 6px; }
.pf-msg { margin: 0 0 16px; font-size: 14px; line-height: 1.6; color: #4a3a28; text-align: center; }
.pf-foot { display: flex; gap: 10px; padding: 14px 24px 22px; }
.pf-btn { flex: 1; height: 46px; border-radius: 11px; border: 0; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; background: #f4ede0; color: #4a2c12; }
@keyframes pfFade { from { opacity: 0 } to { opacity: 1 } }
@keyframes pfUp { from { opacity: 0; transform: translateY(18px) scale(.97) } to { opacity: 1; transform: none } }

/* Mobile: image becomes a banner on top */
@media (max-width: 900px) {
    body { flex-direction: column; height: auto; min-height: 100vh; overflow: auto; }
    .left { width: 100%; height: 210px; flex-shrink: unset; }
    .left-overlay { padding: 24px; }
    .left-overlay h2 { font-size: 22px; margin: 0; }
    .left-overlay p, .left-points { display: none; }
    .right { width: 100%; flex: 1; flex-shrink: unset; padding: 36px 22px; box-shadow: none; }
}
