/* VersaLink CRM — brand: Midnight Navy #0C1F33, Fresh Aqua #26C6B8, Clean White #F8FAF9, Graphite #242A2E, Mist Grey #DCE3E5, Fresh Lime #B9E84A */
:root {
  --navy: #0C1F33; --navy-2: #13304d; --aqua: #26C6B8; --aqua-d: #179e92; --aqua-l: #e3f7f5; --bg: #F8FAF9; --card: #ffffff;
  --ink: #242A2E; --muted: #5d6b75; --line: #DCE3E5; --lime: #B9E84A; --red: #d64545; --red-l: #fdecec; --amber: #c98a0c; --amber-l: #fff5e0;
  --radius: 12px; --shadow: 0 1px 2px rgba(12,31,51,.06), 0 4px 14px rgba(12,31,51,.05);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--aqua-d); }
h1, h2, h3, h4 { margin: 0; color: var(--navy); letter-spacing: -.01em; }
h1 { font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
h3 { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 6px 0 2px; }
code { background: var(--aqua-l); color: var(--navy); padding: 1px 6px; border-radius: 5px; font-size: 12px; }
.muted { color: var(--muted); } .small { font-size: 12px; } .neg { color: var(--red); } .pos { color: var(--aqua-d); }
.row { display: flex; align-items: center; } .gap { gap: 8px; } .wrap { flex-wrap: wrap; } .between { justify-content: space-between; } .end { justify-content: flex-end; } .grow { flex: 1; }
.mt { margin-top: 12px; } .mb { margin-bottom: 12px; }
.ic { flex: none; }

/* Buttons & inputs */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; color: var(--navy); padding: 9px 14px; border-radius: 9px; font: 600 13px var(--font); cursor: pointer; white-space: nowrap; transition: .15s; }
.btn:hover { border-color: var(--navy); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-2); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red); }
.btn.wa { background: #1fa855; border-color: #1fa855; color: #fff; }
.btn.sm { padding: 6px 10px; font-size: 12px; }
.btn.block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.icon-btn { border: 0; background: transparent; color: var(--muted); padding: 6px; border-radius: 8px; cursor: pointer; position: relative; display: inline-flex; }
.icon-btn:hover { background: var(--aqua-l); color: var(--navy); }
input, select, textarea { font: 14px var(--font); color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--aqua); outline-offset: -1px; border-color: var(--aqua); }
input[type=checkbox] { width: auto; accent-color: var(--navy); }
input:disabled, select:disabled { background: #f1f4f5; }
label { font-weight: 600; font-size: 12px; color: var(--muted); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); font-size: 13px; cursor: pointer; }
.req { color: var(--red); margin-left: 3px; font-size: 11px; }
.hint { display: block; color: var(--muted); font-weight: 400; margin-top: 3px; font-size: 11.5px; }

