:root {
    --navy: #09233f;
    --blue: #0c5da5;
    --sky: #e9f4fb;
    --cyan: #56b9d2;
    --green: #78b94b;
    --white: #fff;
    --muted: #627084;
    --line: #dfe7ef;
    --shadow: 0 24px 70px rgba(9, 35, 63, .14);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--navy);
    background:
        radial-gradient(circle at 12% 16%, rgba(86, 185, 210, .22), transparent 27rem),
        linear-gradient(135deg, #f8fbfd 0%, #eef7fb 52%, #f8fbfd 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(9,35,63,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(9,35,63,.025) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, #000, transparent 80%);
}

button, input { font: inherit; }
button { cursor: pointer; }

.access-page {
    width: min(1180px, calc(100% - 40px));
    min-height: calc(100vh - 64px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: clamp(40px, 7vw, 96px);
    align-items: center;
    padding: 48px 0 24px;
}

.brand { display: inline-flex; width: 220px; }
.brand img { width: 100%; height: auto; display: block; }
.eyebrow, .step { margin: 44px 0 12px; color: var(--blue); font-size: .76rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1 { max-width: 620px; margin: 0; font-size: clamp(2.5rem, 5vw, 4.9rem); line-height: .98; letter-spacing: -.055em; }
.subtitle { max-width: 560px; margin: 24px 0 0; color: var(--muted); font-size: 1.08rem; line-height: 1.7; }
.trust-points { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 34px; color: #425368; font-size: .82rem; font-weight: 700; }
.trust-points span::before { content: "✓"; margin-right: 7px; color: var(--green); }

.access-panel {
    min-height: 590px;
    padding: clamp(28px, 4vw, 52px);
    border: 1px solid rgba(255,255,255,.9);
    border-radius: 32px;
    background: rgba(255,255,255,.9);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.panel-heading .step { margin-top: 0; }
.panel-heading h2 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.5rem); letter-spacing: -.04em; }
.panel-heading p:last-child { margin: 10px 0 30px; color: var(--muted); }
.role-grid { display: grid; gap: 16px; }
.role-card {
    width: 100%; min-height: 140px; padding: 24px;
    display: grid; grid-template-columns: 58px 1fr auto; gap: 18px; align-items: center;
    border: 1px solid var(--line); border-radius: 20px; text-align: left;
    color: var(--navy); background: var(--white); transition: .22s ease;
}
.role-card:hover, .role-card:focus-visible { transform: translateY(-3px); border-color: var(--cyan); box-shadow: 0 15px 35px rgba(9,35,63,.11); outline: none; }
.role-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 17px; color: var(--blue); background: var(--sky); }
.role-icon svg { width: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.admin .role-icon { color: #527d2e; background: #edf7e6; }
.role-copy { display: grid; gap: 7px; }
.role-copy strong { font-size: 1.06rem; }
.role-copy small { color: var(--muted); line-height: 1.45; }
.arrow { color: var(--blue); font-size: 1.4rem; transition: transform .2s ease; }
.role-card:hover .arrow { transform: translateX(4px); }

.login-form[hidden], .role-grid[hidden], .panel-heading[hidden] { display: none; }
.login-form { animation: reveal .28s ease both; }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } }
.form-title { display: flex; gap: 16px; align-items: center; margin-bottom: 30px; }
.form-title span { color: var(--blue); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.form-title h3 { margin: 3px 0 0; font-size: 1.65rem; }
.back { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; color: var(--navy); background: #fff; }
.login-form > label, .password-label label { display: block; margin: 18px 0 8px; font-size: .82rem; font-weight: 800; }
.login-form input[type="email"], .login-form input[type="password"] { width: 100%; height: 54px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--navy); background: #fbfdff; outline: none; }
.login-form input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(12,93,165,.1); }
.password-label { display: flex; justify-content: space-between; align-items: end; }
.password-label a { color: var(--blue); font-size: .78rem; text-decoration: none; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 60px !important; }
.show-password { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); padding: 6px; border: 0; color: var(--blue); background: transparent; font-size: .76rem; font-weight: 800; }
.remember { display: flex !important; gap: 10px; align-items: center; color: var(--muted); font-weight: 500 !important; }
.remember input { accent-color: var(--blue); }
.submit { width: 100%; min-height: 56px; margin-top: 24px; display: flex; justify-content: center; gap: 14px; align-items: center; border: 0; border-radius: 13px; color: white; background: linear-gradient(135deg, var(--blue), #0878bd); font-weight: 800; box-shadow: 0 12px 26px rgba(12,93,165,.22); }
.submit:hover { filter: brightness(1.06); }
.security-note { margin: 16px 0 0; color: var(--muted); font-size: .76rem; text-align: center; }
.form-alert { margin: 0 0 20px; padding: 13px 15px; border: 1px solid #f0c8c8; border-radius: 12px; color: #842929; background: #fff1f1; font-size: .86rem; line-height: 1.45; }
footer { min-height: 64px; display: grid; place-items: center; padding: 18px; color: var(--muted); font-size: .76rem; text-align: center; }

@media (max-width: 860px) {
    .access-page { grid-template-columns: 1fr; gap: 32px; padding-top: 28px; }
    .intro { text-align: center; }
    .brand { width: 190px; }
    .eyebrow { margin-top: 30px; }
    .subtitle { margin-inline: auto; }
    .trust-points { justify-content: center; }
    .access-panel { min-height: auto; }
}

@media (max-width: 520px) {
    .access-page { width: min(100% - 24px, 1180px); }
    h1 { font-size: 2.65rem; }
    .access-panel { padding: 24px 18px; border-radius: 24px; }
    .role-card { min-height: 122px; grid-template-columns: 48px 1fr; padding: 18px; gap: 14px; }
    .role-icon { width: 48px; height: 48px; }
    .role-copy small { font-size: .76rem; }
    .arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
