:root {
  --ink: #132033;
  --muted: #607086;
  --line: #d8e0e8;
  --soft: #f4f7fa;
  --white: #fff;
  --navy-deep: #081d36;
  --navy: #0b2341;
  --navy-light: #173c66;
  --blue: #3e8fc9;
  --blue-light: #66b5e5;
  --blue-soft: #e8f4fb;
  --green: #18794e;
  --green-soft: #e9f7ef;
  --yellow: #a15c00;
  --yellow-soft: #fff4db;
  --red: #b42318;
  --red-soft: #fdecec;
  --shadow: 0 16px 45px rgba(11, 35, 65, .15);
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; color: var(--ink); background: var(--soft); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 264px minmax(0, 1fr); }

.sidebar { position: sticky; top: 0; height: 100vh; padding: 24px 18px 18px; background: var(--navy); color: var(--white); display: flex; flex-direction: column; z-index: 20; }
.brand, .portal-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; color: inherit; text-decoration: none; }
.brand-logo { display: block; height: auto; max-width: 100%; }
.brand .brand-logo { width: 192px; filter: brightness(0) invert(1); }
.brand small, .portal-brand small { padding-left: 2px; color: #9bc9e6; font-size: .69rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.primary-nav { display: grid; gap: 6px; margin-top: 32px; }
.nav-item {
  min-width: 0;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #d2e1ef;
  font-size: .9rem;
  font-weight: 650;
  text-align: left;
}
.nav-item:hover { background: var(--navy-light); color: var(--white); }
.nav-item[aria-current="page"] { border-color: #4a759c; background: #234a72; color: var(--white); }
.nav-item:focus-visible, .sidebar-signout:focus-visible { outline-color: var(--blue-light); }
.nav-icon { width: 21px; color: #d6e8f7; font-size: 1.05rem; }
.nav-count { margin-left: auto; min-width: 22px; height: 22px; border-radius: 11px; display: grid; place-items: center; background: #234870; font-size: .72rem; }
.nav-count.warning { color: var(--navy-deep); background: var(--blue-light); }
.sidebar-spacer { flex: 1; }
.sidebar-card { padding: 18px; border: 1px solid #315478; border-radius: 14px; background: linear-gradient(150deg, var(--navy-light), var(--navy-deep)); }
.sidebar-card .eyebrow { color: #9bc9e6; }
.sidebar-card strong { display: block; margin-top: 7px; line-height: 1.35; }
.sidebar-card p { color: #c4d6e7; font-size: .78rem; line-height: 1.55; }
.sidebar-footer { display: grid; gap: 12px; justify-items: start; padding-top: 18px; margin-top: auto; border-top: 1px solid #315478; }
.sidebar-footer .avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #25476c; font-size: .72rem; }
.sidebar-footer strong, .sidebar-footer small { display: block; }
.sidebar-footer strong { font-size: .8rem; }.sidebar-footer small { margin-top: 2px; color: #b5cce0; font-size: .75rem; overflow-wrap: anywhere; }
.sidebar-signout { border-color: #4a6785; background: transparent; color: #d2e1ef; }
.sidebar-signout:hover { background: var(--navy-light); color: var(--white); }

.main-content { min-width: 0; }
.topbar { min-height: 88px; padding: 18px 30px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.92); backdrop-filter: blur(12px); display: flex; align-items: center; gap: 20px; position: sticky; top: 0; z-index: 15; }
.topbar-title { flex: 1; min-width: 0; }.topbar h1 { margin: 4px 0 0; font-size: 1.25rem; letter-spacing: -.02em; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.eyebrow { color: var(--muted); font-weight: 800; font-size: .68rem; letter-spacing: .13em; }
.automation-pill { display: inline-flex; align-items: center; gap: 8px; color: #46515f; font-size: .76rem; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #2caf83; box-shadow: 0 0 0 4px #daf4ea; }
.content-wrap { max-width: 1500px; margin: 0 auto; padding: 28px 30px 60px; }
.view { display: none; }.view.active { display: block; animation: viewIn .24s ease; }
@keyframes viewIn { from { opacity: 0; transform: translateY(4px); } }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.button-compact { min-height: 40px; padding-inline: 11px; white-space: nowrap; }
:where(button, a, input, select, textarea):focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.button-primary { color: var(--white); background: var(--navy-light); }.button-primary:hover { background: var(--navy); }
.button-secondary { color: var(--navy-light); background: var(--white); border-color: #afbfce; }
.button-secondary:hover { background: var(--blue-soft); border-color: #7899b6; }
.button.sidebar-signout { border-color: #4a6785; }
.button-light { color: var(--ink); background: var(--white); }.button-block { width: 100%; }
.button-white { color: var(--ink); background: var(--white); }.button-ghost-white { color: var(--white); background: transparent; border-color: rgba(255,255,255,.38); }
.text-button, .link-button { border: 0; padding: 0; color: var(--navy-light); background: transparent; font-weight: 750; font-size: .8rem; }

.hero-strip { min-height: 190px; padding: 32px 34px; border-radius: 18px; color: var(--white); background: radial-gradient(ellipse at 92% 5%, rgba(62,143,201,.42), transparent 54%), linear-gradient(145deg, var(--navy-deep), var(--navy-light)); display: flex; align-items: center; gap: 30px; overflow: hidden; }
.hero-strip > div:first-child { max-width: 730px; }.eyebrow.light { color: var(--blue-light); }.hero-strip h2 { margin: 9px 0 8px; font-size: clamp(1.65rem, 3vw, 2.45rem); letter-spacing: -.045em; }.hero-strip p { margin: 0; color: #d6e8f7; line-height: 1.6; }
.hero-actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin: 18px 0 32px; }
.metric-card { min-height: 142px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.metric-card.attention { border-top: 3px solid #e6a329; }.metric-card.danger { border-top: 3px solid var(--red); }
.metric-head { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: .78rem; font-weight: 700; }
.metric-icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: #edf2f7; color: #4d5968; }.metric-icon.good { color: var(--green); background: var(--green-soft); }.metric-icon.warn { color: var(--yellow); background: var(--yellow-soft); }.metric-icon.bad { color: var(--red); background: var(--red-soft); }
.metric-card > strong { display: block; margin: 14px 0 5px; font-size: 2rem; letter-spacing: -.04em; }.metric-card small { color: var(--muted); font-size: .75rem; }.trend-up { color: var(--green); font-weight: 800; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 0 0 14px; }.section-heading.compact { align-items: center; margin-bottom: 22px; }.section-heading.small { align-items: center; margin: 0 0 10px; }.section-heading h2 { margin: 4px 0 0; font-size: 1.25rem; letter-spacing: -.025em; }.section-heading.compact h2 { font-size: 1.65rem; }.section-heading p { color: var(--muted); margin: 7px 0 0; font-size: .85rem; }
.table-card, .queue-card { border: 1px solid var(--line); border-radius: 14px; background: var(--white); overflow: hidden; }
.table-tools { padding: 14px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; }
.removed-filter { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; color: var(--navy-light); font-size: .875rem; white-space: nowrap; }
.removed-filter input { accent-color: var(--navy-light); }
.search-box { width: min(360px, 100%); height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; display: flex; align-items: center; gap: 8px; }.search-box input { width: 100%; border: 0; outline: 0; background: transparent; font-size: .82rem; }
.segmented { padding: 3px; border-radius: 9px; background: #edf2f7; display: flex; }.segmented button { border: 0; border-radius: 7px; padding: 0 12px; background: transparent; color: var(--muted); font-size: .75rem; }.segmented button.active { color: var(--ink); background: var(--white); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.table-scroll { overflow-x: auto; } table { width: 100%; border-collapse: collapse; min-width: 850px; } th { padding: 12px 16px; color: var(--muted); background: #f7f9fc; font-size: .67rem; text-align: left; text-transform: uppercase; letter-spacing: .08em; } td { padding: 15px 16px; border-top: 1px solid #eaf0f6; font-size: .79rem; } tr:hover td { background: #f8fbfd; }.company-cell { display: flex; align-items: center; gap: 10px; }.company-logo { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: #3d4754; background: #edf2f7; font-size: .7rem; font-weight: 900; }.company-cell strong, .company-cell small { display: block; }.company-cell small { color: var(--muted); margin-top: 2px; font-size: .7rem; }.days-cell strong { display: block; }.days-cell small { color: var(--muted); }.row-action { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.status-badge { width: fit-content; display: inline-flex; align-items: center; min-height: 25px; padding: 0 9px; border-radius: 99px; font-size: .66rem; font-weight: 800; white-space: nowrap; }.status-badge.compliant { color: var(--green); background: var(--green-soft); }.status-badge.attention { color: var(--yellow); background: var(--yellow-soft); }.status-badge.expired { color: var(--red); background: var(--red-soft); }.status-badge.neutral { color: #46515f; background: #edf2f7; }.status-badge.draft { color: #667085; background: #edf2f7; }

.company-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }.company-card { border: 1px solid var(--line); border-radius: 14px; background: var(--white); padding: 20px; }.company-card-head { display: flex; gap: 12px; align-items: center; }.company-card-head .company-logo { width: 42px; height: 42px; }.company-card-head > div:nth-child(2) { flex: 1; }.company-card h3 { margin: 0; font-size: .95rem; }.company-card p { color: var(--muted); font-size: .76rem; margin: 4px 0 0; }.company-stats { margin: 18px 0; padding: 14px 0; border-block: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; }.company-stats span { color: var(--muted); font-size: .68rem; }.company-stats strong { display: block; margin-top: 4px; font-size: .82rem; }.company-card .button { width: 100%; }

.automation-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(330px, .8fr); gap: 18px; align-items: start; }.reminder-timeline, .email-preview { border: 1px solid var(--line); border-radius: 14px; background: var(--white); }.reminder-timeline { padding: 8px 20px; }.reminder-timeline article { min-height: 100px; display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); }.reminder-timeline article:last-child { border: 0; }.timeline-day { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-soft); color: var(--navy-light); font-size: .9rem; font-weight: 900; }.timeline-day::after { content: 'd'; font-size: .6rem; margin-left: 1px; }.timeline-day.danger-fill { color: var(--white); background: var(--red); }.reminder-timeline strong { font-size: .84rem; }.reminder-timeline p { color: var(--muted); margin: 5px 0 0; line-height: 1.45; font-size: .75rem; }
.email-preview { overflow: hidden; }.email-preview-head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }.email-meta { padding: 14px 18px; background: #f7f9fc; display: grid; grid-template-columns: 52px 1fr; gap: 7px 10px; font-size: .72rem; }.email-meta span { color: var(--muted); }.email-body { padding: 26px 24px; }.email-logo { width: 156px; }.email-body h3 { margin: 22px 0 10px; font-size: 1.25rem; }.email-body p { color: #5d6774; line-height: 1.6; font-size: .79rem; }.email-body .link-button { display: block; margin: 16px auto 0; }.integration-note { margin: 0; padding: 13px 16px; border-top: 1px solid #f4dfab; color: #6e551c; background: #fff8e6; display: flex; gap: 9px; line-height: 1.4; font-size: .69rem; }.integration-note > span:first-child { flex: 0 0 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: #c48a0a; font-weight: 800; }
.queue-card { margin-top: 18px; padding: 20px; }.last-run { color: var(--muted); font-size: .72rem; }.queue-row { display: grid; grid-template-columns: 1.2fr .9fr .8fr auto; gap: 16px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); font-size: .76rem; }.queue-row strong, .queue-row small { display: block; }.queue-row small { margin-top: 3px; color: var(--muted); }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }.settings-card { padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }.settings-card.span-two { grid-column: 1 / -1; }.settings-card-head { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }.settings-icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; color: var(--navy-light); background: var(--blue-soft); }.settings-card h3 { margin: 0; font-size: .95rem; }.settings-card p { margin: 4px 0 0; color: var(--muted); font-size: .75rem; }.check-row { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }.check-row input { margin-top: 3px; accent-color: var(--navy-light); }.check-row strong, .check-row small { display: block; }.check-row strong { font-size: .8rem; }.check-row small { margin-top: 3px; color: var(--muted); font-size: .7rem; }.connection-box { padding: 14px; margin: 10px 0 14px; border: 1px solid var(--line); border-radius: 10px; display: flex; align-items: center; gap: 10px; }.connection-logo { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: white; background: #1473e6; font-weight: 900; }.connection-box > div { flex: 1; }.connection-box strong, .connection-box small { display: block; }.connection-box strong { font-size: .78rem; }.connection-box small { color: var(--muted); font-size: .68rem; margin-top: 3px; }.fine-print { line-height: 1.5; }.project-list > div { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }.project-code { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 9px; color: #46515f; background: #edf2f7; font-weight: 900; font-size: .7rem; }.project-list strong, .project-list small { display: block; }.project-list strong { font-size: .8rem; }.project-list small { color: var(--muted); margin-top: 3px; font-size: .7rem; }

.drawer-backdrop, .modal-backdrop { position: fixed; inset: 0; background: rgba(8, 29, 54, .6); opacity: 0; visibility: hidden; transition: .22s ease; z-index: 40; }.drawer-backdrop.open, .modal-backdrop.open { opacity: 1; visibility: visible; }.detail-drawer { position: fixed; top: 0; right: 0; width: min(480px, 94vw); height: 100vh; padding: 32px; background: var(--white); transform: translateX(102%); transition: .25s ease; z-index: 45; overflow-y: auto; }.detail-drawer.open { transform: none; }.icon-button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); font-size: 1.25rem; }.drawer-close, .modal-close { position: absolute; top: 18px; right: 18px; z-index: 3; }.drawer-company { display: flex; gap: 14px; align-items: center; margin: 28px 0 26px; }.drawer-company .company-logo { width: 52px; height: 52px; }.drawer-company h2 { margin: 0; font-size: 1.35rem; }.drawer-company p { margin: 4px 0 0; color: var(--muted); font-size: .78rem; }.drawer-summary { padding: 18px; border-radius: 12px; background: var(--soft); display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }.drawer-summary span, .doc-row span { color: var(--muted); font-size: .68rem; }.drawer-summary strong { display: block; margin-top: 4px; font-size: .82rem; }.drawer-section-title { margin: 28px 0 12px; font-size: .84rem; }.doc-row { padding: 13px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; }.doc-row strong { display: block; margin-bottom: 4px; font-size: .78rem; }.drawer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }

.modal-backdrop { display: grid; place-items: center; padding: 24px; }.portal-modal { position: relative; width: min(1040px, 100%); max-height: calc(100vh - 48px); overflow-y: auto; border-radius: 18px; background: var(--white); box-shadow: var(--shadow); }.portal-header { min-height: 76px; padding: 15px 28px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; }.portal-brand .brand-logo { width: 168px; }.portal-brand small { color: var(--navy-light); }.portal-help { margin-right: 46px; text-align: right; }.portal-help span, .portal-help strong { display: block; }.portal-help span { color: var(--muted); font-size: .67rem; }.portal-help strong { margin-top: 3px; font-size: .72rem; }.portal-progress { max-width: 590px; margin: 25px auto 0; padding: 0 30px; display: grid; grid-template-columns: auto 1fr auto 1fr auto; align-items: center; }.portal-progress > div { display: grid; justify-items: center; gap: 4px; color: #8a93a1; }.portal-progress span { width: 30px; height: 30px; border: 2px solid var(--line); border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 800; }.portal-progress small { font-size: .63rem; }.portal-progress div.active, .portal-progress div.complete { color: var(--navy-light); }.portal-progress div.active span, .portal-progress div.complete span { border-color: var(--blue); }.portal-progress div.complete span { color: var(--white); background: var(--navy-light); }.portal-progress i { height: 2px; margin: -16px 10px 0; background: var(--line); }.portal-body { padding: 32px clamp(24px, 6vw, 72px) 44px; }.portal-step { display: none; }.portal-step.active { display: block; animation: viewIn .22s ease; }.portal-step > h2 { margin: 7px 0 8px; font-size: 1.65rem; letter-spacing: -.035em; }.portal-step > p { max-width: 700px; margin: 0 0 24px; color: var(--muted); line-height: 1.55; font-size: .82rem; }.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }.form-grid.single { grid-template-columns: 1fr; }.form-grid label > span, .date-field span { display: block; margin-bottom: 7px; color: #4e5967; font-size: .72rem; font-weight: 750; }.form-grid input, .form-grid select, .form-grid textarea { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; color: var(--ink); background: var(--white); outline: 0; }.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus, .date-field input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }.closeout-choice { width: 100%; margin-top: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: #f7f9fc; display: flex; gap: 12px; text-align: left; align-items: center; }.choice-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #5f6a77; background: #edf2f7; }.closeout-choice span:nth-child(2) { flex: 1; }.closeout-choice strong, .closeout-choice small { display: block; }.closeout-choice strong { font-size: .78rem; }.closeout-choice small { margin-top: 3px; color: var(--muted); font-size: .69rem; }.step-footer { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; }
.upload-list { display: grid; gap: 10px; }.upload-card { min-height: 82px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; display: grid; grid-template-columns: 42px 1fr 120px 145px; gap: 12px; align-items: center; }.upload-card.has-file { border-color: #9fd4bf; background: #f9fdfb; }.upload-icon { width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; color: #5c6674; background: #edf2f7; font-size: .68rem; font-weight: 900; }.upload-copy strong, .upload-copy small { display: block; }.upload-copy strong { font-size: .79rem; }.upload-copy small { color: var(--muted); margin-top: 4px; font-size: .68rem; }.upload-button input { position: absolute; opacity: 0; pointer-events: none; }.upload-button:focus-within span { outline: 2px solid var(--blue); outline-offset: 2px; }.upload-button span { min-height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; display: grid; place-items: center; color: #3f4a57; background: var(--white); font-size: .7rem; font-weight: 750; }.upload-card.has-file .upload-button span { color: var(--green); border-color: #acd8c6; }.date-field input { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; font-size: .7rem; }.date-field span { margin-bottom: 3px; font-size: .62rem; }.review-card { padding: 4px 18px; border: 1px solid var(--line); border-radius: 11px; background: #f7f9fc; }.review-card > div { min-height: 58px; display: grid; grid-template-columns: 130px 1fr; align-items: center; border-bottom: 1px solid var(--line); }.review-card > div:last-child { border: 0; }.review-card span { color: var(--muted); font-size: .7rem; }.review-card strong { font-size: .78rem; }.attestation { margin-top: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; display: flex; align-items: flex-start; gap: 10px; color: #505a68; font-size: .75rem; line-height: 1.45; }.attestation input { margin-top: 2px; accent-color: var(--navy-light); }.success-step { max-width: 620px; margin: 30px auto; text-align: center; }.success-icon { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; color: var(--white); background: var(--green); font-size: 1.65rem; }.success-step > p { margin-inline: auto; }.reference-box { max-width: 320px; margin: 22px auto; padding: 14px; border-radius: 10px; background: var(--soft); }.reference-box span, .reference-box strong { display: block; }.reference-box span { color: var(--muted); font-size: .65rem; }.reference-box strong { margin-top: 5px; letter-spacing: .08em; }
.toast-region { position: fixed; right: 22px; bottom: 22px; z-index: 80; display: grid; gap: 9px; }.toast { min-width: 280px; padding: 14px 16px; border-radius: 10px; color: var(--white); background: var(--navy); box-shadow: var(--shadow); font-size: .78rem; animation: toastIn .25s ease; }.toast strong { display: block; margin-bottom: 3px; }.toast small { color: #d6e8f7; }.toast.error { background: var(--red); }@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

.assignments-table { min-width: 0; }
.assignment-contact, .assignment-project { overflow-wrap: anywhere; }
.assignment-action { text-align: right; }
.assignment-expiration-label { display: none; }

@media (max-width: 1020px) {
  .assignments-table, .assignments-table tbody { display: block; }
  .assignments-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .assignments-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 12px;
    padding: 14px 16px;
  }
  .assignments-table tbody tr + tr { border-top: 1px solid var(--line); }
  .assignments-table td { display: block; min-width: 0; padding: 0; border: 0; background: transparent; }
  .assignment-contact { grid-area: 1 / 1; }
  .assignment-action { grid-area: 1 / 2; justify-self: end; }
  .assignment-project, .assignment-empty { grid-column: 1 / -1; }
  .assignment-status { justify-self: start; }
  .assignment-expiration { text-align: right; }
  .assignment-expiration-label { display: block; color: var(--muted); font-size: .75rem; }
}
@media (max-width: 1120px) {
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .company-grid { grid-template-columns: 1fr 1fr; }
  .automation-layout { grid-template-columns: 1fr; }
  .upload-card { grid-template-columns: 42px 1fr 120px; }.upload-card .date-field { grid-column: 2 / 4; }
}
@media (max-width: 820px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    display: grid;
    grid-template: "brand account" auto "navigation navigation" auto / minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px 16px;
    height: auto;
    padding: 12px 18px;
  }
  .sidebar .brand { grid-area: brand; }
  .sidebar .brand-logo { width: 134px; }
  .brand small { font-size: .625rem; letter-spacing: .09em; }
  .primary-nav {
    grid-area: navigation;
    grid-template-columns: auto auto minmax(0, 1fr);
    margin-top: 0;
  }
  .nav-item { padding-inline: 10px; border-color: #315478; text-align: center; }
  .sidebar-footer { grid-area: account; margin-top: 0; padding-top: 0; border: 0; }
  .sidebar-identity { display: none; }
  .topbar { position: static; min-height: 74px; padding: 14px 18px; gap: 12px; }
  .automation-pill { display: none; }.content-wrap { padding: 20px 18px 48px; }.hero-strip { align-items: flex-start; flex-direction: column; }.hero-actions { margin-left: 0; }.company-grid { grid-template-columns: 1fr; }.settings-grid { grid-template-columns: 1fr; }.settings-card.span-two { grid-column: auto; }.portal-header { padding-left: 20px; }.portal-help { display: none; }.queue-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 590px) {
  .topbar-actions .button { display: none; }.metric-grid { grid-template-columns: 1fr; }.table-tools, .section-heading, .section-heading.compact { align-items: stretch; flex-direction: column; }.segmented { min-height: 38px; }.segmented button { flex: 1; }.form-grid { grid-template-columns: 1fr; }.portal-modal { max-height: 100vh; height: 100vh; border-radius: 0; }.modal-backdrop { padding: 0; }.portal-body { padding: 28px 20px 40px; }.upload-card { grid-template-columns: 42px 1fr; }.upload-card .upload-button, .upload-card .date-field { grid-column: 1 / -1; }.portal-progress { padding: 0 24px; }.drawer-actions { grid-template-columns: 1fr; }.queue-row { grid-template-columns: 1fr; }.reminder-timeline article { grid-template-columns: 46px 1fr; padding: 14px 0; }.reminder-timeline .status-badge { grid-column: 2; }.portal-step > h2 { font-size: 1.35rem; }
}

[hidden] { display: none !important; }
.portal-page { width: min(760px, 100%); margin: 0 auto; padding: clamp(20px, 5vw, 54px); }
.portal-page > .brand-logo { margin-bottom: 32px; }
.portal-page h1 { margin: 8px 0; font-size: clamp(1.6rem, 5vw, 2.25rem); }
.portal-page h2, .record-dialog h2 { margin: 0 0 8px; font-size: 1.25rem; }
.portal-page p, .record-dialog p, .settings-card p { color: var(--muted); font-size: .92rem; line-height: 1.55; }
.portal-page .eyebrow { color: var(--navy-light); font-size: .75rem; }
.portal-page .settings-card, .requirement { margin-top: 16px; }
.record-dialog { position: relative; width: min(540px, calc(100% - 32px)); max-height: 90dvh; padding: 24px; color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.record-dialog.wide { width: min(760px, calc(100% - 32px)); }
.record-dialog::backdrop { background: rgba(8, 29, 54, .6); }
.record-dialog > h2 { padding-right: 40px; }
.dialog-close { position: absolute; top: 18px; right: 18px; }
.portal-form { display: grid; gap: 12px; margin-top: 16px; }
.portal-form label, .record-dialog label { display: grid; gap: 6px; color: var(--ink); font-size: .9rem; font-weight: 650; }
.portal-form input:not([type="checkbox"]), .portal-form textarea, .record-dialog input[type="url"] { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--white); }
.portal-form textarea { resize: vertical; }
.portal-form .checkbox-field { display: flex; align-items: flex-start; gap: 9px; font-weight: 500; }
.checkbox-field input { margin: 3px 0 0; accent-color: var(--navy-light); }
.portal-form fieldset { display: grid; min-width: 0; gap: 8px; padding: 10px 12px 12px; border: 1px solid var(--line); border-radius: 8px; }
.portal-form > .button { justify-self: start; }
.button:disabled { cursor: wait; opacity: .65; }
.record-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.file-record { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.file-record a { color: var(--navy-light); overflow-wrap: anywhere; }
.page-message, .portal-page .page-message, .record-dialog .page-message { padding: 10px 14px; border-radius: 8px; color: var(--navy); background: var(--blue-soft); }
.page-message.error-message, .portal-page .error-message, .record-dialog .error-message { color: var(--red); background: var(--red-soft); }
.auth-page { max-width: 560px; }
.auth-switch { justify-self: start; }
.account-links { display: flex; justify-content: space-between; align-items: center; margin: 0 0 16px; }
.account-links a, .project-card-link { color: var(--navy-light); font-size: .9rem; font-weight: 750; }
.file-record time { display: block; margin-top: 4px; color: var(--muted); font-size: .875rem; }
.directory-view { width: 100%; max-width: 1110px; }
.directory-scope {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-bottom: 14px;
  padding: 12px 16px;
  border: 1px solid #b7d0e4;
  border-left: 4px solid var(--navy-light);
  border-radius: 10px;
  background: #eaf3fb;
}
.directory-picker {
  display: grid;
  gap: 5px;
  width: min(100%, 310px);
  color: var(--navy-light);
  font-size: .78rem;
  font-weight: 750;
}
.directory-picker select {
  min-height: 42px;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid #8facca;
  border-radius: 7px;
  background: var(--white);
  color: var(--navy);
  font-size: 1rem;
  font-weight: 750;
}
.directory-scope p { margin: 0 0 10px; color: var(--navy-light); font-size: .83rem; }
.directory-status { margin: 0 0 12px; }
.directory-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 12px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
}
.directory-toolbar .search-box { flex: 1 1 245px; max-width: 380px; }
.directory-toolbar-end { justify-content: flex-end; }
.directory-toolbar-actions, .directory-row-controls { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.directory-toolbar .button { min-height: 36px; }
.directory-list { table-layout: fixed; }
.directory-list th { padding: 8px 12px; }
.directory-list td { padding: 6px 12px; line-height: 1.35; overflow-wrap: anywhere; }
.directory-list th:nth-child(1) { width: 25%; }
.directory-list th:nth-child(2) { width: 32%; }
.directory-contacts th:nth-child(4) { width: 205px; }
.directory-roster th:nth-child(4) { width: 146px; }
.directory-company { color: var(--navy); font-weight: 700; }
.directory-email { display: block; margin-top: 2px; color: var(--muted); font-size: .75rem; }
.directory-trade, .directory-sent { color: #51647a; }
.directory-actions { text-align: right; }
.directory-row-button { min-height: 32px; padding: 4px 8px; white-space: nowrap; font-size: .745rem; }
.directory-list td.directory-empty { color: var(--muted); padding: 15px 12px; }
.directory-list-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  min-height: 45px;
  padding: 5px 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .75rem;
}
.directory-list-footer .button { min-height: 34px; }
.directory-dialog-project {
  padding: 8px 12px;
  border: 1px solid #b7d0e4;
  border-radius: 7px;
  background: var(--blue-soft);
  color: var(--navy);
  font-weight: 750;
}
#directoryFields { display: grid; gap: .7rem; }

@media (max-width: 1020px) {
  .directory-list tbody tr { gap: 5px 10px; padding: 9px 12px; }
  .directory-list td { padding: 0; }
  .directory-list tbody tr > td:nth-child(2) { grid-area: 2 / 1; }
  .directory-list .directory-actions { grid-area: 1 / 2 / span 2; }
  .directory-list .directory-empty { grid-column: 1 / -1; }
}

@media (max-width: 540px) {
  .directory-scope { align-items: start; }
  .directory-scope p { margin: 0; }
  .directory-list tbody tr { grid-template-columns: minmax(0, 1fr); }
  .directory-list .directory-actions { grid-area: auto; text-align: left; }
  .directory-row-controls { justify-content: flex-start; }
  .directory-row-button { min-height: 40px; }
}
