/* =====================================================================
   DESIGN TOKENS
   Tema mengikuti palet landing page (dark navy + cyan-teal + gold accent).
   Mode terang adalah versi terang dari palet yang sama, bukan tema lain.
   Toggle mode ditentukan oleh atribut [data-theme] di <html>.
   ===================================================================== */
:root {
    --bg: #F2FAFB;
    --surface: #FFFFFF;
    --surface-alt: #E7F6F8;
    --border: #DCEAEA;
    --text: #10242B;
    --muted: #5B7278;
    --brand: #00A6C0;
    --brand-dark: #007C93;
    --gold: #D4AF37;
    --gold-bg: #FFF8E1;
    --danger: #E5484D;
    --shadow: rgba(16,36,43,0.07);
    --radius: 14px;

    --badge-pending-bg: #FFF3CD; --badge-pending-text: #856404;
    --badge-approved-bg: #D4EDDA; --badge-approved-text: #155724;
    --badge-rejected-bg: #F8D7DA; --badge-rejected-text: #721C24;
}

html[data-theme="dark"] {
    --bg: #0D161B;
    --surface: #15242D;
    --surface-alt: #1B2E38;
    --border: #223B47;
    --text: #EAF4F5;
    --muted: #8FA6AC;
    --brand: #00E5FF;
    --brand-dark: #00B4DB;
    --gold: #E4C158;
    --gold-bg: rgba(228,193,88,0.14);
    --danger: #FF6B6B;
    --shadow: rgba(0,0,0,0.35);

    --badge-pending-bg: rgba(255,193,7,0.16); --badge-pending-text: #FFD966;
    --badge-approved-bg: rgba(46,204,113,0.16); --badge-approved-text: #6FE3A0;
    --badge-rejected-bg: rgba(229,72,77,0.16); --badge-rejected-text: #FF9494;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: background 0.2s ease, color 0.2s ease;
}

a { text-decoration: none; color: inherit; }

/* ---------- APP SHELL (Sidebar + Main) ---------- */
.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 0.25s ease, background 0.2s ease;
}
.sidebar.open { transform: translateX(0); }

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 18px;
    font-weight: 800;
    font-size: 18px;
    color: var(--brand);
    border-bottom: 1px solid var(--border);
}
.sidebar-logo i { font-size: 20px; }
.sidebar-logo-img { width: 28px; height: 28px; object-fit: contain; flex-shrink: 0; }

.sidebar-mini-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
}
.sidebar-mini-profile:hover { background: var(--surface-alt); }
.sidebar-mini-profile img {
    width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.sidebar-mini-avatar {
    width: 34px; height: 34px; border-radius: 50%; background: var(--surface-alt);
    display: flex; align-items: center; justify-content: center; color: var(--muted);
    font-size: 14px; flex-shrink: 0;
}
.sidebar-mini-name {
    font-size: 13px; font-weight: 600; color: var(--text);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    border-left: 3px solid transparent;
}
.sidebar-nav .nav-item i { width: 20px; text-align: center; font-size: 16px; }
.sidebar-nav .nav-item:hover { background: var(--surface-alt); }
.sidebar-nav .nav-item.active {
    color: var(--brand);
    background: var(--surface-alt);
    border-left-color: var(--brand);
}
.sidebar-nav .nav-item i.icon-gold { color: var(--gold); }

.nav-divider { height: 1px; background: var(--border); margin: 10px 18px; }

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    font-weight: 600;
    font-size: 14px;
    color: var(--danger);
    border-top: 1px solid var(--border);
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 18px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    border-top: 1px solid var(--border);
    background: none;
    border-left: none; border-right: none; border-bottom: none;
    width: 100%;
    cursor: pointer;
    font-family: inherit;
}
.theme-toggle i { font-size: 15px; color: var(--brand); }

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 30;
}
.sidebar-overlay.show { display: block; }

.main-wrap {
    flex: 1;
    min-width: 0;
    width: 100%;
}

