/* Quotation Maker - application UI */
:root {
  --bg: #f2f4f8;
  --panel: #ffffff;
  --ink: #1b2533;
  --muted: #677487;
  --line: #e3e7ee;
  --line2: #d3d9e3;
  --pri: #0b84d8;
  --pri-d: #076cb3;
  --pri-l: #e7f3fc;
  --side: #0f1c2b;
  --side2: #172a3f;
  --side-ink: #b9c6d6;
  --danger: #d92d20;
  --ok: #0f9d58;
  --warn: #e98a00;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow-l: 0 12px 32px rgba(16, 24, 40, .18);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 14px/1.45 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--pri); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: Consolas, "Cascadia Mono", monospace; font-size: 12px; }
h1, h2, h3, h4 { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.pre { white-space: pre-line; }
.grow { flex: 1; }
.ic { display: inline-block; vertical-align: -3px; flex: none; }
.hint { color: var(--muted); font-size: 12px; }

/* layout */
#app { display: flex; height: 100vh; }
#sidebar { width: 236px; flex: none; background: linear-gradient(180deg, var(--side), var(--side2)); color: var(--side-ink); display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 16px; color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.brand-mark { width: 36px; height: 36px; border-radius: 9px; background: linear-gradient(135deg, #2bb8f0, #0b6fc0); display: grid; place-items: center; font-weight: 800; letter-spacing: -.5px; box-shadow: 0 4px 12px rgba(11, 132, 216, .45); }
.brand b { display: block; font-size: 15px; }
.brand small { color: var(--side-ink); font-size: 11.5px; }
#sidebar nav { padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }
#sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--side-ink); font-weight: 500; text-decoration: none; }
#sidebar nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
#sidebar nav a.active { background: rgba(43, 184, 240, .16); color: #fff; box-shadow: inset 3px 0 0 #2bb8f0; }
.nav-new { margin: 6px 12px 0; }
.sb-foot { margin-top: auto; padding: 14px 18px; font-size: 12px; border-top: 1px solid rgba(255, 255, 255, .06); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.dot.ok { background: #34d399; } .dot.warn { background: #fbbf24; }
#view { flex: 1; min-width: 0; overflow: auto; padding: 26px 32px 40px; }
body.editor-mode #view { padding: 0; overflow: hidden; }
body.editor-mode #sidebar { width: 64px; }
body.editor-mode .brand b, body.editor-mode .brand small, body.editor-mode #sidebar nav a span, body.editor-mode .sb-foot, body.editor-mode .nav-new span { display: none; }
body.editor-mode #sidebar nav a { justify-content: center; padding: 10px 0; }
body.editor-mode .brand { padding: 16px 14px; justify-content: center; }
body.editor-mode .nav-new { margin: 6px 8px 0; padding: 8px 0; justify-content: center; }

/* page header */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; font-weight: 700; letter-spacing: -.3px; }
.page-head p { margin: 4px 0 0; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border: 1px solid var(--line2); background: #fff; color: var(--ink); border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn:hover { background: #f6f8fb; border-color: #c3cbd8; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--pri); border-color: var(--pri); color: #fff; }
.btn-primary:hover { background: var(--pri-d); border-color: var(--pri-d); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #b42318; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: #eef1f6; color: var(--ink); }
.btn-dark { background: #3b4048; border-color: #4a5059; color: #e6e9ee; }
.btn-dark:hover { background: #4a5059; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; gap: 5px; }
.btn.pulse { box-shadow: 0 0 0 3px rgba(11, 132, 216, .25); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.icon-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; border: 0; background: transparent; color: var(--muted); cursor: pointer; flex: none; }
.icon-btn:hover { background: #e9edf3; color: var(--ink); text-decoration: none; }
.icon-btn.danger:hover { background: #fdecea; color: var(--danger); }
.icon-btn.warn { color: var(--warn); }

/* forms */
input[type=text], input[type=number], input[type=date], input[type=search], input[type=email], input[type=password], input[type=tel], input[type=url], input:not([type]), select, textarea {
  width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--line2); border-radius: 7px; background: #fff; color: var(--ink); font: inherit; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; padding: 8px 10px; resize: vertical; line-height: 1.4; }
input:focus, select:focus, textarea:focus { border-color: var(--pri); box-shadow: 0 0 0 3px rgba(11, 132, 216, .14); }
input[type=color] { width: 44px; height: 32px; padding: 2px; border: 1px solid var(--line2); border-radius: 7px; background: #fff; cursor: pointer; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--pri); vertical-align: -3px; }
input[type=range] { accent-color: var(--pri); flex: 1; }
.fld { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; min-width: 0; }
.fld > span { font-size: 12.5px; font-weight: 600; color: #3e4a5c; }
.fld > small { color: var(--muted); font-size: 12px; }
.fld-inline { flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 8px; }
.fld-color { flex-direction: row; align-items: center; justify-content: space-between; }
.form-grid .fld:last-child { margin-bottom: 0; }
.form-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form-row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
.form-row3.subtle { opacity: .85; margin-top: 6px; }
.row-inline { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.row-inline > input, .row-inline > .combo { flex: 1; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; user-select: none; margin-right: 14px; }
.chk.light { color: #d6dae0; }
.search { max-width: 380px; padding-left: 34px !important; background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23889" stroke-width="2"><circle cx="11" cy="11" r="7"/><path d="M21 21l-5-5"/></svg>') no-repeat 10px center; }
.search.sm { height: 32px; max-width: none; }

/* cards */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.form-card { padding: 18px 20px 8px; margin-bottom: 16px; }
.form-card h3 { font-size: 15px; margin-bottom: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 12px; flex-wrap: wrap; }
.card-head h3 { font-size: 15px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.tpl-card, .co-card { padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.tpl-card h3, .co-card h3 { font-size: 17px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tpl-card p, .co-card p { margin: 0; font-size: 13px; }
.tpl-ic { width: 42px; height: 42px; border-radius: 10px; background: var(--pri-l); color: var(--pri); display: grid; place-items: center; }
.card-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; align-items: center; }
.add-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 190px; border: 2px dashed var(--line2); background: transparent; box-shadow: none; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.add-card:hover { border-color: var(--pri); color: var(--pri); background: var(--pri-l); }
.co-logo { height: 64px; display: flex; align-items: center; }
.co-logo img { max-height: 60px; max-width: 200px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 20px; background: #eef1f6; color: #4b586b; font-size: 12px; font-weight: 600; }
.chip-ok { background: #e3f6ec; color: #0b7a43; }
.chip-warn { background: #fff4e0; color: #9a5b00; }

/* stats & tables */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.stat-ic { width: 42px; height: 42px; border-radius: 10px; background: var(--pri-l); color: var(--pri); display: grid; place-items: center; flex: none; }
.stat:nth-child(2) .stat-ic { background: #f1ecfe; color: #6e45e2; }
.stat:nth-child(3) .stat-ic { background: #fff4e0; color: #c77700; }
.stat:nth-child(4) .stat-ic { background: #e3f6ec; color: #0b7a43; }
.stat-v { font-size: 22px; font-weight: 700; line-height: 1.1; }
.stat-l { color: var(--muted); font-size: 12.5px; }
.filters { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.filters select { width: auto; min-width: 170px; }
.table-card { overflow: hidden; }
.table-scroll { overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 700; padding: 11px 12px; background: #f8fafc; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table.hover tr.click { cursor: pointer; }
.data-table.hover tr:hover td { background: #f8fbfe; }
.data-table td small { display: block; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .acts { text-align: right; white-space: nowrap; }
.status-sel { width: auto; height: 28px; padding: 0 8px; border-radius: 20px; font-size: 12.5px; font-weight: 600; border-color: transparent; background: #eef1f6; cursor: pointer; }
.st-draft { background: #eef1f6; color: #4b586b; }
.st-sent { background: #e7f3fc; color: #0a68ad; }
.st-negotiation { background: #fff4e0; color: #9a5b00; }
.st-won { background: #e3f6ec; color: #0b7a43; }
.st-lost, .st-cancelled { background: #fdecea; color: #b42318; }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty.small { padding: 24px 10px; }
.empty .btn { margin-top: 10px; }

/* fields editor */
.fields-table td { padding: 6px 6px; }
.fields-table input, .fields-table select { height: 32px; font-size: 13px; }
.fields-table td.num { color: var(--muted); width: 30px; }
.fields-table .w-unit { width: 80px; }
.fields-table .row-acts { display: flex; }
.fields-foot { display: flex; align-items: center; gap: 14px; padding: 12px 16px 16px; flex-wrap: wrap; }
.fields-ed .table-scroll { max-height: 62vh; }
.pn-preview { background: var(--pri-l); color: #0a4f82; padding: 8px 12px; border-radius: 8px; font-size: 13px; }

/* company */
.kvlist .kv-row { display: grid; grid-template-columns: 1fr 1.6fr auto auto; gap: 6px; margin-bottom: 6px; align-items: center; }
.kvlist .btn { margin: 4px 0 12px; }
.imgpick { display: flex; gap: 12px; align-items: center; }
.imgpick-thumb { width: 150px; height: 84px; border: 1px dashed var(--line2); border-radius: 8px; display: grid; place-items: center; background: #fafbfd repeating-conic-gradient(#f0f2f6 0 25%, #fff 0 50%) 0 0 / 14px 14px; overflow: hidden; flex: none; }
.imgpick-thumb img { max-width: 100%; max-height: 100%; }
.imgpick-thumb span { color: var(--muted); font-size: 12px; background: #fff; padding: 2px 6px; border-radius: 4px; }
.imgpick-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.sel-sm { height: 30px; font-size: 13px; width: auto; }
.co-preview-wrap { margin: 6px 0 12px; height: 230px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #8a9099; position: relative; }
.co-preview { transform: scale(.55); transform-origin: top left; position: absolute; left: 8px; top: 8px; }
.co-preview .page { margin: 0; }

/* modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(15, 23, 36, .48); display: grid; place-items: center; z-index: 1000; padding: 20px; animation: fade .15s ease; }
.modal { background: #fff; border-radius: 14px; box-shadow: var(--shadow-l); max-width: 100%; max-height: calc(100vh - 40px); display: flex; flex-direction: column; animation: pop .18s ease; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 10px; }
.modal-head h3 { font-size: 17px; }
.modal-body { padding: 6px 20px 16px; overflow: auto; }
.modal-body p { margin-top: 0; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid var(--line); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.97); opacity: 0; } }

/* popup menu */
.pop-menu { position: fixed; z-index: 1100; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-l); padding: 6px; min-width: 230px; max-height: 70vh; overflow: auto; }
.pop-item { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; padding: 8px 10px; border-radius: 7px; font: inherit; color: var(--ink); cursor: pointer; text-align: left; }
.pop-item:hover { background: #f1f4f9; }
.pop-item small { margin-left: auto; color: var(--muted); font-size: 11.5px; padding-left: 14px; }
.pop-item.danger { color: var(--danger); }
.pop-item.danger:hover { background: #fdecea; }
.pop-sep { height: 1px; background: var(--line); margin: 5px 4px; }
.pop-head { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 700; padding: 6px 10px 4px; }

/* toasts / busy */
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { background: #1f2a37; color: #fff; padding: 10px 16px; border-radius: 9px; box-shadow: var(--shadow-l); font-weight: 500; opacity: 0; transform: translateY(8px); transition: all .25s; max-width: 420px; }
.toast.show { opacity: 1; transform: none; }
.toast-ok { background: #0b7a43; } .toast-err { background: #b42318; } .toast-warn { background: #9a5b00; }
.busy-overlay { position: fixed; inset: 0; background: rgba(255, 255, 255, .6); z-index: 1500; display: grid; place-items: center; backdrop-filter: blur(1px); }
.busy-box { background: #fff; padding: 20px 26px; border-radius: 12px; box-shadow: var(--shadow-l); display: flex; align-items: center; gap: 14px; font-weight: 600; }
.spinner { width: 22px; height: 22px; border: 3px solid #d7e6f3; border-top-color: var(--pri); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* combobox */
.combo { position: relative; display: flex; align-items: center; min-width: 0; }
.combo input { padding-right: 34px; }
.combo.is-custom input { border-color: #f0b44c; background: #fffcf4; }
.combo-btn { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border: 0; background: transparent; color: var(--muted); cursor: pointer; border-radius: 6px; display: grid; place-items: center; }
.combo-btn:hover { background: #eef1f6; }
.combo-add { position: absolute; right: 31px; top: 50%; transform: translateY(-50%); height: 24px; width: 24px; border: 0; border-radius: 6px; background: #f0b44c; color: #fff; cursor: pointer; display: grid; place-items: center; }
.combo-add:hover { background: #d99a2b; }
.combo-list { position: fixed; z-index: 1200; background: #fff; border: 1px solid var(--line2); border-radius: 8px; box-shadow: var(--shadow-l); overflow: auto; padding: 4px; max-width: 560px; }
.combo-item { padding: 7px 10px; border-radius: 6px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.combo-item:hover, .combo-item.act { background: #eef5fc; }
.combo-item.sel { font-weight: 700; color: var(--pri-d); }
.combo-item em { font-style: normal; font-size: 11px; font-weight: 700; color: #fff; background: #8796aa; border-radius: 4px; padding: 0 6px; align-self: center; }
.combo-empty { padding: 8px 10px; color: var(--muted); font-size: 13px; }

/* rich text */
.rte { border: 1px solid var(--line2); border-radius: 8px; background: #fff; margin-bottom: 10px; }
.rte:focus-within { border-color: var(--pri); box-shadow: 0 0 0 3px rgba(11, 132, 216, .12); }
.rte-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-bottom: 1px solid var(--line); background: #f8fafc; border-radius: 8px 8px 0 0; align-items: center; }
.rte-btn { min-width: 28px; height: 28px; border: 0; background: transparent; border-radius: 5px; cursor: pointer; font: 14px/1 "Times New Roman", serif; color: #334; display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 0 6px; }
.rte-btn:hover { background: #e6ebf2; }
.rte-btn.rte-field { font: 600 12.5px "Segoe UI", sans-serif; color: var(--pri-d); background: var(--pri-l); margin-left: auto; }
.rte-sep { width: 1px; height: 18px; background: var(--line2); margin: 0 3px; }
.rte-size { width: auto; height: 28px; font-size: 12.5px; padding: 0 4px; }
.rte-color { width: 30px; height: 26px; padding: 1px; }
.rte .hl { background: #ff0; padding: 0 2px; }
.al { display: inline-block; width: 14px; height: 10px; background: linear-gradient(#445 0 0) 0 0 / 100% 2px no-repeat, linear-gradient(#445 0 0) 0 4px / 70% 2px no-repeat, linear-gradient(#445 0 0) 0 8px / 100% 2px no-repeat; }
.al-c { background: linear-gradient(#445 0 0) 0 0 / 100% 2px no-repeat, linear-gradient(#445 0 0) 50% 4px / 70% 2px no-repeat, linear-gradient(#445 0 0) 0 8px / 100% 2px no-repeat; }
.al-r { background: linear-gradient(#445 0 0) 0 0 / 100% 2px no-repeat, linear-gradient(#445 0 0) 100% 4px / 70% 2px no-repeat, linear-gradient(#445 0 0) 0 8px / 100% 2px no-repeat; }
.al-j { background: linear-gradient(#445 0 0) 0 0 / 100% 2px no-repeat, linear-gradient(#445 0 0) 0 4px / 100% 2px no-repeat, linear-gradient(#445 0 0) 0 8px / 100% 2px no-repeat; }
.rte-area { padding: 8px 12px; outline: none; font: 14px/1.45 "Times New Roman", serif; max-height: 360px; overflow: auto; }
.rte-area:empty::before { content: attr(data-ph); color: #9aa5b4; }
.rte-area p, .rte-area div { margin: 0 0 4px; }
.rte-area ul, .rte-area ol { margin: 2px 0 6px; padding-left: 22px; }

/* token picker */
.token-picker .tp-search { margin-bottom: 8px; }
.tp-fmt { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-size: 12.5px; padding: 8px 10px; background: #f8fafc; border-radius: 8px; margin-bottom: 8px; }
.tp-fmt select { width: auto; height: 28px; font-size: 12.5px; margin-left: 6px; }
.tp-list { max-height: 52vh; overflow: auto; }
.tp-group { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 700; padding: 10px 6px 4px; position: sticky; top: 0; background: #fff; }
.tp-item { display: flex; justify-content: space-between; gap: 12px; width: 100%; border: 0; background: transparent; padding: 7px 8px; border-radius: 6px; cursor: pointer; font: inherit; text-align: left; }
.tp-item:hover { background: #eef5fc; }
.tp-item code { color: var(--pri-d); }

/* ============ editor ============ */
.ed { display: flex; flex-direction: column; height: 100vh; }
.ed-top { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: #fff; border-bottom: 1px solid var(--line); flex: none; }
.ed-title { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.ed-title small { color: var(--muted); font-size: 11.5px; }
.ed-title b { font-size: 16px; }
.ed-title .muted { font-size: 13px; font-weight: 400; }
.ed-state { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 20px; }
.ed-state.dirty { background: #fff4e0; color: #9a5b00; }
.ed-state.clean { background: #e3f6ec; color: #0b7a43; }
.ed-main { flex: 1; display: flex; min-height: 0; }
.ed-left { flex: none; display: flex; flex-direction: column; background: #fff; min-width: 380px; border-right: 1px solid var(--line); }
.ed-tabs { display: flex; gap: 2px; padding: 8px 10px 0; border-bottom: 1px solid var(--line); background: #fbfcfe; flex: none; }
.ed-tab { display: flex; align-items: center; gap: 6px; border: 0; background: transparent; padding: 9px 12px 10px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ed-tab:hover { color: var(--ink); }
.ed-tab.active { color: var(--pri); border-bottom-color: var(--pri); }
.ed-pane { flex: 1; overflow: auto; padding: 14px 16px 60px; }
.ed-split { width: 6px; cursor: col-resize; background: #e8ecf2; flex: none; }
.ed-split:hover { background: #bcd8ee; }
.ed-right { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #525861; }
.pv-bar { display: flex; align-items: center; gap: 8px; padding: 7px 12px; background: #3a3f47; color: #e6e9ee; flex: none; }
.pv-label { font-weight: 700; font-size: 13px; }
.pv-pages { font-size: 12px; color: #aab3bf; }
.pv-zoom { min-width: 44px; text-align: center; font-size: 12.5px; }
.pv-scroll { flex: 1; overflow: auto; padding: 20px 0 40px; }
.pv-scale { margin: 0 auto; position: relative; }
.pv-doc { transform-origin: top left; width: 210mm; }
.pv-doc-tmp { position: absolute; left: -30000px; top: 0; visibility: hidden; width: 210mm; }
.ed-sec { padding: 4px 0 10px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.ed-sec:last-child { border-bottom: 0; }
.ed-sec h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 4px 0 12px; }
.pane-tools { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.pane-tools .search { flex: 1; min-width: 150px; }

/* spec */
.pn-banner { background: linear-gradient(135deg, #0b84d8, #0a5f9f); color: #fff; border-radius: 10px; padding: 12px 16px; margin-bottom: 14px; box-shadow: 0 6px 16px rgba(11, 132, 216, .25); }
.pn-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; opacity: .8; font-weight: 700; }
.pn-value { font-size: 24px; font-weight: 800; letter-spacing: .5px; font-family: "Segoe UI", sans-serif; }
.pn-help { font-size: 12px; opacity: .85; }
.spec-group { border: 1px solid var(--line); border-radius: 9px; margin-bottom: 10px; overflow: hidden; }
.spec-head { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: #f6f8fb; padding: 9px 12px; font: inherit; font-weight: 700; cursor: pointer; text-align: left; }
.spec-head small { margin-left: auto; color: var(--muted); font-weight: 600; background: #e8edf3; border-radius: 10px; padding: 0 8px; }
.spec-head .ic { transition: transform .15s; }
.spec-group.collapsed .spec-head .ic { transform: rotate(-90deg); }
.spec-group.collapsed .spec-body { display: none; }
.spec-body { padding: 6px 12px 8px; }
.spec-row { display: grid; grid-template-columns: minmax(130px, 40%) 1fr; gap: 10px; align-items: center; padding: 4px 0; }
.spec-label span { font-size: 13px; font-weight: 600; display: block; line-height: 1.25; }
.spec-label code { font-size: 10.5px; color: #8a96a8; }
.spec-ctl { display: flex; align-items: center; gap: 6px; min-width: 0; }
.spec-ctl > .combo, .spec-ctl > input, .spec-ctl > textarea { flex: 1; }
.spec-ctl .unit { font-size: 12px; color: var(--muted); font-weight: 600; min-width: 34px; }
.computed { flex: 1; height: 36px; display: flex; align-items: center; padding: 0 10px; border-radius: 7px; background: #eef7ee; color: #145c2e; font-weight: 700; border: 1px solid #cfe8d2; }

/* blocks */
.add-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px; background: #f6f8fb; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; }
.add-label { font-weight: 700; font-size: 12.5px; color: var(--muted); margin-right: 2px; }
.add-btn { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border: 1px solid var(--line2); background: #fff; border-radius: 7px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; color: #354055; }
.add-btn:hover { border-color: var(--pri); color: var(--pri); background: var(--pri-l); }
.blk-list { display: flex; flex-direction: column; gap: 6px; }
.blk-card { border: 1px solid var(--line); border-radius: 9px; background: #fff; transition: box-shadow .15s, border-color .15s; }
.blk-card.open { border-color: #b8d7f0; box-shadow: 0 4px 14px rgba(11, 132, 216, .1); }
.blk-card.is-hidden { opacity: .55; background: #fafafa; }
.blk-card.is-hidden .blk-sum { text-decoration: line-through; }
.blk-card.dragging { opacity: .4; }
.blk-card.drop-before { box-shadow: 0 -3px 0 var(--pri); }
.blk-card.drop-after { box-shadow: 0 3px 0 var(--pri); }
.blk-card.flash { animation: cardflash 1.2s ease; }
@keyframes cardflash { 0%, 50% { background: #e7f3fc; border-color: var(--pri); } }
.blk-head { display: flex; align-items: center; gap: 8px; padding: 5px 6px 5px 4px; cursor: pointer; user-select: none; min-height: 40px; }
.grip { color: #a8b2c1; cursor: grab; display: grid; place-items: center; }
.blk-type { display: inline-flex; align-items: center; gap: 6px; color: var(--pri-d); flex: none; font-size: 12.5px; }
.blk-sum { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #4b586b; font-size: 13px; }
.blk-acts { display: flex; flex: none; }
.blk-acts .icon-btn { width: 28px; height: 28px; }
.blk-card.open .blk-acts .icon-btn:last-child .ic { transform: rotate(180deg); }
.blk-body { padding: 8px 12px 6px; border-top: 1px solid var(--line); }

/* table editor */
.tbl-opts { margin-bottom: 8px; }
.tbl-title { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.tbl-title .chk { margin: 0; white-space: nowrap; }
.tbl-flags { display: flex; flex-wrap: wrap; gap: 4px 0; }
.tbl-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.tbl-grid { border-collapse: collapse; width: 100%; min-width: 100%; }
.tbl-grid td, .tbl-grid th { border-bottom: 1px solid var(--line); padding: 3px; vertical-align: top; }
.tbl-grid tr.is-head td { background: #e7f3fc; }
.tbl-grid textarea { min-height: 32px; height: 32px; padding: 5px 7px; font-size: 13px; resize: none; overflow: hidden; min-width: 110px; }
.tbl-colhead th { background: #f6f8fb; }
.colctl { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.colctl input[type=number] { width: 54px; height: 26px; padding: 0 4px; font-size: 12px; }
.colctl .chk { margin: 0; font-size: 11.5px; }
.rownum { color: #a0aabb; font-size: 11px; text-align: center; width: 22px; padding-top: 9px !important; }
.rowacts { white-space: nowrap; width: 1%; }
.rowacts .icon-btn { width: 24px; height: 26px; }
.tbl-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 8px 0 4px; }
.tbl-foot .hint { margin-left: 6px; }
.boxes-ed .box-ed { margin-bottom: 8px; }
.box-ed-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }

@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  #view { padding: 18px; }
}

/* ===================== simple / guided UI ===================== */
.btn-lg { height: 42px; padding: 0 20px; font-size: 15px; }
.btn-soft { background: var(--pri-l); border-color: #cfe5f7; color: var(--pri-d); }
.btn-soft:hover { background: #d9ecfb; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--pri); font: inherit; font-weight: 600; cursor: pointer; padding: 4px 2px; }
.link-btn:hover { text-decoration: underline; }
.link-btn.muted { color: var(--muted); }
.req { color: var(--danger); font-style: normal; }
.tip { margin: 0 0 10px; }

/* how-to strip on the dashboard */
.howto { display: flex; align-items: center; gap: 18px; padding: 14px 18px; margin-bottom: 16px; flex-wrap: wrap; background: linear-gradient(90deg, #f3f9fe, #fff); }
.howto-step { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 200px; }
.howto-step > span { width: 30px; height: 30px; border-radius: 50%; background: var(--pri); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.howto-step b { display: block; font-size: 14px; }
.howto-step small { color: var(--muted); }

/* new quotation dialog */
.pick-cards { display: grid; gap: 8px; }
.pick-card { display: flex; align-items: center; gap: 12px; text-align: left; border: 2px solid var(--line); border-radius: 10px; background: #fff; padding: 10px 14px; cursor: pointer; font: inherit; color: var(--ink); }
.pick-card:hover { border-color: #b8d7f0; }
.pick-card.sel { border-color: var(--pri); background: var(--pri-l); }
.pick-card small { display: block; color: var(--muted); }

/* stepper */
.stepper { display: flex; gap: 4px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fbfcfe; flex: none; overflow-x: auto; }
.step { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 7px 10px; border-radius: 8px; cursor: pointer; font: inherit; color: var(--muted); font-weight: 600; white-space: nowrap; }
.step:hover { background: #eef2f7; color: var(--ink); }
.step-n { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #c9d2de; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.step.done .step-n { background: #e3f6ec; border-color: #7fcf9f; color: #0b7a43; }
.step.active { background: var(--pri-l); color: var(--pri-d); }
.step.active .step-n { background: var(--pri); border-color: var(--pri); color: #fff; }
.step-head { margin: 2px 0 16px; }
.step-badge { display: inline-block; font-size: 11.5px; font-weight: 700; color: var(--pri-d); background: var(--pri-l); border-radius: 20px; padding: 2px 10px; margin-bottom: 6px; }
.step-head h2 { font-size: 20px; letter-spacing: -.2px; }
.step-head p { margin: 4px 0 0; color: var(--muted); }
.ed-card { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px 4px; margin-bottom: 14px; background: #fff; }
.ed-card h4 { font-size: 14px; margin-bottom: 12px; }
.ed-foot { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); background: #fbfcfe; flex: none; }
.qno { display: flex; align-items: center; gap: 8px; min-height: 36px; }
.qno b { font-size: 15px; }
.qno input { flex: 1; }
.pane-links { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
.spec-label { font-size: 13.5px; font-weight: 600; line-height: 1.25; }
.spec-ctl-wrap { min-width: 0; }
.money-hint { font-size: 12px; color: #0b7a43; margin-top: 3px; font-weight: 600; }
.spec-row.flash { animation: cardflash 1.6s ease; border-radius: 6px; }

/* chips (values inside text) */
.tkc { display: inline-block; background: #e3f0fc; color: #0a5f9f; border: 1px solid #b8d7f0; border-radius: 5px; padding: 0 6px; margin: 0 1px; font: 600 12.5px/1.6 "Segoe UI", sans-serif; white-space: nowrap; user-select: all; cursor: default; vertical-align: baseline; }
.tkc-merge { background: #f1f3f6; color: #6b7686; border-color: #d7dde5; font-weight: 500; }
.chip-input-wrap { position: relative; display: flex; align-items: flex-start; gap: 6px; }
.chip-input { flex: 1; min-height: 36px; padding: 6px 10px; border: 1px solid var(--line2); border-radius: 7px; background: #fff; outline: none; line-height: 1.6; font-size: 14px; word-break: break-word; }
.chip-input.single { white-space: nowrap; overflow-x: auto; }
.chip-input:focus { border-color: var(--pri); box-shadow: 0 0 0 3px rgba(11, 132, 216, .14); }
.chip-input:empty::before { content: attr(data-ph); color: #9aa5b4; }
.chip-add { display: inline-flex; align-items: center; gap: 3px; height: 36px; padding: 0 9px; border: 1px solid #cfe5f7; background: var(--pri-l); color: var(--pri-d); border-radius: 7px; font: 600 12px "Segoe UI", sans-serif; cursor: pointer; flex: none; }
.chip-add:hover { background: #d9ecfb; }
.chip-input-wrap.cell .chip-input { min-height: 32px; padding: 4px 7px; font-size: 13px; border-color: transparent; background: transparent; min-width: 120px; }
.chip-input-wrap.cell .chip-input:hover { border-color: var(--line2); background: #fff; }
.chip-input-wrap.cell .chip-input:focus { border-color: var(--pri); background: #fff; }
.tbl-grid tr.is-head .chip-input { font-weight: 700; }

/* value picker */
.tp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px; }
.tp-item { justify-content: flex-start !important; border: 1px solid var(--line) !important; background: #fff !important; font-size: 13px !important; }
.tp-item:hover { border-color: var(--pri) !important; background: var(--pri-l) !important; }
.tp-fmt summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.tp-fmt label { display: block; margin-top: 6px; }

/* combobox "save" */
.combo-add { width: auto !important; padding: 0 7px; gap: 3px; font: 600 11.5px "Segoe UI", sans-serif; }
.combo .combo-add span { line-height: 1; }

/* sections */
.sec-list { display: flex; flex-direction: column; gap: 6px; }
.sec-card { border: 1px solid var(--line); border-radius: 10px; background: #fff; transition: box-shadow .15s, border-color .15s, opacity .15s; }
.sec-card.open { border-color: #9ccbee; box-shadow: 0 6px 18px rgba(11, 132, 216, .12); }
.sec-card.is-off { background: #f7f8fa; }
.sec-card.is-off .sec-name b { color: #8a94a3; text-decoration: line-through; }
.sec-card.is-break { border-style: dashed; background: #fafbfc; }
.sec-card.is-break .sec-head { min-height: 36px; }
.sec-card.dragging { opacity: .4; }
.sec-card.drop-before { box-shadow: 0 -3px 0 var(--pri); }
.sec-card.drop-after { box-shadow: 0 3px 0 var(--pri); }
.sec-card.flash { animation: cardflash 1.2s ease; }
.sec-head { display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 6px; cursor: pointer; user-select: none; min-height: 48px; }
.sec-ic { color: var(--pri-d); display: grid; place-items: center; flex: none; }
.sec-name { flex: 1; min-width: 0; line-height: 1.25; }
.sec-name b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sec-name small { color: var(--muted); font-size: 12px; }
.sec-acts { display: flex; align-items: center; gap: 2px; flex: none; }
.sec-body { padding: 12px 14px 8px; border-top: 1px solid var(--line); }
.more-opts { margin: 4px 0 8px; }
.more-opts summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600; padding: 4px 0; }
.more-body { padding-top: 8px; }

/* on/off switch */
.switch { position: relative; width: 38px; height: 22px; flex: none; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.slider { position: absolute; inset: 0; background: #cfd6df; border-radius: 22px; transition: .2s; }
.slider::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.switch input:checked + .slider { background: #12a35b; }
.switch input:checked + .slider::before { transform: translateX(16px); }

/* download step */
.notice { border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.notice.warn { background: #fff8e6; border: 1px solid #f5d48a; }
.notice.ok { background: #e9f8ef; border: 1px solid #a8e0bf; color: #0b7a43; }
.notice small { color: var(--muted); display: block; margin-top: 6px; }
.miss-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.miss-item { border: 1px solid #f0c66b; background: #fff; border-radius: 20px; padding: 3px 12px; font: inherit; font-size: 13px; cursor: pointer; color: #8a5300; }
.miss-item:hover { background: #fff1cc; }
.dl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.dl-card { display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font: inherit; color: var(--ink); transition: all .15s; }
.dl-card:hover { border-color: var(--pri); box-shadow: 0 6px 16px rgba(11, 132, 216, .14); transform: translateY(-1px); }
.dl-ic { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.dl-t b { display: block; font-size: 15px; }
.dl-t small { color: var(--muted); font-size: 12.5px; }
.dl-pdf .dl-ic { background: #fdecea; color: #c62828; }
.dl-word .dl-ic { background: #e7f0fd; color: #1e5bb8; }
.dl-excel .dl-ic { background: #e3f6ec; color: #107c41; }
.dl-print .dl-ic { background: #eef1f6; color: #4b586b; }

/* choices + formula builder */
.opt-list { max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.opt-row { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.opt-row input { height: 32px; }
.opt-row .opt-code { width: 90px; flex: none; }
.opt-n { color: var(--muted); font-size: 12px; width: 26px; text-align: right; flex: none; }
.fb-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.fb-row { display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfd; }
.fb-row select, .fb-row input { height: 34px; }
.fb-n { width: 24px; height: 24px; border-radius: 50%; background: var(--pri); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.fb-preview { background: #e9f8ef; color: #0b5c32; padding: 10px 12px; border-radius: 8px; font-size: 14px; }
.fields-table .w-def { min-width: 180px; }
.fields-table .combo input { height: 32px; font-size: 13px; }
.colctl select { width: auto; min-width: 86px; height: 28px; padding: 0 6px; font-size: 12.5px; }
.tbl-colhead th { white-space: nowrap; }

/* ===================== login, roles, home, revisions, reports ===================== */
.modal-body > p { white-space: pre-line; }
body.auth-mode #app { display: block; }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 10%, #1b3a5c 0, #0f1c2b 55%); }
.auth-card { width: 400px; max-width: 100%; background: #fff; border-radius: 16px; padding: 28px 30px 30px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.auth-brand { color: var(--ink); padding: 0 0 18px; border: 0; }
.auth-brand small { color: var(--muted); }
.auth-card h2 { font-size: 21px; margin-bottom: 4px; }
.auth-card > p { margin: 0 0 18px; font-size: 13px; }
.auth-btn { width: 100%; justify-content: center; margin-top: 6px; }
.auth-err { color: var(--danger); font-size: 13px; min-height: 18px; margin-bottom: 4px; }
.nav-head { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; color: #6f8399; padding: 14px 12px 4px; font-weight: 700; }
body.editor-mode .nav-head { display: none; }
.user-chip { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: rgba(255, 255, 255, .05); border-radius: 10px; padding: 8px 10px; cursor: pointer; color: #fff; font: inherit; text-align: left; }
.user-chip:hover { background: rgba(255, 255, 255, .1); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #2bb8f0, #0b6fc0); display: grid; place-items: center; font-weight: 700; flex: none; }
.user-txt b { display: block; font-size: 13px; line-height: 1.2; }
.user-txt small { color: var(--side-ink); font-size: 11.5px; }
body.editor-mode .sb-foot { display: block; padding: 10px 8px; }
body.editor-mode .user-txt { display: none; }
body.editor-mode .user-chip { justify-content: center; padding: 6px 0; }
.chip-admin { background: #1d3557; color: #fff; }
.info-cols { margin-bottom: 16px; }
.info-cols .form-card { padding-bottom: 12px; }
.info-cols h3 { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }

.dash-top { display: grid; grid-template-columns: minmax(280px, 1.2fr) 2fr; gap: 14px; margin-bottom: 18px; }
.hero-new { display: flex; align-items: center; gap: 16px; border: 0; border-radius: 14px; padding: 18px 22px; background: linear-gradient(135deg, #0b84d8, #0a5f9f); color: #fff; cursor: pointer; font: inherit; text-align: left; box-shadow: 0 10px 24px rgba(11, 132, 216, .3); transition: transform .15s, box-shadow .15s; }
.hero-new:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(11, 132, 216, .38); }
.hero-ic { width: 52px; height: 52px; border-radius: 14px; background: rgba(255, 255, 255, .18); display: grid; place-items: center; flex: none; }
.hero-new b { display: block; font-size: 19px; }
.hero-new small { opacity: .85; }
.stats.stats-2 { grid-template-columns: 1fr 1fr; margin: 0; }
.stats.stats-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.rev-badge { display: inline-block; font-size: 11px; font-weight: 700; color: #0a5f9f; background: #e3f0fc; border-radius: 10px; padding: 0 7px; vertical-align: 1px; }
.rev-link { display: block; border: 0; background: none; padding: 0; color: var(--pri); font: inherit; font-size: 12px; cursor: pointer; margin-top: 2px; }
.rev-link:hover { text-decoration: underline; }
.rev-current td { background: #f3fbf6; }
.rev-scale { background: #6b7280; padding: 12px; border-radius: 8px; overflow: hidden; }
.rev-preview { transform-origin: top left; }
.rev-preview .page { margin: 0 0 12px; }
.add-btn.add-terms { border-color: #b8d7f0; background: var(--pri-l); color: var(--pri-d); }

.terms-ed { display: flex; flex-direction: column; gap: 8px; max-height: 58vh; overflow: auto; padding-right: 4px; }
.term-row { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--line); border-radius: 9px; padding: 8px; background: #fafbfd; }
.term-fields { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.term-fields input { font-weight: 600; }
.term-acts { display: flex; flex-direction: column; }

.report-filters { padding: 14px 16px 2px; margin-bottom: 16px; }
.preset-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.preset { border: 1px solid var(--line2); background: #fff; border-radius: 20px; padding: 6px 13px; font: inherit; font-size: 13px; font-weight: 600; color: #3e4a5c; cursor: pointer; }
.preset:hover { border-color: var(--pri); color: var(--pri); }
.preset.on { background: var(--pri); border-color: var(--pri); color: #fff; }
.custom-range { display: flex; gap: 14px; margin-bottom: 12px; }
.custom-range label { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; }
.custom-range input { width: 170px; }
.report-period { display: flex; align-items: center; gap: 4px; font-weight: 700; margin-bottom: 10px; color: #0a4f82; }
.report-out .stat { padding: 14px 16px; }
.report-out .stat-v { font-size: 19px; }
.rep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; margin-bottom: 16px; }
.rep-card { padding: 14px 16px; }
.rep-card h3 { font-size: 14px; margin-bottom: 8px; }
.rep-card .data-table td, .rep-card .data-table th { padding: 7px 8px; }
.bar-cell { width: 28%; }
.bar { display: block; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #0b84d8, #2bb8f0); min-width: 2px; }
.total-row td { border-top: 2px solid #0f3557; background: #f6f8fb; }
@media (max-width: 1100px) { .dash-top { grid-template-columns: 1fr; } .stats.stats-5 { grid-template-columns: repeat(2, 1fr); } }.data-table td:nth-child(2) { white-space: nowrap; }

/* ===== login v2, executive chip, password banner ===== */
.chip-exec { background: #e3f0fc; color: #0a5f9f; }
.warn-txt { display: block; color: #b45309; font-size: 11.5px; margin-top: 2px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 40px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 32px; height: 30px; border: 0; background: transparent; color: var(--muted); cursor: pointer; border-radius: 6px; display: grid; place-items: center; }
.pw-eye:hover { background: #eef1f6; }
.auth-foot { margin: 14px 0 0; text-align: center; }
.pw-banner { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 900; display: flex; align-items: center; gap: 10px; background: #fff8e6; border: 1px solid #f5d48a; color: #7a4b00; padding: 10px 12px 10px 16px; border-radius: 12px; box-shadow: var(--shadow-l); max-width: min(760px, 94vw); font-size: 13.5px; }