@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@500;600&display=swap");
/* ===== Dizayn tokenlari ===== */
:root {
    --bg: #f4f5f8;
    --surface: #fff;
    --border: #e3e6ee;
    --text: #141a2b;
    --text-2: #6b7390;
    --primary: #2456e6;
    --primary-hover: #1b43b8;
    --primary-soft: #e8edfb;
    --danger: #dc2626;
    --danger-soft: #fef2f2;
    --success: #16a34a;
    --success-soft: #f0fdf4;
    --warning: #d97706;
    --sidebar: #0e1424;
    --sidebar-hover: #151d35;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .06);
    --shadow-pop: 0 8px 24px rgba(16, 24, 40, .14);
    --control-h: 38px;
    --content-max: 1600px;
    --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
[x-cloak] { display: none !important; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; background: var(--bg); color: var(--text); font-variant-numeric: tabular-nums; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 26px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; margin: 0; }
h3 { font-size: 15px; margin: 0 0 12px; }
.muted { color: var(--text-2); }
.icon { width: 20px; height: 20px; flex-shrink: 0; }
.icon-sm { width: 16px; height: 16px; }

/* ===== Layout ===== */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 248px; flex-shrink: 0; background: var(--sidebar); color: #cbd5e1; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 20px 18px 22px; color: #fff; font-weight: 600; font-size: 15px; text-decoration: none; }
.sidebar .brand .logo { width: 34px; height: 34px; border-radius: 9px; background: var(--primary); display: flex; align-items: center; justify-content: center; }
.sidebar nav { flex: 1; padding: 8px 12px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.sidebar nav a { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); color: #cbd5e1; text-decoration: none; }
.sidebar nav a:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar nav a.active { background: #1b2542; color: #fff; font-weight: 600; }
.sidebar nav a.active::before { content: none; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
.sidebar .user { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-top: 1px solid #1d2640; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sidebar .user .who { min-width: 0; flex: 1; }
.sidebar .user .name { display: block; color: #fff; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar .user button { background: none; border: 0; padding: 0; color: #94a3b8; font: inherit; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.sidebar .user button:hover { color: #fff; }
.main-col { flex: 1; min-width: 0; }
.container { width: 100%; max-width: var(--content-max); margin: 0 auto; padding: 32px 40px; }
.topbar { display: none; position: sticky; top: 0; z-index: 30; background: var(--sidebar); color: #fff; padding: 10px 16px; align-items: center; gap: 12px; }
.topbar button { background: none; border: 0; color: #fff; padding: 4px; cursor: pointer; display: flex; }
.overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 39; }

/* ===== Sahifa sarlavhasi ===== */
.page-header, .page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-header .actions { display: flex; gap: 8px; align-items: center; }
.page-header .title { display: flex; align-items: center; gap: 12px; }

/* ===== Kartochka ===== */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; }
.card-header { padding: 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.card-body { padding: 16px; }
.card-footer { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.card:not(:has(.card-body, .card-header, .card-footer)) { padding: 16px; }
.card.table-wrap { padding: 0; }
.card.table-wrap > h3 { padding: 16px 16px 0; }
.card.grand { padding: 16px; }
.card.block { border-left: 4px solid var(--c, var(--primary)); }

/* ===== Tugmalar ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--control-h); padding: 0 18px; border: 1px solid transparent; border-radius: var(--radius-sm); font: inherit; font-weight: 500; cursor: pointer; text-decoration: none; background: var(--primary); color: #fff; white-space: nowrap; transition: background .15s; }
.btn:hover { background: var(--primary-hover); text-decoration: none; }
.btn:disabled { opacity: .6; cursor: default; }
.btn-primary, .btn-success { background: var(--primary); color: #fff; }
.btn-secondary, .btn-light { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover, .btn-light:hover { background: #f3f4f6; }
.btn-danger-ghost, .btn-danger { background: transparent; color: var(--danger); }
.btn-danger-ghost:hover, .btn-danger:hover { background: var(--danger-soft); }
.btn-sm { height: 32px; padding: 0 10px; font-size: 13px; }
.btn-dashed { width: 100%; background: transparent; color: var(--text-2); border: 1px dashed #cbd5e1; margin-bottom: 16px; }
.btn-dashed:hover { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }

/* ===== Forma ===== */
.label, label { display: block; font-size: 13px; font-weight: 500; color: #4b5563; margin-bottom: 4px; }
.input, .select, .textarea,
input[type=text], input[type=date], input[type=number], input[type=email], input[type=password], select, textarea {
    width: 100%; height: var(--control-h); padding: 0 12px; border: 1px solid #d1d5db; border-radius: var(--radius-sm);
    font: inherit; color: var(--text); background: var(--surface);
}
.textarea, textarea { height: auto; min-height: 72px; padding: 8px 12px; resize: vertical; }
.select, select { padding-right: 8px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .2); }
input[readonly] { background: #f3f4f6; font-weight: 700; text-align: right; }
.is-invalid { border-color: var(--danger) !important; }
.field-error { color: var(--danger); font-size: 13px; line-height: 1.3; min-height: 1.3em; margin-top: 4px; }
input[type=checkbox] { width: 16px; height: 16px; }

/* ===== Badge ===== */
.badge, .tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eef2f7; color: #374151; white-space: nowrap; }
.badge-primary { background: var(--primary-soft); color: var(--primary); }
.badge-danger, .tag-shipment { background: var(--danger-soft); color: var(--danger); }
.badge-success, .tag-payment { background: var(--success-soft); color: var(--success); }
.badge-warning { background: #fffbeb; color: var(--warning); }
.badge-plate { font-family: var(--mono); letter-spacing: .03em; background: #fff; border: 1px solid #d1d5db; border-radius: 6px; color: var(--text); }

/* ===== Jadval ===== */
.table-wrap { overflow-x: auto; }
.table, table { width: 100%; border-collapse: collapse; }
.table th, table th { text-align: left; padding: 10px 16px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); font-weight: 600; background: #f9fafb; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td, table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td, table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover, table tbody tr:hover { background: #f9fafb; }
.num { text-align: right !important; white-space: nowrap; }
tr.clickable { cursor: pointer; }
.pay-row td { vertical-align: top; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.row-go { width: 32px; color: #9ca3af; }

/* ===== Alert ===== */
.alert { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; border: 1px solid transparent; }
.alert .alert-body { flex: 1; }
.alert-success { background: var(--success-soft); color: #166534; border-color: #bbf7d0; }
.alert-error { background: var(--danger-soft); color: #991b1b; border-color: #fecaca; }
.alert-error ul { margin: 0; padding-left: 18px; }
.alert-close { background: none; border: 0; color: inherit; opacity: .6; cursor: pointer; font-size: 20px; line-height: 1; padding: 0; }
.alert-close:hover { opacity: 1; }

/* ===== Bo'sh holat ===== */
.empty-state { text-align: center; padding: 48px 16px; color: var(--text-2); }
.empty-state .icon { width: 40px; height: 40px; color: #9ca3af; margin-bottom: 8px; }
.empty-state p { margin: 0 0 16px; }

/* ===== Balans ===== */
.bal { font-weight: 600; white-space: nowrap; }
.bal-debt { color: var(--danger); }
.bal-advance { color: var(--success); }
.bal-zero { color: var(--text-2); }
.bal-lg { font-size: 26px; }
.bal small { font-weight: 500; margin-left: 4px; }

/* ===== Modal ===== */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: var(--surface); border-radius: var(--radius); padding: 20px; width: 100%; max-width: 420px; box-shadow: var(--shadow-pop); }

/* ===== Umumiy yordamchilar ===== */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.grid .full { grid-column: 1 / -1; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.block-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding: 0 16px 16px; }
.sum { font-weight: 700; }
.grand { display: flex; justify-content: space-between; align-items: center; font-size: 18px; }

/* ===== Autocomplete ===== */
.ac { position: relative; }
.ac ul { position: absolute; z-index: 60; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-pop); max-height: 260px; overflow-y: auto; }
.ac li { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.ac li:hover, .ac li.active { background: var(--primary-soft); }
.ac li.ac-empty { flex-direction: row; justify-content: space-between; align-items: center; gap: 12px; cursor: default; color: var(--text-2); }
.ac li.ac-empty:hover { background: transparent; }
.ac li.ac-empty a { color: var(--primary); font-weight: 500; white-space: nowrap; }
.ac-invalid .input { border-color: var(--danger) !important; }
.pc-form { max-width: 720px; }
.pc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.pc-grid .pc-wide { grid-column: 1 / -1; }
.pc-grid .seg { max-width: 200px; }
.pc-grid input[readonly] { background: #f1f3f8; color: var(--text-2); }
.pc-summary { margin-top: 16px; padding: 12px 14px; background: var(--primary-soft); border-radius: var(--radius-sm); display: grid; gap: 4px; font-size: 14px; }
.pc-actions { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
@media (max-width: 640px) { .pc-grid { grid-template-columns: 1fr; } }
.ac li small { color: var(--text-2); font-size: 12px; }

/* ===== Yuk formasi ===== */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.info-grid .k { font-size: 12px; color: var(--text-2); margin-bottom: 2px; }
.info-grid .v { font-weight: 600; }
.block-head { display: grid; grid-template-columns: 36px 2fr 1fr auto; gap: 12px; align-items: end; padding: 16px; border-bottom: 1px solid var(--border); }
.num-dot { width: 32px; height: 32px; border-radius: 50%; background: var(--c, var(--primary)); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-bottom: 3px; }
.block-head .trash-slot { width: 36px; }
.items { padding: 12px 16px 0; }
.items-head, .item-row { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1.5fr) 36px; gap: 8px; align-items: center; }
.items-head { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); font-weight: 600; padding-bottom: 6px; }
.item-row { margin-bottom: 8px; }
.item-row .cell-label { display: none; }
.sticky-bar { width: 100%; position: sticky; bottom: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 -2px 12px rgba(16, 24, 40, .08); }
.sticky-bar .total-label { font-size: 12px; color: var(--text-2); }
.sticky-bar .total-value { font-size: 22px; font-weight: 700; }
.sticky-bar .actions { display: flex; gap: 8px; }
.form-pad { padding-bottom: 96px; }
.grand-box { display: flex; justify-content: space-between; align-items: center; padding: 20px; background: var(--sidebar); color: #fff; border-radius: var(--radius); }
.grand-box .v { font-size: 26px; font-weight: 700; }

/* ===== Pagination ===== */
.pager { padding: 12px 16px; }
.pager:empty { display: none; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pagination .pages { display: flex; gap: 4px; flex-wrap: wrap; }
.pagination .page, .pagination .step { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); text-decoration: none; }
.pagination a.page:hover, .pagination a.step:hover { background: #f3f4f6; text-decoration: none; }
.pagination .page.current { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.pagination .disabled { color: #9ca3af; background: #f9fafb; }
.pagination .info { color: var(--text-2); font-size: 13px; }

/* ===== Kirish sahifasi ===== */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.auth-wrap .card { width: 100%; max-width: 400px; padding: 24px; margin: 0; }
.auth-wrap h1 { text-align: center; margin-bottom: 20px; }
.field { margin-bottom: 16px; }
.check { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.check label { margin: 0; }
.btn-block { width: 100%; }

/* ===== Mobil ===== */
@media (max-width: 900px) {
    .sidebar { position: fixed; z-index: 40; top: 0; bottom: 0; left: 0; height: auto; transform: translateX(-100%); transition: transform .2s; }
    .sidebar.open { transform: none; }
    .topbar { display: flex; }
    .container { padding: 16px; }
    .grid-3, .grid-2 { grid-template-columns: 1fr; }

    .block-head { grid-template-columns: 36px 1fr auto; }
    .block-head .phone { grid-column: 1 / -1; order: 5; }
    .items-head { display: none; }
    .item-row { grid-template-columns: 1fr 1fr; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px dashed var(--border); }
    .item-row .cell-label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 2px; }
    .item-row .c-product { grid-column: 1 / -1; }
    .item-row .c-remove { grid-column: 1 / -1; justify-self: end; }

    /* Jadval -> kartochkalar */
    .table-cards, .table-cards tbody { display: block; }
    .table-cards thead { display: none; }
    .table-cards tr { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "date total" "driver driver" "plate plate" "sup sup"; gap: 4px 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
    .table-cards tr:last-child { border-bottom: 0; }
    .table-cards td { display: block; padding: 0; border: 0; }
    .table-cards .c-date { grid-area: date; font-weight: 600; }
    .table-cards .c-total { grid-area: total; font-weight: 700; }
    .table-cards .c-driver { grid-area: driver; }
    .table-cards .c-plate { grid-area: plate; }
    .table-cards .c-sup { grid-area: sup; }
    .table-cards .c-go { display: none; }
    .sticky-bar .actions { width: 100%; }
    .sticky-bar .actions .btn { flex: 1; }
}

.grid-3 .span-2 { grid-column: span 2; }
@media (max-width: 900px) { .grid-3 .span-2 { grid-column: auto; } }
.card > .block-foot { padding: 0; }
.card:not(:has(.card-body, .card-header, .card-footer)) > .table-wrap .table th:first-child,
.card:not(:has(.card-body, .card-header, .card-footer)) > .table-wrap .table td:first-child { padding-left: 0; }
.table .c-date a { color: inherit; }
/* ===== Filter toolbar (Yuklar, Ta'minotchilar, Mahsulotlar) ===== */
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 12px; position: relative; }
.filter-bar .field-error { flex-basis: 100%; margin-top: 0; }
.filter-search { position: relative; flex: 1 1 200px; max-width: 320px; min-width: 200px; }
.filter-search > .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #8a92ab; pointer-events: none; z-index: 1; width: 16px; height: 16px; }
.filter-search .input { padding: 0 12px 0 36px; background: #f9fafc; border-color: #d5d9e5; border-radius: 8px; }
.filter-link { border: 0; background: none; color: var(--primary); font: 500 13px var(--font); cursor: pointer; padding: 6px; }
.filter-link:hover { color: var(--primary-hover); }
.filter-total { margin-left: auto; white-space: nowrap; font-size: 13px; color: var(--text-2); }
.live-results { transition: opacity .15s; }
.live-results.is-loading { opacity: .5; }
@media (max-width: 640px) { .filter-search { max-width: none; flex-basis: 100%; } .filter-total { margin-left: 0; } }

/* ===== Sana oralig'i ===== */
.date-range { position: relative; }
.dr-btn { display: flex; align-items: center; gap: 10px; min-width: 230px; height: var(--control-h); padding: 0 12px; border: 1px solid #d5d9e5; border-radius: 8px; background: #f9fafc; font: 14px var(--font); color: var(--text); cursor: pointer; text-align: left; }
.dr-btn:hover { border-color: #9aa4c0; }
.dr-btn svg { color: var(--text-2); }
.dr-btn span { flex: 1; }
.dr-btn span.is-empty { color: #8a92ab; }
.dr-overlay { position: fixed; inset: 0; z-index: 5; }
.dr-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 6; width: max-content; max-width: calc(100vw - 32px); background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(14, 20, 36, .18); overflow: hidden; }
.dr-body { display: flex; flex-wrap: wrap; }
.dr-presets { width: 150px; padding: 10px 8px; border-right: 1px solid #eef0f5; display: flex; flex-direction: column; gap: 2px; }
.dr-presets button { text-align: left; border: 0; border-radius: 6px; padding: 8px 10px; font: 14px var(--font); cursor: pointer; background: transparent; color: var(--text); }
.dr-presets button:hover { background: #f1f3f8; }
.dr-presets button.is-on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.dr-cals { display: flex; gap: 8px; padding: 12px 16px; }
.dr-cal { width: 252px; }
.dr-cal-head { display: flex; align-items: center; justify-content: space-between; height: 30px; margin-bottom: 6px; font-weight: 600; font-size: 14px; }
.dr-cal-head button { width: 30px; height: 30px; border: 0; background: none; border-radius: 6px; cursor: pointer; font-size: 18px; color: var(--text); }
.dr-cal-head button:hover { background: #f1f3f8; }
.dr-cal-head button.is-hidden { visibility: hidden; }
.dr-week, .dr-days { display: grid; grid-template-columns: repeat(7, 1fr); }
.dr-week { font-size: 12px; color: #8a92ab; text-align: center; margin-bottom: 4px; }
.dr-days { row-gap: 2px; }
.dr-day { height: 34px; display: grid; place-items: center; font-size: 13px; cursor: pointer; }
.dr-day.is-blank { cursor: default; }
.dr-day span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 16px; }
.dr-day.in-range { background: var(--primary-soft); }
.dr-day.is-start.in-range { border-radius: 17px 0 0 17px; }
.dr-day.is-end.in-range { border-radius: 0 17px 17px 0; }
.dr-day.is-edge span { background: var(--primary); color: #fff; font-weight: 600; }
.dr-day.is-today:not(.is-edge) span { color: #d23b3b; font-weight: 600; }
.dr-foot { padding: 10px 16px; border-top: 1px solid #eef0f5; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #f9fafc; }
.dr-hint { font-size: 13px; color: var(--text-2); }
.dr-foot .btn { height: auto; padding: 7px 14px; font-size: 13px; border-radius: 6px; }
@media (max-width: 640px) { .dr-btn { min-width: 0; width: 100%; } .date-range { flex-basis: 100%; } .dr-presets { width: 100%; flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid #eef0f5; } .dr-cal { width: 100%; } .dr-cals { width: 100%; } }

/* ===== Yuklar sahifasi ===== */
.page-sub { margin-top: 4px; font-size: 14px; color: var(--text-2); }
.card.ship-card { padding: 0; margin-top: 24px; }
.ship-card .filter-bar { margin: 0; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.ship-scroll { overflow-x: auto; }
.ship-table { min-width: 860px; }
.ship-row { display: grid; grid-template-columns: 36px 120px minmax(0, 1.3fr) minmax(0, 1fr) 130px 170px 32px; gap: 12px; padding: 0 20px; align-items: center; }
.ship-head { background: #f9fafc; border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 500; letter-spacing: .05em; color: var(--text-2); }
.ship-head > div { padding: 12px 0; }
.ship-item { border-bottom: 1px solid #eef0f5; }
.ship-main { padding-top: 14px; padding-bottom: 14px; font-size: 14px; cursor: pointer; background: #fff; }
.ship-main:hover { background: #f4f7ff; }
.ship-item.is-open .ship-main { background: #f9fafc; }
.ship-no { color: #8a92ab; }
.ship-date { font-weight: 500; }
.ship-card .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { background: var(--primary-soft); color: var(--primary); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 500; }
.ship-driver { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ship-driver-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ship-driver .avatar { width: 28px; height: 28px; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 600; }
.plate { font: 600 12px var(--mono); border: 1px solid #cfd4e2; border-radius: 6px; padding: 4px 8px; background: #fff; }
.ship-sum { font-weight: 600; }
.ship-chev { color: #8a92ab; text-align: right; transition: transform .15s; }
.ship-detail { padding: 4px 20px 18px 68px; background: #f9fafc; }
.ship-detail-link { display: flex; justify-content: flex-end; margin-bottom: 8px; font-size: 13px; font-weight: 500; }
.ship-items { background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow-x: auto; font-size: 13px; }
.ship-irow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 80px 80px 110px 130px; gap: 12px; padding: 10px 16px; border-bottom: 1px solid #f1f3f8; min-width: 560px; }
.ship-irow:last-child { border-bottom: 0; }
.ship-ihead { background: #f9fafc; border-bottom: 1px solid #eef0f5; font-size: 11px; font-weight: 500; color: var(--text-2); letter-spacing: .05em; padding-top: 9px; padding-bottom: 9px; }
.ship-isup { font-weight: 500; }
.ship-card .pager { border-top: 1px solid var(--border); }
.ship-foot { padding: 14px 20px; background: #f9fafc; border-top: 1px solid var(--border); border-radius: 0 0 12px 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; color: #4a5370; }
.ship-foot b { font-size: 17px; color: var(--text); }
@media (max-width: 640px) { .ship-detail { padding-left: 12px; padding-right: 12px; } }

/* ===== Yangi yuk sahifasi ===== */
.nw-crumbs { font-size: 13px; color: var(--text-2); display: flex; gap: 8px; }
.nw-crumbs a { color: var(--text-2); }
.nw-crumbs a:hover { color: var(--primary); text-decoration: none; }
.nw-crumbs .cur { color: var(--text); }
.nw-title { margin: 8px 0 0; }
.nw-layout { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.nw-main { flex: 1 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.nw-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; }
.nw-card-title { padding: 16px 24px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 15px; }
.nw-info { padding: 20px 24px 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px 20px; }
.nw-wide { grid-column: 1 / -1; }
.nw-field { min-width: 0; }
.nw-field .label { margin-bottom: 6px; color: #4a5370; }
.nw-card .input, .nw-card .textarea, .nw-card input[type=date] { height: auto; padding: 10px 12px; border-color: #d5d9e5; border-radius: 8px; background: #fff; }
.nw-card .textarea { min-height: 0; }
.nw-card input:focus, .nw-card textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px #dbe5ff; }
.nw-card input::placeholder, .nw-card textarea::placeholder { color: #a3aac0; }
.nw-car .input { font: 600 14px var(--mono); text-transform: uppercase; }
.nw-block-head { padding: 16px 24px; background: #f9fafc; border-bottom: 1px solid var(--border); border-radius: 12px 12px 0 0; display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.nw-no { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 14px; flex: none; margin-bottom: 2px; }
.nw-grow2 { flex: 2 1 200px; }
.nw-grow1 { flex: 1 1 160px; }
.nw-x { border: 0; background: none; color: #a3aac0; cursor: pointer; font-size: 18px; line-height: 1; border-radius: 8px; }
.nw-x:hover { color: #d23b3b; }
.nw-x-box { width: 40px; height: 40px; border: 1px solid #d5d9e5; background: #fff; color: #8a92ab; }
.nw-x-box:hover { border-color: #e9b3b3; }
.nw-x-flat { width: 40px; height: 36px; justify-self: end; }
.nw-x-flat:hover { background: #fbeeee; }
.nw-items-wrap { padding: 14px 24px 4px; }
.nw-irow { display: grid; grid-template-columns: minmax(0, 1fr) 96px 104px 108px 120px 120px 40px; gap: 12px; align-items: center; }
.nw-irow > * { min-width: 0; }
.nw-irow .ac .input { width: 100%; text-overflow: ellipsis; }
.nw-irow .ac li { white-space: normal; overflow-wrap: anywhere; }
.nw-ihead { font-size: 12px; font-weight: 500; color: var(--text-2); letter-spacing: .05em; padding-bottom: 8px; }
.nw-iline { margin-bottom: 10px; }
.nw-irow .r { text-align: right; }
.nw-irow .input { min-width: 0; }
.nw-isum { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; font-size: 14px; }
.nw-block-foot { padding: 12px 24px 16px; border-top: 1px solid #eef0f5; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.nw-btn-ghost { background: #fff; border: 1px solid #d5d9e5; border-radius: 8px; padding: 8px 14px; font: 500 14px var(--font); cursor: pointer; color: var(--text); }
.nw-btn-ghost:hover { background: var(--bg); }
.nw-block-sum { font-size: 13px; color: var(--text-2); display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.nw-block-sum .tot { font-size: 14px; color: #4a5370; }
.nw-block-sum b { font-size: 16px; color: var(--text); }
.nw-add { width: 100%; padding: 14px; border: 1px dashed #b8c0d6; border-radius: 12px; background: transparent; color: #4a5370; font: 500 14px var(--font); cursor: pointer; }
.nw-add:hover { background: #fff; border-color: var(--primary); color: var(--primary); }
.nw-aside { flex: 0 0 340px; min-width: 0; max-width: 340px; position: sticky; top: 20px; background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.nw-aside .nw-card-title { padding: 16px 20px; }
.nw-sum-rows { padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.nw-sum-rows > div, .nw-sup-sums > div { display: flex; justify-content: space-between; gap: 12px; }
.nw-sum-rows > div > span:first-child { color: var(--text-2); }
.nw-sum-rows b { font-weight: 500; text-align: right; }
.nw-sum-rows b.mono { font: 600 13px var(--mono); }
.nw-sup-sums { padding: 12px 20px; border-top: 1px solid #eef0f5; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.nw-sup-sums > div > span:first-child { color: #4a5370; }
.nw-grand { padding: 16px 20px; background: #f9fafc; border-top: 1px solid var(--border); }
.nw-grand .lbl { font-size: 12px; color: var(--text-2); }
.nw-grand .val { font-size: 26px; font-weight: 600; margin-top: 2px; }
.nw-grand .val small { font-size: 14px; font-weight: 400; color: var(--text-2); }
.nw-save { margin-top: 14px; width: 100%; background: var(--primary); color: #fff; border: 0; border-radius: 8px; padding: 11px; font: 500 14px var(--font); cursor: pointer; }
.nw-save:hover { background: var(--primary-hover); }
.nw-save:disabled { opacity: .6; cursor: default; }
.nw-cancel { margin-top: 8px; display: block; text-align: center; color: var(--text); background: #fff; border: 1px solid #d5d9e5; border-radius: 8px; padding: 10px; font-size: 14px; font-weight: 500; }
.nw-cancel:hover { background: var(--bg); text-decoration: none; }
@media (max-width: 760px) {
    .nw-info, .nw-block-head, .nw-block-foot { padding-left: 16px; padding-right: 16px; }
    .nw-items-wrap { padding-left: 16px; padding-right: 16px; overflow-x: auto; }
    .nw-items { min-width: 660px; }
    .nw-aside { position: static; max-width: none; flex-basis: 100%; }
}

/* Yuk ma'lumotlari: ixcham (bir qatorda 4 ta maydon) */
.nw-main > .nw-card:first-child .nw-card-title { padding: 12px 20px; }
.nw-main > .nw-card:first-child .nw-info { padding: 14px 20px 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 16px; }
.nw-main > .nw-card:first-child .nw-field .label { margin-bottom: 4px; }
.nw-main > .nw-card:first-child .input, .nw-main > .nw-card:first-child .textarea { padding: 8px 12px; }
.nw-main > .nw-card:first-child .textarea { height: 38px; min-height: 38px; resize: none; }
@media (max-width: 900px) { .nw-main > .nw-card:first-child .nw-info { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .nw-main > .nw-card:first-child .nw-info { grid-template-columns: 1fr; } }

/* Ta'minotchi bloklari: har biri o'z rangida (chap chiziq va raqam) */
.nw-card.nw-block { border-left: 4px solid var(--c, var(--primary)); }
.nw-block .nw-no { background: var(--c, var(--primary)); }

/* ===== Mahsulotlar sahifasi ===== */
.pr-table { min-width: 1080px; }
.pr-row { display: grid; grid-template-columns: 36px minmax(0, 2fr) 60px 1fr 1.1fr 1.2fr 1.3fr; gap: 12px; padding: 0 20px; align-items: center; }
.pr-line { padding-top: 12px; padding-bottom: 12px; border-bottom: 1px solid #eef0f5; font-size: 14px; }
.pr-line:hover { background: #f4f7ff; }
.pr-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pr-ico { width: 34px; height: 34px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 600; font-size: 13px; flex: none; }
.pr-name-text { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-date { padding-left: 24px; }
.pr-dot { display: inline-block; width: 8px; height: 8px; border-radius: 4px; margin-right: 8px; }
.pr-dot.is-new { background: #1a9a55; }
.pr-dot.is-old { background: #d9a100; }
.pr-ago { margin-left: 8px; font-size: 12px; color: var(--text-2); }
.pr-empty { padding: 48px 24px; text-align: center; }
.pr-empty .t { font-size: 15px; font-weight: 500; }
.pr-empty .s { margin-top: 4px; font-size: 13px; color: var(--text-2); }

/* ===== To'lovlar sahifasi ===== */
.pay-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.pay-date { min-width: 180px; }
.pay-date .label { margin-bottom: 6px; color: #4a5370; }
.pay-date .input { height: auto; padding: 9px 12px; border-color: #d5d9e5; border-radius: 8px; background: #fff; }
.pay-main { flex: 3 1 640px; min-width: 0; }
.pay-row { display: grid; gap: 8px 12px; align-items: start; }
.pay-table { padding: 0 24px; }
.pay-th { padding: 14px 0 8px; font-size: 12px; font-weight: 500; color: var(--text-2); letter-spacing: .05em; align-items: center; }
.pay-th .r, .pay-table .r { text-align: right; }
.pay-line { padding: 12px 0; border-bottom: 1px solid #eef0f5; }
.pay-line .input { padding: 10px 12px; height: auto; border-color: #d5d9e5; border-radius: 8px; background: #fff; min-width: 0; }
.pay-sup { min-width: 0; }
.pay-hint { margin-top: 6px; min-height: 16px; font-size: 12px; }
.pay-hint small { font-weight: 500; }
.seg { display: flex; background: #f1f3f8; border-radius: 8px; padding: 3px; gap: 2px; }
.seg button { flex: 1; border: 0; border-radius: 6px; padding: 7px 4px; font: 500 13px var(--font); cursor: pointer; background: transparent; color: var(--text-2); }
.seg button.is-on { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(14, 20, 36, .12); }
.pay-sum { padding: 10px 0; text-align: right; font-weight: 600; font-size: 15px; }
.pay-note { margin-top: 8px; width: 100%; border: 1px solid transparent; border-radius: 8px; padding: 6px 12px; font: 13px var(--font); background: #f9fafc; color: #4a5370; height: auto; }
.pay-note:focus { background: #fff; }
.pay-foot { padding: 14px 24px; background: #f9fafc; border-top: 1px solid var(--border); border-radius: 0 0 12px 12px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pay-grand { margin-left: auto; font-size: 14px; color: #4a5370; }
.pay-grand b { font-weight: 600; font-size: 20px; color: var(--text); }
.pay-save { margin-top: 0; width: auto; padding: 10px 26px; }
.pay-debts { flex: 1 1 280px; min-width: 0; overflow: hidden; }
.pay-debts-head { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.pay-debts-head .t, .pay-hist-head .t { font-weight: 600; font-size: 15px; }
.pay-debts-head .s { margin-top: 4px; font-size: 13px; color: var(--text-2); }
.pay-debts-head .s b { color: #c62828; }
.pay-debtor { padding: 12px 20px; border-bottom: 1px solid #eef0f5; display: flex; align-items: center; gap: 12px; font-size: 14px; cursor: pointer; }
.pay-debtor:last-child { border-bottom: 0; }
.pay-debtor:hover { background: #f4f7ff; }
.pay-av { width: 32px; height: 32px; background: var(--primary-soft); color: var(--primary); font-size: 13px; font-weight: 600; }
.pay-debtor-main { min-width: 0; flex: 1; }
.pay-debtor-main .n { font-weight: 500; }
.pay-debtor-main .a { color: #c62828; font-weight: 600; font-size: 13px; }
.pay-debtor .go { font-size: 12px; font-weight: 500; color: var(--primary); }
.pay-empty { padding: 32px; text-align: center; color: var(--text-2); font-size: 14px; }
.pay-history { margin-top: 20px; }
.pay-hist-head { padding: 14px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pay-hist-head .c { font-size: 13px; color: var(--text-2); }
.pay-hist-table { min-width: 680px; }
.pay-hrow { display: grid; grid-template-columns: 36px 110px minmax(0, 1.2fr) 150px minmax(0, 1fr) minmax(0, 1fr) 170px 72px; gap: 12px; padding: 13px 24px; align-items: center; font-size: 14px; }
.pay-hrow .r { text-align: right; }
.pay-hth { padding: 12px 24px; background: #f9fafc; border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 500; color: var(--text-2); letter-spacing: .05em; }
.pay-hline { border-bottom: 1px solid #eef0f5; }
.pay-hline:hover { background: #f4f7ff; }
.pay-hsup { font-weight: 500; }
.pay-hsup a { color: var(--text); }
.pay-hsub { color: #4a5370; }
.pay-hsum { font-weight: 600; }
.pay-badge { background: var(--primary-soft); color: var(--primary); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.pay-badge.is-cash { background: #e6f5ec; color: #1a7a43; }
@media (max-width: 760px) {
    .pay-scroll { overflow-x: auto; }
    .pay-table { min-width: 640px; padding: 0 16px; }
}

/* ===== Ta'minotchilar sahifasi ===== */
.page-header .btn .plus { font-size: 18px; line-height: 1; }
.sup-table { min-width: 780px; }
.sup-row { display: grid; grid-template-columns: 36px minmax(0, 2fr) minmax(0, 1.3fr) minmax(0, 1.5fr); gap: 12px; padding: 0 20px; align-items: center; }
a.sup-line { padding-top: 12px; padding-bottom: 12px; border-bottom: 1px solid #eef0f5; font-size: 14px; color: var(--text); }
a.sup-line:hover { background: #f4f7ff; text-decoration: none; }
.sup-av { border-radius: 50%; }
.sup-nophone { color: #8a92ab; }
.sup-bal { font-weight: 600; color: #4a5370; }
.sup-bal.is-debt { color: #c62828; }
.sup-bal.is-adv { color: #1a7a43; }
.ship-foot b.sup-debt { color: #c62828; }
.sup-modal-bg { background: rgba(14, 20, 36, .45); }
.modal.sup-modal { max-width: 420px; padding: 0; border-radius: 14px; box-shadow: 0 20px 50px rgba(14, 20, 36, .25); overflow: hidden; }
.sup-modal-title { padding: 18px 24px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 16px; }
.sup-modal-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.sup-modal-body label { margin-bottom: 6px; color: #4a5370; }
.sup-modal-body input { height: auto; padding: 10px 12px; border-color: #d5d9e5; border-radius: 8px; }
.sup-modal-foot { padding: 14px 24px; background: #f9fafc; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
.sup-modal-save { margin-top: 0; width: auto; padding: 9px 22px; }

/* ===== Ta'minotchi sahifasi ===== */
.sd-head { margin-top: 12px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.sd-id { display: flex; align-items: center; gap: 16px; }
.sd-av { width: 56px; height: 56px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 600; font-size: 22px; flex: none; }
.sd-phone { margin-top: 4px; font-size: 14px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.sd-phone .icon { width: 14px; height: 14px; }
.sd-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.sd-back { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; font-weight: 500; color: var(--text); }
.sd-back:hover { text-decoration: none; }
.sd-stats { margin-top: 24px; background: #fff; border: 1px solid var(--border); border-radius: 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.sd-stats > div { padding: 20px 24px; border-right: 1px solid #eef0f5; }
.sd-stats > div:last-child { border-right: 0; }
.sd-stats .k { font-size: 13px; color: var(--text-2); }
.sd-stats .v { margin-top: 6px; font-size: 20px; font-weight: 600; white-space: nowrap; }
.sd-stats .v.big { font-size: 28px; }
.sd-stats .v small { font-size: 13px; font-weight: 400; color: var(--text-2); }
.sd-stats .v.big small { font-size: 15px; font-weight: 500; color: inherit; }
.sd-history { margin-top: 20px; }
.sd-table { min-width: 780px; }
.sd-row { display: grid; grid-template-columns: 36px 90px 120px minmax(0, 1.4fr) 170px 190px 72px; gap: 12px; padding: 0 24px; align-items: center; }
.sd-row.ship-head > div { padding: 12px 0; }
.sd-line { padding-top: 14px; padding-bottom: 14px; border-bottom: 1px solid #eef0f5; font-size: 14px; color: var(--text); }
a.sd-line:hover, div.sd-line:hover { background: #f4f7ff; text-decoration: none; }
.sd-detail { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.sd-badge { border-radius: 999px; padding: 3px 12px; font-size: 12px; font-weight: 500; }
.sd-badge.is-load { background: #fdeaea; color: #c62828; }
.sd-badge.is-pay { background: #e6f5ec; color: #1a7a43; }
.sd-amt { font-weight: 500; white-space: nowrap; }
.sd-amt.is-load { color: #c62828; }
.sd-amt.is-pay { color: #1a7a43; }
.sd-stats .sup-bal small, .sd-line .sup-bal { white-space: nowrap; }
.sd-tag { margin-left: 10px; vertical-align: middle; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 500; background: #fdeaea; color: #c62828; }
.sd-tag.is-adv { background: #e6f5ec; color: #1a7a43; }

/* ===== Yuk ma'lumoti sahifasi ===== */
a.ship-item { color: var(--text); border-bottom: 1px solid #eef0f5; }
a.ship-item:hover { text-decoration: none; }
.sv-date { background: var(--primary-soft); color: var(--primary); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; }
.sd-id h1 { margin: 0; }
.sv-info > div { padding: 18px 24px; }
.sv-info { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.sv-k { font-size: 12px; color: var(--text-2); letter-spacing: .04em; }
.sv-v { margin-top: 6px; font-weight: 600; }
.sv-sub { margin-top: 2px; font-size: 13px; color: var(--text-2); }
.sv-note { grid-column: 1 / -1; border-top: 1px solid #eef0f5; border-right: 0 !important; }
.sv-note-text { font-weight: 400; white-space: pre-line; }
.sv-blocks { margin-top: 20px; display: flex; flex-direction: column; gap: 20px; }
.sv-block { overflow: hidden; }
.sv-block-head { padding: 16px 24px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sv-no { width: 34px; height: 34px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 14px; flex: none; }
.sv-sup { min-width: 0; }
.sv-sup a { font-weight: 600; font-size: 16px; }
.sv-sup .sv-sub { margin-top: 0; min-height: 18px; }
.sv-sup-total { margin-left: auto; text-align: right; }
.sv-sup-total .k { font-size: 12px; color: var(--text-2); }
.sv-sup-total .v { font-weight: 600; font-size: 18px; white-space: nowrap; }
.sv-table { min-width: 760px; }
.sv-row { display: grid; grid-template-columns: minmax(0, 1.4fr) 0.8fr 0.8fr 1fr 0.9fr 1.1fr 1.2fr; gap: 12px; padding: 0 24px; align-items: center; }
.sv-block .ship-head { border-top: 1px solid var(--border); }
.sv-block .ship-head > div { padding: 11px 0; }
.sv-line { padding-top: 13px; padding-bottom: 13px; border-bottom: 1px solid #eef0f5; font-size: 14px; }
.sv-line:hover { background: #f4f7ff; }
.sv-prod { font-weight: 500; }
.sv-sum { font-weight: 600; }
.sv-total { padding-top: 12px; padding-bottom: 12px; background: #f9fafc; font-size: 14px; font-weight: 600; }
.sv-total .lbl { color: var(--text-2); font-weight: 500; }
.sv-grand { margin-top: 20px; background: #0e1424; color: #fff; border-radius: 12px; padding: 22px 28px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.sv-grand .t { font-size: 14px; color: #c4cbdd; }
.sv-grand .s { margin-top: 2px; font-size: 13px; color: #8e98b3; }
.sv-grand .v { font-size: 30px; font-weight: 600; white-space: nowrap; }
.sv-grand .v small { font-size: 16px; font-weight: 400; color: #c4cbdd; }

/* Ta'minotchi sahifasi: yuk modali */
.sd-click { cursor: pointer; }
.sd-click:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.modal.sd-modal { max-width: 760px; padding: 0; border-radius: 14px; box-shadow: 0 20px 50px rgba(14, 20, 36, .25); overflow: hidden; max-height: calc(100vh - 32px); overflow-y: auto; }
.sd-modal-head { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sd-modal-title { font-weight: 600; font-size: 16px; display: flex; align-items: center; gap: 10px; }
.sd-modal-meta { padding: 12px 20px; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 13px; background: #f9fafc; border-bottom: 1px solid var(--border); }
.sd-modal-meta > div { display: flex; align-items: center; gap: 8px; }
.sd-modal .k { color: var(--text-2); }
.sd-modal-note { padding: 8px 20px; font-size: 13px; border-bottom: 1px solid #eef0f5; }
.sd-modal-scroll { overflow-x: auto; }
.sd-mrow { display: grid; grid-template-columns: minmax(0, 1.5fr) .8fr .8fr 1fr .9fr 1.3fr 1.1fr; gap: 8px; padding: 0 20px; align-items: center; min-width: 680px; font-size: 13px; }
.sd-modal .ship-head > div { padding: 9px 0; font-size: 11px; }
.sd-mline { padding-top: 9px; padding-bottom: 9px; border-bottom: 1px solid #eef0f5; }
.sd-modal-foot { padding: 12px 20px; background: #f9fafc; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.sd-modal-link { font-size: 13px; font-weight: 500; }
.sd-modal-total { font-size: 14px; color: #4a5370; }
.sd-modal-total b { font-size: 17px; color: var(--text); }

/* ===== Dashboard ===== */
.db-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.db-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; position: relative; }
.db-bar .dr-btn { height: 40px; background: #fff; padding: 0 14px; min-width: 0; }
.db-bar .dr-pop { left: auto; right: 0; }
.db-month { display: flex; align-items: center; background: #fff; border: 1px solid #d5d9e5; border-radius: 8px; }
.db-arrow { width: 38px; height: 38px; border: 0; background: none; border-radius: 8px; font-size: 18px; line-height: 1; cursor: pointer; color: var(--text); }
.db-arrow:hover { background: #f1f3f8; }
.db-title { min-width: 120px; text-align: center; font-weight: 600; font-size: 14px; white-space: nowrap; }
.db-results { margin-top: 24px; display: flex; flex-direction: column; gap: 20px; }
.db-kpis { background: #fff; border: 1px solid var(--border); border-radius: 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.db-kpis > div { padding: 20px 24px; border-right: 1px solid #eef0f5; }
.db-kpis > div:last-child { border-right: 0; }
.db-kpis .k { font-size: 13px; color: var(--text-2); }
.db-kpis .v { margin-top: 8px; font-size: 28px; font-weight: 600; white-space: nowrap; letter-spacing: -.01em; }
.db-kpis .v small { font-size: 13px; font-weight: 400; color: var(--text-2); letter-spacing: 0; }
.db-row { display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; }
.db-panel { background: #fff; border: 1px solid var(--border); border-radius: 12px; min-width: 0; }
.db-chart-panel { flex: 2 1 460px; padding: 20px 24px; }
.db-share-panel { flex: 1 1 280px; padding: 20px 24px; }
.db-panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.db-panel-head .t { font-weight: 600; font-size: 15px; }
.db-panel-head .u { font-size: 13px; color: var(--text-2); }
.db-chart { margin-top: 16px; display: flex; gap: 12px; }
.db-y { display: flex; flex-direction: column; justify-content: space-between; height: 180px; font-size: 11px; color: #8a92ab; text-align: right; }
.db-plot { flex: 1; min-width: 0; }
.db-bars { position: relative; height: 180px; border-bottom: 1px solid #d5d9e5; display: flex; align-items: flex-end; }
.db-grid { position: absolute; left: 0; right: 0; border-top: 1px dashed #eef0f5; }
.db-bar-col { position: relative; flex: 1; min-width: 0; height: 100%; display: flex; align-items: flex-end; }
.db-bar-fill { width: 100%; background: var(--primary); border-radius: 3px 3px 0 0; }
.db-xs { display: flex; margin-top: 6px; }
.db-xs > div { flex: 1; min-width: 0; text-align: center; font-size: 11px; color: #8a92ab; white-space: nowrap; }
.db-share-bar { margin-top: 16px; display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 2px; }
.db-share-bar > div { min-width: 3px; }
.db-share-list { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.db-share-list > div { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.db-share-list .sw, .db-tbl .sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.db-share-list .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-share-list .p { color: var(--text-2); }
.db-table-panel { overflow: hidden; }
.db-card-head { padding: 12px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.db-card-head .t { font-weight: 600; font-size: 15px; }
.db-limit { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 400; color: var(--text-2); }
.db-limit select { width: auto; height: auto; padding: 6px 8px; border-radius: 8px; border-color: #d5d9e5; }
.db-scroll { overflow: auto; max-height: 310px; }
.db-scroll .db-th { position: sticky; top: 0; z-index: 2; }
.db-tbl-sup { min-width: 640px; }
.db-tbl-prod { min-width: 680px; }
.db-tr { display: grid; gap: 16px; padding: 0 24px; align-items: center; }
.db-tbl-sup .db-tr { grid-template-columns: 36px minmax(0, 1.4fr) 110px minmax(0, 1.2fr) 180px; }
.db-tbl-prod .db-tr { grid-template-columns: 36px minmax(0, 1.3fr) 110px 100px minmax(0, 1.2fr) 120px; }
.db-th { background: #f9fafc; border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 500; color: var(--text-2); letter-spacing: .05em; }
.db-th > div { padding: 12px 0; }
.db-td { padding-top: 14px; padding-bottom: 14px; border-bottom: 1px solid #eef0f5; font-size: 14px; }
.db-td:hover { background: #f4f7ff; }
.db-tr .r { text-align: right; }
.db-td .no { color: #8a92ab; }
.db-td .nm { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 500; }
.db-td .nm a, .db-td .nm .pn { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-td .nm a:hover { text-decoration: underline; }
.db-td .bar { display: flex; align-items: center; gap: 10px; }
.db-td .trk { flex: 1; height: 6px; background: #eef0f5; border-radius: 3px; overflow: hidden; }
.db-td .trk > div { height: 100%; }
.db-td .bar > span { width: 44px; text-align: right; font-size: 13px; color: var(--text-2); }
.db-td .sum { font-weight: 600; white-space: nowrap; }
.db-none { padding: 40px; text-align: center; color: var(--text-2); font-size: 14px; }
.db-more { padding: 12px 24px; font-size: 13px; color: var(--text-2); text-align: center; background: #fcfcfe; }
.db-foot { padding: 14px 24px; background: #f9fafc; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; color: #4a5370; }
.db-foot b { color: var(--text); }
.db-foot b.big { font-size: 16px; }

/* Yukni o'chirish tasdiqlash oynasi */
.sd-del-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; background: #f9fafc; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.sd-del-list > div { display: flex; justify-content: space-between; gap: 12px; }
.sd-del-list b { color: #c62828; white-space: nowrap; }
.nw-save.sd-del-btn { background: #d23b3b; }
.nw-save.sd-del-btn:hover { background: #b52e2e; }

/* Ta'minotchi tarixi: sana filtri */
.sd-filter { display: flex; align-items: center; gap: 8px; margin-right: auto; margin-left: 16px; }
.sd-filter .dr-btn { height: 34px; min-width: 200px; background: #fff; }
.sd-filter .dr-pop { left: 0; }

/* Mahsulot nomini tahrirlash */
.pr-actions { display: flex; justify-content: flex-end; }
.pr-edit { width: 32px; height: 32px; border: 0; background: none; border-radius: 6px; color: #8a92ab; cursor: pointer; display: grid; place-items: center; }
.pr-edit:hover { background: var(--primary-soft); color: var(--primary); }
.pr-edit-hint { margin-top: 8px; font-size: 12px; color: var(--text-2); }

/* To'lov qatori amallari */
.pay-acts { display: flex; justify-content: flex-end; gap: 2px; }
.pay-act { width: 30px; height: 30px; border: 0; background: none; border-radius: 6px; color: #8a92ab; cursor: pointer; display: grid; place-items: center; padding: 0; }
.pay-act:hover { background: var(--primary-soft); color: var(--primary); text-decoration: none; }
.pay-act-del:hover { background: #fbeeee; color: #d23b3b; }
.sd-acts-cell, .pay-acts-cell { display: flex; justify-content: flex-end; }
.pay-del-sum { color: #1a7a43; white-space: nowrap; }
@media (max-width: 640px) { .pay-act { width: 28px; height: 28px; } }

/* To'lovni tahrirlash sahifasi */
.pe-form { margin-top: 24px; max-width: 760px; }
.pe-grid { padding: 20px 24px 8px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 20px; }
.pe-wide { grid-column: 1 / -1; }
.pe-cash { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px 20px; }
.pe-form .input { height: auto; padding: 10px 12px; border-color: #d5d9e5; border-radius: 8px; background: #fff; }
.pe-form .input[readonly] { background: #f9fafc; font-weight: 600; text-align: right; }
.pe-seg { max-width: 280px; }
.pe-foot { margin-top: 12px; padding: 14px 24px; background: #f9fafc; border-top: 1px solid var(--border); border-radius: 0 0 12px 12px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pe-total { margin-right: auto; font-size: 14px; color: #4a5370; }
.pe-total b { font-size: 18px; color: var(--text); }
.pe-cancel { display: inline-flex; align-items: center; padding: 10px 18px; color: var(--text); }
.pe-cancel:hover { text-decoration: none; }

/* Mahsulot statistikasi */
.ps-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 20px 0 16px; }
.ps-modes { display: inline-flex; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 3px; gap: 2px; }
.ps-modes button { border: 0; background: transparent; padding: 7px 14px; border-radius: 6px; font: 500 14px var(--font); color: var(--text-2); cursor: pointer; }
.ps-modes button.on { background: var(--primary); color: #fff; }
.db-arrow:disabled { opacity: .35; cursor: default; }
.ps-kpis { background: #fff; border: 1px solid var(--border); border-radius: 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 16px; }
.ps-kpis > div { padding: 14px 20px; border-right: 1px solid #eef0f5; min-width: 0; }
.ps-kpis > div:last-child { border-right: 0; }
.ps-kpis .k { font-size: 13px; color: var(--text-2); }
.ps-kpis .v { margin-top: 4px; font-size: 18px; font-weight: 600; white-space: nowrap; }
.ps-up { color: var(--danger); }
.ps-down { color: var(--success); }
.ps-card { margin-bottom: 16px; overflow: hidden; }
.ps-chart { position: relative; height: 320px; padding: 16px; }
.ps-scroll { overflow-x: auto; }
.ps-tbl { width: 100%; min-width: 640px; border-collapse: collapse; }
.ps-tbl th { text-align: left; padding: 10px 16px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); font-weight: 600; background: #f9fafc; border-bottom: 1px solid var(--border); white-space: nowrap; }
.ps-tbl td { padding: 11px 16px; border-bottom: 1px solid #eef0f5; white-space: nowrap; }
.ps-tbl th.r, .ps-tbl td.r { text-align: right; }
.ps-tbl .b { font-weight: 600; }
.pr-name-text { color: var(--text); }
a.pr-name-text:hover { color: var(--primary); text-decoration: underline; }
@media (max-width: 600px) { .ps-chart { height: 260px; padding: 8px; } }

/* Login */
.auth-body { background: linear-gradient(135deg, #eef2ff 0%, #f6f8fc 55%, #e8f5ee 100%); }
.auth-card { width: 100%; max-width: 400px; padding: 32px 28px; background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 12px 40px rgba(36, 86, 230, .12); }
.auth-card h1 { text-align: center; margin: 0; font-size: 22px; }
.auth-sub { text-align: center; color: var(--text-2); margin: 6px 0 24px; font-size: 14px; }
.auth-logo { width: 52px; height: 52px; margin: 0 auto 16px; border-radius: 14px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; }
.auth-logo .icon { width: 26px; height: 26px; }
.auth-pass { position: relative; }
.auth-pass .input { padding-right: 96px; }
.auth-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--primary); font: 500 13px var(--font); padding: 6px 10px; cursor: pointer; border-radius: 6px; }
.auth-eye:hover { background: #eef2ff; }

/* ===== Yuk formasi: vertikal ixcham zichlik (create + edit) ===== */
.form-compact { --field-h: 34px; --card-pad: 14px; --card-gap: 12px; --row-gap: 6px; margin-top: 16px; gap: var(--card-gap); }
.form-compact .nw-main { gap: var(--card-gap); }
.form-compact .nw-card .input, .form-compact .nw-card input[type=date], .form-compact .nw-card select,
.form-compact .nw-main > .nw-card:first-child .input { height: var(--field-h); padding: 0 10px; }
.form-compact .nw-card .textarea, .form-compact .nw-main > .nw-card:first-child .textarea { height: var(--field-h); min-height: var(--field-h); padding: 6px 10px; resize: vertical; line-height: 20px; }
.form-compact .nw-card .textarea:focus, .form-compact .nw-card .textarea:not(:placeholder-shown) { min-height: 64px; }
.form-compact .nw-field .label, .form-compact .nw-main > .nw-card:first-child .nw-field .label { margin-bottom: 4px; font-size: 13px; }
.form-compact .nw-card-title, .form-compact .nw-main > .nw-card:first-child .nw-card-title { padding: 0 var(--card-pad); height: 40px; display: flex; align-items: center; }
.form-compact .nw-info, .form-compact .nw-main > .nw-card:first-child .nw-info { padding: var(--card-pad); gap: var(--card-gap) 12px; }
.form-compact .nw-block-head { padding: 10px var(--card-pad); gap: 10px; align-items: flex-end; }
.form-compact .nw-no { width: 28px; height: 28px; margin-bottom: 3px; font-size: 13px; }
.form-compact .nw-x-box { width: var(--field-h); height: var(--field-h); }
.form-compact .nw-items-wrap { padding: 8px var(--card-pad) 2px; }
.form-compact .nw-irow { gap: 8px; }
.form-compact .nw-ihead { padding-bottom: 4px; font-size: 11px; }
.form-compact .nw-iline { margin-bottom: 0; padding: var(--row-gap) 0; }
.form-compact .nw-iline + .nw-iline { border-top: 1px solid #f1f3f8; }
.form-compact .nw-x-flat { width: 40px; height: var(--field-h); }
.form-compact .nw-block-foot { padding: 8px var(--card-pad); }
.form-compact .nw-btn-ghost { padding: 5px 12px; }
.form-compact .nw-block-sum b { font-size: 15px; }
.form-compact .nw-add { padding: 9px; }
.form-compact .nw-aside { top: 12px; }
.form-compact .nw-aside .nw-card-title { padding: 0 var(--card-pad); }
.form-compact .nw-sum-rows { padding: 10px var(--card-pad); gap: 6px; }
.form-compact .nw-sup-sums { padding: 8px var(--card-pad); gap: 4px; }
.form-compact .nw-grand { padding: 10px var(--card-pad); }
.form-compact .nw-grand .val { font-size: 22px; }
.form-compact .nw-save { margin-top: 10px; padding: 8px; }
.form-compact .nw-cancel { margin-top: 6px; padding: 7px; }
.form-compact .field-error { margin-top: 2px; }
@media (max-width: 900px) {
    .form-compact { --field-h: 40px; }
}

/* Yuk formasi: mahsulot qatori (karopka / alohida / jami / narx / summa) */
.nw-ilab { display: none; }
.nw-ihint { margin-top: 2px; font-size: 11px; line-height: 1.3; color: var(--text-2); }
.nw-itotal { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 13px; color: var(--text-2); }
.nw-irow .input:disabled { background: #f3f4f8; color: var(--text-2); cursor: not-allowed; }
@media (max-width: 900px) {
    .nw-items { min-width: 0; }
    .nw-ihead { display: none; }
    .nw-irow { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; position: relative; }
    .nw-irow .nw-iprod { grid-column: 1 / -1; }
    .nw-irow .nw-x-flat { position: absolute; top: 6px; right: 0; width: 32px; height: 28px; }
    .nw-ilab { display: block; margin-bottom: 2px; font-size: 11px; color: var(--text-2); }
    .nw-itotal, .nw-isum { padding: 8px 0; }
    .form-compact .nw-iline { padding: 10px 0; }
}
.nw-iline { align-items: start; }
.form-compact .nw-itotal, .form-compact .nw-isum, .form-compact .nw-iline .nw-x-flat { line-height: var(--field-h); }
@media (max-width: 900px) {
    .nw-irow .nw-iprod { padding-right: 36px; }
    .form-compact .nw-itotal, .form-compact .nw-isum { line-height: 1.4; }
}
a.pr-line { color: inherit; text-decoration: none; cursor: pointer; }

/* Yangi ta'minotchi: boshlang'ich balans turi */
.sup-modal .seg button.is-debt.is-on { color: var(--danger, #d92d20); }
.sup-modal .seg button.is-adv.is-on { color: #1a9a55; }
.sd-badge.is-open { background: #eef0f5; color: #4a5370; }
.sd-opening { background: #fafbfd; }
.sd-id .sd-opening { margin-top: 2px; }

/* Firmalar va foydalanuvchilar */
.firm-table { min-width: 520px; }
.firm-row { grid-template-columns: 36px minmax(0, 2fr) minmax(0, 1fr); }
.firm-row.has-acts { grid-template-columns: 36px minmax(0, 2fr) minmax(0, 1fr) 72px; }
.user-table { min-width: 820px; }
.user-row { grid-template-columns: 36px minmax(0, 1.5fr) minmax(0, 1.7fr) 110px 130px 72px; }
.row-line, .firm-row.sup-line { padding-top: 12px; padding-bottom: 12px; border-bottom: 1px solid #eef0f5; font-size: 14px; color: var(--text); }
div.sup-line.firm-row { padding-top: 12px; padding-bottom: 12px; border-bottom: 1px solid #eef0f5; font-size: 14px; }
.user-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #4a5370; }
.user-form .auth-pass .input { padding-right: 96px; }
.pay-firm { color: #4a5370; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-tag { font-size: 11px; font-weight: 500; opacity: .7; margin-left: 4px; }

/* To'lov qatorida xato uchun joy oldindan ajratiladi (qatorlar siljimasin) */
.pay-ferr { min-height: 18px; margin-top: 2px; }
.pay-ferr .field-error { margin-top: 0; }
.pay-table { min-width: 720px; }
.pay-hrow.has-by { grid-template-columns: 36px 110px minmax(0, 1.2fr) 150px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 170px 72px; }
.pay-hist-table:has(.has-by) { min-width: 900px; }
.sd-by { color: var(--text-2); font-size: 12px; }
