:root {
  color-scheme: dark;
  --bg: #111315;
  --bg-soft: #171a1c;
  --panel: #191d1f;
  --panel-raised: #1d2224;
  --line: #2a3032;
  --line-soft: #242a2c;
  --text: #f0f2ec;
  --muted: #8b9695;
  --muted-bright: #a8b1ae;
  --brand: #ff6672;
  --brand-rgb: 255, 102, 114;
  --brand-deep: #c92f43;
  --brand-deeper: #ae2739;
  --success: #c7e87d;
  --success-rgb: 199, 236, 90;
  --lilac: #d0bcff;
  --purple: #8c6dcb;
  --teal: #6cd8bb;
  --blue: #82b8f4;
  --amber: #eac26f;
  --red: #f08980;
  --radius: 15px;
  --shadow: 0 24px 70px rgba(0, 0, 0, .36);
  font-family: 'DM Sans', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--bg); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.root { min-height: 100vh; }
.loading-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 16px; color: var(--muted); }
.loading-screen p { margin: 0; font-size: 14px; }

.brand-lockup { display: flex; gap: 13px; align-items: center; color: var(--text); }
.brand-logo { display: block; width: 166px; height: auto; flex: 0 0 auto; }
.sidebar-icon { display: none; }
.brand-caption { color: var(--muted-bright); font: 700 9px 'DM Mono', monospace; letter-spacing: .12em; line-height: 1.5; }

