:root {
  color-scheme: light;
  --navy: #0d172a;
  --navy-soft: #17243d;
  --ink: #111c30;
  --muted: #68748a;
  --line: #dfe5ef;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --background: #f5f7fb;
  --primary: #2868e8;
  --primary-soft: #eaf1ff;
  --green: #11865d;
  --green-soft: #e9f8f1;
  --amber: #a96508;
  --amber-soft: #fff3dc;
  --red: #bd3d4a;
  --red-soft: #fff0f1;
  --violet: #6854d9;
  --shadow: 0 14px 34px rgba(21, 39, 72, 0.07);
  --line-strong: #b9c7dc;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--ink); }
button, select, input { font: inherit; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(40,104,232,.34);
  outline-offset: 2px;
}

.portal-layout { display: grid; grid-template-columns: 258px minmax(0, 1fr); min-height: 100vh; }
.portal-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100vh;
  padding: 20px 14px;
  overflow-y: auto;
  color: #fff;
  background: radial-gradient(circle at 12% 0%, rgba(42, 104, 232, .24), transparent 29%), var(--navy);
}
.portal-brand, .signer-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.portal-brand > span:last-child, .signer-brand > span:last-child { display: grid; gap: 3px; }
.portal-brand strong, .signer-brand strong { font-size: 14px; }
.portal-brand small { color: rgba(255,255,255,.55); }
.brand-mark { display: grid; place-items: center; width: 46px; height: 46px; flex: 0 0 auto; border-radius: 13px; background: #fff; color: var(--navy); font-size: 13px; font-weight: 900; box-shadow: 0 8px 24px rgba(0,0,0,.16); }
.brand-mark.dark { background: var(--navy); color: #8fb2ff; box-shadow: none; }
.workspace-switcher { display: grid; gap: 5px; padding: 14px; border: 1px solid rgba(153,174,211,.16); border-radius: 13px; background: rgba(255,255,255,.045); }
.workspace-switcher small { color: rgba(255,255,255,.45); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.workspace-switcher strong { font-size: 13px; }
.workspace-switcher span { color: #86abf8; font-size: 11px; }
.sidebar-nav { display: grid; gap: 6px; padding-top: 7px; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-nav a { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; min-height: 45px; padding: 7px 11px; border-radius: 10px; color: rgba(255,255,255,.7); font-size: 12px; font-weight: 650; text-decoration: none; transition: .16s ease; }
.sidebar-nav a:hover, .sidebar-nav a.active { color: #fff; background: var(--navy-soft); }
.sidebar-nav i { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 7px; background: rgba(255,255,255,.06); color: #91b4ff; font-size: 9px; font-style: normal; font-weight: 800; }
.sidebar-nav a.active i { color: #fff; background: var(--primary); }
.sidebar-nav b { min-width: 22px; padding: 3px 6px; border-radius: 999px; background: rgba(255,255,255,.08); font-size: 9px; text-align: center; }
.sidebar-security { display: flex; align-items: center; gap: 11px; margin-top: auto; padding: 13px; border: 1px solid rgba(153,174,211,.13); border-radius: 12px; }
.sidebar-security div { display: grid; gap: 4px; }
.sidebar-security strong { font-size: 11px; }
.sidebar-security small { color: rgba(255,255,255,.48); font-size: 9px; }
.online-dot { display: inline-block; width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #45d39d; box-shadow: 0 0 0 4px rgba(69,211,157,.13); }

.portal-main { display: grid; align-content: start; gap: 20px; width: 100%; max-width: 1560px; margin: 0 auto; padding: 28px 32px 40px; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; }
.breadcrumbs, .back-link { color: var(--primary); font-size: 11px; font-weight: 750; text-decoration: none; }
.page-header h1 { margin: 7px 0 5px; font-size: clamp(25px, 3vw, 35px); letter-spacing: -.04em; }
.page-header p { margin: 0; color: var(--muted); font-size: 13px; }
.header-actions { display: flex; gap: 9px; }
.primary-button, .secondary-button { min-height: 42px; padding: 0 16px; border-radius: 10px; cursor: pointer; font-weight: 750; }
.primary-button { border: 1px solid var(--primary); background: var(--primary); color: #fff; box-shadow: 0 8px 18px rgba(40,104,232,.18); }
.primary-button:hover { background: #205bd0; }
.primary-button:disabled { border-color: #c4ccda; background: #c4ccda; box-shadow: none; cursor: not-allowed; }
.secondary-button { border: 1px solid var(--line); background: var(--surface); color: #40506a; }
.secondary-button:hover { border-color: #b9c6d9; background: #fafcff; }

.welcome-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 28px; min-height: 185px; padding: 30px 34px; overflow: hidden; border-radius: 20px; color: #fff; background: radial-gradient(circle at 90% 0%, rgba(74,132,255,.34), transparent 35%), linear-gradient(135deg,#13233f,#172b50 56%,#173a70); box-shadow: 0 18px 42px rgba(21,43,83,.16); }
.section-label { color: #70809b; font-size: 10px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.welcome-card .section-label { color: #8fb3ff; }
.welcome-card h2 { max-width: 680px; margin: 10px 0 9px; font-size: clamp(25px,3.3vw,42px); line-height: 1.08; letter-spacing: -.045em; }
.welcome-card p { margin: 0; color: rgba(255,255,255,.67); font-size: 13px; }
.welcome-score { display: grid; place-items: center; align-content: center; width: 132px; height: 132px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; background: rgba(255,255,255,.06); }
.welcome-score strong { font-size: 30px; }
.welcome-score span { color: rgba(255,255,255,.57); font-size: 9px; }

.metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; }
.metric-grid article { display: grid; grid-template-columns: auto 1fr; gap: 7px 12px; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow); }
.metric-icon { display: grid; grid-row: 1 / 4; place-items: center; align-self: start; width: 40px; height: 40px; border-radius: 11px; font-size: 9px; font-weight: 900; }
.metric-icon.blue { color: var(--primary); background: var(--primary-soft); }
.metric-icon.amber { color: var(--amber); background: var(--amber-soft); }
.metric-icon.green { color: var(--green); background: var(--green-soft); }
.metric-icon.violet { color: var(--violet); background: #f0edff; }
.metric-grid small { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.metric-grid strong { font-size: 24px; }
.metric-grid em { color: var(--muted); font-size: 10px; font-style: normal; }

.content-card, .progress-card, .document-preview-card, .detail-card, .signer-document, .sign-action-card { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.content-card { overflow: hidden; }
.dashboard-message { margin: 0; padding: 24px; color: var(--muted); text-align: center; }
.card-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.card-toolbar h2, .progress-heading h2 { margin: 6px 0 0; font-size: 20px; }
.filters { display: flex; gap: 6px; }
.filter { padding: 7px 11px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 700; }
.filter.active { color: var(--primary); background: var(--primary-soft); }
.document-table { overflow-x: auto; }
.table-row { display: grid; grid-template-columns: minmax(300px,1.5fr) minmax(210px,1fr) 130px 150px 28px; gap: 18px; align-items: center; min-width: 1020px; min-height: 72px; padding: 10px 21px; border-top: 1px solid var(--line); color: inherit; font-size: 11px; text-decoration: none; }
.table-row:not(.table-head):hover { background: #fafcff; }
.table-head { min-height: 42px; border-top: 0; color: var(--muted); background: #f8fafc; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.table-row > span { display: grid; gap: 5px; min-width: 0; }
.table-row strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.table-row small { color: var(--muted); font-size: 10px; }
.document-cell { grid-template-columns: 42px 1fr !important; align-items: center; }
.file-mark { display: grid; place-items: center; width: 39px; height: 43px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); font-size: 9px; font-style: normal; font-weight: 900; }
.status { display: inline-flex; justify-content: center; justify-self: start; padding: 5px 9px; border-radius: 999px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.status.waiting { color: var(--amber); background: var(--amber-soft); }
.status.viewed { color: var(--primary); background: var(--primary-soft); }
.status.signed { color: var(--green); background: var(--green-soft); }
.status.attention { color: var(--red); background: var(--red-soft); }
.row-arrow { color: var(--primary); font-size: 18px; }

.document-list { display: grid; }
.document-list-item {
  display: grid;
  grid-template-columns: 42px minmax(230px,1.4fr) minmax(150px,.75fr) 145px 130px auto;
  gap: 16px;
  align-items: center;
  min-height: 78px;
  padding: 13px 21px;
  border-top: 1px solid var(--line);
}
.document-list-item:first-child { border-top: 0; }
.document-list-item:hover { background: #fafcff; }
.document-list-main, .document-list-signer { display: grid; gap: 5px; min-width: 0; }
.document-list-main strong, .document-list-signer strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.document-list-main small, .document-list-signer small, .document-list-date { color: var(--muted); font-size: 10px; }
.document-invite-button { min-height: 38px; white-space: nowrap; }

.document-header { align-items: flex-end; }
.progress-card { padding: 22px; }
.progress-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.progress-track { height: 6px; margin: 20px 0; overflow: hidden; border-radius: 999px; background: #edf1f6; }
.progress-track i { display: block; width: 42%; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--green),#42c998); }
.step-list { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.step-list article { display: grid; grid-template-columns: 34px 1fr; gap: 11px; align-items: center; }
.step-list article > span { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); font-size: 11px; font-weight: 850; }
.step-list article.done > span { border-color: var(--green); background: var(--green); color: #fff; }
.step-list article.current > span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.step-list article div { display: grid; gap: 4px; }
.step-list strong { font-size: 11px; }
.step-list small { color: var(--muted); font-size: 9px; }
.document-layout { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(300px,.62fr); gap: 16px; align-items: start; }
.document-preview-card { overflow: hidden; }
.preview-toolbar, .signer-file-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 18px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.preview-toolbar > div, .signer-file-head > div { display: flex; align-items: center; gap: 11px; }
.preview-toolbar > div > span, .signer-file-head > div > span { display: grid; gap: 4px; }
.preview-toolbar strong, .signer-file-head strong { color: var(--ink); font-size: 12px; }
.paper-preview { width: min(78%,720px); min-height: 720px; margin: 34px auto; padding: 58px 62px; border: 1px solid #d8dde6; background: #fff; box-shadow: 0 12px 34px rgba(23,35,58,.1); color: #303948; }
.paper-logo { font-size: 11px; font-weight: 900; letter-spacing: .14em; }
.paper-preview h2 { margin: 74px 0 9px; text-align: center; font-size: 20px; letter-spacing: .06em; }
.paper-preview h3 { margin: 0 0 50px; text-align: center; font-size: 12px; }
.paper-preview p { font-family: Georgia,serif; font-size: 12px; line-height: 1.8; text-align: justify; }
.paper-lines { display: grid; gap: 14px; margin-top: 32px; }
.paper-lines i { display: block; height: 1px; background: #d8dce3; }
.paper-lines i:nth-child(3n) { width: 83%; }
.paper-preview footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 110px; font-family: Georgia,serif; font-size: 10px; }
.details-column { display: grid; gap: 13px; }
.detail-card { display: grid; gap: 15px; padding: 19px; }
.person { display: flex; align-items: center; gap: 11px; }
.person div { display: grid; gap: 4px; }
.person strong { font-size: 12px; }
.person small { color: var(--muted); font-size: 10px; }
.avatar { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 12px; background: linear-gradient(145deg,#dceaff,#c5dafd); color: #2557aa; font-size: 11px; font-weight: 900; }
dl { display: grid; gap: 0; margin: 0; }
dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
dt { color: var(--muted); font-size: 10px; }
dd { margin: 0; font-size: 10px; font-weight: 750; text-align: right; }
dd.hash { color: var(--primary); }
.evidence-card { grid-template-columns: 38px 1fr; background: linear-gradient(145deg,#edf8f4,#f7fcfa); border-color: #d0eadf; }
.shield { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 900; }
.evidence-card div { display: grid; gap: 7px; }
.evidence-card p { margin: 0; color: #567267; font-size: 10px; line-height: 1.55; }

.signer-body { min-height: 100vh; background: radial-gradient(circle at 50% 0%,#fff 0,#f5f7fb 48%,#eef2f8 100%); }
.signer-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 82px; padding: 16px clamp(20px,5vw,72px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.88); }
.signer-brand small { color: var(--muted); font-size: 10px; }
.secure-badge { display: flex; align-items: center; gap: 9px; color: #53617a; font-size: 10px; font-weight: 700; }
.signer-main { display: grid; gap: 20px; width: min(1280px,calc(100% - 40px)); margin: 36px auto 60px; }
.signer-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.signer-intro h1 { margin: 8px 0 8px; font-size: clamp(28px,4vw,44px); letter-spacing: -.045em; }
.signer-intro p { max-width: 700px; margin: 0; color: var(--muted); line-height: 1.55; }
.signer-layout { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(340px,.62fr); gap: 18px; align-items: start; }
.signer-document { overflow: hidden; }
.link-button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.original-summary { display: grid; grid-template-columns: 74px 1fr; gap: 20px; align-items: center; padding: 34px 32px 24px; }
.original-summary h2 { margin: 7px 0; font-size: clamp(22px,3vw,32px); }
.original-summary p { max-width: 680px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.original-icon { display: grid; place-items: center; width: 70px; height: 78px; border-radius: 15px; color: var(--primary); background: var(--primary-soft); font-size: 13px; font-weight: 900; }
.document-facts { padding: 0 32px; }
.document-facts dd { overflow-wrap: anywhere; }
.review-callout { margin: 25px 32px 32px; padding: 18px; border: 1px solid #cbdcfb; border-radius: 12px; background: #f1f6ff; }
.review-callout strong { font-size: 12px; }
.review-callout p { margin: 6px 0 0; color: #526681; font-size: 11px; line-height: 1.6; }
.paper-preview.compact { min-height: 610px; margin-block: 28px; }
.sign-action-card { display: grid; gap: 17px; padding: 24px; position: sticky; top: 22px; }
.signer-person { padding-bottom: 2px; }
.identity-note { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 12px; border-radius: 10px; color: #435b7e; background: #eef4ff; }
.identity-note > span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #d9e7ff; color: var(--primary); font-size: 11px; font-weight: 900; }
.identity-note p { margin: 0; font-size: 10px; line-height: 1.55; }
.consent { display: grid; grid-template-columns: 19px 1fr; gap: 10px; align-items: start; font-size: 11px; line-height: 1.55; cursor: pointer; }
.consent input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--primary); }
.sign-button { width: 100%; min-height: 50px; }
.action-hint { color: var(--muted); font-size: 9px; line-height: 1.5; text-align: center; }
.signer-footer { display: flex; justify-content: space-between; gap: 20px; padding: 24px clamp(20px,5vw,72px); border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }

.portal-dialog { width: min(520px,calc(100% - 28px)); max-height: 90dvh; padding: 0; overflow: hidden; border: 0; border-radius: 17px; box-shadow: 0 30px 80px rgba(8,21,40,.34); }
.portal-dialog::backdrop { background: rgba(6,15,30,.66); backdrop-filter: blur(3px); }
.portal-dialog form { display: grid; gap: 19px; max-height: 90dvh; padding: 24px; overflow-y: auto; }
.portal-dialog header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.portal-dialog h2 { margin: 7px 0 0; font-size: 25px; }
.icon-button { width: 44px; height: 44px; flex: 0 0 auto; border: 0; border-radius: 9px; background: #f0f3f8; color: #53617a; cursor: pointer; font-size: 20px; }
.upload-zone { display: grid; place-items: center; gap: 8px; padding: 30px; border: 1px dashed #b9c7dc; border-radius: 13px; background: #f8faff; text-align: center; }
.upload-zone > span { display: grid; place-items: center; width: 50px; height: 54px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); font-size: 10px; font-weight: 900; }
.upload-zone strong { font-size: 13px; }
.upload-zone small { max-width: 330px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.portal-dialog label:not(.consent) { display: grid; gap: 7px; color: #53617a; font-size: 11px; font-weight: 750; }
.portal-dialog select { min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.portal-dialog footer { display: flex; justify-content: flex-end; gap: 8px; }
.qr-dialog { text-align: center; }
.qr-dialog header { text-align: left; }
.qr-dialog p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.qr-placeholder { width: 210px; height: 210px; margin: 0 auto; border: 12px solid #fff; outline: 1px solid var(--line); background: repeating-conic-gradient(#10203a 0 25%,#fff 0 50%) 0/22px 22px; box-shadow: inset 0 0 0 14px #fff; }
.qr-dialog .status { justify-self: center; }
.qr-image { width: 230px; height: 230px; margin: 0 auto; padding: 10px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.qr-loading { width: 230px; min-height: 150px; margin: 0 auto; display: grid; place-items: center; padding: 24px; color: var(--muted); background: var(--surface-soft); border: 1px dashed var(--line-strong); border-radius: 12px; font-size: 12px; }
.qr-error { color: var(--red) !important; background: var(--red-soft); border-radius: 8px; padding: 10px 12px; }
.invite-result { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.invite-result p { margin: 0; color: var(--muted); font-size: 11px; }
.invite-result a { overflow-wrap: anywhere; color: var(--primary); font-size: 11px; }
.selected-document { display: grid; grid-template-columns: 42px 1fr; gap: 11px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.selected-document div { display: grid; gap: 4px; min-width: 0; }
.selected-document small { color: var(--muted); font-size: 10px; }
.selected-document strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.mobile-launch-button { display: inline-flex; align-items: center; justify-content: center; justify-self: stretch; min-height: 48px; text-decoration: none; }
.retry-button { justify-self: center; }
.signer-page-error { margin: 0; }

@media (max-width: 1120px) {
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .document-layout, .signer-layout { grid-template-columns: 1fr; }
  .details-column { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .sign-action-card { position: static; }
  .signer-layout .sign-action-card { order: -1; }
  .document-list-item { grid-template-columns: 42px minmax(220px,1fr) 130px auto; }
  .document-list-signer, .document-list-date { display: none; }
}

@media (max-width: 850px) {
  .portal-layout { grid-template-columns: 1fr; }
  .portal-sidebar { position: static; display: grid; grid-template-columns: 1fr auto; height: auto; padding: 14px 18px; }
  .workspace-switcher, .sidebar-security { display: none; }
  .sidebar-nav { grid-column: 1 / -1; grid-template-columns: 1fr; overflow-x: auto; }
  .sidebar-nav a { grid-template-columns: 1fr; min-width: 125px; place-items: center; text-align: center; }
  .sidebar-nav i, .sidebar-nav b { display: none; }
  .portal-main { padding: 22px 18px 34px; }
  .page-header { flex-direction: column; }
  .details-column { grid-template-columns: 1fr; }
  .step-list { grid-template-columns: 1fr; }
  .paper-preview { width: 88%; }
  .document-list-item { grid-template-columns: 42px minmax(0,1fr) auto; gap: 12px; }
  .document-list-item .status { grid-column: 2; }
  .document-invite-button { grid-column: 2 / -1; width: 100%; }
}

@media (max-width: 620px) {
  .page-header, .card-toolbar, .progress-heading, .signer-intro, .signer-file-head { align-items: stretch; flex-direction: column; }
  .header-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .welcome-card { grid-template-columns: 1fr; padding: 26px 22px; }
  .welcome-score { display: none; }
  .metric-grid { grid-template-columns: 1fr; }
  .filters { overflow-x: auto; }
  .paper-preview { width: calc(100% - 28px); min-height: 520px; margin: 14px; padding: 34px 28px; }
  .paper-preview h2 { margin-top: 45px; font-size: 16px; }
  .paper-preview footer { flex-direction: column; margin-top: 70px; }
  .signer-header { align-items: flex-start; flex-direction: column; }
  .signer-main { width: min(100% - 24px,1280px); margin-top: 24px; }
  .signer-document .paper-preview { display: none; }
  .sign-action-card { padding: 20px; }
  .signer-footer { flex-direction: column; }
  .original-summary { grid-template-columns: 1fr; padding: 24px 20px 18px; }
  .document-facts { padding: 0 20px; }
  .document-facts > div { align-items: flex-start; flex-direction: column; }
  .document-facts dd { text-align: left; }
  .review-callout { margin: 20px; }
  .signer-file-head .link-button { width: 100%; }
  .portal-dialog form { padding: 20px; }
}

.login-main { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(430px, 100%); background: #fff; border: 1px solid #dfe6f1; border-radius: 18px; padding: 36px; box-shadow: 0 24px 70px rgba(17, 39, 76, .14); display: grid; gap: 16px; }
.login-card h1 { margin: 0; font-size: 30px; }
.login-card p { margin: 0; color: #60708b; }
.login-card label, .portal-dialog label { display: grid; gap: 7px; font-size: 13px; font-weight: 700; color: #34425a; }
.login-card input, .portal-dialog input, .portal-dialog select { width: 100%; border: 1px solid #cfdaea; border-radius: 9px; padding: 12px 13px; background: #fff; font: inherit; box-sizing: border-box; }
.form-error { color: #a82222 !important; background: #fff0f0; border: 1px solid #ffd0d0; border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.upload-zone input[type="file"] { border: 0; padding: 8px 0; }
