:root {
    --blue-950: #071a42;
    --blue-900: #0a255c;
    --blue-800: #0d347f;
    --blue-700: #1150c8;
    --blue-600: #0f5fff;
    --blue-100: #eaf1ff;
    --green: #20c997;
    --yellow: #ffc857;
    --text: #172033;
    --muted: #657287;
    --border: rgba(13, 52, 127, .12);
    --shadow: 0 24px 70px rgba(7, 26, 66, .16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--text); background: #f5f8ff; font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
button, input { font: inherit; }
img { max-width: 100%; }
.page-container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.icon { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.gov-bar { height: 40px; color: #555; background: #f4f4f4; border-top: 1px solid #aaa; border-bottom: 1px solid #d5d5d5; font-size: .78rem; font-weight: 700; }
.gov-bar__content { display: flex; justify-content: space-between; height: 100%; }
.gov-bar__brand, .gov-bar__links span { display: flex; align-items: center; padding: 0 18px; border-right: 1px solid #ddd; }
.gov-bar__brand { border-left: 1px solid #ddd; gap: 8px; }
.gov-bar__links { display: flex; }

.gov-header { position: relative; overflow: hidden; color: #fff; background: radial-gradient(circle at 8% 0%, rgba(255,255,255,.15), transparent 24rem), linear-gradient(135deg, #4b88cf 0%, #2b70c2 48%, #165aae 100%); box-shadow: 0 18px 55px rgba(7,26,66,.15); }
.gov-header::after { content: ""; position: absolute; right: -8rem; top: -14rem; width: 34rem; height: 34rem; border-radius: 50%; background: rgba(255,255,255,.08); }
.gov-header__grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(280px, 480px) 1fr; align-items: center; gap: clamp(2rem, 7vw, 7rem); min-height: 315px; }
.gov-header__brand img { display: block; width: min(470px, 100%); filter: drop-shadow(0 10px 18px rgba(7,26,66,.18)); }
.gov-header__title { padding-left: clamp(.5rem, 2vw, 1.5rem); border-left: 1px solid rgba(255,255,255,.3); }
.gov-header__title h1 { margin: 0; font-size: clamp(2.2rem, 4vw, 3.5rem); font-weight: 500; letter-spacing: -.05em; }
.gov-header__title strong { display: block; margin-top: .65rem; font-size: clamp(1.5rem, 2.5vw, 2.35rem); }
.gov-header__title p { margin: .85rem 0 0; font-size: clamp(1.05rem, 1.7vw, 1.55rem); }

.public-page { position: relative; overflow: hidden; background: radial-gradient(circle at top left, rgba(32,201,151,.17), transparent 28rem), radial-gradient(circle at 88% 8%, rgba(15,95,255,.13), transparent 28rem), linear-gradient(180deg, #f6f9ff 0%, #edf3ff 48%, #fff 100%); }
.public-page::after { content: ""; position: absolute; right: -12rem; top: 4rem; width: 32rem; height: 32rem; border-radius: 50%; background: rgba(15,95,255,.07); pointer-events: none; }
.hero { position: relative; z-index: 1; padding: 52px 0 72px; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.28fr) minmax(360px, .72fr); align-items: center; gap: clamp(45px, 7vw, 105px); }
.pill { display: inline-flex; align-items: center; gap: 9px; padding: 9px 14px; color: var(--blue-800); background: rgba(255,255,255,.8); border: 1px solid var(--border); border-radius: 999px; box-shadow: 0 10px 28px rgba(7,26,66,.06); font-size: .78rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.hero__content h2 { margin: 26px 0 0; color: var(--blue-950); font-size: clamp(3rem, 6.2vw, 5.35rem); font-weight: 900; letter-spacing: -.065em; line-height: .96; }
.hero__content h2 span { display: block; color: var(--blue-600); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 14px 22px; border: 0; border-radius: 999px; cursor: pointer; font-weight: 900; text-decoration: none; transition: transform .2s, box-shadow .2s, opacity .2s; }
.button:hover { transform: translateY(-2px); }
.button--primary { color: #fff; background: linear-gradient(135deg, var(--blue-700), var(--blue-600)); box-shadow: 0 18px 34px rgba(15,95,255,.28); }
.button--secondary { color: var(--blue-800); background: rgba(255,255,255,.82); border: 1px solid var(--border); box-shadow: 0 12px 30px rgba(7,26,66,.07); }
.button--full { width: 100%; }
.button[disabled] { cursor: wait; opacity: .7; transform: none; }

.login-card { position: relative; overflow: hidden; padding: 30px; background: rgba(255,255,255,.94); border: 1px solid rgba(255,255,255,.94); border-radius: 28px; box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.card-accent { position: absolute; inset: 0 0 auto; height: 6px; background: linear-gradient(90deg, var(--blue-600), var(--green), var(--yellow)); }
.login-card__icon, .status-icon { display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 58px; color: #fff; background: linear-gradient(135deg, var(--blue-700), var(--blue-600)); border-radius: 18px; box-shadow: 0 16px 34px rgba(15,95,255,.25); }
.eyebrow { margin: 22px 0 7px; color: var(--blue-700); font-size: .78rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.login-card h3, .systems h2 { margin: 0; color: var(--blue-950); font-size: 1.75rem; font-weight: 900; letter-spacing: -.04em; }
.card-description, .systems__description { margin: 10px 0 23px; color: var(--muted); line-height: 1.65; }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 8px; color: var(--blue-950); font-size: .9rem; font-weight: 900; }
.field input { width: 100%; min-height: 56px; padding: 14px 16px; color: var(--text); background: rgba(247,250,255,.9); border: 1px solid rgba(13,52,127,.16); border-radius: 16px; outline: 0; font-weight: 700; }
.field input:focus { background: #fff; border-color: rgba(15,95,255,.6); box-shadow: 0 0 0 4px rgba(15,95,255,.12); }
.field input[aria-invalid="true"] { border-color: #c62828; box-shadow: 0 0 0 4px rgba(198,40,40,.09); }
.field small { display: none; margin: 7px 3px 0; color: #a22525; font-size: .78rem; font-weight: 700; }
.field input[aria-invalid="true"] + small { display: block; }
.form-message { display: none; margin-top: 14px; padding: 12px 14px; border-radius: 12px; font-size: .88rem; font-weight: 800; line-height: 1.45; }
.form-message.is-error { display: block; color: #8d2020; background: #fff0f0; border: 1px solid #f4c6c6; }
.form-message.is-loading { display: block; color: var(--blue-800); background: var(--blue-100); border: 1px solid #cbdcff; }
.security-note { display: flex; align-items: flex-start; gap: 12px; margin-top: 18px; padding: 14px; color: var(--muted); background: rgba(234,241,255,.72); border: 1px solid var(--border); border-radius: 16px; font-size: .85rem; line-height: 1.5; }
.security-note .icon { flex: 0 0 auto; color: var(--blue-700); }
.security-note strong { display: block; color: var(--blue-950); }

.systems { position: relative; z-index: 1; padding: 0 0 74px; }
.systems .eyebrow { margin-top: 0; }
.systems h2 { font-size: clamp(1.9rem, 3.2vw, 2.65rem); }
.systems__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.system-card { display: flex; align-items: center; gap: 20px; min-height: 150px; padding: 22px; background: rgba(255,255,255,.92); border: 1px solid rgba(255,255,255,.96); border-radius: 26px; box-shadow: 0 18px 44px rgba(7,26,66,.1); cursor: default; user-select: none; }
.system-card__image { display: flex; align-items: center; justify-content: center; width: 118px; min-width: 118px; height: 88px; padding: 14px; background: #fff; border: 1px solid var(--border); border-radius: 20px; }
.system-card__image img { max-height: 100%; object-fit: contain; }
.system-card strong { display: block; color: var(--blue-950); font-size: 1.08rem; font-weight: 900; }
.system-card small { display: block; margin-top: 9px; color: var(--muted); font-size: .88rem; line-height: 1.5; }

.public-footer { color: #fff; background: radial-gradient(circle at 10% 0%, rgba(32,201,151,.24), transparent 20rem), linear-gradient(135deg, var(--blue-950), var(--blue-800)); }
.public-footer__content { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 125px; padding-top: 25px; padding-bottom: 25px; }
.public-footer p { margin: 0; color: rgba(255,255,255,.78); font-size: .9rem; line-height: 1.6; }
.public-footer__logos { display: flex; gap: 12px; }
.public-footer__logos span { display: flex; align-items: center; justify-content: center; width: 80px; height: 54px; padding: 9px; background: rgba(255,255,255,.95); border-radius: 16px; }
.public-footer__logos img { max-height: 100%; object-fit: contain; }
.accessibility-mark { position: fixed; z-index: 5; right: 18px; top: 50%; display: grid; place-items: center; width: 48px; height: 48px; background: #1887e8; border-radius: 9px; box-shadow: 0 10px 25px rgba(7,26,66,.18); }
.accessibility-mark img { width: 34px; }

.result-page { position: relative; min-height: 540px; padding: 54px 0 74px; overflow: hidden; background: radial-gradient(circle at top left, rgba(32,201,151,.15), transparent 28rem), linear-gradient(180deg, #f6f9ff, #edf3ff 60%, #fff); }
.result-hero { padding: 28px; color: #fff; background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.2), transparent 24rem), linear-gradient(135deg, var(--blue-950), var(--blue-700)); border-radius: 30px; box-shadow: 0 28px 70px rgba(7,26,66,.22); }
.result-hero .status-icon { background: rgba(255,255,255,.16); box-shadow: none; }
.result-hero h2 { margin: 20px 0 7px; font-size: clamp(2rem, 4vw, 3.1rem); letter-spacing: -.045em; }
.result-hero p { max-width: 760px; margin: 0; color: rgba(255,255,255,.8); line-height: 1.65; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 22px; }
.info-card { padding: 22px; background: rgba(255,255,255,.94); border: 1px solid rgba(255,255,255,.96); border-radius: 24px; box-shadow: 0 16px 42px rgba(7,26,66,.09); }
.info-card__header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.info-card__header span { display: grid; place-items: center; width: 44px; height: 44px; color: var(--blue-700); background: var(--blue-100); border-radius: 14px; }
.info-card__header h3 { margin: 0; color: var(--blue-950); font-size: 1.08rem; }
.data-list { display: grid; gap: 11px; margin: 0; }
.data-row { display: grid; grid-template-columns: minmax(135px, .8fr) 1.2fr; gap: 14px; margin: 0; padding: 13px 14px; background: rgba(247,250,255,.8); border: 1px solid rgba(13,52,127,.08); border-radius: 15px; }
.data-row dt { color: var(--muted); font-size: .76rem; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.data-row dd { margin: 0; color: var(--text); font-size: .94rem; font-weight: 800; overflow-wrap: anywhere; }
.result-notice { margin-top: 22px; padding: 20px; background: rgba(255,255,255,.88); border: 1px solid var(--border); border-radius: 22px; box-shadow: 0 14px 34px rgba(7,26,66,.07); color: var(--muted); line-height: 1.65; }
.result-notice p { margin: 0; }
.result-notice p + p { margin-top: 6px; }
.result-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 18px; padding: 18px; background: rgba(255,255,255,.8); border: 1px solid var(--border); border-radius: 22px; }
.result-actions p { margin: 0; color: var(--muted); font-size: .9rem; font-weight: 800; }
.result-actions__buttons { display: flex; gap: 10px; }

@media (max-width: 980px) {
    .gov-header__grid { grid-template-columns: 1fr; justify-items: center; gap: 24px; min-height: 350px; padding: 35px 0; text-align: center; }
    .gov-header__brand img { width: min(430px, 85vw); }
    .gov-header__title { padding-left: 0; border-left: 0; }
    .hero__grid { grid-template-columns: 1fr; }
    .login-card { width: min(560px, 100%); margin: 0 auto; }
    .systems__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
    .page-container { width: min(100% - 28px, 1180px); }
    .gov-bar__links { display: none; }
    .gov-bar__brand { border-right: 0; }
    .gov-header__grid { min-height: 285px; }
    .gov-header__title h1 { font-size: 1.9rem; }
    .gov-header__title strong { font-size: 1.3rem; }
    .gov-header__title p { font-size: 1rem; }
    .hero { padding: 38px 0 54px; }
    .hero__content h2 { font-size: clamp(2.55rem, 14vw, 4rem); }
    .hero__actions { flex-direction: column; }
    .hero__actions .button { width: 100%; }
    .login-card { padding: 23px; border-radius: 23px; }
    .systems__grid, .result-grid { grid-template-columns: 1fr; }
    .system-card { min-height: 130px; }
    .public-footer__content, .result-actions { align-items: flex-start; flex-direction: column; }
    .result-actions__buttons { width: 100%; flex-direction: column; }
    .result-actions__buttons .button { width: 100%; }
    .data-row { grid-template-columns: 1fr; gap: 4px; }
    .accessibility-mark { right: 10px; width: 42px; height: 42px; }
}

@media (max-width: 430px) {
    .system-card { align-items: flex-start; flex-direction: column; }
    .system-card__image { width: 100%; }
    .public-footer__logos span { width: 68px; height: 49px; }
}

@media print {
    .gov-bar, .gov-header, .public-footer, .accessibility-mark, .result-hero, .result-actions { display: none !important; }
    .result-page { padding: 0; background: #fff; }
    .page-container { width: 100%; }
    .info-card, .result-notice { box-shadow: none; border-color: #ccd2dd; }
}