.auth-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, .93fr) 1.07fr; background: #141719; }
.auth-story { min-height: 100vh; padding: 42px 8.5%; display: flex; flex-direction: column; justify-content: space-between; background: radial-gradient(ellipse at 12% 80%, rgba(156, 131, 213, .14), transparent 41%), radial-gradient(ellipse at 80% 16%, rgba(var(--brand-rgb), .13), transparent 32%), linear-gradient(154deg, #1b2021, #131617 64%, #171b1b); position: relative; overflow: hidden; }
.auth-story::after { content: ''; position: absolute; width: 520px; height: 520px; right: -220px; bottom: -200px; border: 1px solid rgba(var(--brand-rgb), .09); border-radius: 50%; box-shadow: 0 0 0 56px rgba(var(--brand-rgb), .022), 0 0 0 112px rgba(var(--brand-rgb), .014); }
.auth-story-copy { position: relative; z-index: 1; max-width: 520px; margin: auto 0; padding: 74px 0 100px; }
.eyebrow { color: var(--muted); font: 600 10px 'DM Mono', monospace; letter-spacing: .17em; text-transform: uppercase; }
.auth-story h1 { font: 600 clamp(40px, 5vw, 68px)/1.07 'Manrope', sans-serif; letter-spacing: -.065em; margin: 23px 0 18px; }
.auth-story h1 em { color: var(--brand); font-style: normal; }
.auth-story-copy p { color: #aab3af; font-size: 15px; line-height: 1.65; max-width: 370px; }
.story-foot { display: flex; align-items: center; gap: 10px; color: #99a29f; font-size: 12px; position: relative; z-index: 1; }
.pulse-dot, .secure-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .12); }
.auth-panel { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 32px; background: #151819; }
.auth-card { width: min(100%, 405px); padding: 34px 0; }
.auth-card h2 { margin: 12px 0 7px; font: 700 28px 'Manrope', sans-serif; letter-spacing: -.045em; }
.muted, .auth-card .muted { color: var(--muted); }
.auth-card > p { font-size: 13px; line-height: 1.55; margin: 0 0 27px; }
.step-label { color: var(--brand); font: 500 10px 'DM Mono', monospace; letter-spacing: .16em; }
.form-stack { display: grid; gap: 17px; }
.form-stack label, .work-form label { display: grid; gap: 7px; color: #bdc5c1; font-size: 12px; font-weight: 600; }
.form-stack input, .work-form input, .work-form select, .work-form textarea { width: 100%; min-height: 43px; border: 1px solid #353c3e; border-radius: 9px; background: #1c2022; color: var(--text); padding: 10px 12px; outline: none; }
.form-stack input::placeholder, .work-form input::placeholder, .work-form textarea::placeholder { color: #677170; }
.form-stack input:focus, .work-form input:focus, .work-form select:focus, .work-form textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .12); }
.form-stack input:invalid:not(:placeholder-shown) { border-color: #954f4b; }
.form-error { min-height: 16px; margin: -8px 0 0; color: #fa9489; font-size: 12px; }
.auth-privacy { color: #737d7b; font-size: 11px; text-align: center; margin: 34px 0 0; }
.hint-inline { font-size: 10px; color: var(--muted); font-weight: 400; margin-left: 5px; }

.button { border: 1px solid transparent; border-radius: 9px; min-height: 39px; padding: 0 14px; display: inline-flex; gap: 14px; align-items: center; justify-content: center; cursor: pointer; font-size: 12px; font-weight: 700; transition: transform .16s ease, background .16s ease, border-color .16s ease, opacity .16s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { opacity: .48; cursor: not-allowed; }
.button-primary { background: var(--brand-deep); color: #fff; box-shadow: 0 5px 18px rgba(var(--brand-rgb), .14); }
.button-primary:hover:not(:disabled) { background: var(--brand-deeper); }
.button-secondary { background: #242a2c; color: var(--text); border-color: #383f40; }
.button-secondary:hover:not(:disabled) { background: #2a3132; border-color: #5a6962; }
.button-quiet { background: transparent; color: #a9b2af; border-color: #303638; }
.button-quiet:hover:not(:disabled) { color: var(--text); border-color: #57625f; background: rgba(255,255,255,.02); }
.button-wide { width: 100%; margin-top: 7px; min-height: 46px; }
.button-icon { font-size: 16px; line-height: .8; }
.text-button { border: 0; padding: 5px 0; background: transparent; color: var(--brand); font-size: 11px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.text-button:hover { color: #ff929b; }
.icon-button { border: 0; width: 30px; height: 30px; border-radius: 8px; background: transparent; color: #8f9a97; font-size: 23px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.icon-button:hover { background: #2a3032; color: #fff; }
.required-mark { color: var(--brand); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 242px minmax(0, 1fr); }
.sidebar { background: #151819; border-right: 1px solid var(--line-soft); padding: 22px 14px 14px; display: flex; flex-direction: column; min-height: 100vh; position: sticky; top: 0; height: 100vh; }
.sidebar-brand { padding: 0 11px 28px; flex-wrap: wrap; gap: 8px 10px; }
.sidebar-brand .brand-logo { width: 158px; }
.sidebar-brand .brand-caption { padding-left: 2px; }
.workspace-label, .nav-section-label { margin: 0 11px 11px; color: #697371; font: 500 9px 'DM Mono', monospace; letter-spacing: .16em; }
.primary-nav { display: grid; gap: 4px; }
.nav-item { width: 100%; border: 0; display: flex; gap: 11px; align-items: center; min-height: 39px; border-radius: 8px; padding: 0 10px; color: #a2adaa; text-align: left; background: transparent; font-size: 12px; font-weight: 600; cursor: pointer; }
.nav-item:hover { background: #202526; color: #e3e8e2; }
.nav-item.is-active { color: var(--brand); background: rgba(var(--brand-rgb), .09); box-shadow: inset 2px 0 0 var(--brand); }
.nav-icon { width: 18px; text-align: center; font-size: 17px; opacity: .9; }
.nav-count { margin-left: auto; min-width: 21px; height: 20px; border-radius: 20px; display: grid; place-items: center; padding: 0 5px; color: #b4beb8; background: #282e30; font: 500 10px 'DM Mono', monospace; }
.nav-divider { height: 1px; background: #272d2e; margin: 14px 9px 10px; }
.nav-section-label { margin-bottom: 4px; }
.sidebar-bottom { margin-top: auto; position: relative; }
.boundary-note { display: flex; gap: 10px; align-items: center; padding: 12px 11px; margin-bottom: 10px; border: 1px solid #2d3434; border-radius: 10px; background: linear-gradient(110deg, rgba(var(--brand-rgb),.06), rgba(126,108,169,.045)); }
.boundary-icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--brand); background: rgba(var(--brand-rgb),.10); }
.boundary-note strong, .boundary-note small, .user-copy strong, .user-copy small { display: block; }
.boundary-note strong { font-size: 11px; }
.boundary-note small { color: var(--muted); font-size: 10px; margin-top: 4px; }
.user-menu { width: 100%; border: 0; display: flex; align-items: center; gap: 9px; padding: 9px 8px; background: transparent; text-align: left; border-radius: 9px; cursor: pointer; }
.user-menu:hover { background: #202526; }
.avatar, .top-avatar { width: 31px; height: 31px; border: 1px solid rgba(var(--brand-rgb), .42); color: var(--brand); background: rgba(var(--brand-rgb), .12); border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; }
.user-copy { min-width: 0; flex: 1; }
.user-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.user-copy small { color: var(--muted); font-size: 10px; margin-top: 3px; text-transform: capitalize; }
.user-menu-dots { color: #8b9694; font-size: 20px; }
.user-popover { position: absolute; bottom: 53px; left: 7px; right: 7px; padding: 5px; background: #262c2d; border: 1px solid #3d4646; border-radius: 9px; box-shadow: var(--shadow); z-index: 4; }
.user-popover button { width: 100%; background: transparent; border: 0; border-radius: 6px; padding: 9px 10px; text-align: left; color: #d5dcd7; cursor: pointer; font-size: 12px; }
.user-popover button:hover { background: #353c3d; }
.hidden { display: none !important; }
.main-area { min-width: 0; }
.topbar { height: 60px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; padding: 0 34px; background: rgba(17, 19, 21, .83); }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: #7f8a88; font-size: 11px; }
.breadcrumb i { color: #59615f; font-style: normal; }
.breadcrumb strong { color: #d9dfd9; font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.secure-label { color: #8b9692; display: flex; align-items: center; gap: 8px; font-size: 10px; }
.secure-dot { width: 6px; height: 6px; box-shadow: none; }
.top-avatar { width: 28px; height: 28px; }
.mobile-brand { display: none; align-items: center; gap: 9px; font: 800 11px 'Manrope', sans-serif; letter-spacing: .08em; }
.brand-icon { display: block; width: 30px; height: 30px; border-radius: 7px; }
.page-content { max-width: 1560px; padding: 33px 34px 60px; margin: 0 auto; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-heading h1 { margin: 7px 0 7px; font: 700 30px 'Manrope', sans-serif; letter-spacing: -.055em; }
.page-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.heading-actions { display: flex; align-items: center; gap: 9px; }

.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 17px; }
.migration-progress { display: flex; align-items: center; gap: 18px; padding: 14px 16px; margin-bottom: 14px; border-color: rgba(var(--brand-rgb),.24); background: linear-gradient(110deg, rgba(var(--brand-rgb),.055), #191d1f 54%); }
.migration-progress > div:first-child { min-width: 0; flex: 1; }
.migration-progress h2 { margin: 4px 0; font: 700 14px 'Manrope',sans-serif; }
.migration-progress p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.migration-progress-count { min-width: 110px; text-align: center; }
.migration-progress-count strong, .migration-progress-count small { display: block; }
.migration-progress-count strong { color: var(--brand); font: 700 23px 'Manrope',sans-serif; }
.migration-progress-count small { color: var(--muted); font-size: 9px; }
.writer-list-review { margin-top: 11px; padding: 10px 11px; border: 1px solid #343d3e; border-radius: 8px; background: #1b2021; }
.file-source-line { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.sales-status { display: inline-flex; align-items: center; min-height: 23px; padding: 0 8px; border-radius: 20px; color: #e5c982; background: rgba(234,194,111,.10); font-size: 9px; font-weight: 700; white-space: nowrap; }
.sales-status-mapped, .sales-status-processed { color: #9fdec2; background: rgba(108,216,187,.09); }
.sales-status-error { color: #f2aaa0; background: rgba(240,137,128,.09); }
.sales-journey { display: flex; gap: 24px; align-items: center; padding: 21px 24px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(110deg,rgba(var(--brand-rgb),.055),var(--panel)); }
.sales-journey > div { display: grid; grid-template-columns: 31px 1fr; gap: 5px 10px; flex: 1; }
.sales-journey > div > span { grid-row: 1/3; color: var(--brand); font: 500 12px 'DM Mono',monospace; padding-top: 2px; }
.sales-journey strong { font-size: 12px; font-weight: 600; }
.sales-journey small { color: var(--muted); font-size: 10px; }
.sales-journey > i { font-style: normal; color: #5b6462; }
.sales-file-actions { display: grid; gap: 6px; justify-items: start; }
.sales-file-actions a { color: var(--muted-bright); }
.sales-files-table td:first-child { max-width: 330px; overflow-wrap: anywhere; white-space: normal; }
.sales-empty { display: grid; justify-items: center; padding: 42px 20px; text-align: center; }
.sales-empty h3 { font-size: 16px; margin: 15px 0 3px; }
.sales-empty p { color: var(--muted); font-size: 12px; line-height: 1.6; margin-bottom: 20px; }
.dialog.sales-dialog { width: min(1040px,calc(100vw - 26px)); }
.sales-dialog[open] { display: flex; flex-direction: column; }
.sales-dialog .dialog-head, .sales-dialog .dialog-actions { flex: 0 0 auto; }
.sales-dialog .dialog-scroll { flex: 1 1 auto; min-height: 0; max-height: none; }
.sales-dialog .dialog-head { gap: 20px; }
.sales-dialog .dialog-head > div { min-width: 0; }
.sales-dialog h2 { overflow-wrap: anywhere; }
.sales-dialog .dialog-head .icon-button { flex: 0 0 auto; }
.sales-dialog .sales-dialog-scroll { padding-top: 20px; }
.sales-steps { display: flex; gap: 26px; padding: 0 0 19px; margin: 0 0 20px; list-style: none; border-bottom: 1px solid var(--line); }
.sales-steps li { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.sales-steps li > span { display: grid; place-items: center; border: 1px solid #424a4b; border-radius: 50%; height: 24px; width: 24px; font: 10px 'DM Mono',monospace; }
.sales-steps li.is-current { color: var(--text); font-weight: 700; }
.sales-steps li.is-current > span { color: var(--brand); background: rgba(var(--brand-rgb),.09); border-color: var(--brand-deep); }
.sales-steps li.is-complete > span { color: var(--teal); background: rgba(108,216,187,.05); border-color: #3a6b5d; }
.sales-options { padding: 16px; border: 1px solid var(--line); background: #1c2022; border-radius: 10px; margin-bottom: 20px; }
.sales-options strong { font-size: 12px; }
.sales-options p, .sales-map-hint { color: var(--muted); font-size: 11px; line-height: 1.6; margin: 5px 0 15px; }
.sales-options-fields { display: grid; grid-template-columns: minmax(150px,1fr) 110px minmax(130px,1fr) auto; gap: 12px; align-items: end; }
.sales-options-fields label:has([name="worksheet"]) { min-width: 0; }
.sales-options-fields .button { min-height: 43px; align-self: end; }
.sales-options-fields:not(:has([name="worksheet"])) { grid-template-columns: minmax(150px,1fr) 110px auto; }
.sales-source-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; font-size: 11px; color: var(--muted); margin: 17px 0; }
.sales-source-meta strong { color: var(--text); font-size: 12px; }
.sales-map-grid { gap: 18px; align-items: start; }
.sales-map-grid label { align-content: start; }
.sales-map-grid .required-mark { display: contents; }
.sales-map-grid .field-note { line-height: 1.5; font-weight: 400; }
.sales-map-hint { margin-top: 16px; }
.sales-raw-preview { border-top: 1px solid var(--line); padding-top: 17px; color: var(--muted-bright); margin: 20px 0; }
.sales-raw-preview > summary { cursor: pointer; font-size: 12px; padding-bottom: 13px; }
.sales-raw-preview .work-table { min-width: 100%; }
.sales-raw-preview td { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.sales-raw-preview th { white-space: nowrap; }
.sales-loading { color: var(--muted-bright); font-size: 12px; padding: 16px; background: #202526; border-radius: 8px; }
.sales-form-error { margin: 17px 0 0; line-height: 1.6; }
.sales-review-title { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin: 22px 0 17px; }
.sales-review-title h3 { font: 700 21px 'Manrope',sans-serif; letter-spacing: -.04em; margin: 7px 0 0; }
.sales-review-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin: 18px 0; }
.sales-review-stats > div { border: 1px solid #333c3d; border-radius: 10px; padding: 16px; background: #1c2223; }
.sales-review-stats strong { display: block; font: 600 26px 'Manrope',sans-serif; letter-spacing: -.04em; }
.sales-review-stats small { display: block; color: var(--muted-bright); font-size: 10px; margin-top: 6px; }
.sales-review-stats .is-alert strong { color: var(--red); }
.sales-review-stats .is-alert { border-color: #673c38; background: rgba(240,137,128,.035); }
.sales-review-stats .is-hold strong { color: var(--amber); }
.sales-total-card { border: 1px solid #354343; border-radius: 10px; background: #1a2424; padding: 18px; margin-bottom: 18px; display: flex; justify-content: space-between; gap: 22px; align-items: center; }
.sales-total-card > div > strong { font-size: 12px; }
.sales-total-card > div > small { display: block; margin-top: 6px; color: var(--muted-bright); font-size: 10px; line-height: 1.5; max-width: 310px; }
.sales-totals { display: flex; gap: 16px; flex-wrap: wrap; justify-content: flex-end; }
.sales-totals > span { display: grid; justify-items: end; gap: 5px; }
.sales-totals small { font: 10px 'DM Mono',monospace; color: var(--teal); }
.sales-totals strong { font: 600 18px 'DM Mono',monospace; overflow-wrap: anywhere; }
.sales-rows-heading { display: flex; align-items: center; justify-content: space-between; margin-top: 25px; gap: 15px; }
.sales-rows-heading h4 { font-size: 12px; margin: 0 0 12px; }
.sales-issues-toggle { display: flex; align-items: center; gap: 7px; color: var(--muted-bright); font-size: 11px; margin-bottom: 12px; }
.sales-issues-toggle input { accent-color: var(--brand-deep); width: 15px; height: 15px; }
.sales-preview-table { border: 1px solid var(--line); border-radius: 10px; }
.sales-preview-table .work-table { min-width: 680px; }
.sales-preview-table td:nth-child(2), .sales-preview-table td:nth-child(5) { white-space: normal; max-width: 230px; overflow-wrap: anywhere; }
.sales-preview-table td { vertical-align: top; }
.sales-amount { font-family: 'DM Mono',monospace; font-size: 11px; font-variant-numeric: tabular-nums; }
.sales-match { display: inline-flex; color: var(--amber); font-size: 10px; line-height: 1.5; }
.sales-match-matched { color: var(--teal); }
.sales-row-errors { color: var(--red); font-size: 10px; line-height: 1.6; padding-left: 15px; margin: 7px 0 0; }
.sales-reconcile { padding: 21px; border: 1px solid #5e3a40; border-radius: 12px; background: linear-gradient(120deg,rgba(var(--brand-rgb),.045),transparent); margin: 18px 0; }
.sales-reconcile h3 { font: 600 18px 'Manrope',sans-serif; margin: 8px 0; letter-spacing: -.025em; }
.sales-reconcile p { color: var(--muted-bright); line-height: 1.6; font-size: 12px; max-width: 630px; margin: 0 0 20px; }
.sales-reconcile .field-note { font-weight: 400; font-size: 10px; }
.sales-dialog .notice { margin-bottom: 16px; }
.sales-dialog .notice-success { border-color: #34574b; background: rgba(108,216,187,.05); }
.sales-dialog .notice-success .notice-icon { color: var(--teal); }
#sales-file-form select { width: 100%; min-height: 43px; border: 1px solid #353c3e; border-radius: 9px; background: #1c2022; color: var(--text); padding: 10px 12px; }
.sales-scope-note { margin-bottom: 14px; }
.file-download { display: inline-block; white-space: nowrap; }
.summary-card { min-height: 138px; padding: 16px 17px 14px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(150deg, #1c2022, #191d1f); box-shadow: 0 5px 20px rgba(0,0,0,.07); }
.summary-card-top { display: flex; align-items: center; justify-content: space-between; }
.summary-label { color: #929d99; font: 500 9px 'DM Mono', monospace; letter-spacing: .12em; }
.summary-icon { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; font-size: 14px; }
.summary-icon.lilac { background: rgba(208,188,255,.12); color: var(--lilac); }
.summary-icon.amber { background: rgba(234,194,111,.11); color: var(--amber); }
.summary-icon.teal { background: rgba(108,216,187,.12); color: var(--teal); }
.summary-icon.blue { background: rgba(130,184,244,.12); color: var(--blue); }
.summary-number { margin-top: 9px; font: 700 28px 'Manrope', sans-serif; letter-spacing: -.05em; }
.summary-foot { margin-top: 6px; color: #828d89; font-size: 10px; display: flex; gap: 7px; align-items: center; }
.summary-foot-dot { width: 5px; height: 5px; background: #80d2ad; border-radius: 50%; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.72fr) minmax(245px, .78fr); gap: 14px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.panel-heading { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 20px; }
.panel-heading h2 { margin: 0; font: 700 14px 'Manrope', sans-serif; letter-spacing: -.03em; }
.panel-heading p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.recent-panel { min-width: 0; }
.next-panel { padding-bottom: 15px; }
.checklist-ring { width: 31px; height: 31px; display: grid; place-items: center; border: 2px solid #37413a; border-right-color: var(--brand); border-radius: 50%; color: #ff9aa3; font: 500 9px 'DM Mono', monospace; }
.checklist-items { display: grid; gap: 0; padding: 1px 20px 0; }
.checklist-item { display: flex; gap: 11px; align-items: center; min-height: 54px; border-top: 1px solid #252b2c; }
.check-icon { width: 22px; height: 22px; border: 1px solid #4a5350; color: #98a29d; border-radius: 50%; display: grid; place-items: center; font: 500 10px 'DM Mono', monospace; flex: none; }
.checklist-item.is-done .check-icon { border-color: #51623b; background: rgba(var(--success-rgb),.08); color: var(--success); }
.checklist-item strong, .checklist-item small { display: block; }
.checklist-item strong { font-size: 10px; font-weight: 600; }
.checklist-item small { margin-top: 4px; color: #7f8a86; font-size: 9px; }
.soft-callout { display: flex; gap: 8px; margin: 13px 17px 0; padding: 10px 11px; border: 1px solid rgba(var(--brand-rgb),.2); border-radius: 9px; background: rgba(var(--brand-rgb),.045); color: var(--brand); }
.soft-callout > span { font-size: 13px; margin-top: 1px; }
.soft-callout p { margin: 0; color: #b0b8a0; font-size: 9px; line-height: 1.5; }
.overview-bottom { display: grid; grid-template-columns: minmax(200px, .8fr) 1fr 1fr; gap: 13px; margin-top: 14px; }
.bottom-intro { padding: 12px 6px; }
.bottom-intro h2 { margin: 5px 0; font: 700 17px 'Manrope', sans-serif; letter-spacing: -.04em; }
.bottom-intro p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.action-tile { border: 1px solid var(--line); border-radius: 11px; background: #191d1f; padding: 13px; display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer; min-width: 0; }
.action-tile:hover { border-color: #505958; background: #1d2223; }
.tile-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; font-size: 16px; }
.tile-purple { background: rgba(208,188,255,.12); color: var(--lilac); }
.tile-green { background: rgba(108,216,187,.12); color: var(--teal); }
.action-tile strong, .action-tile small { display: block; }
.action-tile strong { font-size: 10px; }
.action-tile small { margin-top: 4px; color: #84908c; font-size: 9px; line-height: 1.35; }
.tile-arrow { margin-left: auto; color: #8e9993; font-size: 15px; }

.work-table-wrap { overflow-x: auto; }
.work-table { border-collapse: collapse; width: 100%; min-width: 740px; text-align: left; }
.work-table thead { background: #1c2122; }
.work-table th { height: 34px; padding: 0 16px; color: #76817e; font: 500 9px 'DM Mono', monospace; letter-spacing: .10em; white-space: nowrap; }
.work-table td { border-top: 1px solid #262c2d; height: 56px; padding: 7px 16px; color: #c8cfca; font-size: 10px; white-space: nowrap; }
.work-table tbody tr:hover { background: #1e2324; }
.work-table tbody tr.clickable-row, .ack-row { cursor: pointer; }
.work-title-cell { display: flex; align-items: center; gap: 9px; min-width: 175px; }
.work-title-cell strong { display: block; max-width: 250px; overflow: hidden; text-overflow: ellipsis; font-size: 10px; font-weight: 600; color: #e1e7e0; }
.work-title-cell small { display: block; margin-top: 4px; color: #84918c; font-size: 9px; }
.work-cover { width: 29px; height: 29px; border: 1px solid #45434d; border-radius: 7px; background: linear-gradient(145deg,#29252f,#222b2b); display: grid; place-items: center; color: var(--lilac); font-size: 13px; flex: none; }
.mono-id { color: #a8b5b0; font: 10px 'DM Mono', monospace; }
.writer-cell { display: block; max-width: 190px; overflow: hidden; text-overflow: ellipsis; color: #aab4ae; }
.date-cell { color: #84908b; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid #414345; border-radius: 20px; background: rgba(255,255,255,.025); color: #bbc4bf; font-size: 9px; text-transform: capitalize; }
.status-pill > span { width: 5px; height: 5px; border-radius: 50%; background: #a2aba6; }
.status-draft > span { background: var(--amber); }
.status-ready { color: #a9e5cf; border-color: #375749; background: rgba(108,216,187,.06); }
.status-ready > span { background: var(--teal); }
.status-approved { color: var(--success); border-color: #526137; background: rgba(var(--success-rgb),.06); }
.status-approved > span { background: var(--success); }
.status-archived { color: #929a97; }
.table-toolbar { display: flex; align-items: center; gap: 10px; padding: 14px 17px; border-bottom: 1px solid #252b2d; }
.search-field { flex: 1; max-width: 465px; height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid #343b3d; border-radius: 8px; color: #899590; background: #171b1c; }
.search-field > span { font-size: 18px; line-height: 1; }
.search-field input { width: 100%; min-width: 50px; background: transparent; border: 0; outline: 0; color: #e3e8e3; font-size: 10px; }
.search-field input::placeholder { color: #71807b; }
.select-compact { height: 36px; border: 1px solid #343b3d; border-radius: 8px; padding: 0 10px; background: #1b2021; color: #b3bdb7; font-size: 10px; }
.table-count { color: #84908b; font: 10px 'DM Mono', monospace; margin-left: auto; }
.table-footer { display: flex; justify-content: space-between; gap: 20px; padding: 12px 17px; color: #75807c; font-size: 9px; border-top: 1px solid #252b2d; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 10px 16px 14px; color: #8a9591; font: 10px 'DM Mono', monospace; }
.pager .button { min-height: 31px; font-size: 10px; }
.empty-state { min-height: 235px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 28px; }
.empty-art { width: 45px; height: 45px; display: grid; place-items: center; border: 1px solid rgba(var(--brand-rgb), .24); border-radius: 13px; background: rgba(var(--brand-rgb), .07); color: var(--brand); font-size: 20px; }
.empty-state h3 { margin: 13px 0 5px; font: 700 14px 'Manrope', sans-serif; }
.empty-state p { max-width: 300px; margin: 0 0 15px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.table-panel { overflow: hidden; }

.notice { display: flex; align-items: flex-start; gap: 12px; border: 1px solid rgba(var(--brand-rgb), .22); border-radius: 11px; padding: 14px 16px; margin-bottom: 15px; background: rgba(var(--brand-rgb),.045); }
.notice-icon { width: 19px; height: 19px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid currentColor; font: 700 11px 'DM Mono', monospace; color: var(--brand); }
.notice strong { display: block; color: #e0e7d5; font-size: 11px; }
.notice p { margin: 4px 0 0; color: #9ca99a; font-size: 10px; line-height: 1.5; }
.notice-warn { border-color: #514532; background: rgba(234,194,111,.05); }
.notice-warn .notice-icon { color: var(--amber); }
.notice-warn strong { color: #f0dfbb; }
.notice-warn p { color: #a9a08c; }
.notice-info { border-color: #33444a; background: rgba(130,184,244,.05); }
.notice-info .notice-icon { color: var(--blue); }
.notice-info strong { color: #d4e5f9; }
.notice-info p { color: #92a6b5; }
.delivery-note .text-button { margin-left: auto; align-self: center; }
.ack-note { margin-bottom: 15px; }
.ack-code { padding: 5px 8px; border: 1px solid #40494a; border-radius: 12px; color: #c9d3cd; background: #242a2b; font: 9px 'DM Mono', monospace; }
.ack-np { color: #d4c18e; border-color: #564d38; background: rgba(234,194,111,.06); }
.ack-co { color: #eaa19a; border-color: #5c3e3c; background: rgba(240,137,128,.06); }
.ack-rj, .ack-rc { color: #f29c91; border-color: #60413e; background: rgba(240,137,128,.07); }
.ack-as, .ack-ac { color: #ade4c9; border-color: #375849; background: rgba(108,216,187,.06); }
.ack-result { padding: 16px; border-top: 1px solid #2d3435; }
.ack-result-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.ack-result-top > strong { color: #e2e8e0; font-size: 12px; }
.ack-identifiers { display: flex; gap: 18px; flex-wrap: wrap; margin: 12px 0 0; color: #84908b; font-size: 9px; }
.ack-identifiers b { color: #bdc9c0; font: 10px 'DM Mono', monospace; margin-left: 4px; }
.ack-messages { display: grid; gap: 8px; margin-top: 13px; }
.ack-messages > div { padding: 10px 12px; border: 1px solid #473d34; border-radius: 8px; background: rgba(234,194,111,.04); }
.ack-messages span { color: #dcb873; font: 9px 'DM Mono', monospace; }
.ack-messages p { margin: 5px 0 0; color: #c6c1b4; font-size: 10px; line-height: 1.5; }
.ack-no-message { font-size: 10px; }
.ack-detail { margin-top: 18px; border: 1px solid #35403f; border-radius: 12px; overflow: hidden; }
.ack-detail-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 17px; background: #1d2324; }
.ack-detail-head h3 { margin: 5px 0 4px; font: 700 14px 'Manrope', sans-serif; }
.ack-detail-head p { margin: 0; color: var(--muted); font-size: 10px; }
.ack-row:hover { background: #212728; }

.partner-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.partner-card { padding: 16px; }
.partner-top { display: flex; align-items: center; justify-content: space-between; }
.society-symbol { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--lilac); border: 1px solid #4a4057; background: rgba(208,188,255,.09); font: 700 10px 'Manrope', sans-serif; }
.partner-state, .user-active { display: flex; align-items: center; gap: 6px; color: #aa9c7b; font-size: 9px; }
.partner-state > span, .user-active > span { width: 5px; height: 5px; background: var(--amber); border-radius: 50%; }
.partner-enabled { color: #90d7b5; }
.partner-enabled > span, .user-active > span { background: var(--teal); }
.partner-card h2 { margin: 12px 0 14px; font: 700 14px 'Manrope', sans-serif; letter-spacing: -.03em; }
.partner-fields { border-top: 1px solid #2b3233; border-bottom: 1px solid #2b3233; display: grid; grid-template-columns: 1fr 1fr; gap: 11px 8px; padding: 12px 0; }
.partner-fields small, .partner-fields strong { display: block; }
.partner-fields small { color: #798581; font-size: 9px; }
.partner-fields strong { margin-top: 4px; color: #c8d0cb; font: 10px 'DM Mono', monospace; }
.partner-fields i { color: #c9aa6d; font: italic 8px 'DM Sans', sans-serif; }
.partner-note { color: #8b9792; font-size: 9px; line-height: 1.5; min-height: 27px; margin: 11px 0 13px; }
.partner-edit { width: 100%; min-height: 33px; font-size: 10px; }
.role-explainer { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 14px; }
.role-explainer > div { padding: 13px; border: 1px solid #2c3334; border-radius: 10px; background: #181c1e; }
.role-explainer strong { display: block; color: #d7ded7; font-size: 10px; text-transform: capitalize; }
.role-explainer span { display: block; margin-top: 5px; color: #85908b; font-size: 9px; line-height: 1.4; }
.role-tag { padding: 4px 8px; border-radius: 15px; background: #2a3031; color: #bdc6c0; font-size: 9px; text-transform: capitalize; }
.user-active { color: #89d0ae; }
.user-active.is-off { color: #e2a69d; }
.user-active.is-off > span { background: var(--red); }

.dialog { width: min(860px, calc(100vw - 26px)); max-width: none; max-height: min(92vh, 940px); padding: 0; color: var(--text); border: 1px solid #414849; border-radius: 15px; background: #171b1d; box-shadow: var(--shadow); overflow: hidden; }
.dialog::backdrop { background: rgba(4, 6, 7, .72); backdrop-filter: blur(5px); }
.dialog-head { min-height: 69px; display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid #2c3334; background: #1b2021; }
.dialog-head h2 { margin: 5px 0 0; font: 700 18px 'Manrope', sans-serif; letter-spacing: -.04em; }
.dialog-scroll { max-height: calc(92vh - 137px); overflow: auto; padding: 0 20px 22px; }
.work-form { display: grid; }
.form-section { padding: 20px 0 17px; border-bottom: 1px solid #2b3233; }
.section-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; }
.section-index { width: 28px; height: 28px; border: 1px solid rgba(var(--brand-rgb), .26); border-radius: 8px; color: var(--brand); display: grid; place-items: center; background: rgba(var(--brand-rgb),.07); font: 10px 'DM Mono', monospace; }
.section-heading h3 { margin: 0; font: 700 13px 'Manrope', sans-serif; }
.section-heading p { margin: 4px 0 0; color: #84908a; font-size: 9px; }
.section-heading .text-button { margin-left: auto; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px 12px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.work-form label { gap: 6px; color: #b8c1ba; font-size: 10px; }
.work-form input, .work-form select, .work-form textarea { min-height: 37px; padding: 8px 10px; font-size: 10px; font-weight: 400; }
.work-form select { color: #dbe1dc; }
.work-form textarea { resize: vertical; }
.default-row { margin-top: 14px; display: flex; align-items: center; gap: 8px; color: #97a28f; font-size: 9px; }
.default-check { width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; background: rgba(var(--brand-rgb),.1); color: var(--brand); font-size: 9px; }
.default-row small { margin-left: auto; color: #737f79; font: 9px 'DM Mono', monospace; }
.writer-card { padding: 13px; border: 1px solid #333b3c; border-radius: 10px; background: #1b2021; margin-bottom: 9px; }
.source-composer-note { margin: -3px 0 12px; padding: 9px 11px; border: 1px solid #343d3e; border-radius: 8px; background: #1b2021; }
.source-composer-note small { color: #8c9892; font: 8px 'DM Mono', monospace; letter-spacing: .09em; }
.source-composer-note p { margin: 5px 0 0; color: #b1bcb4; font-size: 10px; line-height: 1.45; }
.writer-card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.writer-number { color: #8e9a93; font: 9px 'DM Mono', monospace; letter-spacing: .09em; }
.checkbox-label { display: flex !important; align-items: center; gap: 7px !important; margin-left: auto; color: #9fb18b !important; font-size: 9px !important; }
.checkbox-label input { width: 13px; height: 13px; min-height: auto; accent-color: var(--brand-deep); }
.writer-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.writer-grid .writer-name-field { grid-column: span 2; }
.writer-verification { display: grid; grid-template-columns: minmax(170px,.65fr) minmax(220px,1fr); gap: 10px; align-items: end; margin-top: 11px; }
.writer-verification .verification-checkbox { display: flex !important; align-items: center; gap: 8px !important; min-height: 36px; color: #b8c1ba !important; }
.verification-checkbox input { width: 14px; height: 14px; min-height: auto; accent-color: var(--brand-deep); }
.rights-details { margin-top: 12px; border-top: 1px solid #2a3132; padding-top: 10px; }
.rights-details summary { color: #9da9a2; cursor: pointer; font-size: 9px; }
.rights-details summary span { color: #737e79; margin-left: 8px; }
.rights-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-top: 10px; }
.rights-grid label { font-size: 8px; }
.rights-grid input { min-height: 32px; }
.assumed-tag { margin-top: 10px; color: #dec083; font-size: 9px; }
.share-callout { margin: 12px 0 0; }
.review-strip { display: flex; gap: 11px; align-items: center; padding: 12px; border: 1px solid #333a38; background: #1b201f; border-radius: 9px; }
.review-icon { width: 26px; height: 26px; display: grid; place-items: center; color: var(--amber); border-radius: 8px; background: rgba(234,194,111,.08); }
.review-strip strong, .review-strip small { display: block; }
.review-strip strong { font-size: 10px; }
.review-strip small { color: #7f8b84; font-size: 9px; margin-top: 4px; }
.review-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.review-actions .button { min-height: 34px; font-size: 10px; }
.validation-box { margin-top: 17px; }
.validation-summary { display: flex; justify-content: space-between; align-items: center; padding: 11px 12px; border: 1px solid #5a403d; border-radius: 8px; background: rgba(240,137,128,.05); color: #e8aaa2; font-size: 10px; }
.validation-summary.validation-ok { border-color: #345b4b; color: #9fdec2; background: rgba(108,216,187,.05); }
.validation-summary span { color: #9a9289; font-size: 9px; }
.validation-box ul { padding: 5px 0 0; margin: 0; list-style: none; }
.validation-box li { display: flex; gap: 8px; padding: 7px 4px; color: #b2aaa0; font-size: 9px; line-height: 1.45; }
.validation-box li > span { color: var(--amber); font: 700 10px 'DM Mono', monospace; }
.validation-box .validation-error > span { color: var(--red); }
.history-box { padding-top: 14px; }
.history-box h3 { margin: 0 0 10px; font: 700 10px 'Manrope', sans-serif; }
.history-item { display: flex; gap: 9px; align-items: flex-start; padding: 7px 0; }
.history-dot { width: 6px; height: 6px; margin-top: 3px; border-radius: 50%; background: #88a44a; }
.history-item strong, .history-item small { display: block; }
.history-item strong { color: #b8c3ba; font-size: 9px; }
.history-item small { margin-top: 4px; color: #76817b; font-size: 8px; }
.dialog-actions { min-height: 68px; display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 12px 20px; border-top: 1px solid #2c3334; background: #1b2021; }
.dialog-actions [data-close] { margin-right: auto; }
.confirm-dialog { width: min(420px,calc(100vw - 26px)); }
.import-scroll { padding-top: 18px; }
.upload-drop { min-height: 160px; border: 1px dashed #4d5956; border-radius: 12px; background: rgba(var(--brand-rgb),.025); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; transition: border .15s ease, background .15s ease; }
.upload-drop.is-dragging { border-color: var(--brand); background: rgba(var(--brand-rgb),.09); }
.upload-symbol { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--brand); background: rgba(var(--brand-rgb),.1); font-size: 18px; }
.upload-drop strong { font-size: 11px; }
.upload-drop small { color: var(--muted); font-size: 9px; }
.upload-drop .button { min-height: 31px; margin-top: 3px; font-size: 9px; }
.migration-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 13px; padding: 11px; border: 1px solid #34444a; border-radius: 9px; background: rgba(130,184,244,.04); }
.migration-note .notice-icon { color: var(--blue); }
.migration-note p { margin: 0; color: #9aabb3; font-size: 9px; line-height: 1.5; }
.import-progress { display: flex; align-items: center; gap: 9px; padding: 14px 0; color: #abb5ae; font-size: 10px; }
.spinner { width: 16px; height: 16px; border: 2px solid #39403f; border-top-color: var(--brand); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.import-preview { margin-top: 15px; padding: 14px; border: 1px solid #33433c; border-radius: 10px; background: #1a211e; }
.import-preview-head { display: flex; align-items: center; gap: 10px; }
.preview-check { width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center; color: var(--success); background: rgba(var(--success-rgb),.1); }
.import-preview-head strong, .import-preview-head small { display: block; }
.import-preview-head strong { color: #d8e2d7; font-size: 10px; }
.import-preview-head small { color: #89958e; margin-top: 4px; font-size: 9px; }
.import-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; margin: 13px 0; }
.import-stats span { padding: 9px; border: 1px solid #303a36; border-radius: 7px; background: #1e2622; }
.import-stats strong, .import-stats small { display: block; }
.import-stats strong { color: #d6e29e; font: 700 15px 'Manrope', sans-serif; }
.import-stats small { color: #8a968d; font-size: 8px; margin-top: 3px; }
.import-duplicate-note { margin: 10px 0; padding: 10px; border: 1px solid #34444a; border-radius: 8px; background: rgba(130,184,244,.035); color: #a4b3b6; font-size: 9px; line-height: 1.5; }
.import-duplicate-note.is-warning { border-color: rgba(234,194,111,.36); background: rgba(234,194,111,.045); }
.import-duplicate-note > strong { display: block; color: #d6e2df; font-size: 10px; }
.import-duplicate-note p { margin: 5px 0; }
.import-duplicate-note details { margin-top: 5px; }
.import-duplicate-note summary { color: var(--amber); cursor: pointer; }
.import-duplicate-note ul { display: grid; gap: 4px; margin: 7px 0; padding-left: 18px; }
.duplicate-confirm { display: flex; align-items: flex-start; gap: 7px; margin-top: 9px; color: #e9d5a7; cursor: pointer; }
.duplicate-confirm input { margin: 2px 0 0; accent-color: var(--brand-deep); }
.import-preview > p { color: #8e9a92; font-size: 9px; }
.import-sample { display: grid; gap: 5px; margin-bottom: 12px; }
.import-sample > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 7px 8px; background: #202725; border-radius: 6px; }
.import-sample strong { overflow: hidden; text-overflow: ellipsis; color: #cbd4ca; font-size: 9px; }
.import-sample small { color: #819088; font: 8px 'DM Mono', monospace; text-align: right; }
.field-note { color: #87928d; font-size: 9px; font-weight: 400; line-height: 1.4; }

.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 30; display: grid; gap: 8px; }
.toast { max-width: min(430px, calc(100vw - 40px)); padding: 11px 14px; border: 1px solid #3c5145; border-radius: 9px; background: #202b25; color: #cce5d5; box-shadow: var(--shadow); font-size: 10px; animation: toast-in .18s ease; }
.toast-warn { background: #30291d; border-color: #5b4d34; color: #e9d8b1; }
.toast-error { background: #302120; border-color: #62413d; color: #f0c2bb; }
@keyframes toast-in { from { transform: translateY(6px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

code { color: #d6dcac; font: 10px 'DM Mono', monospace; }

@media (max-width: 1200px) {
  .page-content { padding-left: 24px; padding-right: 24px; }
  .topbar { padding: 0 24px; }
  .overview-bottom { grid-template-columns: 1fr 1fr; }
  .bottom-intro { grid-column: 1/-1; }
  .partner-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 65px minmax(0,1fr); }
  .sidebar { padding-left: 8px; padding-right: 8px; }
  .sidebar-brand { padding: 0 5px 25px; }
  .sidebar-brand > .brand-logo, .sidebar-brand > .brand-caption, .workspace-label, .nav-item > span:not(.nav-icon), .nav-section-label, .nav-divider, .boundary-note, .user-copy, .user-menu-dots { display: none; }
  .sidebar-brand { min-height: 38px; justify-content: center; align-items: flex-start; }
  .sidebar-icon { display: block; width: 32px; height: 32px; margin: 0 auto; border-radius: 7px; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-icon { font-size: 18px; }
  .user-menu { justify-content: center; }
  .user-popover { left: 5px; right: 5px; bottom: 50px; }
  .overview-grid { grid-template-columns: minmax(0,1fr); }
  .next-panel { display: none; }
  .summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .breadcrumb { display: none; }
  .mobile-brand { display: flex; }
  .partner-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 620px) {
  .sales-journey { padding: 17px; gap: 12px; align-items: flex-start; }
  .sales-journey > div { display: flex; flex-direction: column; gap: 5px; }
  .sales-journey > div > span { margin-bottom: 4px; }
  .sales-journey > i { display: none; }
  .sales-journey small { font-size: 9px; line-height: 1.5; }
  .sales-steps { gap: 13px; justify-content: space-between; }
  .sales-steps li { font-size: 9px; gap: 6px; flex-direction: column; align-items: flex-start; }
  .sales-options-fields, .sales-options-fields:not(:has([name="worksheet"])) { grid-template-columns: 1fr 92px; }
  .sales-options-fields .button, .sales-options-fields label:has([name="worksheet"]) { grid-column: 1/-1; }
  .sales-options-fields .button { justify-self: start; }
  .sales-review-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sales-review-stats > div { padding: 13px; }
  .sales-review-stats strong { font-size: 23px; }
  .sales-total-card { flex-direction: column; align-items: stretch; gap: 18px; }
  .sales-totals { justify-content: flex-start; gap: 20px; }
  .sales-totals > span { justify-items: start; }
  .sales-review-title { align-items: flex-start; flex-direction: column; }
  .sales-rows-heading { align-items: flex-start; flex-direction: column; gap: 1px; }
  .sales-reconcile { padding: 16px; }
  .sales-dialog .dialog-actions { flex-wrap: wrap; }
  .sales-dialog .dialog-actions .button { flex: 1; }
  .sales-dialog .dialog-actions .button-primary { flex-basis: 100%; min-height: 40px; }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-story { min-height: 255px; padding: 22px 23px 18px; }
  .auth-story-copy { margin: auto 0 0; padding: 24px 0 12px; }
  .auth-story h1 { font-size: 38px; margin: 11px 0 9px; }
  .auth-story-copy p { font-size: 12px; margin-bottom: 0; }
  .story-foot { display: none; }
  .auth-panel { min-height: calc(100vh - 255px); padding: 25px 23px; align-items: stretch; }
  .auth-card { margin: auto; padding: 15px 0; }
  .auth-card h2 { font-size: 24px; }
  .auth-privacy { margin-top: 18px; }
  .app-shell { grid-template-columns: 1fr; grid-template-rows: minmax(0,1fr) 58px; }
  .sidebar { position: fixed; z-index: 10; bottom: 0; top: auto; height: 58px; min-height: 0; width: 100%; padding: 5px 8px; border-right: 0; border-top: 1px solid #2b3132; background: rgba(20,24,25,.97); }
  .sidebar-brand, .workspace-label, .sidebar-bottom { display: none; }
  .primary-nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
  .nav-item { min-height: 47px; flex: 0 0 76px; flex-direction: column; justify-content: center; gap: 2px; border-radius: 7px; font-size: 8px; }
  .nav-item[data-page="acknowledgements"] { flex-basis: 100px; }
  .nav-item > span:not(.nav-icon) { display: block; }
  .nav-item .nav-count { display: none; }
  .nav-icon { font-size: 16px; }
  .main-area { min-height: 100vh; }
  .topbar { height: 52px; padding: 0 16px; }
  .topbar-right { gap: 10px; }
  .secure-label { font-size: 0; gap: 0; }
  .secure-dot { width: 7px; height: 7px; }
  .top-avatar { width: 26px; height: 26px; }
  .page-content { padding: 22px 14px 86px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 13px; margin-bottom: 17px; }
  .page-heading h1 { font-size: 25px; }
  .page-heading p { max-width: 430px; line-height: 1.5; }
  .heading-actions { width: 100%; }
  .heading-actions .button { flex: 1; }
  .summary-grid { gap: 8px; }
  .summary-card { min-height: 117px; padding: 12px; }
  .summary-number { font-size: 24px; }
  .summary-label { font-size: 8px; letter-spacing: .08em; }
  .summary-icon { width: 23px; height: 23px; }
  .summary-foot { font-size: 9px; }
  .overview-bottom { grid-template-columns: 1fr; gap: 8px; }
  .bottom-intro { grid-column: auto; }
  .table-toolbar { flex-wrap: wrap; padding: 11px; }
  .search-field { flex-basis: 100%; max-width: none; }
  .table-count { margin-left: auto; }
  .table-footer { flex-direction: column; gap: 5px; }
  .partner-grid { grid-template-columns: 1fr; }
  .role-explainer { grid-template-columns: 1fr; }
  .delivery-note { flex-wrap: wrap; }
  .delivery-note .text-button { margin: 4px 0 0 30px; }
  .dialog { width: calc(100vw - 14px); max-height: 95vh; }
  .dialog-head { padding: 12px 14px; }
  .dialog-scroll { max-height: calc(95vh - 124px); padding: 0 13px 16px; }
  .dialog-actions { padding: 10px 13px; min-height: 61px; gap: 6px; }
  .dialog-actions .button { padding: 0 10px; font-size: 10px; }
  .section-heading { gap: 8px; }
  .section-heading p { max-width: 220px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .writer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .writer-grid .writer-name-field { grid-column: 1/-1; }
  .writer-verification { grid-template-columns: 1fr; gap: 8px; }
  .rights-grid { grid-template-columns: repeat(2,1fr); }
  .default-row small { display: none; }
  .ack-result-top { flex-direction: column; }
  .ack-identifiers { display: grid; gap: 6px; }
  .import-sample > div { align-items: flex-start; flex-direction: column; gap: 3px; }
  .import-sample small { text-align: left; }
  .import-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .migration-progress { align-items: flex-start; flex-wrap: wrap; gap: 11px; }
  .migration-progress > div:first-child { flex-basis: 100%; }
  .migration-progress-count { text-align: left; }
}

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