:root {
  --navy: #172533;
  --navy-2: #223747;
  --ink: #111b25;
  --muted: #65717b;
  --paper: #f3f4f3;
  --line: #dfe3e4;
  --amber: #e99a28;
  --amber-dark: #b96b08;
  --danger: #ba3d32;
  font-family: "Segoe UI", Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: var(--navy); }
body { min-height: 100vh; margin: 0; background: var(--paper); -webkit-font-smoothing: antialiased; }
a { -webkit-tap-highlight-color: transparent; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; transform: translateY(-160%); padding: 10px 14px; color: var(--ink); background: white; }
.skip-link:focus { transform: none; }

.topbar { display: flex; align-items: center; justify-content: space-between; height: calc(66px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 20px 0; color: white; background: var(--navy); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: white; text-decoration: none; }
.brand-mark { display: grid; grid-template-columns: 5px 5px; gap: 5px; width: 15px; height: 32px; transform: skewY(-28deg); }
.brand-mark i:first-child { background: var(--amber); }
.brand-mark i:last-child { background: rgba(255,255,255,.58); }
.brand-name { font-size: 20px; font-weight: 300; letter-spacing: .09em; }
.brand-name b { color: #dfe4e7; font-weight: 700; }
.logout-button { min-height: 39px; padding: 10px 15px; color: white; border: 1px solid rgba(255,255,255,.24); border-radius: 3px; text-decoration: none; font-size: 12px; font-weight: 700; }

.page-shell { width: min(100% - 32px, 920px); min-height: calc(100vh - 150px); margin: auto; padding: clamp(44px,8vw,88px) 0 70px; }
.page-heading { max-width: 690px; margin-bottom: 35px; }
.eyebrow { margin: 0 0 8px; color: var(--amber-dark); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: clamp(40px,8vw,66px); line-height: .98; letter-spacing: -.05em; }
.page-heading > p:last-child { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.55; }
.status-banner { margin-bottom: 18px; padding: 14px 16px; color: #73352f; background: #fae8e6; border: 1px solid #e8b9b4; }
.login-state { max-width: 650px; margin: 0 auto; padding: clamp(28px,6vw,48px); background: white; border: 1px solid var(--line); border-top: 5px solid var(--amber); box-shadow: 0 20px 60px rgba(20,37,51,.12); text-align: center; }
.login-state > span { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 20px; color: white; background: var(--navy-2); border-radius: 50%; font-size: 17px; font-weight: 800; }
.login-state h2 { margin-bottom: 10px; color: var(--ink); font-size: clamp(25px,6vw,34px); }
.login-state p { max-width: 500px; margin: 0 auto 24px; line-height: 1.55; }
.login-state small { display: block; margin-top: 18px; line-height: 1.45; }
.login-provider-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.login-provider-actions a { display: grid; place-items: center; min-height: 50px; padding: 0 18px; border: 1px solid transparent; border-radius: 3px; text-decoration: none; font-weight: 750; }
.login-primary { color: #171c20; background: var(--amber); }
.login-secondary { color: var(--ink); background: white; border-color: #cfd5d7 !important; }

.company-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.company-card { position: relative; display: grid; grid-template-columns: 50px minmax(0,1fr) auto; align-items: center; gap: 16px; min-height: 132px; padding: 21px; overflow: hidden; color: inherit; background: white; border: 1px solid var(--line); border-left: 5px solid var(--amber); border-radius: 5px; box-shadow: 0 10px 32px rgba(21,38,51,.07); text-decoration: none; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.company-card:hover { transform: translateY(-2px); border-color: #c8ced0; box-shadow: 0 15px 38px rgba(21,38,51,.12); }
.company-card:focus-visible { outline: 3px solid rgba(233,154,40,.5); outline-offset: 3px; }
.company-symbol { display: grid; place-items: center; width: 50px; height: 50px; color: white; background: var(--navy-2); border-radius: 50%; font-size: 17px; font-weight: 800; }
.company-copy { min-width: 0; }
.company-copy strong, .company-copy small { display: block; }
.company-copy strong { overflow: hidden; margin-bottom: 7px; font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }
.company-copy small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.company-environment { display: inline-block; margin-top: 10px; padding: 5px 8px; color: var(--navy-2); background: #edf0f1; border-radius: 16px; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.company-environment.client { color: #205b43; background: #e7f4ed; }
.company-arrow { color: var(--navy-2); font-size: 28px; }
.company-skeleton { height: 132px; border-radius: 5px; background: linear-gradient(90deg,#e5e8e8 25%,#f7f8f8 40%,#e5e8e8 65%); background-size: 400% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -100% 0; } }

.empty-state { padding: 50px 24px; color: var(--muted); background: white; border: 1px solid var(--line); text-align: center; }
.empty-state > span { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 17px; color: var(--danger); border: 1px solid #ddb5b1; border-radius: 50%; font-size: 24px; font-weight: 800; }
.empty-state h2 { margin-bottom: 8px; color: var(--ink); }
.empty-state p { max-width: 520px; margin: 0 auto 20px; line-height: 1.55; }
.empty-state a { color: var(--navy-2); font-weight: 750; }
.page-footer { min-height: 84px; padding: 25px 20px calc(25px + env(safe-area-inset-bottom)); color: #7a858d; background: white; border-top: 1px solid var(--line); text-align: center; font-size: 11px; }
.page-footer span { display: block; }
.page-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-top: 10px; }
.page-footer a { color: var(--navy-2); font-weight: 700; }

@media (max-width: 700px) {
  .topbar { padding-right: 16px; padding-left: 16px; }
  .page-shell { width: min(100% - 28px, 920px); padding-top: 44px; }
  .company-list { grid-template-columns: 1fr; }
  .company-card { min-height: 116px; padding: 17px; }
  .company-copy strong { white-space: normal; }
  .login-provider-actions { grid-template-columns: 1fr; }
}

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