.sg-overlay{position:fixed;inset:0;z-index:2200;background:#07121be8;display:flex;align-items:flex-start;justify-content:center;padding:clamp(12px,3vw,32px);overflow:auto}
.recruiting-safeguards{box-sizing:border-box;width:min(920px,100%);margin-inline:auto;min-width:0;background:#101f2c;color:#eef5fb;border:1px solid #476174;border-radius:16px;padding:clamp(16px,3vw,28px);font-size:15px;line-height:1.5;overflow-wrap:anywhere}
.recruiting-safeguards header{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.recruiting-safeguards h2{font-size:26px;margin:4px 0}.recruiting-safeguards h3{margin:0 0 8px;font-size:19px}.sg-eyebrow{color:#f4cf78;font-weight:700;text-transform:uppercase;letter-spacing:.08em}.sg-legend{color:#c4d3e0;font-size:13px}
.sg-section{margin:18px 0;border:1px solid #496073;border-left:4px solid var(--sg-accent);border-radius:10px;padding:18px;background:#152838}.sg-money{--sg-accent:#eac56c}.sg-review{--sg-accent:#bc9bff}.sg-onboarding{--sg-accent:#65d9e6}.sg-contact{--sg-accent:#82bfff}.sg-section h3,.sg-section summary{color:var(--sg-accent)}
.recruiting-safeguards label{display:flex;flex-direction:column;gap:6px;margin:12px 0;font-weight:600;min-width:0}.recruiting-safeguards input,.recruiting-safeguards select,.recruiting-safeguards textarea{box-sizing:border-box;width:100%;min-width:0;background:#0b1a25;color:#f2f6fa;border:1px solid #668096;border-radius:6px;padding:10px;font:inherit}.recruiting-safeguards textarea{min-height:85px;resize:vertical}.recruiting-safeguards .sg-check{flex-direction:row;align-items:flex-start;font-weight:400}.sg-check input{width:20px;flex-shrink:0}
.sg-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.sg-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}.recruiting-safeguards button{font:inherit;font-weight:650;border:1px solid #64caad;border-radius:7px;background:#196c56;color:white;min-height:42px;padding:8px 14px;cursor:pointer;white-space:normal}.recruiting-safeguards button:hover{background:#238569}.recruiting-safeguards button.sg-secondary,.recruiting-safeguards header button{background:#243c50;border-color:#7b95aa}.recruiting-safeguards button:disabled{opacity:.55;cursor:not-allowed}.recruiting-safeguards :focus-visible{outline:3px solid #f4cd75;outline-offset:3px}.sg-error{border:1px solid #ff9191;color:#ffd2d2;background:#50232b;padding:12px;border-radius:6px}.sg-item{border-top:1px solid #4d6072;padding:14px 0}.sg-item small{color:#c0d0dd}.recruiting-safeguards summary{cursor:pointer;font-weight:650}.recruiting-safeguards details{margin-top:16px}
@media(max-width:650px){.sg-grid{grid-template-columns:1fr;gap:0}.sg-section{padding:14px}.recruiting-safeguards header{flex-wrap:wrap}.sg-actions button{width:100%}}
.agreements-page {
  display: grid;
  gap: 18px;
  width: min(100%, 1240px);
  margin-inline: auto;
}

.agreements-hero,
.agreements-release,
.agreement-card,
.agreements-empty {
  border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--border));
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgb(255 255 255 / 7%), transparent 34%),
    var(--card);
  box-shadow: 0 18px 44px rgb(0 0 0 / 18%), inset 0 1px rgb(255 255 255 / 11%);
}

.agreements-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 15%, color-mix(in srgb, var(--primary) 27%, transparent), transparent 34%),
    linear-gradient(135deg, color-mix(in srgb, var(--primary) 15%, transparent), transparent 56%),
    var(--card);
}

.agreements-hero h1,
.agreements-release h2,
.agreements-list-heading h2,
.agreements-empty h2,
.agreement-card h3 {
  margin: 5px 0;
}

.agreements-hero p,
.agreements-release p,
.agreements-empty p,
.agreement-card p,
.agreements-safety p {
  margin: 0;
  color: var(--muted-foreground);
}

.agreements-eyebrow,
.agreements-section-label {
  color: var(--primary);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.agreements-environment {
  flex: 0 0 auto;
  display: grid;
  gap: 4px;
  min-width: 210px;
  padding: 15px 17px;
  border: 1px solid currentColor;
  border-radius: 17px;
  box-shadow: inset 0 1px rgb(255 255 255 / 18%), 0 0 28px currentColor;
}

.agreements-environment span { font-size: 12px; font-weight: 850; }
.agreements-environment--demo { color: #fbbf24; background: rgb(245 158 11 / 12%); }
.agreements-environment--production { color: #4ade80; background: rgb(22 163 74 / 12%); }

.agreements-safety {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.agreements-safety--native { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.agreements-safety__signature { color: #60a5fa; background: linear-gradient(145deg, rgb(37 99 235 / 17%), rgb(37 99 235 / 5%)); }
.agreements-safety__vault { color: #d4af37; background: linear-gradient(145deg, rgb(212 175 55 / 17%), rgb(212 175 55 / 5%)); }

.agreements-safety > div {
  display: grid;
  gap: 4px;
  padding: 17px 18px;
  border: 1px solid currentColor;
  border-radius: 18px;
  box-shadow: inset 0 1px rgb(255 255 255 / 13%);
}

.agreements-safety span { font-size: 11px; font-weight: 900; letter-spacing: .08em; }
.agreements-safety__demo { color: #fbbf24; background: linear-gradient(145deg, rgb(245 158 11 / 17%), rgb(245 158 11 / 5%)); }
.agreements-safety__internal { color: #4ade80; background: linear-gradient(145deg, rgb(22 163 74 / 17%), rgb(22 163 74 / 5%)); }
.agreements-safety__production.is-locked { color: #fb7185; background: linear-gradient(145deg, rgb(225 29 72 / 15%), rgb(225 29 72 / 4%)); }
.agreements-safety__production.is-ready { color: #4ade80; background: linear-gradient(145deg, rgb(22 163 74 / 15%), rgb(22 163 74 / 4%)); }
.agreements-safety p { font-size: 13px; }

.agreements-alert {
  padding: 13px 15px;
  border: 1px solid #60a5fa;
  border-radius: 14px;
  color: #93c5fd;
  background: rgb(37 99 235 / 11%);
}

.agreements-alert--error { border-color: #fb7185; color: #fda4af; background: rgb(225 29 72 / 10%); }
.agreements-alert--success { border-color: #4ade80; color: #bbf7d0; background: rgb(22 163 74 / 10%); }

.agreement-tool-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: color-mix(in srgb, var(--card) 88%, transparent);
}
.agreement-tool-switcher button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 2px 10px;
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: var(--muted-foreground);
  background: transparent;
  text-align: left;
}
.agreement-tool-switcher button > span { grid-row: 1 / 3; align-self: center; font-size: 22px; }
.agreement-tool-switcher button b,
.agreement-tool-switcher button small { min-width: 0; overflow-wrap: anywhere; }
.agreement-tool-switcher button.is-active { border-color: #4ade80; color: #bbf7d0; background: rgb(22 163 74 / 12%); }
.agreement-tool-switcher button.is-active.is-termination { border-color: #fb7185; color: #fecdd3; background: rgb(225 29 72 / 11%); }

.termination-workspace { display: grid; gap: 16px; min-width: 0; }
.termination-heading,
.termination-builder,
.termination-card {
  border: 1px solid color-mix(in srgb, #fb7185 42%, var(--border));
  border-radius: 22px;
  background: radial-gradient(circle at 92% 7%, rgb(225 29 72 / 11%), transparent 28%), linear-gradient(145deg, rgb(59 130 246 / 6%), transparent 48%), var(--card);
  box-shadow: 0 18px 44px rgb(0 0 0 / 18%), inset 0 1px rgb(255 255 255 / 10%);
}
.termination-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 22px; }
.termination-heading h2 { margin: 5px 0; }
.termination-heading p { max-width: 760px; margin: 0; color: var(--muted-foreground); }
.termination-policy-badge { flex: 0 0 auto; padding: 8px 11px; border: 1px solid #4ade80; border-radius: 999px; color: #bbf7d0; background: rgb(22 163 74 / 11%); font-size: 11px; font-weight: 900; }
.termination-legend { display: flex; flex-wrap: wrap; gap: 7px; }
.termination-legend span { padding: 6px 9px; border: 1px solid currentColor; border-radius: 999px; font-size: 11px; font-weight: 800; background: color-mix(in srgb, currentColor 9%, transparent); }
.termination-legend .is-green { color: #4ade80; }
.termination-legend .is-amber { color: #fbbf24; }
.termination-legend .is-blue { color: #60a5fa; }
.termination-legend .is-purple { color: #c084fc; }
.termination-legend .is-red { color: #fb7185; }

.termination-builder { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(330px, .88fr); gap: 18px; padding: clamp(17px, 2.6vw, 26px); }
.termination-builder__form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-content: start; min-width: 0; }
.termination-field { display: grid; align-content: start; gap: 7px; min-width: 0; padding: 13px; border: 1px solid currentColor; border-radius: 15px; }
.termination-field > span { font-size: 11px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.termination-field select,
.termination-field input,
.termination-field textarea,
.termination-void-panel input,
.termination-acknowledgment input {
  min-width: 0;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid color-mix(in srgb, currentColor 42%, var(--border));
  border-radius: 10px;
  color: var(--foreground);
  background: color-mix(in srgb, var(--background) 94%, currentColor);
}
.termination-field select,
.termination-field input { min-height: 45px; }
.termination-field textarea { resize: vertical; line-height: 1.4; }
.termination-field small { color: var(--muted-foreground); line-height: 1.3; }
.termination-field small.is-ready { color: #86efac; }
.termination-field small.is-needed { color: #fda4af; }
.termination-field--driver { color: #4ade80; background: rgb(22 163 74 / 7%); }
.termination-field--type { color: #60a5fa; background: rgb(37 99 235 / 7%); }
.termination-field--reason { color: #c084fc; background: rgb(147 51 234 / 7%); }
.termination-field--details { grid-column: 1 / -1; color: #fb7185; background: rgb(225 29 72 / 7%); }
.termination-field--date { color: #fbbf24; background: rgb(245 158 11 / 7%); }
.termination-field--delivery { color: #22d3ee; background: rgb(8 145 178 / 7%); }
.termination-probation { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; min-width: 0; margin: 0; padding: 12px; border: 1px solid rgb(251 191 36 / 45%); border-radius: 15px; }
.termination-probation legend { padding-inline: 7px; color: #fde68a; font-size: 11px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.termination-probation button { display: grid; gap: 4px; min-width: 0; padding: 11px; border: 1px solid var(--border); border-radius: 11px; color: var(--foreground); background: rgb(255 255 255 / 3%); text-align: left; }
.termination-probation button span { color: var(--muted-foreground); font-size: 11px; overflow-wrap: anywhere; }
.termination-probation button.is-selected { border-color: #fbbf24; background: rgb(245 158 11 / 11%); box-shadow: inset 0 1px rgb(255 255 255 / 10%); }
.termination-gate { grid-column: 1 / -1; margin: 0; padding: 10px 12px; border-left: 3px solid currentColor; font-size: 12px; }
.termination-gate--blocked { color: #fda4af; background: rgb(225 29 72 / 9%); }
.termination-gate--warning { color: #fde68a; background: rgb(245 158 11 / 9%); }
.termination-generate { grid-column: 1 / -1; min-height: 49px; border-color: #fb7185; color: white; background: linear-gradient(135deg, #be123c, #e11d48); }
.termination-generate:disabled { opacity: .48; }

.termination-preview { display: grid; align-content: start; gap: 14px; min-width: 0; padding: clamp(17px, 2.5vw, 24px); border: 1px solid rgb(212 175 55 / 48%); border-radius: 18px; color: #e2e8f0; background: linear-gradient(160deg, rgb(26 6 12 / 97%), rgb(6 11 18 / 98%)); box-shadow: inset 0 1px rgb(255 255 255 / 10%); }
.termination-preview__masthead { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding-bottom: 12px; border-bottom: 1px solid rgb(212 175 55 / 27%); }
.termination-preview__masthead img { width: 54px; aspect-ratio: 1; object-fit: contain; padding: 4px; border: 1px solid rgb(212 175 55 / 55%); border-radius: 12px; }
.termination-preview__masthead span { min-width: 0; color: #d4af37; font-size: 11px; font-weight: 950; letter-spacing: .07em; overflow-wrap: anywhere; }
.termination-preview__masthead em { color: #fda4af; font-size: 10px; font-style: normal; font-weight: 900; }
.termination-preview h3 { margin: 0; color: #fff; font-size: clamp(21px, 2.4vw, 30px); line-height: 1.08; }
.termination-preview dl { display: grid; gap: 8px; margin: 0; }
.termination-preview dl div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; padding-bottom: 8px; border-bottom: 1px solid rgb(255 255 255 / 8%); }
.termination-preview dt { color: #94a3b8; font-size: 10px; font-weight: 850; text-transform: uppercase; }
.termination-preview dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-weight: 750; }
.termination-preview__checks { display: grid; gap: 6px; }
.termination-preview__checks span { padding: 7px 9px; border-radius: 9px; font-size: 11px; font-weight: 780; }
.termination-preview__checks .is-ready { color: #bbf7d0; background: rgb(22 163 74 / 16%); }
.termination-preview__checks .is-warning { color: #fde68a; background: rgb(245 158 11 / 16%); }
.termination-preview__checks .is-blocked { color: #fecdd3; background: rgb(225 29 72 / 16%); }
.termination-preview > p { margin: 0; padding: 10px; border-left: 3px solid #60a5fa; color: #bfdbfe; background: rgb(37 99 235 / 10%); font-size: 11px; }

.termination-records-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.termination-records-heading h3 { margin: 4px 0 0; }
.termination-records-heading > b { padding: 6px 9px; border-radius: 999px; color: #fde68a; background: rgb(212 175 55 / 13%); font-size: 11px; }
.termination-records { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.termination-card { min-width: 0; padding: 17px; }
.termination-card--green { border-color: #4ade80; }
.termination-card--blue { border-color: #60a5fa; }
.termination-card--purple { border-color: #c084fc; }
.termination-card--red { border-color: #fb7185; }
.termination-card--amber { border-color: #fbbf24; }
.termination-card > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.termination-card > header span { color: #fb7185; font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.termination-card > header h3 { margin: 4px 0; }
.termination-card > header p { margin: 0; color: var(--muted-foreground); font-size: 12px; }
.termination-card > header > b { flex: 0 0 auto; padding: 5px 8px; border: 1px solid currentColor; border-radius: 999px; font-size: 10px; text-transform: uppercase; }
.termination-card__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 13px; }
.termination-card__facts span { display: grid; gap: 3px; min-width: 0; padding: 9px; border-radius: 10px; color: var(--muted-foreground); background: rgb(255 255 255 / 4%); font-size: 10px; text-transform: uppercase; }
.termination-card__facts strong { color: var(--foreground); overflow-wrap: anywhere; text-transform: none; }
.termination-card > footer { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.termination-release-check { flex: 1 1 100%; display: flex; gap: 8px; align-items: flex-start; padding: 9px; border: 1px solid rgb(251 191 36 / 35%); border-radius: 10px; color: #fde68a; background: rgb(245 158 11 / 8%); font-size: 11px; }
.termination-release-check input { margin-top: 2px; }
.termination-release { border-color: #60a5fa; color: #dbeafe; background: rgb(37 99 235 / 18%); }
.termination-void { border-color: #fb7185; color: #fecdd3; background: rgb(225 29 72 / 12%); }
.termination-void-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 10px; padding: 10px; border: 1px solid rgb(225 29 72 / 35%); border-radius: 11px; background: rgb(225 29 72 / 7%); }

.termination-document { grid-column: 1 / -1; display: grid; gap: 16px; margin-top: 15px; padding: clamp(18px, 3vw, 30px); border: 1px solid rgb(212 175 55 / 46%); border-radius: 16px; color: #172033; background: #fffdf8; box-shadow: 0 20px 45px rgb(0 0 0 / 20%); }
.termination-document__masthead { display: flex; align-items: center; gap: 15px; padding-bottom: 14px; border-bottom: 2px solid #d4af37; }
.termination-document__masthead img { width: 62px; height: 62px; object-fit: contain; }
.termination-document__masthead span { color: #8a6816; font-size: 11px; font-weight: 950; letter-spacing: .09em; }
.termination-document__masthead h2 { margin: 3px 0; color: #111827; }
.termination-document__masthead p { margin: 0; color: #64748b; }
.termination-document__identity { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.termination-document__identity span { display: grid; gap: 3px; padding: 10px; border: 1px solid #e2e8f0; border-radius: 10px; color: #64748b; font-size: 10px; text-transform: uppercase; }
.termination-document__identity strong { color: #172033; overflow-wrap: anywhere; text-transform: none; }
.termination-document > section h3 { margin: 0 0 7px; color: #7f1d1d; }
.termination-document > section p { margin: 0 0 8px; color: #334155; line-height: 1.55; }
.termination-document__integrity { display: grid; gap: 5px; padding: 10px; border-left: 3px solid #0ea5e9; color: #075985; background: #f0f9ff; font-size: 10px; }
.termination-document__integrity code { overflow-wrap: anywhere; white-space: normal; }
.termination-acknowledged { display: grid; gap: 4px; padding: 13px; border: 2px solid #16a34a; color: #166534; background: #f0fdf4; }
.termination-acknowledgment { display: grid; gap: 9px; padding: 14px; border: 1px solid #60a5fa; border-radius: 12px; color: #172033; background: #eff6ff; }
.termination-acknowledgment h3,
.termination-acknowledgment p { margin: 0; }
.termination-acknowledgment label { display: flex; gap: 8px; align-items: flex-start; }

[data-theme="light"] .agreement-tool-switcher { background: #fff; }
[data-theme="light"] .termination-heading,
[data-theme="light"] .termination-builder,
[data-theme="light"] .termination-card { background-color: #fff; }
[data-theme="light"] .termination-field select,
[data-theme="light"] .termination-field input,
[data-theme="light"] .termination-field textarea,
[data-theme="light"] .termination-void-panel input { color: #172033; background: #fff; }
[data-theme="light"] .termination-probation button { color: #172033; background: #fff; }
[data-theme="light"] .termination-card__facts span { background: #f8fafc; }

.lease-generator {
  display: grid;
  gap: 18px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid color-mix(in srgb, #d4af37 58%, var(--border));
  border-radius: 22px;
  background: radial-gradient(circle at 92% 8%, rgb(212 175 55 / 13%), transparent 28%), linear-gradient(145deg, rgb(16 185 129 / 8%), transparent 48%), var(--card);
  box-shadow: 0 20px 48px rgb(0 0 0 / 20%), inset 0 1px rgb(255 255 255 / 10%);
}
.lease-generator__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.lease-generator__heading h2 { margin: 5px 0; }
.lease-generator__heading p { max-width: 720px; margin: 0; color: var(--muted-foreground); }
.lease-template-state { flex: 0 0 auto; padding: 8px 11px; border: 1px solid currentColor; border-radius: 999px; font-size: 11px; font-weight: 850; }
.lease-template-state.is-ready { color: #4ade80; background: rgb(22 163 74 / 10%); }
.lease-template-state.is-blocked { color: #fbbf24; background: rgb(245 158 11 / 10%); }
.lease-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-block: 1px solid rgb(255 255 255 / 9%); }
.lease-tabs button { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 2px 9px; align-items: center; min-width: 0; min-height: 70px; padding: 12px 14px; border: 0; border-bottom: 3px solid transparent; color: var(--muted-foreground); background: transparent; text-align: left; transition: color 160ms ease, background 160ms ease, border-color 160ms ease; }
.lease-tabs button:hover { color: var(--foreground); background: rgb(255 255 255 / 4%); }
.lease-tabs button.is-active { border-bottom-color: #d4af37; color: #fde68a; background: linear-gradient(180deg, rgb(212 175 55 / 11%), transparent); }
.lease-tabs button > span { grid-row: 1 / 3; font-size: 20px; }
.lease-tabs button b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lease-tabs button small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lease-generator__workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, .82fr); gap: 18px; align-items: stretch; }
.lease-generator__form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-content: start; }
.lease-scope { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; min-width: 0; margin: 0; padding: 12px; border: 1px solid rgb(212 175 55 / 38%); border-radius: 16px; }
.lease-scope legend { padding-inline: 7px; color: #fde68a; font-size: 12px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.lease-scope button { display: grid; gap: 4px; min-width: 0; min-height: 68px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; color: var(--foreground); background: rgb(255 255 255 / 3%); text-align: left; }
.lease-scope button span { color: var(--muted-foreground); font-size: 11px; }
.lease-scope button.is-selected { border-color: #4ade80; background: rgb(22 163 74 / 12%); box-shadow: inset 0 1px rgb(255 255 255 / 10%); }
.lease-field { display: grid; gap: 7px; min-width: 0; padding: 14px; border: 1px solid currentColor; border-radius: 16px; }
.lease-field > span { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 850; text-transform: uppercase; letter-spacing: .05em; }
.lease-field > span b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #07110c; background: currentColor; }
.lease-field select, .lease-field input { min-width: 0; width: 100%; min-height: 46px; padding: 0 12px; border: 1px solid color-mix(in srgb, currentColor 48%, var(--border)); border-radius: 11px; color: var(--foreground); background: color-mix(in srgb, var(--background) 92%, currentColor); }
.lease-field small { min-height: 2.5em; color: var(--muted-foreground); line-height: 1.25; }
.lease-field--driver { color: #60a5fa; background: rgb(37 99 235 / 8%); }
.lease-field--vehicle { color: #c084fc; background: rgb(147 51 234 / 8%); }
.lease-field--mc { color: #4ade80; background: rgb(22 163 74 / 8%); }
.lease-field--date { color: #fbbf24; background: rgb(245 158 11 / 8%); }
.lease-field--rate { color: #22d3ee; background: rgb(8 145 178 / 8%); }
.lease-rate {
  display: grid;
  grid-template-columns: minmax(72px, 96px) minmax(0, 1fr);
  gap: 7px 9px;
  align-items: center;
  min-width: 0;
}
.lease-rate input { grid-row: 1 / 3; }
.lease-rate b,
.lease-rate strong {
  min-width: 0;
  font-size: 11px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.lease-rate strong { color: #fde68a; }
.lease-generator__button { grid-column: 1 / -1; min-height: 49px; }
.lease-generator__gate { grid-column: 1 / -1; margin: 0; padding: 11px 13px; border-left: 3px solid #fbbf24; color: #fde68a; background: rgb(245 158 11 / 9%); font-size: 13px; }
.lease-generator__gate.agreements-alert--error { border-color: #e11d48; color: #881337; background: #fff1f2; overflow-wrap: anywhere; }
.lease-generator__gate ul { padding-left: 20px; }
[data-theme="dark"] .lease-generator__gate.agreements-alert--error { color: #fecdd3; background: #3b101b; }
.lease-preview { display: grid; align-content: start; gap: 13px; min-width: 0; padding: clamp(18px, 3vw, 25px); border: 1px solid rgb(212 175 55 / 48%); border-radius: 18px; background: linear-gradient(160deg, rgb(6 26 18 / 95%), rgb(6 11 18 / 98%)); box-shadow: inset 0 1px rgb(255 255 255 / 10%); }
.lease-preview__brand { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 12px; border-bottom: 1px solid rgb(212 175 55 / 26%); padding-bottom: 12px; }
.lease-logo-frame { display: grid; place-items: center; width: 58px; aspect-ratio: 1; overflow: hidden; padding: 5px; border: 1px solid rgb(212 175 55 / 55%); border-radius: 13px; color: #fde68a; background: rgb(0 0 0 / 28%); }
.lease-logo-frame img { display: block; width: 100%; height: 100%; object-fit: contain; }
.lease-preview__brand span { color: #d4af37; font-weight: 950; letter-spacing: .08em; }
.lease-preview__brand em { color: #6ee7b7; font-size: 10px; font-style: normal; font-weight: 900; }
.lease-preview h3 { margin: 0; color: #f8fafc; font-size: clamp(20px, 2.4vw, 29px); line-height: 1.08; }
.lease-preview__status { width: fit-content; margin: 0; padding: 5px 8px; border-radius: 999px; color: #bbf7d0; background: rgb(22 163 74 / 20%); font-size: 10px; font-weight: 900; }
.lease-preview dl { display: grid; gap: 8px; margin: 0; }
.lease-preview dl div { display: grid; grid-template-columns: 105px minmax(0, 1fr); gap: 10px; padding-bottom: 8px; border-bottom: 1px solid rgb(255 255 255 / 8%); }
.lease-preview dt { color: #94a3b8; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.lease-preview dd { min-width: 0; margin: 0; overflow-wrap: anywhere; color: #e2e8f0; font-weight: 750; }
.lease-preview__protection { display: grid; gap: 4px; padding: 11px 12px; border: 1px solid rgb(96 165 250 / 30%); border-radius: 12px; background: rgb(37 99 235 / 9%); }
.lease-preview__protection strong { color: #93c5fd; font-size: 12px; }
.lease-preview__protection span { color: #cbd5e1; font-size: 11px; line-height: 1.35; }
.lease-preview footer { display: grid; gap: 2px; color: #94a3b8; font-size: 10px; }
.lease-preview footer strong { color: #fde68a; font-size: 11px; }
.lease-history { display: grid; gap: 8px; border-top: 1px solid rgb(255 255 255 / 8%); padding-top: 16px; }
.lease-history h3 { margin: 3px 0; }
.lease-history article { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: center; padding: 11px 13px; border: 1px solid rgb(255 255 255 / 10%); border-radius: 12px; background: rgb(255 255 255 / 3%); }
.lease-history article span { display: grid; min-width: 0; }
.lease-history article small { color: var(--muted-foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lease-history article em { color: #4ade80; font-size: 11px; font-style: normal; font-weight: 850; text-transform: uppercase; }
.lease-records { display: grid; gap: 9px; }
.lease-records article { display: grid; grid-template-columns: 90px minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 13px 14px; border: 1px solid rgb(255 255 255 / 10%); border-radius: 14px; background: rgb(255 255 255 / 3%); }
.lease-records article > div { display: grid; min-width: 0; }
.lease-records article small { overflow: hidden; color: var(--muted-foreground); text-overflow: ellipsis; white-space: nowrap; }
.lease-record-status { width: fit-content; padding: 6px 8px; border: 1px solid currentColor; border-radius: 999px; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.lease-record-status.is-generated { color: #fbbf24; }
.lease-record-status.is-released { color: #60a5fa; }
.lease-record-status.is-viewed { color: #c084fc; }
.lease-record-status.is-signed { color: #4ade80; }
.lease-record-status.is-voided { color: #fb7185; }
[data-theme="light"] .lease-record-status.is-generated { color: #8a4b00; }
[data-theme="light"] .lease-record-status.is-released { color: #1d4ed8; }
[data-theme="light"] .lease-record-status.is-viewed { color: #7e22ce; }
[data-theme="light"] .lease-record-status.is-signed { color: #166534; }
[data-theme="light"] .lease-record-status.is-voided { color: #be123c; }
.lease-record-next { color: var(--muted-foreground); font-size: 11px; font-weight: 750; }
.lease-record-actions { display: flex !important; align-items: center; justify-content: flex-end; gap: 8px; }
.lease-void-button, .lease-void-confirm { border-color: #fb7185; color: #fecdd3; background: rgb(225 29 72 / 11%); }
.lease-void-panel { grid-column: 1 / -1; display: grid !important; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 12px; border: 1px solid rgb(251 113 133 / 40%); border-radius: 12px; background: rgb(225 29 72 / 8%); }
.lease-void-panel label { display: grid; gap: 5px; color: var(--foreground); font-size: 11px; font-weight: 800; }
.lease-void-panel input { min-width: 0; width: 100%; min-height: 42px; padding: 0 11px; border: 1px solid rgb(251 113 133 / 48%); border-radius: 9px; color: var(--foreground); background: var(--background); }
.lease-void-panel > div { display: flex; align-items: end; gap: 7px; }
.lease-records-empty { display: grid; place-items: center; gap: 7px; min-height: 190px; border: 1px dashed rgb(255 255 255 / 16%); border-radius: 16px; color: var(--muted-foreground); text-align: center; }
.lease-records-empty span { font-size: 34px; }
.lease-branding { display: grid; gap: 18px; }
.lease-branding h3 { margin: 5px 0; }
.lease-branding p { margin: 0; color: var(--muted-foreground); }
.lease-branding__logos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.lease-branding__logos article { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px; border: 1px solid rgb(255 255 255 / 10%); border-radius: 14px; background: rgb(255 255 255 / 3%); }
.lease-branding__logos article > span { display: grid; min-width: 0; }
.lease-branding__logos small { color: var(--muted-foreground); }
.lease-branding__note { padding: 12px 14px; border-left: 3px solid #60a5fa; background: rgb(37 99 235 / 8%); font-size: 12px; }

.agreements-workspace {
  display: grid;
  grid-template-columns: minmax(250px, .72fr) minmax(0, 1.8fr);
  gap: 14px;
  align-items: start;
}

.agreement-queue {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgb(34 211 238 / 28%);
  border-radius: 20px;
  background: var(--card);
}

.agreement-queue__heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.agreement-queue__heading h2 { margin: 4px 0 0; }
.agreement-queue__heading b { color: #67e8f9; font-size: 22px; }
.agreement-queue__list { display: grid; gap: 7px; max-height: none; overflow: visible; }
.agreement-queue__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-left: 3px solid currentColor;
  border-radius: 12px;
  color: var(--foreground);
  background: rgb(255 255 255 / 3%);
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.agreement-queue__item:hover { transform: translateX(2px); background: rgb(255 255 255 / 6%); }
.agreement-queue__item.is-selected { border-color: currentColor; background: rgb(34 211 238 / 8%); }
.agreement-queue__item > span { display: grid; min-width: 0; }
.agreement-queue__item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agreement-queue__item small { color: var(--muted-foreground); }
.agreement-queue__item em { flex: 0 0 auto; max-width: 90px; color: currentColor; font-size: 10px; font-style: normal; font-weight: 850; text-align: right; }
.agreement-queue__item.is-green { color: #4ade80; }
.agreement-queue__item.is-blue { color: #60a5fa; }
.agreement-queue__item.is-amber { color: #fbbf24; }
.agreement-queue__item.is-red { color: #fb7185; }

.agreement-readiness-row { display: flex; flex-wrap: wrap; gap: 7px; }
.agreement-readiness-row span { padding: 6px 8px; border: 1px solid currentColor; border-radius: 999px; font-size: 10px; font-weight: 800; }
.agreement-readiness-row .is-ready { color: #4ade80; background: rgb(22 163 74 / 10%); }
.agreement-readiness-row .is-pending { color: #fbbf24; background: rgb(245 158 11 / 10%); }
.agreement-readiness-row .is-blocked { color: #fb7185; background: rgb(225 29 72 / 10%); }

.agreements-release {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding: 22px;
  border-color: rgb(192 132 252 / 38%);
}

.agreements-release > *,
.agreements-release__intro,
.agreements-release__action { min-width: 0; }
.agreements-release__intro { display: grid; align-content: start; gap: 2px; }
.agreements-release__intro h2 { overflow-wrap: anywhere; }
.agreements-release__intro p { max-width: 64ch; }
.agreements-release__action { display: grid; gap: 9px; }
.agreements-release__action label { color: #c4b5fd; font-size: 12px; font-weight: 800; }
.agreements-release__action select {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid rgb(192 132 252 / 45%);
  border-radius: 13px;
  color: var(--foreground);
  background: var(--background);
}
.agreements-release__action small { color: var(--muted-foreground); }

.agreement-review-loading {
  padding: 12px 13px;
  border: 1px solid rgb(96 165 250 / 42%);
  border-radius: 13px;
  color: #bfdbfe;
  background: rgb(37 99 235 / 10%);
  font-size: 13px;
}

.agreement-review {
  display: grid;
  gap: 13px;
  margin-block: 4px;
  padding: 15px;
  border: 1px solid rgb(34 211 238 / 30%);
  border-radius: 16px;
  background: linear-gradient(145deg, rgb(8 145 178 / 11%), rgb(255 255 255 / 3%));
  box-shadow: inset 0 1px rgb(255 255 255 / 10%);
}

.agreement-review__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.agreement-review__heading > div { display: grid; gap: 2px; }
.agreement-review__heading > div span { color: #67e8f9; font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.agreement-review__heading > div strong { color: var(--foreground); }

.agreement-source {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}
.agreement-source--green { color: #4ade80; background: rgb(22 163 74 / 11%); }
.agreement-source--blue { color: #60a5fa; background: rgb(37 99 235 / 11%); }

.agreement-identity,
.agreement-editable-terms {
  display: grid;
  gap: 8px;
}

.agreement-identity { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
.agreement-editable-terms { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.agreement-identity label,
.term-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.agreement-identity label > span,
.term-field > span {
  color: var(--muted-foreground);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.agreement-identity input,
.term-field > div {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 11px;
  color: var(--foreground);
  background: rgb(0 0 0 / 18%);
}

.agreement-identity input {
  min-width: 0;
  padding: 0 11px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.term-field > div {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-inline: 10px;
  border-color: currentColor;
  box-shadow: inset 0 1px rgb(255 255 255 / 8%);
}

.term-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--foreground);
  background: transparent;
  font: inherit;
  font-weight: 850;
}

.term-field b { color: currentColor; }
.term-field--gold { color: #fbbf24; }
.term-field--green { color: #4ade80; }
.term-field--purple { color: #c084fc; }

.agreement-review__message {
  margin: 0;
  padding: 9px 10px;
  border-left: 3px solid currentColor;
  border-radius: 8px;
  font-size: 11px;
}
.agreement-review__message--error { color: #fda4af !important; background: rgb(225 29 72 / 10%); }
.agreement-review__message--warning { color: #fde68a !important; background: rgb(245 158 11 / 10%); }
.agreement-review__message--ready { color: #86efac !important; background: rgb(22 163 74 / 10%); }

.agreements-primary,
.agreements-secondary {
  min-height: 43px;
  border-radius: 13px;
  font-weight: 800;
  box-shadow: inset 0 1px rgb(255 255 255 / 28%), 0 8px 22px rgb(0 0 0 / 18%);
}

.agreements-print {
  min-height: 43px;
  border-color: rgb(251 191 36 / 55%);
  border-radius: 13px;
  color: #fde68a;
  background: rgb(245 158 11 / 12%);
  font-weight: 800;
}

.agreements-primary {
  color: #07110b;
  border-color: #4ade80;
  background: linear-gradient(135deg, #86efac 0%, #34d399 45%, #16a34a 100%);
}

.agreements-secondary {
  color: #dbeafe;
  border-color: rgb(96 165 250 / 55%);
  background: linear-gradient(145deg, rgb(59 130 246 / 28%), rgb(30 64 175 / 15%));
}

.agreements-list-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding-inline: 4px;
}

.agreements-count {
  padding: 7px 11px;
  border-radius: 999px;
  color: #67e8f9;
  background: rgb(8 145 178 / 13%);
  font-size: 12px;
  font-weight: 800;
}

.agreements-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.agreement-card { position: relative; display: grid; gap: 17px; padding: 19px; overflow: hidden; }
.agreement-card::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: currentColor; box-shadow: 0 0 22px currentColor; }
.agreement-card--green { color: #4ade80; }
.agreement-card--red { color: #fb7185; }
.agreement-card--purple { color: #c084fc; }
.agreement-card--blue { color: #60a5fa; }
.agreement-card--amber { color: #fbbf24; }

.agreement-card header,
.agreement-card footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.agreement-card header h3 { color: var(--foreground); }
.agreement-card__environment { font-size: 10px; font-weight: 900; letter-spacing: .08em; }

.agreement-status {
  padding: 7px 10px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  text-transform: capitalize;
  background: rgb(255 255 255 / 5%);
}
.agreement-status--green { color: #4ade80; }
.agreement-status--red { color: #fb7185; }
.agreement-status--purple { color: #c084fc; }
.agreement-status--blue { color: #60a5fa; }
.agreement-status--amber { color: #fbbf24; }

.agreement-terms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.agreement-terms > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 13px;
  background: rgb(255 255 255 / 4%);
}
.agreement-terms span { color: var(--muted-foreground); font-size: 11px; }
.agreement-terms strong { color: var(--foreground); font-size: 16px; overflow-wrap: anywhere; }

.agreement-timeline { display: grid; gap: 7px; }
.agreement-timeline span { display: flex; justify-content: space-between; gap: 12px; color: var(--muted-foreground); font-size: 12px; }
.agreement-timeline strong { color: var(--foreground); text-align: right; }
.agreement-card__error { padding: 10px; border-radius: 10px; color: #fda4af !important; background: rgb(225 29 72 / 10%); }
.agreement-card footer { justify-content: flex-start; flex-wrap: wrap; }

.agreements-empty { padding: 34px 20px; text-align: center; }
.agreements-empty > span { font-size: 38px; }
.agreements-footnote { margin: 0; padding: 11px 14px; border-left: 3px solid #22d3ee; border-radius: 9px; color: var(--muted-foreground); background: rgb(8 145 178 / 8%); font-size: 12px; }

.agreement-document {
  display: grid;
  gap: 19px;
  padding: clamp(18px, 4vw, 42px);
  border: 1px solid rgb(148 163 184 / 26%);
  border-radius: 16px;
  color: #172033;
  background: #f8fafc;
  box-shadow: 0 20px 42px rgb(0 0 0 / 20%);
  animation: agreement-document-in 180ms ease-out;
}
.agreement-document__masthead { padding-bottom: 17px; border-bottom: 2px solid #c69a2b; }
.agreement-document__masthead span { color: #166534; font-size: 11px; font-weight: 900; letter-spacing: .15em; }
.agreement-document__masthead h2 { margin: 5px 0; color: #0f172a; font-family: Georgia, 'Times New Roman', serif; }
.agreement-document__masthead p,
.agreement-document__summary,
.agreement-document section p { color: #475569 !important; }
.agreement-document__parties { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.agreement-document__parties span { display: grid; gap: 4px; padding: 11px 0; border-bottom: 1px solid #cbd5e1; color: #64748b; font-size: 11px; text-transform: uppercase; }
.agreement-document__parties strong { color: #0f172a; font-size: 14px; text-transform: none; }
.agreement-document section h3 { margin: 0 0 7px; color: #0f172a; font-size: 15px; }
.agreement-document section p { margin: 5px 0; line-height: 1.65; }
.agreement-certificate { display: grid; gap: 4px; padding: 16px; border: 2px solid #16a34a; border-radius: 12px; color: #166534; background: #f0fdf4; }
.agreement-certificate span { font-size: 10px; font-weight: 900; letter-spacing: .1em; }
.agreement-certificate strong { color: #14532d; font-family: Georgia, 'Times New Roman', serif; font-size: 24px; font-style: italic; }
.agreement-certificate small { color: #475569; }
.agreement-acceptance { display: grid; gap: 13px; padding: 18px; border: 1px solid #0e7490; border-radius: 14px; background: #ecfeff; }
.agreement-acceptance h3 { color: #164e63 !important; }
.agreement-check { display: grid; grid-template-columns: 20px 1fr; gap: 9px; align-items: start; color: #334155; font-size: 13px; line-height: 1.45; }
.agreement-check input { width: 18px; height: 18px; accent-color: #15803d; }
.agreement-signature { display: grid; gap: 6px; color: #334155; font-size: 12px; font-weight: 800; }
.agreement-signature input { min-height: 47px; padding: 0 12px; border: 1px solid #64748b; border-radius: 10px; color: #0f172a; background: #fff; font: 17px Georgia, 'Times New Roman', serif; }
/* Scope verification colors to workspace filters, preserving paper signing labels. */
.lease-generator > .lease-draft-actions > .agreement-signature,
.lease-generator > .lease-draft-actions > .agreement-check { color: #a5f3fc; }
[data-theme="light"] .lease-generator > .lease-draft-actions > .agreement-signature,
[data-theme="light"] .lease-generator > .lease-draft-actions > .agreement-check { color: #155e75; }
.agreement-acceptance small { color: #475569; }

@keyframes agreement-document-in { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

.driver-lease-inbox { display: grid; gap: 14px; padding: 22px; border: 1px solid rgb(14 165 233 / 45%); border-radius: 22px; background: linear-gradient(145deg, rgb(3 20 31 / 96%), rgb(8 33 29 / 94%)); overflow: hidden; }
.driver-lease-inbox > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.driver-lease-inbox > header h2 { margin: 5px 0; }
.driver-lease-inbox > header h2, .driver-lease-card > header h3 { color: #f8fafc; }
.driver-lease-inbox > header p { margin: 0; color: var(--muted); }
.driver-lease-inbox__count { flex: 0 0 auto; padding: 8px 12px; border: 1px solid rgb(14 165 233 / 45%); border-radius: 999px; color: #7dd3fc; background: rgb(2 132 199 / 12%); font-size: 12px; font-weight: 900; }
.driver-lease-card { display: grid; gap: 14px; min-width: 0; padding: 18px; border: 1px solid rgb(100 116 139 / 35%); border-radius: 18px; background: rgb(2 8 23 / 62%); }
.driver-lease-card.is-signed { border-color: rgb(34 197 94 / 48%); }
.driver-lease-card > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.driver-lease-card > header h3 { margin: 6px 0 3px; }
.driver-lease-card > header p { margin: 0; color: var(--muted); }
.driver-lease-card > header > strong { color: #fbbf24; white-space: nowrap; }
.driver-lease-card__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.driver-lease-card__facts span { display: grid; gap: 4px; min-width: 0; padding: 11px; border: 1px solid rgb(51 65 85 / 58%); border-radius: 12px; color: #94a3b8; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.driver-lease-card__facts strong { overflow-wrap: anywhere; color: #e2e8f0; font-size: 12px; text-transform: none; }
.driver-lease-card__actions { display: flex; flex-wrap: wrap; gap: 9px; }
.driver-lease-document { color: #0f172a; }
.driver-lease-document__integrity { display: flex; justify-content: space-between; gap: 14px; padding: 11px 13px; border: 1px solid #cbd5e1; border-radius: 10px; color: #475569; background: #f8fafc; font-size: 11px; }
.driver-lease-document__integrity span { overflow-wrap: anywhere; text-align: right; }

/* Light mode needs deeper versions of the same agreement color language.
   The default component colors above are intentionally luminous for the
   dark USAX canvas; on white they lose contrast and make status/action text
   difficult to scan. Keep meaning and layout unchanged while tuning only the
   light-theme surfaces, borders, labels, and controls. */
[data-theme="light"] .agreements-page .agreements-hero,
[data-theme="light"] .agreements-page .agreements-release,
[data-theme="light"] .agreements-page .agreement-card,
[data-theme="light"] .agreements-page .agreements-empty {
  background:
    linear-gradient(145deg, rgb(255 255 255 / 96%), rgb(248 250 252 / 94%)),
    var(--card);
  box-shadow: 0 16px 36px rgb(15 23 42 / 9%), inset 0 1px #fff;
}

[data-theme="light"] .agreements-page .agreements-hero {
  background:
    radial-gradient(circle at 88% 15%, rgb(15 110 86 / 13%), transparent 34%),
    linear-gradient(135deg, rgb(15 110 86 / 8%), transparent 56%),
    var(--card);
}

[data-theme="light"] .agreements-page .agreements-environment--demo,
[data-theme="light"] .agreements-page .agreements-safety__demo {
  color: #92400e;
  background: linear-gradient(145deg, #fff7ed, #fffbeb);
}

[data-theme="light"] .agreements-page .agreements-safety__internal {
  color: #166534;
  background: #f0fdf4;
}

[data-theme="light"] .agreements-page .agreement-queue {
  border-color: #a5f3fc;
  background: #fff;
}

[data-theme="light"] .agreements-page .agreement-queue__item { background: #f8fafc; }

[data-theme="light"] .agreements-page .agreements-environment--production,
[data-theme="light"] .agreements-page .agreements-safety__production.is-ready {
  color: #166534;
  background: linear-gradient(145deg, #f0fdf4, #ecfdf5);
}

[data-theme="light"] .agreements-page .agreements-safety__production.is-locked {
  color: #be123c;
  background: linear-gradient(145deg, #fff1f2, #fff7f7);
}

[data-theme="light"] .agreements-page .agreements-environment,
[data-theme="light"] .agreements-page .agreements-safety > div {
  box-shadow: inset 0 1px #fff, 0 10px 24px rgb(15 23 42 / 7%);
}

[data-theme="light"] .agreements-page .agreements-release {
  border-color: rgb(126 34 206 / 30%);
}

[data-theme="light"] .agreements-page .agreements-release__action label {
  color: #6b21a8;
}

[data-theme="light"] .agreements-page .agreements-release__action select {
  border-color: #a855f7;
  background: #fff;
  box-shadow: 0 0 0 3px rgb(168 85 247 / 8%);
}

[data-theme="light"] .agreements-page .agreements-release__action select:focus-visible,
[data-theme="light"] .agreements-page .agreement-identity input:focus-visible,
[data-theme="light"] .agreements-page .term-field input:focus-visible {
  outline: 3px solid rgb(15 110 86 / 22%);
  outline-offset: 2px;
}

[data-theme="light"] .agreements-page .agreement-review-loading {
  border-color: rgb(29 78 216 / 35%);
  color: #1e40af;
  background: #eff6ff;
}

[data-theme="light"] .agreements-page .agreement-review {
  border-color: rgb(14 116 144 / 30%);
  background: linear-gradient(145deg, #ecfeff, #f8fafc);
  box-shadow: inset 0 1px #fff;
}

[data-theme="light"] .agreements-page .agreement-review__heading > div span {
  color: #0e7490;
}

[data-theme="light"] .agreements-page .agreement-source--green {
  color: #166534;
  background: #f0fdf4;
}

[data-theme="light"] .agreements-page .agreement-source--blue {
  color: #1d4ed8;
  background: #eff6ff;
}

[data-theme="light"] .agreements-page .agreement-identity input,
[data-theme="light"] .agreements-page .term-field > div {
  border-color: #cbd5e1;
  background: #fff;
  box-shadow: inset 0 1px #fff, 0 1px 2px rgb(15 23 42 / 5%);
}

[data-theme="light"] .agreements-page .term-field--gold { color: #92400e; }
[data-theme="light"] .agreements-page .term-field--green { color: #166534; }
[data-theme="light"] .agreements-page .term-field--purple { color: #6b21a8; }

[data-theme="light"] .agreements-page .agreement-review__message--error {
  color: #b91c1c !important;
  background: #fef2f2;
}

[data-theme="light"] .agreements-page .agreement-review__message--warning {
  color: #92400e !important;
  background: #fffbeb;
}

[data-theme="light"] .agreements-page .agreement-review__message--ready {
  color: #166534 !important;
  background: #f0fdf4;
}

[data-theme="light"] .agreements-page .agreements-secondary {
  color: #1e3a8a;
  border-color: #93c5fd;
  background: linear-gradient(145deg, #eff6ff, #dbeafe);
}

[data-theme="light"] .agreements-page .agreements-count {
  color: #0e7490;
  background: #cffafe;
}

[data-theme="light"] .agreements-page .agreement-card--green,
[data-theme="light"] .agreements-page .agreement-status--green { color: #15803d; }
[data-theme="light"] .agreements-page .agreement-card--red,
[data-theme="light"] .agreements-page .agreement-status--red { color: #be123c; }
[data-theme="light"] .agreements-page .agreement-card--purple,
[data-theme="light"] .agreements-page .agreement-status--purple { color: #7e22ce; }
[data-theme="light"] .agreements-page .agreement-card--blue,
[data-theme="light"] .agreements-page .agreement-status--blue { color: #1d4ed8; }
[data-theme="light"] .agreements-page .agreement-card--amber,
[data-theme="light"] .agreements-page .agreement-status--amber { color: #92400e; }

[data-theme="light"] .agreements-page .agreement-status {
  background: color-mix(in srgb, currentColor 8%, #fff);
}

[data-theme="light"] .agreements-page .agreement-terms > div {
  border-color: #dbe3ec;
  background: #f8fafc;
}

[data-theme="light"] .agreements-page .agreement-card__error {
  color: #b91c1c !important;
  background: #fef2f2;
}

[data-theme="light"] .agreements-page .agreements-alert {
  color: #1e40af;
  background: #eff6ff;
}

[data-theme="light"] .agreements-page .agreements-alert--error {
  color: #b91c1c;
  background: #fef2f2;
}

/* The retained document stays white in both themes; keep its void warning readable. */
.agreements-page .agreement-document .agreements-alert--error {
  color: #881337;
  background: #fff1f2;
  border-color: #e11d48;
}

[data-theme="light"] .agreements-page .agreements-footnote {
  border-left-color: #0891b2;
  background: #ecfeff;
}

@media (max-width: 960px) {
  .termination-builder { grid-template-columns: 1fr; }
  .termination-records { grid-template-columns: 1fr; }
  .lease-generator__workspace { grid-template-columns: 1fr; }
  .agreements-grid { grid-template-columns: 1fr; }
  .agreements-release { grid-template-columns: 1fr; }
  .agreements-workspace { grid-template-columns: 1fr; }
  .agreements-safety--native { grid-template-columns: 1fr; }
  .lease-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lease-records article { grid-template-columns: 90px minmax(0, 1fr); }
  .lease-records article > :nth-child(3), .lease-records article > :nth-child(4) { grid-column: 2; }
  .lease-void-panel { grid-template-columns: 1fr; }
  .lease-void-panel > div { justify-content: stretch; }
  .lease-void-panel > div .btn { flex: 1; }
}

@media (max-width: 700px) {
  .agreement-tool-switcher { grid-template-columns: 1fr; }
  .termination-heading { display: grid; padding: 17px; }
  .termination-policy-badge { width: fit-content; }
  .termination-builder { padding: 14px; border-radius: 18px; }
  .termination-builder__form { grid-template-columns: 1fr; }
  .termination-field--details { grid-column: auto; }
  .termination-probation { grid-template-columns: 1fr; }
  .termination-preview dl div { grid-template-columns: 78px minmax(0, 1fr); }
  .termination-card > header { flex-direction: column; }
  .termination-card__facts { grid-template-columns: 1fr; }
  .termination-card > footer { display: grid; grid-template-columns: 1fr; }
  .termination-card > footer .btn { width: 100%; }
  .termination-void-panel { grid-template-columns: 1fr; }
  .termination-document__identity { grid-template-columns: 1fr; }
  .lease-generator { padding: 15px; border-radius: 18px; }
  .lease-generator__heading { display: grid; }
  .lease-template-state { width: fit-content; }
  .lease-generator__form { grid-template-columns: 1fr; }
  .lease-scope { grid-template-columns: 1fr; }
  .lease-rate { grid-template-columns: minmax(72px, 96px) minmax(0, 1fr); }
  .lease-field small { min-height: auto; }
  .lease-preview dl div { grid-template-columns: 88px minmax(0, 1fr); }
  .lease-history article { grid-template-columns: 1fr auto; }
  .lease-history article span:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .lease-tabs button { min-height: 64px; padding: 10px; }
  .lease-tabs button > span { font-size: 17px; }
  .lease-tabs button b { font-size: 12px; }
  .lease-tabs button small { font-size: 10px; }
  .lease-branding__logos { grid-template-columns: 1fr; }
  .agreements-page { width: 100%; gap: 13px; }
  .agreements-hero { align-items: stretch; flex-direction: column; padding: 18px; }
  .agreements-environment { min-width: 0; width: 100%; box-shadow: inset 0 1px rgb(255 255 255 / 18%); }
  .agreements-safety { grid-template-columns: 1fr; }
  .agreements-release { gap: 16px; padding: 15px; border-radius: 18px; }
  .agreements-release__intro h2 { font-size: clamp(24px, 8vw, 32px); line-height: 1.08; }
  .agreements-release__action > .btn { width: 100%; min-height: 48px; }
  .agreement-review { gap: 11px; padding: 12px; border-radius: 14px; }
  .agreement-queue { padding: 15px; border-radius: 18px; }
  .agreement-card { padding: 16px; }
  .agreement-card header { align-items: flex-start; }
  .agreement-terms { gap: 6px; }
  .agreement-terms > div { padding: 9px; }
  .agreement-card footer { display: grid; grid-template-columns: 1fr; }
  .agreement-card footer .btn { width: 100%; }
  .agreement-document__parties { grid-template-columns: 1fr; }
  .agreement-review__heading { align-items: flex-start; flex-direction: column; }
  .agreement-identity { grid-template-columns: 1fr; }
  .agreement-editable-terms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .term-field--purple { grid-column: 1 / -1; }
  .driver-lease-inbox { padding: 15px; border-radius: 18px; }
  .driver-lease-inbox > header, .driver-lease-card > header { flex-direction: column; }
  .driver-lease-card__facts { grid-template-columns: 1fr; }
  .driver-lease-card__actions { display: grid; grid-template-columns: 1fr; }
  .driver-lease-card__actions .btn { width: 100%; }
  .driver-lease-document__integrity { flex-direction: column; }
  .driver-lease-document__integrity span { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .agreement-document { animation: none; }
  .agreement-queue__item { transition: none; }
  .agreement-queue__item:hover { transform: none; }
  .lease-tabs button { transition: none; }
}

@media print {
  body * { visibility: hidden !important; }
  .agreement-document,
  .agreement-document *,
  .termination-document,
  .termination-document * { visibility: visible !important; }
  .agreement-document,
  .termination-document { position: absolute; inset: 0; width: 100%; border: 0; box-shadow: none; }
  .agreement-acceptance { display: none !important; }
  .termination-acknowledgment { display: none !important; }
}

@media (max-width: 390px) {
  .agreements-release { padding: 13px; }
  .agreement-review__heading { gap: 8px; }
  .agreement-source { width: 100%; white-space: normal; text-align: center; }
  .agreement-readiness-row { display: grid; grid-template-columns: 1fr; }
  .agreement-readiness-row span { width: 100%; border-radius: 10px; }
  .agreement-card header { flex-direction: column; }
  .agreement-terms { grid-template-columns: 1fr; }
  .agreement-timeline span { align-items: flex-start; flex-direction: column; gap: 2px; }
  .agreement-timeline strong { text-align: left; }
  .agreement-editable-terms { grid-template-columns: 1fr; }
  .term-field--purple { grid-column: auto; }
}

/* Complete reviews span the record; operational actions stay outside printed text. */
.lease-record-review, .lease-record-lineage { grid-column: 1 / -1; min-width: 0; }
.lease-record-review { width: 100%; }
.lease-release-review, .agreement-staff-actions { display: grid; gap: 12px; padding: 16px; background: color-mix(in srgb, #0d9488 9%, transparent); }
.lease-record-lineage, .agreement-document-hash, .driver-lease-document__integrity { overflow-wrap: anywhere; }
.lease-template-manager { display: grid; gap: 16px; min-width: 0; width: 100%; padding: 18px; border: 1px solid #8b5cf666; border-radius: 16px; background: color-mix(in srgb, #8b5cf6 6%, transparent); }
.lease-template-manager label { display: grid; gap: 7px; min-width: 0; }
.lease-template-manager input:not([type=checkbox]), .lease-template-manager select, .lease-template-manager textarea { width: 100%; max-width: 100%; box-sizing: border-box; padding: 10px; border: 1px solid #94a3b8; border-radius: 8px; color: var(--text-primary, #0f172a); background: var(--bg-card, #fff); }
.lease-template-manager fieldset { display: grid; gap: 18px; border: 0; padding: 0; min-width: 0; }
.lease-template-identity { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.lease-template-section { display: grid; gap: 10px; padding: 16px; border-left: 3px solid #8b5cf6; }
.lease-template-publish { display: grid; gap: 12px; padding: 16px; border-left: 3px solid #0d9488; }
.lease-template-manager .agreement-check { display: flex; }
.lease-template-review { margin: 0; }
@media (max-width: 640px) { .lease-template-identity { grid-template-columns: 1fr; } .lease-template-manager { padding: 12px; } .lease-template-section { padding: 10px; } }
@media print {
  body[data-agreement-print] .agreement-document:not([data-print-target]),
  body[data-agreement-print] .termination-document:not([data-print-target]) { display: none !important; }
  body[data-agreement-print] [data-print-target], body[data-agreement-print] [data-print-target] * { visibility: visible !important; }
  body[data-agreement-print] [data-print-target] .agreement-acceptance { display: none !important; }
  body[data-agreement-print] [data-print-target] { animation: none; color: #111; background: white; overflow: visible; }
}
.agreement-staff-actions .agreement-check, .lease-release-review .agreement-check, .lease-template-publish .agreement-check { color: var(--foreground); }
.lease-template-manager input:not([type=checkbox]), .lease-template-manager select, .lease-template-manager textarea { color: var(--foreground); background: var(--card); }
[data-theme="light"] .lease-field--driver { color: #1d4ed8; }
[data-theme="light"] .lease-field--vehicle { color: #7e22ce; }
[data-theme="light"] .lease-field--mc { color: #166534; }
[data-theme="light"] .lease-field--date { color: #92400e; }
[data-theme="light"] .lease-field--rate { color: #0e7490; }
[data-theme="light"] .lease-tabs button.is-active, [data-theme="light"] .lease-scope legend, [data-theme="light"] .agreements-print { color: #854d0e; }
[data-theme="light"] .lease-template-state.is-ready { color: #166534; }
[data-theme="light"] .lease-template-state.is-blocked { color: #92400e; }
.lease-template-review h2 { color: #0f172a; }
.lease-template-review > p { color: #475569; }

/* Preserve workflow color cues with readable contrast in light mode. */
[data-theme="light"] .agreement-tool-switcher button.is-active { color: #166534; }
[data-theme="light"] .agreement-tool-switcher button.is-active.is-termination { color: #9f1239; }
[data-theme="light"] .agreements-safety__signature { color: #1d4ed8; }
[data-theme="light"] .agreements-safety__vault { color: #854d0e; }

/* Keep the company authorization panel readable inside dark release reviews. */
[data-theme="dark"] .lease-release-review .agreement-acceptance { background: #102e35; color: #e2f5f8; }
[data-theme="dark"] .lease-release-review .agreement-acceptance h3 { color: #a5f3fc !important; }
[data-theme="dark"] .lease-release-review .agreement-acceptance .agreements-alert { color: #dbeafe; background: #172f50; border-color: #60a5fa; }
[data-theme="dark"] .lease-release-review .agreement-acceptance .agreement-signature { color: #e2f5f8; }
.signed-lease-pdf { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 16px; margin-block: 12px; border: 1px solid #38bdf8; border-radius: 12px; background: color-mix(in srgb, #0891b2 10%, var(--card)); color: var(--foreground); min-width: 0; }
.signed-lease-pdf.is-ready { border-color: #34d399; }
.signed-lease-pdf.is-pending { border-color: #f59e0b; }
.signed-lease-pdf.is-failed { border-color: #ef4444; }
.signed-lease-pdf > div:first-child { flex: 1 1 260px; min-width: 0; }
.signed-lease-pdf p { margin: 6px 0; overflow-wrap: anywhere; }
.signed-lease-pdf__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.signed-lease-pdf .btn { white-space: normal; }
.signed-lease-pdf .btn:focus-visible { outline: 3px solid #38bdf8; outline-offset: 3px; }
.lease-tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.lease-equipment-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.lease-generator__form > h3, .lease-generator__form > .lease-equipment-pair, .lease-generator__form > .lease-draft-note, .lease-generator__form > .lease-draft-actions, .lease-generator__form > details, .lease-generator__form > .agreement-check { grid-column: 1 / -1; }
.lease-tabs button { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; }
.lease-preview .agreements-section-label { color: #6ee7b7; }
.lease-preview details { color: #e2e8f0; }
.lease-preview summary { color: #bae6fd; white-space: normal; overflow-wrap: anywhere; }
.lease-generator, .driver-lease-inbox, .agreement-document { overflow-wrap: anywhere; }
.lease-generator small, .lease-generator strong, .lease-generator dd, .driver-lease-card strong, .agreement-document strong, .agreement-queue__item strong { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
.lease-tabs button b, .lease-tabs button small { overflow: visible; text-overflow: clip; white-space: normal; }
.lease-records article small, .lease-history article small { overflow: visible; text-overflow: clip; white-space: normal; }
.lease-equipment-verification { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.lease-equipment-verification article { padding: 16px; border: 1px solid #a855f7; border-radius: 12px; background: color-mix(in srgb,#a855f7 8%,var(--card)); color: var(--foreground); min-width: 0; }
.lease-equipment-verification dl { display: grid; gap: 8px; margin: 0; }
.lease-equipment-verification dt { font-size: 12px; color: var(--muted-foreground); }
.lease-equipment-verification dd { margin: 0; white-space: normal; overflow-wrap: anywhere; }
.lease-draft-actions, .lease-management-actions { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; min-width: 0; }
.lease-management-actions { grid-column: 1 / -1; justify-content: flex-end; }
.lease-records article > .lease-management-actions { display: flex; }
[data-theme="light"] .lease-void-button { color: #9f1239; }
.lease-draft-note { padding: 12px; border-left: 3px solid #f59e0b; background: color-mix(in srgb, #f59e0b 8%, var(--card)); color: var(--foreground); overflow-wrap: anywhere; }
.lease-draft-list { display: grid; gap: 16px; }
.lease-draft-list article { padding: 18px; border: 1px solid #38bdf8; border-radius: 14px; background: var(--card); }
.lease-delete-confirm { position: fixed; inset: 50% auto auto 50%; transform: translate(-50%,-50%); z-index: 10000; width: min(560px,calc(100vw - 32px)); box-sizing: border-box; padding: 24px; border: 2px solid #ef4444; border-radius: 16px; background: var(--card); color: var(--foreground); box-shadow: 0 0 0 100vmax rgb(0 0 0 / 65%); }
@media (max-width: 600px) {
  .lease-tabs { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .lease-equipment-pair { grid-template-columns: minmax(0,1fr); }
  .lease-equipment-verification { grid-template-columns: minmax(0,1fr); }
  .lease-draft-actions .btn, .lease-management-actions .btn { flex: 1 1 140px; }
  .signed-lease-pdf__actions { width: 100%; }
  .signed-lease-pdf__actions .btn { flex: 1 1 140px; }
  .lease-records article > .lease-record-actions { grid-column: 1 / -1; flex-wrap: wrap; }
  .lease-record-actions .btn { flex: 1 1 140px; }
}

/* An expanded clause editor must not stretch a short preview into an empty page-height rail. */
.lease-generator__workspace { align-items: start; }

[data-theme="light"] .lease-tabs button.is-active b,
[data-theme="light"] .lease-tabs button.is-active small { color: #854d0e; }

/* Confirmation stays visible when signing a long document; color is paired with text. */
.agreement-success-popup { position: fixed; z-index: 1100; inset-inline: 16px; bottom: max(20px, env(safe-area-inset-bottom)); margin-inline: auto; width: min(640px, calc(100% - 32px)); box-sizing: border-box; display: flex; align-items: center; gap: 14px; padding: 18px; border: 2px solid #15803d; border-radius: 16px; background: #f0fdf4; color: #14532d; box-shadow: 0 12px 40px rgb(0 0 0 / 25%); overflow-wrap: anywhere; }
.agreement-success-popup p { margin: 5px 0 0; }
.agreement-success-check { border-radius: 50%; background: #15803d; color: white; padding: 8px 12px; font-size: 24px; }
.lease-signature-method { min-width: 0; border: 1px solid #0891b2; border-radius: 10px; padding: 12px; }
.lease-signature-method > div:first-of-type { display: flex; flex-wrap: wrap; gap: 8px; }
.lease-signature-method button[aria-pressed="true"] { background: #cffafe; border-color: #0e7490; color: #164e63; }
.lease-signature-pad { min-width: 0; }
.lease-signature-pad svg { display: block; width: 100%; height: 180px; background: #fff; color: #172554; border: 2px solid #0e7490; border-radius: 8px; box-sizing: border-box; cursor: crosshair; }
.lease-signature-pad svg:focus-visible { outline: 3px solid #ca8a04; outline-offset: 3px; }
.lease-signature-pad > div { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding-top: 8px; }
[data-theme="dark"] .agreement-success-popup { background: #052e16; color: #dcfce7; border-color: #4ade80; }
[data-theme="dark"] .lease-signature-method button[aria-pressed="true"] { background: #164e63; color: #cffafe; border-color: #22d3ee; }
@media (max-width: 500px) { .agreement-success-popup { flex-wrap: wrap; padding: 12px; } }
@media print { .agreement-success-popup, .lease-signature-method { display: none !important; } }

.lease-retained-drawing { width: min(100%, 600px); height: 180px; background: #fff; color: #172554; border: 1px solid #0891b2; border-radius: 8px; }
.agreement-error-popup { position: fixed; z-index: 1101; inset-inline: 16px; bottom: 20px; margin-inline: auto; width: min(640px, calc(100% - 32px)); box-sizing: border-box; background: #fff1f2; color: #881337; border: 2px solid #be123c; border-radius: 12px; padding: 18px; box-shadow: 0 12px 40px rgb(0 0 0 / 25%); overflow-wrap: anywhere; }
[data-theme="dark"] .agreement-error-popup { background: #4c0519; color: #ffe4e6; border-color: #fb7185; }
@media print { .agreement-error-popup { display: none !important; } }
.agreement-success-popup > div { flex: 1; min-width: 0; }
.agreement-success-popup > button { flex-shrink: 0; white-space: nowrap; }
.lease-signature-pad svg { max-width: 600px; height: auto; aspect-ratio: 10 / 3; }
[data-theme="dark"] .agreement-acceptance { background: #102e35; color: #e2f5f8; }
[data-theme="dark"] .agreement-acceptance h3 { color: #a5f3fc !important; }
[data-theme="dark"] .agreement-acceptance .agreement-signature { color: #e2f5f8; }
.agreement-success-popup > button { background: #fff; color: #14532d; border: 1px solid #15803d; }
.agreement-success-popup > button:hover { background: #dcfce7; }
[data-theme="dark"] .agreement-success-popup > button { background: #14532d; color: #dcfce7; border-color: #4ade80; }
[data-theme="dark"] .agreement-success-popup > button:hover { background: #166534; }
.agreement-error-popup button { background: #fff; color: #881337; border: 1px solid #be123c; }
[data-theme="dark"] .agreement-error-popup button { background: #881337; color: #ffe4e6; border-color: #fb7185; }
.lease-signature-pad button { background: #cffafe; color: #164e63; border: 1px solid #0e7490; }
.lease-signature-pad button:hover { background: #a5f3fc; }
.lease-signature-pad button:disabled { opacity: .55; }
[data-theme="dark"] .lease-signature-pad button { background: #164e63; color: #cffafe; border-color: #22d3ee; }
[data-theme="dark"] .lease-release-review .agreement-acceptance .agreements-alert--error { background: #4c0519; color: #ffe4e6; border-color: #fb7185; }

/* Opaque action surfaces keep labels readable in embedded and route workspaces. */
.lease-generator .btn.agreements-primary { color: #052e16; background: #86efac; border-color: #16a34a; }
.lease-generator .btn.agreements-secondary { color: #eff6ff; background: #1e3a8a; border-color: #60a5fa; }
[data-theme="light"] .lease-generator .btn.agreements-secondary { color: #1e3a8a; background: #dbeafe; border-color: #2563eb; }
.lease-generator .btn.agreements-primary:disabled,
.lease-generator .btn.agreements-secondary:disabled { opacity: 1; color: #475569; background: #e2e8f0; border-color: #94a3b8; cursor: not-allowed; box-shadow: none; }
.lease-generator .btn.agreements-primary:focus-visible,
.lease-generator .btn.agreements-secondary:focus-visible { outline: 3px solid #f59e0b; outline-offset: 3px; }
.lease-draft-progress { grid-column: 1 / -1; min-width: 0; padding: 14px; border: 1px solid #38bdf8; border-left: 4px solid #38bdf8; border-radius: 10px; background: var(--card); color: var(--foreground); overflow-wrap: anywhere; }
.lease-draft-progress h4 { margin: 0 0 8px; }
.lease-draft-progress p { margin: 8px 0 0; }
.lease-draft-progress ul { margin: 0; padding-inline-start: 20px; }
/* Agreement-only driver directory actions; retained contracts are independent. */
.agreement-queue-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px; align-items: start; min-width: 0; }
.agreement-queue-row > .agreement-queue__item { width: 100%; }
.agreement-queue-row.is-hidden > span { display: grid; gap: 5px; padding: 10px; overflow-wrap: anywhere; }
.agreement-queue-row small { color: var(--muted-foreground); }
.agreement-directory-view { display: grid; gap: 6px; margin: 10px 0; }
.agreement-directory-view select { width: 100%; padding: 10px; color: var(--text); background: var(--bg-card); border: 1px solid #397c8b; border-radius: 8px; }
.agreement-driver-actions { min-width: 0; }
.agreement-driver-actions > button { min-height: 44px; padding: 9px 10px; }
.agreement-driver-menu { display: grid; gap: 5px; padding: 6px 0; }
.agreement-driver-action { min-height: 44px; border-radius: 8px; border: 1px solid; padding: 10px; text-align: left; white-space: normal; }
.agreement-driver-action.is-rename { background: #164e63; color: #ecfeff; border-color: #22d3ee; }
.agreement-driver-action.is-archive { background: #581c87; color: #faf5ff; border-color: #c084fc; }
.agreement-driver-action.is-soft_delete { background: #881337; color: #fff1f2; border-color: #fb7185; }
.agreement-driver-action.is-restore { background: #14532d; color: #f0fdf4; border-color: #4ade80; }
.agreement-driver-backdrop { position: fixed; inset: 0; z-index: 1200; background: rgb(0 0 0 / 65%); display: grid; place-items: center; padding: 16px; }
.agreement-driver-dialog { width: min(100%,520px); max-height: 90svh; overflow-y: auto; box-sizing: border-box; padding: 20px; background: var(--bg-card,#10262b); color: var(--text,#edf6f8); border: 1px solid #397c8b; border-radius: 12px; }
.agreement-driver-dialog textarea { min-height: 80px; }
.agreement-driver-dialog input,.agreement-driver-dialog textarea { width: 100%; box-sizing: border-box; padding: 10px; color: inherit; background: var(--bg-input,var(--bg-card)); border: 1px solid #397c8b; border-radius: 8px; }
@media (max-width: 600px) { .agreement-queue-row { grid-template-columns: minmax(0,1fr); } .agreement-driver-menu { grid-template-columns: minmax(0,1fr); } }
.agreement-queue-row:has(.agreement-driver-menu) { grid-template-columns: minmax(0,1fr); }
.agreement-driver-actions:has(.agreement-driver-menu) { width: 100%; }
.agreements-page .agreement-driver-dialog .agreement-signature { color: inherit; }
[data-theme="light"] .agreement-driver-dialog { background: #ffffff; color: #0f172a; }
[data-theme="light"] .agreement-driver-dialog input,[data-theme="light"] .agreement-driver-dialog textarea { background: #f8fafc; }

.agreement-driver-action.is-upload { background: #cffafe; color: #155e75; border-color: #0891b2; }
.agreement-driver-dialog input[type=file] { width:100%; min-width:0; color:inherit; }
.imported-docusign-records { min-width:0; }
.imported-docusign-records p, .imported-docusign-records h3 { overflow-wrap:anywhere; }
.agreement-driver-dialog .agreement-check { color:inherit; align-items:flex-start; }
.agreement-driver-dialog input[type=checkbox] { width:18px; height:18px; flex-shrink:0; margin-top:3px; }


/* Agreement execution details: each label, control and help text owns a row. */
.lease-term-fields fieldset { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; border: 0; min-width: 0; }
.lease-term-fields fieldset > label { display: grid; gap: 8px; min-width: 0; padding: 12px; border: 1px solid color-mix(in srgb, #8b5cf6 45%, var(--border)); border-radius: 12px; background: color-mix(in srgb, #8b5cf6 7%, var(--background)); }
.lease-term-fields label > span { font-weight: 700; overflow-wrap: anywhere; }
.lease-term-fields textarea { box-sizing: border-box; width: 100%; min-width: 0; min-height: 80px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; color: var(--foreground); background: var(--background); font: inherit; resize: vertical; }
.lease-term-fields small { color: var(--muted-foreground); line-height: 1.5; overflow-wrap: anywhere; }
.lease-term-fields textarea:focus-visible { outline: 2px solid #8b5cf6; outline-offset: 2px; }
@media (max-width: 640px) { .lease-term-fields fieldset { grid-template-columns: minmax(0, 1fr); } }


.lease-generator__form > .lease-field--driver, .agreement-driver-refresh { grid-column: 1 / -1; }
.agreement-driver-refresh { display: flex; justify-content: flex-start; }


/* Agreement action colors: review purple, copies cyan, edits blue, archive orange,
   save/restore green, signature preparation gold, permanent deletion red. */
.agreement-action--review { --agreement-action-bg: #6d28d9; --agreement-action-hover: #5b21b6; --agreement-action-edge: #c4b5fd; }
.agreement-action--print { --agreement-action-bg: #0e7490; --agreement-action-hover: #155e75; --agreement-action-edge: #67e8f9; }
.agreement-action--edit { --agreement-action-bg: #1d4ed8; --agreement-action-hover: #1e40af; --agreement-action-edge: #93c5fd; }
.agreement-action--archive { --agreement-action-bg: #c2410c; --agreement-action-hover: #9a3412; --agreement-action-edge: #fdba74; }
.agreement-action--save, .agreement-action--restore { --agreement-action-bg: #15803d; --agreement-action-hover: #166534; --agreement-action-edge: #86efac; }
.agreement-action--prepare { --agreement-action-bg: #854d0e; --agreement-action-hover: #713f12; --agreement-action-edge: #facc15; }
.agreement-action--delete { --agreement-action-bg: #b91c1c; --agreement-action-hover: #991b1b; --agreement-action-edge: #fca5a5; }
.agreement-action--cancel { --agreement-action-bg: #475569; --agreement-action-hover: #334155; --agreement-action-edge: #cbd5e1; }
:is(.lease-generator, .driver-lease-inbox, .lease-records) .btn[class*="agreement-action--"]:not(:disabled) {
  color: #fff;
  background: var(--agreement-action-bg);
  border-color: var(--agreement-action-edge);
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 22%), 0 3px 8px rgb(0 0 0 / 18%);
}
:is(.lease-generator, .driver-lease-inbox, .lease-records) .btn[class*="agreement-action--"]:not(:disabled):hover { background: var(--agreement-action-hover); color: #fff; }
:is(.lease-generator, .driver-lease-inbox, .lease-records) .btn[class*="agreement-action--"]:disabled { opacity: 1; color: #475569; background: #e2e8f0; border-color: #94a3b8; box-shadow: none; cursor: not-allowed; }
:is(.lease-generator, .driver-lease-inbox, .lease-records) .btn[class*="agreement-action--"]:focus-visible { outline: 3px solid #0f172a; outline-offset: 3px; box-shadow: 0 0 0 3px #fff; }
.lease-tabs button[data-stage="create"] { --agreement-tab-bg: #166534; --agreement-tab-edge: #4ade80; }
.lease-tabs button[data-stage="drafts"] { --agreement-tab-bg: #155e75; --agreement-tab-edge: #22d3ee; }
.lease-tabs button[data-stage="queue"] { --agreement-tab-bg: #6d28d9; --agreement-tab-edge: #c4b5fd; }
.lease-tabs button[data-stage="vault"] { --agreement-tab-bg: #854d0e; --agreement-tab-edge: #facc15; }
.lease-tabs button[data-stage="branding"] { --agreement-tab-bg: #1e40af; --agreement-tab-edge: #93c5fd; }
.lease-generator .lease-tabs button[data-stage] { background: color-mix(in srgb, var(--agreement-tab-bg) 28%, var(--card)); color: var(--foreground); border-color: var(--agreement-tab-edge); border-inline-start: 4px solid var(--agreement-tab-edge); }
.lease-generator .lease-tabs button[data-stage].is-active { background: var(--agreement-tab-bg); color: #fff; }
.lease-generator .lease-tabs button[data-stage] :is(b, small) { color: inherit; }
.lease-generator .lease-tabs button[data-stage]:hover { background: var(--agreement-tab-bg); color: #fff; }
.lease-generator .lease-tabs button[data-stage]:focus-visible { outline: 3px solid #0f172a; outline-offset: 3px; box-shadow: 0 0 0 3px #fff; }

/* Agreement-only equipment intake uses the existing centered workspace. */
.lease-equipment-editor { grid-column:1 / -1; min-width:0; padding:16px; border:1px solid #0891b2; border-radius:14px; background:rgb(8 145 178 / 8%); }
.lease-equipment-editor h4 { margin:0 0 8px; color:var(--foreground); }
.lease-equipment-editor fieldset { min-width:0; margin:14px 0 0; padding:12px; border:1px solid #0891b2; border-radius:10px; }
.lease-equipment-editor legend { font-weight:800; color:var(--foreground); }
.lease-equipment-source { overflow-wrap:anywhere; }
.lease-equipment-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
@media(max-width:600px) { .lease-equipment-fields { grid-template-columns:minmax(0,1fr); } }

.lease-signing-guide { margin:12px 0; padding:14px; border:1px solid #8b5cf6; border-radius:12px; background:rgb(139 92 246 / 8%); color:var(--foreground); overflow-wrap:anywhere; }
.lease-signing-guide p { margin:8px 0; }

/* The signed-PDF design also governs browser-generated agreement copies. */
.agreement-certificate, .termination-acknowledged {
  display: grid; gap: 10px; padding: 18px; border: 1px solid #b3d9c2;
  border-radius: 9px; color: #166448; background: #eff8f2;
  break-inside: avoid; overflow-wrap: anywhere;
}
.agreement-certificate strong, .termination-acknowledged strong {
  font-family: Arial, Helvetica, sans-serif; font-size: 24px;
  font-style: normal; font-weight: 400; color: #24332e;
}
.agreement-document .agreement-certificate small, .termination-document .termination-acknowledged small { color: #596e64; }
@media print {
  @page usax-agreement { size: letter; margin: 18mm 17mm; }
  body[data-agreement-print] { page: usax-agreement; }
  body[data-agreement-print] [data-print-target] {
    display: block; padding: 0; margin: 0; border: 0; border-radius: 0;
    font: 10pt/1.45 Arial, Helvetica, sans-serif; color: #24332e;
    print-color-adjust: exact; -webkit-print-color-adjust: exact;
  }
  [data-print-target] .agreement-document__masthead,
  [data-print-target] .termination-document__masthead { border-bottom: 2px solid #166448; padding-bottom: 12pt; margin-bottom: 16pt; }
  [data-print-target] h2 { color: #166448; font-size: 23pt; line-height: 1.2; }
  [data-print-target] h3 { color: #166448; font-size: 11.5pt; break-after: avoid; }
  [data-print-target] p { orphans: 2; widows: 2; margin: 0 0 9pt; }
  [data-print-target] .agreement-document__parties,
  [data-print-target] .termination-document__identity { background: #eff8f2; padding: 12pt; break-inside: avoid; }
  [data-print-target] .agreement-certificate,
  [data-print-target] .termination-acknowledged { background: #eff8f2 !important; color: #166448 !important; border: 1px solid #b3d9c2; box-shadow: none; margin: 16pt 0; }
  [data-print-target] .agreement-certificate small { overflow-wrap: anywhere; }
}

.lease-driver-details { grid-column: 1 / -1; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,240px),1fr)); gap: 12px; border: 1px solid rgb(59 130 246 / 45%); border-radius: 12px; padding: 12px; }
.lease-driver-details legend { color: #60a5fa; padding-inline: 6px; }
[data-theme="light"] .lease-driver-details legend { color: #1d4ed8; }
.onboarding-diagnostics { margin-block: 16px; padding: 16px; min-width: 0; border: 1px solid var(--border, #94a3b8); border-left: 4px solid #d97706; border-radius: 12px; background: var(--card, #fff); color: var(--foreground, inherit); }
.onboarding-diagnostics header, .onboarding-diagnostics__search { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.onboarding-diagnostics p { margin: 6px 0; overflow-wrap: anywhere; }
.onboarding-diagnostics button, .onboarding-diagnostics a { white-space: normal; overflow-wrap: anywhere; max-width: 100%; }
.onboarding-diagnostics header > button { border-color: #0891b2; }
.onboarding-diagnostics__body { margin-top: 14px; }
.onboarding-diagnostics__search label { display: grid; gap: 6px; flex: 1 1 220px; min-width: 0; }
.onboarding-diagnostics__queue, .onboarding-diagnostics__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.onboarding-diagnostics__queue button { border-color: #d97706; text-align: left; }
.onboarding-diagnostics__result { margin-top: 16px; min-width: 0; }
.onboarding-diagnostics__result ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 10px; padding: 0; list-style: none; }
.onboarding-diagnostics__result li { border: 1px solid var(--border, #94a3b8); border-left-width: 4px; border-radius: 8px; padding: 12px; }
.onboarding-diagnostics .diagnostic-tone-green { border-left-color: #16a34a; }
.onboarding-diagnostics .diagnostic-tone-orange { border-left-color: #d97706; }
.onboarding-diagnostics .diagnostic-tone-red { border-left-color: #dc2626; }
.onboarding-diagnostics .diagnostic-tone-blue { border-left-color: #2563eb; }
.onboarding-diagnostics__error { border-left: 4px solid #dc2626; padding: 8px; }
.onboarding-diagnostics :focus-visible { outline: 3px solid #0891b2; outline-offset: 3px; }
@media (max-width: 640px) { .onboarding-diagnostics { padding: 12px; } .onboarding-diagnostics header > button { width: 100%; } }

.guided-driver-setup { flex: 1 1 100%; min-width: 0; padding: 14px; border: 1px solid var(--border, #94a3b8); border-radius: 10px; }
.guided-driver-setup h4 { margin: 0 0 8px; }
.guided-driver-setup__check { border-color: #2563eb; }
.guided-driver-setup__save { border-color: #16a34a; }
.guided-driver-setup__review { border-left: 4px solid #9333ea; padding: 10px; }
.guided-driver-setup__success { border-left: 4px solid #16a34a; padding: 10px; }
.guided-driver-setup__confirm { display: grid; gap: 12px; margin-top: 12px; }
.guided-driver-setup__confirm label { display: block; overflow-wrap: anywhere; }
.guided-driver-setup textarea { display: block; box-sizing: border-box; width: 100%; min-height: 76px; }
.guided-driver-setup button:disabled { opacity: .55; cursor: not-allowed; }
.invitation-handoff { padding: 12px; margin-block: 0 16px; border: 1px solid var(--handoff-color); border-inline-start-width: 4px; border-radius: 8px; background: var(--handoff-bg); color: var(--handoff-color); overflow-wrap: anywhere; }
.invitation-handoff--blue { --handoff-color: #1e40af; --handoff-bg: #eff6ff; }
.invitation-handoff--green { --handoff-color: #166534; --handoff-bg: #f0fdf4; }
.invitation-handoff--orange { --handoff-color: #9a3412; --handoff-bg: #fff7ed; }
.invitation-handoff--purple { --handoff-color: #6b21a8; --handoff-bg: #faf5ff; }
.invitation-handoff p { margin-block: 6px 10px; font-size: 13px; line-height: 1.5; }
.invitation-handoff small { display: block; margin-block-start: 8px; }
.invitation-handoff .invitation-handoff__retry { color: #fff; background: #1e40af; white-space: normal; max-width: 100%; }
.invitation-handoff__retry:hover { background: #1e3a8a; }
.invitation-handoff__retry:focus-visible { outline: 3px solid #2563eb; outline-offset: 3px; }
/*$vite$:1*/