:root {
    --forest: #08331f;
    --forest-light: #0e4d2e;
    --forest-dark: #041a10;
    --forest-deeper: #021109;
    --gold: #d4af37;
    --gold-light: #f0d878;
    --gold-dark: #a8841f;
    --gold-soft: rgba(212, 175, 55, 0.15);
    --cream: #fbf8ef;
}

* { box-sizing: border-box; }

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    background-color: var(--cream);
    color: #23291f;
}

a { text-decoration: none; }

/* Keep ionicons vertically aligned with adjacent text everywhere */
ion-icon {
    vertical-align: middle;
    --ionicon-stroke-width: 32px;
}

/* ==================================================
   Islamic geometric pattern (inline SVG data-URI)
   ================================================== */
.pattern-bg {
    position: relative;
    background-color: var(--forest-dark);
    background-image:
        radial-gradient(circle at 50% 50%, rgba(212,175,55,0.06) 0, transparent 55%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='none' stroke='%23d4af37' stroke-width='1' opacity='0.15'%3E%3Cpath d='M42 2 L82 42 L42 82 L2 42 Z'/%3E%3Ccircle cx='42' cy='42' r='20'/%3E%3Cpath d='M42 22 L62 42 L42 62 L22 42 Z'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: repeat, repeat;
    background-size: auto, 84px 84px;
}

.pattern-bg-light {
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='none' stroke='%2308331f' stroke-width='1' opacity='0.05'%3E%3Cpath d='M42 2 L82 42 L42 82 L2 42 Z'/%3E%3Ccircle cx='42' cy='42' r='20'/%3E%3Cpath d='M42 22 L62 42 L42 62 L22 42 Z'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 84px 84px;
}

/* ==================================================
   Ornamental corner flourishes
   ================================================== */
.ornate-frame {
    position: relative;
    border: 1px solid var(--gold);
    border-radius: 18px;
}
.ornate-frame::before,
.ornate-frame::after {
    content: "";
    position: absolute;
    width: 26px;
    height: 26px;
    border: 2px solid var(--gold);
    opacity: 0.85;
}
.ornate-frame::before {
    top: -1px; left: -1px;
    border-right: none; border-bottom: none;
    border-top-left-radius: 16px;
}
.ornate-frame::after {
    bottom: -1px; right: -1px;
    border-left: none; border-top: none;
    border-bottom-right-radius: 16px;
}

.ornate-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--gold);
}
.ornate-divider::before,
.ornate-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* Mihrab-style arch shape */
.arch-shape {
    border-radius: 50% 50% 8px 8px / 35% 35% 8px 8px;
}

/* ==================================================
   Buttons
   ================================================== */
.btn-gold {
    background: linear-gradient(180deg, var(--gold-light), var(--gold));
    border-color: var(--gold-dark);
    color: var(--forest-dark);
    font-weight: 700;
    letter-spacing: 0.3px;
    transition: all 0.25s ease;
    box-shadow: 0 2px 10px rgba(212,175,55,0.25);
}
.btn-gold:hover {
    background: linear-gradient(180deg, var(--gold), var(--gold-dark));
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(212,175,55,0.4);
}
.btn-forest {
    background-color: var(--forest);
    border-color: var(--forest);
    color: #fff;
    font-weight: 600;
    transition: all 0.25s ease;
}
.btn-forest:hover {
    background-color: var(--forest-dark);
    border-color: var(--gold);
    color: var(--gold-light);
    transform: translateY(-2px);
}
.btn-outline-forest {
    border-color: var(--forest);
    color: var(--forest);
    font-weight: 600;
}
.btn-outline-forest:hover {
    background-color: var(--forest);
    color: #fff;
}
.btn-outline-light-gold {
    border: 1.5px solid var(--gold);
    color: var(--gold-light);
    background: transparent;
    font-weight: 600;
    transition: all 0.25s ease;
}
.btn-outline-light-gold:hover {
    background: var(--gold-soft);
    color: var(--gold-light);
    transform: translateY(-2px);
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212,175,55,0.35); }
    50% { box-shadow: 0 0 0 10px rgba(212,175,55,0); }
}
.btn-pulse { animation: pulseGlow 2.4s infinite; }

/* ==================================================
   Backgrounds / text
   ================================================== */
.bg-forest { background-color: var(--forest) !important; }
.bg-forest-dark { background-color: var(--forest-dark) !important; }
.bg-gold { background-color: var(--gold) !important; }
.text-gold { color: var(--gold) !important; }
.text-gold-light { color: var(--gold-light) !important; }
.text-forest { color: var(--forest) !important; }

/* ==================================================
   Public Navbar
   ================================================== */
.navbar-public {
    background-color: var(--forest-dark);
    border-bottom: 1px solid rgba(212,175,55,0.35);
}
.navbar-public .navbar-brand,
.navbar-public .nav-link {
    color: var(--cream) !important;
}
.navbar-public .nav-link { position: relative; }
.navbar-public .nav-link::after {
    content: "";
    position: absolute;
    left: 0; bottom: -2px;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.25s ease;
}
.navbar-public .nav-link:hover::after { width: 100%; }
.navbar-public .nav-link:hover { color: var(--gold) !important; }
.brand-logo-img { height: 38px; width: auto; }

