/* ============================================================
   Juara Digital Platform — Global Styles
   ============================================================ */

:root {
    --pink-bright: #FF4D8D;
    --pink-rose:   #E84393;
    --purple-mid:  #9B51E0;
    --violet-deep: #5B2EFF;
    --black-soft:  #0F0F0F;
    --white:       #FFFFFF;
    --bg-main:     #F8F9FF;
    --bg-card:     #FFFFFF;
    --text-main:   #1A1A2E;
    --text-muted:  #6B7280;
    --text-light:  #9CA3AF;
    --border:      #E5E7EB;
    --border-soft: #F3F4F6;
    --shadow-sm:   0 1px 3px rgba(91,46,255,.08), 0 1px 2px rgba(91,46,255,.04);
    --shadow-md:   0 4px 16px rgba(91,46,255,.10), 0 2px 6px rgba(91,46,255,.06);
    --shadow-lg:   0 10px 40px rgba(91,46,255,.14), 0 4px 16px rgba(91,46,255,.08);
    --radius-sm:   8px;
    --radius-md:   12px;
    --radius-lg:   20px;
    --radius-xl:   28px;
    --grad-brand:  linear-gradient(135deg, #FF4D8D 0%, #9B51E0 50%, #5B2EFF 100%);
    --grad-pink:   linear-gradient(135deg, #FF4D8D, #E84393);
    --grad-purple: linear-gradient(135deg, #9B51E0, #5B2EFF);
    --font-main:   'Inter', 'Segoe UI', system-ui, sans-serif;
    --font-display: 'Poppins', 'Inter', sans-serif;
    --transition:  all .2s cubic-bezier(.4,0,.2,1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    background: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    font-size: 15px;
    min-height: 100vh;
}

/* ── Typography ─────────────────────────────────── */
h1, h2, h3, h4, h5 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-main);
}
.gradient-text {
    background: var(--grad-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
a { color: var(--violet-deep); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--pink-bright); }

/* ── Buttons ────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
    font-family: var(--font-main);
}
.btn-primary {
    background: var(--grad-brand);
    color: #fff;
    box-shadow: 0 4px 14px rgba(255,77,141,.3);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255,77,141,.4);
    color: #fff;
}
.btn-outline {
    background: transparent;
    border: 2px solid var(--pink-bright);
    color: var(--pink-bright);
}
.btn-outline:hover { background: var(--pink-bright); color: #fff; }
.btn-ghost {
    background: var(--bg-main);
    color: var(--text-main);
    border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--border-soft); }
.btn-danger { background: #EF4444; color: #fff; }
.btn-danger:hover { background: #DC2626; transform: translateY(-1px); }
.btn-success { background: #10B981; color: #fff; }
.btn-success:hover { background: #059669; transform: translateY(-1px); }
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: var(--radius-lg); }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ── Cards ──────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.card-header h3 { font-size: 16px; font-weight: 600; }
.card-body { padding: 24px; }
.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-soft);
    background: var(--bg-main);
}

/* ── Forms ──────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-main);
    margin-bottom: 6px;
}
.form-label .required { color: var(--pink-bright); margin-left: 3px; }
.form-control {
    width: 100%;
    padding: 11px 15px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font-main);
    color: var(--text-main);
    background: #fff;
    transition: var(--transition);
    outline: none;
}
.form-control:focus {
    border-color: var(--purple-mid);
    box-shadow: 0 0 0 3px rgba(155,81,224,.12);
}
.form-control::placeholder { color: var(--text-light); }
.form-control.is-invalid { border-color: #EF4444; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 5px; }
.form-error { font-size: 12px; color: #EF4444; margin-top: 5px; }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 90px; }

.form-row { display: grid; gap: 16px; }
.form-row-2 { grid-template-columns: 1fr 1fr; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 768px) {
    .form-row-2, .form-row-3 { grid-template-columns: 1fr; }
}

/* ── Radio & Checkbox ────────────────────────────── */
.radio-group, .check-group { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-option, .check-option {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    font-size: 13px;
    font-weight: 500;
    user-select: none;
    background: #fff;
}
.radio-option:hover, .check-option:hover { border-color: var(--purple-mid); background: rgba(155,81,224,.04); }
.radio-option input, .check-option input { width: 16px; height: 16px; accent-color: var(--purple-mid); }
.radio-option.selected, .check-option.selected {
    border-color: var(--purple-mid);
    background: rgba(155,81,224,.07);
    color: var(--purple-mid);
}

/* ── Badges ─────────────────────────────────────── */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .3px;
    text-transform: uppercase;
    white-space: nowrap;
}
.badge-warning  { background: #FEF3C7; color: #92400E; }
.badge-info     { background: #DBEAFE; color: #1E40AF; }
.badge-success  { background: #D1FAE5; color: #065F46; }
.badge-danger   { background: #FEE2E2; color: #991B1B; }
.badge-active   { background: linear-gradient(135deg,rgba(255,77,141,.15),rgba(91,46,255,.15)); color: var(--violet-deep); }
.badge-secondary{ background: #F3F4F6; color: #6B7280; }
.badge-gradient { background: var(--grad-brand); color: #fff; }

/* ── Tables ─────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg-main);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
tbody td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border-soft);
    vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(155,81,224,.03); }

/* ── Alerts / Flash ──────────────────────────────── */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    display: block; line-height: 1.55;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}
.alert-success { background: #F0FDF4; color: #166534; border-color: #BBF7D0; }
.alert-danger   { background: #FEF2F2; color: #991B1B; border-color: #FECACA; }
.alert-warning  { background: #FFFBEB; color: #92400E; border-color: #FDE68A; }
.alert-info     { background: #EFF6FF; color: #1E40AF; border-color: #BFDBFE; }

/* ── Pagination ──────────────────────────────────── */
.pagination { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.page-btn {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 600;
    border: 1.5px solid var(--border);
    background: #fff; color: var(--text-muted);
    cursor: pointer; transition: var(--transition);
    text-decoration: none;
}
.page-btn:hover { border-color: var(--purple-mid); color: var(--purple-mid); }
.page-btn.active { background: var(--grad-brand); border-color: transparent; color: #fff; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── Progress Steps ─────────────────────────────── */
.steps-bar {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 36px;
    position: relative;
}
.step-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}
.step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--border);
    z-index: 0;
    transition: var(--transition);
}
.step-item.done:not(:last-child)::after,
.step-item.active:not(:last-child)::after { background: var(--grad-purple); }
.step-num {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 14px;
    border: 2px solid var(--border);
    background: #fff; color: var(--text-muted);
    transition: var(--transition);
    position: relative; z-index: 2;
}
.step-item.done .step-num {
    background: var(--grad-purple);
    border-color: transparent; color: #fff;
}
.step-item.active .step-num {
    background: var(--grad-pink);
    border-color: transparent; color: #fff;
    box-shadow: 0 0 0 5px rgba(255,77,141,.2);
}
.step-label {
    font-size: 11px; font-weight: 600;
    color: var(--text-muted); margin-top: 6px;
    text-align: center;
    transition: var(--transition);
}
.step-item.active .step-label { color: var(--pink-bright); }
.step-item.done .step-label { color: var(--violet-deep); }

/* ── Product Cards ───────────────────────────────── */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}
.product-card {
    background: #fff;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.product-card::before {
    content: '';
    position: absolute; top: 0; left: 0;
    width: 100%; height: 4px;
    opacity: 0;
    transition: var(--transition);
}
.product-card:hover {
    border-color: var(--purple-mid);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.product-card:hover::before { opacity: 1; }
.product-card.selected {
    border-color: var(--purple-mid);
    background: rgba(155,81,224,.05);
    box-shadow: var(--shadow-md);
}
.product-card.selected::before { opacity: 1; }
.product-icon {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
}
.product-name {
    font-weight: 700; font-size: 13px;
    color: var(--text-main);
    margin-bottom: 4px;
}
.product-category {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.product-check {
    position: absolute; top: 10px; right: 10px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--grad-purple);
    display: none; align-items: center; justify-content: center;
    font-size: 11px; color: #fff;
}
.product-card.selected .product-check { display: flex; }

/* ── Navbar (Public) ────────────────────────────── */
.navbar {
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0 5vw;
    height: 68px;
    display: flex; align-items: center;
    justify-content: space-between;
    position: sticky; top: 0; z-index: 100;
    box-shadow: var(--shadow-sm);
}
.navbar-brand {
    display: flex; align-items: center; gap: 12px;
    font-family: var(--font-display);
    font-weight: 800; font-size: 18px;
}
.navbar-brand .logo-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: var(--grad-brand);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: #fff;
}
.navbar-brand .logo-text { background: var(--grad-brand); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.navbar-nav { display: flex; align-items: center; gap: 6px; }
.nav-link { padding: 8px 14px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; color: var(--text-muted); transition: var(--transition); }
.nav-link:hover { background: var(--bg-main); color: var(--text-main); }
.nav-link.active { color: var(--violet-deep); font-weight: 700; }

/* ── Hero ──────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, #fff 0%, #F8F9FF 40%, rgba(155,81,224,.05) 100%);
    padding: 80px 5vw 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(255,77,141,.08), transparent);
    pointer-events: none;
}
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(155,81,224,.1);
    color: var(--purple-mid);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .8px;
    margin-bottom: 18px;
}
.hero h1 { font-size: clamp(28px, 5vw, 52px); margin-bottom: 16px; }
.hero p { color: var(--text-muted); font-size: 17px; max-width: 560px; margin: 0 auto 32px; }

/* ── Sidebar Admin (v2 — modern, gradient-accented, "berkelas") ──── */
.admin-layout { display: flex; min-height: 100vh; }
.sidebar {
    width: 268px; flex-shrink: 0;
    background:
        radial-gradient(600px 300px at 0% 0%, rgba(255,77,141,.10), transparent 60%),
        radial-gradient(600px 320px at 100% 100%, rgba(91,46,255,.14), transparent 60%),
        var(--black-soft);
    padding: 0;
    position: sticky; top: 0;
    height: 100vh; overflow-y: auto; overflow-x: hidden;
    display: flex; flex-direction: column;
    border-right: 1px solid rgba(255,255,255,.06);
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 999px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }

.sidebar-brand {
    padding: 24px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,.07);
    display: flex; align-items: center; gap: 12px;
}
.sidebar-brand .logo-icon {
    width: 42px; height: 42px;
    border-radius: 13px;
    background: var(--grad-brand);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    box-shadow: 0 6px 18px rgba(255,77,141,.35), inset 0 1px 0 rgba(255,255,255,.25);
    flex-shrink: 0;
}
.sidebar-brand .logo-icon svg { width: 22px; height: 22px; }
.sidebar-brand .logo-text {
    color: #fff; font-weight: 800; font-size: 15.5px; font-family: var(--font-display);
    letter-spacing: .2px;
}
.sidebar-brand .logo-sub {
    color: rgba(255,255,255,.42); font-size: 10.5px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .8px; margin-top: 1px;
}

.sidebar-nav { padding: 18px 14px; flex: 1; }
.nav-section-label {
    font-size: 10px; font-weight: 700;
    color: rgba(255,255,255,.28);
    text-transform: uppercase; letter-spacing: 1.2px;
    padding: 16px 10px 8px;
}
.nav-section-label:first-child { padding-top: 2px; }

.sidebar-link {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    color: rgba(255,255,255,.62);
    font-size: 13.5px; font-weight: 600;
    transition: var(--transition);
    margin-bottom: 3px;
    text-decoration: none;
    position: relative;
}
.sidebar-link:hover {
    background: rgba(255,255,255,.055);
    color: #fff;
    transform: translateX(2px);
}
.sidebar-link.active {
    background: linear-gradient(90deg, rgba(255,77,141,.18), rgba(91,46,255,.10));
    color: #fff;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(255,77,141,.22);
}
.sidebar-link.active::before {
    content: '';
    position: absolute; left: -14px; top: 50%; transform: translateY(-50%);
    width: 3px; height: 18px; border-radius: 999px;
    background: var(--grad-brand);
}
.sidebar-link .icon {
    width: 30px; height: 30px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 9px;
    font-size: 15px; line-height: 1;
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.75);
    transition: var(--transition);
}
.sidebar-link .icon svg { width: 16px; height: 16px; stroke-width: 2; }
.sidebar-link:hover .icon { background: rgba(255,255,255,.1); color: #fff; }
.sidebar-link.active .icon {
    background: var(--grad-brand);
    color: #fff;
    box-shadow: 0 3px 10px rgba(255,77,141,.35);
}
.sidebar-link .link-label { flex: 1; }

.sidebar-footer { padding: 16px 14px; border-top: 1px solid rgba(255,255,255,.07); }
.sidebar-user {
    display: flex; align-items: center; gap: 10px;
    padding: 10px; border-radius: var(--radius-md);
    background: rgba(255,255,255,.04);
}
.sidebar-user .avatar {
    width: 36px; height: 36px; border-radius: 11px;
    background: var(--grad-brand);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 13px;
    box-shadow: 0 3px 10px rgba(91,46,255,.3);
}
.sidebar-user .name { color: #fff; font-size: 13px; font-weight: 700; }
.sidebar-user .role { color: rgba(255,255,255,.4); font-size: 11px; }

/* ── Emoji Icon Picker (dipakai di form Produk & Sumber Website/WA) ── */
.jdp-emoji-field { position: relative; display: flex; align-items: center; gap: 8px; }
.jdp-emoji-field input[data-emoji-picker] { flex: 1; }
.jdp-emoji-trigger {
    width: 44px; height: 44px; flex-shrink: 0;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    background: #fff;
    font-size: 20px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.jdp-emoji-trigger:hover { border-color: var(--purple-mid); background: rgba(155,81,224,.06); }
.jdp-emoji-panel {
    display: none;
    position: absolute; top: calc(100% + 8px); right: 0; z-index: 200;
    width: 300px; max-height: 320px; overflow-y: auto;
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 10px;
}
.jdp-emoji-panel.open { display: block; }
.jdp-emoji-search-wrap { margin-bottom: 8px; }
.jdp-emoji-search { width: 100%; padding: 8px 10px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); font-size: 13px; }
.jdp-emoji-label { font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; padding: 6px 4px 4px; }
.jdp-emoji-row { display: flex; flex-wrap: wrap; gap: 2px; }
.jdp-emoji-btn {
    width: 34px; height: 34px; border: none; background: transparent;
    border-radius: 8px; font-size: 18px; cursor: pointer; transition: var(--transition);
}
.jdp-emoji-btn:hover { background: rgba(155,81,224,.12); transform: scale(1.12); }

/* ── Admin Main ──────────────────────────────────── */
.admin-main { flex: 1; min-width: 0; overflow-x: hidden; }
.admin-topbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    height: 60px;
    display: flex; align-items: center;
    justify-content: space-between;
    position: sticky; top: 0; z-index: 50;
    box-shadow: var(--shadow-sm);
}
.admin-content { padding: 28px; }
.page-title { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.page-subtitle { color: var(--text-muted); font-size: 13px; }

/* ── Stat Cards ──────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 22px;
    border: 1px solid var(--border);
    display: flex; gap: 16px; align-items: flex-start;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon {
    width: 48px; height: 48px; border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
}
.stat-icon.pink  { background: rgba(255,77,141,.12); }
.stat-icon.purple{ background: rgba(155,81,224,.12); }
.stat-icon.violet{ background: rgba(91,46,255,.12); }
.stat-icon.rose  { background: rgba(232,67,147,.12); }
.stat-icon.green { background: rgba(16,185,129,.12); }
.stat-icon.orange{ background: rgba(245,158,11,.12); }
.stat-value { font-size: 26px; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.stat-change { font-size: 12px; font-weight: 600; margin-top: 6px; }
.stat-change.up { color: #10B981; }
.stat-change.down { color: #EF4444; }

/* ── Plan Config Sections ────────────────────────── */
.plan-section {
    background: linear-gradient(135deg, rgba(155,81,224,.05), rgba(91,46,255,.03));
    border: 1.5px solid rgba(155,81,224,.2);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    display: none;
}
.plan-section.visible { display: block; }
.plan-section-title {
    display: flex; align-items: center; gap: 10px;
    font-size: 15px; font-weight: 700;
    color: var(--purple-mid);
    margin-bottom: 18px;
}
.plan-section-title .icon { font-size: 20px; }

/* ── Misc ────────────────────────────────────────── */
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 12px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.fw-bold { font-weight: 700; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 16px; }
.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 16px; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.d-flex { display: flex; } .align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.w-100 { width: 100%; }
.divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.section-title {
    font-size: 18px; font-weight: 800;
    margin-bottom: 6px;
}
.section-title-bar {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px;
}

/* ── Registration Success ────────────────────────── */
.success-wrapper {
    max-width: 560px; margin: 60px auto;
    text-align: center; padding: 20px;
}
.success-icon-wrap {
    width: 90px; height: 90px;
    border-radius: 50%;
    background: var(--grad-brand);
    display: flex; align-items: center; justify-content: center;
    font-size: 44px; margin: 0 auto 24px;
    box-shadow: 0 8px 30px rgba(255,77,141,.3);
}
.success-reg-number {
    display: inline-block;
    padding: 10px 24px;
    background: var(--bg-main);
    border: 2px dashed var(--purple-mid);
    border-radius: var(--radius-md);
    font-size: 20px; font-weight: 800;
    color: var(--violet-deep); letter-spacing: 2px;
    margin: 16px 0;
}

/* ── Container ────────────────────────────────────── */
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* ── Detail View ─────────────────────────────────── */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.detail-item { }
.detail-label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.detail-value { font-size: 14px; font-weight: 500; color: var(--text-main); }
@media (max-width: 600px) { .detail-grid { grid-template-columns: 1fr; } }

/* ── Print ────────────────────────────────────────── */
@media print {
    .sidebar, .admin-topbar, .navbar, .btn { display: none !important; }
    .admin-main { margin: 0 !important; }
}

/* ── Responsive Sidebar (off-canvas di tablet/HP) ─── */
.menu-btn { display: none; background: none; border: 0; padding: 6px; border-radius: 10px; color: var(--black-soft); cursor: pointer; }
.menu-btn:hover { background: var(--border-soft); }
.sidebar-backdrop { display: none; }
.admin-topbar .page-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1024px) {
    .menu-btn { display: inline-flex; }
    .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 300; width: 280px; max-width: 86vw; transform: translateX(-102%); transition: transform .25s ease; box-shadow: none; }
    body.sb-open .sidebar { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.45); }
    .sidebar-backdrop { position: fixed; inset: 0; background: rgba(15,15,15,.5); z-index: 290; backdrop-filter: blur(2px); }
    body.sb-open .sidebar-backdrop { display: block; }
    body.sb-open { overflow: hidden; }
}
@media (max-width: 900px) { .admin-content { padding: 18px; } }
@media (max-width: 700px) {
    .admin-topbar { padding: 0 14px; height: 56px; }
    .admin-content { padding: 12px; }
    .hide-sm { display: none !important; }
    .page-title { font-size: 17px; }
    .page-subtitle { display: none; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .card-header { flex-wrap: wrap; gap: 8px; }
    .stat-card { padding: 14px; }
    .stat-value { font-size: 21px; }
}
/* Tabel lebar: gulir horizontal, bukan merusak layout */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap table { min-width: 640px; }
img, svg { max-width: 100%; }
/* Chip kanal & toast */
.ch-chip { display:inline-flex; align-items:center; gap:3px; font-size:10px; font-weight:700; padding:1px 7px; border-radius:999px; background:color-mix(in srgb,var(--chc,#6B7280) 13%,#fff); color:var(--chc,#6B7280); }
.jdp-toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--black-soft); color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 13px; font-weight: 600; z-index: 9999; box-shadow: var(--shadow-lg); }
.copy-box { display:flex; gap:8px; align-items:stretch; }
.copy-box code { flex:1; min-width:0; word-break:break-all; background:var(--bg-main); border:1px solid var(--border); border-radius:10px; padding:9px 12px; font-size:12px; user-select:all; }
.guide-step { display:flex; gap:12px; margin-bottom:12px; }
.guide-step .n { width:26px; height:26px; border-radius:50%; background:var(--grad-brand); color:#fff; font-weight:800; font-size:12px; display:flex; align-items:center; justify-content:center; flex-shrink:0; margin-top:1px; }
.guide-step .b { font-size:13.5px; line-height:1.65; min-width:0; }
.tabs-row { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:16px; }
.tab-pill { padding:8px 14px; border-radius:999px; border:1.5px solid var(--border); background:#fff; font-size:13px; font-weight:600; cursor:pointer; text-decoration:none; color:var(--text-main); }
.tab-pill.on { border-color:var(--purple-mid); background:rgba(155,81,224,.09); color:var(--violet-deep); }

/* ── Navbar publik: rapi di HP (scroll horizontal pada menu, tanpa merusak halaman) ── */
@media (max-width: 720px) {
    .navbar { flex-wrap: wrap; height: auto; padding: 8px 12px; gap: 6px 10px; }
    .navbar-brand { font-size: 15px; gap: 8px; }
    .navbar-brand .logo-text { white-space: nowrap; }
    .navbar-nav { width: 100%; overflow-x: auto; gap: 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
    .navbar-nav::-webkit-scrollbar { display: none; }
    .navbar-nav .nav-link { white-space: nowrap; padding: 7px 12px; font-size: 13px; flex-shrink: 0; }
}
html, body { max-width: 100%; overflow-x: clip; }
.admin-topbar { min-height: 60px; height: auto; padding-top: 6px; padding-bottom: 6px; }
.admin-topbar .page-subtitle { max-width: 56vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Logo JDP resmi ── */
.brand-mark { height: 40px; width: auto; display: block; flex-shrink: 0; object-fit: contain; }
.navbar-brand .brand-mark { height: 38px; }
.showcase-item .s-logo { width: 52px; height: 52px; object-fit: contain; border-radius: 12px; background: #fff; margin: 0 auto 10px; display: block; }
.footer-brand img { filter: none; }
@media (max-width: 720px) { .navbar-brand .brand-mark { height: 32px; } }

/* ============================================================
   Ikon SVG & polesan visual (menggantikan emoji)
   ============================================================ */
.ic { width: 1.1em; height: 1.1em; display: inline-block; vertical-align: -0.2em; flex-shrink: 0; }
.btn .ic { width: 1.15em; height: 1.15em; vertical-align: middle; }
.stat-icon { color: var(--violet-deep); }
.stat-icon .ic { width: 24px; height: 24px; }
.stat-icon.pink   { color: var(--pink-bright); }
.stat-icon.purple { color: var(--purple-mid); }
.stat-icon.rose   { color: var(--pink-rose); }
.stat-icon.green  { color: #059669; }
.stat-icon.orange { color: #D97706; }
.badge .ic, .alert .ic, .form-label .ic, .card-header h3 .ic { vertical-align: -0.18em; }
.plan-section-title .ic { width: 20px; height: 20px; }
.card-header h3 .ic { color: var(--purple-mid); margin-right: 4px; }
.alert .ic { margin-right: 6px; vertical-align: -3px; }

/* Landing: ikon fitur & hero */
.icon-badge {
    width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 14px;
    display: flex; align-items: center; justify-content: center; color: #fff;
    background: var(--grad-brand);
    box-shadow: 0 8px 20px rgba(155,81,224,.28), inset 0 0 0 1px rgba(255,255,255,.2);
}
.icon-badge .ic { width: 26px; height: 26px; }
.icon-badge.v2 { background: var(--grad-purple); }
.icon-badge.v3 { background: var(--grad-pink); }
.hero-eyebrow .ic { width: 15px; height: 15px; }
.hero::after {
    content: ''; position: absolute; width: 380px; height: 380px; border-radius: 50%;
    right: -120px; top: -140px; pointer-events: none;
    background: radial-gradient(circle, rgba(91,46,255,.12), transparent 70%);
}
.showcase-item { transition: var(--transition); }
.showcase-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(155,81,224,.35); }
.showcase-item .s-logo { box-shadow: 0 6px 16px rgba(91,46,255,.15); }
.footer-links a .ic { display: none; }
