:root {
  color-scheme: light;
  --green-950: #0c3025;
  --green-900: #123f31;
  --green-800: #174c3a;
  --green-700: #1e624a;
  --green-100: #e7f1ed;
  --green-50: #f1f7f4;
  --ink: #17221e;
  --muted: #66736e;
  --border: #dce4e0;
  --canvas: #f4f7f5;
  --surface: #ffffff;
  --danger: #ae3f3f;
  --warning: #a76421;
  --radius-sm: 6px;
  --radius-md: 11px;
  --radius-lg: 19px;
  --shadow: 0 18px 50px rgba(20, 49, 39, .09);
  --sidebar-width: 260px;
}

.slip-configuration { min-width: 0; }
.slip-configuration .pattern-option { height: 100%; }
.slip-configuration.is-selected .pattern-option { border-color: #087d5e; background: #f1f8f5; box-shadow: 0 0 0 2px rgba(0, 116, 83, .12); }
.configuration-image { margin: 8px 6px 0; }
.preview-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.preview-tab { border: 1px solid #c9ddd4; border-radius: 7px; background: #fff; color: #164b40; font: inherit; font-weight: 700; padding: 6px 10px; }
.preview-tab.is-active { background: #087d5e; border-color: #087d5e; color: #fff; }
.order-review-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 14px; }
.order-review-summary > div { border: 1px solid #dce8e2; border-radius: 8px; padding: 9px 11px; background: #fbfdfc; }
.order-review-summary dt { color: #61756e; font-size: .82rem; }
.order-review-summary dd { margin: 4px 0 0; color: #123d34; font-weight: 700; }
.workflow-selection-summary { margin: 0 0 14px; padding: 11px; border: 1px solid #dce8e2; border-radius: 8px; background: #fbfdfc; }
.workflow-selection-summary h3 { margin: 0 0 9px; color: #214b3d; font-size: .82rem; font-weight: 800; }
.workflow-selection-summary dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin: 0; }
.workflow-selection-summary dl > div { min-width: 0; }
.workflow-selection-summary dt { color: #61756e; font-size: .72rem; font-weight: 700; }
.workflow-selection-summary dd { min-width: 0; margin: 3px 0 0; color: #123d34; font-size: .82rem; font-weight: 700; overflow-wrap: anywhere; }
.workflow-summary-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.workflow-summary-chips span { padding: .2rem .42rem; border: 1px solid #cfe1d8; border-radius: 99px; background: #edf7f1; color: #1b6149; font-size: .7rem; font-weight: 700; }
.order-configuration-list, .order-configuration-review { display: grid; gap: 7px; margin: 12px 0; }
.order-configuration-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; border: 1px solid #dce8e2; border-radius: 8px; padding: 9px 11px; background: #fff; }
.order-configuration-row span { display: block; margin-top: 2px; color: #657870; font-size: .85rem; }
.order-configuration-image { display: block; margin-top: 3px; color: #61756e; font-size: .72rem; overflow-wrap: anywhere; }
.order-configuration-row > div:last-child, .order-configuration-row > strong:last-child { text-align: right; }

@media (max-width: 640px) {
  .order-review-summary { grid-template-columns: 1fr; }
  .workflow-selection-summary dl { grid-template-columns: 1fr; }
  .order-configuration-row { grid-template-columns: 1fr; }
  .order-configuration-row > div:last-child, .order-configuration-row > strong:last-child { text-align: left; }
}

/*
   Application typography is rem-based, including Bootstrap. A 96% root size
   increases the previous compact 80% scale by 20% consistently.
*/
html { font-size: 96%; }

/* Request workflow */
.request-page,.request-form{display:grid;gap:1.25rem}.request-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1.25rem}.request-heading h1{margin:.2rem 0;color:#123d32;font-size:clamp(1.65rem,3vw,2.35rem)}.request-heading p{margin:0;color:#63736d}.form-panel{background:#fff;border:1px solid #dce7e2;border-radius:18px;padding:clamp(1rem,2.5vw,1.7rem);box-shadow:0 12px 34px rgba(20,60,48,.06)}.panel-title{display:flex;gap:.85rem;align-items:flex-start;margin-bottom:1.25rem}.panel-title>span{display:grid;place-items:center;width:2.25rem;height:2.25rem;border-radius:10px;background:#e8f4ef;color:#0a684f;font-weight:800}.panel-title h2{margin:0;color:#163d33;font-size:1.18rem}.panel-title p{margin:.25rem 0 0;color:#71807a;font-size:.9rem}.filter-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}.field-group{display:grid;gap:.4rem}.field-group label,.image-upload label{font-weight:700;color:#294b42}.field-group select,.image-upload input{width:100%;border:1px solid #cbdad4;border-radius:10px;padding:.72rem .8rem;background:#fff;color:#173c32}.field-group select:focus,.image-upload input:focus{border-color:#0b795b;box-shadow:0 0 0 3px rgba(11,121,91,.12);outline:0}.field-group span,.image-upload span{color:#a52b2b;font-size:.82rem}.estimate-panel{display:grid;grid-template-columns:repeat(5,1fr);gap:.65rem;margin-top:1.25rem;padding:1rem;border-radius:14px;background:#f1f7f4;border:1px solid #d8e8e1}.estimate-panel>div{display:grid;gap:.2rem}.estimate-panel small{color:#6a7c75}.estimate-panel strong{color:#123f33;font-size:1.15rem}.estimate-panel .estimate-price{padding-left:1rem;border-left:1px solid #c9ded5}.estimate-price strong{font-size:1.4rem}.estimate-price span{font-size:.75rem;color:#667872}.form-feedback{margin:.8rem 0 0;color:#a52b2b}.pattern-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.7rem}.pattern-option input{position:absolute;opacity:0;pointer-events:none}.pattern-option span{display:grid;gap:.25rem;height:100%;padding:.9rem;border:1px solid #cfddd7;border-radius:12px;cursor:pointer;background:#fff}.pattern-option small{color:#72817c}.pattern-option input:checked+span{border-color:#087456;background:#edf8f4;box-shadow:0 0 0 2px rgba(8,116,86,.12)}.image-upload{display:grid;gap:.45rem;margin-top:1rem;padding:1rem;border:1px dashed #9cbdb1;border-radius:12px;background:#f8fbfa}.request-a4{width:min(100%,620px);aspect-ratio:210/297;margin:auto;padding:18px;background:#fff;box-shadow:0 10px 35px rgba(21,50,42,.15);border:1px solid #e0e8e4}.request-preview-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));height:100%;gap:4px}.layout-Cards9,.layout-Cards9WithImage{grid-template-rows:repeat(3,minmax(0,1fr))}.layout-Cards12,.layout-Cards12WithImage{grid-template-rows:repeat(4,minmax(0,1fr))}.layout-Cards18{grid-template-rows:repeat(6,minmax(0,1fr))}.request-preview-card{min-width:0;min-height:0;display:grid;align-content:center;overflow:hidden;border:1px solid #aebdb7;background:#fff}.request-preview-card.with-image{grid-template-rows:45% 55%}.preview-image{min-height:0;overflow:hidden;border-bottom:1px solid #d8e1dd}.preview-image img{width:100%;height:100%;object-fit:contain}.preview-lines{display:grid;align-content:center;gap:7px;padding:10%}.preview-lines i{height:4px;border-radius:9px;background:#dce5e1}.preview-lines i:nth-child(2){width:75%}.form-actions{display:flex;justify-content:flex-end;gap:.75rem}.request-table{width:100%;border-collapse:collapse}.request-table th{padding:.8rem;color:#64756f;font-size:.78rem;text-transform:uppercase;border-bottom:1px solid #dce6e2}.request-table td{padding:1rem .8rem;border-bottom:1px solid #edf2f0;vertical-align:middle;color:#29483f}.request-table td small{display:block;color:#71817b;margin-top:.2rem}.status-pill{display:inline-flex;padding:.28rem .58rem;border-radius:99px;background:#e8f5ef;color:#08694f;font-size:.78rem;font-weight:800}.pagination-row{display:flex;justify-content:space-between;align-items:center;padding-top:1rem}.empty-state{text-align:center;padding:3rem 1rem}.details-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:1.25rem;margin-bottom:1.25rem}.summary-list{display:grid;gap:0;margin:0}.summary-list>div{display:flex;justify-content:space-between;gap:1rem;padding:.75rem 0;border-bottom:1px solid #e8efec}.summary-list dt{color:#64756f;font-weight:500}.summary-list dd{margin:0;color:#173f34;text-align:right}.detail-template{display:block;width:100%;max-height:220px;object-fit:contain;margin-top:1rem;border:1px solid #dce6e2;border-radius:10px}.payment-state{padding:1rem;border-radius:14px;background:#fff8eb;border:1px solid #f0dfb7}.payment-state h3{font-size:1.05rem;color:#563f16;margin:1rem 0 .5rem}.payment-state p{color:#6e624c}.status-timeline ol{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(4,1fr);gap:1rem}.status-timeline li{position:relative;padding:1rem;border-top:3px solid #d8e1dd;color:#81908a}.status-timeline li.complete,.status-timeline li.current{border-color:#087456;color:#183f34}.status-timeline li span{display:block;font-size:.82rem;margin-top:.35rem}.validation-summary-errors{color:#9f2929}
@media(max-width:991px){.filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.pattern-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.estimate-panel{grid-template-columns:repeat(2,1fr)}.details-grid{grid-template-columns:1fr}.status-timeline ol{grid-template-columns:1fr 1fr}}
@media(max-width:575px){.request-heading{display:grid}.filter-grid,.pattern-grid,.estimate-panel,.status-timeline ol{grid-template-columns:1fr}.form-actions{display:grid}.form-actions .btn{width:100%}.request-a4{padding:8px}.request-table{min-width:760px}}

html { min-height: 100%; }
body { min-height: 100vh; margin: 0; color: var(--ink); font-family: "Segoe UI", Arial, sans-serif; line-height: 1.55; }
a { color: var(--green-800); text-underline-offset: .2em; }
a:hover { color: var(--green-950); }
:focus-visible { outline: 3px solid #e4a94d; outline-offset: 3px; }
.skip-link { position: fixed; top: -5rem; left: 1rem; z-index: 1100; padding: .7rem 1rem; border-radius: 6px; background: #fff; color: var(--green-950); font-weight: 700; }
.skip-link:focus { top: .75rem; }
.btn { border-radius: var(--radius-sm); font-weight: 650; }
.btn-primary { --bs-btn-bg: var(--green-800); --bs-btn-border-color: var(--green-800); --bs-btn-hover-bg: var(--green-950); --bs-btn-hover-border-color: var(--green-950); --bs-btn-active-bg: var(--green-950); --bs-btn-active-border-color: var(--green-950); padding: .68rem 1.15rem; }
.btn-outline-primary { --bs-btn-color: var(--green-800); --bs-btn-border-color: var(--green-800); --bs-btn-hover-bg: var(--green-800); --bs-btn-hover-border-color: var(--green-800); padding: .68rem 1.15rem; }

/* Shared brand */
.brand { display: inline-flex; align-items: center; gap: .72rem; color: var(--green-950); text-decoration: none; width: fit-content; }
.brand:hover, .brand:focus { color: var(--green-950); }
.brand-symbol { position: relative; width: 31px; height: 27px; display: inline-block; flex: 0 0 31px; }
.brand-symbol span { position: absolute; left: 5px; width: 21px; height: 11px; border: 3px solid currentColor; border-radius: 3px; transform: rotate(30deg) skewX(-28deg); }
.brand-symbol span:nth-child(1) { top: 0; }
.brand-symbol span:nth-child(2) { top: 6px; opacity: .72; }
.brand-symbol span:nth-child(3) { top: 12px; opacity: .42; }
.brand-name { font-size: 1.05rem; font-weight: 760; letter-spacing: -.02em; white-space: nowrap; }

/* Authentication */
.auth-body { height: 100dvh; overflow: hidden; background: #e9eeeb; padding: clamp(0px, 2.5vw, 28px); display: grid; place-items: center; }
.auth-shell { width: min(1380px, 100%); height: min(900px, calc(100dvh - clamp(0px, 5vw, 56px))); min-height: 0; display: grid; grid-template-columns: minmax(470px, .92fr) minmax(500px, 1.08fr); overflow: hidden; border-radius: var(--radius-lg); background: var(--surface); box-shadow: 0 28px 90px rgba(25, 41, 35, .16); }
.auth-form-panel { display: flex; min-width: 0; min-height: 0; background: #fbfcfb; }
.auth-form-wrap { width: min(100%, 620px); height: 100%; min-height: 0; margin: 0 auto; padding: clamp(1.35rem, 3.2vh, 3rem) clamp(2rem, 6vw, 5.2rem) 1.25rem; display: flex; flex-direction: column; }
.auth-content { width: 100%; margin: auto 0; padding: clamp(.7rem, 2vh, 1.5rem) 0; }
.auth-heading { margin-bottom: clamp(1rem, 2.3vh, 1.65rem); }
.auth-heading h1 { margin: 0 0 .55rem; color: #101815; font-size: clamp(2rem, 3.4vw, 2.75rem); line-height: 1.1; font-weight: 740; letter-spacing: -.04em; }
.auth-heading p { margin: 0; color: var(--muted); font-size: .94rem; }
.auth-heading a, .auth-secondary-link a, .auth-status-actions > a:not(.btn) { font-weight: 650; }
.auth-form { display: grid; gap: clamp(.75rem, 1.6vh, 1.05rem); }
.auth-form-signup { gap: clamp(.55rem, 1.25vh, .8rem); }
.auth-field-grid { display: grid; grid-template-columns: 1fr 1.12fr; gap: .85rem; }
.form-field { min-width: 0; }
.form-label { display: block; margin: 0 0 .42rem; color: #28342f; font-size: .86rem; font-weight: 650; }
.form-control { min-height: 46px; border: 1px solid #ccd6d1; border-radius: var(--radius-sm); background: #fff; padding: .58rem .8rem; color: var(--ink); }
.form-control::placeholder { color: #9aa59f; }
.form-control:focus { border-color: var(--green-700); box-shadow: 0 0 0 .2rem rgba(30, 98, 74, .12); }
.input-validation-error { border-color: var(--danger); }
.field-validation { display: block; min-height: 0; margin-top: .3rem; color: var(--danger); font-size: .79rem; }
.field-validation:empty { display: none; }
.form-hint { margin-top: .38rem; color: var(--muted); font-size: .76rem; }
.password-field { position: relative; }
.password-field .form-control { padding-right: 3rem; }
.password-toggle { position: absolute; top: 50%; right: .65rem; width: 34px; height: 34px; transform: translateY(-50%); display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: #77847e; }
.password-toggle:hover { background: var(--green-50); color: var(--green-800); }
.password-toggle svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.auth-submit { width: 100%; min-height: 46px; margin-top: .15rem; display: inline-grid; place-items: center; }
.auth-account-action { margin-top: clamp(.8rem, 1.8vh, 1.2rem); padding-top: clamp(.8rem, 1.8vh, 1.2rem); display: grid; gap: .55rem; border-top: 1px solid var(--border); color: var(--muted); text-align: center; font-size: .8rem; }
.auth-create-account { width: 100%; min-height: 44px; display: inline-grid; place-items: center; }
.auth-secondary-link { margin-top: clamp(.65rem, 1.4vh, 1rem); text-align: center; font-size: .82rem; }
.auth-footer { margin: auto 0 0; padding-top: .8rem; color: #8b9691; font-size: .72rem; }
.auth-legal-footer { margin: auto 0 0; padding-top: .8rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .45rem .8rem; color: #738078; font-size: .67rem; line-height: 1.4; }
.auth-legal-footer > span { color: #47665a; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.auth-legal-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .25rem .6rem; }
.auth-legal-footer a { color: #567166; text-decoration: none; white-space: nowrap; }
.auth-legal-footer a:hover, .auth-legal-footer a:focus-visible { color: var(--green-800); text-decoration: underline; }
.validation-message { padding: .75rem .9rem; border-left: 3px solid var(--danger); border-radius: 5px; background: #fbefef; color: #852f2f; font-size: .84rem; }
.validation-message:empty { display: none; }
.validation-message ul { margin: 0; padding-left: 1rem; }

.auth-visual { position: relative; min-width: 0; overflow: hidden; padding: clamp(2rem, 4vw, 4rem); display: flex; flex-direction: column; background: radial-gradient(circle at 92% 12%, #3f765f 0, transparent 34%), linear-gradient(145deg, var(--green-900), #164b39 55%, #0e382b); color: #fff; isolation: isolate; }
.auth-visual-top { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; color: rgba(255,255,255,.76); font-size: .78rem; letter-spacing: .03em; }
.visual-secure { display: inline-flex; align-items: center; gap: .4rem; }
.visual-secure::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #8fd5b4; box-shadow: 0 0 0 4px rgba(143,213,180,.12); }
.visual-orb { position: absolute; z-index: -1; border-radius: 50%; border: 1px solid rgba(255,255,255,.07); }
.visual-orb-one { width: 540px; height: 540px; right: -180px; top: -210px; background: rgba(255,255,255,.025); }
.visual-orb-two { width: 430px; height: 430px; left: -220px; bottom: -210px; }
.document-scene { position: relative; width: min(520px, 88%); height: 360px; margin: auto; }
.preview-card { position: absolute; border-radius: 18px; box-shadow: 0 25px 55px rgba(4, 25, 18, .28); }
.preview-card-back { width: 68%; height: 52%; top: 19%; right: 0; padding: 2rem; transform: rotate(7deg); background: linear-gradient(135deg, #78a291, #306650); opacity: .75; }
.preview-chip { display: block; width: 36px; height: 26px; border-radius: 6px; background: rgba(255,255,255,.32); margin-bottom: 1.6rem; }
.preview-card-front { width: 76%; min-height: 73%; left: 0; top: 7%; padding: 1.7rem; transform: rotate(-3deg); background: rgba(250,252,251,.97); color: var(--ink); }
.preview-card-heading { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.6rem; }
.preview-card-heading > span:last-child { display: flex; flex-direction: column; }
.preview-card-heading strong { color: var(--green-950); font-size: .9rem; }
.preview-card-heading small { color: #7d8984; font-size: .67rem; }
.preview-mark { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 10px; background: var(--green-800); color: #fff; font-size: .65rem; font-weight: 800; }
.preview-line { display: block; width: 47%; height: 8px; margin-top: .65rem; border-radius: 8px; background: #dce6e1; }
.preview-line.long { width: 86%; }
.preview-line.medium { width: 65%; }
.preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: 1.45rem; }
.preview-grid span { height: 39px; border: 1px solid #dce5e1; border-radius: 6px; background: #f4f7f5; }
.preview-card-footer { display: flex; justify-content: space-between; margin-top: 1.25rem; color: #7d8984; font-size: .64rem; text-transform: uppercase; letter-spacing: .08em; }
.preview-card-footer span:first-child { color: var(--green-700); font-weight: 800; }
.preview-status { position: absolute; right: 2%; bottom: 0; z-index: 3; min-width: 190px; display: flex; align-items: center; gap: .7rem; padding: .85rem 1rem; border: 1px solid rgba(255,255,255,.65); border-radius: 13px; background: rgba(255,255,255,.92); color: var(--ink); box-shadow: 0 12px 30px rgba(4,25,18,.2); }
.preview-status > span:last-child { display: flex; flex-direction: column; }
.preview-status strong { font-size: .78rem; color: var(--green-950); }
.preview-status small { color: #7e8b85; font-size: .63rem; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: #36a36f; box-shadow: 0 0 0 5px #e1f1e9; }
.auth-visual-copy { position: relative; z-index: 2; width: min(480px, 90%); margin: 0 auto; text-align: center; }
.auth-visual-copy h2 { margin: 0 0 .65rem; font-size: clamp(1.65rem, 3vw, 2.35rem); font-weight: 680; letter-spacing: -.03em; }
.auth-visual-copy p { margin: 0; color: rgba(255,255,255,.7); font-size: .92rem; }
.auth-status-icon { width: 52px; height: 52px; margin-bottom: 1.35rem; display: grid; place-items: center; border-radius: 14px; background: var(--green-100); color: var(--green-800); font-weight: 800; font-size: 1.2rem; }
.auth-status-icon.success { background: #e2f3ea; color: #28734f; }
.auth-status-icon.warning { background: #fff0df; color: var(--warning); }
.auth-heading-status { margin-bottom: 1.4rem; }
.auth-note { margin-bottom: 1.5rem; padding: .9rem 1rem; border-radius: var(--radius-sm); background: var(--green-50); color: #52615b; font-size: .84rem; }
.auth-status-actions { display: flex; flex-direction: column; align-items: stretch; gap: 1rem; text-align: center; }

/* Authenticated application shell */
.app-body { background: var(--canvas); }
.app-shell { min-height: 100vh; display: flex; }
.app-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: var(--sidebar-width); padding: 2rem 1.25rem 1.25rem; flex-direction: column; border-right: 1px solid rgba(255,255,255,.08); background: var(--green-950); color: #fff; }
.app-sidebar .brand, .app-mobile-nav .brand { color: #fff; margin: 0 .55rem 2.4rem; }
.app-sidebar .brand { box-sizing: border-box; width: 100%; margin-right: 0; margin-left: 0; padding: 0 .55rem; }
.app-sidebar .brand:hover, .app-mobile-nav .brand:hover { color: #fff; }
.app-navigation { display: flex; flex-direction: column; gap: .28rem; }
.app-nav-section { margin: 1.45rem .75rem .5rem; color: rgba(255,255,255,.42); font-size: .65rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.app-nav-link { min-height: 45px; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: .75rem; padding: .68rem .78rem; border-radius: 9px; color: rgba(255,255,255,.72); font-size: .87rem; font-weight: 580; text-decoration: none; }
.app-nav-link svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.app-nav-link:first-child svg { fill: currentColor; stroke: none; }
.app-nav-link.active { background: rgba(255,255,255,.12); color: #fff; }
a.app-nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.app-nav-link.disabled { color: rgba(255,255,255,.38); cursor: not-allowed; }
.app-nav-link small { padding: .12rem .38rem; border-radius: 10px; background: rgba(255,255,255,.08); font-size: .54rem; letter-spacing: .03em; text-transform: uppercase; }
.sidebar-footer { margin-top: auto; display: flex; align-items: center; gap: .7rem; padding: 1rem .6rem 0; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-avatar, .topbar-avatar { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 36px; border-radius: 50%; background: #d7eee3; color: var(--green-950); font-size: .78rem; font-weight: 800; }
.sidebar-user { min-width: 0; display: flex; flex-direction: column; }
.sidebar-user strong { max-width: 150px; overflow: hidden; color: #fff; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user small { color: rgba(255,255,255,.48); font-size: .66rem; }
.app-workspace { min-width: 0; min-height: 100vh; flex: 1; margin-left: var(--sidebar-width); }
.app-topbar { height: 80px; padding: 0 clamp(1.25rem, 3vw, 2.5rem); display: flex; align-items: center; gap: 1rem; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.92); }
.app-page-heading { display: flex; flex-direction: column; line-height: 1.2; }
.app-page-heading strong { margin-top: .2rem; font-size: 1.12rem; }
.app-eyebrow { color: var(--green-700); font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.account-menu { display: flex; align-items: center; gap: .7rem; padding: .32rem .36rem .32rem .75rem; border: 1px solid transparent; border-radius: 22px; background: transparent; color: var(--ink); }
.account-menu:hover { border-color: var(--border); background: var(--canvas); }
.account-menu-copy { display: flex; flex-direction: column; text-align: right; line-height: 1.2; }
.account-menu-copy strong { max-width: 180px; overflow: hidden; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.account-menu-copy small { color: var(--muted); font-size: .66rem; }
.app-content { padding: clamp(1.3rem, 3.5vw, 3rem); }
.nav-toggle { width: 42px; height: 42px; display: grid; align-content: center; justify-items: center; gap: 4px; border: 1px solid var(--border); border-radius: 9px; background: #fff; }
.nav-toggle span { width: 18px; height: 2px; border-radius: 2px; background: var(--green-900); }
.app-mobile-nav { --bs-offcanvas-width: min(290px, 86vw); background: var(--green-950); color: #fff; }
.app-mobile-nav .offcanvas-header { border-bottom: 1px solid rgba(255,255,255,.1); }
.app-mobile-nav .brand { margin: 0; }
.app-mobile-nav .btn-close { filter: invert(1); }
.app-mobile-nav .offcanvas-body { padding: 1.1rem; }

/* PDF configuration */
.configuration-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 1.25rem; }
.configuration-header h1 { margin: .35rem 0 .55rem; color: var(--green-950); font-size: clamp(1.7rem, 3vw, 2.4rem); letter-spacing: -.035em; }
.configuration-header p { max-width: 68ch; margin: 0; color: var(--muted); font-size: .9rem; }
.configuration-state { flex: 0 0 auto; padding: .4rem .7rem; border-radius: 20px; background: #fff0df; color: #925b16; font-size: .7rem; font-weight: 750; }
.configuration-state.ready { background: var(--green-100); color: var(--green-700); }
.app-alert { margin-bottom: 1rem; padding: .85rem 1rem; border-radius: 9px; font-size: .84rem; }
.app-alert.success { border: 1px solid #bddfce; background: #edf8f2; color: #256345; }
.configuration-layout { display: grid; grid-template-columns: minmax(340px, .78fr) minmax(420px, 1.22fr); align-items: start; gap: clamp(1.2rem, 2.5vw, 2rem); }
.configuration-form { padding: clamp(1.25rem, 2.5vw, 2rem); box-shadow: 0 8px 24px rgba(20,49,39,.05); }
.configuration-section-heading { display: flex; align-items: flex-start; gap: .8rem; margin-bottom: 1rem; }
.configuration-section-heading h2 { margin: 0 0 .2rem; color: var(--green-950); font-size: 1rem; }
.configuration-section-heading p { margin: 0; color: var(--muted); font-size: .76rem; }
.step-number { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 30px; border-radius: 8px; background: var(--green-50); color: var(--green-700); font-size: .63rem; font-weight: 800; }
.template-upload { min-height: 118px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: .9rem; padding: 1rem; border: 1px dashed #adc4b9; border-radius: 11px; background: #f8fbf9; cursor: pointer; }
.template-upload:hover { border-color: var(--green-700); background: var(--green-50); }
.template-upload > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.template-upload strong { color: var(--green-950); font-size: .86rem; }
.template-upload small { margin-top: .2rem; color: var(--muted); font-size: .7rem; }
.upload-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: #fff; color: var(--green-700); font-size: 1.2rem; box-shadow: 0 3px 10px rgba(20,49,39,.08); }
.selected-file { margin-top: .55rem; overflow: hidden; color: var(--green-700); font-size: .73rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.configuration-note { margin: .75rem 0 0; padding: .7rem .8rem; border-left: 3px solid #dfb46b; border-radius: 5px; background: #fff9ee; color: #705a35; font-size: .72rem; }
.configuration-divider { height: 1px; margin: 1.5rem 0; background: var(--border); }
.grid-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.form-select { min-height: 46px; border-color: #ccd6d1; border-radius: var(--radius-sm); }
.form-select:focus { border-color: var(--green-700); box-shadow: 0 0 0 .2rem rgba(30,98,74,.12); }
.capacity-summary { margin: 1rem 0; display: flex; align-items: center; justify-content: space-between; padding: .8rem .9rem; border-radius: 8px; background: var(--green-50); color: #506159; font-size: .78rem; }
.capacity-summary strong { color: var(--green-900); font-size: 1.15rem; }
.configuration-save { width: 100%; min-height: 46px; }
.preview-panel { padding: clamp(1.2rem, 2.5vw, 1.8rem); border: 1px solid var(--border); border-radius: var(--radius-md); background: #e8eeeb; }
.preview-panel-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.preview-panel-heading h2 { margin: .2rem 0 0; color: var(--green-950); font-size: 1.15rem; }
.preview-panel-heading > span { color: #617069; font-size: .72rem; font-weight: 700; }
.a4-preview { width: min(100%, 610px); aspect-ratio: 210 / 297; margin: 0 auto; padding: 3.8%; background: #fff; box-shadow: 0 12px 30px rgba(17,45,35,.15); }
.a4-grid { width: 100%; height: 100%; display: grid; grid-template-columns: repeat(var(--grid-columns), minmax(0,1fr)); grid-template-rows: repeat(var(--grid-rows), minmax(0,1fr)); gap: clamp(3px, .45vw, 5px); }
.grid-rows-1 { --grid-rows: 1; }
.grid-rows-2 { --grid-rows: 2; }
.grid-rows-3 { --grid-rows: 3; }
.grid-rows-4 { --grid-rows: 4; }
.grid-rows-5 { --grid-rows: 5; }
.grid-rows-6 { --grid-rows: 6; }
.grid-columns-1 { --grid-columns: 1; }
.grid-columns-2 { --grid-columns: 2; }
.grid-columns-3 { --grid-columns: 3; }
.grid-columns-4 { --grid-columns: 4; }
.grid-columns-5 { --grid-columns: 5; }
.grid-columns-6 { --grid-columns: 6; }
.slip-preview { min-width: 0; min-height: 0; overflow: hidden; display: grid; grid-template-rows: 45% 55%; border: 1px solid #aeb9b4; background: #fff; }
.slip-template { position: relative; min-width: 0; min-height: 0; overflow: hidden; padding: 0; border-bottom: 1px solid #d5ddd9; background: #fff; }
.slip-template img { position: absolute; inset: 0; width: 100%; height: 100%; min-width: 0; min-height: 0; max-width: none; max-height: none; display: block; object-fit: contain; object-position: center; }
.slip-template span { position: absolute; inset: 0; display: grid; place-items: center; color: #91a099; font-size: clamp(.28rem, .7vw, .55rem); text-align: center; }
.slip-details { min-height: 0; padding: 8%; display: flex; flex-direction: column; gap: 12%; }
.slip-details i { width: 82%; height: 5%; min-height: 1px; border-radius: 2px; background: #dce3df; }
.slip-details i:nth-child(2) { width: 62%; }
.slip-details i:nth-child(3) { width: 72%; }
.preview-disclaimer { max-width: 610px; margin: .85rem auto 0; color: #66746e; font-size: .68rem; text-align: center; }

/* Public pages and shared error page */
.public-body { display: flex; flex-direction: column; background: var(--canvas); }
.public-header { background: rgba(255,255,255,.96); border-bottom: 1px solid var(--border); }
.public-header-inner { min-height: 76px; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.public-actions { display: flex; align-items: center; gap: 1rem; }
.public-actions form { margin: 0; }
.public-login { font-size: .88rem; font-weight: 650; }
.public-main { flex: 1; padding: clamp(2.5rem, 7vw, 6.5rem) 0; }
.public-footer { border-top: 1px solid var(--border); background: #fff; color: var(--muted); }
.public-footer-inner { min-height: 76px; display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: .78rem; }
.legal-body { min-height: 100dvh; display: flex; flex-direction: column; background: #f5f8f6; color: #1a2822; }
.legal-header { background: rgba(255,255,255,.96); border-bottom: 1px solid var(--border); }
.legal-header-inner { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.legal-brand { color: var(--green-900); font-size: .94rem; font-weight: 820; letter-spacing: .045em; text-transform: uppercase; }
.legal-login { color: var(--green-800); font-size: .84rem; font-weight: 720; text-decoration: none; }
.legal-login:hover, .legal-login:focus-visible { color: var(--green-950); text-decoration: underline; }
.legal-main { flex: 1; padding: clamp(2rem, 6vw, 4.75rem) 0; }
.legal-page { max-width: 850px; margin: 0 auto; overflow: hidden; border: 1px solid #d9e5df; border-radius: 16px; background: #fff; box-shadow: 0 10px 30px rgba(19, 57, 43, .06); }
.legal-page-heading { padding: clamp(1.7rem, 4vw, 3.1rem); border-bottom: 1px solid #dde9e3; background: linear-gradient(135deg, #f4faf6, #fff); }
.legal-page-eyebrow { color: var(--green-700); font-size: .68rem; font-weight: 820; letter-spacing: .09em; text-transform: uppercase; }
.legal-page h1 { margin: .45rem 0 .65rem; color: var(--green-950); font-size: clamp(1.75rem, 4vw, 2.45rem); font-weight: 790; letter-spacing: -.035em; }
.legal-page-heading p { max-width: 62ch; margin: 0; color: #5d7167; font-size: .93rem; line-height: 1.6; }
.legal-page-heading time { display: block; margin-top: 1rem; color: #76867f; font-size: .72rem; font-weight: 650; }
.legal-page-content { padding: clamp(1.7rem, 4vw, 3rem); }
.legal-page-content section + section { margin-top: 1.75rem; padding-top: 1.75rem; border-top: 1px solid #e7eeea; }
.legal-page h2 { margin: 0 0 .65rem; color: #174c3a; font-size: 1.02rem; font-weight: 800; }
.legal-page p, .legal-page li { color: #43554d; font-size: .88rem; line-height: 1.7; }
.legal-page p { margin: 0; }
.legal-page p + p { margin-top: .75rem; }
.legal-page ul { margin: .75rem 0 0; padding-left: 1.2rem; }
.legal-page li + li { margin-top: .35rem; }
.legal-footer { padding: 1.1rem 0; border-top: 1px solid var(--border); color: #718078; background: #fff; font-size: .74rem; }
.public-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .8fr); align-items: center; gap: clamp(2rem, 7vw, 7rem); }
.public-hero h1 { max-width: 13ch; margin: .75rem 0 1rem; color: var(--green-950); font-size: clamp(2.6rem, 6vw, 5rem); line-height: 1.02; letter-spacing: -.055em; }
.public-hero p { max-width: 52ch; color: var(--muted); font-size: 1.05rem; }
.public-hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.7rem; }
.public-hero-visual { position: relative; height: 380px; border-radius: 30px; background: linear-gradient(145deg, var(--green-900), #2d6a52); overflow: hidden; }
.hero-document { position: absolute; top: 60px; left: 16%; width: 55%; height: 260px; padding: 2rem; border-radius: 15px; background: #fff; transform: rotate(-4deg); box-shadow: 0 25px 45px rgba(3,29,20,.25); }
.hero-document-back { top: 76px; left: auto; right: 11%; background: #80ad99; transform: rotate(8deg); }
.hero-document-title, .hero-document-line { display: block; width: 72%; height: 10px; margin-bottom: .75rem; border-radius: 7px; background: #d9e5df; }
.hero-document-title { width: 45%; height: 14px; margin-bottom: 1.5rem; background: #77a890; }
.hero-document-line.short { width: 52%; }
.hero-document-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: 1.7rem; }
.hero-document-grid span { height: 48px; border-radius: 5px; background: var(--green-50); border: 1px solid #dbe6e1; }
.public-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: clamp(3rem, 8vw, 7rem); overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--border); }
.public-features article { padding: 1.6rem; background: #fff; }
.public-features article > span { color: var(--green-700); font-size: .68rem; font-weight: 800; }
.public-features h2 { margin: .75rem 0 .45rem; color: var(--green-950); font-size: 1rem; }
.public-features p { margin: 0; color: var(--muted); font-size: .82rem; }
.page-section { max-width: 900px; margin: 0 auto; }
.page-context { margin-bottom: 1rem; color: var(--muted); font-size: .8rem; }
.page-context > * + * { margin-left: .45rem; }
.eyebrow { color: var(--green-700); font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.surface-card { padding: clamp(1.5rem, 4vw, 2.5rem); border: 1px solid var(--border); border-radius: var(--radius-md); background: #fff; box-shadow: var(--shadow); }
.card-accent { width: 42px; height: 4px; margin-bottom: 1.4rem; border-radius: 4px; background: var(--green-700); }
.section-title { color: var(--green-950); font-size: clamp(1.7rem,3vw,2.25rem); }
.section-intro, .muted-copy { color: var(--muted); }
.status-mark { width: 46px; height: 46px; margin-bottom: 1rem; display: grid; place-items: center; border-radius: 12px; background: #fff0df; color: var(--warning); font-weight: 800; }
.reference-code { padding: .2rem .4rem; border-radius: 4px; background: var(--green-50); color: var(--green-950); }

@media (max-width: 1050px) {
  .auth-body { padding: 0; }
  .auth-shell { width: 100%; height: 100dvh; border-radius: 0; box-shadow: none; grid-template-columns: minmax(430px, 1fr) minmax(380px, .82fr); }
  .auth-form-wrap { padding-left: clamp(1.8rem, 6vw, 4rem); padding-right: clamp(1.8rem, 6vw, 4rem); }
  .document-scene { width: 100%; }
  .dashboard-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .configuration-layout { grid-template-columns: minmax(300px, .85fr) minmax(360px, 1.15fr); }
}

@media (max-width: 800px) {
  .auth-body { height: auto; min-height: 100dvh; overflow: auto; }
  .auth-shell { display: block; height: auto; min-height: 100dvh; background: #fbfcfb; }
  .auth-form-panel { min-height: 100dvh; }
  .auth-form-wrap { width: min(100%, 620px); height: auto; min-height: 100dvh; }
  .auth-visual { display: none; }
  .app-workspace { margin-left: 0; }
  .account-menu-copy { display: none; }
  .dashboard-welcome { min-height: 210px; }
  .welcome-document { opacity: .42; position: absolute; right: -30px; }
  .public-hero { grid-template-columns: 1fr; }
  .public-hero-visual { height: 310px; }
  .public-features { grid-template-columns: 1fr; }
  .configuration-layout { grid-template-columns: 1fr; }
  .preview-panel { order: -1; }
  .a4-preview { max-height: 70vh; width: auto; }
}

@media (max-width: 560px) {
  .auth-form-wrap { padding: 1.25rem; }
  .auth-content { padding: 1.5rem 0; }
  .auth-heading { margin-bottom: 1.25rem; }
  .auth-field-grid { grid-template-columns: 1fr; gap: .9rem; }
  .auth-footer { text-align: center; }
  .app-topbar { height: 70px; padding: 0 1rem; }
  .app-content { padding: 1rem; }
  .dashboard-welcome { padding: 1.5rem; }
  .dashboard-welcome p { max-width: 84%; }
  .dashboard-cards { grid-template-columns: 1fr; }
  .section-heading-row { align-items: start; flex-direction: column; }
  .configuration-header { align-items: flex-start; flex-direction: column; gap: .8rem; }
  .template-upload { grid-template-columns: auto 1fr; }
  .template-upload .btn { grid-column: 1 / -1; }
  .preview-panel { padding: .85rem; }
  .public-header-inner, .public-footer-inner { align-items: flex-start; flex-direction: column; padding-top: 1rem; padding-bottom: 1rem; }
  .public-actions { width: 100%; }
  .public-main { padding-top: 2.5rem; }
  .public-hero h1 { font-size: 2.65rem; }
  .public-hero-visual { height: 250px; }
  .hero-document { top: 42px; height: 190px; padding: 1.4rem; }
  .hero-document-grid span { height: 32px; }
}

@media (max-height: 720px) and (min-width: 801px) {
  .auth-form-wrap { padding-top: 1rem; padding-bottom: .8rem; }
  .auth-content { padding: .35rem 0; }
  .auth-heading h1 { font-size: 2rem; }
  .auth-heading { margin-bottom: .8rem; }
  .auth-form, .auth-form-signup { gap: .5rem; }
  .form-control { min-height: 42px; }
  .form-label { margin-bottom: .25rem; }
  .form-hint { margin-top: .2rem; }
  .auth-submit { min-height: 42px; }
  .auth-account-action { margin-top: .55rem; padding-top: .55rem; gap: .35rem; }
  .auth-create-account { min-height: 40px; }
  .auth-secondary-link { margin-top: .55rem; }
  .auth-footer { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Branching request selection */
.selection-results{margin-top:1.4rem;padding:1rem;border:1px solid #d8e8e1;border-radius:14px;background:#f8fbf9}.selection-results-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;margin-bottom:.8rem}.selection-results-heading h3{margin:0;color:#163d33;font-size:1rem}.selection-results-heading p{margin:.2rem 0 0;color:#71807a;font-size:.8rem}.selection-results-heading span{padding:.32rem .6rem;border-radius:20px;background:#e8f4ef;color:#087456;font-size:.75rem;font-weight:800}.selection-table-wrap{overflow:auto;border:1px solid #dce7e2;border-radius:10px;background:#fff}.selection-table{width:100%;min-width:980px;border-collapse:collapse;font-size:.78rem}.selection-table th,.selection-table td{padding:.72rem .65rem;border-bottom:1px solid #edf2f0;vertical-align:middle}.selection-table thead th{color:#5d7169;font-size:.68rem;letter-spacing:.04em;text-transform:uppercase;white-space:nowrap}.selection-table tbody td:nth-last-child(-n+4),.selection-table tfoot th:not(:first-child){text-align:right;font-variant-numeric:tabular-nums}.selection-table tfoot{background:#edf7f2;color:#123d32}.selection-table tfoot th{border-bottom:0;font-size:.8rem}.payment-quote{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem;margin-bottom:1.3rem;padding:1rem;border:1px solid #d8e8e1;border-radius:13px;background:#f1f7f4}.payment-quote>div{display:grid;gap:.15rem}.payment-quote small{color:#6a7c75}.payment-quote strong{color:#123f33;font-size:1.05rem}.payment-quote>span{grid-column:1/-1;padding-top:.75rem;border-top:1px solid #d2e3da;color:#65776f;font-size:.78rem}@media(max-width:575px){.payment-quote{grid-template-columns:1fr}.selection-results-heading{align-items:flex-start;flex-direction:column}}
.selection-table thead th { font-weight: 800; }
.selection-table { table-layout: fixed; }
.selection-table thead th:nth-child(1), .selection-table tbody td:nth-child(1) { width: 25%; }
.selection-table thead th:nth-child(2), .selection-table tbody td:nth-child(2) { width: 14%; text-align: center; font-variant-numeric: tabular-nums; }
.selection-table thead th:nth-child(3), .selection-table tbody td:nth-child(3) { width: 25%; }
.selection-table thead th:nth-child(n+4), .selection-table tbody td:nth-child(n+4) { width: 9%; text-align: right; font-variant-numeric: tabular-nums; }
.selection-table-amount th { border-top: 1px solid #c9ded5; color: #0b604a; font-weight: 800; }
.selection-table-amount small { margin-left: .35rem; color: #667872; font-weight: 600; }

/* Single-panel request wizard */
.request-progress { position: relative; overflow: hidden; padding: 1.15rem 1.35rem; border: 1px solid #cfe1d8; border-radius: var(--radius-md); background: linear-gradient(115deg, #f7fcf9, #edf7f2); box-shadow: 0 8px 24px rgba(20, 60, 48, .05); }
.request-progress ol { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; margin: 0; padding: 0; list-style: none; }
.request-progress ol::before { position: absolute; top: 17px; right: 16.66%; left: 16.66%; height: 2px; background: #bfd7cb; content: ""; }
.request-progress-step { position: relative; z-index: 1; width: 100%; display: grid; grid-template-columns: 35px minmax(0, 1fr); align-items: center; gap: .65rem; padding: 0; border: 0; background: transparent; color: #73827c; text-align: left; }
.request-progress-step:not(:disabled) { cursor: pointer; }
.request-progress-marker { width: 35px; height: 35px; display: grid; place-items: center; border: 2px solid #a9c9bb; border-radius: 50%; background: #fff; color: #497567; font-size: .92rem; font-weight: 800; line-height: 1; transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease; }
.request-progress-copy { min-width: 0; display: grid; gap: .08rem; }
.request-progress-copy strong { color: #395a4e; font-size: .82rem; font-weight: 800; line-height: 1.15; }
.request-progress-copy small { color: #73827c; font-size: .67rem; line-height: 1.25; }
.request-progress-step.is-active .request-progress-marker { border-color: #087456; box-shadow: 0 0 0 4px rgba(8, 116, 86, .13); color: #087456; }
.request-progress-step.is-active .request-progress-copy strong { color: var(--green-950); }
.request-progress-step.is-complete .request-progress-marker { border-color: #087456; background: #087456; color: #fff; }
.request-progress-step.is-complete .request-progress-copy strong, .request-progress-step.is-available .request-progress-copy strong { color: #1d624a; }
.request-progress-step.is-available .request-progress-marker { border-color: #4c9b7d; color: #087456; }
.request-progress-step:focus-visible { outline-offset: 4px; }

@media (max-width: 700px) {
  .request-progress { padding: 1rem .8rem; }
  .request-progress ol { gap: .35rem; }
  .request-progress-step { grid-template-columns: 1fr; justify-items: center; gap: .42rem; text-align: center; }
  .request-progress-copy { justify-items: center; }
  .request-progress-copy strong { font-size: .72rem; }
  .request-progress-copy small { max-width: 14ch; font-size: .6rem; }
}

@media (max-width: 430px) {
  .request-progress-copy small { display: none; }
  .request-progress-step { gap: .25rem; }
}

/* Fixed dimensions are kept in proportion with the global compact scale. */
.form-panel { border-radius: 14px; }
.request-a4 { width: min(100%, 496px); padding: 14px; }
.request-preview-grid { gap: 3px; }
.preview-lines { gap: 6px; }
.preview-lines i { height: 3px; }
.detail-template { max-height: 176px; }
.selection-results { border-radius: 11px; }
.selection-table { min-width: 784px; }

.brand-symbol { width: 25px; height: 22px; flex-basis: 25px; }
.brand-symbol span { left: 4px; width: 17px; height: 9px; border-width: 2px; }
.brand-symbol span:nth-child(2) { top: 5px; }
.brand-symbol span:nth-child(3) { top: 10px; }
.form-control, .form-select, .auth-submit, .configuration-save { min-height: 37px; }
.auth-create-account { min-height: 35px; }
.password-toggle { width: 27px; height: 27px; }
.password-toggle svg { width: 16px; }
.auth-shell { width: min(1104px, 100%); height: min(720px, calc(100dvh - clamp(0px, 5vw, 45px))); grid-template-columns: minmax(376px, .92fr) minmax(400px, 1.08fr); }
.visual-orb-one { width: 432px; height: 432px; right: -144px; top: -168px; }
.visual-orb-two { width: 344px; height: 344px; left: -176px; bottom: -168px; }
.document-scene { width: min(416px, 88%); height: 288px; }
.preview-card { border-radius: 14px; }
.preview-chip { width: 29px; height: 21px; }
.preview-mark { width: 31px; height: 31px; border-radius: 8px; }
.preview-line { height: 6px; }
.preview-grid span { height: 31px; }
.preview-status { min-width: 152px; border-radius: 10px; }
.status-dot { width: 8px; height: 8px; }
.auth-status-icon { width: 42px; height: 42px; border-radius: 11px; }

.app-nav-link { min-height: 36px; grid-template-columns: 18px minmax(0, 1fr) auto; border-radius: 7px; }
.app-nav-link svg { width: 16px; height: 16px; }
.sidebar-avatar, .topbar-avatar { width: 29px; height: 29px; flex-basis: 29px; }
.app-topbar { height: 64px; }
.nav-toggle { width: 34px; height: 34px; border-radius: 7px; }
.nav-toggle span { width: 14px; }
.dashboard-welcome { min-height: 192px; }
.welcome-document { width: 140px; height: 164px; flex-basis: 140px; border-radius: 10px; }
.document-fold { width: 34px; height: 34px; }
.document-line { height: 6px; }
.document-grid { height: 62px; }
.dashboard-card { min-height: 172px; }
.dashboard-card-icon, .upload-icon { width: 30px; height: 30px; border-radius: 8px; }

.step-number { width: 24px; height: 24px; flex-basis: 24px; border-radius: 6px; }
.template-upload { min-height: 94px; border-radius: 9px; }
.a4-preview, .preview-disclaimer { max-width: 488px; }
.public-header-inner, .public-footer-inner { min-height: 61px; }
.public-hero { grid-template-columns: minmax(0, 1.05fr) minmax(288px, .8fr); }
.public-hero-visual { height: 304px; border-radius: 24px; }
.hero-document { top: 48px; height: 208px; border-radius: 12px; }
.hero-document-back { top: 61px; }
.hero-document-title, .hero-document-line { height: 8px; }
.hero-document-title { height: 11px; }
.hero-document-grid span { height: 38px; }
.page-section { max-width: 720px; }
.card-accent { width: 34px; height: 3px; }
.status-mark { width: 37px; height: 37px; border-radius: 10px; }

@media (max-width: 800px) {
  .dashboard-welcome { min-height: 168px; }
  .public-hero-visual { height: 248px; }
}

@media (max-width: 560px) {
  .app-topbar { height: 56px; }
  .public-hero-visual { height: 200px; }
  .hero-document { top: 34px; height: 152px; }
  .hero-document-grid span { height: 26px; }
}

/* Refined request progress tracker */
.request-progress { padding: 1rem 1.35rem; border-color: #cbe0d6; border-radius: 16px; background: linear-gradient(125deg, #f8fcfa, #eaf5ef); box-shadow: 0 12px 30px rgba(20, 64, 48, .07); }
.request-progress ol { gap: 0; }
.request-progress ol::before { top: 19px; right: 16.66%; left: 16.66%; height: 3px; border-radius: 99px; background: #c7ddd2; transition: background .2s ease; }
.request-progress[data-reached-step="2"] ol::before { background: linear-gradient(90deg, #087456 0 50%, #c7ddd2 50%); }
.request-progress[data-reached-step="3"] ol::before { background: #087456; }
.request-progress-step { grid-template-columns: 1fr; justify-items: center; gap: .48rem; min-height: 76px; text-align: center; }
.request-progress-marker { width: 39px; height: 39px; border-width: 2px; border-color: #afcfc0; background: #fdfefd; color: #5a8272; font-size: .95rem; box-shadow: 0 2px 0 rgba(13, 57, 42, .04); }
.request-progress-copy { justify-items: center; gap: .13rem; }
.request-progress-copy strong { color: #45675b; font-size: .78rem; font-weight: 800; letter-spacing: -.01em; }
.request-progress-copy small { max-width: 22ch; color: #718279; font-size: .64rem; }
.request-progress-step.is-active .request-progress-marker { border-color: #087456; background: #fff; color: #087456; box-shadow: 0 0 0 4px #d7efe4, 0 3px 10px rgba(8, 116, 86, .16); }
.request-progress-step.is-active .request-progress-copy strong { color: #103e2e; }
.request-progress-step.is-active .request-progress-copy small { color: #28735a; font-weight: 650; }
.request-progress-step.is-complete .request-progress-marker { border-color: #087456; background: linear-gradient(145deg, #15916d, #087456); box-shadow: 0 3px 10px rgba(8, 116, 86, .17); }
.request-progress-step.is-complete .request-progress-copy strong { color: #1b684d; }
.request-progress-step.is-available .request-progress-marker { border-color: #419476; background: #f4fbf7; color: #087456; }
.request-progress-step:not(:disabled):hover .request-progress-marker { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(8, 116, 86, .18); }
.request-progress-marker { transition: transform .16s ease, background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease; }

@media (max-width: 700px) {
  .request-progress { padding: .9rem .65rem 1rem; }
  .request-progress-marker { width: 33px; height: 33px; font-size: .8rem; }
  .request-progress ol::before { top: 16px; }
  .request-progress-step { min-height: 68px; }
  .request-progress-copy strong { font-size: .66rem; }
  .request-progress-copy small { font-size: .56rem; }
}

/* Request form component polish */
.app-content:has(.request-page) { padding-top: 1rem; padding-bottom: 1.5rem; }
.request-page { max-width: 1380px; margin: 0 auto; gap: 1rem; }
.request-heading { align-items: center; margin-bottom: .1rem; padding: 0 .1rem; }
.request-heading > div { max-width: 66ch; }
.request-heading .btn { flex: 0 0 auto; }
.request-heading h1 { letter-spacing: -.035em; }
.request-heading p { max-width: 58ch; font-size: .86rem; line-height: 1.55; }
.request-form { gap: 1rem; }
.request-form .form-panel { padding: clamp(1.15rem, 2.4vw, 1.6rem); border-color: #d8e7e0; box-shadow: 0 8px 24px rgba(20, 60, 48, .045); }
.request-form .panel-title { align-items: center; gap: .75rem; margin-bottom: 1.15rem; padding-bottom: .85rem; border-bottom: 1px solid #e4eeea; }
.request-form .panel-title > span { width: 2rem; height: 2rem; flex: 0 0 2rem; border-radius: 8px; background: linear-gradient(145deg, #eaf7f0, #dff1e8); color: #087456; font-size: .75rem; box-shadow: inset 0 0 0 1px #cde7d9; }
.request-form .panel-title h2 { font-size: 1.12rem; font-weight: 780; letter-spacing: -.015em; }
.request-form .panel-title p { max-width: 72ch; font-size: .81rem; line-height: 1.45; }
.request-form .filter-grid { gap: .85rem; }
.request-form .field-group { gap: .35rem; }
.request-form .field-group label, .request-form .image-upload label { color: #244c3e; font-size: .76rem; font-weight: 800; letter-spacing: .015em; }
.request-form .field-group select, .request-form .image-upload input { min-height: 39px; border-color: #c9dcd3; border-radius: 8px; padding: .55rem .7rem; font-size: .82rem; transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease; }
.request-form .field-group select:hover, .request-form .image-upload input:hover { border-color: #9fc2b2; background: #fcfefd; }
.request-form .field-group select:disabled { border-color: #dce7e2; background: #f3f7f5; color: #94a49d; }
.app-select { position: relative; }
.request-form .field-group select.app-select-native { position: absolute; width: 1px; min-height: 1px; height: 1px; margin: -1px; padding: 0; border: 0; clip: rect(0 0 0 0); overflow: hidden; opacity: 0; pointer-events: none; }
.app-select-toggle { width: 100%; min-height: 39px; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .55rem .7rem; border: 1px solid #c9dcd3; border-radius: 8px; background: #fff; color: #173c32; font-size: .82rem; text-align: left; transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease; }
.app-select-toggle:hover:not(:disabled), .app-select-toggle[aria-expanded="true"] { border-color: #77aa94; background: #fcfefd; }
.app-select-toggle[aria-expanded="true"] { box-shadow: 0 0 0 3px rgba(11, 121, 91, .1); }
.app-select-toggle:disabled { border-color: #dce7e2; background: #f3f7f5; color: #94a49d; cursor: not-allowed; }
.app-select-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-select-chevron { width: 8px; height: 8px; flex: 0 0 8px; margin-right: .15rem; border-right: 2px solid #527e6d; border-bottom: 2px solid #527e6d; transform: rotate(45deg) translateY(-2px); transition: transform .16s ease; }
.app-select-toggle[aria-expanded="true"] .app-select-chevron { transform: rotate(225deg) translate(-2px, -2px); }
.app-select-menu { position: absolute; z-index: 15; top: calc(100% + .35rem); right: 0; left: 0; max-height: 230px; overflow: auto; padding: .3rem; border: 1px solid #b9d3c6; border-radius: 8px; background: #fff; box-shadow: 0 12px 24px rgba(20, 60, 48, .14); }
.app-select-search { padding: .15rem .15rem .45rem; margin-bottom: .15rem; border-bottom: 1px solid #e3eee9; }
.app-select-search input { width: 100%; height: 31px; padding: .35rem .5rem; border: 1px solid #c9dcd3; border-radius: 5px; background: #fff; color: #111827; font: inherit; font-size: .73rem; }
.app-select-search input:focus { border-color: #0b795b; box-shadow: 0 0 0 2px rgba(11, 121, 91, .1); outline: 0; }
.app-select-option { width: 100%; display: block; padding: .48rem .55rem; border: 0; border-radius: 5px; background: transparent; color: #294b40; font-size: .78rem; text-align: left; }
.app-select-option:hover:not(:disabled), .app-select-option:focus-visible { background: #edf7f1; color: #0b6048; outline: 0; }
.app-select-option.is-selected { background: #e0f1e8; color: #075a43; font-weight: 750; }
.app-select-option:disabled { color: #789087; cursor: default; }
.request-form input:not([type="checkbox"]):not([type="radio"]),
.request-form select,
.request-form .app-select-toggle,
.request-form .app-select-value,
.request-form .app-select-option,
.request-form .checkbox-dropdown-toggle,
.request-form .checkbox-dropdown-tools input { color: #111827 !important; }
.request-form input::placeholder { color: #7b8794 !important; opacity: 1; }
.request-form .input-validation-error { color: #111827 !important; }
.request-form .checkbox-dropdown-option,
.request-form .checkbox-dropdown-option:has(input:checked) { color: #111827 !important; }
.checkbox-dropdown { position: relative; }
.checkbox-dropdown-toggle { width: 100%; min-height: 39px; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .55rem .7rem; border: 1px solid #c9dcd3; border-radius: 8px; background: #fff; color: #173c32; font-size: .82rem; text-align: left; transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease; }
.checkbox-dropdown-toggle:hover, .checkbox-dropdown-toggle[aria-expanded="true"] { border-color: #77aa94; background: #fcfefd; }
.checkbox-dropdown-toggle[aria-expanded="true"] { box-shadow: 0 0 0 3px rgba(11, 121, 91, .1); }
.checkbox-dropdown-chevron { width: 8px; height: 8px; flex: 0 0 8px; margin-right: .15rem; border-right: 2px solid #527e6d; border-bottom: 2px solid #527e6d; transform: rotate(45deg) translateY(-2px); transition: transform .16s ease; }
.checkbox-dropdown-toggle[aria-expanded="true"] .checkbox-dropdown-chevron { transform: rotate(225deg) translate(-2px, -2px); }
.checkbox-dropdown-menu { position: absolute; z-index: 12; top: calc(100% + .35rem); right: 0; left: 0; max-height: 230px; overflow: auto; padding: .35rem; border: 1px solid #b9d3c6; border-radius: 8px; background: #fff; box-shadow: 0 12px 24px rgba(20, 60, 48, .14); }
.checkbox-dropdown-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .35rem; padding: .2rem .2rem .45rem; border-bottom: 1px solid #e3eee9; }
.checkbox-dropdown-tools input { min-width: 0; height: 29px; padding: .3rem .45rem; border: 1px solid #c9dcd3; border-radius: 5px; color: #173c32; font: inherit; font-size: .73rem; }
.checkbox-dropdown-tools button { padding: .3rem .42rem; border: 0; border-radius: 5px; background: #edf7f1; color: #0b6048; font: inherit; font-size: .7rem; font-weight: 750; }
.checkbox-dropdown-tools button:hover { background: #dff0e7; }
.checkbox-dropdown-option { display: flex; align-items: center; gap: .55rem; padding: .45rem .5rem; border-radius: 5px; color: #294b40; cursor: pointer; font-size: .78rem; line-height: 1.25; }
.checkbox-dropdown-option:hover { background: #edf7f1; }
.checkbox-dropdown-option input { width: 14px; height: 14px; flex: 0 0 14px; margin: 0; accent-color: #087456; }
.checkbox-dropdown-option:has(input:checked) { background: #e5f4eb; color: #0c5e46; font-weight: 700; }
.request-form .checkbox-dropdown-toggle > [data-gram-summary] { color: #111827 !important; }
.request-form .checkbox-dropdown-toggle > .checkbox-dropdown-chevron { color: inherit; }

/* Validation messages are direct field children. Do not let the legacy field
   rule colour interactive spans inside the Gram Panchayat selector. */
.request-form .field-group > .checkbox-dropdown .checkbox-dropdown-toggle > span { font-size: inherit; }

/* The preview panel must inherit the A4 page height; otherwise grid rows size
   to their content and leave the lower part of the page blank. */
.request-form .request-a4 > [data-preview-panels],
.request-preview-panel,
.request-preview-panel .request-preview-grid { height: 100%; min-height: 0; }

/* Keep the configuration options evenly sized without spreading compact cards
   across the entire workspace. */
.request-form .pattern-grid { grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: .8rem; }
.request-form .slip-configuration { align-self: start; }
.request-form .slip-configuration .pattern-option { display: block; width: 100%; height: auto; }
.request-form .pattern-option span { height: auto; min-height: 88px; }
.request-form .slip-configuration.is-selected .pattern-option { background: transparent; border-color: transparent; box-shadow: none; }
.request-form .pattern-option input:checked + span { border-color: #087456; background: #edf8f4; box-shadow: inset 0 0 0 1px rgba(8, 116, 86, .16); }
.request-form .form-feedback { margin-top: .65rem; padding: .55rem .7rem; border-left: 3px solid #ba5151; border-radius: 4px; background: #fff5f5; font-size: .78rem; }
.request-form .form-actions { align-items: center; margin-top: 1.1rem; padding-top: .9rem; border-top: 1px solid #e5eeea; }
.request-form .form-actions .btn { min-height: 39px; display: inline-flex; align-items: center; justify-content: center; padding: .55rem 1rem; font-size: .8rem; }
.request-form .form-actions .btn-outline-secondary { border-color: #b7c9c0; color: #395d50; }
.request-form .form-actions .btn-outline-secondary:hover { border-color: #668b7b; background: #f2f7f4; color: #173f32; }
.request-form .pattern-grid { gap: .65rem; }
.request-form .pattern-option span { min-height: 82px; align-content: center; gap: .3rem; padding: .8rem; border-color: #cfdfd7; border-radius: 10px; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, background-color .16s ease; }
.request-form .pattern-option span strong { color: #254b3d; font-size: .82rem; }
.request-form .pattern-option span small { font-size: .67rem; }
.request-form .pattern-option:hover span { border-color: #8eb8a5; box-shadow: 0 5px 14px rgba(20, 76, 56, .07); transform: translateY(-1px); }
.request-form .pattern-option input:checked + span { box-shadow: 0 0 0 2px rgba(8, 116, 86, .14), 0 7px 17px rgba(20, 76, 56, .07); }
.request-form .image-upload { gap: .55rem; margin-top: 1.15rem; padding: .9rem; border-color: #a7c8b9; border-radius: 10px; }
.request-form .image-upload small { color: #6a7d75; font-size: .71rem; }
.request-live-preview { margin-top: 1.15rem; padding: .9rem; border: 1px solid #d4e5dc; border-radius: 11px; background: #f3f8f5; }
.request-live-preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 .75rem; }
.request-live-preview-heading > div:first-child { display: grid; gap: .08rem; }
.request-live-preview-heading strong { color: #214b3d; font-size: .8rem; font-weight: 800; }
.request-live-preview-heading small { color: #718279; font-size: .68rem; }
.preview-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: .45rem; }
.preview-header-actions > span { padding: .2rem .45rem; border-radius: 99px; background: #e2f1e8; color: #17664c; font-size: .64rem; font-weight: 800; }
.preview-download,.document-download { display: inline-flex; align-items: center; justify-content: center; gap: .38rem; border: 1px solid #0b7558; border-radius: 6px; background: #fff; color: #075a43; font: inherit; font-size: .68rem; font-weight: 800; line-height: 1; text-decoration: none; white-space: nowrap; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.preview-download { min-height: 29px; padding: .35rem .5rem; }
.document-download { margin-top: .35rem; min-height: 28px; padding: .32rem .48rem; }
.preview-download:hover,.document-download:hover { border-color: #075a43; background: #eaf6f0; color: #064733; }
.preview-download:focus-visible,.document-download:focus-visible { outline: 2px solid #087456; outline-offset: 2px; }
.preview-download:disabled { cursor: wait; opacity: .68; }
.preview-download svg,.document-download svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.request-form .selection-results { margin-top: 1.15rem; padding: .9rem; border-color: #d2e6dc; border-radius: 12px; background: linear-gradient(145deg, #fbfefc, #f2f9f5); }
.request-form .selection-results-heading { margin-bottom: .7rem; }
.request-form .selection-results-heading h3 { font-size: .95rem; font-weight: 780; }
.request-form .selection-results-heading p { font-size: .74rem; }
.request-form .selection-results-heading span { padding: .28rem .55rem; font-size: .67rem; }
.request-form .selection-table-wrap { border-color: #d3e2da; border-radius: 8px; box-shadow: 0 2px 7px rgba(20, 60, 48, .025); }
.request-form .selection-table thead { background: #f1f8f4; }
.request-form .selection-table thead th { padding-top: .65rem; padding-bottom: .65rem; color: #315d4d; font-size: .64rem; font-weight: 850; }
.request-form .selection-table tbody tr { transition: background-color .14s ease; }
.request-form .selection-table tbody tr:nth-child(even) { background: #fbfdfc; }
.request-form .selection-table tbody tr:hover { background: #eef8f2; }
.request-form .selection-table th, .request-form .selection-table td { padding: .62rem .65rem; }
.request-form .selection-table tfoot th { padding-top: .68rem; padding-bottom: .68rem; }
.request-form .selection-table-amount th { background: #e2f2e9; color: #075a43; }
.request-form .payment-quote { gap: .65rem; margin-bottom: 1rem; padding: .85rem; border-color: #cee2d8; border-radius: 11px; background: linear-gradient(135deg, #f7fcf9, #edf7f1); }
.request-form .payment-quote > div { min-height: 55px; align-content: center; padding: .5rem .65rem; border: 1px solid #dcebe3; border-radius: 8px; background: rgba(255, 255, 255, .72); }
.request-form .payment-quote small { font-size: .68rem; font-weight: 700; }
.request-form .payment-quote strong { font-size: 1rem; font-weight: 800; }
.request-form .payment-quote > span { padding-top: .65rem; font-size: .71rem; }
.request-form .request-a4 { border-radius: 3px; box-shadow: 0 12px 28px rgba(21, 50, 42, .13); }
.payment-stage-page { gap: 1rem; }
.payment-stage-panel { padding: clamp(1.15rem, 2.4vw, 1.6rem); border-color: #d8e7e0; box-shadow: 0 8px 24px rgba(20, 60, 48, .045); }
.payment-stage-panel .panel-title { margin-bottom: 1.1rem; padding-bottom: .85rem; border-bottom: 1px solid #e4eeea; }
.payment-stage-panel .panel-title h2 { color: #173f32; font-size: 1.12rem; font-weight: 780; letter-spacing: -.015em; }
.payment-stage-panel .panel-title p { margin: .2rem 0 0; color: #667b72; font-size: .81rem; }
.payment-stage-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .65rem; margin: 0; }
.payment-stage-summary > div { min-height: 66px; display: grid; align-content: center; gap: .25rem; padding: .65rem .75rem; border: 1px solid #d8e7e0; border-radius: 9px; background: #fbfefc; }
.payment-stage-summary dt { color: #718279; font-size: .67rem; font-weight: 750; }
.payment-stage-summary dd { margin: 0; color: #244c3e; font-size: .9rem; font-weight: 800; }
.payment-stage-summary .payment-stage-amount { color: #087456; font-size: 1rem; }
.payment-stage-unavailable { display: flex; align-items: flex-start; gap: .8rem; margin-top: 1rem; padding: .9rem; border: 1px solid #d5e6dd; border-radius: 10px; background: #f3f8f5; }
.payment-stage-icon { width: 31px; height: 31px; display: grid; flex: 0 0 31px; place-items: center; border-radius: 8px; background: #e0f1e8; color: #087456; font-size: .95rem; font-weight: 850; }
.payment-stage-unavailable h3 { margin: .05rem 0 .22rem; color: #214b3d; font-size: .87rem; font-weight: 800; }
.payment-stage-unavailable p { margin: 0; color: #60766c; font-size: .76rem; line-height: 1.5; }
.payment-stage-panel .form-actions { align-items: center; margin-top: 1.1rem; padding-top: .9rem; border-top: 1px solid #e5eeea; }
.payment-stage-panel .form-actions .btn { min-height: 39px; display: inline-flex; align-items: center; justify-content: center; padding: .55rem 1rem; font-size: .8rem; }

.request-table-row { cursor: pointer; transition: background-color .14s ease, box-shadow .14s ease; }
.request-table-row:hover { background: #eff8f3; }
.request-table-row:focus-visible { position: relative; z-index: 1; outline: 2px solid #087456; outline-offset: -2px; background: #eff8f3; }
.order-selection-list { display: grid; gap: .24rem; margin: 0; }
.order-selection-list > div { display: grid; grid-template-columns: minmax(7.9rem, auto) minmax(0, 1fr); gap: .5rem; }
.order-selection-list dt { color: #63766e; font-size: .7rem; font-weight: 750; }
.order-selection-list dd { min-width: 0; margin: 0; color: #21483b; font-size: .77rem; font-weight: 680; overflow-wrap: anywhere; }

/* Approved slip-format previews. These mirror the fixed printable structures,
   rather than deriving their shape from the retired row/column layouts. */
.layout-NineSlipWithImage { grid-template-rows: repeat(3, minmax(0, 1fr)); }
.request-preview-card { border-color: #222; }
.request-preview-card.with-image { grid-template-rows: 48% 52%; }
.preview-image { display: grid; place-items: center; background: #fff7c7; border-bottom-color: #222; color: #607066; font-size: .55rem; }
.house-preview { height: 100%; display: grid; grid-template-rows: auto 1fr; gap: 4%; padding: 5% 3%; color: #111; background: #fff; }
.house-preview-heading { min-height: 12%; padding: 3% 4%; border-bottom: 1px solid #222; font-size: clamp(.42rem, 1.25vw, .65rem); font-weight: 700; }
.house-preview-cards { display: grid; grid-template-columns: repeat(3, 1fr); align-content: end; gap: 2%; }
.house-preview-card { display: grid; gap: 7%; padding: 6%; border: 1px solid #222; font-size: clamp(.28rem, .8vw, .43rem); line-height: 1.1; }
.house-preview-card b { padding-bottom: 5%; border-bottom: 1px solid #222; text-align: center; }
.alphabetic-preview { height: 100%; padding: 4% 2%; color: #111; background: #fff; }
.alphabetic-preview-heading { margin-bottom: 4%; font-size: clamp(.46rem, 1.25vw, .72rem); font-weight: 700; text-align: center; }
.alphabetic-preview table { width: 100%; border-collapse: collapse; font-size: clamp(.25rem, .72vw, .4rem); }
.alphabetic-preview th { padding: 2%; border: 1px solid #222; font-weight: 700; }
.alphabetic-preview td { padding: 1.7% 1%; border-bottom: 1px solid #222; text-align: center; }
.pending-format-preview { height: 100%; display: grid; place-items: center; padding: 15%; border: 1px dashed #a2b8ac; color: #62776c; background: #fbfdfc; font-size: .78rem; text-align: center; }

/* Fixed print-format preview. The percentages are the approved A4 point coordinates
   converted to a scalable browser preview; they are intentionally not responsive UI layout. */
@font-face { font-family: "ElectionSlipNoto"; src: url("/fonts/NotoSansDevanagari-Regular.ttf") format("truetype"); font-style: normal; font-weight: 400; font-display: block; }
@font-face { font-family: "ElectionSlipNoto"; src: url("/fonts/NotoSansDevanagari-Bold.ttf") format("truetype"); font-style: normal; font-weight: 700; font-display: block; }
.request-live-preview .request-a4 { padding: 0; overflow: hidden; }
.approved-a4-preview { position: relative; width: 100%; height: 100%; overflow: hidden; color: #000; background: #fff; font-family: "ElectionSlipNoto", sans-serif; font-synthesis: none; font-weight: 700; line-height: 1; }
.approved-nine-image { position: absolute; width: 29.23%; height: 16.39%; display: grid; place-items: center; overflow: hidden; background: #fff; color: #555; font-size: clamp(3px, .55vw, 5px); }
.approved-nine-image img { width: 100%; height: 100%; object-fit: contain; display: block; }
.approved-nine-card { position: absolute; width: 29.11%; height: 14.11%; box-sizing: border-box; overflow: hidden; border: .8px solid #000; padding: 1.2% 1.7%; font-size: clamp(4px, .72vw, 6.35px); font-weight: 700; }
.approved-nine-card strong,.approved-nine-card>b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.approved-nine-card strong { text-align: center; font-size: 1.05em; }
.approved-nine-card>b { margin: 3% 0 2%; text-align: right; font-size: 1.04em; }
.approved-nine-card div { display: grid; grid-template-columns: 1.1fr .7fr .8fr .64fr; gap: 2%; align-items: center; }
.approved-nine-card em { box-sizing: border-box; min-height: 1.7em; border: .7px solid #000; font-style: normal; text-align: center; display: grid; place-items: center; padding: 0; }
.approved-nine-card p { margin: 2.8% 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.approved-nine-card p i { float: right; font-style: normal; }
.approved-nine-card small { display: block; margin-top: 3%; font-size: .92em; line-height: 1.16; }
.approved-eighteen-card { position: absolute; width: 29.11%; height: 14.11%; box-sizing: border-box; overflow: hidden; border: .8px solid #000; padding: 1.05% 1.7%; font-size: clamp(4px, .72vw, 6.35px); font-weight: 700; }
.approved-eighteen-card strong,.approved-eighteen-card>b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.approved-eighteen-card strong { text-align: center; font-size: 1.05em; }
.approved-eighteen-card>b { margin: 2.6% 0 1.7%; text-align: right; font-size: 1.04em; }
.approved-eighteen-card div { display: grid; grid-template-columns: 1.1fr .78fr .72fr .72fr; gap: 1.7%; align-items: center; }
.approved-eighteen-card em { box-sizing: border-box; min-height: 1.7em; border: .7px solid #000; font-style: normal; text-align: center; display: grid; place-items: center; padding: 0; }
.approved-eighteen-card p { margin: 2.55% 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.approved-eighteen-card p i { float: right; font-style: normal; }
.approved-eighteen-card small { display: block; margin-top: 2.7%; font-size: .92em; line-height: 1.16; }
.approved-house-page { position: absolute; top: .7%; right: 2.25%; font-size: clamp(4.7px, .72vw, 7px); font-weight: 700; }
.approved-house-leader,.approved-house-number,.approved-house-booth { position: absolute; font-size: clamp(7.05px, 1.58vw, 12.85px); white-space: nowrap; font-weight: 700; }
.approved-house-leader { left: 10.46%; top: 17.1%; }.approved-house-number { left: 10.46%; top: 19%; }.approved-house-booth { right: 5.9%; top: 19%; }
.approved-house-card { position: absolute; width: 30.115%; height: 13.014%; box-sizing: border-box; overflow: hidden; border: .8px solid #000; font-size: clamp(3.75px, .7vw, 6px); font-weight: 700; }
.approved-house-card strong { display: block; padding: 3.2% 2%; border-bottom: .8px solid #000; text-align: center; font-size: .94em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.approved-house-card div,.approved-house-card p,.approved-house-card small { display: block; margin: 3.4% 2.55% 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.approved-house-card p { margin-top: 4.2%; }.approved-house-card i { float: right; font-style: normal; }.approved-house-card small { font-size: .9em; line-height: 1.08; white-space: normal; }
.approved-alphabetic-title { position: absolute; top: 1.95%; left: 3%; width: 94%; text-align: center; font-size: clamp(7.05px, 1.67vw, 13.9px); font-weight: 700; }
.approved-alphabetic-meta { position: absolute; top: 5.05%; left: 3.8%; width: 73%; white-space: nowrap; overflow: hidden; font-size: clamp(4.7px, .98vw, 8.55px); font-weight: 700; }
.approved-alphabetic-page { position: absolute; top: 8%; right: 7.6%; font-size: clamp(4.7px, .91vw, 7.95px); font-weight: 700; }
.approved-alphabetic-table { position: absolute; top: 10.775%; left: 2.057%; width: 96.4%; height: 85.677%; border-collapse: collapse; table-layout: fixed; font-size: clamp(3.75px, .71vw, 6px); font-weight: 700; }
.approved-alphabetic-table col:nth-child(1){width:11.44%}.approved-alphabetic-table col:nth-child(2){width:18.36%}.approved-alphabetic-table col:nth-child(3){width:20.02%}.approved-alphabetic-table col:nth-child(4){width:16.57%}.approved-alphabetic-table col:nth-child(5){width:6.61%}.approved-alphabetic-table col:nth-child(6){width:10.84%}.approved-alphabetic-table col:nth-child(7){width:16.16%}
.approved-alphabetic-table thead { height: 3.11%; border: .8px solid #000; }.approved-alphabetic-table th { height: 3.11%; box-sizing: border-box; border: 0; padding: 0 1.1%; text-align: center; font-weight: 700; }
.approved-alphabetic-table tbody tr { height: 3.727%; }.approved-alphabetic-table td { height: 3.727%; box-sizing: border-box; border: 0; border-bottom: .8px solid #000; padding: 0 1.1%; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.approved-alphabetic-table th:nth-child(2),.approved-alphabetic-table th:nth-child(3),.approved-alphabetic-table td:nth-child(2),.approved-alphabetic-table td:nth-child(3) { padding-left: 1.1%; text-align: left; }.approved-alphabetic-table b { font-weight: 700; }
.pattern-option em { color: #8c6725; font-size: .65rem; font-style: normal; font-weight: 700; }

@media (max-width: 991px) {
  .request-form .pattern-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .payment-stage-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .request-heading { align-items: flex-start; }
  .request-form .filter-grid, .request-form .pattern-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .request-form .form-panel { padding: 1rem; }
}

@media (max-width: 520px) {
  .request-heading { display: grid; }
  .request-heading .btn { width: 100%; }
  .request-form .filter-grid, .request-form .pattern-grid { grid-template-columns: 1fr; }
  .payment-stage-summary { grid-template-columns: 1fr; }
  .request-form .form-actions { display: grid; }
  .payment-stage-panel .form-actions { display: grid; }
  .request-form .form-actions .btn { width: 100%; }
  .request-form .selection-results { padding: .65rem; }
  .request-form .payment-quote { grid-template-columns: 1fr; }
  .order-selection-list > div { grid-template-columns: 1fr; gap: .05rem; }
}