.topbar-brand {
    color: var(--forest);
    font-weight: 800;
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.topbar-brand .brand-logo-img { height: 40px; }
.topbar-brand ion-icon { color: var(--gold); font-size: 22px; flex-shrink: 0; }

/* Hamburger toggler — visible on dark navbar */
.navbar-public .navbar-toggler {
    border: 1.5px solid var(--gold);
    padding: 0.35rem 0.6rem;
    border-radius: 8px;
}
.navbar-public .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(212,175,55,0.35);
    outline: none;
}
.navbar-public .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3E%3Cpath stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}
/* Collapsed menu panel on mobile gets a solid dark background */
@media (max-width: 991px) {
    .navbar-public .navbar-collapse {
        background: var(--forest-dark);
        border: 1px solid rgba(212,175,55,0.25);
        border-radius: 12px;
        margin-top: 12px;
        padding: 12px 16px;
    }
    .navbar-public .navbar-nav .btn {
        display: inline-block;
        margin-top: 6px;
    }
}

/* ==================================================
   Hero
   ================================================== */
.hero {
    background: radial-gradient(circle at 15% 10%, rgba(212,175,55,0.10), transparent 45%),
                linear-gradient(160deg, var(--forest) 0%, var(--forest-dark) 55%, var(--forest-deeper) 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='none' stroke='%23d4af37' stroke-width='1' opacity='0.10'%3E%3Cpath d='M42 2 L82 42 L42 82 L2 42 Z'/%3E%3Ccircle cx='42' cy='42' r='20'/%3E%3Cpath d='M42 22 L62 42 L42 62 L22 42 Z'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 84px 84px;
    pointer-events: none;
}
.hero h1 { color: #fff; }
.hero .highlight { color: var(--gold); }
.hero-crescent {
    position: absolute;
    top: 40px; right: 60px;
    font-size: 64px;
    color: var(--gold);
    opacity: 0.5;
}

/* ==================================================
   Badge feature strip (below hero)
   ================================================== */
.badge-strip {
    background: linear-gradient(135deg, var(--forest), var(--forest-dark));
    border-top: 1px solid rgba(212,175,55,0.3);
    border-bottom: 1px solid rgba(212,175,55,0.3);
}
.badge-strip-item {
    text-align: center;
    color: var(--cream);
}
.badge-strip-item ion-icon {
    font-size: 26px;
    color: var(--gold);
    margin-bottom: 6px;
}
.badge-strip-item strong { display: block; font-size: 0.9rem; }
.badge-strip-item span { font-size: 0.78rem; color: #b9cdbf; }

/* ==================================================
   Cards
   ================================================== */
.card-gold-border {
    border-top: 4px solid var(--gold);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-gold-border:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(8,51,31,0.15) !important;
}
.feature-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(1,50,32,0.08);
    color: var(--forest);
    transition: transform 0.3s ease;
}
.card-gold-border:hover .feature-icon {
    transform: rotate(8deg) scale(1.08);
    background-color: var(--gold-soft);
}
.feature-icon ion-icon { font-size: 28px; }

/* ==================================================
   Stats bar
   ================================================== */
.stats-bar {
    background: linear-gradient(135deg, var(--forest-dark), var(--forest));
    border-top: 1px solid rgba(212,175,55,0.3);
    border-bottom: 1px solid rgba(212,175,55,0.3);
}
.stat-item { text-align: center; color: #fff; }
.stat-item .stat-number {
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--gold);
}
.stat-item ion-icon { font-size: 24px; color: var(--gold-light); margin-bottom: 4px; }
.stat-item small { color: #b9cdbf; display: block; }

/* ==================================================
   Kenapa Pilih grid (6 items)
   ================================================== */
.reason-card {
    background: #fff;
    border: 1px solid rgba(8,51,31,0.08);
    border-radius: 14px;
    padding: 1.75rem 1.25rem;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}
.reason-card:hover {
    border-color: var(--gold);
    box-shadow: 0 10px 26px rgba(8,51,31,0.12);
    transform: translateY(-4px);
}
.reason-card .reason-icon {
    width: 60px; height: 60px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(145deg, var(--forest), var(--forest-dark));
    color: var(--gold);
    font-size: 26px;
}

/* ==================================================
   App shell (sidebar + main) — desktop sidebar, mobile off-canvas drawer
   ================================================== */
.app-shell { min-height: 100vh; }

.sidebar {
    min-height: 100vh;
    background: linear-gradient(180deg, var(--forest-dark), var(--forest-deeper));
    color: var(--cream);
    width: 260px;
    flex: 0 0 260px;
    border-right: 1px solid rgba(212,175,55,0.25);
    position: relative;
    display: flex;
    flex-direction: column;
}
.sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='none' stroke='%23d4af37' stroke-width='1' opacity='0.06'%3E%3Cpath d='M42 2 L82 42 L42 82 L2 42 Z'/%3E%3Ccircle cx='42' cy='42' r='20'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 84px 84px;
    pointer-events: none;
}
.sidebar > * { position: relative; z-index: 1; }
.sidebar .sidebar-brand {
    color: var(--gold);
    font-weight: 700;
    font-size: 1.15rem;
}
.sidebar .sidebar-header {
    border-bottom: 1px solid rgba(212,175,55,0.2);
    padding-bottom: 16px;
}
.sidebar .sidebar-close {
    display: none;
    background: none;
    border: none;
    color: var(--gold);
    font-size: 26px;
    line-height: 1;
    padding: 4px;
}
.sidebar .nav-link {
    color: #cfe3d8;
    border-radius: 8px;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
}
.sidebar .nav-link ion-icon { font-size: 20px; }
.sidebar .nav-link:hover {
    background-color: rgba(212,175,55,0.12);
    color: var(--gold);
    padding-left: 16px;
}
.sidebar .nav-link.active {
    background: linear-gradient(90deg, var(--gold), var(--gold-dark));
    color: var(--forest-dark);
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(212,175,55,0.3);
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(2,17,9,0.6);
    backdrop-filter: blur(2px);
    z-index: 1040;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.sidebar-backdrop.show { opacity: 1; }

.topbar {
    background-color: #0f400e;
    border-bottom: 2px solid var(--gold-soft);
    position: sticky;
    top: 0;
    z-index: 20;
    flex-wrap: nowrap;
    gap: 8px;
}
.topbar > div { min-width: 0; }
.topbar h5 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    color: #fff !important;
}
.topbar .fw-semibold {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
}
@media (max-width: 400px) {
    .topbar h5 { font-size: 1rem; }
    .topbar .fw-semibold { max-width: 90px; }
}
.sidebar-toggle-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1.5px solid var(--gold);
    background: var(--forest);
    color: #fff;
    font-size: 22px;
}
.sidebar-toggle-btn:active { background: var(--forest-dark); }

@media (max-width: 991px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 10px 0 40px rgba(0,0,0,0.3);
    }
    .sidebar.show { transform: translateX(0); }
    .sidebar .sidebar-close { display: block; }
    .sidebar-backdrop.show { display: block; }
    .sidebar-toggle-btn { display: inline-flex; }
    .app-main { width: 100%; }
}