/* ---------- TOP BAR ---------- */
.topbar {
    background: var(--brand-dark);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 10;
}
.topbar-title { font-weight: 700; font-size: 18px; flex: 1; }
.hamburger {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    padding: 4px 6px;
    cursor: pointer;
}
.badge-gold {
    background: var(--gold);
    color: #3a2e00;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
}

/* ---------- CONTENT ---------- */
.app-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 16px;
    padding-bottom: 40px;
}

/* Desktop: sidebar selalu terlihat, konten tergeser ke kanan */
@media (min-width: 900px) {
    .sidebar { transform: translateX(0); }
    .main-wrap { margin-left: 240px; }
    .hamburger { display: none; }
    .sidebar-overlay { display: none !important; }
    .app-content { max-width: 900px; padding: 24px 32px; }
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 1px 3px var(--shadow);
    /* Cegah teks tanpa spasi (URL panjang, token, dsb) meluber keluar kotak
       kartu di layar sempit - browser nggak akan motong kata itu sendiri
       kalau nggak ada spasi, jadi harus dipaksa lewat overflow-wrap. */
    overflow-wrap: anywhere;
}
.card a { overflow-wrap: anywhere; }

.card-teal { background: var(--brand-dark); color: #fff; border-color: transparent; }
.card-gold { background: var(--gold-bg); border: 1px solid var(--gold); }

h1, h2, h3 { margin-top: 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- FORMS ---------- */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--muted); }
.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    background: var(--surface);
    color: var(--text);
}
.form-control:focus { outline: none; border-color: var(--brand); }

