body { line-height: 1.6; }
a { color: var(--troll-blue); }
button, input, select, textarea { font: inherit; }
button, input[type="submit"] { cursor: pointer; }
:focus-visible { outline: 3px solid var(--troll-blue-light); outline-offset: 3px; }
h1, h2, h3 { color: var(--troll-blue); line-height: 1.2; letter-spacing: -.035em; }
h1 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.5rem); }
h2 { font-size: 1.25rem; margin: 0 0 1rem; }
h3 { font-size: 1.15rem; }
p { margin-top: 0; }
.muted, .field-hint { color: var(--muted); }
.small, .field-hint { font-size: .82rem; }
.eyebrow, .step-label { color: var(--troll-blue-secondary); font-size: .72rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow { margin: 0 0 .7rem; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: .5rem; padding: .75rem 1.3rem; border: 1px solid transparent; border-radius: .5rem; background: var(--troll-blue); color: white; font-size: .9rem; font-weight: 650; text-decoration: none; line-height: 1.4; min-height: 44px; }
.button:hover { background: var(--troll-blue-secondary); }
.button-small { padding: .5rem .8rem; font-size: .8rem; }
.button-quiet { background: transparent; border-color: var(--border); color: var(--troll-blue); }
.button-quiet:hover { background: var(--surface); }
.button-white { background: white; color: var(--troll-blue); white-space: nowrap; }
.button-white:hover { background: #eaf5fd; }
.full-width { width: 100%; }
.text-link { font-size: .88rem; font-weight: 650; text-underline-offset: 4px; }
label { display: block; margin-bottom: .4rem; font-size: .85rem; font-weight: 600; }
input:not([type="submit"]):not([type="hidden"]), select, textarea { width: 100%; min-height: 46px; border: 1px solid #c7cfda; border-radius: .45rem; padding: .65rem .8rem; color: var(--text); background: white; }
input::placeholder { color: #747e90; }
.field-hint { margin: .5rem 0 1.3rem; }
.flash { padding: 1rem 1.3rem; background: #e8f4ee; border: 1px solid #abd3bf; border-radius: .5rem; margin: 1rem; color: #20533b; }
.flash-alert { color: #8b2837; background: #fff1f3; border-color: #e8bac2; }
.workspace .flash, .form-card .flash { margin: 0 0 1.5rem; }
.landing-page { min-height: 100dvh; background: linear-gradient(145deg, #1e3876, #2853b9); }
.landing-card { border-top: 5px solid var(--troll-blue-light); }
.landing-card h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
.landing-card .compact-title { font-size: 2rem; margin-bottom: 1rem; }
.landing-card .button + p { margin-top: 1.5rem; }
.auth-page { min-height: 100dvh; display: grid; grid-template-columns: 1fr 1fr; background: white; }
.auth-story { display: flex; flex-direction: column; justify-content: space-between; padding: clamp(2rem, 5vw, 5rem); background: radial-gradient(ellipse at 90% 100%, #2853b9 0, transparent 60%), #1e3876; color: white; }
.auth-story h1 { color: white; font-size: clamp(2.8rem, 5vw, 5rem); }
.auth-story .eyebrow { color: #b9e3ff; }
.auth-story .lead { color: #d4def1; }
.logo-plate { background: white; padding: .9rem 1.2rem; border-radius: .5rem; align-self: flex-start; margin-bottom: 4rem; }
.logo-plate .brand-logo { width: 10rem; margin: 0; }
.auth-footnote { letter-spacing: .2em; font-size: .7rem; margin: 3rem 0 0; color: #b9cbed; }
.auth-form-section { display: grid; place-items: center; padding: 3rem 2rem; }
.auth-form { width: min(25rem, 100%); }
.auth-form h2 { font-size: 2rem; margin: 1rem 0; }
.auth-form form { margin-top: 2rem; }
.auth-note { font-size: .85rem; color: var(--muted); border-top: 1px solid var(--border); padding-top: 1.5rem; margin-top: 2rem; }
.dev-note { padding: 1rem; font-size: .78rem; color: #38516e; background: #eef6fc; border-radius: .4rem; overflow-wrap: anywhere; margin-top: 1.5rem; }
.otp-input { font-size: 1.8rem; letter-spacing: .4em; margin-bottom: 1rem; }
.portal-shell { display: flex; min-height: 100dvh; }
.sidebar { flex: 0 0 250px; width: 250px; background: var(--troll-blue); color: white; padding: 2rem 1.2rem; display: flex; flex-direction: column; }
.sidebar-brand { display: block; text-decoration: none; color: white; padding: 0 .8rem; margin-bottom: 3rem; }
.sidebar-brand img { display: block; background: white; padding: .6rem .8rem; width: 150px; border-radius: .35rem; margin-bottom: 1rem; }
.sidebar-brand > span { font-size: 1.65rem; font-weight: 750; letter-spacing: -.06em; }
.brand-dot { color: var(--troll-blue-light); }
.nav-label { font-size: .63rem; letter-spacing: .15em; color: #b1c6e9; padding: 0 .8rem; margin: 1.5rem 0 .7rem; }
.nav-link { display: block; color: #dce6f7; text-decoration: none; padding: .85rem .8rem; border-radius: .45rem; margin: .2rem 0; font-size: .88rem; }
.nav-link:hover, .nav-link.is-active { background: #ffffff15; color: white; }
.nav-link.is-active { box-shadow: inset 3px 0 var(--troll-blue-light); }
.sidebar-bottom { margin-top: auto; padding: 3rem .8rem 0; font-size: .75rem; color: #c5d6ef; }
.sidebar-bottom .small { display: block; margin-top: .4rem; }
.status-dot { display: inline-block; width: 7px; height: 7px; background: var(--troll-blue-light); border-radius: 50%; margin-right: .4rem; }
.portal-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 2.5rem; border-bottom: 1px solid var(--border); background: white; }
.organization-switch, .locale-switch { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.organization-switch select { max-width: 300px; font-size: .85rem; }
.locale-switch { margin-bottom: 1rem; }
.topbar .locale-switch { margin-bottom: 0; }
.locale-switch select { width: auto; font-size: .8rem; }
.account-menu { display: flex; align-items: center; gap: .75rem; font-size: .83rem; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #ebf2fc; color: var(--troll-blue); font-weight: 700; }
.workspace { padding: 2.5rem; max-width: 1480px; width: 100%; margin: 0 auto; flex: 1; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; margin: .5rem 0 2rem; }
.page-heading p.muted { margin: .65rem 0 0; }
.date-label { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.welcome-banner { background: var(--troll-blue); color: #dce7fb; border-radius: .8rem; padding: 2rem; display: flex; justify-content: space-between; align-items: center; gap: 2rem; border-left: 5px solid var(--troll-blue-light); }
.welcome-banner h2 { color: white; font-size: 1.6rem; }
.welcome-banner .eyebrow { color: #b9e3ff; }
.welcome-banner p:last-child { margin-bottom: 0; }
.card { background: white; border: 1px solid var(--border); border-radius: .7rem; padding: 1.5rem; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin: 1.5rem 0 2.5rem; }
.stat { display: flex; flex-direction: column; }
.stat > span { font-size: .85rem; color: var(--muted); }
.stat strong { font-size: 2.4rem; letter-spacing: -.05em; color: var(--troll-blue); padding: .4rem 0; }
.stat small { color: var(--muted); font-size: .75rem; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1.8rem 0 1rem; }
.section-heading h2 { margin: 0; }
.action-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.action-card { text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.action-card:hover { border-color: var(--troll-blue-light); box-shadow: 0 5px 20px #1e38760d; }
.action-card p { color: var(--muted); font-size: .9rem; }
.tile-icon { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: .4rem; background: #ebf4fc; color: var(--troll-blue); font-size: .8rem; font-weight: 700; }
.roadmap { margin-top: 1.5rem; border-style: dashed; background: transparent; }
.roadmap h2 { margin-top: .8rem; }
.roadmap p { color: var(--muted); font-size: .9rem; margin-bottom: .5rem; }
.badge { display: inline-flex; border-radius: 5px; padding: .25rem .6rem; color: #455570; background: #edf1f6; font-size: .72rem; font-weight: 650; white-space: nowrap; }
.badge-active { background: #e9f5ef; color: #236144; }
.badge-pending { background: #fff4db; color: #7c560b; }
.badge-inactive, .badge-ended { background: #f0f1f4; color: #5c6373; }
.details-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin: 1.5rem 0 0; }
dt { color: var(--muted); font-size: .8rem; margin-bottom: .3rem; }
dd { margin: 0; font-size: .95rem; overflow-wrap: anywhere; }
.employment-card { margin-bottom: 1rem; }
.employee-history { margin-top: 1.5rem; }
.employee-history > h2 { margin-top: 0; }
.history-timeline { list-style: none; padding: 0 0 0 .6rem; margin: 1.5rem 0 0; }
.history-event { position: relative; border-left: 2px solid var(--border); padding: 0 0 1.8rem 1.4rem; overflow-wrap: anywhere; }
.history-event:last-child { padding-bottom: .3rem; }
.history-event::before { content: ""; position: absolute; left: -6px; top: .35rem; width: 10px; height: 10px; border-radius: 50%; background: var(--link); box-shadow: 0 0 0 4px var(--panel); }
.history-event-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; align-items: baseline; }
.history-event-heading h3 { font-size: 1rem; margin: 0; }
.history-event-heading time, .history-actor, .history-before { color: var(--muted); }
.history-event-heading time, .history-actor { font-size: .8rem; }
.history-actor { margin: .5rem 0; }
.history-reason { white-space: pre-wrap; background: var(--soft); padding: .8rem 1rem; border-radius: .4rem; font-size: .9rem; }
.history-changes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 1rem; }
.employment-card .section-heading { margin-top: 0; }
.directory-card { padding: 0; overflow: hidden; }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem; padding: 1.5rem; }
.search-field { flex: 1; min-width: 220px; }
.filters .text-link { padding-bottom: .7rem; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: .85rem; }
th { background: #f8fafc; color: var(--muted); font-size: .72rem; font-weight: 600; letter-spacing: .02em; white-space: nowrap; }
th, td { padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); }
tbody tr:hover { background: #fafcff; }
.person-link { font-weight: 650; text-decoration: none; }
.person-link:hover { text-decoration: underline; }
.table-subtitle { display: block; font-size: .72rem; color: var(--muted); margin-top: .25rem; }
.pagination { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding: 1.2rem 1.5rem; font-size: .8rem; color: var(--muted); }
.pagination > div { display: flex; gap: 1.5rem; }
.form-card { max-width: 900px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-bottom: 2rem; }
.form-actions { display: flex; align-items: center; gap: 1.5rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.record-list { list-style: none; padding: 0; margin: 0; }
.record-list li { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.record-list li:last-child { border-bottom: 0; }
.record-list span { display: block; margin-top: .3rem; }
.record-list strong { font-size: .9rem; }
.structure-columns { align-items: start; }
.structure-columns .card { min-width: 0; }
.structure-heading, .structure-record { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.structure-heading h2 { margin: 0; }
.structure-record > div { min-width: 0; overflow-wrap: anywhere; }
.empty-state { padding: 3rem; text-align: center; }
.empty-state h1 { font-size: 1.8rem; margin-bottom: 1rem; }
.workspace-footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 2.5rem; color: var(--muted); font-size: .72rem; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link:focus { display: block; padding: 1rem; background: white; }
@media (max-width: 1100px) {
  .sidebar { flex-basis: 215px; width: 215px; }
  .workspace { padding: 1.5rem; }
  .topbar { padding: 1rem 1.5rem; }
  .account-name { display: none; }
}
@media (max-width: 760px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-story { padding: 1.5rem; }
  .auth-story h1 { font-size: 2.4rem; }
  .auth-story .lead, .auth-footnote { display: none; }
  .logo-plate { margin-bottom: 1.5rem; }
  .auth-form-section { padding: 2rem 1.5rem; }
  .portal-shell { display: block; }
  .sidebar { width: 100%; padding: 1rem; }
  .sidebar-brand { display: flex; align-items: center; gap: 1rem; margin: 0 0 1rem; }
  .sidebar-brand img { width: 115px; margin: 0; }
  .sidebar-brand > span { font-size: 1.3rem; }
  .sidebar nav { display: flex; flex-wrap: wrap; gap: .3rem; }
  .nav-link { padding: .6rem .8rem; font-size: .8rem; }
  .sidebar .nav-label, .sidebar-bottom { display: none; }
  .topbar { padding: .8rem 1rem; }
  .organization-switch { flex: 1 0 100%; }
  .organization-switch select { max-width: none; min-width: 0; flex: 1; }
  .account-menu .avatar { display: none; }
  .workspace { padding: 1.5rem 1rem; }
  .page-heading { flex-direction: column; align-items: flex-start; gap: .8rem; }
  .date-label { display: none; }
  .welcome-banner { flex-direction: column; align-items: flex-start; padding: 1.5rem; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat { display: grid; grid-template-columns: 1fr auto; align-items: center; }
  .stat strong { grid-row: span 2; font-size: 2rem; }
  .stat small { grid-column: 1; }
  .form-grid, .two-columns { grid-template-columns: 1fr; }
  .section-heading > .small { display: none; }
  .workspace-footer { padding: 1rem; flex-wrap: wrap; }
  .landing-page { padding: 1rem; }
  .filters > div { width: 100%; }
}
.organization-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--heading); }