/* ==================================================
   Status badges
   ================================================== */
.badge-pending { background-color: #f1c40f; color: #3a2f00; }
.badge-approved,
.badge-active,
.badge-diverifikasi,
.badge-lunas,
.badge-selesai,
.badge-processing_no_freeze { background-color: var(--forest); color: #fff; }
.badge-rejected,
.badge-ditolak,
.badge-credit_frozen,
.badge-low_credit_score,
.badge-transfer_failed,
.badge-cancelled,
.badge-beku { background-color: #b02a2a; color: #fff; }
.badge-menunggu_verifikasi,
.badge-under_review,
.badge-payment_processing,
.badge-processing { background-color: var(--gold); color: var(--forest-dark); }

/* ==================================================
   Footer
   ================================================== */
footer.site-footer {
    background-color: var(--forest-deeper);
    color: #cfe3d8;
    border-top: 1px solid rgba(212,175,55,0.25);
}
footer.site-footer a { color: var(--gold-light); }

/* ==================================================
   Account card (tabbed login/register on landing)
   ================================================== */
.account-section {
    background: linear-gradient(180deg, var(--forest-dark), var(--forest));
    position: relative;
}
.account-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0,0,0,0.35);
}
.account-tabs {
    display: flex;
    background: var(--forest-dark);
}
.account-tab {
    flex: 1;
    text-align: center;
    padding: 16px;
    color: #b9cdbf;
    font-weight: 700;
    cursor: pointer;
    border: none;
    background: transparent;
    transition: all 0.25s ease;
    position: relative;
}
.account-tab.active {
    color: var(--gold);
    background: rgba(212,175,55,0.08);
}
.account-tab.active::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 3px;
    background: var(--gold);
}
.account-panel { display: none; padding: 2rem; animation: fadeSlideIn 0.35s ease; }
.account-panel.active { display: block; }

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================================================
   Auth pages (standalone /masuk /daftar)
   ================================================== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 20% 20%, rgba(212,175,55,0.08), transparent 45%),
                linear-gradient(160deg, var(--forest) 0%, var(--forest-dark) 100%);
    position: relative;
}
.auth-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='none' stroke='%23d4af37' stroke-width='1' opacity='0.08'%3E%3Cpath d='M42 2 L82 42 L42 82 L2 42 Z'/%3E%3Ccircle cx='42' cy='42' r='20'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 84px 84px;
}
.auth-card {
    background: #fff;
    max-width: 420px;
    width: 100%;
    position: relative;
    z-index: 1;
    padding: 2.25rem;
}

