/* Management console: dark slate sidebar, light work area, cobalt accent. */
:root {
    --bg: #12161b;
    --panel: #1b2027;
    --panel-2: #222831;
    --border: #313945;
    --text: #e6eaf0;
    --text-dim: #98a3b3;
    --accent: #4589ff;
    --accent-hover: #6ea0ff;
    --accent-ink: #0b1220;
    --accent-2: #78a9ff;
    --danger: #ff7b82;
    --ok: #42be65;
    --warn: #f1c21b;
    --radius: 4px;
    --sidebar-bg: #0c0f13;
    --sidebar-text: #a4aebd;
    --sidebar-hover: #181d24;
    --sidebar-active: #1d2530;
    --topbar-bg: #1b2027;
}

:root[data-theme="light"] {
    --bg: #f2f4f7;
    --panel: #ffffff;
    --panel-2: #f7f8fa;
    --border: #dde1e7;
    --text: #161d26;
    --text-dim: #5b6675;
    --accent: #0f62fe;
    --accent-hover: #0050e6;
    --accent-ink: #ffffff;
    --accent-2: #0f62fe;
    --danger: #da1e28;
    --ok: #198038;
    --warn: #b28600;
    --sidebar-bg: #161c26;
    --sidebar-text: #aab4c3;
    --sidebar-hover: #202938;
    --sidebar-active: #263246;
    --topbar-bg: #ffffff;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.app { display: flex; min-height: 100vh; }

.sidebar {
    width: 232px;
    flex-shrink: 0;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}
.sidebar .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
    height: 56px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    color: #fff;
}
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 3px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.5px;
}
.brand-text { font-weight: 600; font-size: 14px; line-height: 1.2; }
.brand-text small { display: block; font-weight: 400; font-size: 11px; color: var(--sidebar-text); }

.sidenav { padding: 10px 0; overflow-y: auto; }
.nav-section {
    padding: 14px 18px 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #6f7a8b;
}
.sidenav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 18px;
    border-left: 3px solid transparent;
    color: var(--sidebar-text);
    font-size: 13.5px;
}
.sidenav a:hover { background: var(--sidebar-hover); color: #fff; text-decoration: none; }
.sidenav a.active {
    background: var(--sidebar-active);
    border-left-color: var(--accent);
    color: #fff;
    font-weight: 500;
}
.ico { width: 17px; height: 17px; flex-shrink: 0; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 56px;
    padding: 0 28px;
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; }
.breadcrumbs a { color: var(--text-dim); }
.breadcrumbs a:hover { color: var(--accent-2); }
.breadcrumbs .sep { color: var(--border); }
.breadcrumbs .current { color: var(--text); font-weight: 600; }

.header .user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-dim);
}
.user-name { color: var(--text); font-weight: 500; }

.badge-role {
    padding: 1px 8px;
    border-radius: 3px;
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    color: var(--accent-2);
    font-size: 11.5px;
    font-weight: 600;
}

.btn-logout {
    padding: 5px 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-size: 13px;
}
.btn-logout:hover { border-color: var(--danger); color: var(--danger); }

.container {
    max-width: 1180px;
    width: 100%;
    margin: 0 auto;
    padding: 28px 28px 64px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.page-header h1 { margin: 0; font-size: 22px; font-weight: 600; }
.page-header p { margin: 4px 0 0; color: var(--text-dim); font-size: 14px; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    min-height: 36px;
    border-radius: var(--radius);
    border: 1px solid var(--accent);
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 500;
    cursor: pointer;
    font-size: 14px;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); text-decoration: none; }
.btn.secondary {
    background: var(--panel);
    border: 1px solid var(--border);
    color: var(--text);
}
.btn.secondary:hover { background: var(--panel-2); border-color: var(--text-dim); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger:hover { background: var(--danger); border-color: var(--danger); filter: brightness(0.92); }

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.mesin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}

.mesin-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}
.mesin-card { border-top: 3px solid var(--accent); box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05); }
.mesin-card:hover { border-color: var(--accent); text-decoration: none; }
.mesin-card:hover .code { color: var(--accent-2); }

.mesin-card .code {
    font-family: ui-monospace, 'Consolas', monospace;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1px;
}

.mesin-card .nama { margin: 6px 0 2px; font-size: 16px; font-weight: 600; }
.mesin-card .lokasi { color: var(--text-dim); font-size: 13px; margin-bottom: 12px; }

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 9px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}
.status-pill.on { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.status-pill.off { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.status-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.mesin-card .footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
}

form .field { margin-bottom: 18px; }
form label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--text-dim);
    font-weight: 500;
}
form input[type=text], form input[type=password], form input[type=number],
form input[type=email], form input[type=tel], form input[type=date],
form textarea, form select, form input[type=file] {
    width: 100%;
    padding: 8px 10px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--text);
    font-size: 14px;
}
form textarea { resize: vertical; }
form input:focus, form textarea:focus, form select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}
form .checkbox-row { display: flex; align-items: center; gap: 10px; }
form .checkbox-row input { width: auto; }
form .checkbox-row input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 42px;
    height: 24px;
    min-width: 42px;
    border-radius: 999px;
    background: var(--panel-2);
    border: 1px solid var(--border);
    position: relative;
    cursor: pointer;
    margin: 0;
    transition: background 0.2s ease, border-color 0.2s ease;
}
form .checkbox-row input[type="checkbox"]::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s ease;
}
form .checkbox-row input[type="checkbox"]:checked {
    background: var(--ok);
    border-color: var(--ok);
}
form .checkbox-row input[type="checkbox"]:checked::before {
    transform: translateX(18px);
}
form .checkbox-row input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
form .errorlist { color: var(--danger); font-size: 13px; margin: 4px 0 0; padding-left: 18px; }

.slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.slot-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    background: var(--panel-2);
}
.slot-card h3 {
    margin: 0 0 14px;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.slot-card .slot-number {
    background: var(--panel);
    border: 1px solid var(--border);
    color: var(--text-dim);
    border-radius: 3px;
    padding: 1px 8px;
    font-size: 12px;
}

.current-video {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 380px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px;
}

.login-card h1 {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    margin: 0 0 4px;
}
.login-card .subtitle {
    text-align: center;
    color: var(--text-dim);
    font-size: 13px;
    margin-bottom: 26px;
}

.messages { list-style: none; padding: 0; margin: 0 0 18px; }
.messages li {
    padding: 10px 14px;
    border-radius: var(--radius);
    margin-bottom: 8px;
    font-size: 13px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-left: 3px solid var(--ok);
}
.messages li.error {
    border-left-color: var(--danger);
}

.breadcrumb {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.btn.tiny {
    padding: 3px 9px;
    font-size: 12px;
}

.radio-row { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--panel);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}
.radio-pill input { margin: 0; }

.gradient-swatch-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.gradient-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius);
    border: 2px solid transparent;
    position: relative;
}
/* .selected (server-rendered at page load) is a fallback for browsers
   without :has() support; :has() is what makes clicking a swatch move the
   highlight immediately, since the radio's :checked state updates natively
   without needing a page reload or any JS. */
.gradient-swatch.selected { border-color: var(--accent); }
.gradient-swatch:has(input:checked) { border-color: var(--accent); }
.gradient-swatch input { position: absolute; opacity: 0; pointer-events: none; }
.gradient-swatch .swatch-preview {
    width: 54px;
    height: 54px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.gradient-swatch .swatch-label { font-size: 11px; color: var(--text-dim); }

.ukuran-section {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--border);
}
.ukuran-section h4 {
    margin: 0 0 10px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.metode-badge {
    background: var(--panel);
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 500;
}
.ukuran-empty { font-size: 12.5px; color: var(--text-dim); margin: 0 0 10px; }
.ukuran-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.ukuran-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    gap: 10px;
}
.ukuran-row.inactive { opacity: 0.55; }
.ukuran-info { display: flex; flex-direction: column; font-size: 12.5px; }
.ukuran-info span { color: var(--text-dim); font-size: 11.5px; }
.ukuran-actions { display: flex; gap: 6px; }
.ukuran-foto { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; margin-right: 10px; }
.ukuran-actions form { margin: 0; }
.ukuran-buttons { display: flex; flex-wrap: wrap; gap: 8px; }

dialog {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel);
    color: var(--text);
    padding: 20px;
    width: 100%;
    max-width: 340px;
}
dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
dialog .field { margin-bottom: 14px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

dialog.dialog-wide { max-width: 460px; }
dialog.dialog-lebar { max-width: 860px; max-height: 94vh; }
.dialog-kolom { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; align-items: start; }
@media (max-width: 720px) { .dialog-kolom { grid-template-columns: 1fr; } }

.dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.dialog-header h4 { margin: 0; font-size: 17px; }

.detail-grid {
    display: grid;
    grid-template-columns: 110px 1fr;
    row-gap: 12px;
    column-gap: 14px;
    margin: 0 0 6px;
}
.detail-grid dt {
    margin: 0;
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 600;
    padding-top: 1px;
}
.detail-grid dd {
    margin: 0;
    font-size: 13.5px;
    color: var(--text);
    line-height: 1.45;
}

.dialog-section-title {
    margin: 20px 0 10px;
    padding-top: 16px;
    border-top: 1px dashed var(--border);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
}

.log-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.log-table th, .log-table td {
    text-align: left;
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.log-table thead th {
    background: var(--panel-2);
    color: var(--text-dim);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}
.log-table tbody tr:hover { background: var(--panel-2); }
.log-table tbody tr:last-child td { border-bottom: none; }
.log-line {
    font-family: inherit;
    white-space: pre-wrap;
    margin: 0;
    color: var(--text);
}

.laporan-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px;
    margin-bottom: 20px;
}
.laporan-filter .field { margin-bottom: 0; }
.report-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.report-tabs a {
    padding: 9px 18px;
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.report-tabs a:hover { color: var(--text); }
.report-tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }
.report-tabs .count {
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--panel-2);
    font-size: 12px;
}
.laporan-totals {
    display: flex;
    gap: 14px;
    margin-bottom: 16px;
    font-size: 13px;
}
.laporan-totals span {
    background: var(--panel);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 10px 16px;
    color: var(--text-dim);
}
.laporan-totals strong { display: block; font-size: 20px; color: var(--text); }
.laporan-totals span { line-height: 1.4; }