.btn {
    display: inline-block;
    width: 100%;
    text-align: center;
    padding: 13px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
}
.btn-primary { background: var(--brand); color: #06222A; }
.btn-gold { background: var(--gold); color: #3a2e00; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-outline { background: var(--surface); border: 1.5px solid var(--brand); color: var(--brand); }
.btn-sm { width: auto; padding: 8px 14px; font-size: 13px; }

/* ---------- TABLES / LISTS ---------- */
.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.list-item:last-child { border-bottom: none; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 6px; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; }

/* ---------- BADGES ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.badge-pending { background: var(--badge-pending-bg); color: var(--badge-pending-text); }
.badge-approved { background: var(--badge-approved-bg); color: var(--badge-approved-text); }
.badge-rejected { background: var(--badge-rejected-bg); color: var(--badge-rejected-text); }
.badge-premium { background: var(--gold-bg); color: var(--gold); border: 1px solid var(--gold); }
.badge-basic { background: var(--surface-alt); color: var(--muted); }

/* ---------- FLASH ---------- */
.flash { max-width: 480px; margin: 10px auto 0; padding: 10px 16px; border-radius: 10px; font-size: 14px; }
.flash-success { background: var(--badge-approved-bg); color: var(--badge-approved-text); }
.flash-error { background: var(--badge-rejected-bg); color: var(--badge-rejected-text); }
.flash-info { background: var(--surface-alt); color: var(--brand-dark); }

/* ---------- AUTH ---------- */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}
.auth-box { max-width: 400px; width: 100%; }
.auth-box .card h2 { text-align: center; }
.auth-logo { text-align: center; margin-bottom: 20px; font-size: 22px; font-weight: 800; color: var(--brand-dark); }
.auth-theme-toggle {
    position: absolute; top: 18px; right: 18px;
    background: var(--surface); border: 1px solid var(--border); color: var(--muted);
    width: 38px; height: 38px; border-radius: 50%; cursor: pointer; font-size: 15px;
}

.text-center { text-align: center; }
.text-muted { color: var(--muted); font-size: 13px; }

/* ---------- ROLE TOGGLE (form pendaftaran) ---------- */
.role-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-toggle-btn {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 6px; padding: 14px 8px; border-radius: 12px;
    border: 1.5px solid var(--border); background: var(--surface-alt);
    color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}
.role-toggle-btn i { font-size: 18px; }
.role-toggle-btn:hover { border-color: var(--brand); color: var(--brand); }
.role-toggle-btn.active { border-color: var(--brand); background: var(--gold-bg); color: var(--brand-dark); }
html[data-theme="dark"] .role-toggle-btn.active { background: rgba(0,229,255,0.1); color: var(--brand); }

/* ---------- TASK LOCKED (kuota harian sudah habis / perlu naik level VIP) ---------- */
.task-locked { opacity: 0.75; background: var(--surface-alt); }
.is-loading { opacity: 0.55; pointer-events: none; }

/* ---------- MONITOR TRANSAKSI (kolom Saldo Masuk / Saldo Keluar) ---------- */
.trx-table td.trx-in, .trx-table td.trx-out { text-align: right; font-weight: 700; white-space: nowrap; }
.trx-table td.trx-in { color: var(--brand); }
.trx-table td.trx-out { color: var(--danger); }
.trx-table .trx-empty { color: var(--border); font-weight: 400; }
.trx-table tfoot td { border-top: 2px solid var(--border); background: var(--surface-alt); }
@media (max-width: 640px) {
    .trx-table { font-size: 12px; }
    .trx-table th, .trx-table td { padding: 8px 6px; }
}

/* ---------- BADGE LEVEL VIP ---------- */
.badge-vip { background: var(--gold-bg); color: var(--gold); border: 1px solid var(--gold); }

/* Overlay gembok emas bertuliskan "VIP" di kartu tugas yang terkunci */
.vip-lock-tag {
    position: absolute; top: 0; left: 0; right: 0; z-index: 2;
    background: #F5B301; color: #1a1a1a;
    font-size: 10px; font-weight: 800; letter-spacing: .04em;
    padding: 4px 8px; display: flex; align-items: center; justify-content: center; gap: 4px;
    border-radius: 12px 12px 0 0;
}
.vip-lock-icon { color: #F5B301; font-size: 26px; }
.vip-lock-wage { color: #F5B301 !important; background: transparent !important; font-weight: 700; }
.basic-tag {
    position: absolute; top: 0; left: 0; right: 0; z-index: 2;
    background: var(--brand); color: #fff;
    font-size: 10px; font-weight: 800; letter-spacing: .04em;
    padding: 4px 8px; border-radius: 12px 12px 0 0;
    text-align: center;
}

/* Penawaran naik level di halaman Akun */
.vip-offer { border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: var(--surface-alt); }
.vip-offer:last-child { margin-bottom: 0; }
.vip-offer-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.vip-offer-price { font-weight: 800; color: var(--gold); white-space: nowrap; }

/* ============ BERANDA (Home setelah login, user/dashboard.php) ============
   Ditulis pakai class polos (bukan Tailwind) supaya nggak bentrok sama CSS
   sidebar/topbar bersama di includes/header.php & footer.php - sebelumnya
   halaman ini sempat pakai Tailwind CDN langsung di dalam shell yang sama,
   dan reset bawaan Tailwind (Preflight) bocor ke seluruh dokumen (termasuk
   sidebar/tombol di luar konten halaman ini), makanya tampilannya jadi aneh
   terutama di layar lebar. */
.br-wrap { max-width: 480px; margin: 0 auto; }
.br-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.br-mb-6 { margin-bottom: 24px; }

.br-top-grid > * + * { margin-top: 16px; }

.br-absen { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border-color: rgba(0,166,192,0.35); }
.br-absen-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.br-absen-icon { width: 36px; height: 36px; border-radius: 10px; background: rgba(245,158,11,0.16); color: #f59e0b; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.br-absen-title { font-size: 13px; font-weight: 700; margin: 0; }
.br-absen-sub { font-size: 11px; color: var(--muted); margin: 2px 0 0; }
.br-btn-absen { background: linear-gradient(90deg,#00b4db,#0083b0); color: #fff; font-size: 12px; font-weight: 700; padding: 9px 14px; border-radius: 10px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex-shrink: 0; }
.br-badge-done { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface-alt); padding: 9px 14px; border-radius: 10px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex-shrink: 0; }

.br-stat { padding: 20px; box-shadow: 0 1px 3px var(--shadow); }
.br-stat-head { display: flex; align-items: center; gap: 22px; margin-bottom: 18px; }
.br-avatar-wrap { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.br-avatar { width: 80px; height: 80px; border-radius: 50%; border: 2px solid rgba(45,212,191,0.55); display: flex; align-items: center; justify-content: center; background: rgba(0,166,192,0.1); overflow: hidden; }
.br-avatar img { width: 100%; height: 100%; object-fit: cover; }
.br-avatar i { font-size: 26px; color: var(--brand); }
.br-tier-label { margin-top: 6px; font-size: 12px; font-weight: 700; color: var(--brand); }
.br-stat-list { flex: 1; display: flex; flex-direction: column; gap: 8px; font-size: 14px; min-width: 0; }
.br-stat-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--muted); }
.br-stat-row b { color: var(--text); font-size: 15px; white-space: nowrap; }
.br-btn-upgrade, .br-premium-badge { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 11px; border-radius: 12px; font-size: 14px; font-weight: 600; }
.br-btn-upgrade { background: rgba(0,166,192,0.08); border: 1px solid var(--brand); color: var(--brand); }
.br-btn-upgrade:hover { background: rgba(0,166,192,0.16); }
.br-premium-badge { background: rgba(0,166,192,0.08); color: var(--brand); }

.br-balance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.br-balance-card { padding: 16px; }
.br-balance-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 4px; }
.br-balance-value { font-size: 16px; font-weight: 700; margin: 0; }
.br-balance-value span { color: var(--brand); }

.br-withdraw-note { padding: 12px; font-size: 12px; color: var(--muted); margin: 16px 0 24px; }
.br-withdraw-note a { color: var(--brand); font-weight: 600; }

.br-section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; }
.br-section-head h2 { font-size: 16px; font-weight: 700; margin: 0; }
.br-section-head a { font-size: 12px; font-weight: 600; color: var(--brand); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }

.br-video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 32px; }
/* padding-top kasih ruang pas buat tag BASIC/VIP di atas kartu, jadi dia nggak
   numpuk di atas thumbnail lagi. padding kiri/kanan/bawah dikecilin biar
   thumbnail videonya ngisi penuh kartu (nggak nyisain area putih kosong). */
.br-video-card { display: flex; flex-direction: column; justify-content: space-between; position: relative; padding: 10px 6px 8px; border-radius: 12px; overflow: hidden; }

/* Modal "Bagikan Link" manual untuk desktop (fallback saat navigator.share tidak ada) */
.swal-share-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 700;
    color: #fff; text-decoration: none; border: none; cursor: pointer;
}
.swal-share-wa { background: #25D366; }
.swal-share-tg { background: #229ED9; }
.swal-share-mail { background: #6b7280; }
.swal-share-copy { background: var(--brand); flex-shrink: 0; }
.swal-share-input {
    flex: 1; min-width: 0; padding: 8px 10px; border-radius: 8px;
    border: 1px solid var(--border); font-size: 12px; background: var(--surface-alt); color: var(--text);
}
.br-video-thumb { position: relative; height: 96px; border-radius: 8px; overflow: hidden; margin: 0 0 6px; background: var(--surface-alt); display: flex; align-items: center; justify-content: center; }
.br-video-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .75; }
.br-video-play { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,0.25); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; }
.br-video-locked { opacity: .6; }
.br-video-locked .br-video-thumb { filter: grayscale(1); }
.br-video-locked .br-video-play { background: rgba(0,0,0,0.35); }
.br-video-title { margin: 0; font-size: 11px; font-weight: 600; color: var(--muted); text-align: center; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.br-video-wage, .br-video-locked-wage { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.br-video-wage { color: var(--brand); background: rgba(0,166,192,0.12); }
.br-video-locked-wage { font-size: 10px; color: var(--muted); background: var(--surface-alt); }

.br-link-list { display: flex; flex-direction: column; gap: 10px; }
.br-link-item { display: flex; align-items: center; justify-content: space-between; padding: 12px; border-radius: 12px; gap: 10px; }
.br-link-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.br-link-icon { width: 36px; height: 36px; border-radius: 10px; background: rgba(0,166,192,0.1); border: 1px solid rgba(0,166,192,0.3); color: var(--brand); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.br-link-title, .br-link-sub { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.br-link-title { font-size: 12px; font-weight: 600; color: var(--muted); }
.br-link-sub { font-size: 10px; color: var(--muted); margin-top: 2px; }
.br-link-right { text-align: right; flex-shrink: 0; }
.br-link-wage { display: block; font-size: 12px; font-weight: 700; color: var(--brand); background: rgba(0,166,192,0.12); padding: 2px 8px; border-radius: 6px; margin-bottom: 4px; }
.br-link-action { font-size: 10px; font-weight: 700; color: var(--brand); border: 1px solid var(--brand); padding: 2px 8px; border-radius: 6px; display: inline-block; }
.br-link-locked { opacity: .65; }
.br-link-locked .br-link-icon { background: var(--surface-alt); border-color: var(--border); color: var(--muted); }
.br-link-locked .br-link-action { color: var(--muted); border-color: var(--border); }
.br-empty { padding: 20px; text-align: center; color: var(--muted); font-size: 13px; }

/* Desktop: sama breakpoint dengan sidebar jadi persisten (lihat .main-wrap di atas) */
@media (min-width: 900px) {
    .br-wrap { max-width: none; }
    .br-top-grid { display: grid; grid-template-columns: 1.1fr 1.3fr 1fr; gap: 16px; align-items: stretch; }
    .br-top-grid > * + * { margin-top: 0; }
    .br-top-grid .br-absen { height: 100%; }
    .br-top-grid .br-balance-grid { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
    .br-tasks-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 28px; align-items: start; }
}
@media (min-width: 1300px) {
    .br-video-grid { grid-template-columns: repeat(4, 1fr); }
}
.mt-2 { margin-top: 10px; }
.mb-0 { margin-bottom: 0; }


/* ============ TOPBAR (user) + NAVIGASI BAWAH MOBILE ============
   Role "user" di mobile: baris 1 = nama aplikasi + bell, baris 2 = sapaan/judul + level.
   Tanpa hamburger; sidebar dibuka dari tombol "Akun" di navigasi bawah.
   Desktop (>=900px): sidebar permanen, topbar = judul halaman + saldo. */
.topbar-user { display: block; }
.topbar-desktop { display: none; }
.topbar-mobile { display: flex; flex-direction: column; gap: 10px; }
.tu-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tu-brand { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 800; font-size: 18px; min-width: 0; }
.tu-brand-img { width: 28px; height: 28px; object-fit: contain; flex-shrink: 0; }
.tu-bell {
    width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
    background: rgba(255,255,255,0.16); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.tu-row-sub { align-items: flex-end; }
.tu-welcome { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.tu-welcome small { font-size: 12px; opacity: .85; }
.tu-welcome strong { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tu-level {
    flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
    background: var(--gold); color: #3a2e00; font-weight: 700; font-size: 12px;
    padding: 5px 12px; border-radius: 20px;
}

.bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--surface); border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottom-nav-inner {
    max-width: 480px; margin: 0 auto; padding: 8px 12px;
    display: flex; justify-content: space-between; align-items: center;
}
.bn-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 4px 0; color: var(--muted); font-family: inherit;
    background: none; border: none; cursor: pointer; text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}
.bn-item i { font-size: 18px; }
.bn-item span { font-size: 10px; font-weight: 500; }
.bn-item:hover, .bn-item.active, .bn-item.menu-open { color: var(--brand); }
/* Saat sidebar terbuka, hanya "Akun" yang menyala */
.bottom-nav:has(.menu-open) .bn-item:not(.menu-open) { color: var(--muted); }

body.has-bottom-nav .app-content { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }

@media (min-width: 900px) {
    .bottom-nav { display: none; }
    body.has-bottom-nav .app-content { padding-bottom: 40px; }
    .topbar-user { display: flex; }
    .topbar-user .topbar-mobile { display: none; }
    .topbar-user .topbar-desktop { display: flex; align-items: center; gap: 12px; width: 100%; }
}

/* ---------- Halaman "semua tugas" (tasks.php?type=video|link) ---------- */
.br-quota-note { padding: 12px; font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.br-quota-note strong { color: var(--brand); }
button.br-link-action { background: none; font-family: inherit; cursor: pointer; }
button.br-link-action:disabled { opacity: .6; }