/* Split auth layout: brand panel + form panel */
.auth-split {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 900px;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0,0,0,0.4);
    display: flex;
    min-height: 520px;
}
.auth-brand-panel {
    flex: 1 1 42%;
    background: radial-gradient(circle at 30% 20%, rgba(212,175,55,0.15), transparent 55%),
                linear-gradient(160deg, var(--forest), var(--forest-dark));
    color: #fff;
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.auth-brand-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='none' stroke='%23d4af37' stroke-width='1' opacity='0.10'%3E%3Cpath d='M42 2 L82 42 L42 82 L2 42 Z'/%3E%3Ccircle cx='42' cy='42' r='20'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 84px 84px;
    pointer-events: none;
}
.auth-brand-panel > * { position: relative; z-index: 1; }
.auth-brand-panel .brand-icon {
    font-size: 56px;
    color: var(--gold);
    margin-bottom: 1rem;
}
.auth-form-panel {
    flex: 1 1 58%;
    padding: 3rem 2.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.auth-benefit {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #dfe9e2;
    margin-bottom: 0.85rem;
    font-size: 0.95rem;
}
.auth-benefit ion-icon { color: var(--gold); font-size: 20px; flex-shrink: 0; }

@media (max-width: 767px) {
    .auth-split { flex-direction: column; min-height: 0; max-width: 440px; }
    .auth-brand-panel { padding: 2rem; }
    .auth-form-panel { padding: 2rem; }
}

.table-forest thead {
    background-color: var(--forest);
    color: #fff;
}

.simulasi-result {
    background-color: rgba(212,175,55,0.1);
    border: 1px dashed var(--gold);
    border-radius: 10px;
}

/* ==================================================
   Reveal on scroll animation
   Only hides when JS is available (html.js). Without JS the content
   is always visible, so it can never disappear on the user.
   ================================================== */
.js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.js .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
    .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ==================================================
   CTA banner (closing)
   ================================================== */
.cta-banner {
    background: linear-gradient(135deg, var(--forest-dark), var(--forest));
    border-top: 3px solid var(--gold);
    border-bottom: 3px solid var(--gold);
    position: relative;
    overflow: hidden;
}
.cta-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='none' stroke='%23d4af37' stroke-width='1' opacity='0.10'%3E%3Cpath d='M42 2 L82 42 L42 82 L2 42 Z'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 84px 84px;
}

@media (max-width: 991px) {
    .hero-crescent { display: none; }
    /* Shrink the decorative hero visual on small screens to give the
       text room; keeps the mobile layout clean. */
    .hero .hero-arch { width: 200px !important; height: 220px !important; }
    .hero .hero-arch ion-icon { font-size: 110px !important; }
}
@media (max-width: 575px) {
    .hero .hero-arch { width: 160px !important; height: 180px !important; margin: 0 auto; }
    .hero .display-5 { font-size: 1.9rem; }
}

/* ==================================================
   Form controls theming (focus, range slider)
   ================================================== */
.form-control,
.form-select {
    border: 1px solid #d8d2be;
    border-radius: 10px;
    padding: 0.6rem 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-control:focus,
.form-select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 0.2rem rgba(212,175,55,0.25);
}
.form-label {
    font-weight: 600;
    color: var(--forest);
    margin-bottom: 0.4rem;
}
.form-check-input:checked {
    background-color: var(--forest);
    border-color: var(--forest);
}
.form-check-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 0.2rem rgba(212,175,55,0.25);
}

/* Range slider (webkit + moz) — gold thumb, forest track */
input[type="range"].form-range {
    height: 1.6rem;
    accent-color: var(--gold);
}
.form-range::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--forest), var(--forest-light));
}
.form-range::-moz-range-track {
    height: 8px;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--forest), var(--forest-light));
}
.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    margin-top: -7px;
    border-radius: 50%;
    background: linear-gradient(180deg, var(--gold-light), var(--gold));
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    cursor: pointer;
}
.form-range::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(180deg, var(--gold-light), var(--gold));
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    cursor: pointer;
}
.form-range:focus::-webkit-slider-thumb { box-shadow: 0 0 0 6px rgba(212,175,55,0.25); }
.form-range:focus::-moz-range-thumb { box-shadow: 0 0 0 6px rgba(212,175,55,0.25); }

/* Inputs inside dark account card keep light bg (already white) */

/* ==================================================
   Cards general polish
   ================================================== */
.card {
    border: 1px solid rgba(8,51,31,0.07);
    border-radius: 16px;
}
.card.shadow-sm { box-shadow: 0 4px 18px rgba(8,51,31,0.06) !important; }

/* Tables inside cards on small screens: allow horizontal scroll without
   breaking the card's rounded corners. */
@media (max-width: 575px) {
    .card, .panel { border-radius: 14px; }
}

/* ==================================================
   Section headings with ornamental underline
   ================================================== */
.section-title {
    position: relative;
    display: inline-block;
    padding-bottom: 14px;
}
.section-title::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 70px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ==================================================
   Tables polish
   ================================================== */
.table-forest {
    border-radius: 12px;
    overflow: hidden;
}
.table-forest thead th {
    border: none;
    font-weight: 600;
    padding: 0.85rem 1rem;
}
.table-forest tbody td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
}
.table-forest tbody tr {
    transition: background-color 0.15s ease;
}
.table-forest tbody tr:hover {
    background-color: rgba(212,175,55,0.06);
}

/* ==================================================
   Badges — pill shaped, consistent
   ================================================== */
.badge {
    padding: 0.4em 0.75em;
    border-radius: 50rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

/* ==================================================
   Custom scrollbar
   ================================================== */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: #ece7d6; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--forest-light), var(--forest));
    border-radius: 8px;
    border: 3px solid #ece7d6;
}
::-webkit-scrollbar-thumb:hover { background: var(--forest); }

