/* Moply — style.css
   Drejtimi: "sapun dhe ujë". Bazë ftohtë-e-ndritshme, ngjyrë kryesore lagoon, dielli vetëm për veprimin kryesor. */
@font-face { font-family: "Bricolage"; src: url("../lib/fonts/bricolage.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../lib/fonts/figtree.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }

:root {
  --bg: #f2f7f9; --bg-soft: #e8f0f4; --surface: #ffffff; --ink: #10243a; --muted: #5a6b7c; --faint: #8795a3;
  --line: #e0e8ee; --line-strong: #c7d3dc;
  --primary: #0a8f9e; --primary-dark: #07707c; --primary-soft: #e0f3f5; --on-primary: #ffffff;
  --deep: #0c3b4e; --deep-2: #0a6f80;
  --sun: #ffb020; --sun-dark: #f09c00; --on-sun: #2d1c00;
  --danger: #d6393f; --danger-soft: #fdecec; --danger-line: #f6c4c6;
  --ok: #138a4b; --ok-soft: #e6f7ee; --ok-line: #bde8cf;
  --warn: #a65f00; --warn-soft: #fff4de; --warn-line: #f5d9a2;
  --info: #2f63c9; --info-soft: #e8f0fd; --info-line: #c3d6f7;
  --radius: 18px; --radius-md: 12px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16,36,58,.04), 0 8px 24px -12px rgba(16,36,58,.12);
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Bricolage", "Figtree", system-ui, sans-serif;
  --focus: rgba(10,143,158,.32);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1620; --bg-soft: #132633; --surface: #112331; --ink: #e8f1f7; --muted: #9db0c0; --faint: #70869a;
    --line: #1f3547; --line-strong: #2c4659;
    --primary: #2bb9c9; --primary-dark: #53cddb; --primary-soft: #12353f; --on-primary: #04222a;
    --deep: #0b2f40; --deep-2: #0c6577;
    --danger: #ff7b80; --danger-soft: #3a1b20; --danger-line: #6b2d34;
    --ok: #47d18a; --ok-soft: #12301f; --ok-line: #24583a;
    --warn: #f3b255; --warn-soft: #34270f; --warn-line: #6a4d17;
    --info: #7fa7f5; --info-soft: #15264a; --info-line: #29427a;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 28px -14px rgba(0,0,0,.6);
    --focus: rgba(43,185,201,.4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; line-height: 1.2; font-family: var(--display); letter-spacing: -.01em; }
h2 { font-size: 18px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; color: var(--muted); margin: 20px 0 8px; font-family: var(--font); letter-spacing: 0; }
a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
b, strong { font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }
.spacer { flex: 1; }
.boot { padding: 40px; text-align: center; color: var(--muted); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.num, .kpi-value, .sum-total strong, .profit-row strong, .sum-list dd, .hero-num { font-variant-numeric: tabular-nums; }

/* ---------- shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 252px; flex: none; background: var(--surface); border-right: 1px solid var(--line); padding: 22px 16px 18px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--display); font-weight: 800; font-size: 23px; letter-spacing: -.02em; color: var(--ink); padding: 0 8px 24px; }
.brand img { border-radius: 10px; }
a.brand { text-decoration: none; }
a.brand:hover { text-decoration: none; opacity: .88; }
a.brand:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 12px; }
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--radius-md); color: var(--muted); font-weight: 600; transition: background .15s, color .15s; }
.nav-link:hover { background: var(--bg); color: var(--ink); text-decoration: none; }
.nav-link.active { background: var(--primary-soft); color: var(--primary-dark); }
.nav-link.primary { order: -1; margin: 0 0 14px; justify-content: center; background: var(--sun); color: var(--on-sun); font-weight: 750; padding: 13px 12px; box-shadow: 0 6px 16px -8px rgba(240,156,0,.8); }
.nav-link.primary:hover { background: var(--sun-dark); color: var(--on-sun); }
.side-foot { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.biz-name { font-weight: 650; font-size: 14px; overflow-wrap: anywhere; }
.pill { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 3px 11px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); width: max-content; }
.pill:hover { text-decoration: none; filter: brightness(.97); }
.content { flex: 1; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 32px 6px; }
.topbar h1 { font-size: 28px; font-weight: 750; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
#top-new { display: none; }
main { padding: 14px 32px 56px; max-width: 1240px; outline: none; }
.tabbar { display: none; }

/* ---------- kartela ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 20px; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card > h2 { margin-bottom: 4px; }
.card > .muted { margin: 0 0 16px; }
.link { font-weight: 650; font-size: 14.5px; }
.link-strong { font-weight: 700; }

/* ---------- paneli: hero ---------- */
.hero { position: relative; overflow: hidden; border-radius: 24px; padding: 28px 30px 24px; margin-bottom: 20px; color: #fff;
  background: radial-gradient(520px 260px at 92% -10%, rgba(255,255,255,.16), transparent 60%), radial-gradient(380px 200px at 70% 120%, rgba(255,176,32,.22), transparent 65%), linear-gradient(135deg, var(--deep), var(--deep-2)); }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.18); pointer-events: none; }
.hero::before { width: 120px; height: 120px; right: 9%; top: 24px; }
.hero::after { width: 54px; height: 54px; right: 3%; top: 120px; border-color: rgba(255,255,255,.26); }
.hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-label { font-size: 15px; opacity: .82; font-weight: 550; }
.hero-num { font-family: var(--display); font-size: clamp(40px, 6vw, 62px); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; margin: 4px 0 6px; overflow-wrap: anywhere; }
.hero-num.neg { color: #ffb4b7; }
.hero-sub { font-size: 14.5px; opacity: .85; }
.hero .hero-cta { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.4); }
.hero .hero-cta:hover { background: rgba(255,255,255,.24); border-color: rgba(255,255,255,.7); }
.hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 24px 0 0; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.2); position: relative; z-index: 1; }
.hero-stats > div { padding: 0 16px; border-left: 1px solid rgba(255,255,255,.16); min-width: 0; }
.hero-stats > div:first-child { padding-left: 0; border-left: 0; }
.hero-stats dt { font-size: 13.5px; opacity: .75; font-weight: 550; }
.hero-stats dd { margin: 3px 0 0; font-family: var(--display); font-size: 22px; font-weight: 700; overflow-wrap: anywhere; }
.hero-stats small { display: block; font-family: var(--font); font-size: 12.5px; font-weight: 500; opacity: .72; margin-top: 2px; }