/* Kasir: bundling cards */
.bundling-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}
.bundling-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    text-align: left;
    color: var(--text);
    font: inherit;
    cursor: pointer;
}
.bundling-card:hover { border-color: var(--accent); }
.bundling-card .nama { font-size: 15px; font-weight: 600; }
.bundling-card .jumlah { margin: 6px 0 2px; font-size: 22px; font-weight: 600; }
.bundling-card .harga { color: var(--text-dim); font-size: 14px; }

/* Theme toggle button */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--radius);
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
}
.theme-toggle:hover { border-color: var(--text-dim); }
.theme-toggle-floating { position: fixed; top: 14px; right: 14px; z-index: 50; background: var(--panel); }

/* Dashboard KPI tiles */
.kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}
.kpi {
    background: var(--panel);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 14px 18px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}
.kpi .label { color: var(--text-dim); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }
.kpi .value { font-size: 26px; font-weight: 600; margin-top: 2px; }
.kpi.ok { border-left-color: var(--ok); }
.kpi.off { border-left-color: var(--danger); }
.kpi.info { border-left-color: #0ea5e9; }
.kpi { position: relative; display: flex; flex-direction: column; }
.kpi .kpi-ico { position: absolute; top: 12px; right: 14px; width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.kpi .kpi-ico svg { width: 20px; height: 20px; }
.kpi.ok .kpi-ico { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.kpi.off .kpi-ico { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.kpi.info .kpi-ico { color: #0ea5e9; background: color-mix(in srgb, #0ea5e9 12%, transparent); }
.kpi .label { padding-right: 44px; }
.kpi .kpi-detail { align-self: flex-start; }
.kpi-wide { grid-column: 1 / -1; flex-direction: row; padding: 0; }
.kpi-wide .kpi-part { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; padding: 14px 18px; }
.kpi-wide .kpi-part + .kpi-part { border-left: 1px solid var(--border); }
@media (max-width: 760px) {
    .kpi-wide { flex-direction: column; }
    .kpi-wide .kpi-part + .kpi-part { border-left: 0; border-top: 1px solid var(--border); }
}

@media (max-width: 860px) {
    .app { flex-direction: column; }
    .sidebar { width: 100%; height: auto; position: static; }
    .sidenav { display: flex; flex-wrap: wrap; padding: 6px 10px; }
    .nav-section { display: none; }
    .sidenav a { border-left: 0; border-bottom: 3px solid transparent; padding: 8px 12px; }
    .sidenav a.active { border-bottom-color: var(--accent); }
    .header { padding: 0 16px; position: static; height: auto; min-height: 52px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
    .container { padding: 20px 16px 48px; }
}

/* ---- Content polish ---- */

.page-header {
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 22px;
}

.card-head { margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.card-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.card-head p { margin: 2px 0 0; color: var(--text-dim); font-size: 13px; }

.section-title { margin: 28px 0 14px; }
.section-title h2 { margin: 0; font-size: 16px; font-weight: 600; }
.section-title p { margin: 2px 0 0; color: var(--text-dim); font-size: 13px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-narrow { max-width: 560px; }

.form-actions {
    position: sticky;
    bottom: 0;
    margin-top: 24px;
    padding: 14px 0;
    background: linear-gradient(to top, var(--bg) 70%, transparent);
}

/* Tables inside cards */
.card > .log-table { margin: 0; }
.log-table td:first-child { font-weight: 600; }
.log-table .ukuran-actions { justify-content: flex-start; flex-wrap: nowrap; }
.log-table td .btn.tiny { min-height: 28px; }

/* Mesin cards */
.mesin-grid { gap: 16px; }
.mesin-card { padding: 18px 20px; }
.mesin-card .nama { margin-top: 8px; font-size: 15px; }
.mesin-card .metode {
    display: inline-block;
    margin: 4px 0 2px;
    padding: 1px 8px;
    border-radius: 3px;
    background: var(--panel-2);
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 11.5px;
}
.mesin-card .lokasi { margin: 6px 0 0; }
.mesin-card .footer-row {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.mesin-card .slot-count { font-size: 12px; color: var(--text-dim); }

/* Slot cards (pump settings) */
.slot-card { background: var(--panel); box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05); border-top: 3px solid var(--accent); }
.slot-card h3 {
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
}
.slot-card .slot-number { font-size: 11.5px; font-weight: 600; }
.ukuran-section { border-top: 1px solid var(--border); border-style: solid none none; }
.ukuran-row { background: var(--panel-2); }

/* Kasir cards */
.bundling-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.bundling-card {
    padding: 20px;
    border-top: 3px solid var(--accent);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
    transition: box-shadow 0.15s, border-color 0.15s;
}
.bundling-card:hover { box-shadow: 0 4px 14px rgba(16, 24, 40, 0.12); }
.bundling-card .nama { font-size: 14px; color: var(--text-dim); font-weight: 600; }
.bundling-card .jumlah { margin: 10px 0 2px; font-size: 32px; font-weight: 600; line-height: 1.1; }
.bundling-card .jumlah span { font-size: 14px; font-weight: 500; color: var(--text-dim); }
.bundling-card .harga { margin-top: 4px; font-size: 17px; font-weight: 600; color: var(--accent-2); }
.bundling-card .pilih {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 12.5px;
    color: var(--text-dim);
}
.bundling-card:hover .pilih { color: var(--accent-2); }

/* Empty state */
.empty-state { padding: 48px 20px; border-style: dashed; }
.empty-state p { margin: 0 0 14px; font-size: 14px; }

/* Dialogs */
dialog { box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25); padding: 22px; }
dialog h4 { margin: 0 0 14px; font-size: 16px; }
.dialog-header h4 { margin: 0; }

/* Filter bar (laporan) */
.laporan-filter {
    padding: 14px 16px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

/* Login */
.login-card { border-top: 3px solid var(--accent); box-shadow: 0 8px 28px rgba(16, 24, 40, 0.12); }
.login-card h1 { font-size: 20px; }

/* Messages */
.messages li { box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04); }

@media (max-width: 640px) {
    .form-grid { grid-template-columns: 1fr; }
}

/* Login page: fixed, single screen, no scrolling */
body.guest { height: 100vh; overflow: hidden; }
body.guest .login-wrap { height: 100vh; min-height: 0; padding: 16px; }
.login-card { padding: 30px 28px 28px; }
.login-brand { display: flex; justify-content: center; margin-bottom: 14px; }
.login-brand .brand-mark { width: 44px; height: 44px; font-size: 16px; border-radius: 6px; }
.login-card .subtitle { margin-bottom: 22px; }
.login-submit { width: 100%; justify-content: center; margin-top: 4px; }
.login-submit:disabled { opacity: 0.6; cursor: wait; }

.mesin-card .login-info { margin-top: 10px; }
.mesin-card .login-detail { margin-top: 4px; font-size: 12px; color: var(--text-dim); }
.login-detail { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

.kpi .sub { margin-top: 4px; font-size: 11.5px; color: var(--text-dim); }
.mesin-card .qris-today {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 12px 0 4px;
    padding: 8px 10px;
    border-radius: var(--radius);
    background: var(--panel-2);
    font-size: 12.5px;
    color: var(--text-dim);
}
.mesin-card .qris-today .label { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.mesin-card .qris-today strong { color: var(--text); }

.mesin-card.terlaris,
.mesin-card.terlaris:hover { border-color: var(--ok); border-top-color: var(--ok); box-shadow: 0 0 0 1px var(--ok); }
.mesin-card.terlaris:hover .code { color: var(--ok); }
.terlaris-badge {
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 3px;
    background: color-mix(in srgb, var(--ok) 15%, transparent);
    color: var(--ok);
    font-family: inherit;
    font-size: 11px;
    letter-spacing: 0;
    vertical-align: middle;
}

.pw-link {
    font-size: 12px; color: var(--text-dim); text-decoration: none;
    border: 1px solid var(--border); border-radius: var(--radius); padding: 5px 10px;
}
.pw-link:hover { border-color: var(--text-dim); }

/* Inkscape-style RGBA slider colour picker */
.cpick { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; margin-bottom: 10px; background: var(--panel); }
.cpick-head { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.cpick-preview { width: 36px; height: 22px; border-radius: 6px; border: 1px solid var(--border);
    background-image: linear-gradient(45deg,#8883 25%,transparent 25%,transparent 75%,#8883 75%),linear-gradient(45deg,#8883 25%,transparent 25%,transparent 75%,#8883 75%);
    background-size: 10px 10px; background-position: 0 0, 5px 5px; position: relative; overflow: hidden; }
.cpick-preview i { position: absolute; inset: 0; }
.cpick-hex { margin-left: auto; width: 92px; padding: 2px 6px; font-family: monospace; font-size: 12px; color: var(--text); background: var(--panel); border: 1px solid var(--border); border-radius: 6px; text-transform: uppercase; }
.cpick-row { display: flex; align-items: center; gap: 8px; margin: 5px 0; }
.cpick-row b { width: 14px; font-size: 12px; }
.cpick-row input[type=range] { flex: 1; height: 16px; border-radius: 8px; -webkit-appearance: none; appearance: none; border: 1px solid var(--border); cursor: pointer; }
.cpick-row input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 20px; border-radius: 4px; background: #fff; border: 2px solid #333; }
.cpick-row input[type=range]::-moz-range-thumb { width: 8px; height: 16px; border-radius: 4px; background: #fff; border: 2px solid #333; }
.cpick-row input[type=number] { width: 56px; padding: 3px 6px; }
.cpick-final { height: 46px; border-radius: var(--radius); border: 1px solid var(--border); margin-top: 6px; }

.cpick-group.disabled { opacity: .4; pointer-events: none; }
.cpick-group.disabled::before { content: 'Aktifkan slot untuk mengatur warna'; display: block; font-size: 11px; color: var(--text-dim); margin-bottom: 6px; }

/* Login info pinned to the bottom of the sidebar */
.sidebar-user {
    margin-top: auto;
    padding: 14px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    align-items: center;
    gap: 11px;
}
.su-avatar {
    width: 38px; height: 38px; flex-shrink: 0;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--accent) 30%, transparent);
    color: #fff; font-weight: 700; font-size: 16px;
}
.su-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.su-line { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.su-username { color: #fff; font-weight: 600; font-size: 13.5px; overflow-wrap: anywhere; }
.su-fullname { color: var(--sidebar-text); font-size: 12.5px; overflow-wrap: anywhere; }
.su-status { display: flex; align-items: center; gap: 6px; color: #8fd9a8; font-size: 11.5px; margin-top: 2px; }
.su-dot { width: 7px; height: 7px; border-radius: 50%; background: #3ecf72; box-shadow: 0 0 0 3px rgba(62, 207, 114, 0.2); flex-shrink: 0; }
.theme-toggle { display: inline-flex; align-items: center; gap: 7px; }
.btn-logout { display: inline-flex; align-items: center; gap: 7px; }
.su-last { color: #6f7a8b; font-size: 11px; }

/* Theme toggle: compact button with a properly spaced icon */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 14px 0 11px;
    border-radius: var(--radius);
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    transition: background .15s, border-color .15s;
}
.theme-toggle:hover { background: color-mix(in srgb, var(--text) 8%, transparent); border-color: var(--text-dim); }
.theme-toggle svg { width: 16px; height: 16px; flex-shrink: 0; display: block; }
.btn-logout { height: 34px; padding: 0 14px 0 11px; gap: 8px; line-height: 1; }
.btn-logout .ico { display: block; }

.brand-logo { width: 32px; height: 32px; border-radius: 7px; display: block; flex-shrink: 0; }
.login-brand .brand-logo { width: 56px; height: 56px; border-radius: 12px; }

/* Icon + label buttons */
.btn:has(.ico-sm) { display: inline-flex; align-items: center; gap: 6px; }
.ico-sm { width: 14px; height: 14px; flex-shrink: 0; display: block; }
.btn.tiny .ico-sm { width: 13px; height: 13px; }


.dialog-section-title.first { margin-top: 0; padding-top: 0; border-top: 0; }
.paket-detail { max-height: 170px; overflow-y: auto; font-size: 13.5px; }
.paket-detail > div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--border); }
.paket-detail > div span:last-child { color: var(--text-dim); white-space: nowrap; }
dialog.dialog-lebar .dialog-header { margin-bottom: 16px; }

/* Tombol aksi berwarna di daftar pembelian: latar berwarna, ikon putih */
.btn.aksi-view, .btn.aksi-excel, .btn.aksi-pdf, .btn.aksi-email { color: #fff; border-color: transparent; }
.btn.aksi-view  { background: #f59e0b; }
.btn.aksi-excel { background: #16a34a; }
.btn.aksi-pdf   { background: #7c3aed; }
.btn.aksi-email { background: #0ea5e9; }
.btn.aksi-view:hover  { background: #d97706; }
.btn.aksi-excel:hover { background: #15803d; }
.btn.aksi-pdf:hover   { background: #6d28d9; }
.btn.aksi-email:hover { background: #0284c7; }
.aksi-view .ico-sm, .aksi-excel .ico-sm, .aksi-pdf .ico-sm, .aksi-email .ico-sm { color: inherit; }

.btn.aksi-edit { background: #f97316; border-color: transparent; color: #fff; }
.btn.aksi-edit:hover { background: #ea580c; }

/* Form berkolom dua: isian sejajar, bagian lebar memakai .span-2 */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; align-items: start; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-grid small { display: block; margin-top: 5px; font-size: 12px; }
.form-actions-bar { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--border); }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }

/* Daftar user */
.table-meta { margin: 0 0 8px; font-size: 12.5px; color: var(--text-dim); }
.user-table td { vertical-align: middle; }
.user-cell { display: flex; align-items: center; gap: 12px; }
.user-cell strong { display: block; line-height: 1.25; }
.user-sub { display: block; font-size: 12px; font-weight: 400; color: var(--text-dim); }
.user-avatar {
    width: 34px; height: 34px; flex: none; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent);
    font-weight: 700; font-size: 14px;
}
.role-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.role-pill.role-admin { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); }
.role-pill.role-kasir { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.user-table .ukuran-actions .btn { font-family: inherit; font-size: 12.5px; font-weight: 600; min-height: 30px; padding: 0 12px; }
.user-table .switch-form { height: 30px; }

/* Toolbar pencarian & kolom yang bisa diurutkan */
.tabel-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.cari-box { position: relative; flex: 1 1 280px; max-width: 420px; }
.cari-box .ico-sm { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-dim); pointer-events: none; }
.cari-box input { width: 100%; padding: 9px 12px 9px 34px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel); color: var(--text); font-size: 14px; }
.cari-box input:focus { outline: none; border-color: var(--accent); }
.tabel-info { font-size: 12.5px; color: var(--text-dim); }
.log-table th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.log-table th.sortable:hover { color: var(--text); }
.log-table th.sortable::after { content: "\2195"; margin-left: 6px; font-size: 11px; opacity: .35; }
.log-table th.sortable[aria-sort="ascending"]::after { content: "\25B2"; opacity: 1; color: var(--accent); }
.log-table th.sortable[aria-sort="descending"]::after { content: "\25BC"; opacity: 1; color: var(--accent); }
.log-table th.sortable:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
tr[hidden] { display: none; }

/* Tabel padat: muat tanpa scroll horizontal di layar sedang */
.tabel-padat th, .tabel-padat td { padding: 10px 8px; }
.tabel-padat th:first-child, .tabel-padat td:first-child { padding-left: 14px; }
.tabel-padat th:last-child, .tabel-padat td:last-child { padding-right: 14px; }
.tabel-padat thead th { letter-spacing: 0.2px; font-size: 11.5px; }
.tabel-padat th.sortable::after { margin-left: 3px; }
.tabel-padat td { vertical-align: middle; }
.tabel-padat .ukuran-actions { flex-wrap: nowrap; }
@media (max-width: 1280px) { .tabel-padat .btn-teks { display: none; } }

/* Halaman ubah password */
.pw-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.pw-form .field small { display: block; margin-top: 5px; font-size: 12px; color: var(--text-dim); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 40px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 0; border-radius: 6px; color: var(--text-dim); cursor: pointer; }
.pw-toggle:hover { color: var(--text); background: var(--panel-2); }
.pw-aside h4 { margin: 0 0 12px; font-size: 14px; }
.pw-rules { list-style: none; margin: 0 0 14px; padding: 0; }
.pw-rules li { position: relative; padding: 6px 0 6px 26px; font-size: 13px; color: var(--text-dim); }
.pw-rules li::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border); box-sizing: border-box; }
.pw-rules li.ok { color: var(--text); }
.pw-rules li.ok::before { background: var(--ok); border-color: var(--ok); }
.pw-rules li.ok::after { content: ""; position: absolute; left: 5px; top: 50%; width: 4px; height: 8px; margin-top: -6px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.pw-note { margin: 0; padding-top: 12px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-dim); line-height: 1.5; }
@media (max-width: 860px) { .pw-layout { grid-template-columns: 1fr; } }

/* Breadcrumb: teks biasa dengan pemisah garis miring */
.breadcrumbs { gap: 8px; font-size: 13px; }
.breadcrumbs a { color: var(--text-dim); }
.breadcrumbs a:hover { color: var(--text); text-decoration: underline; }
.breadcrumbs .sep { font-size: 13px; color: var(--text-dim); opacity: .6; }
.breadcrumbs .current { color: var(--text); font-weight: 500; }

/* Halaman detail mesin */
.login-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 22px; padding: 12px 18px; margin-bottom: 16px; }
.login-bar-title { font-weight: 700; font-size: 14px; }
.login-bar .login-detail { font-size: 13px; color: var(--text-dim); margin: 0; }
.login-bar .login-detail strong { color: var(--text); font-weight: 600; margin-right: 4px; }
.login-bar-aksi { margin-left: auto; }

.slot-grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (max-width: 820px) { .slot-grid { grid-template-columns: 1fr; } }

.form-actions { margin-top: 20px; padding: 0 0 12px; background: none; z-index: 5; }
.form-actions-inner {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 12px 18px; border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--panel); box-shadow: 0 -4px 18px rgba(16, 24, 40, 0.10);
}
.form-actions-hint { font-size: 12.5px; color: var(--text-dim); }

.riwayat-card { padding: 0; max-height: 420px; overflow: auto; }
.riwayat-card thead th { position: sticky; top: 0; z-index: 1; }
.riwayat-card .log-line { margin: 0; white-space: pre-wrap; font-family: inherit; font-size: 13px; }

/* Kartu mesin */
.mesin-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); align-items: stretch; }
.mesin-card.mc { display: flex; flex-direction: column; gap: 10px; }
.mesin-card.mc[hidden] { display: none; }
.mc-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.mc-head .code { font-size: 19px; font-weight: 700; letter-spacing: .5px; color: var(--text); text-decoration: none; }
.mc-head .code:hover { color: var(--accent); }
.mc-clone { margin-left: auto; flex: none; white-space: nowrap; min-height: 28px; padding: 3px 10px; line-height: 1.2; }
.mc-body { display: block; color: inherit; text-decoration: none; }
.mc-body .nama { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.mc-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.mc-meta .metode, .mc-meta .slot-count {
    padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
    background: var(--panel-2); border: 1px solid var(--border); color: var(--text-dim);
}
.mc-lokasi { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-dim); }
.mc-lokasi .ico-sm { flex: none; }
.mc-status { display: flex; gap: 6px; flex-wrap: wrap; }
.mc-login { font-size: 12px; color: var(--text-dim); }
.mesin-card.mc .qris-today { margin: 0; }
.mc-foot { display: flex; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }
.mc-foot .btn { flex: 1; justify-content: center; text-align: center; }

/* Chip filter */
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel); color: var(--text-dim); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.chip:hover { color: var(--text); background: var(--panel-2); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Halaman login: panel brand + form */
body.guest { overflow: auto; }
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-brand {
    display: flex; align-items: center; justify-content: center; padding: 48px;
    background: linear-gradient(145deg, #0b3fd6 0%, #1d63ff 55%, #5a8dff 100%); color: #fff;
}
.auth-brand-inner { max-width: 420px; }
.auth-logo { width: 72px; height: 72px; border-radius: 16px; box-shadow: 0 8px 24px rgba(0,0,0,.25); margin-bottom: 22px; }
.auth-brand h2 { margin: 0 0 10px; font-size: 30px; font-weight: 700; letter-spacing: .2px; }
.auth-brand p { margin: 0 0 24px; font-size: 15px; line-height: 1.6; opacity: .9; }
.auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.auth-points li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.auth-points .ico-sm { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: rgba(255,255,255,.2); flex: none; box-sizing: border-box; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-logo-sm { display: none; width: 52px; height: 52px; border-radius: 12px; margin-bottom: 14px; }
.auth-card h1 { margin: 0 0 4px; font-size: 26px; }
.auth-card .subtitle { margin: 0 0 24px; color: var(--text-dim); font-size: 14px; }
.input-icon { position: relative; }
.input-icon .lead { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-dim); width: 16px; height: 16px; pointer-events: none; }
form .input-icon input { padding: 11px 40px 11px 38px; font-size: 14.5px; }
.auth-card .login-submit { padding: 12px 16px; font-size: 15px; margin-top: 8px; }
.auth-foot { margin: 22px 0 0; text-align: center; font-size: 12px; color: var(--text-dim); }
@media (max-width: 860px) {
    .auth { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
    .auth-logo-sm { display: block; }
}

/* Kartu paket di halaman kasir */
.bundling-card { display: flex; flex-direction: column; gap: 2px; transition: transform .15s, box-shadow .15s, border-color .15s; }
.bundling-card[hidden] { display: none; }
.bundling-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.bundling-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.bc-durasi { flex: none; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.bc-pergelas { font-size: 12.5px; color: var(--text-dim); }
.bc-mesin { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0 4px; min-height: 24px; }
.bc-chip { padding: 2px 8px; border-radius: 6px; font-size: 11.5px; background: var(--panel-2); border: 1px solid var(--border); color: var(--text-dim); }
.bc-chip.more { font-weight: 600; }
.bundling-card .harga { margin-top: auto; padding-top: 8px; font-size: 22px; }
.bundling-card .pilih {
    display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; padding: 10px 12px;
    border-radius: var(--radius); background: var(--accent); color: #fff; font-weight: 600; font-size: 14px; border: 0;
}
.bundling-card:hover .pilih { background: var(--accent-hover); color: #fff; }

/* Kartu pilih mesin (laporan) */
.pm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.pm-card {
    display: flex; flex-direction: column; gap: 12px; padding: 18px; color: var(--text); text-decoration: none;
    background: var(--panel); border: 1px solid var(--border); border-top: 3px solid var(--accent);
    border-radius: var(--radius); box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
    transition: transform .15s, box-shadow .15s, border-color .15s;
}
.pm-card[hidden] { display: none; }
.pm-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(16, 24, 40, 0.12); border-color: var(--accent); }
.pm-top { display: flex; align-items: center; gap: 12px; }
.pm-icon { width: 40px; height: 40px; flex: none; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.pm-icon .ico-sm { width: 20px; height: 20px; }
.pm-title { flex: 1; min-width: 0; }
.pm-nama { font-size: 15.5px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.pm-kode { display: inline-block; margin-top: 3px; padding: 1px 8px; border-radius: 6px; font-family: ui-monospace, monospace; font-size: 12px; font-weight: 600; background: var(--panel-2); border: 1px solid var(--border); color: var(--text-dim); }
.pm-lokasi { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-dim); }
.pm-lokasi .ico-sm { flex: none; }
.pm-stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--radius); background: var(--panel-2); font-size: 13px; }
.pm-stat .label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; color: var(--text-dim); }
.pm-cta { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: auto; padding: 10px 12px; border-radius: var(--radius); background: var(--accent); color: #fff; font-weight: 600; font-size: 14px; }
.pm-card:hover .pm-cta { background: var(--accent-hover); }

.bgpreview { display: flex; align-items: center; justify-content: center; width: 180px; height: 260px; margin-bottom: 8px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); overflow: hidden; font-size: 12px; color: var(--text-dim); }
.bgpreview img { width: 100%; height: 100%; object-fit: fill; display: block; }
.bgpreview-clear { display: block; margin: 6px 0; font-size: 13px; }
.bgpreview img[hidden], .bgpreview span[hidden] { display: none; }

.teks-tombol-pilihan { display: flex; gap: 18px; }
.teks-tombol-opsi { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }

/* Modal konfirmasi (pengganti confirm() browser) */
.confirm-modal {
    border: 1px solid var(--border); border-radius: 10px; padding: 0;
    background: var(--panel); color: var(--text);
    width: min(420px, calc(100vw - 32px)); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}
.confirm-modal::backdrop { background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(2px); }
.confirm-modal form { padding: 22px 24px 18px; }
.confirm-modal h3 { margin: 0 0 8px; font-size: 17px; }
.confirm-modal p { margin: 0 0 20px; color: var(--text-dim); line-height: 1.5; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* Card mesin: hover cukup bayangan halus, tanpa underline. */
.mesin-card.mc { transition: box-shadow .2s ease, transform .2s ease; }
.mesin-card.mc:hover { box-shadow: 0 8px 22px rgba(16, 24, 40, 0.14); transform: translateY(-2px); }
.mesin-card.mc a:hover { text-decoration: none; }
.mesin-card.terlaris:hover { box-shadow: 0 0 0 1px var(--ok), 0 8px 22px rgba(16, 24, 40, 0.14); }

/* Kode mesin di card: dibuat menonjol sebagai lencana. */
.mc-head .code {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 1.5px;
    line-height: 1;
    padding: 8px 14px;
    border-radius: 8px;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.mc-head .code:hover { color: var(--accent); background: color-mix(in srgb, var(--accent) 20%, transparent); }

/* Baris arsip + tombol selalu menempel di dasar card, supaya posisinya sejajar antar card. */
.mesin-card.mc .mc-arsip { margin-top: auto; }
.mesin-card.mc .mc-foot { margin-top: 0; }

/* Card mesin yang diarsipkan: aksen merah. */
.mesin-card.mc[data-arsip="1"] { border-top-color: var(--danger); }
.mesin-card.mc[data-arsip="1"]:hover { border-color: var(--danger); }
.mesin-card.mc[data-arsip="1"] .mc-head .code,
.mesin-card.mc[data-arsip="1"] .mc-head .code:hover {
    color: var(--danger);
    background: color-mix(in srgb, var(--danger) 12%, transparent);
    border-color: color-mix(in srgb, var(--danger) 35%, transparent);
}
.mesin-card.mc[data-arsip="1"]:hover .code { color: var(--danger); }

/* Stok barel (drum) */
.barel { --barel-warna: var(--ok); display: flex; align-items: center; gap: 12px; }
.barel.oranye { --barel-warna: #f57c00; }
.barel.merah { --barel-warna: var(--danger); }
.barel-svg { width: 54px; height: 72px; flex: none; overflow: visible; }
.barel-body { fill: color-mix(in srgb, var(--barel-warna) 8%, var(--panel-2, var(--panel))); }
.barel-garis { fill: none; stroke: var(--barel-warna); stroke-width: 2.5; }
.barel-ring { stroke: rgba(0, 0, 0, .18); stroke-width: 2; fill: none; }
.barel-tutup { fill: var(--barel-warna); }
.barel-isi, .barel-ombak { fill: var(--barel-warna); opacity: .85; }
.barel-cairan { transition: transform .8s ease; }
.barel-ombak { animation: barel-ombak 2.2s linear infinite; }
@keyframes barel-ombak { from { transform: translateX(0); } to { transform: translateX(-32px); } }
.barel.merah:not(.habis) .barel-svg { animation: barel-kedip 1.2s ease-in-out infinite; }
@keyframes barel-kedip { 50% { opacity: .55; } }
.barel-teks { display: flex; flex-direction: column; font-size: 12.5px; color: var(--text-dim); line-height: 1.35; }
.barel-teks strong { font-size: 20px; color: var(--barel-warna); }
.barel-jenis { font-weight: 600; color: var(--text); }
.barel-warn { color: var(--danger); font-weight: 600; }
.barel.besar .barel-svg { width: 96px; height: 128px; }
.barel.besar .barel-teks strong { font-size: 30px; }
.barel.besar .barel-teks { font-size: 14px; }
.barel-panel { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; padding: 20px; }
.barel-kolom { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.barel-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.barel-form .field { margin: 0; }
@media (prefers-reduced-motion: reduce) { .barel-ombak, .barel-svg { animation: none !important; } }

/* Barel di kartu mesin: kotak seragam supaya tinggi kartu sama */
.mesin-card .barel {
    box-sizing: border-box; min-height: 92px; padding: 10px 12px;
    background: var(--panel-2, rgba(127,127,127,.08));
    border: 1px solid var(--border); border-radius: 8px;
}
.mesin-card .barel-svg { width: 40px; height: 54px; }
.mesin-card .barel-teks { min-width: 0; gap: 1px; }
.mesin-card .barel-teks strong { font-size: 18px; line-height: 1.1; }
.mesin-card .barel-jenis, .mesin-card .barel-liter { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barel-warn { font-size: 12px; }

.app-versi { position: fixed; right: 12px; bottom: 8px; font-size: 11px; color: var(--text-dim); opacity: .7; pointer-events: none; z-index: 5; }

.sidebar-versi { padding: 8px 18px 12px; font-size: 11.5px; color: #6f7a8b; letter-spacing: .02em; }