/* ==================================================
   Stat item divider (vertical gold lines between stats)
   ================================================== */
@media (min-width: 768px) {
    .stats-bar .stat-item {
        border-right: 1px solid rgba(212,175,55,0.2);
    }
    .stats-bar [class*="col-"]:last-child .stat-item {
        border-right: none;
    }
}

/* ==================================================
   Badge strip: add vertical dividers + icon polish
   ================================================== */
@media (min-width: 768px) {
    .badge-strip [class*="col-"] {
        border-right: 1px solid rgba(212,175,55,0.15);
    }
    .badge-strip [class*="col-"]:last-child {
        border-right: none;
    }
}

/* Hero right decorative arch: fill the empty look with layered glow.
   When an admin uploads a hero image, it fills this exact frame
   (object-fit: cover) instead of the default wallet icon. */
.hero-arch {
    background: radial-gradient(circle at 50% 40%, rgba(212,175,55,0.18), rgba(212,175,55,0.03) 70%) !important;
    box-shadow: inset 0 0 60px rgba(212,175,55,0.15);
    overflow: hidden;
}
.hero-arch ion-icon { filter: drop-shadow(0 6px 20px rgba(212,175,55,0.35)); }
.hero-arch img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ==================================================
   Dashboard hero/greeting banner (user)
   ================================================== */
.dash-hero {
    background: linear-gradient(135deg, var(--forest) 0%, var(--forest-dark) 65%, var(--forest-deeper) 100%);
    border-radius: 20px;
    padding: 1.75rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.dash-hero > * { position: relative; z-index: 1; }
.dash-hero .dash-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(212,175,55,0.18);
    border: 1px solid rgba(212,175,55,0.4);
    color: var(--gold-light);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 50rem;
}
.dash-hero h2 { color: #fff; font-weight: 800; word-break: break-word; overflow-wrap: anywhere; }
.dash-hero h2 .highlight { color: var(--gold); }
.dash-hero p { color: #cfe3d8; }

/* ==================================================
   Digital wallet card (premium gradient)
   ================================================== */
.wallet-card {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 55%, var(--gold-dark) 100%);
    border-radius: 20px;
    padding: 1.5rem 1.75rem;
    position: relative;
    overflow: hidden;
    color: var(--forest-deeper);
    box-shadow: 0 16px 40px rgba(212,175,55,0.35);
}
.wallet-card::after {
    content: "";
    position: absolute;
    top: -40px; right: -40px;
    width: 160px; height: 160px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
}
.wallet-card > * { position: relative; z-index: 1; }
.wallet-card .wallet-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: rgba(8,51,31,0.15);
    display: flex; align-items: center; justify-content: center;
    color: var(--forest-deeper);
    font-size: 22px;
}
.wallet-card .wallet-balance {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    word-break: break-word;
    overflow-wrap: anywhere;
}
.wallet-card .btn-wallet {
    background: var(--forest-deeper);
    color: var(--gold-light);
    border: none;
    font-weight: 700;
    border-radius: 12px;
    padding: 0.65rem 1rem;
    transition: all 0.2s ease;
}
.wallet-card .btn-wallet:hover { background: var(--forest); color: var(--gold); }

/* ==================================================
   Quick access grid (round icon buttons)
   ================================================== */
.quick-access {
    background: #fff;
    border-radius: 18px;
    padding: 1.25rem;
    box-shadow: 0 4px 18px rgba(8,51,31,0.06);
}
.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}
@media (max-width: 480px) {
    .quick-access-grid { grid-template-columns: repeat(4, 1fr); gap: 0.25rem; }
}
.quick-access-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #23291f;
    text-align: center;
    padding: 6px 2px;
    border-radius: 12px;
    transition: all 0.2s ease;
}
.quick-access-item:hover {
    background: var(--gold-soft);
    transform: translateY(-2px);
}
.quick-access-item .qa-icon {
    width: 48px; height: 48px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(145deg, var(--forest), var(--forest-dark));
    color: var(--gold);
    font-size: 22px;
}
.quick-access-item span {
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.1;
    word-break: break-word;
    max-width: 100%;
}

/* ==================================================
   Stat pill cards (compact, icon left)
   ================================================== */