/* kërkon vëmendje */
.attn-list { display: grid; }
.attn { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 13px 0; border-top: 1px solid var(--line); }
.attn:first-child { border-top: 0; padding-top: 2px; }
.attn-main { min-width: 0; }
.attn-main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attn-why { font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.attn-why i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--sun-dark); margin-right: 7px; vertical-align: 1px; }
.attn-why i.red { background: var(--danger); } .attn-why i.blue { background: var(--info); }
.attn-actions { display: flex; gap: 6px; }
.attn-ok { display: flex; gap: 12px; align-items: center; color: var(--muted); padding: 6px 0; }
.attn-ok .ico { color: var(--ok); flex: none; }

/* ---------- kpi (raporte) ---------- */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.kpis.five { grid-template-columns: repeat(5, 1fr); }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; min-width: 0; }
.kpi-label { font-size: 14px; color: var(--muted); font-weight: 550; }
.kpi-value { font-family: var(--display); font-size: 26px; font-weight: 750; margin-top: 4px; letter-spacing: -.02em; overflow-wrap: anywhere; }
.kpi-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.kpi.good .kpi-value { color: var(--ok); }
.kpi.bad .kpi-value { color: var(--danger); }
.grid-2 { display: grid; grid-template-columns: 1.55fr 1fr; gap: 20px; align-items: start; }
.grid-2 > .card { margin-bottom: 20px; }
.grid-2 > .col { display: grid; gap: 20px; }
.grid-2 > .col > .card { margin-bottom: 0; }

