/*
 * Sign-in pages: /login (web panel) and /admin/login (admin panel).
 */
:root {
    --ink: #0f172a;
    --text: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --field: #cbd5e1;
    --brand: #f7931e;
    --brand-strong: #b45309;
    --brand-soft: #fff4e6;
    --danger: #dc2626;
    --navy: #0b1b3a;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--text); background: #f4f6f9; font-size: 14px; }
a { color: var(--brand-strong); }

.page { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(420px, 1fr); }

/* left: product story over the state map */
.brand {
    position: relative; overflow: hidden; color: #e2e8f0; padding: 48px 56px;
    display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
    background: linear-gradient(160deg, rgba(11, 27, 58, .94), rgba(11, 27, 58, .86)), url("../../web/assets/img/login-bg-min.jpg") center / cover;
}
.brand::after { /* soft orange glow, echoes the logo */
    content: ""; position: absolute; right: -160px; bottom: -160px; width: 420px; height: 420px;
    background: radial-gradient(circle, rgba(247, 147, 30, .28), transparent 65%); pointer-events: none;
}
.brand-top { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #fbbf77; }
.brand-top::before { content: ""; width: 28px; height: 2px; background: var(--brand); }
.brand h1 { margin: 16px 0 12px; max-width: 520px; font-size: 34px; line-height: 1.2; font-weight: 700; color: #fff; letter-spacing: -.01em; }
.brand p.lead { margin: 0; max-width: 520px; font-size: 15px; line-height: 1.6; color: #cbd5e1; }
.features { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; max-width: 520px; }
.features li { display: flex; gap: 12px; align-items: flex-start; }
.features i {
    flex: 0 0 34px; height: 34px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); color: #fbbf77; font-size: 14px;
}
.features b { display: block; color: #fff; font-weight: 600; font-size: 14px; }
.features span { font-size: 13px; color: #94a3b8; }
.brand-foot { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12px; color: #94a3b8; }
.emblems { display: flex; align-items: center; gap: 10px; }
.emblems img { width: 40px; height: 40px; border-radius: 50%; background: #fff; padding: 3px; }

/* right: sign-in card */
.panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: #fff; }
.card { width: 100%; max-width: 400px; }
.logo { height: 46px; width: auto; display: block; margin-bottom: 28px; }
.card h2 { margin: 0; font-size: 24px; font-weight: 700; color: var(--ink); }
.card .sub { margin: 6px 0 22px; color: var(--muted); }

.label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
.states { border: 0; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.states legend { padding: 0; }
.state { position: relative; }
.state input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.state label {
    display: flex; align-items: center; gap: 10px; height: 100%; padding: 10px 12px; cursor: pointer;
    border: 1.5px solid var(--line); border-radius: 10px; transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.state img { width: 34px; height: 34px; object-fit: contain; flex: 0 0 34px; }
.state b { display: block; font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.state small { font-size: 11.5px; color: var(--muted); }
.state label:hover { border-color: var(--field); }
.state input:checked + label { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px rgba(247, 147, 30, .15); }
.state input:focus-visible + label { outline: 2px solid var(--brand-strong); outline-offset: 2px; }
.state input:checked + label::after {
    content: "\f058"; font-family: "Font Awesome 6 Free"; font-weight: 900; color: var(--brand-strong);
    margin-left: auto; font-size: 15px;
}

.field { margin-bottom: 16px; }
.control { position: relative; }
.control > i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 14px; pointer-events: none; }
.control input {
    width: 100%; height: 44px; padding: 0 44px 0 38px; font: inherit; font-size: 14px; color: var(--ink);
    border: 1px solid var(--field); border-radius: 8px; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.control input::placeholder { color: #94a3b8; }
.control input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(247, 147, 30, .2); }
.toggle-pw {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px;
    border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 6px;
}
.toggle-pw:hover { color: var(--ink); background: #f1f5f9; }
.caps { display: none; margin-top: 6px; font-size: 12px; color: var(--brand-strong); }
.caps.show { display: block; }

.btn {
    width: 100%; height: 46px; margin-top: 6px; border: 0; border-radius: 8px; cursor: pointer;
    background: var(--brand-strong); color: #fff; font: inherit; font-size: 15px; font-weight: 600;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: background-color .15s;
}
.btn:hover { background: #92400e; }
.btn:focus-visible { outline: 3px solid rgba(247, 147, 30, .45); outline-offset: 2px; }
.btn[disabled] { opacity: .75; cursor: progress; }

.alert { margin-bottom: 16px; padding: 10px 12px; border-radius: 8px; font-size: 13px; display: flex; gap: 8px; align-items: flex-start; }
.alert-danger { background: #fef2f2; border: 1px solid #fecaca; color: var(--danger); }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }
.alert-info, .alert-warning { background: #fff7ed; border: 1px solid #fed7aa; color: var(--brand-strong); }

.admin-link {
    margin-top: 14px; display: flex; align-items: center; gap: 10px; padding: 10px 12px;
    border: 1px dashed var(--field); border-radius: 8px; color: var(--text); text-decoration: none; font-size: 13px;
    transition: border-color .15s, background-color .15s, color .15s;
}
.admin-link b { color: var(--ink); font-weight: 600; }
.admin-link > i:first-child { color: var(--muted); }
.admin-link > i:last-child { margin-left: auto; font-size: 11px; color: #94a3b8; }
.admin-link:hover { border-style: solid; border-color: var(--brand); background: var(--brand-soft); color: var(--brand-strong); }
.admin-link:hover i { color: var(--brand-strong); }
.card-foot { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); line-height: 1.6; }
.card-foot .dept { color: var(--text); font-weight: 500; }
.powered { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.powered img { height: 18px; }

@media (max-width: 960px) {
    .page { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .brand { padding: 20px 20px 18px; gap: 0; }
    .brand h1 { font-size: 19px; margin: 8px 0 0; }
    .brand p.lead { display: none; }
    .features, .brand-foot { display: none; }
    .panel { padding: 28px 20px 36px; align-items: flex-start; }
    .logo { margin-bottom: 20px; }
}
@media (max-width: 420px) {
    .states { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- admin sign-in */
.is-admin .brand {
    background: linear-gradient(160deg, rgba(17, 24, 39, .95), rgba(67, 20, 7, .88)), url("../../web/assets/img/login-bg-min.jpg") center / cover;
}
.is-admin .brand::after { background: radial-gradient(circle, rgba(247, 147, 30, .35), transparent 65%); }
.panel-badge {
    display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px; padding: 4px 10px; border-radius: 999px;
    background: var(--brand-soft); color: var(--brand-strong); font-size: 12px; font-weight: 700; letter-spacing: .02em;
}
.logo-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.logo-row .logo { margin: 0; }
.state .generic { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; background: #f1f5f9; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.states.single { grid-template-columns: 1fr; }
