:root {
  --ink: #071423;
  --navy: #06111f;
  --blue: #0868e8;
  --cyan: #16b7e9;
  --mint: #48e0bd;
  --paper: #f3f7fa;
  --white: #fff;
  --slate: #617487;
  --line: #d9e4ec;
  --shadow: 0 28px 80px rgba(2, 19, 36, .13);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.demo-ribbon { min-height: 38px; padding: .45rem 4vw; display: flex; align-items: center; justify-content: center; gap: .7rem; color: #06111f; background: var(--mint); font-size: .78rem; }
.demo-ribbon strong { text-transform: uppercase; letter-spacing: .1em; }
.demo-ribbon span { opacity: .72; }
.portal-header { min-height: 82px; padding: 0 max(4vw, calc((100vw - 1320px)/2)); display: flex; align-items: center; justify-content: space-between; gap: 2rem; color: white; background: var(--navy); border-bottom: 1px solid rgba(255,255,255,.08); }
.brand { display: inline-flex; align-items: center; gap: .8rem; font-size: 1.05rem; letter-spacing: .04em; }
.brand-logo { display: block; width: clamp(148px, 13vw, 195px); height: auto; }
.compact-logo { width: 165px; }
.brand b { font-weight: 400; opacity: .68; font-size: .72em; writing-mode: vertical-rl; margin-left: .1rem; }
.brand-mark { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: white; background: linear-gradient(145deg, var(--blue), var(--cyan)); box-shadow: 0 10px 30px rgba(0, 110, 255, .26); }
.brand-mark svg { width: 27px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.header-actions { display: flex; align-items: center; gap: 1.4rem; font-size: .83rem; }
.header-actions > a { padding: .65rem 1rem; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; }
.secure-label { display: inline-flex; align-items: center; gap: .55rem; color: rgba(255,255,255,.58); }
.secure-label i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 5px rgba(72,224,189,.1); }

.auth-view { min-height: calc(100vh - 170px); padding: 6rem max(4vw, calc((100vw - 1200px)/2)); display: grid; grid-template-columns: minmax(0, .88fr) minmax(430px, .72fr); align-items: center; gap: clamp(3rem, 8vw, 8rem); background: radial-gradient(circle at 12% 40%, rgba(8,104,232,.11), transparent 30%), linear-gradient(130deg, #f4f8fb 0%, #fff 100%); }
.eyebrow { margin: 0 0 1.2rem; display: flex; align-items: center; gap: .65rem; color: var(--blue); text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 800; }
.eyebrow span { width: 34px; height: 1px; background: currentColor; }
.auth-intro h1 { max-width: 650px; margin: 0; font-size: clamp(3rem, 5vw, 5.3rem); line-height: .96; letter-spacing: -.06em; }
.auth-intro > p:not(.eyebrow) { max-width: 620px; margin: 1.5rem 0 2.5rem; color: var(--slate); font-size: 1.05rem; }
.auth-intro ul { max-width: 600px; margin: 0; padding: 0; list-style: none; display: grid; gap: .1rem; }
.auth-intro li { padding: 1rem 0; display: grid; grid-template-columns: minmax(150px, .6fr) 1fr; gap: 1rem; border-top: 1px solid var(--line); }
.auth-intro li:last-child { border-bottom: 1px solid var(--line); }
.auth-intro li b { font-size: .9rem; }
.auth-intro li span { color: var(--slate); font-size: .86rem; }

.auth-card { position: relative; padding: 2rem; border: 1px solid rgba(7,20,35,.1); border-radius: 30px; background: white; box-shadow: var(--shadow); }
.demo-badge { position: absolute; top: -13px; right: 24px; padding: .45rem .75rem; border-radius: 999px; color: #075c4b; background: #e7fbf6; border: 1px solid #bfeee1; font-size: .65rem; font-weight: 900; letter-spacing: .09em; }
.auth-tabs { margin-bottom: 1.8rem; padding: .28rem; display: grid; grid-template-columns: 1fr 1fr; border-radius: 14px; background: #edf3f7; }
.auth-tabs button { min-height: 42px; border: 0; border-radius: 11px; color: #617487; background: transparent; cursor: pointer; font-size: .84rem; font-weight: 800; }
.auth-tabs button[aria-selected="true"] { color: var(--ink); background: white; box-shadow: 0 4px 16px rgba(7,20,35,.08); }
.form-heading > span { color: var(--blue); text-transform: uppercase; letter-spacing: .13em; font-size: .68rem; font-weight: 900; }
.form-heading h2 { margin: .25rem 0 .15rem; font-size: 1.65rem; letter-spacing: -.035em; }
.form-heading p { margin: 0 0 1.4rem; color: var(--slate); font-size: .82rem; }
.auth-card form { display: grid; gap: .85rem; }
.auth-card label { display: grid; gap: .35rem; font-size: .76rem; font-weight: 800; }
.auth-card input { width: 100%; min-height: 48px; padding: .75rem .9rem; border: 1px solid #cdd9e2; border-radius: 12px; color: var(--ink); background: #f9fbfc; outline: none; }
.auth-card input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(8,104,232,.1); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.check-field { grid-template-columns: auto 1fr; align-items: start; color: var(--slate); font-weight: 500 !important; line-height: 1.4; }
.check-field input { width: 17px; min-height: 17px; height: 17px; margin-top: .1rem; }
.primary-button { min-height: 50px; border: 0; border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: .8rem; color: white; background: var(--blue); cursor: pointer; font-weight: 800; box-shadow: 0 12px 28px rgba(8,104,232,.22); }
.primary-button:hover { background: #0757c2; }
.quick-access { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); display: grid; gap: .55rem; text-align: center; }
.quick-access span { color: var(--slate); font-size: .7rem; }
.quick-access button { min-height: 42px; border: 1px solid #cbd8e2; border-radius: 999px; color: var(--ink); background: white; cursor: pointer; font-size: .8rem; font-weight: 800; }
.privacy-note { margin: 1rem 0 0; color: #748695; text-align: center; font-size: .68rem; }
.privacy-note span { color: var(--mint); }

.dashboard-view { min-height: calc(100vh - 38px); display: grid; grid-template-columns: 255px minmax(0, 1fr); background: #edf3f7; }
.dashboard-sidebar { min-height: 100%; padding: 2rem 1.25rem; display: flex; flex-direction: column; color: white; background: var(--navy); }
.brand.compact { padding: 0 .65rem; font-size: .88rem; }
.brand.compact .brand-mark { width: 37px; height: 37px; }
.dashboard-sidebar nav { margin-top: 3rem; display: grid; gap: .45rem; }
.dashboard-sidebar nav a { padding: .8rem .9rem; border-radius: 12px; display: flex; gap: .7rem; color: rgba(255,255,255,.54); font-size: .82rem; }
.dashboard-sidebar nav a.active { color: white; background: rgba(8,104,232,.28); }
.dashboard-sidebar nav a span { color: var(--mint); }
.sidebar-help { margin-top: auto; padding: 1rem; border: 1px solid rgba(255,255,255,.1); border-radius: 18px; background: rgba(255,255,255,.05); }
.sidebar-help b { font-size: .8rem; }
.sidebar-help p { margin: .4rem 0 0; color: rgba(255,255,255,.52); font-size: .71rem; }
.dashboard-main { width: 100%; max-width: 1280px; padding: 2rem clamp(1.2rem, 4vw, 4rem) 5rem; }
.dashboard-topbar { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.dashboard-topbar p { margin: 0; color: var(--slate); font-size: .75rem; }
.dashboard-topbar h1 { margin: .1rem 0 0; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.05em; }
.dashboard-account { display: flex; align-items: center; gap: .7rem; }
.account-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: white; background: var(--blue); font-size: .74rem; font-weight: 900; }
.dashboard-account > div { display: grid; }
.dashboard-account b { font-size: .75rem; }
.dashboard-account small { color: var(--slate); font-size: .66rem; }
.dashboard-account button { border: 0; color: var(--blue); background: transparent; cursor: pointer; font-size: .72rem; font-weight: 800; }
.dashboard-demo-alert { margin: 1.8rem 0; padding: .75rem 1rem; border: 1px solid #9fe7d5; border-radius: 13px; display: flex; align-items: center; gap: 1rem; color: #075c4b; background: #e9fbf7; font-size: .74rem; }
.dashboard-demo-alert strong { letter-spacing: .07em; white-space: nowrap; }
.dashboard-demo-alert span { color: #397566; }
.dashboard-summary { margin-bottom: 1.2rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.dashboard-summary article { padding: 1.15rem; border: 1px solid var(--line); border-radius: 19px; display: flex; align-items: center; gap: 1rem; background: white; }
.summary-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-weight: 900; }
.summary-icon.blue { color: white; background: var(--blue); }
.summary-icon.mint { color: #075c4b; background: #dffaf3; }
.summary-icon.pale { color: var(--blue); background: #edf4ff; }
.dashboard-summary strong { display: block; font-size: 1.5rem; line-height: 1; }
.dashboard-summary p { margin: .25rem 0 0; color: var(--slate); font-size: .72rem; }
.documents-panel { padding: 1.6rem; border: 1px solid var(--line); border-radius: 24px; background: white; box-shadow: 0 16px 45px rgba(7,20,35,.05); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.panel-heading p { margin: 0; color: var(--blue); text-transform: uppercase; letter-spacing: .1em; font-size: .64rem; font-weight: 900; }
.panel-heading h2 { margin: .2rem 0 0; font-size: 1.55rem; letter-spacing: -.035em; }
.status-pill { padding: .42rem .7rem; border-radius: 999px; color: #075c4b; background: #e6faf5; font-size: .67rem; font-weight: 800; }
.documents-list { margin-top: 1.3rem; border-top: 1px solid var(--line); }
.documents-list article { min-height: 76px; padding: .8rem 0; display: grid; grid-template-columns: 48px minmax(190px, 1fr) 105px 118px; align-items: center; gap: 1rem; border-bottom: 1px solid var(--line); }
.pdf-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--blue); background: #edf4ff; font-size: .62rem; font-weight: 900; }
.document-info h3 { margin: 0; font-size: .86rem; }
.document-info p { margin: .2rem 0 0; color: var(--slate); font-size: .68rem; }
.document-status { font-size: .7rem; font-weight: 800; }
.document-status.available { color: #087b63; }
.document-status.pending { color: #a96500; }
.download-button { min-height: 38px; padding: .55rem .75rem; border: 1px solid #bed2e3; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; color: var(--blue); background: white; font-size: .7rem; font-weight: 900; }
.download-button:not(:disabled):hover { border-color: var(--blue); }
button.download-button:disabled { color: #8a98a5; background: #edf1f4; cursor: not-allowed; }
.pending-document { opacity: .74; }
.production-note { margin-top: 1.2rem; padding: 1.7rem; border-radius: 24px; display: grid; grid-template-columns: .75fr 1fr; gap: 2rem; color: white; background: linear-gradient(125deg, var(--navy), #0b3150); }
.production-note .eyebrow { margin-bottom: .8rem; color: var(--mint); }
.production-note h2 { margin: 0; font-size: 1.5rem; line-height: 1.15; letter-spacing: -.035em; }
.production-note ul { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: .7rem 1.2rem; }
.production-note li { padding-left: 1rem; position: relative; color: rgba(255,255,255,.68); font-size: .74rem; }
.production-note li::before { content: ""; position: absolute; left: 0; top: .52rem; width: 5px; height: 5px; border-radius: 50%; background: var(--mint); }

.portal-footer { min-height: 50px; padding: .65rem max(4vw, calc((100vw - 1320px)/2)); display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: rgba(255,255,255,.48); background: #030a12; font-size: .7rem; }
.portal-footer a { color: #9ee8ff; font-weight: 800; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: .75rem 1rem; border-radius: 999px; color: white; background: #071423; box-shadow: var(--shadow); font-size: .78rem; }

@media (max-width: 980px) {
  .auth-view { grid-template-columns: 1fr; padding-top: 4rem; }
  .auth-intro h1 { max-width: 760px; }
  .auth-card { max-width: 620px; width: 100%; }
  .dashboard-view { grid-template-columns: 80px minmax(0,1fr); }
  .dashboard-sidebar { padding: 1.4rem .8rem; align-items: center; }
  .brand.compact > span:last-child, .dashboard-sidebar nav a:not(.active) { display: none; }
  .dashboard-sidebar nav a.active { width: 48px; height: 48px; padding: 0; display: grid; place-items: center; }
  .dashboard-sidebar nav a.active { font-size: 0; }
  .dashboard-sidebar nav a.active span { font-size: 1rem; }
  .sidebar-help { display: none; }
  .production-note { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .demo-ribbon { align-items: flex-start; flex-direction: column; gap: 0; padding: .5rem 1rem; }
  .portal-header { min-height: 70px; padding: 0 1rem; }
  .secure-label { display: none; }
  .header-actions > a { padding: .5rem .7rem; font-size: .7rem; }
  .auth-view { min-height: auto; padding: 3.8rem 1rem; gap: 2.5rem; }
  .auth-intro h1 { font-size: clamp(2.6rem, 13vw, 4rem); }
  .auth-intro li { grid-template-columns: 1fr; gap: .2rem; }
  .auth-card { padding: 1.2rem; border-radius: 22px; }
  .field-grid { grid-template-columns: 1fr; }
  .dashboard-view { display: block; }
  .dashboard-sidebar { min-height: auto; padding: .8rem 1rem; flex-direction: row; justify-content: space-between; }
  .dashboard-sidebar nav, .sidebar-help { display: none; }
  .dashboard-main { padding: 1.2rem 1rem 4rem; }
  .dashboard-topbar { align-items: flex-start; }
  .dashboard-account > div { display: none; }
  .dashboard-demo-alert { align-items: flex-start; flex-direction: column; gap: .2rem; }
  .dashboard-summary { grid-template-columns: 1fr; }
  .documents-panel { padding: 1.15rem; border-radius: 20px; }
  .panel-heading { align-items: flex-start; flex-direction: column; }
  .documents-list article { padding: 1rem 0; grid-template-columns: 48px 1fr; gap: .6rem .8rem; }
  .document-status { grid-column: 2; }
  .download-button { grid-column: 2; justify-self: start; }
  .production-note { padding: 1.3rem; }
  .production-note ul { grid-template-columns: 1fr; }
  .portal-footer { align-items: flex-start; flex-direction: column; padding: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
