@font-face { font-family: Arimo; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/arimo-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Arimo; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/arimo-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: Arimo; font-weight: 400; font-style: italic; font-display: swap; src: url(fonts/arimo-latin-400-italic.woff2) format('woff2'); }
@font-face { font-family: Arimo; font-weight: 700; font-style: italic; font-display: swap; src: url(fonts/arimo-latin-700-italic.woff2) format('woff2'); }

:root {
  --hdr1: #082A45; --hdr2: #1A5B87; --sub: #9CC0D8;
  --b1: #0F4166; --b2: #17557F; --b3: #206998; --b4: #2B7DB0;
  --ochre: #B5822C; --warn-bg: #FBF6EC; --warn-line: #EBDCBE; --warn-tx: #5E4715;
  --bg: #EEF3F7; --surface: #FFFFFF; --panel: #F4F8FB; --line: #DCE7EF; --line2: #C9D8E4;
  --text: #20364A; --title: #143A57; --muted: #728799;
  --focus: rgba(43, 125, 176, .28); --err: #B23B3B; --err-bg: #FBEDED;
  --shadow: 0 1px 2px rgba(8, 42, 69, .06), 0 6px 18px rgba(8, 42, 69, .07);
  --r: 10px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #08131D; --surface: #0F1E2C; --panel: #0C1925; --line: #1C3549; --line2: #27455E;
    --text: #D8E5EF; --title: #E6F0F8; --muted: #8DA3B5; --focus: rgba(43, 125, 176, .45);
    --warn-bg: #2A2112; --warn-line: #4E3D1E; --warn-tx: #E9D3A8; --err: #F08A8A; --err-bg: #3A1C1C;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #08131D; --surface: #0F1E2C; --panel: #0C1925; --line: #1C3549; --line2: #27455E;
  --text: #D8E5EF; --title: #E6F0F8; --muted: #8DA3B5; --focus: rgba(43, 125, 176, .45);
  --warn-bg: #2A2112; --warn-line: #4E3D1E; --warn-tx: #E9D3A8; --err: #F08A8A; --err-bg: #3A1C1C;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14.5px; line-height: 1.45; color: var(--text); background: var(--bg); min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
h1, h2, h3 { color: var(--title); margin: 0; }

/* ---------- appbar ---------- */
.appbar { position: sticky; top: 0; z-index: 30; background: linear-gradient(90deg, var(--hdr1), var(--hdr2)); color: #fff; box-shadow: 0 2px 10px rgba(8, 42, 69, .25); }
.appbar-in { max-width: 1480px; margin: 0 auto; height: 64px; padding: 0 16px; display: flex; align-items: center; gap: 12px; padding-top: env(safe-area-inset-top); }
.appbar-accent { position: absolute; left: 50%; bottom: 0; width: 80px; height: 4px; transform: translateX(-50%); background: linear-gradient(90deg, var(--b1), var(--b4)); border-radius: 4px 4px 0 0; }
.brand { display: flex; align-items: center; gap: 12px; background: none; border: 0; padding: 0; cursor: pointer; color: #fff; text-align: left; min-width: 0; }
.brand-mark { height: 38px; padding: 0 10px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; letter-spacing: .8px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25); font-size: 13.5px; flex: none; border-bottom: 3px solid #B5822C; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-title { font-weight: 700; font-size: 16px; }
.brand-sub { font-size: 11.5px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar-actions { margin-left: auto; display: flex; gap: 6px; }
.icon-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; min-width: 36px; padding: 0 9px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; }
.icon-btn:hover { background: rgba(255, 255, 255, .16); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn .lbl { font-size: 13px; }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; } :root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .i-sun { display: block; } :root:not([data-theme="light"]) .i-moon { display: none; } }

/* ---------- home ---------- */
.view { max-width: 1480px; margin: 0 auto; padding: 16px; }
#home { max-width: 1080px; padding-top: 36px; padding-bottom: 48px; }
.hero h1 { font-size: clamp(22px, 3.2vw, 30px); letter-spacing: -.2px; }
.hero p { margin: 8px 0 0; color: var(--muted); max-width: 640px; }
.doc-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 26px; }
.doc-card { position: relative; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 20px 18px; cursor: pointer; box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s ease; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.doc-card:hover { transform: translateY(-2px); border-color: var(--b4); }
.doc-card:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.doc-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(180deg, var(--b3), var(--b1)); }
.doc-ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.doc-card h3 { font-size: 19px; }
.doc-card .long { color: var(--muted); font-size: 13px; margin-top: -6px; }
.doc-card p { margin: 0; font-size: 13.5px; }
.doc-card .go { margin-top: 6px; display: flex; align-items: center; justify-content: space-between; color: var(--b3); font-weight: 600; font-size: 13.5px; }
.doc-card .go i { font-style: normal; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line); }
.chip { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; padding: 2px 8px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); color: var(--b3); }
.doc-card .chip { position: absolute; top: 18px; right: 18px; }
.draft-dot { font-size: 12px; color: var(--warn-tx); background: var(--warn-bg); border: 1px solid var(--warn-line); padding: 2px 8px; border-radius: 6px; align-self: flex-start; }
.home-note { margin-top: 22px; font-size: 12.5px; color: var(--muted); }