.stat-pill {
    background: #fff;
    border-radius: 16px;
    padding: 1rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 18px rgba(8,51,31,0.06);
    border: 1px solid rgba(8,51,31,0.05);
    height: 100%;
    transition: all 0.25s ease;
}
.stat-pill:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(8,51,31,0.1); }
.stat-pill .stat-pill-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}
.stat-pill .stat-pill-icon.tone-gold { background: var(--gold-soft); color: var(--gold-dark); }
.stat-pill .stat-pill-icon.tone-forest { background: rgba(8,51,31,0.08); color: var(--forest); }
.stat-pill .stat-pill-icon.tone-danger { background: rgba(220,53,69,0.12); color: #dc3545; }
.stat-pill .stat-pill-icon.tone-warning { background: rgba(255,193,7,0.15); color: #b8860b; }
.stat-pill .stat-pill-text { min-width: 0; }
.stat-pill .stat-pill-label { font-size: 0.72rem; color: #7a8a80; display: block; }
.stat-pill .stat-pill-value {
    font-weight: 800;
    color: var(--forest);
    font-size: 1.15rem;
    line-height: 1.2;
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* ==================================================
   Credit score card (skor kredit)
   ================================================== */
.credit-score-card {
    background: #fff;
    border-radius: 18px;
    padding: 1.75rem;
    box-shadow: 0 4px 18px rgba(8,51,31,0.06);
    border: 1px solid rgba(8,51,31,0.05);
    max-width: 480px;
}
.credit-score-ring {
    --score-color: var(--forest);
    width: 148px;
    height: 148px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: conic-gradient(var(--score-color) calc(var(--score-pct) * 1%), rgba(8,51,31,0.08) 0);
    position: relative;
}
.credit-score-ring::before {
    content: '';
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    background: #fff;
    box-shadow: inset 0 2px 6px rgba(8,51,31,0.06);
}
.credit-score-ring .score-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
}
.credit-score-ring .score-number {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--score-color);
}
.credit-score-ring .score-max {
    font-size: 0.78rem;
    color: #7a8a80;
    font-weight: 600;
}
.credit-score-card .score-label-row {
    text-align: center;
}
.credit-score-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
}
.credit-score-badge.tone-gold { background: var(--gold-soft); color: var(--gold-dark); }
.credit-score-badge.tone-forest { background: rgba(8,51,31,0.08); color: var(--forest); }
.credit-score-badge.tone-danger { background: rgba(220,53,69,0.12); color: #dc3545; }
.credit-score-badge.tone-warning { background: rgba(255,193,7,0.15); color: #b8860b; }
.credit-score-scale {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(8,51,31,0.08);
}
.credit-score-scale .scale-item {
    flex: 1;
    text-align: center;
    font-size: 0.68rem;
    color: #7a8a80;
    font-weight: 600;
    position: relative;
    padding-top: 12px;
}
.credit-score-scale .scale-item::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 10px; height: 10px;
    border-radius: 50%;
    background: rgba(8,51,31,0.15);
}
.credit-score-scale .scale-item.active { color: var(--forest); }
.credit-score-scale .scale-item.active::before { background: var(--score-color, var(--forest)); }

@media (max-width: 400px) {
    .credit-score-card { padding: 1.25rem; }
    .credit-score-ring { width: 120px; height: 120px; }
    .credit-score-ring .score-number { font-size: 1.9rem; }
}

/* ==================================================
   Loan application wizard (Mohon Pembiayaan, 5 steps)
   ================================================== */
.wizard-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}
.wizard-step-dot {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid rgba(8,51,31,0.15);
    color: #7a8a80;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: all 0.25s ease;
}
.wizard-step-dot.active {
    background: var(--forest);
    border-color: var(--forest);
    color: var(--gold);
    box-shadow: 0 0 0 4px rgba(8,51,31,0.12);
}
.wizard-step-dot.completed {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--forest-dark);
}
.wizard-step-line {
    flex: 1 1 auto;
    height: 2px;
    background: rgba(8,51,31,0.15);
    min-width: 12px;
    max-width: 60px;
}

.wizard-step { display: none; }
.wizard-step.active { display: block; animation: wizardFadeIn 0.25s ease; }
@keyframes wizardFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Step 1: amount input + presets */
.amount-input-box {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 2px solid var(--forest);
    border-radius: 12px;
    padding: 0.65rem 1rem;
}
.amount-input-box .amount-prefix {
    font-weight: 800;
    color: var(--forest);
    font-size: 1.1rem;
}
.amount-input-box .amount-input-field {
    border: none;
    outline: none;
    flex: 1;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--forest-dark);
    min-width: 0;
}
.amount-preset-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.amount-preset-item {
    background: #fff;
    border: 1px solid rgba(8,51,31,0.15);
    border-radius: 10px;
    padding: 0.75rem;
    font-weight: 700;
    color: var(--forest);
    transition: all 0.2s ease;
}
.amount-preset-item:hover { border-color: var(--gold); }
.amount-preset-item.active {
    background: var(--forest);
    border-color: var(--forest);
    color: var(--gold);
}

/* Step 2: tenor grid */
.tenor-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.tenor-item {
    background: #fff;
    border: 1px solid rgba(8,51,31,0.15);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.2s ease;
}
.tenor-item:hover { border-color: var(--gold); }
.tenor-item .tenor-num { font-size: 1.3rem; font-weight: 800; color: var(--forest-dark); }
.tenor-item .tenor-label { font-size: 0.78rem; color: #7a8a80; }
.tenor-item.selected {
    background: var(--forest);
    border-color: var(--forest);
}
.tenor-item.selected .tenor-num,
.tenor-item.selected .tenor-label { color: var(--gold); }

/* Step 5: signature pad */
.signature-pad-wrap {
    position: relative;
    border: 2px dashed rgba(8,51,31,0.25);
    border-radius: 12px;
    background: #fff;
    height: 180px;
}
.signature-canvas {
    width: 100%;
    height: 100%;
    touch-action: none;
    cursor: crosshair;
}
.signature-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #b7c2ba;
    pointer-events: none;
    font-size: 0.85rem;
}
.signature-placeholder ion-icon { font-size: 28px; }

