/* Election Portal — auth pages (Login / Register)
   Same family as CoreFit ERP theme: Lato, compact, Bootstrap base.
   Primary colour: #660000 */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700;900&display=swap');

:root {
    --brand: #660000;
    --brand-dark: #3d0000;
    --brand-hover: #520000;
    --brand-light: #800000;
    --brand-tint: #faf3f3;
    --ink: #18181b;
    --mut: #6b7280;
    --line: #e5e7eb;
}

* { box-sizing: border-box; }
body { font-family: 'Lato', Arial, Helvetica, sans-serif; font-size: 14px; color: var(--ink); margin: 0; background: #f4f4f5; }

.auth-shell { display: flex; min-height: 100vh; }

/* ---------- left brand panel (desktop) ---------- */
.auth-brand {
    display: none;
    width: 42%;
    max-width: 560px;
    flex-direction: column;
    padding: 48px 52px;
    color: #fff;
    background:
        radial-gradient(620px 340px at 85% -60px, rgba(255,255,255,.14), rgba(255,255,255,0) 60%),
        radial-gradient(520px 300px at -80px 88%, rgba(255,255,255,.10), rgba(255,255,255,0) 60%),
        linear-gradient(165deg, var(--brand-light) 0%, var(--brand) 46%, var(--brand-dark) 100%);
}
@media (min-width: 992px) { .auth-brand { display: flex; } }

.auth-brand .brand-row { display: flex; align-items: center; gap: 14px; }
.auth-brand .brand-row img { width: 52px; height: 52px; }
.auth-brand .brand-name { font-size: 21px; font-weight: 900; letter-spacing: .4px; line-height: 1.1; }
.auth-brand .brand-sub { font-size: 11px; font-weight: 700; letter-spacing: 2.5px; opacity: .75; margin-top: 3px; }

.auth-brand h1 { font-size: 34px; font-weight: 900; line-height: 1.2; margin: 0 0 14px; }
.auth-brand .lead { font-size: 15px; line-height: 1.65; opacity: .88; margin: 0; max-width: 400px; }

.auth-features { list-style: none; margin: 34px 0 0; padding: 0; }
.auth-features li { display: flex; gap: 13px; margin-bottom: 20px; }
.auth-features .ic {
    flex: none; width: 38px; height: 38px; border-radius: 10px;
    background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22);
    display: flex; align-items: center; justify-content: center;
}
.auth-features .t { font-weight: 700; font-size: 14.5px; }
.auth-features .d { font-size: 13px; opacity: .8; line-height: 1.5; }

/* Headline + features start right under the brand row (top-anchored,
   never floating in the middle); only the foot note sits at the bottom. */
.auth-brand .brand-mid { margin-top: 52px; }
.auth-brand .foot { font-size: 12px; opacity: .65; margin-top: auto; padding-top: 40px; }

/* ---------- mobile brand bar ---------- */
.auth-mobilebar {
    display: flex; align-items: center; gap: 11px;
    background: linear-gradient(120deg, var(--brand-light), var(--brand) 55%, var(--brand-dark));
    color: #fff; padding: 14px 20px;
}
.auth-mobilebar img { width: 38px; height: 38px; }
.auth-mobilebar .brand-name { font-size: 17px; font-weight: 900; line-height: 1.1; }
.auth-mobilebar .brand-sub { font-size: 10px; font-weight: 700; letter-spacing: 2px; opacity: .75; }
@media (min-width: 992px) { .auth-mobilebar { display: none; } }

/* ---------- form side ---------- */
.auth-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.auth-formwrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 36px 20px 28px; }
.auth-form { width: 100%; max-width: 440px; }
.auth-form.wide { max-width: 660px; }

.auth-form .form-logo { display: none; }
@media (min-width: 992px) {
    .auth-form .form-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
    .auth-form .form-logo img { width: 44px; height: 44px; }
    .auth-form .form-logo .n { font-size: 18px; font-weight: 900; color: var(--brand); line-height: 1.1; }
    .auth-form .form-logo .s { font-size: 10px; font-weight: 700; letter-spacing: 2.2px; color: var(--mut); }
}

.auth-title { font-size: 26px; font-weight: 900; color: var(--ink); margin: 0 0 6px; }
.auth-sub { color: var(--mut); font-size: 14px; margin: 0 0 26px; line-height: 1.55; }