/* grafik */
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .baseline { stroke: var(--line-strong); stroke-width: 1; }
.chart .axis { fill: var(--faint); font-size: 11px; font-family: var(--font); }
.chart .bar-a { fill: var(--primary); }
.chart .bar-b { fill: var(--sun); }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.legend .dot.a { background: var(--primary); } .legend .dot.b { background: var(--sun); }
.st-row { margin-bottom: 14px; } .st-row:last-child { margin-bottom: 0; }
.st-head { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.st-count { color: var(--muted); font-size: 13.5px; }
.st-val { margin-left: auto; font-weight: 700; font-size: 14.5px; }
.st-bar { height: 7px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; }
.st-bar span { display: block; height: 100%; border-radius: 999px; }
.st-bar .gray { background: var(--faint); } .st-bar .blue { background: var(--info); } .st-bar .green { background: var(--ok); } .st-bar .red { background: var(--danger); }

/* ---------- butona dhe fusha ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 650; font-size: 15px; padding: 11px 18px; min-height: 44px; border-radius: var(--radius-md); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer; transition: background .15s, border-color .15s, transform .08s; white-space: nowrap; }
.btn:hover { background: var(--bg); text-decoration: none; border-color: var(--faint); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: var(--on-primary); }
.btn-sun { background: var(--sun); border-color: var(--sun); color: var(--on-sun); }
.btn-sun:hover { background: var(--sun-dark); border-color: var(--sun-dark); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.92); background: var(--danger); }
.btn-danger-ghost { color: var(--danger); border-color: var(--danger-line); }
.btn-danger-ghost:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-sm { padding: 6px 13px; min-height: 36px; font-size: 14px; }
.btn.block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--primary-soft); color: var(--primary-dark); text-decoration: none; }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }
.input { width: 100%; font: inherit; padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); min-height: 46px; transition: border-color .15s, box-shadow .15s; }
.input::placeholder { color: var(--faint); }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--focus); }
.input:disabled { background: var(--bg-soft); color: var(--muted); }
textarea.input { resize: vertical; min-height: 76px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: 14px; font-weight: 650; color: var(--ink); }
.hint { color: var(--muted); font-size: 13px; line-height: 1.4; }
.hint .btn-link { font: inherit; font-weight: 650; color: var(--primary-dark); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.fields .span-2 { grid-column: span 2; }
.cell { min-width: 0; }
.input-wrap { position: relative; display: block; }
.input-wrap .input { padding-right: 66px; }
.input-wrap .suffix { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13.5px; pointer-events: none; }
.input-wrap .prefix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13.5px; pointer-events: none; }
.input-wrap .input.pre { padding-left: 68px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: center; }

/* kontroll segmentor */
.seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px; background: var(--bg-soft); border-radius: 14px; }
.seg label { cursor: pointer; display: block; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: 48px; text-align: center; line-height: 1.2; padding: 10px 12px; border-radius: 10px; font-weight: 650; font-size: 14.5px; color: var(--muted); transition: background .15s, color .15s, box-shadow .15s; }
.seg label:hover span { color: var(--ink); }
.seg input:checked + span { background: var(--surface); color: var(--primary-dark); box-shadow: 0 1px 2px rgba(16,36,58,.12), 0 4px 10px -4px rgba(16,36,58,.18); }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }
.seg.wide { grid-template-columns: repeat(2, minmax(0, 220px)); width: max-content; max-width: 100%; }

.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.chips.tight { margin-top: 4px; }
.chip { font: inherit; font-size: 14px; font-weight: 600; padding: 6px 13px; min-height: 34px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer; transition: background .15s, border-color .15s; }
.chip:hover { border-color: var(--primary); color: var(--primary-dark); background: var(--primary-soft); }

