:root {
  --navy: #091b41;
  --logo-blue: #7997dd;
  --bg: #f2f4f9;
  --surface: #ffffff;
  --surface-2: #f6f8fc;
  --ink: #121a33;
  --muted: #5f6a85;
  --line: #e1e6f0;
  --brand: #3152a6;
  --brand-2: #23408a;
  --brand-soft: #e6ecfa;
  --accent: #d98b1e;
  --danger: #c2412d;
  --danger-soft: #fbe9e5;
  --ok: #2f8a4c;
  --ok-soft: #e4f4e8;
  --warn-soft: #fdf2df;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 25, 60, .06), 0 4px 16px rgba(15, 25, 60, .05);
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); font-size: 14px; line-height: 1.45; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Buttons & fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface); padding: 8px 14px;
  border-radius: 9px; cursor: pointer; font-weight: 600; font-size: 13.5px;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { border-color: #c8d1e4; background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { color: var(--danger); border-color: #efc4bb; }
.btn.danger:hover { background: var(--danger-soft); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 10px; font-size: 12.5px; }
.btn.block { width: 100%; padding: 11px; }

.field { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 12.5px; color: var(--muted); }
input, select, textarea {
  border: 1px solid var(--line); background: var(--surface); border-radius: 9px;
  padding: 9px 11px; font-size: 14px; font-weight: 400; outline: none; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
textarea { resize: vertical; min-height: 70px; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-brand {
  background: radial-gradient(circle at 20% 15%, #17326f 0, var(--navy) 50%, #050f27 100%);
  color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.login-brand > * { position: relative; z-index: 1; }
.brand-mark { position: absolute !important; z-index: 0 !important; right: -60px; bottom: -40px; width: 460px; height: auto; opacity: .09; pointer-events: none; }
.login-brand h1 em { font-style: normal; color: var(--logo-blue); }
.logo { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 20px; letter-spacing: .3px; }
.logo svg { flex: none; }
.login-brand h1 { font-size: 44px; margin-bottom: 14px; letter-spacing: -.5px; }
.login-brand p { opacity: .85; font-size: 16px; max-width: 440px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.chips span { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); padding: 6px 12px; border-radius: 99px; font-size: 13px; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.login-card { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 14px; }
.login-card h2 { font-size: 26px; }
.login-err { color: var(--danger); font-size: 13px; min-height: 18px; }
.demo { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 16px; }
.demo p { margin: 0 0 10px; color: var(--muted); font-size: 12.5px; }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.demo-chip {
  text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 10px;
  padding: 8px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 1px;
}
.demo-chip:hover { border-color: var(--brand); background: var(--brand-soft); }
.demo-chip b { font-size: 13px; }
.demo-chip span { font-size: 12px; color: var(--muted); font-family: ui-monospace, Menlo, monospace; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.nav-backdrop { display: none; position: fixed; inset: 0; background: rgba(5, 12, 30, .5); z-index: 35; }
.menu-btn { display: none; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; width: 40px; height: 40px; cursor: pointer; flex: none; }
.title-wrap { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sidebar {
  background: var(--navy); color: #c5d0ea; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; padding: 20px 14px;
}
.sidebar .logo { color: #fff; padding: 0 8px 20px; font-size: 17px; white-space: nowrap; }
@media (max-width: 1100px) { .sidebar .logo { font-size: 15.5px; gap: 10px; padding: 0 4px 18px; } }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: #8090b8; padding: 14px 10px 6px; }
.nav button {
  display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: inherit;
  padding: 9px 10px; border-radius: 8px; cursor: pointer; text-align: left; font-size: 13.5px; font-weight: 500;
}
.nav button:hover { background: rgba(121, 151, 221, .12); color: #fff; }
.nav button.active { background: var(--logo-blue); color: var(--navy); font-weight: 700; }
.nav button.active svg { opacity: 1; }
.nav button svg { width: 18px; height: 18px; flex: none; opacity: .9; }
.nav .count { margin-left: auto; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; }
.side-foot { border-top: 1px solid rgba(255,255,255,.08); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.side-foot button { background: transparent; border: 0; color: #8d9cc0; cursor: pointer; text-align: left; padding: 6px 10px; font-size: 12.5px; border-radius: 6px; }
.side-foot button:hover { color: #fff; background: rgba(121, 151, 221, .12); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 32px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5;
}
.topbar h1 { font-size: 21px; }
.topbar .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.user { display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 800; }
.user .who { display: flex; flex-direction: column; line-height: 1.2; }
.user .who b { font-size: 13.5px; }
.user .who span { font-size: 12px; color: var(--muted); }
.view { padding: 26px 32px 60px; display: flex; flex-direction: column; gap: 22px; }

/* ---------- Generic blocks ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card h3 { font-size: 15px; margin-bottom: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h3 { margin: 0; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sec { font-size: 15px; margin-top: 6px; }
.lead { margin: 0; color: var(--muted); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar input, .toolbar select { width: auto; min-width: 180px; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; cursor: pointer; font-weight: 600; font-size: 12.5px; color: var(--muted); }
.seg button.on { background: var(--brand); color: #fff; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.kpi span { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.kpi b { display: block; font-size: 23px; margin-top: 6px; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--muted); font-size: 12px; }
.kpi.pos b { color: var(--ok); }
.kpi.neg b { color: var(--danger); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; background: var(--surface-2); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8faff; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td .sub { display: block; color: var(--muted); font-size: 12px; }
.actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: nowrap; }
tfoot td { font-weight: 700; background: var(--surface-2); }

/* Badges */
.badge { display: inline-block; padding: 3px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.b-design { background: #efe7fb; color: #6b3fb3; }
.b-manager { background: #e2edfb; color: #2a5ea8; }
.b-production { background: var(--warn-soft); color: #a3600b; }
.b-warehouse { background: #e0f2f4; color: #1d7380; }
.b-done { background: var(--ok-soft); color: var(--ok); }
.b-red { background: var(--danger-soft); color: var(--danger); }
.b-gray { background: #eceeeb; color: var(--muted); }
.in { color: var(--ok); }
.out { color: var(--danger); }

/* Order cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }
.ocard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); }
.ocard > header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ono { font-family: ui-monospace, Menlo, monospace; font-weight: 700; font-size: 13px; margin-right: 6px; white-space: nowrap; }
.otype { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); }
.type-ico { width: 44px; color: var(--brand); }
.icon-pick { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.icon-pick select { min-width: 130px; }
.ocard h3 { font-size: 17px; }
.ocard p { margin: 2px 0 0; }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.kv div { background: var(--surface-2); border-radius: 8px; padding: 8px 10px; }
.kv dt { font-size: 11.5px; color: var(--muted); }
.kv dd { margin: 2px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.note { background: #fffaf0; border: 1px dashed #ecd3a5; border-radius: 8px; padding: 9px 11px; font-size: 13.5px; }
.note span { display: block; font-size: 11.5px; color: #a3741b; font-weight: 700; margin-bottom: 2px; }
.ocard footer { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.deadline { display: flex; align-items: center; justify-content: space-between; border-radius: 8px; padding: 9px 11px; background: var(--brand-soft); font-size: 13px; }
.deadline.late { background: var(--danger-soft); color: var(--danger); }
.deadline.soon { background: var(--warn-soft); color: #9a5a08; }
.stage-input { display: flex; flex-direction: column; gap: 8px; }
.info-line { font-size: 13px; background: var(--surface-2); border-radius: 8px; padding: 8px 10px; }
.info-line b { display: block; font-size: 11.5px; color: var(--muted); }

/* Tracker */
.tracker { display: flex; align-items: center; gap: 0; }
.tracker .st { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; font-size: 10.5px; color: var(--muted); text-align: center; }
.tracker .st::before { content: ""; position: absolute; top: 6px; left: -50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.tracker .st:first-child::before { display: none; }
.tracker .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); z-index: 1; }
.tracker .st.done .dot { background: var(--brand); border-color: var(--brand); }
.tracker .st.done::before, .tracker .st.cur::before { background: var(--brand); }
.tracker .st.cur .dot { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.tracker .st.cur { color: var(--ink); font-weight: 700; }

/* New order form */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.types { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.types label { border: 1.5px solid var(--line); border-radius: 10px; padding: 14px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 700; color: var(--ink); font-size: 14px; background: var(--surface); }
.types label svg { width: 34px; height: 34px; color: var(--muted); }
.types input { display: none; }
.types label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.types label:has(input:checked) svg { color: var(--brand); }
.total-box { display: flex; justify-content: space-between; align-items: center; background: var(--brand-soft); border-radius: 10px; padding: 14px 16px; }
.total-box b { font-size: 22px; color: var(--brand); font-variant-numeric: tabular-nums; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* Charts */
.bars { display: flex; align-items: flex-end; gap: 14px; height: 220px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.bar-pair { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
.bar { width: 40%; max-width: 28px; border-radius: 5px 5px 0 0; min-height: 2px; position: relative; }
.bar.inb { background: var(--brand); }
.bar.outb { background: #e3a957; }
.bar-col span { font-size: 12px; color: var(--muted); }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.hbars { display: flex; flex-direction: column; gap: 12px; }
.hbar .lbl { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; }
.hbar .lbl b { font-variant-numeric: tabular-nums; }
.hbar .track { height: 9px; background: var(--surface-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.hbar .fill { height: 100%; border-radius: 99px; background: var(--brand); }
.pipeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pipe { border-radius: 10px; padding: 12px; text-align: center; }
.pipe b { display: block; font-size: 24px; }
.pipe span { font-size: 12px; font-weight: 600; }

/* Finance modal */
.fin-head { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fin-head div { background: var(--surface-2); border-radius: 8px; padding: 10px; }
.fin-head span { display: block; font-size: 11.5px; color: var(--muted); }
.extras-list { display: flex; flex-direction: column; gap: 6px; }
.extras-list .ex { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--surface-2); border-radius: 8px; padding: 7px 10px; }
.row { display: flex; gap: 8px; }
.row input { flex: 1; }
.profit-box { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.profit-box div { border-radius: 10px; padding: 12px; background: var(--brand-soft); }
.profit-box span { display: block; font-size: 12px; color: var(--muted); }
.profit-box b { font-size: 18px; font-variant-numeric: tabular-nums; }
.profit-box .neg { background: var(--danger-soft); }
.profit-box .neg b { color: var(--danger); }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(9, 20, 45, .5); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; z-index: 50; overflow-y: auto; animation: fade .15s; }
.modal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 640px; box-shadow: 0 20px 60px rgba(0,0,0,.25); animation: pop .18s; }
.modal-h { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-h h3 { font-size: 17px; }
.modal-h button { border: 0; background: transparent; font-size: 22px; cursor: pointer; color: var(--muted); line-height: 1; }
.modal-b { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 4px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 18px; }
.detail-grid div span { display: block; font-size: 11.5px; color: var(--muted); }
.history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; border-left: 2px solid var(--line); margin-left: 6px; }
.history li { padding-left: 14px; position: relative; font-size: 13px; }
.history li::before { content: ""; position: absolute; left: -6px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.history li small { color: var(--muted); display: block; }

#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 10px; font-weight: 600; opacity: 0; pointer-events: none; transition: .25s; z-index: 60; max-width: calc(100% - 32px); }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Menýu toparlary */
.nav-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: .8px; color: #7484ad; padding: 12px 10px 4px; border-top: 1px solid rgba(121, 151, 221, .14); margin-top: 6px; }
.nav-label + .nav-group { border-top: 0; margin-top: 0; }

/* Baglanyşyk görnüşli düwme (müşderi, işgär ady) */
.link { border: 0; background: none; padding: 0; color: var(--ink); font-weight: 700; cursor: pointer; text-align: left; font-size: inherit; }
.link:hover { color: var(--brand); text-decoration: underline; }
code { font-family: ui-monospace, Menlo, monospace; background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; font-size: 12.5px; }

/* Şahsy sahypa / müşderi sahypasy */
.profile-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; flex: none; }
.ph-info { flex: 1; min-width: 220px; }
.ph-info h2 { font-size: 22px; }
.ph-info p { margin: 4px 0 0; }
.ph-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.fg4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; align-items: end; }
.fg2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.info-box { background: var(--surface-2); border-radius: 10px; padding: 12px 14px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.info-box span { display: block; font-size: 11.5px; color: var(--muted); }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--brand-soft); color: var(--brand-2); border-radius: 99px; padding: 6px 12px; font-size: 13px; }
.b-pay-salary { background: var(--ok-soft); color: var(--ok); }
.b-pay-advance { background: #e2edfb; color: #2a5ea8; }
.b-pay-bonus { background: #efe7fb; color: #6b3fb3; }

/* Önümçilik gapjygy */
.wallet-hero { background: linear-gradient(135deg, #24478f, var(--navy) 60%, #050f27); color: #fff; border-radius: var(--radius); padding: 24px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; box-shadow: var(--shadow); }
.wallet-hero span { display: block; opacity: .8; font-size: 13px; }
.wallet-hero > div > b { display: block; font-size: 34px; letter-spacing: -.5px; font-variant-numeric: tabular-nums; margin-top: 4px; }
.wh-stats { display: flex; gap: 24px; flex-wrap: wrap; }
.wh-stats b { font-size: 17px; font-variant-numeric: tabular-nums; }

.empty { text-align: center; padding: 40px 16px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); grid-column: 1 / -1; }
.low { color: var(--danger); font-weight: 700; }
.stock-ctrl { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.stock-ctrl input { width: 90px; padding: 6px 8px; }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: 1fr; }
  .shell { grid-template-columns: 215px minmax(0, 1fr); }
  .sidebar { padding: 18px 10px; }
  .nav button { font-size: 13px; padding: 8px 9px; gap: 9px; }
}
/* Telefonda menýu gapdaldan çykýar */
@media (max-width: 640px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; height: 100vh; width: 260px; z-index: 40;
    transform: translateX(-100%); transition: transform .22s ease;
  }
  .shell.nav-open .sidebar { transform: none; box-shadow: 4px 0 24px rgba(0,0,0,.25); }
  .shell.nav-open .nav-backdrop { display: block; }
  .menu-btn { display: inline-flex; }
}
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login-brand { padding: 32px 20px; gap: 24px; }
  .login-brand h1 { font-size: 30px; }
  .topbar { padding: 14px 16px; }
  .view { padding: 18px 16px 48px; }
  .g2, .form-grid { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: 1fr; }
  .user .who { display: none; }
}
@media (max-width: 480px) {
  .kpis { grid-template-columns: 1fr; }
  .demo-grid, .fin-head, .profit-box, .detail-grid, .info-box, .fg2 { grid-template-columns: 1fr; }
  .types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Duýduryş setiri */
.banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--warn-soft); border: 1px solid #f0d6a8; color: #8a5300; border-radius: var(--radius); padding: 12px 16px; font-weight: 600; font-size: 13.5px; }

/* Bildirişler (jaň) */
.bell-wrap { position: relative; }
.bell { position: relative; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.bell:hover { background: var(--surface-2); color: var(--ink); }
.bell.has { color: var(--brand); border-color: #c9d5f2; }
.bell-count { position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface); }
.bell-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 390px; max-width: calc(100vw - 32px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 48px rgba(9, 20, 45, .18); z-index: 30; overflow: hidden; animation: pop .15s; }
.bp-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.bp-list { max-height: 420px; overflow-y: auto; }
.bp-item { display: flex; gap: 10px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 12px 16px; cursor: pointer; font-size: 13.5px; color: var(--ink); }
.bp-item:last-child { border-bottom: 0; }
.bp-item:hover { background: var(--surface-2); }
.bp-item.unread { background: #f1f5ff; }
.bp-item.unread .bp-text { font-weight: 600; }
.bp-item small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.bp-item .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex: none; }
.dot-design { background: #6b3fb3; }
.dot-manager { background: #2a5ea8; }
.dot-production { background: #d98b1e; }
.dot-warehouse { background: #1d7380; }
.dot-done { background: var(--ok); }
.bp-empty { padding: 28px 16px; text-align: center; color: var(--muted); }
.bp-foot { padding: 10px 16px; border-top: 1px solid var(--line); }
@media (max-width: 640px) {
  .bell-panel { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; max-width: none; }
}

/* Serwer wersiýasy: jerimeler, faýllar, ýalňyşlyk habarlary */
.kpis.k5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.b-pay-fine { background: var(--danger-soft); color: var(--danger); }
.dot-fine, .dot-fined { background: var(--danger); }
.dot-waived { background: var(--muted); }
.warn-text { margin: 0; font-size: 12.5px; color: var(--danger); font-weight: 600; }
.file-link { color: var(--brand); word-break: break-all; }
#toast.err { background: var(--danger); }
body.busy, body.busy .btn { cursor: progress; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.seg button[type="button"] { font: inherit; font-weight: 600; font-size: 12.5px; }
.boot-err { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 16px; text-align: center; }
@media (max-width: 1100px) { .kpis.k5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .kpis.k5 { grid-template-columns: 1fr; } }