/* Layout */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--navy); color: #c9d6e2; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: #fff; font-weight: 800; font-size: 16px; }
.brand img { height: 30px; max-width: 120px; object-fit: contain; }
.side nav { padding: 6px 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side nav a { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px; color: #c9d6e2; font-weight: 600; font-size: 13.5px; position: relative; }
.side nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side nav a.on { background: var(--aqua); color: var(--navy); }
.nb { background: var(--lime); color: var(--navy); font-size: 10.5px; font-weight: 800; border-radius: 10px; padding: 1px 6px; margin-left: auto; }
.bell .nb { position: absolute; top: -2px; right: -4px; background: var(--red); color: #fff; }
.side-foot { padding: 14px; border-top: 1px solid rgba(255,255,255,.08); display: grid; gap: 8px; }
.biz { background: var(--navy-2); color: #fff; border-color: transparent; font-weight: 700; }
.logout { color: #9fb1c2; display: flex; gap: 8px; align-items: center; font-size: 13px; }
.main { min-width: 0; }
.top { display: flex; align-items: center; gap: 10px; padding: 10px 24px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top-biz { font-weight: 800; color: var(--navy); }
.me { display: flex; align-items: center; gap: 8px; }
.av { width: 32px; height: 32px; border-radius: 50%; background: var(--aqua); color: var(--navy); display: grid; place-items: center; font-weight: 800; }
.me-t { display: flex; flex-direction: column; line-height: 1.2; } .me-t span { color: var(--muted); font-size: 11.5px; }
.avail { font-size: 11.5px; font-weight: 700; padding: 4px 9px; border-radius: 20px; }
.avail.on { background: var(--aqua-l); color: var(--aqua-d); } .avail.off { background: var(--amber-l); color: var(--amber); }
.mob { display: none; }
.scrim { display: none; }
.page { padding: 22px 24px 60px; max-width: 1400px; }
.page-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-h p { margin: 4px 0 0; max-width: 760px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.back { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card-h { display: flex; justify-content: space-between; align-items: baseline; }
.card.narrow { max-width: 620px; }
.warn-card { border-color: #f1d9a6; background: #fffbf2; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.grid-2 > .card, .col > .card { margin-bottom: 16px; }
.boot { min-height: 100vh; display: grid; place-items: center; gap: 18px; align-content: center; }
.boot img { height: 48px; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); border-top: 3px solid var(--navy); }
.kpi.aqua { border-top-color: var(--aqua); } .kpi.warn { border-top-color: var(--amber); }
.kpi-v { font-size: 22px; font-weight: 800; color: var(--navy); letter-spacing: -.02em; }
.kpi-l { font-size: 12px; color: var(--muted); font-weight: 600; } .kpi-s { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

/* Tables */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.card .table-wrap { border: 0; border-radius: 0; margin: 0 -18px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fbfcfc; white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid #edf1f2; vertical-align: top; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: #f3fbfa; }
.tbl tfoot td { font-weight: 800; background: #fbfcfc; border-top: 2px solid var(--line); }
.tbl .num { text-align: right; white-space: nowrap; } .tbl .act { white-space: nowrap; text-align: right; }
.clip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; } .clip.wide { max-width: 320px; }
.empty { padding: 36px; text-align: center; color: var(--muted); background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); }
.loading { padding: 40px; display: grid; place-items: center; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--aqua); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.list-sum { margin: 4px 0 8px; font-size: 12.5px; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 12px; }

/* Filters & tabs */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.filters > select, .filters > input { width: auto; }
.search { position: relative; display: flex; align-items: center; flex: 1; min-width: 220px; max-width: 360px; }
.search .ic { position: absolute; left: 10px; color: var(--muted); } .search input { padding-left: 34px; }
.range { display: flex; gap: 6px; align-items: center; } .range select, .range input { width: auto; }
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 14px; scrollbar-width: thin; }
.tab { border: 0; background: none; padding: 9px 12px; font: 600 13px var(--font); color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.tab.on { color: var(--navy); border-bottom-color: var(--aqua); }
.tab .n { background: #eef2f3; color: var(--ink); border-radius: 10px; padding: 0 7px; font-size: 11px; }
.tab.on .n { background: var(--aqua-l); color: var(--aqua-d); }

/* Badges & tags */
.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 700; white-space: nowrap; background: #eef2f3; color: var(--ink); }
.st-new { background: #e7eefc; color: #2552b8; } .st-pending { background: #eef2f3; color: #48555e; }
.st-not_available, .st-call_back, .st-follow_up { background: var(--amber-l); color: var(--amber); }
.st-confirmed { background: #e9f4ff; color: #1769aa; } .st-in_transit { background: #ece9ff; color: #5b45c4; } .st-rescheduled { background: #f3e8ff; color: #8a3fc2; }
.st-delivered { background: var(--aqua-l); color: #0f7d73; } .st-failed { background: var(--red-l); color: var(--red); } .st-returned { background: #fdf0e6; color: #b85c14; }
.st-rejected, .st-cancelled { background: #f1f1f1; color: #777; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 6px; background: #eef2f3; color: var(--ink); margin-left: 4px; }
.tag.warn { background: var(--amber-l); color: var(--amber); } .tag.ok { background: var(--aqua-l); color: #0f7d73; }
.overdue { color: var(--red); font-weight: 700; }

/* Order detail */
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed #e8edee; }
.kv > span:first-child { color: var(--muted); } .kv:last-child { border-bottom: 0; }
.kv.total { font-size: 15px; border-top: 2px solid var(--line); border-bottom: 0; margin-top: 4px; }
.status-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.st-btn { border: 1px solid transparent; border-radius: 9px; padding: 9px 8px; font: 700 12.5px var(--font); cursor: pointer; }
.st-btn:hover { filter: brightness(.96); border-color: currentColor; }
.timeline { margin-top: 12px; display: grid; gap: 10px; max-height: 420px; overflow-y: auto; }
.tl { display: flex; gap: 10px; } .tl-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--aqua); margin-top: 6px; flex: none; }
.hist { display: block; font-size: 12px; padding: 3px 0; }
.callout { background: #f3fbfa; border: 1px solid #c9eeea; border-radius: 10px; padding: 12px; }
.sell-block { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.sell-h { font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.seg button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 7px 10px; font: 600 12.5px var(--font); cursor: pointer; }
.seg button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.quick { display: flex; gap: 6px; flex-wrap: wrap; }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; align-items: start; }
.form-grid .full, .form-grid > h4, .form-grid > p, .form-grid > div.full { grid-column: 1 / -1; }
.field { display: grid; gap: 5px; } .field.full { grid-column: 1 / -1; }
.items { display: grid; gap: 8px; }
.item-row { display: flex; gap: 6px; align-items: center; }
.item-row > select:first-child { flex: 1.2; } .item-row > select { flex: 1; }
.w-sm { width: 80px !important; flex: none; } .w-md { width: 120px !important; flex: none; }
.totals { display: flex; gap: 16px; justify-content: flex-end; align-items: baseline; padding: 8px 0; flex-wrap: wrap; }
.totals strong { font-size: 17px; color: var(--navy); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 4px 10px; font: 600 12px var(--font); cursor: pointer; }
.chip.on { background: var(--aqua); border-color: var(--aqua); color: var(--navy); }
.code-box { background: #f3f6f7; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: 12px ui-monospace, Menlo, monospace; word-break: break-all; cursor: copy; }
.logo-prev { max-height: 60px; max-width: 200px; display: block; margin-bottom: 6px; } .mini-logo { height: 20px; vertical-align: middle; }
.steps { padding-left: 18px; display: grid; gap: 10px; margin: 0; }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(12,31,51,.45); display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal { background: #fff; border-radius: 14px; width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(12,31,51,.3); }
.modal.wide { width: min(860px, 100%); }
.modal-h { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-h h3 { margin: 0; }
.modal-b { padding: 16px 18px; overflow-y: auto; }
.modal-f { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }

/* Charts */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 190px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; min-width: 0; }
.bar { width: 100%; max-width: 44px; background: var(--aqua); border-radius: 6px 6px 2px 2px; }
.bar-col:last-child .bar { background: var(--navy); }
.bar-v { font-size: 10.5px; color: var(--muted); margin-bottom: 4px; white-space: nowrap; } .bar-l { font-size: 11px; color: var(--muted); margin-top: 6px; font-weight: 600; }
.stat-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.stat-row .badge { width: 110px; text-align: center; }
.meter { flex: 1; height: 8px; background: #eef2f3; border-radius: 6px; overflow: hidden; }
.meter > div { height: 100%; background: var(--aqua); border-radius: 6px; }
.st-bg-delivered { background: var(--aqua) !important; } .st-bg-cancelled, .st-bg-rejected { background: #aab4ba !important; } .st-bg-failed { background: var(--red) !important; } .st-bg-in_transit { background: #7b68e0 !important; } .st-bg-new { background: #4a7fe0 !important; }

/* Notifications & toasts */
.notif { display: block; padding: 10px; border-radius: 8px; border-bottom: 1px solid #eef2f3; color: var(--ink); }
.notif.unread { background: #f3fbfa; }
.toasts { position: fixed; bottom: 18px; right: 18px; display: grid; gap: 8px; z-index: 200; max-width: min(380px, calc(100vw - 36px)); }
.toast { background: var(--navy); color: #fff; padding: 11px 14px; border-radius: 10px; box-shadow: var(--shadow); font-weight: 600; font-size: 13px; border-left: 4px solid var(--aqua); }
.toast.err { border-left-color: var(--red); } .toast.warn { border-left-color: var(--amber); } .toast.info { border-left-color: var(--lime); }
.alert { background: var(--red-l); color: var(--red); border-radius: 9px; padding: 10px 12px; margin-bottom: 12px; font-weight: 600; }
.wa-list { display: grid; gap: 10px; } .wa-card { margin: 0; }
.wa-msg { white-space: pre-wrap; font: 13px var(--font); background: #f3f6f7; padding: 10px; border-radius: 8px; margin: 10px 0 0; }

/* Login */
.vlc-login-body { min-height: 100vh; }
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-brand { background: var(--navy); color: #c9d6e2; padding: 48px; display: flex; flex-direction: column; justify-content: center; gap: 14px; position: relative; overflow: hidden; }
.login-brand::after { content: ''; position: absolute; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(38,198,184,.35), transparent 70%); right: -120px; bottom: -120px; }
.login-brand h1 { color: #fff; font-size: 34px; } .login-brand p { margin: 0; font-size: 16px; max-width: 420px; }
.login-logo { height: 56px; max-width: 220px; object-fit: contain; align-self: flex-start; }
.login-foot { position: absolute; bottom: 24px; left: 48px; font-size: 12px; color: #8ea3b7; }
.login-card { display: flex; flex-direction: column; justify-content: center; padding: 48px; max-width: 460px; width: 100%; margin: 0 auto; gap: 14px; }
.login-card h2 { font-size: 24px; } .login-card form { display: grid; gap: 14px; } .login-card label { display: grid; gap: 6px; }
.login-card .check { display: flex; }

/* Invoice */
.invoice-wrap { padding: 24px; }
.invoice { background: #fff; max-width: 780px; margin: 0 auto; padding: 36px; border: 1px solid var(--line); border-radius: 12px; }
.inv-h { display: flex; justify-content: space-between; gap: 20px; border-bottom: 3px solid var(--navy); padding-bottom: 18px; margin-bottom: 18px; }
.inv-logo { max-height: 56px; max-width: 180px; margin-bottom: 8px; }
.inv-h h2 { font-size: 28px; color: var(--aqua-d); letter-spacing: .08em; } .inv-h .right { text-align: right; }
.inv-to { margin-bottom: 18px; } .inv-tbl { border: 1px solid var(--line); }
.inv-tbl .grand td { font-size: 16px; color: var(--navy); background: var(--aqua-l); }
body.print-mode .side, body.print-mode .top { display: none; }
body.print-mode .shell { display: block; }
@media print { .no-print, .side, .top, .toasts { display: none !important; } .shell { display: block; } .invoice { border: 0; } body { background: #fff; } }

/* Mobile */
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; z-index: 60; transform: translateX(-100%); transition: transform .2s; }
  .menu-open .side { transform: none; }
  .menu-open .scrim { display: block; position: fixed; inset: 0; background: rgba(12,31,51,.4); z-index: 50; }
  .mob { display: inline-flex; }
  .top { padding: 8px 12px; } .me-t, .avail { display: none; }
  .page { padding: 16px 16px 60px; }
  .grid-2, .form-grid { grid-template-columns: 1fr; }
  .login-wrap { grid-template-columns: 1fr; } .login-brand { padding: 32px 24px 48px; } .login-card { padding: 28px 16px; } .login-foot { left: 24px; bottom: 14px; }
  .search { max-width: none; min-width: 100%; }
  .filters > select, .range { flex: 1 1 140px; } .range { flex-wrap: wrap; }
  .item-row { flex-wrap: wrap; } .item-row > select { flex: 1 1 100%; }
  .tbl thead { display: none; } .tbl, .tbl tbody, .tbl tr, .tbl td, .tbl tfoot { display: block; width: 100%; }
  .tbl tr { border-bottom: 1px solid var(--line); padding: 8px 0; } .tbl td { border: 0; padding: 4px 12px; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .tbl td::before { content: attr(data-h); color: var(--muted); font-size: 11.5px; font-weight: 700; text-align: left; flex: none; }
  .tbl td[data-h=""]::before { content: none; } .tbl .num { text-align: right; } .tbl tfoot tr { display: none; }
  .clip { max-width: 200px; } .kpi-v { font-size: 19px; }
  .modal-bg { padding: 0; place-items: end center; } .modal { border-radius: 14px 14px 0 0; max-height: 92vh; }
}

/* kleniva-brand */
.brand{padding:20px 18px 16px}.brand img{height:auto;max-height:44px;max-width:180px}.brand span{display:none}
.login-logo{height:auto;max-height:96px;max-width:340px}
.boot{background:#0C1F33}.boot img{height:auto;max-width:220px}