/* Confirmation overlay */
.wizard-confirm-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(4,26,16,0.55);
    z-index: 1050;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.wizard-confirm-overlay.show { display: flex; }
.wizard-confirm-box {
    background: #fff;
    border-radius: 16px;
    padding: 2rem 1.75rem;
    max-width: 360px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}
.wizard-confirm-icon { font-size: 48px; color: var(--gold); margin-bottom: 0.75rem; }

@media (max-width: 400px) {
    .wizard-step-dot { width: 28px; height: 28px; font-size: 0.78rem; }
    .amount-input-box .amount-input-field { font-size: 1.1rem; }
    .signature-pad-wrap { height: 150px; }
}

/* ==================================================
   Admin settings panel (tabs, no hover-lift — this holds forms,
   not clickable landing-page cards)
   ================================================== */
.admin-panel {
    background: #fff;
    border-radius: 16px;
    border-top: 4px solid var(--gold);
    box-shadow: 0 4px 18px rgba(8,51,31,0.06);
    padding: 1.5rem;
}
.admin-tabs {
    border-bottom: 1px solid rgba(8,51,31,0.1);
    gap: 4px;
    flex-wrap: wrap;
}
.admin-tabs .nav-link {
    border: none;
    border-radius: 10px 10px 0 0;
    color: #7a8a80;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.65rem 1rem;
}
.admin-tabs .nav-link ion-icon { font-size: 18px; }
.admin-tabs .nav-link:hover { color: var(--forest); background: rgba(8,51,31,0.05); }
.admin-tabs .nav-link.active {
    color: var(--forest);
    background: rgba(8,51,31,0.08);
    border-bottom: 3px solid var(--gold);
}
.admin-tab-content { padding-top: 1.5rem; }

@media (max-width: 576px) {
    .admin-panel { padding: 1.1rem; }
    .admin-tabs .nav-link { font-size: 0.8rem; padding: 0.55rem 0.7rem; }
    .admin-tabs .nav-link ion-icon { font-size: 16px; }
}

/* ==================================================
   Admin content cards — unified replacement for the plain
   Bootstrap ".card.shadow-sm.p-4" used across admin list/detail
   pages, matching .admin-panel/.panel styling for visual
   consistency across the whole admin area.
   ================================================== */
.admin-card {
    background: #fff;
    border-radius: 16px;
    border-top: 4px solid var(--gold);
    box-shadow: 0 4px 18px rgba(8,51,31,0.06);
    border-left: 1px solid rgba(8,51,31,0.05);
    border-right: 1px solid rgba(8,51,31,0.05);
    border-bottom: 1px solid rgba(8,51,31,0.05);
    padding: 1.5rem;
}
.admin-card + .admin-card { margin-top: 1.5rem; }
.admin-card h5 {
    display: flex;
    align-items: center;
    gap: 8px;
}
.admin-card h5 ion-icon { font-size: 20px; flex-shrink: 0; }

@media (max-width: 576px) {
    .admin-card { padding: 1.1rem; border-radius: 14px; }
    .admin-card h5 { font-size: 1.02rem; }
}

/* Filter button-group (status filters etc.) — horizontal scroll
   instead of wrapping into a ragged multi-row block on narrow screens. */
.admin-filter-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
    scrollbar-width: thin;
}
.admin-filter-scroll .btn { flex-shrink: 0; white-space: nowrap; }
.admin-filter-scroll::-webkit-scrollbar { height: 5px; }
.admin-filter-scroll::-webkit-scrollbar-thumb { background: rgba(8,51,31,0.15); border-radius: 10px; }

/* Admin data tables — readable sizing on tablets that still show the
   table instead of the card-list fallback (576–767px band). */
@media (max-width: 767px) {
    .table-forest { font-size: 0.85rem; }
    .table-forest th, .table-forest td { padding: 0.65rem 0.7rem; }
}

/* Key/value info tables (table-borderless used on detail pages) —
   keep the label column from squeezing the value column edge-to-edge
   on narrow screens. */
@media (max-width: 480px) {
    .table-borderless td:first-child {
        white-space: nowrap;
        padding-right: 0.6rem;
        font-size: 0.82rem;
    }
    .table-borderless td { padding: 0.5rem 0.25rem; }
}

/* ==================================================
   Admin modals (Bootstrap 5 .modal) — forest/gold theming so the
   first modal-based UI in the admin panel matches .admin-card
   styling instead of Bootstrap's default blue/grey look.
   ================================================== */
.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
.modal-header {
    background: var(--forest-dark);
    color: #fff;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    border-bottom: 3px solid var(--gold);
}
.modal-header .modal-title { color: #fff; font-weight: 600; }
.modal-header .btn-close { filter: invert(1) grayscale(1) brightness(2); }
.modal-body { padding: 1.5rem; }
.modal-footer { border-top: 1px solid rgba(8,51,31,0.08); }
.modal-section-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--forest);
    font-weight: 700;
    margin-bottom: 0.75rem;
    border-bottom: 2px solid var(--gold-soft);
    padding-bottom: 0.4rem;
}
.modal-info-box {
    background: var(--gold-soft);
    border-left: 3px solid var(--gold);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: var(--forest-dark);
}

