/* =====================================================================
   CirebonKerja.ID — fitur Simpan Loker, Sidebar, dan Tampilan Aplikasi
   Bagian 1: berlaku di semua perangkat (PC tetap seperti semula)
   Bagian 2: hanya HP/Tablet  →  html.app-ui
   ===================================================================== */

/* ---------- 1. Elemen khusus aplikasi: disembunyikan di PC ---------- */
.app-back,
.app-bottom-nav,
.job-avatar { display: none; }

/* ---------- Kartu lowongan (meniru tampilan lama di PC) ---------- */
.job-row-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; gap: 10px; }
.job-label { font-size: 12px; font-weight: 600; }
.job-time { font-size: 12px; color: #64748b; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.job-row-main { display: flex; align-items: flex-start; gap: 12px; }
.job-row-text { flex: 1; min-width: 0; }
.job-row .job-title-slim { margin-bottom: 2px; }
.job-row .job-company { margin-bottom: 8px; color: #475569; }
body.dark-mode .job-row .job-company { color: #94a3b8; }
.job-status { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: #fee2e2; color: #b91c1c; }
.job-status.is-off { background: #e2e8f0; color: #475569; }
body.dark-mode .job-status { background: rgba(239, 68, 68, .15); color: #fca5a5; }
body.dark-mode .job-status.is-off { background: #334155; color: #cbd5e1; }

/* ---------- Tombol simpan (bookmark) ---------- */
.bm-btn {
    -webkit-appearance: none; appearance: none;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 0; background: transparent; cursor: pointer; color: #94a3b8;
    font: inherit; transition: color .15s, background-color .15s, border-color .15s;
}
.bm-btn svg { transition: fill .15s; }
.bm-btn.is-saved { color: #2563eb; }
.bm-btn.is-saved svg { fill: currentColor; }
.bm-btn:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }

.bm-card { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; margin: -6px -4px 0 0; }
.bm-card:hover { background: #eff6ff; color: #2563eb; }
body.dark-mode .bm-card { color: #64748b; }
body.dark-mode .bm-card:hover { background: #334155; color: #60a5fa; }
body.dark-mode .bm-btn.is-saved { color: #60a5fa; }

/* ---------- Baris tombol di detail lowongan ---------- */
.detail-actions { display: flex; gap: 12px; align-items: stretch; margin-top: 20px; }
.detail-actions .btn-apply { flex: 1; width: auto; }
.detail-actions #expired-msg { flex: 1; margin-top: 0 !important; }
.bm-detail {
    padding: 0 20px; border: 1px solid #cbd5e1; border-radius: 8px; background: #ffffff;
    color: #334155; font-size: 15px; font-weight: 600; white-space: nowrap;
}
.bm-detail:hover { border-color: #2563eb; color: #2563eb; }
.bm-detail.is-saved { border-color: #2563eb; background: #eff6ff; color: #2563eb; }
body.dark-mode .bm-detail { background: #0f172a; border-color: #334155; color: #cbd5e1; }
body.dark-mode .bm-detail.is-saved { border-color: #60a5fa; background: rgba(96, 165, 250, .12); color: #60a5fa; }

/* ---------- Sidebar (bisa diaktifkan di Pengaturan) ---------- */
.content-area.with-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 32px; align-items: start; }
.main-col { min-width: 0; }
.home-sidebar { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 16px; }
.side-box { border: 1px solid #e2e8f0; border-radius: 10px; padding: 16px; font-size: 14px; }
.side-title { font-size: 15px; font-weight: 700; color: #0f172a; margin-bottom: 10px; }
.side-box p { color: #64748b; font-size: 13.5px; line-height: 1.55; margin-bottom: 10px; }
.side-empty { margin: 0 0 8px !important; }
.side-link { color: #2563eb; font-weight: 600; font-size: 13.5px; text-decoration: none; }
.side-link:hover { text-decoration: underline; }

.side-lokasi { list-style: none; margin: 0; padding: 0; }
.side-lokasi-btn {
    width: 100%; display: flex; justify-content: space-between; align-items: center;
    padding: 7px 8px; margin: 0 -8px; width: calc(100% + 16px);
    border: 0; background: none; border-radius: 6px; cursor: pointer;
    font: inherit; font-size: 14px; color: #334155; text-align: left;
}
.side-lokasi-btn:hover, .side-lokasi-btn.is-active { background: #eff6ff; color: #2563eb; }
.side-count { font-size: 12px; font-weight: 700; color: #64748b; background: #f1f5f9; border-radius: 10px; padding: 1px 8px; }
.side-lokasi-btn.is-active .side-count { background: #2563eb; color: #fff; }

.side-populer, .side-saved { margin: 0 0 10px; padding: 0; list-style: none; counter-reset: pop; }
.side-populer li, .side-saved li { border-top: 1px solid #f1f5f9; }
.side-populer li:first-child, .side-saved li:first-child { border-top: 0; }
.side-populer a, .side-saved a { display: flex; flex-direction: column; padding: 8px 0; text-decoration: none; }
.side-populer li { counter-increment: pop; position: relative; padding-left: 26px; }
.side-populer li::before { content: counter(pop); position: absolute; left: 0; top: 9px; font-size: 13px; font-weight: 800; color: #94a3b8; }
.side-pop-judul { color: #0f172a; font-weight: 600; font-size: 13.5px; line-height: 1.35; }
.side-pop-pt { color: #64748b; font-size: 12.5px; }
.side-populer a:hover .side-pop-judul, .side-saved a:hover .side-pop-judul { color: #2563eb; }

.side-box-soft { background: #f8fafc; }
.side-box-cta { background: #2563eb; border-color: #2563eb; }
.side-box-cta .side-title { color: #ffffff; }
.side-box-cta p { color: #dbeafe; }
.side-cta-btn { display: inline-block; background: #ffffff; color: #1d4ed8; font-weight: 700; font-size: 14px; padding: 8px 16px; border-radius: 6px; text-decoration: none; }
.side-cta-btn:hover { background: #eff6ff; }

body.dark-mode .side-box { border-color: #334155; }
body.dark-mode .side-title, body.dark-mode .side-pop-judul { color: #f8fafc; }
body.dark-mode .side-box p, body.dark-mode .side-pop-pt { color: #94a3b8; }
body.dark-mode .side-lokasi-btn { color: #cbd5e1; }
body.dark-mode .side-lokasi-btn:hover, body.dark-mode .side-lokasi-btn.is-active { background: #334155; color: #60a5fa; }
body.dark-mode .side-count { background: #334155; color: #cbd5e1; }
body.dark-mode .side-populer li, body.dark-mode .side-saved li { border-top-color: #334155; }
body.dark-mode .side-box-soft { background: #0f172a; }
body.dark-mode .side-box-cta { background: #1d4ed8; border-color: #1d4ed8; }
body.dark-mode .side-link { color: #60a5fa; }

@media (max-width: 900px) {
    .content-area.with-sidebar { grid-template-columns: 1fr; }
    .home-sidebar { position: static; }
}

/* ---------- Halaman Tersimpan ---------- */
.saved-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 8px; flex-wrap: wrap; }
.saved-head h1 { font-size: 26px; color: #0f172a; font-weight: 800; line-height: 1.25; }
.saved-note { color: #64748b; font-size: 14px; margin-bottom: 20px; }
.saved-clear { border: 0; background: none; color: #b91c1c; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; padding: 6px 0; }
.saved-clear:hover { text-decoration: underline; }
.saved-empty { text-align: center; padding: 48px 20px; background: #f8fafc; border-radius: 12px; color: #475569; }
.saved-empty svg { color: #94a3b8; margin-bottom: 10px; }
.saved-empty h2 { font-size: 18px; color: #0f172a; margin-bottom: 6px; }
.saved-empty p { font-size: 14px; max-width: 360px; margin: 0 auto 18px; }
.saved-empty a { display: inline-block; background: #2563eb; color: #fff; text-decoration: none; font-weight: 600; padding: 10px 20px; border-radius: 8px; }
body.dark-mode .saved-head h1, body.dark-mode .saved-empty h2 { color: #f8fafc; }
body.dark-mode .saved-empty { background: #0f172a; color: #94a3b8; }

/* ---------- Notifikasi kecil (toast) ---------- */
.app-toast {
    position: fixed; left: 50%; bottom: 24px; z-index: 1000;
    transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
    background: #0f172a; color: #ffffff; padding: 10px 18px; border-radius: 10px;
    font-size: 14px; font-weight: 500; box-shadow: 0 8px 24px rgba(15, 23, 42, .25);
    transition: opacity .2s ease, transform .2s ease; white-space: nowrap;
}
.app-toast.show { opacity: 1; transform: translate(-50%, 0); }
body.dark-mode .app-toast { background: #f8fafc; color: #0f172a; }


/* =====================================================================
   2. TAMPILAN APLIKASI — hanya HP & tablet (class .app-ui di <html>)
   ===================================================================== */
html.app-ui body {
    --app-bg: #edf1f7;
    --app-surface: #ffffff;
    --app-ink: #0f172a;
    --app-muted: #64748b;
    --app-line: #e2e8f0;
    --app-soft: #f1f5f9;
    --app-primary: #2563eb;
    --app-indicator: #dbeafe;
    --nav-h: 64px;
    --safe-b: env(safe-area-inset-bottom, 0px);
    background: var(--app-bg);
    padding-bottom: calc(var(--nav-h) + var(--safe-b));
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: contain;
}
html.app-ui body.dark-mode {
    --app-bg: #0f172a;
    --app-surface: #1e293b;
    --app-ink: #f8fafc;
    --app-muted: #94a3b8;
    --app-line: #334155;
    --app-soft: #0f172a;
    --app-primary: #3b82f6;
    --app-indicator: rgba(96, 165, 250, .2);
}

/* Lebar penuh, tanpa bingkai kartu ala desktop */
html.app-ui .container {
    max-width: none !important; width: 100% !important; margin: 0 !important;
    border-radius: 0 !important; box-shadow: none !important; overflow: visible !important;
    background: var(--app-surface) !important;
}
html.app-ui .container.home-page { background: transparent !important; }

/* ---------- Bar atas (app bar) ---------- */
html.app-ui header {
    position: sticky; top: 0; z-index: 80;
    min-height: 56px; gap: 6px;
    padding: calc(env(safe-area-inset-top, 0px) + 8px) 12px 8px 16px;
    background: var(--app-surface); border-bottom: 1px solid var(--app-line);
}
html.app-ui header .logo { font-size: 19px; gap: 8px; min-width: 0; }
html.app-ui header .logo img { max-height: 34px !important; }
html.app-ui .mobile-menu-btn { display: none !important; }
html.app-ui header nav#main-nav {
    display: flex !important; position: static; width: auto; margin-left: auto;
    flex-direction: row; background: transparent; box-shadow: none; padding: 0; gap: 0;
}
html.app-ui header nav#main-nav a { display: none !important; }
html.app-ui .theme-switch { width: 40px; height: 40px; margin: 0; color: var(--app-muted); }

html.app-ui body.is-detail .app-back {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; margin-left: -8px; border: 0; border-radius: 50%;
    background: transparent; color: var(--app-ink); cursor: pointer; flex-shrink: 0;
}
html.app-ui body.is-detail .app-back:active { background: var(--app-soft); }
html.app-ui body.is-detail header { padding-left: 12px; }
html.app-ui body.is-detail header .logo { margin-right: auto; }

/* ---------- Pita biru + kotak pencarian (beranda) ---------- */
html.app-ui .banner-area {
    height: auto !important; background: #2563eb;
    padding: 20px 20px 58px;
}
html.app-ui body.dark-mode .banner-area { background: #1d4ed8; }
html.app-ui .banner-area img { display: none; }
html.app-ui .banner-overlay { position: static; background: none; padding: 0; display: block; }
html.app-ui .banner-text h1 { font-size: 23px; letter-spacing: -0.3px; margin-bottom: 4px; }
html.app-ui .banner-text p { font-size: 13.5px; opacity: .88; line-height: 1.45; max-width: 34ch; }

html.app-ui .content-area { padding: 0 12px 20px; background: transparent; border: 0 !important; }
html.app-ui body.is-detail .content-area { padding-top: 12px; }

html.app-ui .filter-area {
    position: relative; z-index: 2;
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    margin: -42px 0 14px; padding: 12px;
    background: var(--app-surface); border-radius: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .10);
}
html.app-ui .filter-area input {
    grid-column: 1 / -1; min-width: 0 !important; height: 48px;
    padding-left: 44px; border-radius: 12px; border-color: transparent;
    background: var(--app-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat 14px center;
    font-size: 15px;
}
html.app-ui .filter-area select {
    width: 100%; min-width: 0; height: 40px; padding: 0 30px 0 12px;
    border-radius: 20px; font-size: 13px; font-weight: 500;
    -webkit-appearance: none; appearance: none;
    background: var(--app-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 11px center;
    border: 1px solid var(--app-line);
}
html.app-ui body.dark-mode .filter-area select { background-color: var(--app-surface); }

/* ---------- Kartu lowongan ala aplikasi ---------- */
html.app-ui .job-list-container { display: flex; flex-direction: column; gap: 10px; }
html.app-ui .job-row {
    background: var(--app-surface) !important; border: 0 !important; border-radius: 16px;
    padding: 14px 12px 12px 14px; gap: 10px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
    transition: transform .12s ease !important;
}
html.app-ui .job-row:active { transform: scale(.985); }
html.app-ui .job-row-main { order: 1; gap: 12px; }
html.app-ui .job-meta-slim { order: 2; gap: 6px; margin-top: 0; }
html.app-ui .job-row-top { order: 3; margin: 0; padding-top: 10px; border-top: 1px solid var(--app-soft); }

html.app-ui .job-avatar {
    display: flex; position: relative; overflow: hidden; flex-shrink: 0;
    width: 46px; height: 46px; border-radius: 12px;
    align-items: center; justify-content: center;
    background: #eff6ff; color: #2563eb; font-weight: 800; font-size: 15px;
    border: 1px solid var(--app-line);
}
html.app-ui body.dark-mode .job-avatar { background: #0f172a; color: #93c5fd; }
html.app-ui .job-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #ffffff; padding: 4px; }
html.app-ui .job-row .job-title-slim { font-size: 16px; line-height: 1.3; color: var(--app-ink); }
html.app-ui .job-row .job-company { font-size: 13.5px; margin: 1px 0 0; color: var(--app-muted); }
html.app-ui .meta-item { background: var(--app-soft); color: var(--app-muted); border-radius: 8px; padding: 4px 8px; font-size: 12px; }
html.app-ui .bm-card { width: 40px; height: 40px; margin: -8px -6px 0 0; }
html.app-ui .bm-card:hover { background: transparent; }
html.app-ui .bm-card:active { background: var(--app-soft); }

html.app-ui .no-result { background: var(--app-surface); border-radius: 16px; }
html.app-ui .pagination { margin: 20px 0 8px !important; gap: 6px !important; }
html.app-ui .pagination a { padding: 8px 13px !important; border-radius: 10px !important; }

/* ---------- Detail lowongan ---------- */
html.app-ui #view-detail { background: var(--app-surface); border-radius: 18px; padding: 18px 16px 8px; }
html.app-ui .detail-title { font-size: 21px !important; }
html.app-ui .detail-specs { grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px; border-radius: 12px; }
html.app-ui .detail-specs .spec-item:last-child { grid-column: 1 / -1; }
html.app-ui body.is-detail { padding-bottom: calc(80px + var(--safe-b)); }
html.app-ui body.is-detail .app-bottom-nav { display: none; }
html.app-ui .detail-actions {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; margin: 0; gap: 10px;
    padding: 10px 12px calc(10px + var(--safe-b));
    background: var(--app-surface); border-top: 1px solid var(--app-line);
    box-shadow: 0 -6px 20px rgba(15, 23, 42, .06);
}
html.app-ui .detail-actions .bm-detail { width: 54px; padding: 0; border-radius: 14px; flex-shrink: 0; }
html.app-ui .detail-actions .bm-label { display: none; }
html.app-ui .detail-actions .btn-apply { border-radius: 14px; padding: 15px 16px; font-size: 15.5px; }
html.app-ui .detail-actions #expired-msg { border-radius: 14px; padding: 15px; font-size: 15px; }

/* Sidebar tidak dipakai di HP — navigasi bawah menggantikannya */
html.app-ui .content-area.with-sidebar { display: block; }
html.app-ui .home-sidebar { display: none; }

/* ---------- Halaman lain & footer ---------- */
html.app-ui .legal-content { padding: 22px 18px !important; border-top: 0 !important; }
html.app-ui .legal-content h1 { font-size: 23px !important; }
html.app-ui .site-footer { border-radius: 0 !important; max-width: none !important; padding: 22px 18px 18px !important; }
html.app-ui .saved-wrap { padding: 16px 12px 24px; }
html.app-ui .saved-head h1 { font-size: 22px; }
html.app-ui .container.saved-page { background: transparent !important; }

/* ---------- Navigasi bawah ---------- */
html.app-ui .app-bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    height: calc(var(--nav-h) + var(--safe-b)); padding: 0 4px var(--safe-b);
    background: var(--app-surface); border-top: 1px solid var(--app-line);
}
html.app-ui .abn-item {
    flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: var(--app-muted); text-decoration: none; font-size: 11.5px; font-weight: 600;
}
html.app-ui .abn-icon {
    position: relative; width: 58px; height: 30px; border-radius: 15px;
    display: flex; align-items: center; justify-content: center;
    transition: background-color .2s ease;
}
html.app-ui .abn-item:active .abn-icon { background: var(--app-soft); }
html.app-ui .abn-item.is-active { color: var(--app-ink); }
html.app-ui .abn-item.is-active .abn-icon { background: var(--app-indicator); color: var(--app-primary); }
html.app-ui .abn-item.is-active .abn-icon svg { stroke-width: 2.3; }
html.app-ui .abn-badge {
    position: absolute; top: -3px; right: 9px; min-width: 18px; height: 18px; padding: 0 4px;
    border-radius: 9px; border: 2px solid var(--app-surface);
    background: #ef4444; color: #ffffff; font-size: 10px; font-weight: 700; line-height: 14px; text-align: center;
}
html.app-ui .app-toast { bottom: calc(var(--nav-h) + var(--safe-b) + 12px); }
html.app-ui body.is-detail .app-toast { bottom: calc(86px + var(--safe-b)); }

/* Tablet: konten tetap nyaman dibaca, tidak melebar terlalu jauh */
@media (min-width: 700px) {
    html.app-ui .banner-text, html.app-ui .filter-area, html.app-ui .job-list-container,
    html.app-ui #view-detail, html.app-ui .no-result, html.app-ui .saved-wrap > * {
        max-width: 720px; margin-left: auto; margin-right: auto;
    }
    html.app-ui .filter-area { margin-top: -42px; grid-template-columns: 2fr 1fr 1fr; }
    html.app-ui .filter-area input { grid-column: auto; }
    html.app-ui .app-bottom-nav { justify-content: center; }
    html.app-ui .abn-item { max-width: 140px; }
}

@media (prefers-reduced-motion: reduce) {
    .app-toast, html.app-ui .job-row, html.app-ui .abn-icon, .bm-btn, .bm-btn svg { transition: none !important; }
    html.app-ui .job-row:active { transform: none; }
}

/* Di layar sentuh, efek hover tidak "nempel" setelah ditekan */
html.app-ui .theme-switch:hover { background: transparent; }
html.app-ui .theme-switch:active { background: var(--app-soft); }


/* =====================================================================
   3. Label, dropdown menu (PC), panel Menu & daftar baris (HP)
   ===================================================================== */
.job-label { color: #2563eb; }
.job-label.is-urgent { color: #d97706; }
.job-sub, .job-line { display: none; }

/* ---------- Dropdown submenu di menu atas ---------- */
.nav-dd { position: relative; }
.nav-dd-btn {
    display: inline-flex; align-items: center; gap: 4px; padding: 0;
    border: 0; background: none; cursor: pointer;
    font: inherit; font-size: 15px; font-weight: 500; color: #64748b; transition: color .2s;
}
.nav-dd-btn:hover, .nav-dd-btn.active { color: #2563eb; }
.nav-dd-chev { transition: transform .15s ease; }
.nav-dd.is-open .nav-dd-chev { transform: rotate(180deg); }
.nav-dd-menu {
    display: none; position: absolute; top: calc(100% + 14px); left: -14px; z-index: 1000;
    min-width: 210px; padding: 6px; background: #ffffff;
    border: 1px solid #e2e8f0; border-radius: 10px; box-shadow: 0 14px 30px rgba(15, 23, 42, .12);
}
.nav-dd-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }
.nav-dd.is-open .nav-dd-menu { display: block; }
@media (hover: hover) and (min-width: 769px) {
    .nav-dd:hover .nav-dd-menu { display: block; }
    .nav-dd:hover .nav-dd-chev { transform: rotate(180deg); }
}
.nav-dd-menu a { display: block; padding: 9px 12px; border-radius: 6px; font-size: 14.5px; color: #334155; white-space: nowrap; }
.nav-dd-menu a:hover { background: #f1f5f9; color: #2563eb; }
.nav-dd-menu a.active { color: #2563eb; font-weight: 600; }
body.dark-mode .nav-dd-btn { color: #94a3b8; }
body.dark-mode .nav-dd-btn:hover, body.dark-mode .nav-dd-btn.active { color: #60a5fa; }
body.dark-mode .nav-dd-menu { background: #1e293b; border-color: #334155; box-shadow: 0 14px 30px rgba(0, 0, 0, .4); }
body.dark-mode .nav-dd-menu a { color: #cbd5e1; }
body.dark-mode .nav-dd-menu a:hover { background: #334155; color: #f8fafc; }

/* Menu garis tiga lama (layar sempit tanpa mode aplikasi) */
@media (max-width: 768px) {
    .nav-dd { width: 100%; }
    .nav-dd-btn { width: 100%; justify-content: space-between; padding: 15px 20px; border-bottom: 1px solid #f1f5f9; }
    .nav-dd-menu { position: static; min-width: 0; padding: 0 0 0 14px; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
    .nav-dd-menu::before { display: none; }
    nav .nav-dd-menu a { padding: 12px 20px; border-radius: 0; border-bottom: 1px solid #f1f5f9; }
    body.dark-mode .nav-dd-btn, body.dark-mode nav .nav-dd-menu a { border-bottom-color: #334155; }
}

/* ---------- Tombol "Menu" di navigasi bawah ---------- */
html.app-ui button.abn-item { border: 0; background: none; padding: 0; font: inherit; font-size: 11.5px; font-weight: 600; color: var(--app-muted); cursor: pointer; }
html.app-ui button.abn-item[aria-expanded="true"] .abn-icon { background: var(--app-soft); }

/* ---------- Panel "Menu" (bottom sheet) ---------- */
.app-sheet { display: none; }
html.app-ui .app-sheet:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 300; }
html.sheet-terbuka, html.sheet-terbuka body { overflow: hidden; }
.app-sheet-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .45); opacity: 0; transition: opacity .2s ease; }
.app-sheet.is-open .app-sheet-backdrop { opacity: 1; }
.app-sheet-panel {
    position: absolute; left: 0; right: 0; bottom: 0; max-height: 84vh;
    display: flex; flex-direction: column;
    background: var(--app-surface); border-radius: 22px 22px 0 0;
    padding-bottom: var(--safe-b); box-shadow: 0 -10px 30px rgba(15, 23, 42, .18);
    transform: translateY(100%); transition: transform .24s cubic-bezier(.2, .8, .2, 1);
}
.app-sheet.is-open .app-sheet-panel { transform: translateY(0); }
.app-sheet-handle { width: 38px; height: 4px; border-radius: 2px; background: var(--app-line); margin: 9px auto 0; flex-shrink: 0; }
.app-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px 4px 22px; flex-shrink: 0; }
.app-sheet-head h2 { font-size: 18px; font-weight: 800; color: var(--app-ink); }
.app-sheet-close { width: 42px; height: 42px; border: 0; border-radius: 50%; background: none; color: var(--app-muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.app-sheet-close:active { background: var(--app-soft); }
.app-sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 4px 12px 14px; }

.sheet-list { list-style: none; margin: 0; padding: 0; }
.sheet-item {
    display: flex; align-items: center; gap: 14px; width: 100%; min-height: 50px; padding: 0 12px;
    border: 0; border-radius: 12px; background: none; cursor: pointer; text-align: left; text-decoration: none;
    font: inherit; font-size: 15.5px; font-weight: 500; color: var(--app-ink);
}
.sheet-item:active { background: var(--app-soft); }
.sheet-item.is-active { background: var(--app-indicator); color: var(--app-primary); font-weight: 650; }
.sheet-ico { width: 24px; display: inline-flex; justify-content: center; color: var(--app-muted); flex-shrink: 0; }
.sheet-item.is-active .sheet-ico { color: var(--app-primary); }
.sheet-text { flex: 1; min-width: 0; }
.sheet-chev { color: var(--app-muted); transition: transform .18s ease; flex-shrink: 0; }
.sheet-group.is-open > .sheet-toggle .sheet-chev { transform: rotate(90deg); }
.sheet-sub { display: none; list-style: none; margin: 0 0 6px; padding: 0 0 0 50px; }
.sheet-group.is-open > .sheet-sub { display: block; }
.sheet-subitem { display: block; padding: 11px 12px; border-radius: 10px; font-size: 15px; color: var(--app-ink); text-decoration: none; }
.sheet-subitem:active { background: var(--app-soft); }
.sheet-subitem.is-active { color: var(--app-primary); font-weight: 650; }
.sheet-section { font-size: 13px; font-weight: 700; color: var(--app-muted); margin: 14px 12px 2px; }
.sheet-item-plain { min-height: 44px; font-size: 15px; }
.sheet-theme { margin-top: 10px; border-top: 1px solid var(--app-line); border-radius: 0; min-height: 56px; }
.sheet-switch { width: 42px; height: 24px; border-radius: 12px; background: var(--app-line); position: relative; flex-shrink: 0; transition: background-color .18s; }
.sheet-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #ffffff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .18s ease; }
.sheet-theme.is-on .sheet-switch { background: var(--app-primary); }
.sheet-theme.is-on .sheet-switch::after { transform: translateX(18px); }

/* ---------- Daftar loker gaya "baris buku tulis" (HP) ---------- */
html.app-ui.list-baris .job-list-container {
    position: relative; gap: 0; overflow: hidden;
    background: var(--app-surface); border-radius: 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
}
html.app-ui.list-baris .job-list-container:empty { display: none; }
/* garis margin merah muda, seperti buku tulis */
html.app-ui.list-baris .job-list-container::before {
    content: ""; position: absolute; top: 0; bottom: 0; left: 56px; width: 1.5px; z-index: 1; pointer-events: none;
    background: rgba(244, 114, 182, .38);
}
html.app-ui.list-baris .job-row {
    gap: 0; padding: 11px 6px 11px 0; border-radius: 0 !important; box-shadow: none;
    background: transparent !important;
    border-bottom: 1px solid rgba(37, 99, 235, .14) !important;
}
html.app-ui.list-baris .job-row:last-child { border-bottom: 0 !important; }
html.app-ui.list-baris .job-row:active { transform: none; background: var(--app-soft) !important; }
html.app-ui.list-baris .job-row-top,
html.app-ui.list-baris .job-meta-slim,
html.app-ui.list-baris .job-row .job-company { display: none; }
html.app-ui.list-baris .job-row-main { gap: 0; align-items: flex-start; }
html.app-ui.list-baris .job-avatar { width: 34px; height: 34px; margin: 1px 11px 0; border-radius: 9px; font-size: 12px; }
html.app-ui.list-baris .job-avatar img { padding: 2px; }
html.app-ui.list-baris .job-row-text { padding-left: 12px; }
html.app-ui.list-baris .job-row .job-title-slim {
    font-size: 15px; line-height: 1.3; margin: 0 0 2px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
html.app-ui.list-baris .job-sub {
    display: flex; align-items: center; gap: 6px; min-width: 0;
    font-size: 13px; line-height: 1.35; color: var(--app-ink); white-space: nowrap; overflow: hidden;
}
html.app-ui.list-baris .job-sub-pt { overflow: hidden; text-overflow: ellipsis; opacity: .82; }
html.app-ui.list-baris .job-sub-lok { flex-shrink: 0; color: var(--app-muted); }
html.app-ui.list-baris .job-sub-lok::before { content: "·"; margin-right: 6px; }
html.app-ui.list-baris .job-flag { flex-shrink: 0; font-size: 10.5px; font-weight: 700; color: #b45309; background: #fef3c7; border-radius: 4px; padding: 1px 5px; }
html.app-ui.list-baris .job-line { display: flex; align-items: center; gap: 8px; margin-top: 3px; font-size: 12px; line-height: 1.35; color: var(--app-muted); }
html.app-ui.list-baris .job-line-info { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.app-ui.list-baris .job-line b { font-weight: 650; color: #047857; }
html.app-ui.list-baris .job-dot { font-style: normal; margin: 0 5px; opacity: .6; }
html.app-ui.list-baris .job-line-time { flex-shrink: 0; font-size: 11.5px; }
html.app-ui.list-baris .job-line .job-status { font-size: 11px; padding: 1px 6px; margin-right: 6px; border-radius: 4px; }
html.app-ui.list-baris .bm-card { width: 36px; height: 36px; margin: -6px 0 0 2px; }

html.app-ui.list-baris body.dark-mode .job-list-container::before { background: rgba(244, 114, 182, .22); }
html.app-ui.list-baris body.dark-mode .job-row { border-bottom-color: rgba(148, 163, 184, .16) !important; }
html.app-ui.list-baris body.dark-mode .job-line b { color: #6ee7b7; }
html.app-ui.list-baris body.dark-mode .job-flag { background: rgba(245, 158, 11, .18); color: #fbbf24; }

@media (prefers-reduced-motion: reduce) {
    .app-sheet-panel, .app-sheet-backdrop, .sheet-chev, .sheet-switch, .sheet-switch::after, .nav-dd-chev { transition: none !important; }
}

/* ---------- Menu atas: tidak terlipat 2 baris; kelebihan masuk "Lainnya" ---------- */
@media (min-width: 769px) {
    header nav#main-nav { flex-wrap: nowrap; }
    header nav#main-nav > a, header .nav-dd-btn { white-space: nowrap; }
    header nav#main-nav .nav-sembunyi { display: none !important; }
    .nav-dd-lainnya .nav-dd-menu { left: auto; right: -14px; }
    .nav-dd-label { display: block; padding: 8px 12px 2px; font-size: 12px; font-weight: 700; color: #94a3b8; }
}
html.app-ui header nav#main-nav .nav-dd { display: none !important; }
html.app-ui body.dark-mode .theme-switch:hover { background-color: transparent; }


/* =====================================================================
   4. Sorotan loker yang terakhir dibuka
   ===================================================================== */
:root { --ck-utama: #2563eb; }
.job-top-kanan { display: inline-flex; align-items: center; gap: 10px; }
.job-seen {
    display: none; align-items: center; gap: 4px; white-space: nowrap;
    font-size: 11px; font-weight: 700; line-height: 1; padding: 4px 8px; border-radius: 999px;
    color: var(--ck-utama);
    background: rgba(37, 99, 235, .12);
    background: color-mix(in srgb, var(--ck-utama) 13%, transparent);
}
.job-row.is-terakhir .job-seen { display: inline-flex; }

/* PC & semua tampilan: latar lembut + garis tebal di kiri */
.job-row.is-terakhir {
    background: rgba(37, 99, 235, .06) !important;
    background: color-mix(in srgb, var(--ck-utama) 7%, transparent) !important;
    box-shadow: inset 4px 0 0 var(--ck-utama) !important;
}
body.dark-mode .job-row.is-terakhir {
    background: rgba(96, 165, 250, .12) !important;
    background: color-mix(in srgb, var(--ck-utama) 16%, transparent) !important;
}
body.dark-mode .job-seen { background: color-mix(in srgb, var(--ck-utama) 24%, transparent); color: #bfdbfe; }

/* HP gaya kartu: bingkai warna di sekeliling kartu */
html.app-ui:not(.list-baris) .job-row.is-terakhir {
    box-shadow: 0 0 0 2px var(--ck-utama), 0 4px 14px rgba(15, 23, 42, .08) !important;
}

/* Chip di atas judul hanya dipakai gaya baris HP; tampilan lain memakai chip di baris atas */
.job-row.is-terakhir .job-seen-atas { display: none; }
html.app-ui.list-baris .job-row.is-terakhir .job-seen-atas { display: inline-flex; margin: 0 0 5px; padding: 3px 7px; font-size: 10.5px; }

/* Kedipan singkat saat kembali ke daftar */
@keyframes ck-kilat {
    0%   { outline: 3px solid var(--ck-utama); outline-offset: -3px; }
    60%  { outline: 3px solid var(--ck-utama); outline-offset: -3px; }
    100% { outline: 3px solid transparent; outline-offset: -3px; }
}
.job-row.is-kilat { animation: ck-kilat 1.4s ease-out; }
@media (prefers-reduced-motion: reduce) { .job-row.is-kilat { animation: none; } }

/* Tampilan aplikasi: pastikan latar sorotan menang atas latar kartu/baris */
html.app-ui body .job-row.is-terakhir {
    background: rgba(37, 99, 235, .08) !important;
    background: color-mix(in srgb, var(--ck-utama) 9%, var(--app-surface)) !important;
}
html.app-ui body.dark-mode .job-row.is-terakhir {
    background: color-mix(in srgb, var(--ck-utama) 22%, var(--app-surface)) !important;
}