label.lbl { display: block; font-size: 13px; font-weight: 700; color: #3f3f46; margin-bottom: 6px; }
label.lbl .req { color: var(--brand); }

.form-control, .form-select {
    height: 46px; border-radius: 9px; border: 1px solid var(--line);
    font-size: 14px; font-family: inherit; background: #fff; width: 100%;
}
.form-control::placeholder { color: #9ca3af; }
.form-control:focus, .form-select:focus {
    border-color: var(--brand); box-shadow: 0 0 0 .22rem rgba(102,0,0,.13); outline: none;
}
.field { margin-bottom: 16px; }
.field-err { color: #b91c1c; font-size: 12.5px; margin-top: 5px; display: block; }

.pwd-wrap { position: relative; }
.pwd-wrap .form-control { padding-right: 44px; }
.pwd-toggle {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    border: none; background: none; padding: 7px; cursor: pointer; color: #9ca3af; line-height: 0;
}
.pwd-toggle:hover { color: var(--brand); }

.pwd-meter { height: 5px; border-radius: 3px; background: #e9e9ec; margin-top: 8px; overflow: hidden; }
.pwd-meter > div { height: 100%; width: 0; border-radius: 3px; transition: width .25s ease, background .25s ease; }
.pwd-hint { font-size: 12px; color: var(--mut); margin-top: 5px; }

.btn-auth {
    width: 100%; height: 50px; border: none; border-radius: 25px; cursor: pointer;
    background: var(--brand); color: #fff; font-size: 15.5px; font-weight: 700; font-family: inherit;
    transition: background .15s ease, transform .05s ease;
}
.btn-auth:hover { background: var(--brand-hover); }
.btn-auth:active { transform: translateY(1px); }
.btn-auth:disabled { background: #c9a3a3; cursor: not-allowed; opacity: .65; }
.btn-auth:disabled:hover { background: #c9a3a3; }
.btn-auth:disabled:active { transform: none; }

.flash { padding: 12px 15px; border-radius: 11px; margin-bottom: 18px; font-size: 13.5px; font-weight: 600; }
.flash.ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.flash.err { background: #fdf2f2; border: 1px solid #fecaca; color: #991b1b; }
.flash.err ul { margin: 0; padding-left: 18px; font-weight: 600; }

.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(102,0,0,.13); }

.mut-link { color: var(--mut); font-size: 13.5px; text-decoration: none; }
.mut-link:hover { color: var(--brand); }

.auth-switch { text-align: center; margin-top: 22px; font-size: 14px; color: var(--mut); }
.auth-switch a { color: var(--brand); font-weight: 700; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

.secure-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 18px; color: #9ca3af; font-size: 12.5px; }

.auth-foot { text-align: center; padding: 0 20px 22px; color: #9ca3af; font-size: 12px; }

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
@media (min-width: 576px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

@media (max-width: 575px) {
    .auth-formwrap { padding: 26px 16px 20px; align-items: flex-start; }
    .auth-title { font-size: 23px; }
}

/* Profile photo upload (signup) — same values as theme.css on the
   My Profile page, so both uploaders look identical. The auth layout
   does not load theme.css; without these rules the preview renders
   at the photo's natural size and the button is plain text. */
.photo-upload { display: flex; align-items: center; gap: 16px; border: 1.5px dashed #d4d4d8; border-radius: 12px; padding: 14px 16px; background: #fafafa; }
.photo-preview { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; flex: 0 0 84px; border: 3px solid var(--brand); background: #f4f4f5; }
.photo-placeholder { display: flex; align-items: center; justify-content: center; color: #a1a1aa; }
.photo-side { min-width: 0; }
.btn-photo { display: inline-block; background: var(--brand); color: #fff; font-weight: 600; font-size: 13.5px; padding: 8px 16px; border-radius: 8px; cursor: pointer; }
.btn-photo:hover { background: #7d1a1a; }
.photo-name { font-size: 13px; color: #27272a; margin-top: 7px; word-break: break-all; }
.photo-hint { font-size: 12px; color: #71717a; margin-top: 2px; }

/* Organization combobox (signup): a real, visible dropdown list the
   voter can pick from, while typing a name stays allowed. */
.combo-wrap { position: relative; }
.combo-wrap .form-control { padding-right: 42px; }
.combo-arrow { position: absolute; top: 0; right: 0; height: 100%; width: 40px; border: 0; background: transparent; color: #71717a; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.combo-arrow:hover { color: var(--brand); }
.combo-menu { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 30; margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid #e4e4e7; border-radius: 10px; box-shadow: 0 16px 40px rgba(24,24,27,.16); max-height: 220px; overflow-y: auto; }
.combo-item { padding: 9px 10px; border-radius: 7px; font-size: 14px; color: #27272a; cursor: pointer; }
.combo-item:hover { background: #faf1f1; }
.combo-empty { padding: 9px 10px; font-size: 13px; color: #71717a; }

/* ===== Full-page loading overlay (form submits) ===== */
.ep-loader{position:fixed;inset:0;background:rgba(24,24,27,.55);z-index:2000;display:none;align-items:center;justify-content:center}
.ep-loader-box{background:#fff;border-radius:14px;padding:26px 34px;display:flex;flex-direction:column;align-items:center;gap:14px;box-shadow:0 24px 60px rgba(0,0,0,.35)}
.ep-loader-spin{width:44px;height:44px;border-radius:50%;border:4px solid #e9d5d5;border-top-color:#660000;animation:ep-spin .8s linear infinite}
.ep-loader-text{font-weight:700;color:#18181b;font-size:14.5px}
@keyframes ep-spin{to{transform:rotate(360deg)}}
