/* Tema PPIC ala Odoo. Satu file, tanpa framework CSS. */
:root {
    --o-nav: #4e2f48;          /* navbar: ungu gelap */
    --o-brand: #714b67;        /* tombol utama */
    --o-brand-dark: #5c3c54;
    --o-brand-soft: #f3edf2;
    --o-teal: #017e84;         /* tautan */
    --o-bg: #f9fafb;
    --o-border: #dee2e6;
    --o-border-soft: #eef0f2;
    --o-text: #212529;
    --o-muted: #6c757d;
    --o-danger: #d23f3a;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: Roboto, "Segoe UI", system-ui, sans-serif; font-size: 14px; line-height: 1.45; background: var(--o-bg); color: var(--o-text); }
a { color: var(--o-teal); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; }
.o-muted { color: var(--o-muted); }
.o-strong { font-weight: 500; }
.o-spacer { flex: 1; }

/* ---------- Navbar ---------- */
.o-navbar { height: 46px; background: var(--o-nav); display: flex; align-items: center; color: #fff; position: sticky; top: 0; z-index: 40; box-shadow: 0 1px 0 rgba(0,0,0,.15); }
.o-navbar a, .o-navbar a:hover { color: #fff; text-decoration: none; }
.o-apps { width: 46px; height: 46px; display: grid; place-items: center; font-size: 17px; opacity: .9; }
.o-apps:hover { background: rgba(255,255,255,.1); opacity: 1; }
.o-brand { font-weight: 500; font-size: 16px; padding: 0 14px 0 2px; letter-spacing: .2px; }
.o-menu { position: relative; height: 46px; }
.o-menu > a, .o-menu > span { display: flex; align-items: center; gap: 6px; height: 46px; padding: 0 12px; cursor: pointer; color: rgba(255,255,255,.92); }
.o-menu > span .fa-chevron-down { font-size: 9px; opacity: .7; }
.o-menu:hover > a, .o-menu:hover > span, .o-menu .aktif { background: rgba(255,255,255,.12); color: #fff; }
.o-sub { display: none; position: absolute; left: 0; top: 46px; min-width: 230px; background: #fff; border: 1px solid var(--o-border); border-radius: 0 0 6px 6px; box-shadow: 0 8px 20px rgba(0,0,0,.14); padding: 6px 0; z-index: 50; }
.o-menu:hover .o-sub, .o-menu:focus-within .o-sub { display: block; }
.o-sub a, .o-navbar .o-sub a { display: flex; align-items: center; gap: 10px; padding: 8px 16px; color: #374151; }
.o-sub a i { width: 16px; text-align: center; color: var(--o-muted); }
.o-sub a:hover, .o-navbar .o-sub a:hover { background: var(--o-brand-soft); color: var(--o-brand); text-decoration: none; }
.o-sub a:hover i { color: var(--o-brand); }
.o-sub .o-sub-head { padding: 6px 16px 4px; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .6px; color: var(--o-muted); }
.o-sub hr { border: 0; border-top: 1px solid var(--o-border-soft); margin: 6px 0; }
.o-systray { display: flex; align-items: center; height: 46px; }
.o-systray .o-icon-btn { width: 40px; height: 46px; display: grid; place-items: center; color: rgba(255,255,255,.85); }
.o-systray .o-icon-btn:hover { background: rgba(255,255,255,.1); }
.o-user { display: flex; align-items: center; gap: 8px; padding: 0 14px 0 8px; height: 46px; cursor: pointer; }
.o-avatar { width: 28px; height: 28px; border-radius: 6px; background: #e8b04a; color: #3b2a00; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.o-menu.o-right .o-sub { left: auto; right: 0; }
.o-sub button.o-sub-btn { all: unset; display: flex; align-items: center; gap: 10px; padding: 8px 16px; color: #374151; cursor: pointer; width: 100%; box-sizing: border-box; }
.o-sub button.o-sub-btn:hover { background: #fdecea; color: var(--o-danger); }

/* ---------- Control panel ---------- */
.o-cp { background: #fff; border-bottom: 1px solid var(--o-border); padding: 10px 24px; }
.o-cp-row { display: flex; align-items: center; gap: 16px; min-height: 36px; }
.o-cp-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.o-cp-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.o-breadcrumb { font-size: 18px; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-breadcrumb .sep { color: var(--o-muted); font-size: 14px; }
.o-breadcrumb .active { font-weight: 500; color: var(--o-text); }
.o-search { flex: 1; max-width: 560px; margin: 0 auto; height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--o-border); border-radius: 6px; background: #fff; }
.o-search:focus-within { border-color: var(--o-brand); box-shadow: 0 0 0 3px rgba(113,75,103,.12); }
.o-search i { color: var(--o-muted); }
.o-search input { flex: 1; border: 0; outline: 0; font: inherit; background: transparent; }
.o-search .o-search-clear { color: var(--o-muted); }
.o-pager { color: var(--o-muted); font-size: 13px; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.o-pager a, .o-pager span.off { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 4px; color: #374151; }
.o-pager a:hover { background: #eef0f2; text-decoration: none; }
.o-pager span.off { color: #c3c7cc; }
.o-switch { display: flex; border: 1px solid var(--o-border); border-radius: 4px; overflow: hidden; }
.o-switch span { width: 32px; height: 30px; display: grid; place-items: center; color: var(--o-muted); }
.o-switch span.active { background: #eef0f2; color: var(--o-text); }

/* ---------- Tombol ---------- */
.o-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 4px; font-weight: 500; font-size: 14px; border: 1px solid transparent; cursor: pointer; white-space: nowrap; text-decoration: none; }
.o-btn:hover { text-decoration: none; }
.o-btn-primary { background: var(--o-brand); color: #fff; }
.o-btn-primary:hover { background: var(--o-brand-dark); color: #fff; }
.o-btn-secondary { background: #e7e9ed; color: #374151; }
.o-btn-secondary:hover { background: #d8dadf; color: #1f2937; }
.o-icon { all: unset; width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: 4px; color: var(--o-muted); cursor: pointer; }
.o-icon:hover { background: #eef0f2; color: var(--o-text); }
.o-icon.danger:hover { background: #fdecea; color: var(--o-danger); }
.o-icon.save { color: var(--o-teal); }
.o-icon.save:hover { background: #e3f3f3; }

/* ---------- Konten & list view ---------- */
.o-content { padding: 16px 24px 40px; }
.o-list { width: 100%; background: #fff; border: 1px solid var(--o-border); border-collapse: collapse; font-size: 13.5px; }
.o-list th { text-align: left; font-weight: 500; padding: 9px 12px; border-bottom: 1px solid var(--o-border); color: #374151; white-space: nowrap; background: #fff; position: sticky; top: 46px; z-index: 2; }
.o-list td { padding: 6px 12px; border-top: 1px solid var(--o-border-soft); vertical-align: middle; height: 38px; }
.o-list tbody tr:hover { background: #f5f6f8; }
.o-list tr.o-clickable { cursor: pointer; }
.o-list .num { text-align: right; font-variant-numeric: tabular-nums; }
.o-list .o-col-actions { width: 1%; white-space: nowrap; text-align: right; }
.o-list .o-row-actions { display: inline-flex; gap: 2px; opacity: 0; transition: opacity .12s; }
.o-list tr:hover .o-row-actions, .o-list tr:focus-within .o-row-actions { opacity: 1; }
.o-row-actions form { display: inline; }
.o-list tr.o-dirty { background: #fffbea; }
.o-list tr.o-dirty .o-row-actions { opacity: 1; }
.o-list tr.o-new-row { background: var(--o-brand-soft); }
.o-list tr.o-new-row .o-row-actions { opacity: 1; }
.o-list tfoot td { font-weight: 500; background: #fafbfc; border-top: 1px solid var(--o-border); }
.o-cell { width: 100%; border: 0; border-bottom: 1px solid transparent; background: transparent; font: inherit; padding: 4px 2px; outline: 0; }
.o-list tr:hover .o-cell { border-bottom-color: var(--o-border); }
.o-cell:focus { border-bottom: 1px solid var(--o-brand) !important; }
.o-cell.num { text-align: right; }
select.o-cell { cursor: pointer; }
.o-empty { text-align: center; padding: 64px 16px; color: var(--o-muted); background: #fff; border: 1px solid var(--o-border); }
.o-empty i { font-size: 40px; color: #c9ccd1; margin-bottom: 10px; display: block; }
.o-empty b { display: block; color: var(--o-text); font-size: 16px; font-weight: 500; margin-bottom: 4px; }

/* badge */
.o-badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.o-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.o-badge-success { background: #d7f2e1; color: #11683a; }
.o-badge-muted { background: #e9ecef; color: #495057; }
.o-badge-warning { background: #fdf1d6; color: #8a5800; }
.o-badge-danger { background: #fbe2e0; color: #a3251c; }

/* ---------- Form view ---------- */
.o-sheet { background: #fff; border: 1px solid var(--o-border); max-width: 1140px; margin: 0 auto; padding: 24px 36px 32px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.o-statusbar { display: flex; justify-content: flex-end; margin: -8px 0 12px; }
.o-statusbar label { position: relative; padding: 5px 16px 5px 22px; background: #f1f2f4; color: var(--o-muted); font-size: 13px; cursor: pointer; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%); margin-left: -4px; }
.o-statusbar label:first-child { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); padding-left: 16px; }
.o-statusbar input { display: none; }
.o-statusbar input:checked + span { color: #fff; }
.o-statusbar label:has(input:checked) { background: var(--o-brand); color: #fff; }
.o-title { margin-bottom: 18px; }
.o-title small { display: block; color: var(--o-muted); font-size: 12px; font-weight: 500; }
.o-title input { width: 100%; font-size: 28px; font-weight: 500; border: 0; border-bottom: 1px solid var(--o-border); padding: 2px 0 4px; outline: 0; background: transparent; }
.o-title input:focus { border-bottom-color: var(--o-brand); }
.o-group { display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; }
.o-field { display: grid; grid-template-columns: 140px 1fr; align-items: start; padding: 5px 0; }
.o-field > label { font-weight: 500; color: #374151; padding-top: 5px; }
.o-field input, .o-field select, .o-field textarea { width: 100%; border: 0; border-bottom: 1px solid var(--o-border); padding: 5px 2px; font: inherit; outline: 0; background: transparent; border-radius: 0; }
.o-field input:focus, .o-field select:focus, .o-field textarea:focus { border-bottom-color: var(--o-brand); }
.o-field textarea { resize: vertical; min-height: 64px; }
.o-field .o-req::after { content: " *"; color: var(--o-danger); }
.field-validation-error, .o-err { color: var(--o-danger); font-size: 12px; display: block; margin-top: 2px; }
.validation-summary-errors { background: #fdecea; border: 1px solid #f5c2bd; color: #9b2c22; padding: 8px 14px; border-radius: 4px; margin-bottom: 16px; }
.validation-summary-errors ul { margin: 0; padding-left: 18px; }
.validation-summary-valid { display: none; }

/* ---------- Dashboard ---------- */
.o-home { max-width: 1180px; margin: 0 auto; padding: 28px 24px 48px; }
.o-h1 { font-size: 24px; font-weight: 500; margin: 0 0 2px; }
.o-h2 { font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .7px; color: var(--o-muted); margin: 30px 0 12px; }
.o-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 20px; }
.o-stat { background: #fff; border: 1px solid var(--o-border); border-radius: 8px; padding: 16px 18px; display: flex; gap: 14px; align-items: center; color: inherit; transition: box-shadow .15s, transform .15s; }
a.o-stat:hover { text-decoration: none; box-shadow: 0 6px 16px rgba(0,0,0,.08); transform: translateY(-1px); }
.o-stat-icon { width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center; font-size: 20px; flex: none; }
.o-stat-label { color: var(--o-muted); font-size: 13px; }
.o-stat-value { font-size: 26px; white-space: nowrap; font-weight: 500; line-height: 1.15; font-variant-numeric: tabular-nums; }
.o-apps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.o-app { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 16px 8px 12px; border-radius: 10px; color: #374151; text-align: center; font-size: 13px; }
.o-app:hover { background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.08); text-decoration: none; color: var(--o-text); }
.o-app-icon { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; font-size: 27px; color: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.16), inset 0 -3px 0 rgba(0,0,0,.12); }
.o-app.o-soon { opacity: .45; pointer-events: none; }
.o-app.o-soon small { display: block; font-size: 11px; color: var(--o-muted); }

.o-dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.o-dash-actions { display: flex; gap: 8px; }
.o-dash-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.o-span-2 { grid-column: span 2; }
.o-card { background: #fff; border: 1px solid var(--o-border); border-radius: 8px; padding: 16px 18px; min-width: 0; }
.o-card > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.o-card h3 { margin: 0; font-size: 15px; font-weight: 500; }
.o-card header .o-muted { font-size: 12px; }
.o-link-sm { font-size: 13px; white-space: nowrap; }
.o-mini-stats { display: flex; gap: 16px; font-size: 13px; color: var(--o-muted); flex-wrap: wrap; }
.o-mini-stats b { color: var(--o-text); font-weight: 500; margin-left: 2px; }
.o-dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 4px; vertical-align: 0; }
.o-chart { position: relative; height: 260px; }
.o-card-empty { color: var(--o-muted); text-align: center; padding: 40px 8px; }
.o-card-empty.ok { color: #11683a; }
.o-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.o-bars-label { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }
.o-bars-label b { font-weight: 500; font-variant-numeric: tabular-nums; }
.o-bars-track { height: 8px; background: #f1f2f4; border-radius: 4px; overflow: hidden; }
.o-bars-fill { height: 100%; background: var(--o-brand); border-radius: 4px; min-width: 2px; }
.o-bars li:hover .o-bars-fill { background: var(--o-brand-dark); }
.o-feed { list-style: none; margin: 0; padding: 0; }
.o-feed li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--o-border-soft); }
.o-feed li:first-child { border-top: 0; padding-top: 2px; }
.o-feed-icon { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; flex: none; font-size: 14px; }
.o-feed-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.o-feed-body b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-feed-body .o-muted { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-feed-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-variant-numeric: tabular-nums; }
.o-feed-right b { font-weight: 500; }
.o-feed-right .o-muted { font-size: 12px; }
.o-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 1000px) { .o-dash-grid { grid-template-columns: 1fr; } .o-span-2 { grid-column: auto; } }

/* ---------- Jejak langkah (tracking persetujuan, pengiriman) ---------- */
.o-steps { display: flex; gap: 0; background: #fff; border: 1px solid var(--o-border); border-radius: 8px; padding: 18px 12px; overflow-x: auto; }
.o-step { flex: 1; min-width: 150px; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; padding: 0 6px; }
.o-step:not(:last-child)::after { content: ""; position: absolute; top: 15px; left: calc(50% + 20px); right: calc(-50% + 20px); height: 3px; background: #dfe2e6; }
.o-step.ok:not(:last-child)::after { background: #28a745; }
.o-step-dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; background: #eef0f2; color: #adb5bd; z-index: 1; }
.o-step.ok .o-step-dot { background: #28a745; color: #fff; }
.o-step.now .o-step-dot { background: #f0ad4e; color: #fff; box-shadow: 0 0 0 5px rgba(240,173,78,.25); }
.o-step-title { margin-top: 8px; font-weight: 500; }
.o-step.wait .o-step-title { color: var(--o-muted); font-weight: 400; }
.o-step-role { font-size: 12px; color: var(--o-muted); }
.o-step-who { margin-top: 5px; font-size: 13px; font-weight: 500; }
.o-step-time { font-size: 12px; color: var(--o-muted); }
.o-step.now .o-step-time { color: #a86b00; font-weight: 500; }

/* ---------- Matriks tracking produksi dan linimasa ---------- */
.o-matrix th.o-mx { font-size: 11.5px; font-weight: 500; text-align: center; vertical-align: bottom; min-width: 82px; position: static; }
.o-matrix td.o-mx { text-align: center; padding: 6px 4px; border-left: 1px solid var(--o-border-soft); font-size: 12.5px; line-height: 1.25; font-variant-numeric: tabular-nums; }
.o-mx-ok { background: #e3f4e8; color: #11683a; }
.o-mx-now { background: #fdf1d6; color: #8a5800; font-weight: 500; }
.o-mx-wait { background: #f6f7f8; color: #adb5bd; }
.o-mx-d { font-size: 11px; opacity: .75; }
.o-mx-r { font-size: 11px; color: var(--o-danger); font-weight: 500; }
.o-gantt { background: #fff; border: 1px solid var(--o-border); border-radius: 8px; padding: 14px 16px; }
.o-gantt-axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--o-muted); margin: 0 120px 6px 120px; }
.o-gantt-row { display: flex; align-items: center; gap: 12px; margin: 7px 0; }
.o-gantt-label { width: 108px; flex: none; font-weight: 500; }
.o-gantt-track { flex: 1; height: 16px; background: #f1f2f4; border-radius: 8px; position: relative; }
.o-gantt-bar { position: absolute; top: 0; height: 100%; border-radius: 8px; min-width: 6px; }
.o-gantt-bar.ok { background: #28a745; }
.o-gantt-bar.now { background: #f0ad4e; }
.o-gantt-info { width: 108px; flex: none; font-size: 11.5px; color: var(--o-muted); }

/* ---------- Produksi ---------- */
.o-badge-info { background: #dcebfb; color: #1b5da8; }
.o-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--o-border); margin-bottom: 14px; flex-wrap: wrap; }
.o-tabs a { padding: 9px 18px; color: #4b5563; border-bottom: 3px solid transparent; margin-bottom: -1px; font-weight: 500; }
.o-tabs a:hover { text-decoration: none; color: var(--o-brand); background: var(--o-brand-soft); }
.o-tabs a.active { color: var(--o-brand); border-bottom-color: var(--o-brand); }
.o-note { background: #eef6fb; border: 1px solid #cfe3f3; color: #25506f; padding: 9px 14px; border-radius: 6px; margin-bottom: 14px; display: flex; gap: 10px; align-items: flex-start; }
.o-note i { margin-top: 3px; }
.o-note.warn { background: #fff6e0; border-color: #f0d9a0; color: #7a5300; }
.o-progress { height: 8px; background: #e9ecef; border-radius: 4px; overflow: hidden; margin-bottom: 3px; }
.o-progress > div { height: 100%; background: var(--o-teal); border-radius: 4px; min-width: 2px; transition: width .3s; }
.o-neg { color: var(--o-danger); font-weight: 500; }
.o-est-inputs { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.o-est-field { display: flex; flex-direction: column; gap: 4px; font-weight: 500; }
.o-est-field input { width: 150px; height: 36px; border: 1px solid var(--o-border); border-radius: 4px; padding: 0 10px; font: inherit; text-align: right; }
.o-est-field input:focus { outline: none; border-color: var(--o-brand); box-shadow: 0 0 0 3px rgba(113,75,103,.12); }
.o-mini-input { height: 30px; border: 1px solid var(--o-border); border-radius: 4px; padding: 0 8px; font: inherit; width: 90px; }
.o-mini-input:focus { outline: none; border-color: var(--o-brand); }

.o-menu-soon > span { cursor: default; opacity: .42; }
.o-menu-soon:hover > span { background: transparent; }

/* ---------- Layar utama / launcher aplikasi ---------- */
body.o-home-page { background: radial-gradient(1200px 600px at 50% -10%, #6a4a62 0%, #4a2f44 45%, #34202f 100%) fixed; min-height: 100vh; color: #fff; }
.o-home-page .o-navbar { background: rgba(0,0,0,.22); box-shadow: none; backdrop-filter: blur(6px); }
.o-launcher-wrap { max-width: 980px; margin: 0 auto; padding: 44px 24px 60px; }
.o-launcher-top { display: flex; flex-direction: column; align-items: center; gap: 18px; margin-bottom: 44px; }
.o-launcher-hello { font-size: 15px; color: rgba(255,255,255,.72); }
.o-launcher-search { width: 360px; max-width: 100%; height: 40px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-radius: 22px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); }
.o-launcher-search:focus-within { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.45); }
.o-launcher-search i { color: rgba(255,255,255,.7); }
.o-launcher-search input { flex: 1; border: 0; outline: 0; background: transparent; color: #fff; font: inherit; }
.o-launcher-search input::placeholder { color: rgba(255,255,255,.55); }
.o-launcher { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 34px 20px; justify-items: center; }
.o-tile { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 150px; padding: 12px 8px; border-radius: 14px; color: #fff; text-align: center; transition: background .15s, transform .15s; }
a.o-tile:hover { background: rgba(255,255,255,.1); transform: translateY(-3px); text-decoration: none; color: #fff; }
a.o-tile:focus-visible { outline: 3px solid rgba(255,255,255,.55); outline-offset: 2px; }
.o-tile-icon { position: relative; width: 92px; height: 92px; border-radius: 22px; display: grid; place-items: center; font-size: 38px; color: #fff; box-shadow: 0 8px 18px rgba(0,0,0,.35), inset 0 -5px 0 rgba(0,0,0,.14), inset 0 2px 0 rgba(255,255,255,.18); }
.o-tile-name { font-size: 15px; font-weight: 500; line-height: 1.25; }
.o-tile-name small { display: block; font-size: 11px; font-weight: 400; opacity: .7; }
.o-tile-soon { opacity: .5; cursor: default; }
.o-tile-badge { position: absolute; top: -8px; right: -8px; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 13px; background: #d23f3a; color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center; border: 3px solid #4a2f44; }
.o-launcher-empty { text-align: center; color: rgba(255,255,255,.7); margin-top: 24px; }

/* ---------- Dialog konfirmasi (pengganti confirm bawaan browser) ---------- */
.o-modal-backdrop { position: fixed; inset: 0; background: rgba(33,37,41,.45); z-index: 200; display: flex; align-items: flex-start; justify-content: center; padding: 14vh 16px 16px; animation: o-fade .15s ease-out; }
.o-modal { width: 440px; max-width: 100%; background: #fff; border-radius: 8px; box-shadow: 0 18px 50px rgba(0,0,0,.28); overflow: hidden; animation: o-pop .16s ease-out; }
.o-modal-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px 6px; }
.o-modal-icon { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 16px; background: var(--o-brand-soft); color: var(--o-brand); }
.o-modal.danger .o-modal-icon { background: #fbe2e0; color: var(--o-danger); }
.o-modal-title { margin: 0; font-size: 17px; font-weight: 500; }
.o-modal-body { padding: 6px 20px 18px 70px; color: #4b5563; line-height: 1.5; }
.o-modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; background: #f8f9fa; border-top: 1px solid var(--o-border-soft); }
.o-btn-danger { background: var(--o-danger); color: #fff; }
.o-btn-danger:hover { background: #b9322d; color: #fff; }
.o-btn:focus-visible { outline: 3px solid rgba(113,75,103,.35); outline-offset: 1px; }
.o-btn-danger:focus-visible { outline-color: rgba(210,63,58,.4); }
@keyframes o-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes o-pop { from { opacity: 0; transform: translateY(-10px) scale(.97); } to { opacity: 1; transform: none; } }

/* ---------- Toast ---------- */
.o-toasts { position: fixed; top: 58px; right: 18px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.o-toast { min-width: 280px; max-width: 420px; background: #fff; border: 1px solid var(--o-border); border-left: 4px solid var(--o-teal); border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.14); padding: 10px 14px; display: flex; gap: 10px; align-items: flex-start; animation: o-in .2s ease-out; }
.o-toast.success { border-left-color: #28a745; }
.o-toast.success i { color: #28a745; }
.o-toast.danger { border-left-color: var(--o-danger); }
.o-toast.danger i { color: var(--o-danger); }
.o-toast i { margin-top: 2px; }
@keyframes o-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

/* ---------- Login ---------- */

@media (max-width: 820px) {
    .o-group { grid-template-columns: 1fr; }
    .o-field { grid-template-columns: 1fr; }
    .o-cp-row { flex-wrap: wrap; }
    .o-search { order: 3; max-width: none; flex-basis: 100%; }
    .o-sheet { padding: 18px; }
    .o-user-name, .o-brand { display: none; }
    .o-list .o-hide-sm { display: none; }
}

/* ---- Personalia: kartu karyawan ala Odoo ---- */
.o-emp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.o-emp { display: flex; gap: 12px; background: #fff; border: 1px solid var(--o-border); border-radius: 4px; padding: 10px; color: inherit; transition: box-shadow .12s, border-color .12s; }
.o-emp:hover { box-shadow: 0 2px 8px rgba(0,0,0,.1); border-color: #c9cdd2; text-decoration: none; }
.o-emp img { width: 72px; height: 72px; border-radius: 4px; object-fit: cover; flex: none; background: #eef0f2; }
.o-emp-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.o-emp-name { font-weight: 500; font-size: 15px; color: #212529; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-emp-job { color: #495057; font-size: 13px; }
.o-emp-meta { color: var(--o-muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-emp-photo { width: 128px; height: 128px; border-radius: 4px; object-fit: cover; background: #eef0f2; border: 1px solid var(--o-border); }
.o-avatar-sm { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: 8px; background: #eef0f2; }

/* ---- Bar filter / pencarian ala Odoo ---- */
.o-filter { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; padding: 10px 12px; background: #fff; border: 1px solid var(--o-border); border-radius: 6px; }
.o-filter .o-fsearch { position: relative; flex: 1 1 260px; max-width: 380px; }
.o-filter .o-fsearch i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #9aa1a9; font-size: 13px; pointer-events: none; }
.o-filter input[type=text], .o-filter input:not([type]), .o-filter input[type=search] { width: 100%; height: 34px; padding: 0 12px 0 33px; border: 1px solid var(--o-border); border-radius: 4px; background: #f8f9fa; font: inherit; outline: 0; transition: border-color .12s, box-shadow .12s, background .12s; }
.o-filter select { height: 34px; padding: 0 30px 0 12px; border: 1px solid var(--o-border); border-radius: 4px; font: inherit; color: #374151; cursor: pointer; outline: 0; appearance: none; -webkit-appearance: none;
    background: #f8f9fa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236c757d' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 11px center; transition: border-color .12s, box-shadow .12s; }
.o-filter input:focus, .o-filter select:focus { border-color: var(--o-brand); background-color: #fff; box-shadow: 0 0 0 3px rgba(113,75,103,.14); }
.o-filter select:hover, .o-filter input:hover { border-color: #c3c7cc; }
.o-filter .o-check { display: inline-flex; gap: 7px; align-items: center; height: 34px; padding: 0 10px; border: 1px solid var(--o-border); border-radius: 4px; background: #f8f9fa; cursor: pointer; user-select: none; color: #374151; }
.o-filter .o-check input { accent-color: var(--o-brand); width: 15px; height: 15px; margin: 0; }
.o-filter .o-count { margin-left: auto; color: var(--o-muted); font-size: 13px; }

/* ---- Halaman masuk: dua panel ala Odoo ---- */
body.o-login { background: #f2f0f3; min-height: 100vh; margin: 0; }
.o-login-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(340px, 46%) 1fr; }
.o-login-side { position: relative; overflow: hidden; color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: 40px 48px;
    background: radial-gradient(1200px 600px at 0% 0%, #6d476a 0%, rgba(109,71,106,0) 60%), linear-gradient(160deg, #4e2f48 0%, #33202f 100%); }
.o-login-side::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 380px; height: 380px; border-radius: 50%; background: rgba(255,255,255,.05); }
.o-login-brand { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 500; position: relative; z-index: 1; }
.o-login-brand .mark { width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,.16); display: grid; place-items: center; font-size: 18px; }
.o-login-hero { position: relative; z-index: 1; max-width: 420px; }
.o-login-hero h2 { font-size: 32px; line-height: 1.25; font-weight: 500; margin: 0 0 14px; }
.o-login-hero p { margin: 0; color: rgba(255,255,255,.72); font-size: 15px; line-height: 1.6; }
.o-login-apps { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 56px); gap: 14px; }
.o-login-apps span { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-size: 22px; box-shadow: 0 6px 14px rgba(0,0,0,.28), inset 0 -4px 0 rgba(0,0,0,.14); }
.o-login-main { display: grid; place-items: center; padding: 32px 20px; background: #fff; }
.o-login-card { width: 380px; max-width: 100%; }
.o-login-card h1 { font-size: 28px; font-weight: 500; margin: 0 0 6px; color: #212529; }
.o-login-sub { color: var(--o-muted); margin: 0 0 22px; }
.o-login-card label { display: block; font-weight: 500; margin: 16px 0 6px; color: #374151; }
.o-login-field { position: relative; }
.o-login-field > i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #9aa1a9; font-size: 14px; pointer-events: none; }
.o-login-card input[type=text], .o-login-card input[type=password] { width: 100%; height: 44px; border: 1px solid #d5d9de; border-radius: 6px; padding: 0 42px 0 38px; font: inherit; outline: 0; background: #f8f9fa; transition: border-color .12s, box-shadow .12s, background .12s; }
.o-login-card input:focus { border-color: var(--o-brand); background: #fff; box-shadow: 0 0 0 3px rgba(113,75,103,.16); }
.o-login-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: transparent; color: #6c757d; border-radius: 6px; cursor: pointer; }
.o-login-eye:hover { background: #eef0f2; }
.o-login-card .o-btn { width: 100%; justify-content: center; height: 46px; margin-top: 22px; font-size: 15px; border-radius: 6px; gap: 8px; }
.o-login-card .o-remember { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-weight: 400; color: var(--o-muted); cursor: pointer; }
.o-login-card .o-remember input { accent-color: var(--o-brand); width: 15px; height: 15px; margin: 0; }
.o-login-foot { text-align: center; color: var(--o-muted); font-size: 12px; margin-top: 26px; }
.o-login-err { background: #fdecea; border: 1px solid #f5c2bd; color: #9b2c22; padding: 9px 12px; border-radius: 6px; font-size: 13px; }
@media (max-width: 820px) {
    .o-login-wrap { grid-template-columns: 1fr; }
    .o-login-side { padding: 24px 24px 28px; gap: 22px; }
    .o-login-hero h2 { font-size: 22px; } .o-login-apps { display: none; }
}

/* ---- GA & Aset: tabel jatah yang rata ---- */
.o-jatah { table-layout: fixed; }
.o-jatah th, .o-jatah td { text-align: left; vertical-align: top; }
.o-jatah td { padding-top: 10px; padding-bottom: 10px; height: auto; }
.o-jatah-cell { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--o-border); border-radius: 6px; background: #fff; cursor: pointer; user-select: none; }
.o-jatah-cell input { accent-color: var(--o-brand); width: 16px; height: 16px; margin: 0; flex: none; }
.o-jatah-cell .o-jatah-ya { font-weight: 500; color: #374151; }
.o-jatah-cell .o-jatah-n { margin-left: auto; color: var(--o-muted); font-size: 12.5px; white-space: nowrap; }
.o-jatah-cell:has(input:checked), .o-jatah-cell.on { background: #f3edf2; border-color: #cdb9c8; }
.o-jatah-cell:has(input:not(:checked)) .o-jatah-ya { color: var(--o-muted); font-weight: 400; }
.o-jatah-cell.on i { color: var(--o-brand); }
.o-jatah-model { display: flex; gap: 6px; margin-top: 6px; }
.o-jatah-model input { height: 32px; padding: 0 10px; border: 1px solid var(--o-border); border-radius: 4px; background: #f8f9fa; font: inherit; outline: 0; min-width: 0; flex: 1; }
.o-jatah-model input.th { flex: none; width: 66px; text-align: center; }
.o-jatah-model input:focus { border-color: var(--o-brand); background: #fff; box-shadow: 0 0 0 3px rgba(113,75,103,.14); }
.o-jatah-model textarea { padding: 6px 10px; border: 1px solid var(--o-border); border-radius: 4px; background: #f8f9fa; font: inherit; font-size: 12.5px; outline: 0; min-width: 0; flex: 1; resize: vertical; line-height: 1.35; }
.o-jatah-model textarea:focus { border-color: var(--o-brand); background: #fff; box-shadow: 0 0 0 3px rgba(113,75,103,.14); }

/* =====================================================================
   Tampilan HP dan tablet kecil: semua modul mengikuti layar sempit
   ===================================================================== */
html { -webkit-text-size-adjust: 100%; }
img, canvas, svg { max-width: 100%; }

@media (max-width: 820px) {
    body { overflow-x: hidden; }

    /* bilah atas: menu digeser ke samping, submenu tampil melayang selebar layar */
    .o-navbar { overflow-x: auto; overflow-y: hidden; white-space: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .o-navbar::-webkit-scrollbar { display: none; }
    .o-navbar > * { flex: none; }
    .o-brand { display: block !important; max-width: 120px; overflow: hidden; text-overflow: ellipsis; padding: 0 8px; }
    .o-menu > a, .o-menu > span { padding: 0 11px; }
    .o-sub { position: fixed; left: 8px; right: 8px; top: 46px; min-width: 0; max-height: 70vh; overflow-y: auto; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.25); white-space: normal; }
    .o-menu.o-right .o-sub { left: 8px; right: 8px; }
    .o-sub a, .o-navbar .o-sub a { padding: 12px 16px; }

    /* panel kontrol dan isi */
    .o-cp { padding: 8px 12px; }
    .o-cp-row { flex-wrap: wrap; gap: 8px; }
    .o-cp-right { margin-left: 0; width: 100%; flex-wrap: wrap; gap: 8px; }
    .o-cp-right > form, .o-cp-right > a { flex: 0 0 auto; }
    .o-breadcrumb { flex-wrap: wrap; }
    .o-content { padding: 12px 12px 32px; }
    .o-sheet { padding: 14px 14px 20px; border-left: 0; border-right: 0; }
    .o-title { font-size: 22px; }

    /* tabel: dapat digeser ke samping, kolom tidak dipaksa menyempit */
    .o-list { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
    .o-list td, .o-list th { padding-left: 10px; padding-right: 10px; }
    .o-list th { position: static; }
    .o-card .o-list { border: 0; }
    .o-jatah { table-layout: auto; min-width: 760px; }

    /* kartu, statistik, dashboard */
    .o-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .o-stat { padding: 12px; gap: 10px; }
    .o-stat-icon { width: 38px; height: 38px; font-size: 16px; }
    .o-stat-value { font-size: 19px; }
    .o-dash-head { flex-direction: column; align-items: stretch; gap: 10px; }
    .o-dash-actions { flex-wrap: wrap; }
    .o-dash-grid { grid-template-columns: 1fr; }
    .o-chart { height: 230px; }
    .o-emp-grid { grid-template-columns: 1fr; }
    .o-est-inputs { flex-direction: column; align-items: stretch; }

    /* bar filter */
    .o-filter { padding: 8px; gap: 8px; }
    .o-filter .o-fsearch { flex: 1 1 100%; max-width: none; }
    .o-filter select, .o-filter input, .o-filter .o-check { flex: 1 1 140px; min-width: 0; }
    .o-filter .o-count { margin-left: 0; flex-basis: 100%; }

    /* sasaran sentuh dan huruf formulir (16px mencegah iOS memperbesar layar) */
    input, select, textarea { font-size: 16px; }
    .o-btn { min-height: 38px; }
    .o-icon { min-width: 36px; min-height: 36px; }
    .o-pager a { padding: 8px 10px; }

    /* peringatan dan dialog */
    .o-toast { left: 8px; right: 8px; max-width: none; }
    .o-note { flex-wrap: wrap; }

    /* beranda (launcher) */
    .o-launcher-wrap { padding: 24px 12px 40px; }
    .o-launcher { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 6px; }
    .o-tile { width: auto; padding: 8px 2px; gap: 8px; }
    .o-tile-icon { width: 64px; height: 64px; font-size: 26px; border-radius: 16px; }
    .o-tile-name { font-size: 12.5px; }
    .o-tile-name small { display: none; }
    .o-launcher-search { width: 100%; }
}

@media (max-width: 480px) {
    .o-stats { grid-template-columns: 1fr; }
    .o-launcher { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .o-tile-icon { width: 72px; height: 72px; font-size: 30px; }
    .o-h1 { font-size: 22px; }

    /* halaman masuk: panel samping diringkas, formulir memenuhi layar */
    .o-login-side { padding: 18px 18px 20px; gap: 12px; }
    .o-login-hero { display: none; }
    .o-login-brand { font-size: 18px; }
    .o-login-main { padding: 22px 16px 28px; align-items: start; }
    .o-login-card { width: 100%; }
    .o-login-card h1 { font-size: 24px; }
    .o-login-card input[type=text], .o-login-card input[type=password] { height: 48px; font-size: 16px; }
    .o-login-card .o-btn { height: 48px; }
}

/* login di HP: panel atas hanya setinggi isinya, formulir langsung terlihat */
@media (max-width: 820px) {
    .o-login-wrap { grid-template-rows: auto 1fr; min-height: 100vh; min-height: 100dvh; }
    .o-login-side { min-height: 0; justify-content: flex-start; }
    .o-login-main { align-items: start; }
}
@media (max-width: 480px) {
    .o-login-side { padding: 14px 18px; }
    .o-login-side::after { display: none; }
    .o-login-brand .mark { width: 34px; height: 34px; font-size: 16px; }
    .o-login-main { padding-top: 26px; }
}

/* menu modul di HP: tombol hamburger membuka daftar menu penuh (menggantikan geser ke samping) */
.o-burger { display: none; }
@media (max-width: 820px) {
    .o-navbar { overflow: visible; flex-wrap: wrap; height: auto; min-height: 46px; max-height: 100vh; max-height: 100dvh; overflow-y: auto; white-space: normal; }
    .o-navbar > .o-apps { order: 1; } .o-navbar > .o-brand { order: 2; } .o-navbar > .o-burger { order: 3; } .o-navbar > .o-spacer { order: 4; flex: 1; } .o-navbar > .o-systray { order: 5; }
    .o-brand { max-width: none !important; }
    .o-burger { display: grid; place-items: center; width: 40px; height: 40px; margin-left: 4px; border: 0; border-radius: 8px; background: rgba(255,255,255,.12); color: #fff; font-size: 16px; cursor: pointer; }
    .o-nav-open .o-burger { background: rgba(255,255,255,.28); }
    .o-navbar > .o-menu { display: none; order: 9; width: 100%; height: auto; border-top: 1px solid rgba(255,255,255,.1); }
    .o-navbar.o-nav-open > .o-menu { display: block; }
    .o-navbar > .o-menu > a, .o-navbar > .o-menu > span { height: 46px; padding: 0 16px; }
    .o-navbar > .o-menu > span .fa-chevron-down { display: none; }
    .o-navbar > .o-menu .o-sub { position: static; display: block; min-width: 0; max-height: none; box-shadow: none; border: 0; border-radius: 0; background: rgba(0,0,0,.2); }
    .o-navbar > .o-menu .o-sub a { color: rgba(255,255,255,.92); padding: 11px 16px 11px 28px; }
    .o-navbar > .o-menu .o-sub a i { color: rgba(255,255,255,.6); }
    .o-navbar > .o-menu .o-sub .o-sub-head { color: rgba(255,255,255,.55); padding-left: 16px; }
    .o-navbar > .o-menu .o-sub hr { border-top-color: rgba(255,255,255,.12); }
}
