/* Reset & Variables */
* { box-sizing: border-box; }
:root {
    --bg: #101114;
    --panel: #191b20;
    --line: #30333b;
    --gold: #d9b765;
    --text: #f4f2ec;
    --muted: #a6a8af;
}

/* Dashboard Body */
body.bps-dashboard-body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Header */
.bps-top {
    height: 70px;
    padding: 0 clamp(15px, 4vw, 54px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #15161a;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 102;
}
.bps-brand { display: flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; letter-spacing: .08em; }
.bps-brand strong, .bps-brand small { display: block; }
.bps-brand small { color: var(--gold); font-size: 9px; letter-spacing: .2em; }
.bps-mark { width: 38px; height: 38px; border: 1px solid var(--gold); border-radius: 11px; display: grid; place-items: center; color: var(--gold); font-size: 22px; font-weight: 800; }
.bps-user { display: flex; gap: 18px; color: var(--muted); font-size: 12px; }
.bps-user a { color: var(--gold); text-decoration: none; }

/* Navigation */
.bps-nav {
    position: sticky;
    top: 70px;
    z-index: 101;
    display: flex;
    justify-content: center;
    gap: 5px;
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px clamp(12px, 4vw, 54px);
    background: rgba(21, 22, 26, .97);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}
.bps-nav a, .bps-subnav a { flex: 0 0 auto; padding: 9px 15px; border-radius: 8px; color: #c3c4c9; text-decoration: none; font-size: 12px; font-weight: 650; }
.bps-nav a.is-active, .bps-nav a:hover, .bps-subnav a.is-active, .bps-subnav a:hover { background: #302a1d; color: var(--gold); }

/* Main Layout */
.bps-main { width: min(1220px, 100%); margin: auto; padding: 32px clamp(15px, 4vw, 38px) 20px; }

/* Headings & Stats */
.bps-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin-bottom: 24px; }
.bps-eyebrow { color: var(--gold); font-size: 10px; letter-spacing: .2em; font-weight: 700; }
.bps-heading h1 { font-size: clamp(26px, 4vw, 37px); line-height: 1.15; margin: 7px 0; }
.bps-heading p, .bps-panel p { margin: 0; color: var(--muted); }
.bps-version { font-size: 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 20px; padding: 6px 10px; }
.bps-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }

/* Panels & Cards */
.bps-card, .bps-panel { background: linear-gradient(145deg, var(--panel), #17191e); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.bps-card span, .bps-card small { display: block; color: var(--muted); font-size: 12px; }
.bps-card strong { display: block; color: var(--gold); font-size: 30px; margin: 8px 0; }
.bps-module { margin-bottom: 18px; }
.bps-panel h2 { font-size: 18px; margin: 0 0 12px; }

/* Notices */
.bps-notice, .bps-admin-notice { margin: 0 0 18px; padding: 12px 15px; border: 1px solid #51452a; background: #282317; border-radius: 9px; color: #e1d5b7; font-size: 12px; }

/* Subnavigation */
.bps-subnav {
    position: sticky;
    top: 126px;
    z-index: 100;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    white-space: nowrap;
    padding: 8px;
    margin: -8px 0 19px;
    background: rgba(25, 27, 32, .98);
    border: 1px solid var(--line);
    border-radius: 10px;
    backdrop-filter: blur(12px);
}

/* Forms */
.bps-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin: 14px 0; max-width: 900px; }
.bps-form-grid label, .bps-form > label { display: flex; flex-direction: column; gap: 6px; color: #d5d5d8; font-size: 12px; font-weight: 600; }
.bps-form input:not([type=checkbox]), .bps-form select, .bps-form textarea, .bps-inline-form input, .bps-public-form input {
    width: 100%; min-height: 40px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: #111318; color: var(--text); font: inherit;
}
.bps-form textarea { resize: vertical; }
.bps-span-2 { grid-column: span 2; }

/* Buttons */
.bps-button, .bps-mini-button { display: inline-block; border: 0; border-radius: 8px; background: var(--gold); color: #171717; padding: 10px 16px; font-weight: 800; cursor: pointer; text-decoration: none; }
.bps-mini-button { padding: 6px 9px; font-size: 10px; }
.bps-button-secondary { background: #292c33; color: #f2d58e; border: 1px solid #48413a; }

/* Checkbox */
.bps-check { display: flex; align-items: center; gap: 8px; margin: 12px 0; color: var(--muted); font-size: 12px; }
.bps-check input { accent-color: var(--gold); }

/* Tables */
.bps-table-wrap { overflow-x: auto; margin-top: 12px; }
.bps-table { width: 100%; border-collapse: collapse; min-width: 650px; font-size: 12px; }
.bps-table th, .bps-table td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.bps-table th { color: var(--muted); }
.bps-table td { color: var(--text); }
.bps-table a { color: var(--gold); }
.bps-inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bps-help { font-size: 11px; color: var(--muted) !important; margin-top: 12px !important; }
.bps-code { white-space: pre-wrap; background: #0e1014; border: 1px solid var(--line); border-radius: 8px; padding: 12px; color: #ddd; }

/* Footer */
.bps-footer { text-align: center; color: #777b84; font-size: 11px; padding: 30px 0 10px; }

/* Public Catalog & Account */
.bps-public-catalog { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.bps-public-catalog article, .bps-account { border: 1px solid #30333b; border-radius: 10px; padding: 15px; background: #191b20; }
.bps-public-catalog img { width: 100%; height: auto; border-radius: 8px; aspect-ratio: 16/9; object-fit: cover; }
.bps-public-form label { display: block; margin: 10px 0; color: #d5d5d8; }
.bps-account table { width: 100%; border-collapse: collapse; }
.bps-account td, .bps-account th { padding: 8px; border-bottom: 1px solid #30333b; text-align: left; }

/* Articles & Blog */
.bps-article-tools { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.bps-article-tools h3 { font-size: 22px; margin: 8px 0; color: var(--text); }
.bps-article-tools p { max-width: 760px; line-height: 1.8; }
.bps-article-actions { display: flex; gap: 9px; flex-wrap: wrap; }

.bps-blog-wrap { color: #f3f1eb; background: var(--bg); padding: clamp(24px, 4vw, 54px); border-radius: 14px; }
.bps-blog-heading { text-align: center; margin: 0 auto 28px; max-width: 700px; }
.bps-blog-heading > span { font-size: 10px; letter-spacing: .22em; font-weight: 800; color: var(--gold); }
.bps-blog-heading h2 { font-size: clamp(26px, 4vw, 38px); line-height: 1.15; margin: 9px 0; color: #fff; }
.bps-blog-heading p { color: #aeb0b7; margin: 0; line-height: 1.7; }

.bps-blog-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.bps-blog-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(145deg, #1b1d23, #14161a); }
.bps-blog-thumb { display: block; aspect-ratio: 16/9; overflow: hidden; background: #24262c; }
.bps-blog-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.bps-blog-card:hover .bps-blog-thumb img { transform: scale(1.035); }
.bps-blog-placeholder { height: 100%; display: grid; place-items: center; color: var(--gold); font-size: 42px; font-weight: 800; }
.bps-blog-body { padding: 15px; }
.bps-blog-meta { font-size: 10px; color: var(--gold); letter-spacing: .04em; }
.bps-blog-body h3 { font-size: 16px; line-height: 1.4; margin: 9px 0; color: #fff; }
.bps-blog-body h3 a { color: inherit; text-decoration: none; }
.bps-blog-body p { font-size: 12px; line-height: 1.7; color: #aeb0b7; margin: 0 0 12px; }
.bps-blog-more { font-size: 11px; font-weight: 750; color: var(--gold); text-decoration: none; }
.bps-blog-pagination { display: flex; justify-content: center; gap: 7px; margin-top: 25px; }
.bps-blog-pagination a { padding: 8px 12px; border: 1px solid var(--line); border-radius: 7px; color: #eee; text-decoration: none; }
.bps-blog-pagination a.is-current { background: #3a301d; color: var(--gold); border-color: #6b5427; }

/* === SHARE LINK & TOP UP FRONTEND === */
.bps-share-wrap, .bps-topup-wrap {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 24px;
    color: var(--text);
    max-width: 900px;
    margin: 20px auto;
}
.bps-share-heading, .bps-topup-balance {
    text-align: center;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 20px;
}
.bps-share-heading span { color: var(--gold); font-size: 10px; letter-spacing: .2em; font-weight: 700; }
.bps-share-heading h2 { font-size: 24px; margin: 10px 0; color: #fff; }
.bps-share-heading p { color: var(--muted); font-size: 13px; max-width: 600px; margin: 0 auto; }
.bps-topup-balance span { color: var(--muted); font-size: 12px; }
.bps-topup-balance strong { display: block; font-size: 32px; color: var(--gold); margin-top: 5px; }

.bps-share-box {
    background: #15161a;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}
.bps-share-box h3 { margin: 0 0 12px; font-size: 15px; color: #fff; }
.bps-share-products { display: grid; grid-template-columns: 1fr; gap: 12px; }
.bps-share-product { background: #191b20; padding: 12px; border-radius: 8px; border: 1px solid var(--line); }
.bps-share-product-name { font-weight: 700; margin-bottom: 8px; color: var(--gold); font-size: 13px; }
.bps-share-link { display: flex; gap: 8px; }
.bps-share-link input {
    flex: 1;
    background: #101114;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 8px;
    color: var(--text);
    font-family: monospace;
    font-size: 12px;
}
.bps-share-link button {
    background: var(--gold);
    color: #111;
    border: 0;
    border-radius: 6px;
    padding: 0 16px;
    font-weight: 700;
    cursor: pointer;
    font-size: 12px;
}
.bps-share-link button:hover { background: #e6c87a; }

.bps-share-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    background: #101114;
    border-radius: 10px;
    padding: 15px;
    border: 1px solid var(--line);
}
.bps-share-stat { text-align: center; }
.bps-share-stat span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 5px; }
.bps-share-stat strong { color: var(--gold); font-size: 20px; }

.bps-public-form input[type="file"] {
    padding: 10px;
    background: #111318;
    border: 1px solid var(--line);
}

/* =========================================
   PERBAIKAN TEMA DASHBOARD ADMIN (Override WP Admin)
========================================= */
.bps-dashboard-body h1, .bps-dashboard-body h2, .bps-dashboard-body h3, .bps-dashboard-body h4 { color: #fff !important; }
.bps-dashboard-body .bps-heading h1 { color: #fff !important; }
.bps-dashboard-body .bps-panel h2 { color: #fff !important; }
.bps-dashboard-body label { color: #d5d5d8 !important; }
.bps-dashboard-body .bps-check { color: #a6a8af !important; }
.bps-dashboard-body .bps-table th { color: #a6a8af !important; }
.bps-dashboard-body .bps-table td { color: #f4f2ec !important; }
.bps-dashboard-body input[type="text"], 
.bps-dashboard-body input[type="number"], 
.bps-dashboard-body input[type="password"], 
.bps-dashboard-body input[type="url"], 
.bps-dashboard-body input[type="datetime-local"], 
.bps-dashboard-body select, 
.bps-dashboard-body textarea { 
    background: #111318 !important; 
    color: #f4f2ec !important; 
    border-color: #30333b !important; 
}

