.editor-ribbon { flex-wrap: wrap; }
.table-edit-tools { flex-wrap:wrap; gap:6px; padding:8px!important; }
.table-edit-tools button { font-size:13px!important; min-height:34px; border:1px solid #ccd6da!important; padding:6px 10px!important; }
.table-cell-selected { outline:2px solid #0e8b8d!important; background-color:#d4efef!important; }
:root {
  --navy: #113e55;
  --navy-dark: #0c3043;
  --teal: #0e8b8d;
  --teal-dark: #087477;
  --ink: #172a35;
  --muted: #6f7f88;
  --line: #e5ebee;
  --soft: #f4f7f8;
  --white: #fff;
  --green: #25855b;
  --green-bg: #e8f5ee;
  --amber: #b16b13;
  --amber-bg: #fff3df;
  --red: #bd4e42;
  --red-bg: #fcecea;
  --blue: #2c6d99;
  --blue-bg: #e9f2f8;
  --shadow: 0 12px 32px rgba(18, 51, 67, .08);
}

/* Readable application typography; document print typography stays independent. */
body .nav-item span, body .page-heading p, body .detail-list > div, body .check-main > strong, body td, body .primary-button, body .secondary-button { font-size: 14px; }
body .doc-meta, body .returned-file, body .template-source, body .check-actions .status-badge, body .doc-action, body .checklist-note, body .form-grid label, body .form-grid input, body .form-grid textarea, body .form-grid select { font-size: 13px; }
body .doc-title strong, body .money-value, body .status-badge, body .panel-heading h2, body .records-heading h2 { font-size: 14px; }
body .doc-title span, body .table-sub, body th, body .records-heading p, body .panel-heading p { font-size: 12px; }
body .order-drawer { width: min(940px, 96vw); }
body .checklist-item { padding: 17px; gap: 14px; }
body .doc-action { height: auto; min-height: 36px; padding: 8px 12px; }
body .check-actions { min-width: 180px; }
body .form-grid input, body .form-grid select { min-height: 44px; }
body .timeline-title h3, body .company-card > div:nth-child(2) strong { font-size: 16px; }
body .word-page table { min-width: 0; }
@media(max-width:600px) { body .checklist-item { grid-template-columns: 28px 1fr; } body .check-actions { grid-column:2; align-items:flex-start; } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: "Be Vietnam Pro", system-ui, sans-serif; color: var(--ink); background: #f5f7f8; font-size: 14px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 252px; height: 100vh; position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; flex-direction: column; background: var(--navy); color: #fff; }
.brand { height: 82px; padding: 18px 22px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid rgba(255,255,255,.09); }
.brand-mark { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: var(--teal); box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.brand-mark svg { width: 28px; height: 28px; }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 16px; letter-spacing: .15px; }
.brand span { margin-top: 3px; color: #a8bdc7; font-size: 10px; text-transform: uppercase; letter-spacing: 1.15px; }
.nav-menu { padding: 20px 12px; overflow-y: auto; }
.nav-label { margin: 0 12px 9px; color: #7fa0ae; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.25px; }
.nav-label.second { margin-top: 25px; }
.nav-item { width: 100%; height: 44px; padding: 0 12px; margin: 3px 0; border: 0; border-radius: 8px; display: flex; align-items: center; gap: 12px; color: #bdd0d8; background: transparent; text-align: left; transition: .2s ease; }
.nav-item svg { width: 19px; height: 19px; flex: 0 0 auto; }
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active { background: rgba(23, 160, 159, .2); color: #fff; box-shadow: inset 3px 0 #28b7b1; }
.nav-item span { flex: 1; font-size: 13px; }
.nav-count, .notify-dot { min-width: 22px; height: 20px; padding: 0 6px; display: grid; place-items: center; border-radius: 10px; font-size: 10px; font-style: normal; color: #dce9ed; background: rgba(255,255,255,.12); }
.notify-dot { color: #fff; background: #c66451; }
.sidebar-footer { margin: auto 22px 0; padding: 18px 0 22px; border-top: 1px solid rgba(255,255,255,.09); color: #b7cbd3; }
.storage-copy { display: flex; justify-content: space-between; font-size: 11px; }
.storage-copy strong { color: #fff; }
.storage-bar { height: 5px; margin: 9px 0 7px; overflow: hidden; border-radius: 10px; background: rgba(255,255,255,.13); }
.storage-bar i { display: block; width: 68%; height: 100%; border-radius: inherit; background: #2cb4af; }
.sidebar-footer small { font-size: 10px; color: #7fa0ae; }

.main-content { width: calc(100% - 252px); margin-left: 252px; min-width: 0; }
.topbar { height: 69px; padding: 0 32px; display: flex; align-items: center; gap: 22px; position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
.menu-button { display: none !important; }
.global-search { width: min(520px, 50vw); height: 40px; position: relative; display: flex; align-items: center; }
.global-search svg { width: 18px; position: absolute; left: 13px; color: #8a9aa3; }
.global-search input { width: 100%; height: 100%; padding: 0 68px 0 42px; border: 1px solid transparent; border-radius: 8px; color: var(--ink); background: #f3f6f7; outline: none; transition: .2s; }
.global-search input:focus { border-color: #86bebf; background: #fff; box-shadow: 0 0 0 3px rgba(14,139,141,.1); }
.global-search input::placeholder { color: #87969e; font-size: 12px; }
.global-search kbd { position: absolute; right: 10px; padding: 3px 6px; border: 1px solid #d8e0e3; border-radius: 4px; color: #8a979d; background: #fff; font-family: inherit; font-size: 9px; box-shadow: 0 1px 1px rgba(0,0,0,.03); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.icon-button { width: 38px; height: 38px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 8px; color: #53656e; background: transparent; }
.icon-button:hover { background: #eef3f4; }
.notification-button { position: relative; }
.notification-button i { width: 6px; height: 6px; position: absolute; top: 7px; right: 7px; border: 1.5px solid #fff; border-radius: 50%; background: #d35c4b; }
.user-profile { padding-left: 17px; border-left: 1px solid var(--line); display: flex; align-items: center; gap: 10px; cursor: pointer; }
.user-profile .avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #2d8195, #183e57); font-size: 11px; font-weight: 600; }
.user-profile strong, .user-profile span { display: block; white-space: nowrap; }
.user-profile strong { font-size: 12px; }
.user-profile span { margin-top: 2px; color: #89979e; font-size: 9px; }
.user-profile > svg { width: 16px; }

.page-wrap { padding: 30px 32px 40px; max-width: 1600px; margin: 0 auto; }
.page-heading { margin-bottom: 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.eyebrow { margin-bottom: 7px; display: flex; align-items: center; gap: 8px; color: #89989f; font-size: 9px; text-transform: uppercase; letter-spacing: .7px; }
.eyebrow i { width: 3px; height: 3px; border-radius: 50%; background: #aab5ba; }
h1 { margin: 0; color: #173443; font-size: 26px; line-height: 1.2; letter-spacing: -.5px; }
.page-heading p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.primary-button, .secondary-button, .text-button { height: 39px; padding: 0 15px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 11px; font-weight: 600; }
.primary-button { border: 1px solid var(--teal); color: #fff; background: var(--teal); box-shadow: 0 4px 10px rgba(14,139,141,.16); }
.primary-button:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
.primary-button svg, .secondary-button svg { width: 17px; height: 17px; }
.secondary-button { border: 1px solid #dce4e7; color: #435760; background: #fff; }
.secondary-button:hover { border-color: #aebec5; background: #fafcfc; }
.text-button { padding-right: 0; border: 0; color: var(--teal); background: transparent; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat-card, .panel { border: 1px solid #e4eaed; border-radius: 10px; background: #fff; box-shadow: 0 2px 6px rgba(18, 51, 67, .025); }
.stat-card { min-height: 151px; padding: 16px 17px 14px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; }
.stat-icon svg { width: 18px; height: 18px; }
.stat-icon.blue { color: var(--blue); background: var(--blue-bg); }.stat-icon.amber { color: var(--amber); background: var(--amber-bg); }.stat-icon.green { color: var(--green); background: var(--green-bg); }.stat-icon.red { color: var(--red); background: var(--red-bg); }
.trend { padding: 4px 7px; border-radius: 5px; font-size: 8px; font-weight: 600; }
.trend.up { color: var(--green); background: var(--green-bg); }.trend.down { color: var(--red); background: var(--red-bg); }.trend.neutral { color: var(--amber); background: var(--amber-bg); }
.stat-card > p { margin: 12px 0 3px; color: #708089; font-size: 10px; text-transform: uppercase; letter-spacing: .45px; font-weight: 600; }
.stat-number { display: flex; align-items: baseline; gap: 6px; }
.stat-number strong { color: #173847; font-size: 24px; letter-spacing: -.5px; }
.stat-number span { color: #91a0a7; font-size: 9px; }
.stat-card small { display: block; margin-top: 6px; color: #89969c; font-size: 8px; }

.overview-grid { margin-top: 15px; display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(290px, .9fr); gap: 15px; }
.panel-heading { padding: 17px 19px 10px; display: flex; justify-content: space-between; align-items: flex-start; }
.panel-heading h2, .records-heading h2 { margin: 0; color: #1c3847; font-size: 13px; }
.panel-heading p, .records-heading p { margin: 4px 0 0; color: #8a979d; font-size: 9px; }
.legend { display: flex; gap: 16px; color: #66777f; font-size: 8px; }
.legend span { display: flex; align-items: center; gap: 5px; }.legend i { width: 14px; height: 2px; border-radius: 2px; }.legend .in { background: var(--teal); }.legend .out { background: #89a5b1; }
.chart-area { height: 235px; margin: 5px 19px 10px 48px; position: relative; }
.y-axis { position: absolute; left: -32px; top: 2px; bottom: 24px; display: flex; flex-direction: column; justify-content: space-between; color: #9aa7ac; font-size: 8px; }
.line-chart { width: 100%; height: calc(100% - 24px); overflow: visible; }
.grid-lines path { stroke: #e8edef; stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.line { fill: none; stroke-width: 2.2; vector-effect: non-scaling-stroke; }.line.incoming { stroke: var(--teal); }.line.outgoing { stroke: #89a5b1; }.area { fill: url(#areaIn); stroke: none; }.chart-points circle { stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }.in-point { fill: var(--teal); }.out-point { fill: #89a5b1; }
.x-axis { height: 22px; display: flex; justify-content: space-between; align-items: flex-end; color: #97a4aa; font-size: 8px; }
.more-button { border: 0; color: #8b989e; background: transparent; letter-spacing: 2px; }
.donut-wrap { height: 235px; padding: 4px 20px 18px; display: flex; align-items: center; justify-content: center; gap: 28px; }
.donut { width: 128px; height: 128px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--teal) 0 42%, #517c91 42% 68%, #e7a85c 68% 86%, #cdd8dd 86% 100%); position: relative; }
.donut::after { content: ""; width: 82px; height: 82px; position: absolute; border-radius: 50%; background: #fff; }
.donut div { z-index: 1; text-align: center; }.donut strong, .donut span { display: block; }.donut strong { font-size: 18px; color: #173746; }.donut span { margin-top: 2px; color: #8c999f; font-size: 7px; }
.donut-legend { min-width: 110px; }.donut-legend > div { padding: 7px 0; border-bottom: 1px solid #eff2f3; display: flex; justify-content: space-between; gap: 18px; font-size: 8px; }.donut-legend > div:last-child { border: 0; }.donut-legend span { display: flex; align-items: center; gap: 6px; color: #728087; }.donut-legend i { width: 7px; height: 7px; border-radius: 2px; }.d1 { background: var(--teal); }.d2 { background: #517c91; }.d3 { background: #e7a85c; }.d4 { background: #cdd8dd; }

.records-panel { margin-top: 15px; overflow: hidden; }
.records-heading { padding: 17px 19px 13px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.records-actions { display: flex; align-items: center; gap: 8px; }.records-actions button { height: 32px; font-size: 9px; }.records-actions .text-button { margin-left: 4px; }
.filter-drawer { padding: 12px 19px; display: flex; align-items: flex-end; gap: 12px; background: #f8fafb; border-bottom: 1px solid var(--line); }
.filter-drawer label { flex: 1; display: grid; gap: 5px; color: #65767e; font-size: 9px; font-weight: 600; }
.filter-drawer select { height: 34px; padding: 0 10px; border: 1px solid #dce4e7; border-radius: 6px; color: #344c58; background: #fff; outline: none; font-size: 10px; }
.link-button { height: 34px; border: 0; color: var(--teal); background: transparent; font-size: 9px; font-weight: 600; white-space: nowrap; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; min-width: 950px; border-collapse: collapse; }
th { height: 37px; padding: 0 13px; color: #8c999f; background: #f8fafb; border-bottom: 1px solid var(--line); text-align: left; font-size: 8px; font-weight: 600; letter-spacing: .35px; white-space: nowrap; }
th:first-child, td:first-child { padding-left: 19px; }
td { height: 59px; padding: 8px 13px; border-bottom: 1px solid #edf1f2; color: #5f7078; font-size: 9px; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: .15s; cursor: pointer; } tbody tr:hover { background: #f9fbfb; }
.doc-number { color: #274a5a; font-weight: 600; white-space: nowrap; }
.doc-title { max-width: 300px; }.doc-title strong { display: block; overflow: hidden; color: #263f4b; font-size: 9px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }.doc-title span { display: block; margin-top: 4px; color: #9aa6ab; font-size: 7px; }
.type-badge { display: inline-flex; padding: 4px 7px; border-radius: 4px; color: #496774; background: #edf3f5; white-space: nowrap; }
.type-badge.contract { color: #626195; background: #f0eff9; }.type-badge.invoice { color: #97641f; background: #fff4e6; }.type-badge.decision { color: #27735b; background: #eaf5f0; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-weight: 500; }.status-badge i { width: 6px; height: 6px; border-radius: 50%; }.status-badge.approved { color: var(--green); }.status-badge.approved i { background: #3ca977; }.status-badge.pending { color: var(--amber); }.status-badge.pending i { background: #e09a3b; }.status-badge.processing { color: var(--blue); }.status-badge.processing i { background: #4f8fb7; }.status-badge.overdue { color: var(--red); }.status-badge.overdue i { background: #d76255; }
.row-action { width: 28px; height: 28px; border: 0; border-radius: 6px; color: #809098; background: transparent; }.row-action:hover { background: #edf2f3; }
.empty-state { padding: 50px; text-align: center; }.empty-state div { width: 46px; height: 46px; margin: auto; display: grid; place-items: center; border-radius: 50%; color: #71868f; background: #edf3f5; }.empty-state h3 { margin: 12px 0 4px; font-size: 13px; }.empty-state p { margin: 0; color: #8b989e; font-size: 10px; }
.table-footer { min-height: 48px; padding: 8px 19px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }.table-footer p { color: #8a979d; font-size: 8px; }.pagination { display: flex; gap: 4px; }.pagination button { width: 26px; height: 26px; border: 1px solid #e1e7e9; border-radius: 5px; color: #6d7d84; background: #fff; font-size: 9px; }.pagination button.active { border-color: var(--teal); color: #fff; background: var(--teal); }.pagination button:disabled { opacity: .45; }

.overlay { position: fixed; inset: 0; z-index: 40; background: rgba(10, 33, 45, .4); backdrop-filter: blur(2px); }
.detail-drawer { width: min(460px, 94vw); height: 100vh; position: fixed; z-index: 50; top: 0; right: 0; display: flex; flex-direction: column; background: #fff; box-shadow: -18px 0 50px rgba(12,48,67,.16); transform: translateX(105%); transition: transform .28s ease; }
.detail-drawer.open { transform: translateX(0); }
.drawer-head, .modal-head { min-height: 82px; padding: 19px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }.drawer-head span, .modal-head span { display: block; margin-bottom: 4px; color: #8c999f; font-size: 8px; letter-spacing: 1px; }.drawer-head h2, .modal-head h2 { margin: 0; color: #173746; font-size: 17px; }
.drawer-body { flex: 1; padding: 22px; overflow-y: auto; }
.document-preview { padding: 14px; border: 1px solid var(--line); border-radius: 9px; display: flex; align-items: center; gap: 12px; background: #fafcfc; }.file-icon { width: 40px; height: 46px; display: grid; place-items: center; border-radius: 5px; color: #bf4f43; background: #fbe9e7; font-size: 9px; font-weight: 700; }.document-preview > div:nth-child(2) { min-width: 0; flex: 1; }.document-preview strong, .document-preview span { display: block; }.document-preview strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }.document-preview span { margin-top: 5px; color: #8c999f; font-size: 8px; }
.detail-status { margin: 18px 0; }
.detail-list { margin: 0; }.detail-list > div { padding: 11px 0; border-bottom: 1px solid #edf1f2; display: flex; justify-content: space-between; gap: 30px; font-size: 10px; }.detail-list dt { color: #829098; }.detail-list dd { margin: 0; color: #304b58; text-align: right; font-weight: 500; }
.divider { height: 1px; margin: 24px 0 19px; background: var(--line); }.timeline-title { display: flex; align-items: center; justify-content: space-between; }.timeline-title h3 { margin: 0; font-size: 12px; }.timeline-title span { color: #8a989e; font-size: 8px; }
.timeline { margin-top: 18px; }.timeline-item { min-height: 59px; position: relative; display: flex; gap: 12px; }.timeline-item:not(:last-child)::after { content: ""; width: 1px; height: 30px; position: absolute; left: 12px; top: 28px; background: #dce6e8; }.timeline-item i { width: 25px; height: 25px; z-index: 1; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid #d4dfe3; border-radius: 50%; color: #839298; background: #fff; font-size: 8px; font-style: normal; }.timeline-item.complete i { border-color: var(--teal); color: #fff; background: var(--teal); }.timeline-item.current i { border-color: #e3a14d; color: #a6650e; background: #fff5e7; }.timeline-item strong, .timeline-item span { display: block; }.timeline-item strong { margin-top: 3px; font-size: 10px; }.timeline-item span { margin-top: 4px; color: #8b989e; font-size: 8px; }
.drawer-footer { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }

.modal { width: min(660px, calc(100vw - 30px)); max-height: calc(100vh - 36px); position: fixed; z-index: 60; top: 50%; left: 50%; overflow-y: auto; border-radius: 12px; background: #fff; box-shadow: 0 30px 80px rgba(7,34,47,.25); transform: translate(-50%, -50%); }.modal-body { padding: 21px 22px; }.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }.form-grid label { display: grid; gap: 7px; color: #50646e; font-size: 9px; font-weight: 600; }.form-grid label.full { grid-column: 1 / -1; }.form-grid em { color: #c75648; font-style: normal; }.form-grid input, .form-grid select, .form-grid textarea { width: 100%; padding: 0 11px; border: 1px solid #dce4e7; border-radius: 7px; color: #243f4c; background: #fff; outline: none; font-size: 10px; }.form-grid input, .form-grid select { height: 39px; }.form-grid textarea { padding-top: 10px; resize: vertical; }.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { border-color: #76b7b8; box-shadow: 0 0 0 3px rgba(14,139,141,.08); }
.upload-box { min-height: 90px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed #bfcdd2; border-radius: 8px; color: #6d7e86; background: #fafcfc; }.upload-box svg { width: 22px; margin-bottom: 5px; color: var(--teal); }.upload-box strong { font-size: 9px; }.upload-box span { margin-top: 4px; color: #98a4a9; font-size: 8px; font-weight: 400; }.upload-box input { position: absolute; inset: 0; height: 100%; opacity: 0; cursor: pointer; }
.modal-footer { padding: 13px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.toast { min-width: 310px; padding: 13px 16px; position: fixed; z-index: 80; right: 24px; bottom: 24px; display: flex; align-items: center; gap: 12px; border: 1px solid #dbe8e2; border-radius: 9px; background: #fff; box-shadow: var(--shadow); opacity: 0; transform: translateY(20px); pointer-events: none; transition: .25s; }.toast.show { opacity: 1; transform: translateY(0); }.toast > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--green); }.toast strong, .toast p { display: block; margin: 0; }.toast strong { font-size: 10px; }.toast p { margin-top: 3px; color: #7e8d94; font-size: 8px; }

/* B2B order dossiers */
.table-sub { display: block; margin-top: 4px; color: #98a4a9; font-size: 7px; font-weight: 400; }
.money-value { color: #294956; font-size: 9px; white-space: nowrap; }
.doc-progress { min-width: 108px; }.doc-progress > div:first-child { display: flex; align-items: baseline; gap: 4px; }.doc-progress strong { color: #244958; font-size: 10px; }.doc-progress span { color: #87959b; font-size: 7px; }
.mini-progress { width: 88px; height: 4px; margin-top: 6px; overflow: hidden; border-radius: 4px; background: #e8edef; }.mini-progress i { height: 100%; display: block; border-radius: inherit; background: var(--teal); }
.return-count { padding: 4px 7px; border-radius: 4px; color: #54717d; background: #edf3f5; white-space: nowrap; font-size: 8px; }.return-count.has-waiting { color: #9b6417; background: #fff3df; }
.order-drawer { width: min(720px, 96vw); }.company-card { padding: 14px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fafcfc; }.company-avatar { width: 43px; height: 43px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 8px; color: #fff; background: linear-gradient(135deg, var(--teal), var(--navy)); font-size: 11px; font-weight: 700; }.company-card > div:nth-child(2) { min-width: 0; flex: 1; }.company-card strong, .company-card span { display: block; }.company-card > div:nth-child(2) strong { overflow: hidden; color: #213d4a; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }.company-card > div:nth-child(2) span { margin-top: 4px; color: #829198; font-size: 8px; }.order-value { text-align: right; }.order-value span { color: #8a979d; font-size: 7px; }.order-value strong { margin-top: 4px; color: #173b4a; font-size: 12px; }
.detail-list.compact { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }.detail-list.compact > div { min-width: 0; }.checklist-note { margin: 7px 0 15px; color: #7b8a91; font-size: 8px; }.document-checklist { display: grid; gap: 8px; }.checklist-item { min-height: 84px; padding: 12px; display: grid; grid-template-columns: 28px minmax(0,1fr) auto; align-items: flex-start; gap: 11px; border: 1px solid #e3e9eb; border-radius: 8px; background: #fff; }.check-index { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: var(--blue); background: var(--blue-bg); font-size: 8px; font-weight: 700; }.check-index.waiting { color: var(--amber); background: var(--amber-bg); }.check-index.archived { color: #fff; background: var(--green); }.check-main { min-width: 0; }.check-main > strong { display: block; color: #294550; font-size: 10px; }.doc-meta { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 5px; color: #829097; font-size: 7px; }.doc-meta b { color: #516872; }.returned-file, .template-source { display: block; margin-top: 6px; color: var(--green); font-size: 7px; }.template-source { color: #7c6794; }.check-actions { min-width: 136px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }.check-actions .status-badge { font-size: 7px; }.doc-action { height: 28px; padding: 0 9px; border: 1px solid #d9e2e5; border-radius: 5px; color: #405962; background: #fff; font-size: 7px; font-weight: 600; }.doc-action:hover { border-color: #8bbfc0; color: var(--teal); }.doc-action.upload { border-color: #9cc7c8; color: var(--teal); background: #f0f9f9; }.doc-action.done { border: 0; color: var(--green); background: var(--green-bg); cursor: default; }.doc-action.edit { color: #416d8a; background: #edf5fa; border-color: #cbdde8; }
.generated-set { padding: 13px; border: 1px solid #dce7e8; border-radius: 8px; background: #f7fafb; }.generated-head { display: flex; justify-content: space-between; align-items: center; }.generated-head strong { color: #38515c; font-size: 9px; }.generated-head span { color: #87949a; font-size: 7px; font-weight: 400; }.generated-set #docSetPreview { margin-top: 9px; display: grid; gap: 5px; }.generated-set #docSetPreview > span { display: grid; grid-template-columns: 16px 1fr auto; align-items: center; gap: 6px; color: #53666e; font-size: 8px; font-weight: 400; }.generated-set #docSetPreview i { color: var(--teal); font-style: normal; }.generated-set #docSetPreview b { color: #708189; font-size: 7px; }

/* Word-style online editor */
.word-editor { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; color: #263942; background: #eef1f3; font-family: "Be Vietnam Pro", sans-serif; }
.editor-topbar { min-height: 58px; padding: 0 17px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #d8e0e3; background: #fff; }.editor-file-group, .editor-top-actions { display: flex; align-items: center; gap: 9px; }.editor-file-icon { width: 31px; height: 34px; display: grid; place-items: center; border-radius: 5px; color: #fff; background: #176a8a; font-size: 14px; font-weight: 700; }.editor-file-group strong, .editor-file-group span { display: block; }.editor-file-group strong { font-size: 11px; }.editor-file-group span { margin-top: 2px; color: #79907f; font-size: 7px; }.editor-top-actions button { height: 33px; }
.editor-tabs { min-height: 35px; padding: 0 22px; display: flex; align-items: center; gap: 2px; border-bottom: 1px solid #dbe2e5; background: #fff; }.editor-tabs button { height: 35px; padding: 0 13px; border: 0; color: #566a73; background: transparent; font-size: 9px; }.editor-tabs button.active { color: #176a8a; border-bottom: 2px solid #176a8a; font-weight: 600; }.editor-tabs > span { margin-left: auto; padding: 4px 8px; border-radius: 4px; color: #237358; background: #e9f5ef; font-size: 7px; }
.editor-ribbon { min-height: 69px; padding: 8px 22px; display: flex; align-items: stretch; gap: 0; border-bottom: 1px solid #ccd6da; background: #fff; box-shadow: 0 2px 5px rgba(20,49,63,.05); }.tool-group { padding: 0 11px; display: flex; align-items: center; gap: 4px; border-right: 1px solid #dfe6e8; }.tool-group:first-child { padding-left: 0; }.tool-group button, .color-tool { min-width: 27px; height: 28px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 4px; color: #354b55; background: transparent; font-family: Arial, sans-serif; font-size: 11px; }.tool-group button:hover, .color-tool:hover { border-color: #d4e0e3; background: #f0f5f6; }.font-tools { display: grid; grid-template-columns: 128px 54px repeat(4, 30px); grid-template-rows: 28px 28px; align-content: center; }.font-tools select { height: 25px; padding: 0 5px; border: 1px solid #d8e0e3; border-radius: 3px; color: #334c57; background: #fff; font-size: 8px; }.font-tools button, .font-tools .color-tool { grid-row: 2; }.font-tools button:nth-of-type(1) { grid-column: 1; width: 28px; }.font-tools button:nth-of-type(2) { grid-column: 1; margin-left: 31px; width: 28px; }.font-tools button:nth-of-type(3) { grid-column: 1; margin-left: 62px; width: 28px; }.color-tool { grid-column: 1; margin-left: 94px; width: 30px; position: relative; font-weight: 700; }.color-tool input { width: 22px; height: 4px; position: absolute; bottom: 1px; left: 3px; padding: 0; border: 0; }.paragraph-tools { display: grid; grid-template-columns: repeat(4, 30px); grid-template-rows: 28px 28px; align-content: center; }.paragraph-tools button:nth-child(n+5) { grid-row: 2; }.insert-tools button { height: 45px; flex-direction: column; gap: 2px; font-size: 15px; }.insert-tools button span { font-family: "Be Vietnam Pro"; font-size: 7px; }.brand-protection { margin-left: auto; padding-left: 16px; display: flex; align-items: center; gap: 8px; }.brand-protection svg { width: 20px; color: var(--green); }.brand-protection strong, .brand-protection span { display: block; }.brand-protection strong { color: #3f5a65; font-size: 8px; }.brand-protection span { margin-top: 3px; color: #8a989e; font-size: 7px; }
.editor-workspace { min-height: 0; flex: 1; overflow: auto; position: relative; background: #e9edef; }.editor-ruler { width: 794px; height: 23px; margin: 12px auto 0; padding: 0 40px; position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; color: #849298; background: #fff; border: 1px solid #d5dde0; font-size: 6px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }.editor-ruler i { width: 1px; height: 5px; background: #8d9ba1; }.editor-pages { width: fit-content; min-width: 100%; margin: 0 auto; padding: 0 0 60px; outline: none; transform-origin: top center; }.word-page { width: 794px; min-height: 1123px; margin: 14px auto 24px; padding: 115px 70px 88px; position: relative; color: #111; background-color: #fff; background-image: url('./assets/gimi-letterhead.png'); background-size: 100% 100%; background-repeat: no-repeat; box-shadow: 0 4px 18px rgba(25,45,55,.16); font-family: "Times New Roman", serif; font-size: 13px; line-height: 1.35; outline: none; }.word-page * { box-sizing: border-box; }.word-page p { margin: 5px 0; }.word-page .national-title { text-align: center; font-weight: 700; font-size: 15px; }.word-page .national-subtitle { margin-top: 4px; text-align: center; font-weight: 700; font-size: 14px; }.word-page .doc-main-title { margin: 26px 0 6px; color: #ec1717; text-align: center; font-size: 20px; font-weight: 700; text-transform: uppercase; }.word-page .doc-number { display: block; text-align: center; font-size: 13px; font-style: italic; }.word-page .quote-meta { width: 205px; margin: 0 0 12px auto; padding: 8px 12px; border: 1px solid #6eaa48; display: grid; grid-template-columns: 70px 1fr; gap: 4px; font-style: italic; }.word-page .quote-meta b { color: #e51313; }.word-page .customer-block { margin: 12px 0; line-height: 1.5; }.word-page .document-table { width: 100%; margin: 12px 0; border-collapse: collapse; font-size: 11px; }.word-page .document-table th { height: auto; padding: 8px 5px; color: #fff; background: #72b045; border: 1px solid #72b045; text-align: center; font-family: "Times New Roman", serif; font-size: 11px; }.word-page .document-table td { height: auto; padding: 7px 6px; color: #111; background: rgba(231,242,224,.92); border: 1px solid #8fbe73; font-family: "Times New Roman", serif; font-size: 11px; }.word-page .document-table td[contenteditable="true"] { outline: none; }.word-page .legal-section { margin-top: 13px; }.word-page .legal-section h3 { margin: 8px 0 5px; color: #111; font-size: 12px; text-transform: uppercase; }.word-page .legal-section ol, .word-page .legal-section ul { margin: 4px 0 7px 22px; padding: 0; }.word-page .signatures { margin-top: 25px; display: grid; grid-template-columns: 1fr 1fr; text-align: center; font-weight: 700; }.word-page .signature-space { height: 80px; }.word-page .bank-table { width: 75%; margin: 10px auto; border-collapse: collapse; }.word-page .bank-table td { height: auto; padding: 6px 8px; color: #111; border: 1px solid #333; font-family: "Times New Roman", serif; font-size: 11px; }.word-page .editable-hint { background: rgba(255,244,182,.5); outline: 1px dashed rgba(188,139,25,.45); }.page-break-marker { height: 24px; margin: 8px 0; display: grid; place-items: center; color: #7d8d94; border-top: 1px dashed #aebbc0; font-family: "Be Vietnam Pro"; font-size: 7px; }
.editor-statusbar { min-height: 29px; padding: 0 18px; display: flex; align-items: center; gap: 16px; border-top: 1px solid #ccd6da; background: #fff; color: #6f8088; font-size: 7px; }.editor-status-spacer { flex: 1; }.editor-statusbar button { width: 24px; height: 22px; border: 0; background: transparent; }.editor-statusbar input { width: 110px; accent-color: var(--teal); }.editor-statusbar b { min-width: 34px; color: #53666e; }

@media print {
  body.printing-editor > *:not(#wordEditor) { display: none !important; }
  body.printing-editor #wordEditor { position: static; display: block !important; background: #fff; }
  body.printing-editor .editor-topbar, body.printing-editor .editor-tabs, body.printing-editor .editor-ribbon, body.printing-editor .editor-ruler, body.printing-editor .editor-statusbar { display: none !important; }
  body.printing-editor .editor-workspace { overflow: visible; background: #fff; }
  body.printing-editor .editor-pages { width: auto; min-width: 0; padding: 0; transform: none !important; }
  body.printing-editor .word-page { margin: 0; box-shadow: none; break-after: page; page-break-after: always; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  @page { size: A4; margin: 0; }
}

@media (max-width: 1180px) { .stats-grid { grid-template-columns: repeat(2, 1fr); }.overview-grid { grid-template-columns: 1fr; }.distribution-panel { display: none; } }
@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s; box-shadow: 18px 0 50px rgba(8,38,53,.2); }.sidebar.open { transform: translateX(0); }
  .main-content { width: 100%; margin-left: 0; }.topbar { padding: 0 18px; }.menu-button { display: grid !important; }.global-search { flex: 1; }.user-profile > div:not(.avatar), .user-profile > svg, .global-search kbd { display: none; }.user-profile { padding-left: 12px; }.page-wrap { padding: 24px 18px 35px; }
  .filter-drawer { display: grid; grid-template-columns: 1fr 1fr; }.records-actions .secondary-button { font-size: 0; padding: 0 8px; }.records-actions .secondary-button svg { margin: 0; }
}
@media (max-width: 560px) {
  .page-heading { align-items: flex-start; }.page-heading p { max-width: 230px; }.primary-button { padding: 0 11px; }.page-heading .primary-button { font-size: 0; }.page-heading .primary-button svg { margin: 0; }.stats-grid { grid-template-columns: 1fr 1fr; gap: 9px; }.stat-card { min-height: 140px; padding: 13px; }.stat-number strong { font-size: 21px; }.overview-grid { display: none; }.records-panel { margin-top: 12px; }.records-heading { align-items: flex-start; }.records-actions { gap: 2px; }.records-actions .text-button { display: none; }.filter-drawer { grid-template-columns: 1fr; }.form-grid { grid-template-columns: 1fr; }.form-grid label.full { grid-column: auto; }.toast { min-width: 0; left: 18px; right: 18px; }.topbar-actions { gap: 4px; }.global-search input::placeholder { color: transparent; }
}