/* filtra me numërues */
.fchips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; margin: 0 -2px; scrollbar-width: none; }
.fchips::-webkit-scrollbar { display: none; }
.fchip { flex: none; font: inherit; font-weight: 650; font-size: 14.5px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--muted); cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.fchip b { font-size: 12.5px; background: var(--bg-soft); color: var(--muted); border-radius: 999px; padding: 1px 8px; font-weight: 700; }
.fchip:hover { color: var(--ink); border-color: var(--faint); }
.fchip.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.fchip.on b { background: rgba(255,255,255,.2); color: inherit; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; min-height: 46px; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 46px; height: 26px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 3px solid var(--focus); outline-offset: 2px; }
.switch-text { font-weight: 650; font-size: 14.5px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14.5px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); }
.extra-row { display: grid; grid-template-columns: 1fr 190px 40px; gap: 10px; margin-bottom: 10px; align-items: center; }

/* ---------- njoftime ---------- */
.banner { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid; margin-bottom: 18px; font-size: 14.5px; }
.banner > .ico { flex: none; margin-top: 1px; }
.banner > div:not(.banner-actions) { flex: 1; min-width: 0; }
.banner ul { margin: 6px 0 0; padding-left: 18px; }
.banner.warn { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn); }
.banner.info { background: var(--info-soft); border-color: var(--info-line); color: var(--info); }
.banner.bad { background: var(--danger-soft); border-color: var(--danger-line); color: var(--danger); }
.banner b { color: inherit; }
.banner-actions { display: flex; gap: 8px; flex: none; flex-wrap: wrap; }

/* ---------- tabela ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-size: 13px; font-weight: 650; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: color-mix(in srgb, var(--primary-soft) 45%, transparent); }
.table tr.clickable { cursor: pointer; }
.table tfoot td { font-weight: 750; border-top: 2px solid var(--line-strong); padding: 14px 16px; }
.table .num { text-align: right; white-space: nowrap; }
.table td:first-child { white-space: nowrap; }
.stack > .card { margin-bottom: 20px; min-width: 0; }
.table td.actions { white-space: nowrap; text-align: right; }
.sub { font-size: 13px; color: var(--muted); }
.neg { color: var(--danger); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 650; padding: 3px 11px 3px 9px; border-radius: 999px; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.gray { background: var(--bg-soft); color: var(--muted); } .badge.blue { background: var(--info-soft); color: var(--info); }
.badge.green { background: var(--ok-soft); color: var(--ok); } .badge.red { background: var(--danger-soft); color: var(--danger); }
.status-select { font: inherit; font-size: 13.5px; font-weight: 650; padding: 6px 10px; min-height: 34px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; }
.status-select.gray { background: var(--bg-soft); color: var(--muted); } .status-select.blue { background: var(--info-soft); color: var(--info); }
.status-select.green { background: var(--ok-soft); color: var(--ok); } .status-select.red { background: var(--danger-soft); color: var(--danger); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.toolbar .search { flex: 1; min-width: 220px; position: relative; }
.toolbar .search .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.toolbar .search .input { padding-left: 42px; }
.toolbar select.input { width: auto; }
.filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }

/* ---------- bosh ---------- */
.empty { text-align: center; padding: 56px 20px; max-width: 520px; margin: 24px auto; }
.empty-ico { width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-dark); display: grid; place-items: center; }
.empty h2 { font-size: 24px; margin-bottom: 8px; }
.empty p { color: var(--muted); margin: 0 0 22px; }
.empty-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.empty-mini { text-align: center; color: var(--muted); padding: 32px 16px; }
.card.empty-mini { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }

/* ---------- formulari i ofertës ---------- */
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; }
.form-side { position: sticky; top: 16px; }
.summary { margin-bottom: 0; background: var(--surface); }
.summary h2 { margin-bottom: 12px; }
.sum-total { display: flex; flex-direction: column; color: #fff; border-radius: 16px; padding: 16px 18px; margin: 0 0 12px; background: radial-gradient(300px 140px at 100% 0, rgba(255,255,255,.16), transparent 60%), linear-gradient(135deg, var(--deep), var(--deep-2)); position: relative; overflow: hidden; }
.sum-total::after { content: ""; position: absolute; width: 70px; height: 70px; right: 14px; top: -22px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.22); }
.sum-total span { font-size: 14px; opacity: .85; }
.sum-total strong { font-family: var(--display); font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; overflow-wrap: anywhere; }
.sum-list { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; font-size: 14.5px; }
.sum-list dt { color: var(--muted); } .sum-list dd { margin: 0; text-align: right; }
.summary h3 { margin: 18px 0 8px; padding-top: 14px; border-top: 1.5px dashed var(--line-strong); }
.profit { margin-top: 16px; padding: 14px 16px; border-radius: 16px; background: var(--bg-soft); border: 1px solid var(--line); }
.profit.good { background: var(--ok-soft); border-color: var(--ok-line); }
.profit.warn { background: var(--warn-soft); border-color: var(--warn-line); }
.profit.bad { background: var(--danger-soft); border-color: var(--danger-line); }
.profit-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.profit-row strong { font-family: var(--display); font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.profit-row.small { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.profit.good strong { color: var(--ok); } .profit.warn strong { color: var(--warn); } .profit.bad strong { color: var(--danger); }
.meter { position: relative; height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 12%, transparent); margin: 13px 0 9px; }
.meter-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--faint); transition: width .25s; }
.profit.good .meter-fill { background: var(--ok); } .profit.warn .meter-fill { background: var(--sun-dark); } .profit.bad .meter-fill { background: var(--danger); }
.meter-mark { position: absolute; top: -4px; width: 2px; height: 16px; background: var(--ink); border-radius: 2px; }
.profit-msg { font-size: 14px; font-weight: 650; }
.profit-sug { font-size: 13.5px; margin-top: 8px; line-height: 1.7; }
.form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.form-actions.sticky { position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(to top, var(--bg) 70%, transparent); z-index: 5; }
.sumbar { display: none; }
.logo-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.logo-prev { width: 160px; height: 80px; border: 1.5px dashed var(--line-strong); border-radius: 14px; display: grid; place-items: center; background: var(--surface); overflow: hidden; }
.logo-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; margin: 10px 0; font-size: 14.5px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }

/* ---------- dialog dhe toast ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(8,20,32,.55); display: grid; place-items: center; padding: 16px; z-index: 100; }
.modal { background: var(--surface); border-radius: 22px; padding: 24px; width: min(470px, 100%); box-shadow: 0 24px 70px rgba(0,0,0,.35); }
.modal h3 { font-size: 20px; color: var(--ink); margin: 0 0 10px; font-family: var(--display); }
.modal-body p { margin: 0 0 10px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.modal .input { margin-top: 6px; }
#toasts { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 8px; z-index: 200; max-width: min(420px, calc(100vw - 36px)); }
.toast { background: #10243a; color: #fff; padding: 13px 18px; border-radius: 14px; font-size: 14.5px; font-weight: 550; box-shadow: 0 10px 30px rgba(0,0,0,.3); transition: opacity .3s, transform .3s; }
.toast.ok { background: var(--deep-2); } .toast.error { background: #b3262c; }
.toast.out { opacity: 0; transform: translateY(8px); }

/* ---------- licenca ---------- */
.lic-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(600px 360px at 90% 0, rgba(255,255,255,.14), transparent 60%), linear-gradient(150deg, var(--deep), var(--deep-2)); }
.lic-card { background: var(--surface); width: min(450px, 100%); border-radius: 26px; padding: 34px 30px; display: grid; gap: 14px; text-align: center; box-shadow: 0 28px 80px rgba(0,0,0,.35); }
.lic-card img { margin: 0 auto; border-radius: 18px; }
.lic-card h1 { font-size: 32px; font-weight: 800; letter-spacing: -.03em; }
.lic-card .field { text-align: left; }
.lic-card p { margin: 0; }
.lic-err { color: var(--danger); font-size: 14px; text-align: left; }