/* ---------- editor ---------- */
.ed-top { position: sticky; top: 64px; z-index: 20; background: var(--bg); margin: -16px -16px 0; padding: 12px 16px 10px; border-bottom: 1px solid var(--line); }
.ed-top-in { max-width: 1480px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.ed-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 0; }
.ed-title h2 { font-size: 20px; }
.ed-sub { color: var(--muted); font-size: 13px; }
.ed-top-actions { margin-left: auto; display: flex; gap: 8px; flex: none; }
.l-short { display: none; }
.ed-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 46%); gap: 20px; align-items: start; margin-top: 16px; }
.ed-form { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 16px 18px; box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-h h3 { font-size: 12px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--title); white-space: nowrap; }
.card-h::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.card-h .count { order: 3; font-size: 12px; color: var(--muted); font-weight: 600; }
.num { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; color: #fff; background: var(--b2); flex: none; }

.grid { display: grid; gap: 12px; }
.g4 { grid-template-columns: 0.8fr 1.4fr 0.8fr 0.8fr; }
.g2 { grid-template-columns: 1fr 1fr; }
.g1 { grid-template-columns: 1fr; }
.fld { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fld > span { font-size: 12.5px; font-weight: 600; color: var(--title); }
.fld em { color: var(--ochre); font-style: normal; }
.hint { font-size: 11.5px; color: var(--muted); }
input:not([type=checkbox]):not([type=radio]), select, textarea { width: 100%; height: 40px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--line2); background: var(--surface); outline: none; transition: border-color .12s, box-shadow .12s; }
textarea { height: auto; padding: 9px 11px; resize: vertical; min-height: 44px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 17px, calc(100% - 11px) 17px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 28px; }
select:disabled { opacity: .75; background-image: none; }
input:focus, select:focus, textarea:focus { border-color: var(--b4); box-shadow: 0 0 0 3px var(--focus); }
.invalid input, .invalid select, input.invalid, select.invalid { border-color: var(--err) !important; background: var(--err-bg); }
input[type=date] { padding-right: 6px; }

.nomor { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 10px 12px; border-radius: 8px; background: var(--panel); border: 1px dashed var(--line2); font-family: Tahoma, Arimo, sans-serif; font-size: 13.5px; }
.nomor .lab { color: var(--muted); margin-right: 6px; font-family: var(--font); font-size: 12px; font-weight: 600; }
.nomor b { display: inline-grid; place-items: center; min-width: 20px; height: 24px; padding: 0 5px; border: 1px solid var(--title); border-radius: 3px; background: var(--surface); font-weight: 600; }
.nomor b.empty { border-style: dashed; color: var(--muted); }
.nomor i { font-style: normal; color: var(--muted); padding: 0 1px; }

.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 3px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: 7px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg button[aria-checked="true"], .seg button[aria-selected="true"] { background: linear-gradient(180deg, var(--b3), var(--b2)); color: #fff; box-shadow: 0 1px 3px rgba(8, 42, 69, .25); }
.seg.sm button { padding: 6px 10px; font-size: 12.5px; }
.seg.wrap4 { display: grid; grid-template-columns: repeat(4, 1fr); }
#tglModeWrap input { margin-top: 6px; }

.auto-info { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.auto-info span { font-size: 12.5px; padding: 4px 10px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line); }
.auto-info span b { color: var(--title); }
#volModeWrap { margin-bottom: 12px; }

.items { display: flex; flex-direction: column; gap: 8px; }
.items-head, .item { display: grid; gap: 8px; align-items: start; }
.items-head { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; padding: 0 2px; }
.item { padding: 8px; border-radius: 9px; background: var(--panel); border: 1px solid var(--line); position: relative; }
.item .no { width: 26px; height: 40px; display: grid; place-items: center; font-weight: 700; color: var(--b3); }
.item .sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; min-height: 0; }
.item .sub.warn { color: var(--ochre); font-weight: 600; }
.item .del { width: 36px; height: 40px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.item .del:hover { color: var(--err); border-color: var(--line2); background: var(--surface); }
.item .del svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.item .mlabel { display: none; font-size: 11.5px; font-weight: 600; color: var(--muted); margin-bottom: 3px; }
.harsat { display: flex; gap: 6px; }
.harsat select { width: 112px; flex: none; }
.items-foot { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.totals { margin-left: auto; font-size: 13px; color: var(--muted); text-align: right; }
.totals b { color: var(--title); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 9px; border: 1px solid transparent; padding: 0 16px; height: 40px; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn.ghost { background: transparent; border-color: var(--line2); color: var(--title); }
.btn.ghost:hover { background: var(--panel); }
.btn.outline { background: var(--surface); border: 1px dashed var(--b4); color: var(--b3); }
.btn.outline:hover { background: var(--panel); }
.btn.outline:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { color: #fff; background: linear-gradient(180deg, var(--b3), var(--b1)); box-shadow: 0 2px 8px rgba(15, 65, 102, .3); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.primary:disabled { opacity: .6; cursor: progress; }
.btn.block { width: 100%; }
#btnExport { height: auto; min-height: 52px; padding: 8px 16px; flex-direction: column; gap: 1px; margin-top: 14px; }
#btnExport .btn-t { font-size: 15px; }
#btnExport .btn-s { font-size: 11.5px; font-weight: 500; opacity: .8; }
.linkbtn { background: none; border: 0; color: var(--b3); font-weight: 600; cursor: pointer; padding: 0; font-size: 13px; }

.switch-row { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.switch { position: relative; flex: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { display: block; width: 44px; height: 26px; border-radius: 13px; background: var(--line2); transition: background .15s; position: relative; }
.switch .knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
.switch input:checked + .track { background: var(--b3); }
.switch input:checked + .track .knob { transform: translateX(18px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px var(--focus); }
.switch-text { display: flex; flex-direction: column; }
.switch-text small { color: var(--muted); }
.ttd-thumb { margin-left: auto; height: 56px; padding: 4px 10px; background: #fff; border-radius: 8px; border: 1px solid var(--line); opacity: .45; transition: opacity .15s; }
.switch-row:has(input:checked) .ttd-thumb { opacity: 1; }

.fmt-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fmt { cursor: pointer; }
.fmt input { position: absolute; opacity: 0; }
.fmt-box { display: flex; flex-direction: column; gap: 2px; padding: 11px 12px 11px 38px; border-radius: 9px; border: 1px solid var(--line2); background: var(--surface); position: relative; min-height: 58px; }
.fmt-box::before { content: ""; position: absolute; left: 12px; top: 13px; width: 17px; height: 17px; border-radius: 5px; border: 1.5px solid var(--line2); background: var(--surface); }
.fmt input:checked + .fmt-box { border-color: var(--b4); background: var(--panel); }
.fmt input:checked + .fmt-box::before { background: var(--b3); border-color: var(--b3); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' stroke='white' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.fmt input:focus-visible + .fmt-box { box-shadow: 0 0 0 3px var(--focus); }
.fmt-box b { font-size: 14px; color: var(--title); }
.fmt-box small { font-size: 11.5px; color: var(--muted); }
.export-opts { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; }
.chk { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.chk input { width: 16px; height: 16px; accent-color: var(--b3); }
.fname { margin-top: 12px; display: flex; gap: 10px; align-items: baseline; font-size: 12.5px; flex-wrap: wrap; }
.fname > span { color: var(--muted); font-weight: 600; }
.fname code { font-family: Consolas, "SFMono-Regular", Menlo, monospace; font-size: 12.5px; background: var(--panel); border: 1px solid var(--line); padding: 3px 8px; border-radius: 6px; word-break: break-all; }
.callout { margin-top: 12px; font-size: 12.5px; padding: 9px 12px; border-radius: 8px; background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-tx); border-left: 4px solid var(--ochre); }
.callout:empty { display: none; }

/* preview */
.ed-preview { position: sticky; top: 132px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; box-shadow: var(--shadow); max-height: calc(100vh - 148px); display: flex; flex-direction: column; }
.pv-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.pv-status { margin-left: auto; font-size: 12px; color: var(--muted); }
.pv-paper { flex: 1; overflow: auto; background: #DCE3EA; border-radius: 8px; padding: 12px; min-height: 280px; }
:root[data-theme="dark"] .pv-paper { background: #050C13; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pv-paper { background: #050C13; } }
.pv-paper canvas { display: block; width: 100%; height: auto; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
.pv-note { margin: 8px 2px 0; font-size: 11.5px; color: var(--muted); }

.mobile-only { display: none; }
.mob-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 14px rgba(8, 42, 69, .08); }
.mob-bar .btn { height: 46px; font-size: 15px; }

/* modal & toast */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(4, 16, 27, .55); display: grid; place-items: center; padding: 16px; }
.modal-card { width: min(520px, 100%); background: var(--surface); border-radius: 14px; padding: 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); border: 1px solid var(--line); max-height: 90vh; overflow: auto; }
.modal-card h3 { font-size: 17px; margin-bottom: 10px; }
.modal-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.modal-card li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; }
.modal-card li .nm { flex: 1; overflow-wrap: anywhere; }
.modal-card li a { color: var(--b3); font-weight: 600; text-decoration: none; }
.modal-card li small { color: var(--muted); white-space: nowrap; }
.modal-card li .ext { font-size: 11px; font-weight: 700; color: #fff; background: var(--b2); border-radius: 5px; padding: 2px 6px; }
.modal-card p { margin: 0 0 12px; font-size: 13.5px; }
.modal-card .errs { margin: 0 0 6px; padding-left: 18px; font-size: 13.5px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; background: var(--title); color: var(--surface); padding: 10px 16px; border-radius: 10px; font-size: 13.5px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); max-width: calc(100% - 32px); }
.busy { position: fixed; inset: 0; z-index: 55; display: grid; place-items: center; background: rgba(4, 16, 27, .35); }
.busy div { background: var(--surface); padding: 16px 20px; border-radius: 12px; display: flex; gap: 12px; align-items: center; box-shadow: var(--shadow); }
.spin { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--line2); border-top-color: var(--b3); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- item layout desktop ---------- */
.items[data-cols="spprb-same"] .items-head, .items[data-cols="spprb-same"] .item { grid-template-columns: 26px minmax(0, 1.5fr) minmax(0, .8fr) minmax(0, 1.5fr) 36px; }
.items[data-cols="spprb-manual"] .items-head, .items[data-cols="spprb-manual"] .item { grid-template-columns: 26px minmax(0, 1.4fr) minmax(0, .75fr) minmax(0, .75fr) minmax(0, 1.5fr) 36px; }
.items[data-cols="disp"] .items-head, .items[data-cols="disp"] .item { grid-template-columns: 26px minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) 36px; }

@media (max-width: 1180px) {
  .ed-grid { grid-template-columns: 1fr; }
  .mobile-only { display: flex; }
  .seg.mobile-only { display: grid; grid-template-columns: 1fr 1fr; margin-top: 10px; width: 100%; }
  .ed-preview { position: static; max-height: none; }
  #editor[data-tab="form"] .ed-preview { display: none; }
  #editor[data-tab="preview"] .ed-form { display: none; }
  #editor { padding-bottom: 90px; }
  .export-card #btnExport { display: none; }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  .appbar-in { height: 56px; }
  .ed-top { top: 56px; }
  .brand-sub { display: none; }
  .brand-mark { height: 34px; padding: 0 8px; font-size: 12.5px; }
  .icon-btn .lbl { display: none; }
  .doc-cards { grid-template-columns: 1fr; gap: 12px; }
  .doc-card { min-height: 0; }
  #home { padding-top: 22px; }
  .g4 { grid-template-columns: 1fr 1fr; }
  .g2 { grid-template-columns: 1fr; }
  .ed-sub, #edKind, .l-long { display: none; }
  .l-short { display: inline; }
  .ed-title { flex-wrap: nowrap; min-width: 0; }
  .ed-title h2 { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ed-top { padding: 8px 16px; }
  .seg.mobile-only { margin-top: 8px; }
  .ed-top-actions .btn { height: 32px; font-size: 12.5px; }
  .card { padding: 14px 12px 16px; }
  .items-head { display: none; }
  .items .item { grid-template-columns: 1fr 1fr !important; padding: 10px 10px 12px; }
  .item .no { position: absolute; top: 6px; left: 8px; height: auto; width: auto; font-size: 12px; }
  .item .del { position: absolute; top: 2px; right: 2px; }
  .item .c-type, .item .c-harsat { grid-column: 1 / -1; }
  .item .c-type { margin-top: 20px; }
  .item .mlabel { display: block; }
  .seg.wrap4 { grid-template-columns: 1fr 1fr; }
  .fmt-row { grid-template-columns: 1fr; }
  .fmt-box { min-height: 0; flex-direction: row; align-items: baseline; gap: 8px; }
  .totals { margin-left: 0; text-align: left; width: 100%; }
  .items-foot .btn { width: 100%; }
  .switch-row { flex-wrap: wrap; }
  .ttd-thumb { height: 44px; }
  .pv-paper { padding: 6px; }
  .ed-top-actions .btn { padding: 0 9px; }
}
@media (max-width: 380px) { .g4 { grid-template-columns: 1fr; } }
