/* ============================================================
   GALACI - Admin Dashboard Style
   Red & Black Corporate Theme — Font: Plus Jakarta Sans
   ============================================================ */

:root {
    --sidebar-w: 250px;
    --primary: #dc2626;
    --primary-dark: #991b1b;
    --accent: #ef4444;
    --accent-light: #fca5a5;
    --dark: #0a0a0a;
    --bg: #f4f4f5;
    --card: #ffffff;
    --text: #1f2937;
    --text-light: #64748b;
    --border: #e2e8f0;
    --danger: #dc2626;
    --success: #16a34a;
    --warning: #d97706;
    --info: #0284c7;
    --radius: 12px;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --font: 'Plus Jakarta Sans', system-ui, sans-serif;
}

/* ================= BLOCK EDITOR (Gutenberg-style) ================= */
.be-editor {
    border: 1px solid var(--border);
    border-radius: 4px;
    background: #fafafa;
    padding: 12px;
}
.be-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    background: #fff;
    border: 2px solid #101010;
    margin-bottom: 12px;
    position: sticky;
    top: 64px;
    z-index: 10;
}
.be-toolbar .be-add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 2px solid #101010;
    background: #fff;
    color: #101010;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.1s;
}
.be-toolbar .be-add:hover {
    background: #fecaca;
    transform: translate(-1px, -1px);
    box-shadow: 2px 2px 0 0 #101010;
}
.be-block {
    position: relative;
    background: #fff;
    border: 2px solid #101010;
    margin-bottom: 10px;
    transition: box-shadow 0.1s;
}
.be-block.be-focus {
    box-shadow: 4px 4px 0 0 rgba(220, 38, 38, 0.25);
}
.be-block-tools {
    display: none;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #101010;
}
.be-block.be-focus .be-block-tools,
.be-block:hover .be-block-tools {
    display: flex;
}
.be-block-tools select {
    background: #101010;
    color: #fff;
    border: 1px solid #333;
    font-size: 0.75rem;
    padding: 2px 6px;
}
.be-block-tools button {
    background: #222;
    color: #fff;
    border: 1px solid #444;
    font-size: 0.75rem;
    padding: 2px 8px;
    cursor: pointer;
}
.be-block-tools button:hover { background: var(--primary); }
.be-block-tools .be-del:hover { background: var(--danger); }
.be-content {
    padding: 12px 16px;
    min-height: 34px;
    outline: none;
}
.be-content:empty::before {
    content: attr(data-placeholder);
    color: #9ca3af;
}
.be-content h2 { font-size: 1.4rem; margin: 0; }
.be-content h3 { font-size: 1.2rem; margin: 0; }
.be-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 8px 14px;
    background: #fef2f2;
    font-style: italic;
    margin: 0;
}
.be-content ul, .be-content ol { padding-left: 22px; margin: 0; }
.be-hr-label { text-align: center; color: #9ca3af; font-size: 0.8rem; }
.be-img-input { display: flex; flex-direction: column; gap: 8px; }
.be-img-input input {
    padding: 8px 12px;
    border: 2px solid #101010;
    font-size: 0.88rem;
}
.be-img-preview img {
    max-width: 100%;
    max-height: 220px;
    border: 2px solid #101010;
}
.be-add-para {
    display: block;
    margin: 12px auto 4px;
    padding: 8px 20px;
    border: 2px dashed #101010;
    background: transparent;
    color: #101010;
    font-weight: 700;
    cursor: pointer;
    transition: 0.1s;
}
.be-add-para:hover { background: #fff; }

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 14.5px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { opacity: 0.85; }

/* ================= LAYOUT ================= */
.admin-wrap { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    background: linear-gradient(180deg, #0a0a0a, #1f0505 60%, #3f0d0d);
    color: #cbd5e1;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    overflow-y: auto;
    z-index: 50;
}
.sidebar-brand {
    padding: 22px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 12px;
}
.sidebar-brand .logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: var(--white);
    font-size: 0.75rem;
}
.sidebar-brand b { color: #fff; display: block; font-size: 1.05rem; }
.sidebar-brand small { font-size: 0.7rem; color: var(--accent-light, #fca5a5); letter-spacing: 1px; }

.sidebar-nav { padding: 14px 0; }
.sidebar-nav .nav-label {
    padding: 16px 22px 6px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #64748b;
}
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 22px;
    color: #cbd5e1;
    font-weight: 500;
    transition: 0.15s;
    border-left: 3px solid transparent;
}
.sidebar-nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar-nav a.active {
    background: rgba(239,68,68,0.14);
    color: var(--accent-light);
    border-left-color: var(--accent);
}
.sidebar-nav a .icon { width: 20px; text-align: center; font-size: 0.95rem; }
.sidebar-nav a .badge { margin-left: auto; }

/* ================= MAIN ================= */
.main {
    flex: 1;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 40;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}
.topbar h1 { font-size: 1.2rem; color: var(--dark); }
.topbar-user { display: flex; align-items: center; gap: 10px; }
.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
}

.content { padding: 28px; flex: 1; }

/* ================= CARDS & STATS ================= */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 20px;
    margin-bottom: 26px;
}
.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--border);
}
.stat-card .sc-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    flex-shrink: 0;
}
.stat-card h4 { font-size: 1.5rem; font-weight: 800; color: var(--dark); line-height: 1.2; }
.stat-card p { color: var(--text-light); font-size: 0.82rem; }
.stat-card.trend .sc-icon { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.stat-card.trend2 .sc-icon { background: linear-gradient(135deg, #111827, #374151); }
.stat-card.trend3 .sc-icon { background: linear-gradient(135deg, var(--success), #4ade80); }
.stat-card.trend4 .sc-icon { background: linear-gradient(135deg, var(--warning), #f59e0b); }
.stat-card.trend5 .sc-icon { background: linear-gradient(135deg, var(--danger), #f87171); }
.stat-card.trend6 .sc-icon { background: linear-gradient(135deg, #ca8a04, #f59e0b); }
.stat-card.trend7 .sc-icon { background: linear-gradient(135deg, #1d4ed8, #3b82f6); }

.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 24px;
}
.card-head {
    padding: 16px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.card-head h3 { font-size: 1rem; color: var(--dark); }
.card-body { padding: 22px; }

/* ================= TABLE ================= */
.table-responsive { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
table.table th {
    text-align: left;
    padding: 12px 16px;
    background: #f8fafc;
    color: var(--text-light);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
table.table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
table.table tr:hover td { background: #f8fafc; }
table.table .no-pad { padding: 0; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}
.chip img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    background: #e2e8f0;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #e0f2fe; color: #075985; }
.badge-dark { background: #e2e8f0; color: #334155; }
.badge-secondary { background: #f1f5f9; color: #475569; }

/* ================= FORMS ================= */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--dark); font-size: 0.88rem; }
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 9px;
    font-size: 0.93rem;
    font-family: inherit;
    background: #fff;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(220,38,38,0.12); }
textarea.form-control { min-height: 160px; resize: vertical; }
.form-actions { display: flex; gap: 10px; margin-top: 22px; }
.form-hint { font-size: 0.8rem; color: var(--text-light); margin-top: 4px; }

/* ================= BUTTONS ================= */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 9px;
    font-weight: 600;
    font-size: 0.88rem;
    border: none;
    cursor: pointer;
    transition: 0.15s;
    background: #e2e8f0;
    color: var(--text);
}
.btn:hover { opacity: 0.88; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-info { background: var(--info); color: #fff; }
.btn-outline { background: transparent; border: 1.5px solid #cbd5e1; color: var(--text); }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; border-radius: 7px; }

/* ================= FILTER BAR ================= */
.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.filter-bar .form-control { width: auto; min-width: 150px; }

/* ================= PAGINATION ================= */
.pagination { display: flex; gap: 6px; margin-top: 18px; justify-content: center; flex-wrap: wrap; }
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    font-size: 0.88rem;
}
.pagination .active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ================= MODAL ================= */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
    background: #fff;
    border-radius: var(--radius);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0,0,0,0.3);
}
.modal-head {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-head h3 { font-size: 1.05rem; }
.modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-light); }
.modal-body { padding: 22px; }
.modal-body .detail-row { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border-bottom: 1px dashed #f1f5f9; }
.modal-body .detail-row span:first-child { color: var(--text-light); }

/* ================= MISC ================= */
.alert {
    padding: 12px 18px;
    border-radius: 9px;
    margin-bottom: 18px;
    font-size: 0.9rem;
}
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-danger { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.alert-info { background: #e0f2fe; color: #075985; border: 1px solid #bae6fd; }

.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-light);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 12px; }

.proof-img { max-width: 220px; border-radius: 8px; border: 1px solid var(--border); }

/* member detail grid */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }

/* kartu preview */
.kartu-preview { max-width: 480px; width: 100%; border-radius: 10px; box-shadow: var(--shadow); }

/* ================= RESPONSIVE ================= */
@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); transition: 0.25s; }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; }
    .menu-toggle { display: block !important; }
}
.menu-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; }

/* ============================================================
   NEO-BRUTALISM OVERRIDE — ADMIN
   ============================================================ */
:root {
    --primary: #e11d2e;
    --primary-dark: #a41220;
    --accent: #ffd02f;
    --accent-light: #ffe27a;
    --dark: #101010;
    --bg: #f3ecd9;
    --card: #ffffff;
    --text: #171717;
    --text-light: #55555b;
    --border: #101010;
    --danger: #e11d2e;
    --success: #2fbf71;
    --warning: #ff9f1c;
    --info: #2d9cdb;
    --radius: 0px;
    --shadow: 4px 4px 0 0 #101010;
    --font: 'Plus Jakarta Sans', system-ui, sans-serif;
}

body {
    background-color: var(--bg);
    background-image: radial-gradient(#e2d5b4 1.2px, transparent 1.2px);
    background-size: 22px 22px;
}

a { font-weight: 600; }

/* ---------- SIDEBAR ---------- */
.sidebar {
    background: #101010;
    border-right: 4px solid #101010;
}
.sidebar-brand { border-bottom: 3px solid var(--accent); }
.sidebar-brand .logo {
    border-radius: 0;
    background: var(--accent);
    color: #101010;
    border: 2px solid #fff;
}
.sidebar-nav a {
    border-left: 4px solid transparent;
    font-weight: 600;
}
.sidebar-nav a.active {
    background: var(--accent);
    color: #101010;
    border-left-color: #101010;
}
.sidebar-nav a:hover { background: #1f1f1f; }

/* ---------- TOPBAR / MAIN ---------- */
.topbar {
    background: #fff;
    border-bottom: 3px solid #101010;
    box-shadow: none;
    height: 60px;
}
.content { padding: 26px; }

/* ---------- STAT CARDS ---------- */
.stat-cards { gap: 18px; }
.stat-card {
    border-radius: 0;
    border: 3px solid #101010;
    box-shadow: 5px 5px 0 0 #101010;
    transition: 0.1s linear;
}
.stat-card:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 0 var(--accent); }
.stat-card .sc-icon {
    border-radius: 0;
    border: 2px solid #101010;
    box-shadow: 3px 3px 0 0 #101010;
}
.stat-card.trend .sc-icon  { background: #e11d2e; }
.stat-card.trend2 .sc-icon { background: #101010; }
.stat-card.trend3 .sc-icon { background: #2fbf71; }
.stat-card.trend4 .sc-icon { background: #ff9f1c; color: #101010; }
.stat-card.trend5 .sc-icon { background: #e11d2e; }
.stat-card.trend6 .sc-icon { background: #ffd02f; color: #101010; }
.stat-card.trend7 .sc-icon { background: #2d9cdb; }
.stat-card h4 { font-weight: 900; }

/* ---------- CARDS ---------- */
.card {
    border-radius: 0;
    border: 3px solid #101010;
    box-shadow: 6px 6px 0 0 #101010;
}
.card-head { border-bottom: 3px solid #101010; }
.card-head h3 { font-weight: 800; }

/* ---------- TABLE ---------- */
table.table th {
    background: #101010;
    color: #fff;
    border-bottom: 3px solid #101010;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
}
table.table td { border-bottom: 2px solid #101010; }
table.table tr:hover td { background: #fff7e6; }

/* ---------- BADGE ---------- */
.badge {
    border-radius: 2px;
    border: 2px solid #101010;
    font-weight: 700;
}
.badge-success { background: #bbf7d0; color: #14532d; }
.badge-warning { background: #fde68a; color: #713f12; }
.badge-danger { background: #fecaca; color: #7f1d1d; }
.badge-info { background: #bfdbfe; color: #1e3a8a; }
.badge-dark { background: #e5e5e5; color: #101010; }
.badge-secondary { background: #e5e5e5; color: #101010; }

/* ---------- FORMS ---------- */
.form-control {
    border-radius: 0;
    border: 2.5px solid #101010;
    box-shadow: 3px 3px 0 0 rgba(16,16,16,0.18);
    background: #fff;
    transition: 0.1s linear;
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 3px 3px 0 0 var(--primary);
}

/* ---------- BUTTONS ---------- */
.btn {
    border-radius: 0;
    border: 2.5px solid #101010;
    box-shadow: 3px 3px 0 0 #101010;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 700;
    transition: 0.1s linear;
}
.btn:hover { transform: translate(2px, 2px); box-shadow: 1px 1px 0 0 #101010; opacity: 1; }
.btn:active { transform: translate(3px, 3px); box-shadow: none; }
.btn-primary { background: var(--primary); background-image: none; }
.btn-success { background: var(--success); color: #101010; }
.btn-warning { background: var(--warning); color: #101010; }
.btn-info { background: var(--info); }
.btn-outline { background: #fff; border-color: #101010; color: #101010; }

/* ---------- PAGINATION ---------- */
.pagination a, .pagination span {
    border-radius: 0;
    border: 2px solid #101010;
    box-shadow: 3px 3px 0 0 #101010;
    font-weight: 700;
}
.pagination .active { background: #101010; color: var(--accent); }
.pagination a:hover { background: var(--accent); color: #101010; transform: translate(2px, 2px); box-shadow: 1px 1px 0 0 #101010; }

/* ---------- MODAL ---------- */
.modal {
    border-radius: 0;
    border: 3px solid #101010;
    box-shadow: 10px 10px 0 0 rgba(16,16,16,0.55);
}
.modal-head { border-bottom: 3px solid #101010; }
.modal-close {
    border: 2px solid #101010;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}
.modal-close:hover { background: #fecaca; }

/* ---------- ALERT ---------- */
.alert {
    border-radius: 0;
    border: 3px solid #101010;
    box-shadow: 4px 4px 0 0 #101010;
    font-weight: 600;
}

/* ---------- MISC ---------- */
.filter-bar .form-control { min-width: 150px; }
.proof-img, .kartu-preview { border-radius: 0; border: 3px solid #101010; box-shadow: 4px 4px 0 0 #101010; }
.empty-state .icon { font-size: 3.2rem; }
.chip img { border: 2px solid #101010; border-radius: 0; }