/* ---------- përgjegjshmëria ---------- */
@media (max-width: 1100px) {
  .kpis.five { grid-template-columns: repeat(3, 1fr); }
  .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hide-md { display: none; }
}
@media (max-width: 980px) {
  .grid-2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-side { position: static; order: 2; }
  .sumbar { display: flex; align-items: center; gap: 14px; position: fixed; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line-strong); padding: 9px 16px; z-index: 40; }
  .sumbar > div { flex: 1; min-width: 0; line-height: 1.25; }
  .sumbar small { display: block; color: var(--muted); font-size: 12px; }
  .sumbar b { font-family: var(--display); font-size: 17px; font-weight: 750; font-variant-numeric: tabular-nums; }
  .sumbar .good b { color: var(--ok); } .sumbar .warn b { color: var(--warn); } .sumbar .bad b { color: var(--danger); }
  body.on-form main { padding-bottom: 160px; }
  body.on-form .tab-link.primary .ico { margin-top: 0; width: 28px; height: 28px; padding: 3px; background: none; color: inherit; box-shadow: none; border-radius: 0; }
}
@media (max-width: 820px) {
  .sidebar { display: none; }
  .topbar { padding: 16px 18px 4px; }
  .topbar h1 { font-size: 24px; }
  #top-new { display: none; }
  main { padding: 10px 16px 104px; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--line-strong); z-index: 50; padding-bottom: env(safe-area-inset-bottom); }
  .tab-link { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 0 8px; font-size: 12px; font-weight: 650; color: var(--muted); }
  .tab-link:hover { text-decoration: none; }
  .tab-link.active { color: var(--primary-dark); }
  .tab-link.primary .ico { background: var(--sun); color: var(--on-sun); width: 50px; height: 50px; padding: 13px; border-radius: 50%; margin-top: -24px; box-shadow: 0 8px 18px -6px rgba(240,156,0,.8), 0 0 0 5px var(--bg); }
  .tab-link.primary span { color: var(--muted); }
  .hero { border-radius: 22px; padding: 22px 20px 18px; }
  .hero::before { right: 14%; top: 14px; width: 84px; height: 84px; }
  .hero::after { display: none; }
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 16px 0; }
  .hero-stats > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .hero-stats dd { font-size: 19px; }
  .hero-cta { display: none; }
  .kpis, .kpis.five { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi { padding: 14px; } .kpi-value { font-size: 21px; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: 18px; border-radius: 20px; }
  .hide-sm { display: none; }
  .fields { grid-template-columns: 1fr; }
  .fields .span-2 { grid-column: auto; }
  .extra-row { grid-template-columns: 1fr 124px 38px; }
  .banner { flex-wrap: wrap; }
  .toolbar select.input { flex: 1; }
  #toasts { bottom: 84px; left: 16px; right: 16px; max-width: none; }
  .seg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seg.wide { width: 100%; }
  /* tabelat bëhen karta */
  .cards-sm thead { display: none; }
  .cards-sm, .cards-sm tbody, .cards-sm tr, .cards-sm td { display: block; width: 100%; }
  .cards-sm tbody tr { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .cards-sm td { grid-column: 1 / -1; }
  .cards-sm td[data-label="Nr."] { grid-column: 1; grid-row: 1; justify-content: flex-start; text-align: left; font-size: 13px; color: var(--muted); }
  .cards-sm td[data-label="Statusi"] { grid-column: 2; grid-row: 1; justify-content: flex-end; }
  .cards-sm td[data-label="Klienti"] { grid-column: 1; grid-row: 2; justify-content: flex-start; text-align: left; font-weight: 700; font-size: 16.5px; }
  .cards-sm td[data-label="Totali"] { grid-column: 2; grid-row: 2; justify-content: flex-end; font-family: var(--display); font-size: 18px; }
  .cards-sm td[data-label="Nr."]::before, .cards-sm td[data-label="Statusi"]::before, .cards-sm td[data-label="Klienti"]::before, .cards-sm td[data-label="Totali"]::before { content: none; }
  .cards-sm td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: right; }
  .cards-sm td::before { content: attr(data-label); color: var(--muted); font-size: 13px; font-weight: 600; text-align: left; flex: none; }
  .cards-sm td.actions { justify-content: flex-end; padding-top: 8px; flex-wrap: wrap; }
  .cards-sm tbody tr { position: relative; }
  .selecting .cards-sm tbody tr { padding-left: 52px; }
  .cards-sm td.sel-col { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: auto; padding: 0; grid-column: auto; }
  .cards-sm td.sel-col::before { content: none; }

  .cards-sm td.actions::before { content: none; }
  .cards-sm tfoot { display: none; }
  .cards-sm .sub { display: inline; margin-left: 6px; }
  .cards-sm td.hide-md, .cards-sm td.hide-sm { display: none; }
  .cards-sm td[data-label="Klienti"] .sub { display: none; }
}
@media (max-width: 420px) {
  .form-actions .btn { flex: 1; }
  .split { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .hero-num { font-size: 40px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print { .sidebar, .tabbar, .topbar, .sumbar { display: none !important; } }

.side-out { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 6px 2px; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; border-radius: 8px; }
.side-out:hover { color: var(--danger); }
.side-out:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---- zgjedhja e shumëfishtë ---- */
.btn-select.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.sel-col { width: 44px; padding-right: 0 !important; }
.sel-col input[type=checkbox], .cards-sm td.sel-col input { width: 22px; height: 22px; accent-color: var(--primary); cursor: pointer; margin: 0; }
tr.picked td { background: var(--primary-soft); }
.selecting tbody tr { cursor: pointer; }
.bulkbar { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 18px; background: var(--ink); color: var(--surface); border-radius: 16px; box-shadow: 0 14px 34px -10px rgba(16,36,58,.55); }
.bulkbar[hidden] { display: none; }
.bulk-count { font-weight: 700; font-size: 15px; margin-right: 6px; white-space: nowrap; }
.bulkbar .btn { min-height: 38px; }
.bulkbar .btn:not(.btn-danger) { background: rgba(255,255,255,.14); border-color: transparent; color: inherit; }
.bulkbar .btn:disabled { opacity: .45; cursor: not-allowed; }
.bulkbar .icon-btn { color: inherit; }
.bulkbar .icon-btn:hover { background: rgba(255,255,255,.16); color: inherit; }
body.has-bulk main#view { padding-bottom: 96px; }
.dlg-list { margin: 8px 0 12px; padding-left: 20px; display: grid; gap: 4px; }

.table td[data-label="Nr."] { white-space: nowrap; }
.table td.actions .icon-btn { width: 34px; height: 34px; }
.selecting .table th, .selecting .table td { padding-left: 10px; padding-right: 10px; }
.selecting .table td.sel-col, .selecting .table th.sel-col { padding-left: 14px; padding-right: 0; width: 40px; }
@media (max-width: 980px) {
  .bulkbar { bottom: calc(84px + env(safe-area-inset-bottom)); left: 12px; right: 12px; transform: none; justify-content: space-between; z-index: 60; }
  .bulkbar { gap: 6px; padding: 8px 6px 8px 14px; }
  .bulk-count { flex: 1; margin-right: 0; font-size: 14px; }
  .bulkbar .btn { padding-left: 11px; padding-right: 11px; font-size: 13.5px; }
  .cards-sm tr.picked { background: var(--primary-soft); }
  .cards-sm tr.picked td { background: transparent; }
  .cards-sm td[data-label="Nr."] { white-space: nowrap; }
  body.has-bulk main#view { padding-bottom: 150px; }
}
