:root {
    --pd-primary: #0d6e6e;
    --pd-primary-2: #0b8a7d;
    --pd-accent: #16a34a;
    --pd-bg: #f3f6f8;
    --pd-sidebar: #0f3d47;
    --pd-sidebar-2: #0c3039;
    --bs-primary: #0d6e6e;
    --bs-primary-rgb: 13, 110, 110;
    --bs-link-color: #0d6e6e;
    --bs-link-color-rgb: 13, 110, 110;
    --bs-body-font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}
body { background: var(--pd-bg); font-size: .9rem; color: #1f2d3d; }
.btn-primary { --bs-btn-bg: var(--pd-primary); --bs-btn-border-color: var(--pd-primary); --bs-btn-hover-bg: #0a5959; --bs-btn-hover-border-color: #0a5959; --bs-btn-active-bg: #084848; }
.btn-outline-primary { --bs-btn-color: var(--pd-primary); --bs-btn-border-color: var(--pd-primary); --bs-btn-hover-bg: var(--pd-primary); --bs-btn-hover-border-color: var(--pd-primary); --bs-btn-active-bg: var(--pd-primary); --bs-btn-active-border-color: var(--pd-primary); }
.text-primary { color: var(--pd-primary) !important; }
.bg-primary { background-color: var(--pd-primary) !important; }
.form-check-input:checked { background-color: var(--pd-primary); border-color: var(--pd-primary); }

.app-wrap { display: flex; min-height: 100vh; }
.sidebar { width: 250px; flex-shrink: 0; background: linear-gradient(180deg, var(--pd-sidebar), var(--pd-sidebar-2)); color: #cfe3e6; position: fixed; inset: 0 auto 0 0; overflow-y: auto; z-index: 1030; transition: transform .2s; }
.sidebar::-webkit-scrollbar { width: 6px; } .sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 3px; }
.brand { display: flex; align-items: center; gap: .65rem; padding: 1.1rem 1rem; color: #fff; text-decoration: none; }
.brand-logo { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, #22c55e, #0ea5a4); display: grid; place-items: center; font-size: 1.3rem; color: #fff; }
.brand-name { display: block; font-weight: 800; letter-spacing: .06em; line-height: 1.1; }
.brand-sub { display: block; color: #9cc3c8; font-size: .72rem; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-search { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); color: #fff; }
.menu-search::placeholder { color: #8fb3b8; } .menu-search:focus { background: rgba(255,255,255,.12); color: #fff; }
.menu { padding: .25rem .6rem 2rem; }
.menu-head { width: 100%; display: flex; align-items: center; gap: .7rem; background: none; border: 0; color: #d6e9ec; padding: .55rem .7rem; border-radius: 10px; font-weight: 600; font-size: .86rem; text-align: left; }
.menu-head:hover { background: rgba(255,255,255,.07); }
.menu-head .caret { margin-left: auto; font-size: .7rem; transition: transform .2s; }
.menu-group.open > .menu-head { background: rgba(255,255,255,.08); color: #fff; }
.menu-group.open > .menu-head .caret { transform: rotate(180deg); }
.menu-children { display: none; padding: .2rem 0 .4rem 2.15rem; }
.menu-group.open .menu-children { display: block; }
.menu-link { display: block; color: #a9c7cb; text-decoration: none; padding: .32rem .6rem; border-radius: 8px; font-size: .83rem; }
.menu-link:hover { color: #fff; background: rgba(255,255,255,.06); }
.menu-link.active { color: #fff; background: var(--pd-primary-2); font-weight: 600; }

.main { margin-left: 250px; flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 1020; background: linear-gradient(90deg, var(--pd-primary), var(--pd-primary-2)); color: #fff; padding: .55rem 1.25rem; display: flex; align-items: center; gap: 1.5rem; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.topbar-info small { display: block; font-size: .68rem; opacity: .8; line-height: 1; }
.topbar-info strong { font-size: .85rem; }
.content { padding: 1.25rem; flex: 1; }
.footer { padding: .75rem 1.25rem; color: #8a99a8; font-size: .75rem; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.page-title { font-size: 1.45rem; font-weight: 800; color: var(--pd-primary); margin: 0; }

.card { border: 0; border-radius: 14px; box-shadow: 0 1px 3px rgba(16,24,40,.06), 0 1px 2px rgba(16,24,40,.04); }
.card-header { background: #fff; border-bottom: 1px solid #eef2f4; font-weight: 700; border-radius: 14px 14px 0 0 !important; padding: .8rem 1rem; }
.table { --bs-table-hover-bg: #f4fbfa; margin-bottom: 0; }
.table thead th { background: #f1f6f7; color: #3b4f5c; font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .02em; border-bottom: 0; white-space: nowrap; }
.table td { vertical-align: middle; }
.table-sm td, .table-sm th { padding: .4rem .5rem; }
.stat { padding: 1rem 1.1rem; display: flex; gap: .9rem; align-items: center; }
.stat-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.35rem; flex-shrink: 0; }
.stat small { color: #6b7c8a; font-weight: 600; font-size: .75rem; }
.stat .val { font-size: 1.25rem; font-weight: 800; line-height: 1.2; }
.bg-soft-primary { background: #e0f2f1; color: var(--pd-primary); }
.bg-soft-success { background: #dcfce7; color: #15803d; }
.bg-soft-warning { background: #fef3c7; color: #b45309; }
.bg-soft-danger { background: #fee2e2; color: #b91c1c; }
.bg-soft-info { background: #e0f2fe; color: #0369a1; }
.form-label { font-weight: 600; font-size: .8rem; color: #42566a; margin-bottom: .25rem; }
.required::after { content: ' *'; color: #dc3545; }
.badge-class { font-size: .68rem; }
.dc-narkotika, .dc-psikotropika { background: #fee2e2; color: #b91c1c; }
.dc-keras, .dc-oot, .dc-prekursor { background: #fef3c7; color: #92400e; }
.dc-bebas, .dc-bebas_terbatas { background: #dcfce7; color: #166534; }
.money { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.line-table input, .line-table select { min-width: 70px; }
.ts-wrapper.form-select-sm .ts-control, .ts-wrapper.form-control-sm .ts-control { padding: .25rem .5rem; min-height: 31px; font-size: .85rem; }
.empty { text-align: center; color: #8a99a8; padding: 2rem 1rem; }

/* POS */
.pos-search { font-size: 1rem; padding: .7rem 1rem; border-radius: 12px; }
.pos-results { position: absolute; z-index: 1050; left: 0; right: 0; top: 100%; max-height: 420px; overflow-y: auto; background: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.15); }
.pos-results .item { padding: .55rem .9rem; cursor: pointer; border-bottom: 1px solid #f1f4f6; }
.pos-results .item.hl, .pos-results .item:hover { background: #e0f2f1; }
.pos-total { font-size: 2rem; font-weight: 800; color: var(--pd-primary); }
.kbd { font-size: .65rem; background: rgba(255,255,255,.25); border-radius: 4px; padding: 0 .3rem; }

@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: none; }
    .main { margin-left: 0; }
}
@media print {
    .sidebar, .topbar, .footer, .page-head .d-flex, .no-print, .alert { display: none !important; }
    .main { margin: 0; } .content { padding: 0; } .card { box-shadow: none; }
    body { background: #fff; }
}

/* Auth */
.auth-bg { min-height: 100vh; background: radial-gradient(circle at 20% 20%, #14b8a6 0, transparent 40%), radial-gradient(circle at 80% 80%, #22c55e 0, transparent 35%), linear-gradient(135deg, #0f3d47, #0d6e6e); display: grid; place-items: center; padding: 1rem; }
.auth-card { width: 100%; max-width: 410px; border-radius: 20px; }
[x-cloak] { display: none !important; }
