:root {
  color-scheme: light;
  --navy: #12304a;
  --ink: #13283a;
  --muted: #607582;
  --canvas: #f3f6f7;
  --surface: #fff;
  --line: #dbe4e9;
  --teal: #167c70;
  font-family: Inter, Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at 95% 0%, rgba(63, 149, 143, .09), transparent 30rem), var(--canvas);
  line-height: 1.5;
}

button, input, select { font: inherit; }
button { cursor: pointer; }
.portal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 0 38px;
  border-bottom: 1px solid #d9e2e7;
  color: #6b7e89;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(14px);
}
.portal-topbar p { margin: 0; font-size: 13px; font-weight: 500; }
.portal-topbar p span { margin: 0 8px; color: #a2b0b8; }
.portal-topbar > span { color: #687c89; font-size: 11px; font-weight: 650; }

.form-container { width: min(1120px, calc(100% - 56px)); margin: 0 auto; padding: 20px 0 42px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.page-header h1 { margin: 0 0 5px; font-size: clamp(32px, 4vw, 42px); letter-spacing: -.04em; line-height: 1.15; }
.page-header p { margin: 0; color: var(--muted); font-size: 14px; font-weight: 500; }
.excel-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid #bde0d8; border-radius: 999px; color: #196f62; background: #eaf7f4; font-size: 11px; font-weight: 800; }
.excel-badge i { width: 8px; height: 8px; border-radius: 50%; background: #28a88f; box-shadow: 0 0 0 4px rgba(39, 168, 145, .12); }
.error-banner { margin-bottom: 16px; padding: 13px 15px; border: 1px solid #e8c2bd; border-radius: 10px; color: #87433c; background: #fff4f3; font-size: 13px; font-weight: 650; }

.generator { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(310px, .85fr); align-items: start; overflow: visible; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 10px 32px rgba(18, 48, 74, .06); }
.input-panel { padding: 28px 30px 30px; }
.preview-panel { display: flex; align-self: stretch; flex-direction: column; min-height: 590px; overflow: visible; padding: 28px; border-left: 1px solid var(--line); border-radius: 0 18px 18px 0; background: #f8fafb; }
.section-heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 24px; }
.section-heading > span { display: grid; flex: 0 0 auto; place-items: center; width: 29px; height: 29px; border-radius: 9px; color: #fff; background: var(--navy); font-size: 12px; font-weight: 800; }
.section-heading h2 { margin: 0 0 2px; font-size: 17px; letter-spacing: -.02em; }
.section-heading p { margin: 0; color: #738691; font-size: 11px; }
.section-heading.compact { margin-bottom: 20px; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.field { display: flex; min-width: 0; flex-direction: column; gap: 7px; }
.field-wide { grid-column: 1 / -1; }
.field > span { color: #304c5d; font-size: 12px; font-weight: 760; }
.field .field-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.field-title a { color: var(--teal); font-size: 10px; font-weight: 800; text-decoration: none; }
.field-title a:hover { text-decoration: underline; }
.field input, .field select { width: 100%; height: 44px; padding: 0 12px; border: 1px solid #cbd8df; border-radius: 10px; outline: 0; color: var(--ink); background: #fff; font-size: 13px; transition: border-color 150ms ease, box-shadow 150ms ease; }
.field input[readonly] { color: #425f70; background: #f1f5f6; cursor: default; }
.field select.is-managed { color: #425f70; background-color: #f1f5f6; cursor: default; pointer-events: none; }
.field select { appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, #6a7f8b 50%), linear-gradient(135deg, #6a7f8b 50%, transparent 50%); background-position: calc(100% - 17px) 19px, calc(100% - 12px) 19px; background-size: 5px 5px; background-repeat: no-repeat; }
.field input:focus, .field select:focus { border-color: #62aa9f; box-shadow: 0 0 0 3px rgba(47, 153, 137, .12); }
.field small { margin-top: -3px; color: #84949d; font-size: 10px; }
.document-body-section { margin-top: 30px; padding-top: 26px; border-top: 1px solid #e0e7ea; }
.section-heading.body-heading { margin-bottom: 20px; }
.purchase-request-import { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 14px; margin-bottom: 18px; padding: 12px 14px; border: 1px solid #bddbd4; border-radius: 11px; background: #f2faf8; }
.purchase-request-import > div:first-child { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.purchase-request-import strong { color: #28594f; font-size: 12px; }
.purchase-request-import span { color: #6d847f; font-size: 9px; }
.purchase-request-import .purchase-request-import-actions { display: flex; min-width: 0; align-items: center; gap: 7px; }
.purchase-request-import-button { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 7px 10px; border: 1px solid #78b7aa; border-radius: 8px; color: #176e63; background: #fff; font-size: 9px; font-weight: 800; cursor: pointer; }
.purchase-request-import-button:hover { background: #e7f6f2; }
.purchase-request-import-button input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.purchase-request-import-or { flex: 0 0 auto; }
.purchase-request-import-actions select { min-width: 180px; height: 34px; padding: 0 28px 0 9px; border: 1px solid #a9cfc7; border-radius: 8px; outline: 0; color: #28594f; background: #fff; font-size: 9px; }
.purchase-request-import-actions select:focus { border-color: #62aa9f; box-shadow: 0 0 0 3px rgba(47, 153, 137, .12); }
.purchase-request-import-actions button { min-height: 34px; padding: 7px 10px; border: 1px solid #2f9989; border-radius: 8px; color: #fff; background: #2f9989; font-size: 9px; font-weight: 800; cursor: pointer; }
.purchase-request-import-actions button:hover:not(:disabled) { background: #237d70; }
.purchase-request-import-actions button:disabled, .purchase-request-import-actions select:disabled { opacity: .5; cursor: not-allowed; }
.purchase-request-import > p { grid-column: 1 / -1; min-height: 14px; margin: 0; color: #4f766d; font-size: 9px; }
.purchase-request-import > p:empty { display: none; }
.purchase-request-import > p.is-warning { color: #8a651f; }
.purchase-request-import > p.is-error { color: #a0443d; }
.body-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px 16px; }
.body-field { display: flex; min-width: 0; flex-direction: column; gap: 7px; }
.body-field.is-wide { grid-column: 1 / -1; }
.body-field-title { display: flex; align-items: center; gap: 7px; color: #304c5d; font-size: 12px; font-weight: 760; }
.required-mark { padding: 2px 5px; border-radius: 5px; color: #a04e45; background: #fff0ee; font-size: 8px; font-style: normal; font-weight: 850; }
.body-field input, .body-field select, .body-field textarea, .body-input-table input, .body-input-table select { width: 100%; border: 1px solid #cbd8df; border-radius: 9px; outline: 0; color: var(--ink); background: #fff; font-size: 12px; transition: border-color 150ms ease, box-shadow 150ms ease; }
.body-field input, .body-field select { height: 42px; padding: 0 11px; }
.body-field textarea { min-height: 86px; padding: 10px 11px; resize: vertical; line-height: 1.55; }
.body-field select, .body-input-table select { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, #6a7f8b 50%), linear-gradient(135deg, #6a7f8b 50%, transparent 50%); background-position: calc(100% - 15px) 17px, calc(100% - 10px) 17px; background-size: 5px 5px; background-repeat: no-repeat; }
.body-field input:focus, .body-field select:focus, .body-field textarea:focus, .body-input-table input:focus, .body-input-table select:focus { border-color: #62aa9f; box-shadow: 0 0 0 3px rgba(47, 153, 137, .12); }
.body-field.is-disabled { opacity: .52; }
.body-field.is-disabled input, .body-field.is-disabled select { color: #71838c; background: #eef2f3; cursor: not-allowed; }
.body-field-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #84949d; font-size: 9px; }
.character-counter { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.body-field-help { color: #84949d; font-size: 9px; }
.meeting-outline-tools { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border: 1px solid #d8e2e6; border-bottom: 0; border-radius: 9px 9px 0 0; background: #f7faf9; }
.meeting-outline-target { min-height: 260px !important; border-radius: 0 0 9px 9px !important; }
.meeting-outline-tools button { min-height: 27px; padding: 4px 8px; border: 1px solid #cbd9de; border-radius: 6px; color: #456170; background: #fff; font-size: 9px; font-weight: 750; }
.meeting-outline-tools button:hover { color: #176e63; border-color: #8fc7bd; background: #f2faf8; }
.meeting-outline-tools .outline-template-button { color: #fff; border-color: var(--teal); background: var(--teal); }
.meeting-outline-tools .outline-template-button:hover { color: #fff; background: #247f72; }
.meeting-outline-tools .outline-ai-button { margin-left: auto; color: #fff; border-color: #365d79; background: #365d79; }
.meeting-outline-tools .outline-ai-button:hover { color: #fff; border-color: #294e69; background: #294e69; }
.meeting-outline-auto { display: grid; gap: 8px; padding: 10px; border: 1px solid #d8e2e6; border-bottom: 0; background: #f8fbfc; }
.meeting-outline-auto[hidden] { display: none; }
.meeting-outline-auto-title { color: #304c5d; font-size: 10px; font-weight: 800; }
.body-field .meeting-outline-raw { min-height: 125px; border-radius: 7px; background: #fff; }
.meeting-outline-auto-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.meeting-outline-auto-status { color: #718691; font-size: 9px; line-height: 1.45; }
.meeting-outline-auto-status.is-error { color: #a0443d; }
.meeting-outline-organize-button { flex: 0 0 auto; min-height: 31px; padding: 5px 11px; border: 0; border-radius: 7px; color: #fff; background: var(--teal); font-size: 10px; font-weight: 800; cursor: pointer; }
.meeting-outline-organize-button:hover { background: #247f72; }
.meeting-outline-organize-button:disabled { opacity: .6; cursor: wait; }
.date-range-control { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: 10px; }
.date-range-part { display: flex; min-width: 0; flex-direction: column; gap: 5px; }
.date-range-label { color: #718691; font-size: 9px; font-weight: 750; }
.date-range-separator { padding-bottom: 13px; color: #718691; font-size: 12px; font-weight: 800; }
.body-table-section { margin-top: 24px; overflow: hidden; border: 1px solid #d6e1e5; border-radius: 12px; background: #fff; }
.body-table-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 57px; padding: 11px 14px; border-bottom: 1px solid #dfe7ea; background: #f8fafb; }
.body-table-heading h3 { margin: 0 0 2px; color: #294657; font-size: 13px; }
.body-table-heading p { margin: 0; color: #7a8d97; font-size: 9px; }
.table-row-status { flex: 0 0 auto; color: #5e7582; font-size: 9px; font-weight: 750; font-variant-numeric: tabular-nums; }
.body-table-scroll { overflow-x: auto; }
.body-input-table { width: 100%; min-width: 560px; border-collapse: collapse; table-layout: fixed; }
.body-input-table th, .body-input-table td { padding: 7px 6px; border-right: 1px solid #e3e9ec; border-bottom: 1px solid #e3e9ec; }
.body-input-table th:last-child, .body-input-table td:last-child { border-right: 0; }
.body-input-table tbody tr:last-child td, .body-input-table tbody tr:last-child th { border-bottom: 0; }
.body-input-table thead th { height: 34px; color: #607581; background: #fbfcfc; font-size: 9px; font-weight: 800; text-align: left; }
.body-input-table input, .body-input-table select { height: 34px; padding: 0 8px; font-size: 10px; }
.excel-line-indicator { display: block; min-height: 12px; margin-top: 3px; color: #81919a; font-size: 7px; font-weight: 700; text-align: right; white-space: nowrap; }
.excel-line-indicator[data-excel-auto-fit="true"] { color: #47786e; }
.excel-line-indicator.is-over-limit { color: #a3483f; font-weight: 850; }
.body-input-table td.is-line-overflow { background: #fff8f5; }
.body-input-table tr.is-page-fit-target td, .body-field.is-page-fit-target { background: #fff0ed; box-shadow: inset 0 0 0 2px #dc7569; }
.body-input-table tr.is-page-fit-target input, .body-input-table tr.is-page-fit-target select { border-color: #d66b60; }
.body-table-row-label { width: 90px; color: #3e5969; background: #f8fafb; font-size: 9px; text-align: left; }
.body-table-actions, .action-heading { width: 48px; text-align: center !important; }
.remove-row-button { padding: 5px 6px; border: 1px solid #d8b8b4; border-radius: 6px; color: #995149; background: #fff; font-size: 8px; font-weight: 750; }
.body-table-footer { display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 9px 11px; border-top: 1px solid #e3e9ec; background: #fbfcfc; }
.calculated-amount-heading, .calculated-amount-cell { width: 92px; text-align: right !important; }
.calculated-amount { color: #294657; font-size: 10px; font-weight: 800; font-variant-numeric: tabular-nums; }
.calculated-total { margin-right: auto; color: #536d7b; font-size: 10px; font-weight: 750; }
.calculated-total strong { margin-left: 5px; color: var(--navy); font-size: 12px; font-variant-numeric: tabular-nums; }
.add-row-button { padding: 6px 10px; border: 1px solid #a8d1c9; border-radius: 7px; color: #176e63; background: #eff9f6; font-size: 9px; font-weight: 800; }
.add-row-button:disabled { cursor: default; opacity: .45; }
.business-transport { margin-top: 14px; overflow: hidden; border: 1px solid #c9ddd8; border-radius: 10px; background: #f9fcfb; }
.business-transport-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 11px; border-bottom: 1px solid #dce8e5; background: #f2f8f6; list-style: none; cursor: pointer; }
.business-transport-heading::-webkit-details-marker { display: none; }
.business-transport:not([open]) .business-transport-heading { border-bottom: 0; }
.business-transport-heading h3 { margin: 0 0 1px; color: #355565; font-size: 11px; }
.business-transport-heading p { margin: 0; color: #7b8e96; font-size: 8px; }
.business-transport-open-label { flex: 0 0 auto; padding: 3px 7px; border-radius: 999px; color: #176e63; background: #e2f2ee; font-size: 8px; font-weight: 800; }
.business-transport[open] .business-transport-open-label { font-size: 0; }
.business-transport[open] .business-transport-open-label::after { content: "접기"; font-size: 8px; }
.business-transport-content { background: #f9fcfb; }
.transport-content-toolbar { display: flex; justify-content: flex-end; padding: 9px 14px 0; }
.business-transport button { min-height: 32px; padding: 6px 10px; border: 1px solid #82bdb2; border-radius: 7px; color: #176e63; background: #fff; font-size: 9px; font-weight: 800; }
.business-transport button:hover:not(:disabled) { background: #e8f6f2; }
.business-transport button:disabled { opacity: .45; cursor: default; }
.transport-vehicle-manager { padding: 12px 14px; border-bottom: 1px solid #dce8e5; background: #f5faf8; }
.transport-vehicle-list { display: grid; gap: 7px; margin-bottom: 10px; }
.transport-empty { margin: 0; padding: 9px; color: #7a8d97; font-size: 9px; text-align: center; }
.transport-vehicle-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border: 1px solid #d8e5e1; border-radius: 9px; background: #fff; }
.transport-vehicle-card-info { display: flex; min-width: 0; flex-direction: column; gap: 1px; }
.transport-vehicle-card-info strong { color: #294657; font-size: 10px; }
.transport-vehicle-card-info span { color: #637b86; font-size: 8px; }
.transport-approval { color: #777; font-size: 8px; font-weight: 800; }
.transport-approval.is-approved { color: #167c70; }
.transport-approval.is-pending { color: #9a6c1f; }
.transport-approval.is-rejected { color: #9a4e46; }
.transport-vehicle-card-actions { display: flex; flex: 0 0 auto; gap: 5px; }
.business-transport button.is-danger { color: #9a4e46; border-color: #dfbbb6; }
.transport-vehicle-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding-top: 9px; border-top: 1px solid #e0e9e6; }
.transport-vehicle-form label, .transport-calculator-grid label { display: flex; min-width: 0; flex-direction: column; gap: 4px; color: #466170; font-size: 9px; font-weight: 750; }
.transport-vehicle-form input, .transport-vehicle-form select, .transport-calculator-grid input, .transport-calculator-grid select, .transport-admin-panel input { width: 100%; height: 36px; padding: 0 9px; border: 1px solid #c9d9dd; border-radius: 8px; outline: 0; color: var(--ink); background: #fff; font-size: 10px; }
.transport-vehicle-form input:focus, .transport-vehicle-form select:focus, .transport-calculator-grid input:focus, .transport-calculator-grid select:focus, .transport-admin-panel input:focus { border-color: #62aa9f; box-shadow: 0 0 0 3px rgba(47, 153, 137, .12); }
.transport-vehicle-form-actions { display: flex; grid-column: 1 / -1; justify-content: flex-end; gap: 6px; }
.transport-status { min-height: 13px; margin: 7px 0 0; color: #55786f; font-size: 8px; }
.transport-status.is-error, .transport-api-notice.is-error { color: #a0443d; }
.transport-admin-panel { margin-top: 9px; border-top: 1px dashed #cadbd7; padding-top: 8px; }
.transport-admin-panel summary { color: #748a91; font-size: 8px; font-weight: 800; cursor: pointer; }
.transport-admin-login, .transport-admin-fuel { display: grid; grid-template-columns: minmax(150px, 1fr) auto; gap: 6px; margin-top: 8px; }
.transport-admin-fuel { grid-template-columns: repeat(4, minmax(90px, 1fr)) auto auto; }
.transport-admin-vehicle-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 5px; padding: 6px 0; border-bottom: 1px solid #e4ece9; color: #4f6975; font-size: 8px; }
.transport-calculator-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px 10px; padding: 14px; }
.transport-calculator-grid .transport-wide { grid-column: 1 / -1; }
.transport-calculator-grid small { color: #7d9098; font-size: 8px; font-weight: 500; }
.transport-waypoints { display: grid; gap: 6px; }
.transport-waypoint-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.transport-secondary-button { justify-self: start; margin: -4px 0 0 14px; }
.transport-calculate-actions { display: flex; gap: 7px; padding: 0 14px 10px; }
.transport-calculate-actions #transport-calculate { color: #fff; border-color: var(--teal); background: var(--teal); }
.transport-calculate-actions #transport-calculate:hover:not(:disabled) { background: #247f72; }
.transport-api-notice { min-height: 14px; margin: 0; padding: 0 14px 11px; color: #6f858d; font-size: 9px; }
.transport-result { margin: 0 14px 14px; overflow: hidden; border: 1px solid #9bcbbf; border-radius: 10px; background: #fff; }
.transport-result-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; color: #236e62; background: #eaf7f3; }
.transport-result-heading strong { font-size: 11px; }
.transport-result-heading span { font-size: 8px; }
.transport-result-grid { display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
.transport-result-grid div { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 7px; padding: 7px 10px; border-right: 1px solid #edf2f0; border-bottom: 1px solid #edf2f0; }
.transport-result-grid dt { color: #71868f; font-size: 8px; font-weight: 750; }
.transport-result-grid dd { margin: 0; color: #294657; font-size: 9px; font-weight: 700; overflow-wrap: anywhere; }
.evidence-photo-section { margin-top: 24px; overflow: hidden; border: 1px solid #cfe0dc; border-radius: 12px; background: #fbfdfc; }
.evidence-photo-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 12px 14px; border-bottom: 1px solid #dce8e5; background: #f3f9f7; }
.evidence-photo-heading h3 { margin: 0 0 2px; color: #294657; font-size: 13px; }
.evidence-photo-heading p { margin: 0; color: #71868f; font-size: 9px; }
.evidence-photo-controls { display: flex; flex: 0 0 auto; align-items: center; gap: 9px; }
.evidence-photo-controls label { display: flex; align-items: center; gap: 5px; color: #5e776f; font-size: 9px; font-weight: 750; }
.evidence-photo-controls select { height: 29px; padding: 0 24px 0 8px; border: 1px solid #a9cfc6; border-radius: 7px; color: #28594f; background: #fff; font-size: 9px; }
.evidence-photo-controls > span { color: #477064; font-size: 9px; font-weight: 800; }
.evidence-photo-dropzone { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 5px; min-height: 94px; margin: 12px; padding: 14px; border: 1px dashed #93bdb4; border-radius: 10px; color: #56746d; background: #fff; text-align: center; cursor: pointer; transition: border-color 150ms ease, background 150ms ease; }
.evidence-photo-dropzone:hover, .evidence-photo-dropzone.is-dragging { border-color: #238b7a; background: #eff9f6; }
.evidence-photo-dropzone.has-files { min-height: 72px; }
.evidence-photo-dropzone input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.evidence-photo-dropzone strong { color: #176e63; font-size: 12px; }
.evidence-photo-dropzone span { color: #81928f; font-size: 9px; }
.evidence-photo-message { min-height: 15px; margin: -4px 13px 8px; color: #71868f; font-size: 9px; }
.evidence-photo-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; padding: 0 12px 12px; }
.evidence-photo-card { position: relative; display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-width: 0; padding: 7px; border: 1px solid #dce6e3; border-radius: 9px; background: #fff; }
.evidence-photo-card img { width: 58px; height: 46px; border-radius: 6px; background: #eef3f2; object-fit: cover; }
.evidence-photo-meta { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.evidence-photo-meta strong { overflow: hidden; color: #355565; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.evidence-photo-meta span { color: #84949d; font-size: 8px; }
.evidence-photo-remove { padding: 4px 6px; border: 1px solid #d8b8b4; border-radius: 6px; color: #995149; background: #fff; font-size: 8px; font-weight: 750; }

.document-preview { padding: 20px; border: 1px solid #cfdde3; border-radius: 14px; background: #fff; box-shadow: 0 5px 18px rgba(18, 48, 74, .04); }
.document-preview p { margin: 0 0 8px; color: #718691; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.document-preview output { display: block; overflow-wrap: anywhere; color: var(--navy); font-size: 17px; font-weight: 850; letter-spacing: -.015em; font-variant-numeric: tabular-nums; }
.document-preview > span { display: block; margin-top: 8px; color: #82939c; font-size: 10px; }
.download-history { margin-top: 14px; overflow: hidden; border: 1px solid #d4e0e4; border-radius: 11px; background: #fff; }
.download-history-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border-bottom: 1px solid #e1e8eb; background: #f6f9fa; }
.download-history-heading h3 { margin: 0; color: #355565; font-size: 11px; }
.download-history-heading span { color: #81919a; font-size: 8px; font-weight: 700; }
.download-history-list { display: flex; flex-direction: column; }
.download-history-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid #edf1f3; }
.download-history-item:last-child { border-bottom: 0; }
.download-history-info { display: flex; min-width: 0; flex-direction: column; gap: 1px; }
.download-history-info strong { color: #294657; font-size: 9px; }
.download-history-info span { overflow: hidden; color: #627985; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.download-history-info small { color: #94a1a8; font-size: 7px; }
.download-history-actions { display: flex; align-items: center; gap: 5px; }
.download-history-load { padding: 5px 7px; border: 1px solid #9ebad0; border-radius: 6px; color: #285f86; background: #f2f8fc; font-size: 8px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.download-history-load:hover { border-color: #83a9c5; background: #e8f3fa; }
.download-history-load:disabled { opacity: .6; cursor: wait; }
.download-history-link { padding: 5px 7px; border: 1px solid #9dc9c0; border-radius: 6px; color: #176e63; background: #f1faf7; font-size: 8px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.download-history-link:hover { background: #e5f5f0; }
.download-history-delete { padding: 5px 7px; border: 1px solid #e4c4c0; border-radius: 6px; color: #9a4e46; background: #fff7f6; font-size: 8px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.download-history-delete:hover { border-color: #dba9a2; background: #ffefed; }
.download-history-delete:disabled { opacity: .6; cursor: wait; }
.download-history-empty { margin: 0; padding: 13px 10px; color: #87969e; font-size: 8px; text-align: center; }
.download-history-empty.is-error { color: #a0443d; }
.download-history-status { min-height: 13px; margin: 0; padding: 0 10px 7px; color: #55786f; font-size: 8px; }
.download-history-status:empty { display: none; }
.download-history-status.is-error { color: #a0443d; }
.download-history-status.is-page-fit-error { margin: 8px 10px 10px; padding: 9px 10px; border: 1px solid #e8b9b4; border-radius: 7px; color: #873c35; background: #fff4f2; font-size: 9px; font-weight: 700; line-height: 1.55; white-space: pre-line; }

.ai-draft-notice {
  grid-column: 1 / -1;
  margin-bottom: 14px;
  padding: 11px 13px;
  border: 1px solid #b9ddd4;
  border-radius: 10px;
  color: #285f55;
  background: #f0faf7;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.55;
}
.rule-list { margin: 18px 0 0; }
.rule-list div { display: grid; grid-template-columns: 58px 1fr; gap: 8px; padding: 9px 2px; border-bottom: 1px solid #e0e7ea; }
.rule-list dt { color: #426071; font-size: 10px; font-weight: 800; }
.rule-list dd { margin: 0; color: #6f828d; font-size: 10px; }
.download-note { display: flex; gap: 10px; margin-top: 18px; padding: 12px; border-radius: 10px; color: #536d7b; background: #eef4f5; }
.download-note svg { flex: 0 0 auto; width: 17px; height: 17px; fill: none; stroke: var(--teal); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.download-note p { margin: 0; font-size: 10px; line-height: 1.55; }
.download-button { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 47px; margin-top: auto; padding: 12px 16px; border: 0; border-radius: 11px; color: #fff; background: var(--navy); box-shadow: 0 7px 17px rgba(18, 48, 74, .16); font-size: 13px; font-weight: 800; }
.download-button:hover { background: #1c435f; }
.download-button:disabled { cursor: not-allowed; opacity: .45; }
.download-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #e49b36; outline-offset: 2px; }

@media (max-width: 900px) {
  .generator { grid-template-columns: 1fr; }
  .preview-panel { position: static; max-height: none; min-height: 480px; border-top: 1px solid var(--line); border-left: 0; border-radius: 0 0 18px 18px; }
}

@media (max-width: 680px) {
  .portal-topbar { min-height: 58px; padding: 0 18px; }
  .portal-topbar > span { display: none; }
  .form-container { width: min(100% - 28px, 1120px); padding-top: 18px; }
  .page-header { align-items: flex-start; flex-direction: column; gap: 12px; }
  .page-header h1 { font-size: 30px; }
  .input-panel, .preview-panel { padding: 22px 18px; }
  .field-grid, .body-field-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .body-field.is-wide { grid-column: auto; }
  .purchase-request-import { grid-template-columns: 1fr; }
  .purchase-request-import > p { grid-column: auto; }
  .purchase-request-import .purchase-request-import-actions { flex-wrap: wrap; }
  .transport-vehicle-form, .transport-calculator-grid, .transport-result-grid { grid-template-columns: 1fr; }
  .transport-admin-fuel { grid-template-columns: 1fr 1fr; }
  .transport-result-grid div { border-right: 0; }
  .purchase-request-import-actions select { min-width: min(100%, 220px); flex: 1 1 180px; }
  .evidence-photo-list { grid-template-columns: 1fr; }
  .date-range-control { grid-template-columns: 1fr; gap: 8px; }
  .date-range-separator { display: none; }
}
