/* =============================================================
   Fin-App · Modern Theme Layer  (v2 — layout-safe)
   Override di atas style.css template. Non-destruktif.
   PENTING: tidak mengubah tinggi/posisi elemen fixed (appHeader
   56px, appBottomMenu 56px) agar tidak bentrok dgn #appCapsule.
   Ganti warna brand cukup di --brand & --brand-2.
   ============================================================= */

:root {
    /* Brand */
    --brand: #279EFF;
    --brand-2: #4F7BFF;
    --brand-600: #1E8BEC;
    --brand-700: #1873C9;
    --brand-050: #EAF4FF;
    --brand-grad: linear-gradient(135deg, #4F7BFF 0%, #279EFF 55%, #38B6FF 100%);

    /* Netral / ink (bias biru tipis) */
    --ink-900: #0E1726;
    --ink-700: #33415A;
    --ink-500: #6B7A90;
    --ink-400: #93A0B3;
    --line: #EBEFF5;

    /* Surface */
    --bg: #F4F7FB;
    --surface: #FFFFFF;

    /* Radius */
    --r-sm: 12px;
    --r-md: 16px;
    --r-lg: 22px;

    /* Shadow */
    --sh-xs: 0 1px 2px rgba(16, 24, 40, .05);
    --sh-sm: 0 2px 8px rgba(16, 24, 40, .06);
    --sh-md: 0 8px 20px rgba(16, 24, 40, .08);
    --sh-brand: 0 6px 16px rgba(39, 158, 255, .30);
}

/* ---------- Base ---------- */
body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--ink-700);
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
}

/* layout width template (dipertahankan) */
body,
.form-button-group {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* elemen fixed dipusatkan pasti (tahan overflow horizontal) */
.appHeader,
.appBottomMenu {
    width: 100%;
    max-width: 600px;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%);
}

#appCapsule {
    background: var(--bg);
}

h1, h2, h3, h4, h5 {
    color: var(--ink-900);
    font-weight: 700;
    letter-spacing: -0.02em;
}

a,
.text-primary {
    color: var(--brand) !important;
}

a:hover,
a:active,
a:focus {
    color: var(--brand-600) !important;
}

/* ---------- App Header (TINGGI TIDAK DIUBAH) ---------- */
.appHeader.text-light,
.bg-primary-custom {
    background: var(--brand-grad) !important;
    border-bottom: 0 !important;
    box-shadow: 0 4px 14px rgba(39, 158, 255, .28);
}

/* safe-area strip di atas header ikut warna brand (bukan putih) */
.appHeader:before {
    background: #4F7BFF !important;
}

.appHeader .pageTitle {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.appHeader .headerButton:active {
    opacity: .6;
}

/* ---------- Cards ---------- */
.card {
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--sh-sm);
    background: var(--surface);
}

.card .card-body {
    padding: 16px;
}

.card h2 {
    font-size: 1.02rem;
    line-height: 1.4;
}

.card h3 {
    font-size: .92rem;
}

.card hr {
    border-color: var(--line);
    opacity: 1;
    margin: 12px 0;
}

.card p {
    color: var(--ink-500);
    font-size: .85rem;
    line-height: 1.55;
}

/* ---------- Wallet / Slider ---------- */
.wallet-card-section:before {
    background: var(--brand-grad) !important;
}

.wallet-card {
    border-radius: var(--r-lg) !important;
    box-shadow: var(--sh-md);
}

.wallet-card .balance .right .button:hover {
    background: var(--brand) !important;
}

.swiper-pagination-bullet-active {
    background: var(--brand) !important;
}

