:root {
    --bg: #edf1f7;
    --surface: #ffffff;
    --ink: #1e2b3a;
    --muted: #6e7d91;
    --brand: #0f4c81;
    --brand-2: #145792;
    --brand-soft: #eaf2fb;
    --ok: #1f8a48;
    --warn: #c47608;
    --danger: #ba181b;
    --info: #0a6c8d;
    --sidebar-width: 264px;
    --radius: 14px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background:
        radial-gradient(circle at 90% 8%, #d5e4f7 0%, transparent 30%),
        radial-gradient(circle at 10% 100%, #d9ece6 0%, transparent 26%),
        var(--bg);
    color: var(--ink);
    font-family: 'Segoe UI', Tahoma, Verdana, sans-serif;
}

body.sidebar-collapsed {
    --sidebar-width: 88px;
}

.layout-wrap { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #0d3f69 0%, #0f4c81 45%, #133f63 100%);
    color: #fff;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid rgba(255,255,255,0.08);
}

body.sidebar-collapsed .sidebar .brand-sub,
body.sidebar-collapsed .sidebar .sidebar-kpi,
body.sidebar-collapsed .sidebar .sidebar-btn-label,
body.sidebar-collapsed .sidebar .nav-link span {
    display: none;
}

body.sidebar-collapsed .sidebar .brand {
    font-size: .92rem;
}

body.sidebar-collapsed .sidebar .nav-link {
    justify-content: center;
}

body.sidebar-collapsed .sidebar .nav-link .nav-ico {
    width: auto;
    font-size: 1rem;
}

body.sidebar-collapsed .sidebar .sidebar-collapse-btn {
    padding-left: .35rem;
    padding-right: .35rem;
}

body.sidebar-collapsed .sidebar .sidebar-collapse-btn i {
    margin-right: 0;
}

.brand-wrap { padding: .25rem .15rem; }
.brand { font-size: 1.1rem; font-weight: 700; letter-spacing: .3px; }
.brand-sub { font-size: .75rem; color: rgba(255,255,255,.7); }

.sidebar-kpi {
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 10px;
    padding: .55rem .7rem;
}

.sidebar .nav-link {
    color: #f0f7ff;
    border-radius: 10px;
    margin-bottom: 4px;
    padding: .55rem .75rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .94rem;
}

.sidebar .nav-link .nav-ico { font-size: .95rem; width: 16px; }

.sidebar .nav-link.active,
.sidebar .nav-link:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.content-area { flex: 1; min-width: 0; }

.topbar {
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #dde6f0;
    padding: .9rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 20;
}

.topbar-left,
.topbar-right {
    min-width: 0;
}

.global-search-wrap {
    position: relative;
    width: min(460px, 36vw);
}

.global-search-wrap .input-group-text {
    background: #f3f7fc;
    border-color: #d6e0ed;
}

.global-search-wrap .form-control {
    border-color: #d6e0ed;
    background: #fdfefe;
}

.product-detail-page .modern-kpi {
    border: 1px solid #d8e5f2;
    border-radius: 14px;
    padding: .7rem .8rem;
    background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
    box-shadow: 0 6px 18px rgba(16, 44, 72, .06);
}

.product-detail-page .modern-kpi .kpi-label {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #68819a;
}

.product-detail-page .modern-kpi .kpi-value {
    font-size: 1rem;
    font-weight: 700;
    color: #163f66;
}

.product-detail-page .insight-list {
    display: grid;
    gap: .55rem;
}

.product-detail-page .insight-item {
    border: 1px solid #d6e4f1;
    border-radius: 12px;
    background: #fff;
    padding: .7rem .8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    flex-wrap: wrap;
}

.product-detail-page .insight-main {
    min-width: 220px;
    flex: 1;
}

.product-detail-page .insight-title {
    font-weight: 700;
    color: #173b5f;
}

.product-detail-page .insight-meta {
    font-size: .78rem;
    color: #6e8093;
}

.product-detail-page .insight-stats {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    flex-wrap: wrap;
}

.product-detail-page .stat-chip {
    border: 1px solid #d4e2ef;
    border-radius: 999px;
    padding: .16rem .5rem;
    background: #f5f9ff;
    font-size: .76rem;
    color: #234f76;
    font-weight: 600;
}

.focus-highlight-row {
    background: #fff7d6 !important;
    box-shadow: inset 0 0 0 2px #f3cd63;
}

.global-search-results {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 60;
    background: #fff;
    border: 1px solid #dce5ef;
    border-radius: 12px;
    box-shadow: 0 14px 26px rgba(20, 36, 58, .14);
    max-height: 380px;
    overflow: auto;
    padding: .35rem;
}

.search-group-title {
    font-size: .73rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #5a6b81;
    font-weight: 700;
    padding: .3rem .45rem .1rem;
}

.search-item {
    display: block;
    padding: .45rem .5rem;
    border-radius: 9px;
    text-decoration: none;
    color: inherit;
}

.search-item:hover {
    background: #f2f7fd;
}

.search-item .meta {
    font-size: .74rem;
    color: #6c7b90;
}

.alert-chip {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    min-height: 34px;
    border-radius: 999px;
    border: 1px solid transparent;
    padding: .25rem .65rem;
    font-size: .79rem;
    text-decoration: none;
}

.alert-danger-soft {
    background: #ffeef0;
    color: #a42022;
    border-color: #f4c9ce;
}

.alert-warn-soft {
    background: #fff6e9;
    color: #9b5e05;
    border-color: #f1ddb7;
}

.notif-dot {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #c61f22;
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #fff;
}

.notif-menu {
    min-width: 290px;
}

.user-menu-btn {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
}

.user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #135289;
    color: #fff;
    font-size: .75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.user-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar h1 { font-size: 1.18rem; }
.top-action { min-height: 36px; }
.top-clock { min-width: 110px; }

.page-body { padding: .95rem 1.1rem 1.25rem; }

.panel-card {
    background: var(--surface);
    border: 1px solid #dce5ef;
    border-radius: var(--radius);
    box-shadow: 0 12px 22px rgba(15, 33, 56, 0.06);
}

.kpi { padding: .95rem; }
.kpi-title { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; }
.kpi-value { font-size: 1.42rem; font-weight: 700; }
.kpi-sub { font-size: .74rem; color: var(--muted); }

.quick-btn { min-height: 48px; font-weight: 600; }

.filter-bar {
    background: #f5f8fc;
    border: 1px solid #dce5ef;
    border-radius: 12px;
    padding: .6rem;
}

.stok-product-modal {
    border: 1px solid #cfdae7;
    border-radius: 16px;
    overflow: hidden;
}
.stok-product-modal .modal-header {
    background: linear-gradient(180deg, #f8fbff 0%, #edf4fb 100%);
    border-bottom: 1px solid #d7e4f1;
}
.stok-product-modal .modal-title {
    font-weight: 700;
    color: #20354b;
}
.stok-modal-section-title {
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #4f6c88;
    font-weight: 700;
    padding-top: .25rem;
}
.stok-product-modal .form-control {
    border-color: #cfdceb;
}
.stok-product-modal .form-control:focus {
    border-color: #4781b7;
    box-shadow: 0 0 0 .2rem rgba(71, 129, 183, 0.15);
}

.sales-kpi-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
}

.sales-kpi-card {
    background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
    border: 1px solid #dce5ef;
    border-radius: 14px;
    padding: .85rem .9rem;
    box-shadow: 0 12px 22px rgba(15, 33, 56, 0.05);
}

.sales-kpi-card-accent {
    background: linear-gradient(180deg, #12385d 0%, #0f2f4f 100%);
    color: #fff;
    border-color: rgba(15, 47, 79, 0.65);
}

.sales-kpi-label {
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
}

.sales-kpi-card-accent .sales-kpi-label,
.sales-kpi-card-accent .sales-kpi-sub {
    color: rgba(255,255,255,.74);
}

.sales-kpi-value {
    font-size: 1.42rem;
    font-weight: 700;
    line-height: 1.15;
    margin-top: .2rem;
}

.sales-kpi-sub {
    font-size: .74rem;
    color: var(--muted);
    margin-top: .2rem;
}

.sales-shortcuts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.sales-master-filter {
    background: linear-gradient(180deg, #f7fbff 0%, #eef5fc 100%);
}

.sales-customer-slots {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.customer-slot-chip {
    border: 1px solid #d1dfec;
    border-radius: 12px;
    background: #fff;
    text-align: left;
    padding: .55rem .7rem;
    display: grid;
    gap: 2px;
    transition: all .2s ease;
}

.customer-slot-chip .slot-title {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #5a6f86;
    font-weight: 700;
}

.customer-slot-chip .slot-sub {
    font-size: .86rem;
    font-weight: 600;
    color: #18344f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.customer-slot-chip.active {
    border-color: #12385d;
    background: linear-gradient(180deg, #12385d 0%, #15456f 100%);
    box-shadow: 0 10px 20px rgba(18, 56, 93, 0.25);
}

.customer-slot-chip.active .slot-title,
.customer-slot-chip.active .slot-sub {
    color: #fff;
}

.sales-advanced-filter-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1.2fr .9fr;
    gap: 10px;
    align-items: stretch;
}

.sales-filter-summary {
    min-height: 38px;
    border: 1px dashed #c9d7e5;
    border-radius: 10px;
    background: #fff;
    padding: .48rem .65rem;
    font-size: .82rem;
    color: #47627e;
    display: flex;
    align-items: center;
}

.sales-side-metric {
    border: 1px solid #dce5ef;
    background: #fbfdff;
    border-radius: 12px;
    padding: .65rem .75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.sales-table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.sales-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    border: 1px solid #d8e3ef;
    background: #fff;
    color: #35506b;
    border-radius: 999px;
    padding: .38rem .72rem;
    font-size: .78rem;
    font-weight: 600;
}

.filter-chip.active {
    background: #12385d;
    color: #fff;
    border-color: #12385d;
}

.sales-sort-select {
    min-width: 190px;
}

.sales-secondary-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.sales-payment-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.payment-chip {
    border: 1px solid #d3dfec;
    background: #fff;
    color: #1d466f;
    border-radius: 999px;
    padding: .3rem .7rem;
    font-size: .77rem;
    font-weight: 700;
}

.payment-chip:hover,
.payment-chip.active {
    background: #12385d;
    border-color: #12385d;
    color: #fff;
}

.sales-recent-panel {
    border: 1px solid #dce5ef;
    border-radius: 12px;
    background: #fbfdff;
    padding: .55rem;
}

.sales-product-search {
    position: relative;
}

.sales-product-search #urunSuggest {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 35;
    max-height: 300px;
    overflow: auto;
    border: 1px solid #dce5ef;
    border-radius: 10px;
    box-shadow: 0 14px 24px rgba(11, 33, 52, 0.14);
    background: #fff;
}

.sales-product-search #urunSuggest:empty {
    display: none;
}

.summary-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.summary-box {
    border: 1px solid #dce5ef;
    border-radius: 10px;
    padding: .5rem .6rem;
    background: #fff;
}

.summary-label { font-size: .73rem; color: var(--muted); }
.summary-value { font-size: 1rem; font-weight: 700; }

.cari-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.cari-top-hero {
    border: 1px solid #c4d8f2;
    border-radius: 16px;
    background:
        radial-gradient(circle at 84% 18%, rgba(255, 209, 136, 0.38) 0%, rgba(255, 209, 136, 0) 45%),
        radial-gradient(circle at 14% 86%, rgba(90, 187, 255, 0.24) 0%, rgba(90, 187, 255, 0) 46%),
        linear-gradient(135deg, #0f5fae 0%, #2e8fd8 54%, #4aafc8 100%);
    color: #f7fbff;
    box-shadow: 0 16px 30px rgba(19, 65, 111, 0.22);
}

.cari-top-hero .text-muted,
.cari-top-hero .small {
    color: rgba(241, 248, 255, 0.88) !important;
}

.cari-top-hero .fw-semibold {
    color: #ffffff;
}

.cari-top-hero .btn.btn-primary {
    border: 0;
    color: #0e3f72;
    background: linear-gradient(180deg, #ffffff 0%, #dff0ff 100%);
    box-shadow: 0 8px 18px rgba(12, 40, 75, 0.25);
}

.cari-top-hero .btn.btn-primary:hover {
    background: linear-gradient(180deg, #ffffff 0%, #cfe8ff 100%);
}

.cari-top-hero .row.g-2 > div {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: .52rem .6rem;
    backdrop-filter: blur(2px);
}

.cari-top-hero .row.g-2 > div.col-12 {
    background: rgba(8, 30, 53, 0.2);
}

.cari-top-hero .text-danger,
.cari-top-hero .text-success {
    color: #ffffff !important;
}

.cari-summary-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.cari-summary-card {
    border: 1px solid #dbe6f1;
    border-radius: 12px;
    padding: .62rem .68rem;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    min-height: 78px;
}

.cari-summary-card .label {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #60758d;
}

.cari-summary-card .value {
    margin-top: .28rem;
    font-weight: 700;
    color: #1d3147;
    font-size: .98rem;
}

.cari-summary-card.risk-high {
    background: linear-gradient(180deg, #fff4f5 0%, #ffe8eb 100%);
    border-color: #f2c3cb;
}

.cari-summary-card.risk-warn {
    background: linear-gradient(180deg, #fff8ec 0%, #ffefd7 100%);
    border-color: #f2d2a3;
}

.cari-summary-card.risk-ok {
    background: linear-gradient(180deg, #f1fbf4 0%, #e3f6e9 100%);
    border-color: #bfe5cb;
}

.project-mini-card {
    border: 1px solid #d8e3f0;
    border-radius: 10px;
    padding: .55rem .6rem;
    background: #fbfdff;
}

.risk-progress-wrap .progress {
    height: 10px;
    background: #e3ebf4;
}

.vade-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.vade-item {
    border: 1px solid #dce5ef;
    border-radius: 10px;
    padding: .48rem .55rem;
    background: #fdfefe;
}

.vade-item .label {
    font-size: .72rem;
    color: #6a7e93;
}

.vade-item .value {
    font-size: .9rem;
    font-weight: 700;
    color: #21364c;
}

.cari-timeline {
    display: grid;
    gap: 9px;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 4px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 14px 1fr;
    gap: 8px;
}

.timeline-item .dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    margin-top: 7px;
    background: #2b79b3;
    box-shadow: 0 0 0 3px rgba(43, 121, 179, 0.18);
}

.cari-compact-list {
    display: grid;
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 2px;
}

.compact-item {
    border: 1px solid #dce5ef;
    border-radius: 10px;
    background: #fbfdff;
    padding: .5rem .58rem;
}

.behavior-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.behavior-item {
    border: 1px solid #dce5ef;
    border-radius: 10px;
    background: #fff;
    padding: .56rem .6rem;
}

.behavior-item .label {
    font-size: .72rem;
    color: #6b8095;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.behavior-item .value {
    font-weight: 700;
    font-size: .96rem;
    color: #21364c;
    margin-top: .2rem;
}

.behavior-item-strong {
    background: linear-gradient(180deg, #f2f8ff 0%, #e4f0ff 100%);
    border-color: #b8d2ee;
}

.status-chip,
.badge-chip {
    border-radius: 999px;
    padding: .22rem .68rem;
    font-size: .77rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
}

.risk-high { background: #ffe9eb; color: var(--danger); }
.risk-warn { background: #fff4e2; color: var(--warn); }
.risk-ok { background: #e8f8ef; color: var(--ok); }
.risk-low { background: #e8f8ef; color: var(--ok); }
.risk-clear { background: #edf4ff; color: #204f89; }

.stock-ok { background: #e8f8ef; color: var(--ok); }
.stock-critical { background: #fff4e2; color: var(--warn); }
.stock-empty { background: #ffe9eb; color: var(--danger); }

.table-wrap { overflow-x: auto; }

.sales-grid-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f7fbff;
    box-shadow: inset 0 -1px 0 #dce5ef;
}

.table thead th {
    font-size: .76rem;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
    cursor: pointer;
}

.table tbody tr { transition: background-color .18s ease; }
.table tbody tr:hover { background: #f6f9fd; }

.table-dense th,
.table-dense td {
    padding: .52rem .52rem;
    font-size: .86rem;
    vertical-align: middle;
}

.sortable-header::after {
    content: ' ↕';
    color: #a0adbc;
    font-size: .75rem;
}

.erp-row-hidden-page {
    display: none !important;
}

.erp-pager {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
    padding-top: 10px;
}

.round-icon-actions {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.round-icon-actions-wrap {
    flex-wrap: wrap;
}

.round-icon-btn {
    width: auto;
    min-width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid #d1dfed;
    background: linear-gradient(180deg, #ffffff 0%, #f5faff 100%);
    color: #1f4f78;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 0 8px;
    gap: 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(21, 57, 92, 0.08);
    transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, color .14s ease, background .14s ease, padding .16s ease;
}

.round-icon-btn i {
    font-size: .9rem;
    flex-shrink: 0;
}

.round-icon-btn:hover {
    background: linear-gradient(180deg, #ffffff 0%, #edf6ff 100%);
    color: #0f3d63;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 46, 78, 0.14);
}

.round-icon-btn:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 3px rgba(35, 111, 173, 0.2), 0 4px 12px rgba(16, 46, 78, 0.14);
}

.round-icon-btn[data-action-text]::after {
    content: attr(data-action-text);
    display: inline-block;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: currentColor;
    margin-left: 0;
    transition: max-width .18s ease, opacity .16s ease, margin-left .18s ease;
}

.round-icon-btn[data-action-text]:hover::after,
.round-icon-btn[data-action-text]:focus-visible::after {
    max-width: 118px;
    opacity: 1;
    margin-left: 6px;
}

.round-icon-btn[data-action-text]:hover,
.round-icon-btn[data-action-text]:focus-visible {
    padding-right: 10px;
}

@media (max-width: 991px) {
    .round-icon-btn[data-action-text]::after {
        display: none;
    }
}

.round-icon-btn.btn-detail {
    border-color: #c9deef;
    color: #1d5d88;
}

.round-icon-btn.btn-stock-in {
    border-color: #c8d8ee;
    color: #1e5f9b;
    background: linear-gradient(180deg, #ffffff 0%, #f0f6ff 100%);
}

.round-icon-btn.btn-price {
    border-color: #d8d3ef;
    color: #5a4796;
    background: linear-gradient(180deg, #ffffff 0%, #f6f3ff 100%);
}

.round-icon-btn.btn-edit {
    border-color: #d5e4c7;
    color: #3e6c22;
}

.round-icon-btn.btn-delete {
    border-color: #f1d0d5;
    color: #ad2631;
}

.right-panel {
    border-left: 1px dashed #dce5ef;
    padding-left: .8rem;
}

.cari-drawer {
    min-height: 520px;
    transform: translateX(18px);
    opacity: .76;
    transition: transform .28s ease, opacity .28s ease;
}

.cari-drawer.open {
    transform: translateX(0);
    opacity: 1;
}

.nav-tabs-sm .nav-link {
    font-size: .75rem;
    padding: .3rem .5rem;
}

.tab-pane-box {
    border: 1px solid #dde6f0;
    border-radius: 10px;
    padding: .45rem .55rem;
    background: #fdfefe;
    max-height: 290px;
    overflow: auto;
}

.sales-history-report {
    display: grid;
    gap: 10px;
}

.sales-report-row {
    border: 1px solid #dbe6f1;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: .55rem .65rem;
    display: grid;
    gap: 6px;
}

.sales-report-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.sales-report-no {
    font-size: .84rem;
    font-weight: 700;
    color: #1a3e61;
}

.sales-report-meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 12px;
    font-size: .76rem;
    color: #5d7288;
}

.sales-report-progress {
    height: 8px;
    background: #e5edf6;
    border-radius: 999px;
    overflow: hidden;
}

.sales-report-progress > span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #1f8a48 0%, #4aa85d 100%);
}

.sales-report-foot {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: .76rem;
    color: #4f667e;
}

.sales-report-foot strong {
    color: #1f3349;
}

.sale-row-low {
    background: #fff8e7;
}

.sale-row-empty {
    background: #ffebee;
}

.sale-row-hidden {
    display: none;
}

.sales-grid-table .stock-stack,
.sales-grid-table .cell-stack,
.sales-grid-table .margin-stack {
    display: grid;
    gap: 2px;
}

.sales-grid-table .cell-stack strong,
.sales-grid-table .margin-stack strong {
    font-size: .84rem;
}

.stock-reference {
    font-size: .74rem;
    color: var(--muted);
}

.stock-meter {
    width: 100%;
    height: 6px;
    background: #e6eef6;
    border-radius: 999px;
    overflow: hidden;
}

.stock-meter > span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #1f8a48 0%, #6db95e 100%);
}

.sale-row-low .stock-meter > span {
    background: linear-gradient(90deg, #d88700 0%, #f3bf4f 100%);
}

.sale-row-empty .stock-meter > span {
    background: linear-gradient(90deg, #b92222 0%, #ea6b6b 100%);
}

.margin-stack.negative strong { color: #b92222; }
.margin-stack.positive strong { color: #1f8a48; }

.sales-table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: .15rem;
}

.sales-empty-state {
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px dashed #c8d7e6;
    border-radius: 14px;
    background: #f8fbff;
    padding: .9rem 1rem;
}

.sales-empty-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #e9f1fb;
    color: #245283;
    font-size: 1.35rem;
}

.sales-sticky-totals {
    position: sticky;
    bottom: 0;
    z-index: 5;
    background: #f7fbff;
    border-radius: 12px;
    padding: .35rem;
    border: 1px solid #dce5ef;
}

.last-actions-list {
    max-height: 230px;
    overflow: auto;
}

.last-actions-list .item {
    border-bottom: 1px solid #ebf0f5;
    padding: .45rem 0;
}

.dashboard-launchpad {
    background: linear-gradient(135deg, #fff 0%, #f3f8fe 100%);
}

.dashboard-launch-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.dashboard-empty-state {
    min-height: 120px;
    align-items: center;
}

.dashboard-chart-wrap {
    position: relative;
    width: 100%;
    height: 320px;
}

.dashboard-chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

.customer-health-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.sales-right-rail {
    position: relative;
}

.sales-rail-sticky {
    position: sticky;
    top: 74px;
}

.rail-widget {
    border: 1px solid #dce5ef;
    border-radius: 12px;
    background: #fbfdff;
    padding: .7rem;
}

.rail-widget-title {
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
    margin-bottom: .45rem;
}

.settlement-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: .55rem;
}

.settlement-grid span {
    display: block;
    font-size: .72rem;
    color: var(--muted);
}

.settlement-grid strong {
    display: block;
    font-size: .9rem;
}

.settlement-progress {
    height: 8px;
    background: #e7eef6;
    border-radius: 999px;
    overflow: hidden;
}

.settlement-progress-bar {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #12385d 0%, #2f6ca2 100%);
    transition: width .2s ease;
}

.sales-mini-list {
    display: grid;
    gap: 8px;
}

.mini-list-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    padding-bottom: .45rem;
    border-bottom: 1px solid #ebf0f5;
}

.mini-list-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.mini-list-empty {
    font-size: .82rem;
    color: var(--muted);
}

.mini-list-code {
    font-size: .72rem;
    color: var(--muted);
}

.sales-activity-feed {
    display: grid;
    gap: 10px;
    max-height: 280px;
    overflow: auto;
    padding-right: 4px;
}

.sales-activity-feed-modal {
    max-height: 420px;
}

.activity-item {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.activity-item.muted {
    opacity: .78;
}

.activity-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #1f8a48;
    margin-top: 5px;
    box-shadow: 0 0 0 4px rgba(31, 138, 72, 0.12);
}

.activity-item.warn .activity-dot {
    background: #d88700;
    box-shadow: 0 0 0 4px rgba(216, 135, 0, 0.12);
}

.activity-item.danger .activity-dot {
    background: #b92222;
    box-shadow: 0 0 0 4px rgba(185, 34, 34, 0.12);
}

.toast-host {
    position: fixed;
    right: 12px;
    bottom: 12px;
    z-index: 2000;
    display: grid;
    gap: 8px;
}

.toast-msg {
    min-width: 220px;
    max-width: 320px;
    border-radius: 10px;
    padding: .55rem .8rem;
    font-size: .88rem;
    color: #fff;
    box-shadow: 0 10px 22px rgba(7, 19, 33, 0.18);
    animation: toast-in .24s ease;
}

.toast-info { background: #265f95; }
.toast-success { background: #1f8a48; }
.toast-error { background: #b92222; }

.toast-msg.fade-out {
    opacity: 0;
    transform: translateY(8px);
    transition: all .3s ease;
}

.qs-lite-hide {
    display: none !important;
}

.quick-sales-lite .sales-grid-table th:nth-child(1),
.quick-sales-lite .sales-grid-table th:nth-child(3),
.quick-sales-lite .sales-grid-table th:nth-child(6),
.quick-sales-lite .sales-grid-table th:nth-child(7),
.quick-sales-lite .sales-grid-table th:nth-child(8),
.quick-sales-lite .sales-grid-table th:nth-child(9),
.quick-sales-lite .sales-grid-table th:nth-child(10),
.quick-sales-lite .sales-grid-table th:nth-child(12),
.quick-sales-lite .sales-grid-table th:nth-child(13),
.quick-sales-lite .sales-grid-table td:nth-child(1),
.quick-sales-lite .sales-grid-table td:nth-child(3),
.quick-sales-lite .sales-grid-table td:nth-child(6),
.quick-sales-lite .sales-grid-table td:nth-child(7),
.quick-sales-lite .sales-grid-table td:nth-child(8),
.quick-sales-lite .sales-grid-table td:nth-child(9),
.quick-sales-lite .sales-grid-table td:nth-child(10),
.quick-sales-lite .sales-grid-table td:nth-child(12),
.quick-sales-lite .sales-grid-table td:nth-child(13) {
    display: none;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.global-loading {
    position: fixed;
    inset: 0;
    background: rgba(12, 26, 42, 0.55);
    display: grid;
    place-items: center;
    z-index: 1800;
}

.loading-card {
    min-width: 200px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.3);
    background: rgba(10, 30, 49, .76);
    color: #fff;
    text-align: center;
    padding: 1rem;
}

.mobile-card { display: none; }

@media (max-width: 991.98px) {
    .layout-wrap { display: block; }

    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        display: none;
    }

    body.sidebar-open-mobile .sidebar { display: block; }

    .sidebar .nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .topbar { padding: .8rem; }
    .page-body { padding: .7rem; }

    .global-search-wrap {
        width: 100%;
        margin-top: .35rem;
    }

    .topbar {
        flex-direction: column;
        align-items: stretch;
        gap: .55rem;
    }

    .topbar-left,
    .topbar-right {
        width: 100%;
        flex-wrap: wrap;
    }

    .alert-chip {
        font-size: .74rem;
    }

    .quick-btn {
        min-height: 56px;
        font-size: 1rem;
        border-radius: 12px;
    }

    .sales-kpi-grid,
    .sales-shortcuts,
    .customer-health-grid,
    .sales-secondary-metrics,
    .dashboard-launch-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sales-advanced-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sales-customer-slots {
        grid-template-columns: 1fr;
    }

    .sales-grid-table thead th {
        position: static;
    }

    .sales-table-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .sales-rail-sticky {
        position: static;
    }

    .summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cari-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .vade-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .behavior-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    .dashboard-chart-wrap {
        height: 260px;
    }
}

@media (max-width: 767.98px) {
    .top-clock { display: none; }

    .table-mobile-card thead { display: none; }
    .table-mobile-card tbody,
    .table-mobile-card tr,
    .table-mobile-card td {
        display: block;
        width: 100%;
    }

    .table-mobile-card tr {
        border: 1px solid #dce5ef;
        border-radius: 10px;
        margin-bottom: 10px;
        background: #fff;
        padding: 6px;
    }

    .table-mobile-card td {
        border: 0;
        padding: .28rem .42rem;
        position: relative;
        padding-left: 42%;
        min-height: 28px;
    }

    .table-mobile-card td::before {
        content: attr(data-label);
        position: absolute;
        left: .42rem;
        top: .28rem;
        width: 38%;
        font-size: .72rem;
        color: var(--muted);
        text-transform: uppercase;
    }

    .table-mobile-card td.table-action-cell {
        padding-left: .42rem;
        padding-top: .55rem;
    }

    .table-mobile-card td.table-action-cell::before {
        position: static;
        display: block;
        width: auto;
        margin-bottom: .38rem;
    }

    .table-mobile-card td.table-action-cell .round-icon-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .table-mobile-card tr {
        box-shadow: 0 10px 20px rgba(15, 33, 56, 0.05);
    }

    .sales-kpi-grid,
    .sales-shortcuts,
    .customer-health-grid,
    .sales-secondary-metrics,
    .summary-strip,
    .cari-summary-grid,
    .vade-grid,
    .behavior-grid,
    .sales-advanced-filter-grid,
    .settlement-grid,
    .dashboard-launch-grid {
        grid-template-columns: 1fr;
    }

    .cari-quick-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .sales-side-metric,
    .sales-table-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .sales-grid-table .stock-meter {
        max-width: 180px;
    }

    .dashboard-chart-wrap {
        height: 220px;
    }
}

/* ═══════════════════════════════════════════════════════
   POS SCREEN  —  Hızlı Satış (index.php?p=hizli-satis)
═══════════════════════════════════════════════════════ */

/* Scope page-body padding removal to pages that contain .pos-screen */
.page-body:has(.pos-screen) {
    padding: 0 !important;
    overflow: hidden;
    flex: 1;
    min-height: 0;
    height: auto;
}

main.content-area:has(.pos-screen) {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Root POS container */
.pos-screen {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: var(--bg);
}

/* Two-panel body */
.pos-body {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* ── LEFT PANEL ──────────────────────────────────── */
.pos-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-right: 2px solid #ccd9e8;
}

/* Customer info bar */
.pos-cari-bar {
    background: linear-gradient(135deg, #173756 0%, #234d75 58%, #2c5f8f 100%);
    color: #e8f2fc;
    padding: .85rem 1rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-shrink: 0;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(255,255,255,.08);
    box-shadow: inset 0 -1px 0 rgba(255,255,255,.05);
}
.pos-cari-bar .status-chip { font-size: .73rem; }
.pos-cari-bar-info { display: grid; gap: 4px; min-height: 28px; flex: 1; min-width: 0; }
.pos-cari-bar-label { font-size: .73rem; letter-spacing: .04em; text-transform: uppercase; opacity: .72; white-space: nowrap; }
.pos-cari-bar-opts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex-shrink: 0; padding-top: .15rem; }
.pos-cari-bar .form-check-label { color: rgba(255,255,255,.8); font-size: .83rem; }
.pos-cari-bar .btn { color: rgba(255,255,255,.8); border-color: rgba(255,255,255,.3); }
.pos-cari-bar .btn:hover { background: rgba(255,255,255,.15); color: #fff; }
.pos-open-debt { color: #ffaaaa !important; }
.pos-cari-main-line,
.pos-cari-meta-line,
.pos-cari-customer-line {
    display: flex;
    align-items: center;
    gap: 8px 14px;
    flex-wrap: wrap;
    min-width: 0;
}
.pos-cari-title-block {
    display: grid;
    gap: 2px;
}
.pos-cari-title {
    font-size: 1.16rem;
    line-height: 1.1;
    color: #fff;
}
.pos-cari-meta-line {
    font-size: .8rem;
    color: rgba(232,242,252,.92);
}
.pos-cari-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: .28rem .55rem;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
}
.pos-cari-meta-item .meta-label {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: rgba(232,242,252,.68);
}
.pos-cari-meta-item strong {
    color: #fff;
    font-weight: 700;
}
.pos-cari-address {
    max-width: min(580px, 100%);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pos-linked-customer-card {
    display: grid;
    gap: 8px;
    padding: .55rem .7rem;
    border-radius: 14px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    min-width: min(100%, 520px);
}
.pos-linked-customer-card-empty {
    min-width: auto;
}
.pos-linked-customer-head,
.pos-linked-customer-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.pos-add-customer-btn {
    color: #173756 !important;
    border-color: transparent !important;
    background: #f2f7fd !important;
    font-weight: 600;
}
.pos-add-customer-btn:hover {
    background: #ffffff !important;
    color: #102b44 !important;
}
.pos-inline-select {
    width: min(280px, 100%);
    min-width: 220px;
    background: rgba(255,255,255,.98);
    border-color: rgba(255,255,255,.25);
    color: #173756;
}
.pos-linked-customer-summary {
    flex: 1;
    min-width: 180px;
    display: grid;
    gap: 2px;
    padding: .45rem .7rem;
    border-radius: 12px;
    background: rgba(11, 28, 45, .18);
    border: 1px solid rgba(255,255,255,.1);
    color: rgba(232,242,252,.88);
}
.pos-linked-customer-summary strong {
    color: #fff;
    font-size: .88rem;
    line-height: 1.2;
}
.pos-linked-customer-summary span {
    font-size: .77rem;
    line-height: 1.3;
    color: rgba(232,242,252,.74);
}
@media (max-width: 991px) {
    .page-body:has(.pos-screen) {
        height: auto;
    }
    .pos-cari-bar {
        padding: .6rem .7rem;
        gap: 12px;
    }
    .pos-cari-title {
        font-size: 1rem;
    }
    .pos-cari-meta-line {
        font-size: .75rem;
    }
    .pos-cari-meta-item {
        padding: .2rem .45rem;
        gap: 5px;
    }
    .pos-search-bar {
        padding: .35rem .6rem;
    }
    .pos-search-controls {
        gap: 6px;
    }
    .pos-qty-select {
        width: 100px;
        flex: 0 0 100px;
    }
    .pos-search-input {
        font-size: .85rem;
    }
    .pos-recent-chips {
        gap: 3px;
        padding-bottom: 1px;
    }
    .pos-recent-chips .list-group-item {
        min-width: 140px;
        padding: .15rem .5rem !important;
        font-size: .7rem;
    }
}

/* Product search bar */
.pos-search-bar {
    padding: .45rem .75rem;
    background: #fff;
    border-bottom: 1px solid #dce5ef;
    flex-shrink: 0;
}
.pos-search-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}
.pos-search-controls .pos-search-inner {
    flex: 1;
}
.pos-search-inner {
    position: relative;
    display: flex;
    align-items: center;
    background: #f3f7fd;
    border: 1.5px solid #bdd2e9;
    border-radius: 8px;
    padding: 0 .65rem;
    transition: border-color .18s;
}
.pos-search-inner:focus-within { border-color: #1567a0; }
.pos-search-icon { color: #6b90b5; margin-right: .4rem; font-size: 1rem; flex-shrink: 0; }
.pos-search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: .48rem 0;
    font-size: .93rem;
    outline: none;
}
.pos-qty-select {
    width: 120px;
    flex: 0 0 120px;
}
.pos-suggest-list {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    z-index: 50;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #bdd2e9;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(10, 30, 60, .16);
    background: #fff;
}
.pos-suggest-list:empty { display: none; }
.pos-suggest-item {
    display: grid;
    gap: 8px;
    padding: .7rem .8rem;
    border: 0;
    border-bottom: 1px solid #e6eef7;
}
.pos-suggest-item:last-child {
    border-bottom: 0;
}
.pos-suggest-item:hover {
    background: #f3f8fe;
}
.pos-suggest-item.active {
    background: #1a3c5d;
    color: #fff;
}
.pos-suggest-item.active .text-muted,
.pos-suggest-item.active .mini-list-code,
.pos-suggest-item.active .pos-suggest-price-box strong,
.pos-suggest-item.active .pos-suggest-price-box span {
    color: #fff !important;
}
.pos-suggest-item.active .pos-suggest-chip,
.pos-suggest-item.active .pos-suggest-chip-ok,
.pos-suggest-item.active .pos-suggest-chip-warn,
.pos-suggest-item.active .pos-suggest-chip-danger {
    background: rgba(255, 255, 255, .16);
    color: #fff;
}
.pos-suggest-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}
.pos-suggest-price-box {
    display: grid;
    gap: 2px;
    text-align: right;
    flex-shrink: 0;
}
.pos-suggest-price-box strong {
    color: #12385d;
    font-size: .95rem;
}
.pos-suggest-price-box span {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #60758d;
}
.pos-suggest-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.pos-suggest-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: .16rem .5rem;
    border-radius: 999px;
    background: #eef4fb;
    color: #35506b;
    font-size: .71rem;
    font-weight: 600;
}
.pos-suggest-chip-ok {
    background: #e9f8ef;
    color: #1f8a48;
}
.pos-suggest-chip-warn {
    background: #fff4e2;
    color: #c47608;
}
.pos-suggest-chip-danger {
    background: #ffe9eb;
    color: #ba181b;
}

/* Recent product chips */
.pos-recent-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
    margin-top: .3rem;
    max-height: 40px;
    overflow: hidden;
    padding-bottom: 2px;
}
.pos-recent-chips:empty { display: none; }
.pos-recent-chips .list-group-item {
    border: 1px solid #ccdded !important;
    border-radius: 20px !important;
    padding: .18rem .6rem !important;
    font-size: .74rem;
    cursor: pointer;
    background: #fff;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    width: auto;
    min-width: 180px;
    white-space: nowrap;
}
.pos-recent-chips .list-group-item:hover { background: #e3f0fc; }

/* Scrollable rows area */
.pos-rows-area {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background: #fff;
}
.pos-table-head th {
    background: #1a3c5e !important;
    color: #d0e5f7 !important;
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    position: sticky;
    top: 0;
    z-index: 5;
    white-space: nowrap;
    border-color: #254d72 !important;
}
.pos-sale-table td { font-size: .86rem; vertical-align: middle; }
.pos-aciklama { display: grid; gap: 1px; line-height: 1.3; }
.pos-stok-badge { font-size: .67rem !important; padding: .08rem .42rem !important; vertical-align: middle; }
.pos-price-history { font-size: .78rem; color: #6b7280; padding: .4rem 0.5rem !important; }
.pos-del-btn {
    width: 28px; height: 28px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .78rem;
}
.pos-sale-table .row-total { color: #a01010; font-size: .9rem; }

/* Empty state */
.pos-empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    padding: 1.5rem 1rem;
    min-height: 84px;
    color: var(--muted);
    font-size: .9rem;
    border-top: 1px dashed #dce5ef;
}
.pos-empty-state i { font-size: 1.8rem; flex-shrink: 0; }

.pos-note-row td {
    background: #f8fbff;
    border-top: 0 !important;
}
.pos-note-editor {
    display: grid;
    gap: 4px;
    padding: .3rem 0;
}

/* Footer bar */
.pos-footer-bar {
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    border-top: 2px solid #ccd9e8;
    background: #f5f9fe;
    flex-shrink: 0;
    max-height: 195px;
}

/* Totals block — now lives inside the right actions block */
.pos-totals-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-bottom: .4rem;
    border-bottom: 1px solid #dce5ef;
}
.pos-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.pos-total-main { font-size: 1rem; font-weight: 700; color: #1e2b3a; }
.pos-total-sub  { font-size: .78rem; color: var(--muted); }

/* Payment block — fixed width on the right side */
.pos-payment-block {
    width: 310px;
    flex-shrink: 1;
    min-width: 280px;
    padding: .5rem .7rem;
    border-right: 1px solid #dce5ef;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    gap: 0;
}

/* Actions block — fixed right column with totals + buttons */
.pos-actions-block {
    padding: .5rem .8rem;
    width: 220px;
    flex-shrink: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
@media (max-width: 1199px) {
    .pos-payment-block {
        width: 280px;
        min-width: 260px;
    }
    .pos-actions-block {
        width: 200px;
        min-width: 180px;
        padding: .5rem .6rem;
    }
}
@media (max-width: 991px) {
    .pos-payment-block {
        width: 250px;
        min-width: 220px;
        padding: .4rem .6rem;
    }
    .pos-actions-block {
        width: 180px;
        min-width: 160px;
        padding: .4rem .5rem;
    }
    .pos-actions-block .btn {
        font-size: .78rem;
        padding: .4rem .35rem !important;
    }
    .pos-complete-btn {
        font-size: .8rem;
        padding: .45rem .35rem;
    }
}
.pos-actions-block .btn { width: 100%; }
.pos-complete-btn { font-size: .9rem; font-weight: 700; padding: .55rem .5rem; }

/* Last prices mini-list */
.pos-last-prices { flex: 1; overflow: hidden; font-size: .78rem; }
.pos-last-prices-title {
    font-size: .68rem; text-transform: uppercase;
    letter-spacing: .06em; color: var(--muted); padding-bottom: .25rem;
}
.pos-last-prices .item { border-bottom: 1px solid #ecf1f6; padding: .28rem 0; }

/* ── RIGHT PANEL ─────────────────────────────────── */
.pos-right {
    width: 275px;
    flex-shrink: 1;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #eef4fb;
}
@media (max-width: 1199px) {
    .pos-right {
        width: 240px;
        min-width: 200px;
    }
}
@media (max-width: 991px) {
    .pos-right {
        width: 200px;
        min-width: 160px;
    }
    .pos-right-search {
        padding: .4rem .5rem;
    }
    .pos-cari-list .list-group-item {
        padding: .35rem .5rem;
        font-size: .78rem;
    }
}
.pos-right-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: .55rem .65rem;
    background: #12385d;
    color: #fff;
    flex-shrink: 0;
}
.pos-bul-label {
    font-weight: 700;
    font-size: .87rem;
    color: #a8c8e8;
    white-space: nowrap;
}
.pos-cari-list {
    flex: 1;
    overflow: hidden;
}
.pos-cari-list .list-group-item {
    border-left: none !important;
    border-right: none !important;
    border-radius: 0 !important;
    font-size: .82rem;
    padding: .5rem .7rem;
    cursor: pointer;
    background: transparent;
    border-color: #d6e4f0 !important;
    transition: background .14s;
}
.pos-cari-list .list-group-item:hover {
    background: #d6eaf8;
    color: #0f3e6e;
}
.pos-cari-list .list-group-item.active {
    background: #12385d !important;
    border-color: #12385d !important;
    color: #fff !important;
}

@media (max-width: 991px) {
    .page-body:has(.pos-screen) {
        overflow: auto;
    }

    main.content-area:has(.pos-screen) {
        height: auto;
        overflow: visible;
    }

    .pos-screen {
        overflow: auto;
    }

    .pos-body {
        flex-direction: column;
        overflow: visible;
    }

    .pos-left {
        border-right: 0;
        border-bottom: 1px solid #ccd9e8;
    }

    .pos-right {
        width: 100%;
        min-width: 0;
        max-height: 280px;
    }

    .pos-cari-list {
        overflow-y: auto;
    }

    .pos-footer-bar {
        flex-direction: column;
        max-height: none;
    }

    .pos-payment-block,
    .pos-actions-block {
        width: 100%;
        min-width: 0;
    }

    .pos-payment-block {
        border-right: 0;
        border-bottom: 1px solid #dce5ef;
    }
}