/* ==================================================
   Masked value show/hide toggle (see data-toggle-visibility in app.js)
   ================================================== */
.masked-value {
    filter: blur(5px);
    -webkit-filter: blur(5px);
    user-select: none;
    transition: filter 0.15s ease;
}

/* ==================================================
   Collapsible section header (see .collapse-chevron in dompet.php)
   ================================================== */
.collapse-chevron {
    font-size: 18px;
    color: var(--forest);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
[aria-expanded="true"] .collapse-chevron {
    transform: rotate(180deg);
}

/* ==================================================
   Success popup check circle (see #withdrawalSuccessModal in dompet.php)
   ================================================== */
.success-check-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(8, 51, 31, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}
.success-check-circle ion-icon {
    font-size: 38px;
    color: var(--forest);
}

/* ==================================================
   Image crop overlay (optional client-side crop before upload)
   ================================================== */
.crop-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(4,26,16,0.65);
    z-index: 1060;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.crop-overlay.show { display: flex; }
.crop-modal {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    max-width: 620px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    max-height: 90vh;
    overflow-y: auto;
}
.crop-stage {
    position: relative;
    margin: 0 auto;
    max-width: 100%;
    background: #111;
    border-radius: 8px;
    overflow: hidden;
}
.crop-canvas { display: block; width: 100%; height: 100%; }
.crop-box {
    position: absolute;
    border: 2px dashed var(--gold);
    background: rgba(212,175,55,0.12);
    cursor: move;
    touch-action: none;
}
.crop-handle {
    position: absolute;
    right: -8px;
    bottom: -8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--gold);
    border: 2px solid #fff;
    cursor: nwse-resize;
    touch-action: none;
}


/* ==================================================
   Social media icon links (footer)
   ================================================== */
.social-icon-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212,175,55,0.15);
    color: var(--gold);
    font-size: 18px;
    transition: all 0.2s ease;
}
.social-icon-link:hover {
    background: var(--gold);
    color: var(--forest-dark);
}

/* ==================================================
   Installment list cards (mobile-friendly alternative to table)
   ================================================== */
.installment-card {
    background: #fff;
    border-radius: 14px;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(8,51,31,0.06);
    box-shadow: 0 3px 12px rgba(8,51,31,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    transition: all 0.2s ease;
}
/* Variant used when a row needs an action-button footer below the
   main content (e.g. admin list cards with approve/reject buttons). */
.installment-card.flex-column {
    flex-direction: column;
    align-items: stretch;
}
.installment-card:hover { border-color: var(--gold); box-shadow: 0 8px 22px rgba(8,51,31,0.1); }
.installment-card .inst-left { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 auto; }
.installment-card .inst-num {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--forest), var(--forest-dark));
    color: var(--gold);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}
.installment-card .inst-amount { font-weight: 700; color: var(--forest); word-break: break-word; }
.installment-card .inst-date { font-size: 0.78rem; color: #7a8a80; white-space: normal; }
.installment-card .badge { flex-shrink: 0; }

/* Dashboard components on very small phones (<400px): tighten spacing and
   font sizes so nothing overlaps or overflows the viewport. */
@media (max-width: 400px) {
    .dash-hero { padding: 1.25rem; }
    .dash-hero h2 { font-size: 1.4rem; }
    .wallet-card { padding: 1.25rem; }
    .wallet-card .wallet-balance { font-size: 1.5rem; }
    .wallet-card::after { width: 100px; height: 100px; top: -25px; right: -25px; }
    .quick-access { padding: 0.9rem; }
    .quick-access-item .qa-icon { width: 40px; height: 40px; font-size: 18px; }
    .quick-access-item span { font-size: 0.65rem; }
    .stat-pill { padding: 0.85rem 0.9rem; gap: 8px; }
    .stat-pill .stat-pill-icon { width: 38px; height: 38px; font-size: 18px; }
    .installment-card { padding: 0.85rem 0.9rem; }
}

/* ==================================================
   Section label chip (small uppercase heading like "MENU UTAMA")
   ================================================== */
.section-chip {
    display: inline-block;
    background: var(--forest-dark);
    color: var(--gold-light);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

/* ==================================================
   Premium panel (white rounded card, consistent shadow language)
   ================================================== */
.panel {
    background: #fff;
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 0 4px 18px rgba(8,51,31,0.06);
    border: 1px solid rgba(8,51,31,0.05);
}

/* ==================================================
   Contract document (Kontrak Pinjaman) -- centered letterhead
   layout with a faint site-logo watermark behind the text, mimicking
   a real loan agreement printout.
   ================================================== */
.kontrak-doc {
    position: relative;
    overflow: hidden;
}
.kontrak-doc::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--kontrak-watermark, none);
    background-repeat: no-repeat;
    background-position: center;
    background-size: min(65%, 340px);
    opacity: 0.06;
    pointer-events: none;
}
.kontrak-doc-content {
    position: relative;
    z-index: 1;
}