/* ---------- Category tabs (custom-tab-list) ---------- */
.custom-tab-list {
    list-style: none;
    display: flex;
    gap: 6px;
    padding: 6px !important;
    margin: 0;
    background: var(--surface) !important;
    border: 1px solid var(--line);
    border-radius: var(--r-sm) !important;
    box-shadow: var(--sh-xs);
    overflow-x: auto;
    align-items: center;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.custom-tab-list::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.custom-tab-list li {
    padding: 0 !important;
    margin: 0 !important;
    white-space: nowrap !important;
}

.custom-tab-list li .nav-link {
    display: block;
    padding: 8px 18px;
    border-radius: 9px;
    font-weight: 600;
    font-size: .84rem;
    color: var(--ink-500) !important;
    transition: color .18s ease, background .18s ease;
}

.custom-tab-list li.active,
.custom-tab-list li .nav-link.active {
    background: var(--brand-grad) !important;
    border-radius: 9px !important;
    box-shadow: var(--sh-brand);
}

.custom-tab-list li.active a,
.custom-tab-list li.active .nav-link,
.custom-tab-list li .nav-link.active {
    color: #fff !important;
}

/* ---------- Buttons ---------- */
.btn {
    border-radius: 12px;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: box-shadow .2s ease, filter .2s ease, opacity .18s ease;
}

.btn-primary {
    background: var(--brand-grad) !important;
    border: none !important;
    box-shadow: var(--sh-brand);
    color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
    filter: brightness(.97);
    box-shadow: 0 8px 20px rgba(39, 158, 255, .40) !important;
    color: #fff !important;
}

.btn-primary:active {
    opacity: .9;
}

.btn-outline-primary {
    border: 1.5px solid var(--brand) !important;
    color: var(--brand) !important;
    background: transparent !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:active {
    background: var(--brand-050) !important;
    color: var(--brand-700) !important;
}

/* ---------- Forms ---------- */
.form-control,
.form-select {
    border-radius: 12px;
    border: 1.5px solid var(--line);
    color: var(--ink-900);
    background: var(--surface);
    transition: border-color .18s ease, box-shadow .18s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(39, 158, 255, .14);
}

/* ---------- Marquee ---------- */
.marquee {
    background: var(--brand-grad) !important;
    border-radius: 10px !important;
    box-shadow: var(--sh-sm);
}

/* ---------- List / icon box ---------- */
.listed-detail .iconbox {
    background: var(--brand-grad) !important;
    box-shadow: var(--sh-brand);
}

/* ---------- Bottom Menu (TINGGI TIDAK DIUBAH) ---------- */
.appBottomMenu {
    background: var(--surface);
    border-top: 1px solid var(--line);
    box-shadow: 0 -4px 18px rgba(16, 24, 40, .06);
}

.appBottomMenu .item strong {
    font-weight: 600;
    font-size: .66rem;
    color: var(--ink-400);
}

.appBottomMenu .item i,
.appBottomMenu .item .icon,
.appBottomMenu .item ion-icon {
    color: var(--ink-400);
    transition: color .2s ease, transform .2s ease;
}

.appBottomMenu .item i {
    margin-bottom: 3px;
}

.appBottomMenu .item.active .icon,
.appBottomMenu .item.active ion-icon,
.appBottomMenu .item.active i,
.appBottomMenu .item.active strong {
    color: var(--brand) !important;
}

.appBottomMenu .item.active i {
    transform: translateY(-1px) scale(1.06);
}

.appBottomMenu .item.active:before {
    background: var(--brand-grad) !important;
    height: 3px;
}

/* ---------- Action bar Total/Beli ---------- */
/* Diangkat tepat di atas bottom nav (56px) supaya tidak berdempetan,
   dan dijadikan floating bar dengan pemisah visual. */
.form-button-group {
    bottom: 56px;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%);
    max-width: 600px;
    min-height: 74px;
    padding: 12px 16px;
    gap: 14px;
    background: rgba(255, 255, 255, .98);
    border-top: 1px solid var(--line);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -8px 24px rgba(16, 24, 40, .10);
}

.form-button-group > div {
    margin: 0;
}

.form-button-group p {
    margin: 0;
    color: var(--ink-500);
    font-size: .78rem;
    font-weight: 500;
}

.form-button-group h3,
.form-button-group #total {
    margin: 2px 0 0;
    color: var(--ink-900);
    font-weight: 800;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.form-button-group .btn-primary {
    padding-left: 26px;
    padding-right: 26px;
}

/* ---------- Misc ---------- */
.badge {
    border-radius: 8px;
    font-weight: 600;
}

::selection {
    background: rgba(39, 158, 255, .22);
}
