/*=====================================================
    KOPOSTRA MOBILE V2 — ASTA THEME
    Design System (Dominan Abu-abu Gelap, Aksen Merah)
    Full Version (Mempertahankan semua selector asli)
======================================================*/

/*=====================================================
    01. ROOT & VARIABLES
======================================================*/
:root {
    /* BRAND ACCENT (Merah untuk aksen) */
    --primary: #DC2626;
    --primary-dark: #991B1B;
    --primary-light: #EF4444;
    --primary-soft: #FEF2F2;
    --primary-border: #FECACA;

    /* SURFACES (Dominan Abu-abu) */
    --surface-dark: #1F2937;
    --surface-dark-light: #374151;
    --surface-darker: #111827;
    
    /* BACKGROUND & CARDS */
    --bg: #FAFAFA;
    --card: #FFFFFF;
    --white: #FFFFFF;
    --gray-light: #F3F4F6;
    --gray-border: #E5E7EB;

    /* TEXT */
    --text: #1F2937;
    --text-light: #6B7280;
    --text-soft: #9CA3AF;

    /* BORDER RADIUS */
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 22px;
    --radius-xl: 28px;
    --radius-round: 50%;

    /* SHADOW */
    --shadow: 0 6px 18px rgba(31,41,55,.06);
    --shadow-lg: 0 10px 28px rgba(31,41,55,.10);
    --shadow-red: 0 10px 24px rgba(220, 38, 38, 0.15);

    /* ANIMATION */
    --transition: .25s ease;
}

/*=====================================================
    02. RESET & BASE
======================================================*/
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    font-family: 'Plus Jakarta Sans', "Segoe UI", sans-serif; 
    font-size: 14px;
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { border: none; outline: none; cursor: pointer; }

/*=====================================================
    03. MOBILE FRAME & LAYOUT (KRITIS)
======================================================*/
.mobile-container {
    position: relative;
    width: 100%;
    max-width: 430px;
    height: 100vh;
    margin: 20px auto;
    background: var(--bg);
    border-radius: var(--radius-xl);
    overflow: visible;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

.page-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 80px;
    -webkit-overflow-scrolling: touch;
}

/* =============================================================
   PAKSA BOTTOM NAV SAMA DENGAN TOPBAR (ABU-ABU GELAP)
   (Letakkan di paling bawah file mobile_v2.css)
   ============================================================= */

/* 1. Background Utama Bottom Nav */
.bottom-nav, 
footer.bottom-nav {
    background: linear-gradient(135deg, #1F2937 0%, #374151 100%) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3) !important;
    height: 78px !important;
}

/* 2. Icon Container (Tidak Aktif) - Transparan Gelap */
.bottom-nav-menu .nav-icon {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* 3. Warna Icon & Teks (Tidak Aktif) - Abu-abu Terang */
.bottom-nav-menu .nav-icon .material-icons {
    color: #9CA3AF !important;
}
.bottom-nav-menu .nav-text {
    color: #9CA3AF !important;
}

/* 4. State ACTIVE (Menu yang sedang dibuka) */
/* Container ikon jadi Merah Solid */
.bottom-nav-menu .nav-item.active .nav-icon {
    background: #DC2626 !important;
    border-color: #DC2626 !important;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4) !important;
}

/* Ikon jadi Putih */
.bottom-nav-menu .nav-item.active .nav-icon .material-icons {
    color: #FFFFFF !important;
}

/* Teks jadi Putih */
.bottom-nav-menu .nav-item.active .nav-text {
    color: #FFFFFF !important;
    font-weight: 700 !important;
}

/* ===== STATE: ACTIVE (Menu yang sedang dibuka) ===== */
.bottom-nav-menu .nav-item.active .nav-icon {
    background: var(--primary); /* ✅ Merah Solid (#DC2626) saat aktif */
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
}

.bottom-nav-menu .nav-item.active .nav-icon .material-icons {
    color: #FFFFFF; /* ✅ Ikon berubah putih saat aktif */
}

.bottom-nav-menu .nav-item.active .nav-text {
    color: var(--primary);
    font-weight: 700;
}

/* ===== STATE: HOVER / TAP (Efek interaktif) ===== */
.bottom-nav-menu .nav-item:active .nav-icon {
    transform: scale(0.92);
}

/* ===== RESPONSIVE untuk layar kecil ===== */
@media (max-width: 380px) {
    .bottom-nav { height: 72px; }
    .nav-icon {
        width: 34px;
        height: 34px;
    }
    .nav-icon .material-icons {
        font-size: 20px !important;
    }
    .nav-text {
        font-size: 9px;
    }
}

/*=====================================================
    04. TYPOGRAPHY & UTILITIES
======================================================*/
h1 { font-size: 28px; font-weight: 700; }
h2 { font-size: 24px; font-weight: 700; }
h3 { font-size: 20px; font-weight: 600; }
h4 { font-size: 18px; font-weight: 600; }
h5 { font-size: 16px; font-weight: 600; }
small { color: var(--text-light); }

.text-muted { color: var(--text-light) !important; }
.fw-semibold { font-weight: 600 !important; color: var(--text); }

/*=====================================================
    05. DASHBOARD HEADER V3
======================================================*/
.dashboard-header{
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--surface-dark);
    padding: 12px 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    border-radius: 22px;
}

.dashboard-top{
    display:flex;
    align-items:center;
    gap:12px;
}

.dashboard-search{
    flex:1;
    min-width:0;
}

.search-form{
    display:flex;
    align-items:center;
    width:100%;
    height:44px;
    background:#fff;
    border-radius: 22px;
    padding:0 14px;
}

.search-icon{
    font-size:20px;
    color:#999;
    margin-right:8px;
}

.search-input{
    flex:1;
    border:none;
    outline:none;
    background:none;
    font-size:14px;
    color:var(--text);
    min-width:0;
}

.search-input::placeholder{
    color:#999;
}

.header-right{
    display:flex;
    align-items:center;
    gap:8px;
    flex-shrink:0;
}

.header-btn{
    width:42px;
    height:42px;
    border-radius:50%;
    background:rgba(255,255,255,.05);
    color:var(--text-soft);
    display:flex;
    align-items:center;
    justify-content:center;
    transition: transform .2s ease, background .2s ease;
}

.header-btn:active{
    transform:scale(.95);
    background:rgba(255,255,255,.1);
}

.header-btn .material-icons{
    color:var(--text-soft);
    font-size:22px;
}

.header-btn:hover .material-icons {
    color: var(--primary-light);
}

/*=====================================================
    06. MEMBER CARD
======================================================*/
.member-card{
    margin:16px 18px;
    padding:18px;
    background:#fff;
    border-radius:18px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    box-shadow:var(--shadow);
    transition: transform .2s ease;
}

.member-card:active{
    transform:scale(.98);
}

.member-left small{
    display:block;
    color:var(--text-soft);
    font-size:12px;
    margin-bottom:4px;
}

.member-left h3{
    margin:0;
    font-size:18px;
    font-weight:700;
    color:var(--text);
}

.member-number{
    display:inline-block;
    margin-top:8px;
    padding:5px 12px;
    border-radius:20px;
    background:var(--primary-soft);
    color:var(--primary);
    font-size:12px;
    font-weight:600;
}

.member-avatar{
    width:68px;
    height:68px;
    border-radius:50%;
    overflow:hidden;
    flex-shrink:0;
    background:var(--gray-light);
    display:flex;
    align-items:center;
    justify-content:center;
    border:2px solid var(--primary-border);
    box-shadow: 0 6px 18px rgba(0,0,0,.05);
}

.avatar-icon{
    font-size:54px;
    color:var(--text-soft);
}

.member-status{
    display:inline-flex;
    align-items:center;
    gap:6px;
    margin-top:12px;
    padding:6px 12px;
    border-radius:999px;
    background:var(--primary-soft);
    color:var(--primary);
    font-size:12px;
    font-weight:600;
}

.status-dot{
    width:8px;
    height:8px;
    border-radius:50%;
    background:var(--primary);
}

/*=====================================================
    07. BANNER
======================================================*/
.banner-wrapper{
    margin:0 18px 18px;
}

.banner-section{
    margin:0 18px 24px;
}

.banner{
    border-radius:15px;
    overflow:hidden;
    background:transparent;
    box-shadow:none;
    border:none;
}

.banner-image{
    width:100%;
    display:block;
    border-radius:18px;
}

.banner-carousel img{
    width:100%;
    aspect-ratio:16/7;
    object-fit:cover;
    display:block;
}

.carousel-indicators{
    margin:12px 0 0;
    gap:6px;
}

.carousel-indicators button{
    width:8px !important;
    height:8px !important;
    border-radius:50%;
    background:#d1d5db !important;
    border:none !important;
    opacity:1;
}

.carousel-indicators .active{
    width:24px !important;
    border-radius:20px;
    background:var(--primary) !important;
}

/*=====================================================
    08. SUMMARY & HERO CARDS (DOMINAN ABU-ABU GELAP)
======================================================*/
.summary-section{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:12px;
    margin:0 18px 20px;
}

/* Hero Cards - Abu-abu Gelap dengan Glow Merah */
.profile-hero, .saving-card, .loan-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--surface-dark) 0%, var(--surface-dark-light) 100%);
    color: #fff;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 10px 24px rgba(31, 41, 55, 0.25);
    margin-bottom: 20px;
}

.profile-hero::before, .saving-card::before, .loan-hero::before {
    content: ''; position: absolute; top: -40px; right: -40px;
    width: 120px; height: 120px; border-radius: 50%;
    background: radial-gradient(circle, rgba(220,38,38,.35), transparent 70%);
    pointer-events: none;
}

.profile-hero > *, .saving-card > *, .loan-hero > * { position: relative; z-index: 1; }

.summary-icon{
    width:46px;
    height:46px;
    border-radius:15px;
    display:flex;
    justify-content:center;
    align-items:center;
    margin:0 auto 10px;
    background: rgba(255,255,255,.08);
    color: #FCA5A5;
}

.summary-icon .material-icons{
    font-size:24px;
}

.bg-success-soft, .bg-warning-soft, .bg-danger-soft {
    background: var(--primary-soft);
    color: var(--primary);
}

.summary-label{
    font-size:12px;
    color: #D1D5DB;
    margin-bottom:6px;
    text-align: center;
}

.summary-value{
    font-size:14px;
    font-weight:700;
    color:#fff;
    text-align: center;
}

.saving-total, .loan-total, .mks-hero-total {
    font-size: 28px; font-weight: 800; color: #FCA5A5; margin: 10px 0;
}
.saving-label, .loan-label { color: #D1D5DB; }
.saving-desc, .loan-desc { color: #9CA3AF; font-size: 12px; }

/*=====================================================
    09. QUICK MENU V3
======================================================*/
.quick-menu{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:18px;
    margin:0 18px 24px;
}

.quick-menu a{
    display:flex;
    flex-direction:column;
    align-items:center;
    text-decoration:none;
    transition:.2s ease;
}

.quick-menu a:active{
    transform:scale(.95);
}

.quick-icon{
    width:56px;
    height:56px;
    border-radius:14px;
    display:flex;
    justify-content:center;
    align-items:center;
    margin-bottom:10px;
    background: var(--primary-soft);
    color: var(--primary);
    transition: .2s;
}

.quick-icon svg,
.quick-icon img{
    width:26px;
    height:26px;
}

.quick-title{
    font-size:11px;
    font-weight:500;
    color:var(--text);
    text-align:center;
    line-height:1.3;
}

.quick-menu a:hover .quick-icon{
    background: var(--primary);
    color: #fff;
    transform:translateY(-2px);
}

/*=====================================================
    10. PINJAMAN AKTIF & SECTIONS
======================================================*/
.section-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin:24px 18px 16px;
}

.section-title{
    font-size:16px;
    font-weight:700;
    color:var(--text);
    margin:0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: ''; width: 4px; height: 16px; border-radius: 2px; background: var(--primary);
}

.section-link{
    font-size:13px;
    color:var(--primary);
    text-decoration:none;
    font-weight:600;
}

.announcement-card{
    background:#fff;
    border-radius:15px;
    padding:18px;
    margin:0 18px 14px;
    box-shadow:var(--shadow);
    border: 1px solid var(--gray-border);
}

.announcement-title{
    font-size:15px;
    font-weight:700;
    margin-bottom:8px;
}

.announcement-date{
    color:var(--text-light);
    font-size:13px;
    margin-bottom:10px;
}

.section-header-loan {
    padding: 0 18px;
    margin-bottom: 0px;
}

.section-title-loan {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin:24px 18px 16px;
}

.section-title-riwayat {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin:30px 24px 16px;
}

/*=====================================================
    LOAN CARD - DOMINAN ABU-ABU
======================================================*/
.loan-card, .summary-card.mb-3 {
    position: relative;
    overflow: hidden;
    background: #fff;
    border-radius: 16px;
    padding: 20px;   
    margin: 0 18px 20px; 
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-border);
}

.loan-bg{
    position:absolute;
    top:-60px;
    right:-60px;
    width:180px;
    height:180px;
    border-radius:50%;
    background:radial-gradient(
        circle,
        rgba(220,38,38,.08) 0%,
        rgba(220,38,38,0) 75%
    );
    pointer-events:none;
}

.loan-title{
    display:flex;
    align-items:center;
    gap:5px;
    font-size:15px;
    font-weight:600;
    color:var(--text);
}

.loan-title i{
    color:var(--primary);
    font-size:20px;
}

.loan-status{
    background:var(--primary-soft);
    color:var(--primary);
    padding:6px 14px;
    border-radius:999px;
    font-size:12px;
    font-weight:700;
}

.loan-amount{
    position:relative;
    z-index:2;
    font-size:26px;
    font-weight:800;
    color:var(--text);
    line-height:1;
    margin-bottom:20px;
}

.loan-footer{
    position:relative;
    z-index:2;
    display:flex;
    justify-content:space-between;
    align-items:flex-end;
}

.loan-date label{
    display:block;
    font-size:12px;
    color:var(--text-light);
    margin-bottom:4px;
}

.loan-date strong{
    font-size:14px;
    color:var(--text);
}

.loan-detail{
    display:flex;
    align-items:center;
    gap:4px;
    color:var(--primary);
    text-decoration:none;
    font-weight:600;
    font-size: 13px;
    transition:.2s;
}

.loan-detail:hover{
    gap:8px;
    color:var(--primary-dark);
}

/*=====================================================
    11. CARDS & HISTORY
======================================================*/
.info-card { margin: 18px; padding: 20px; background: #FFF; border-radius: 22px; box-shadow: var(--shadow); border: 1px solid var(--gray-border); }
.info-card.warning { background: var(--primary-soft); border: 1px solid var(--primary-border); color: #991B1B; }
.info-card h4 { margin-bottom: 14px; color: var(--text); font-size: 17px; }
.info-card ul { margin: 0; padding-left: 18px; }
.info-card li { margin-bottom: 10px; line-height: 20px; color: var(--text); }
.info-card p { margin: 0; line-height: 20px; }

.history-card { background: #FFF; border-radius: 16px; box-shadow: var(--shadow); padding: 16px; margin: 12px 18px; border: 1px solid var(--gray-border); }
.history-title { font-size: 14px; font-weight: 600; }
.history-date { font-size: 12px; color: var(--text-light); margin-top: 3px; }
.history-value { margin-top: 8px; font-size: 18px; font-weight: 700; color: var(--text); }

.card-mobile { background: #FFF; border-radius: 22px; box-shadow: var(--shadow); padding: 20px; margin: 18px; border: 1px solid var(--gray-border); }
.card-kopostra { background: #fff; border-radius: 20px; border: none; box-shadow: var(--shadow); }
.card-mobile-title { font-size: 20px; font-weight: 600; margin-bottom: 14px; color: var(--text); }
.card-mobile-value { font-size: 28px; font-weight: 700; color: var(--text); }

/*=====================================================
    12. BUTTONS & BADGES
======================================================*/
.btn-kopostra,
.btn-kopostra-outline {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 320px !important;
    height: 48px !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    transition: .25s;
    margin: 10px auto !important;
    cursor: pointer;
    box-sizing: border-box;
}

/* BUTTON PRIMARY - DOMINAN ABU-ABU GELAP */
.btn-kopostra {
    background: linear-gradient(135deg, var(--surface-dark-light) 0%, var(--surface-dark) 100%) !important;
    color: #FFFFFF;
    border: none !important;
    box-shadow: 0 4px 12px rgba(31, 41, 55, 0.2);
}

.btn-kopostra:hover, 
.btn-kopostra:focus { 
    background: linear-gradient(135deg, #4B5563 0%, var(--surface-dark-light) 100%) !important;
    box-shadow: 0 6px 16px rgba(31, 41, 55, 0.3);
}

.btn-kopostra:active {
    transform: scale(0.98);
    box-shadow: none;
}

/* BUTTON OUTLINE - MERAH */
.btn-kopostra-outline { 
    display: block; 
    width: 100%; 
    padding: 12px; 
    border-radius: 12px; 
    background: transparent;
    border: 1.5px solid var(--primary);
    color: var(--primary);
    text-align: center; 
    font-weight: 600; 
    text-decoration: none; 
    margin-top: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-kopostra-outline:hover {
    background: var(--primary-soft);
}

.btn-kopostra-outline:active {
    background: var(--primary-soft);
    transform: scale(0.98);
}

.btn-kopostra.w-100 { 
    width: 100% !important; 
}

/* BUTTON DANGER - SOFT RED */
.btn.btn-danger { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    width: 100%; 
    height: 44px; 
    background: var(--primary-soft); 
    color: var(--primary); 
    border: 1px solid var(--primary-border); 
    border-radius: 12px; 
    font-size: 14px; 
    font-weight: 600; 
    text-decoration: none; 
    transition: .25s; 
    margin-top: 10px; 
    margin-bottom: 10px; 
}

.btn.btn-danger:hover {
    background: var(--primary);
    color: #fff;
}

/* BOOTSTRAP PRIMARY OVERRIDE */
.btn-primary { 
    --bs-btn-color: #fff; 
    --bs-btn-bg: var(--primary); 
    --bs-btn-border-color: var(--primary); 
    --bs-btn-hover-color: #fff; 
    --bs-btn-hover-bg: var(--primary-dark); 
    --bs-btn-hover-border-color: var(--primary-dark); 
}

/* BADGES */
.badge-success, 
.badge-danger { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    padding: 6px 12px; 
    border-radius: 18px; 
    font-size: 11px; 
    font-weight: 600; 
}

.badge-success { 
    background: var(--primary-soft); 
    color: var(--primary); 
}

.badge-danger { 
    background: var(--primary-soft); 
    color: #991B1B; 
}

.badge-status { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    padding: 2px 10px; 
    font-size: 11px; 
    font-weight: 600; 
    line-height: 1.2; 
    border-radius: 6px; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    text-align: center; 
}

/*=====================================================
    13. FORMS & INPUTS
======================================================*/
.form-group { margin-bottom: 18px; }
.form-group label, .form-label { 
    display: block; 
    margin-bottom: 8px; 
    font-size: 13px; 
    font-weight: 600; 
    color: var(--text); 
    letter-spacing: .2px; 
}

.form-control, .form-select { 
    width: 100%; 
    height: 46px; 
    padding: 0 14px; 
    border: 1.5px solid var(--gray-border); 
    border-radius: 10px; 
    background: #FFF; 
    color: var(--text); 
    font-size: 14px; 
    transition: .2s; 
    box-shadow: none; 
}

textarea.form-control { min-height: 90px; padding: 12px 14px; resize: none; }

.form-control:focus, .form-select:focus { 
    border-color: var(--primary) !important; 
    box-shadow: 0 0 0 3px rgba(220,38,38,.10) !important; 
    outline: none; 
}

.form-control.mb-2 { height: 46px; }

select, select.form-select, select.form-control { 
    height: 45px !important; 
    min-height: 45px !important; 
    padding: 8px 12px !important; 
    font-size: 14px !important; 
    line-height: 1.5 !important; 
}
select option { padding: 10px !important; font-size: 14px !important; }

.password-box { position: relative; }
.toggle-password { 
    position: absolute; 
    right: 12px; 
    top: 50%; 
    transform: translateY(-50%); 
    cursor: pointer !important; 
    z-index: 10 !important; 
    pointer-events: auto !important; 
    user-select: none; 
    color: var(--text-light);
}
.toggle-password:hover { color: var(--primary); }

/*=====================================================
    14. LIST MENU & PROFILE
======================================================*/
.list-menu { margin: 18px; background: #FFF; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--gray-border); }
.list-menu a { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--gray-border); }
.list-menu a:last-child { border-bottom: none; }
.list-menu-left { display: flex; align-items: center; gap: 12px; }
.list-menu .material-icons { color: var(--primary); }

.profile-photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid var(--primary-border); background: #FFF; }
.profile-default-icon { font-size: 96px; color: var(--text-soft); background: var(--gray-light); border-radius: 50%; width: 96px; height: 96px; display: flex; align-items: center; justify-content: center; margin: 0 auto; }
.profile-title { margin-left: 10px; font-size: 18px; color: var(--text); }
.profile-item { padding: 14px 0; border-bottom: 1px solid var(--gray-border); }
.profile-item:last-child { border-bottom: none; }
.profile-item small { display: block; color: var(--text-light); font-size: 12px; margin-bottom: 4px; margin-left: 10px; }
.profile-item strong { display: block; color: var(--text); font-size: 15px; font-weight: 600; margin-left: 10px; }

.setting-item { display: flex; justify-content: space-between; align-items: center; text-decoration: none; color: inherit; padding: 16px; transition: background-color 0.2s; }
.setting-item:hover { background-color: var(--primary-soft); }
.setting-text { display: flex; flex-direction: column; }
.setting-text strong { font-size: 14px; color: var(--text); }
.setting-text small { font-size: 12px; color: var(--text-light); margin-top: 2px; }

/*=====================================================
    15. RADIO, UPLOAD & PROGRESS
======================================================*/
.radio-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--gray-light); border: 2px solid var(--gray-border); border-radius: 12px; cursor: pointer; transition: all 0.3s ease; -webkit-tap-highlight-color: transparent; }
.radio-item:hover { border-color: var(--primary); background: var(--primary-soft); }
.radio-item:has(input[type="radio"]:checked) { border-color: var(--primary); background: var(--primary-soft); }
.radio-item input[type="radio"]:checked ~ span { color: var(--primary); font-weight: 600; }
.radio-item span { font-size: 14px; color: var(--text); font-weight: 500; flex: 1; }
.radio-item input[type="radio"] { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; border: 2px solid #CCC; border-radius: 50%; cursor: pointer; position: relative; transition: all 0.2s ease; flex-shrink: 0; }
.radio-item input[type="radio"]:checked { border-color: var(--primary); border-width: 6px; }
.radio-item.mt-3 { margin-top: 12px; }

.upload-box { display: block; cursor: pointer; margin-bottom: 16px; }
.upload-box input { display: none; }
.upload-content { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 170px; padding: 18px; border: 2px dashed var(--primary-border); border-radius: 18px; background: var(--primary-soft); transition: .25s; }
.upload-content:hover { border-color: var(--primary); background: #FEE2E2; }
.upload-content.success { border: 2px solid var(--primary); background: var(--primary-soft); }
.upload-icon { width: 34px; height: 34px; margin-bottom: 10px; }
.upload-title { color: var(--primary); font-weight: 700; margin-bottom: 4px; text-align: center; }
.upload-content small { color: var(--text-light); }
.upload-preview-img { width: 185px; height: 168px; object-fit: cover; border-radius: 16px; border: 1px solid var(--primary-border); box-shadow: var(--shadow); cursor: pointer; transition: .25s; }
.upload-preview-img:hover { transform: scale(1.03); }
.preview-empty { height: 168px; border: 2px dashed var(--primary-border); border-radius: 16px; display: flex; align-items: center; justify-content: center; flex-direction: column; color: var(--text-soft); font-size: 13px; background: var(--gray-light); }
.upload-status { margin-top: 12px; font-size: 13px; color: var(--text-light); transition: .25s; }
.upload-status.success { color: var(--primary); font-weight: 600; }

.progress-bar { 
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%) !important; 
    border-radius: 10px; 
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3); 
}
.progress { background-color: var(--gray-light); border-radius: 10px; overflow: hidden; height: 8px; }

/*=====================================================
    16. TABLE, TIMELINE & INFO BOX
======================================================*/
.table-mobile { width: 100%; border-collapse: collapse; }
.table-mobile tr { border-bottom: 1px solid var(--gray-border); }
.table-mobile th { width: 35%; padding: 12px 0; text-align: left; color: var(--text-light); font-size: 13px; font-weight: 500; }
.table-mobile td { padding: 12px 0; color: var(--text); }

.timeline { position: relative; margin: 20px 0; }
.timeline-item { position: relative; padding-left: 42px; margin-bottom: 24px; }
.timeline-item::before { content: ""; position: absolute; left: 12px; top: 0; bottom: -24px; width: 2px; background: var(--gray-border); }
.timeline-item:last-child::before { display: none; }
.timeline-dot { position: absolute; left: 4px; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--primary); }
.timeline-title { font-weight: 600; }
.timeline-date { font-size: 12px; color: var(--text-light); }

.info-success { background: var(--primary-soft); border-left: 5px solid var(--primary); border-radius: 12px; padding: 15px; margin-top: 15px; margin-bottom: 20px; }
.info-title { color: var(--primary); font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.info-text { color: #555; line-height: 1.6; font-size: 13px; }

.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 18px; }
.info-item { background: var(--gray-light); border-radius: 14px; padding: 14px; }
.info-item small { display: block; color: var(--text-light); font-size: 12px; margin-bottom: 4px; }
.info-item strong { font-size: 15px; color: var(--text); }

/*=====================================================
    17. LOGIN, SUCCESS & EMPTY STATE
======================================================*/
.login-header { 
    background: linear-gradient(135deg, var(--surface-dark), var(--surface-dark-light)); 
    color: #FFF; 
    text-align: center; 
    padding: 45px 20px 70px; 
    position: relative;
    overflow: hidden;
}
.login-header::before {
    content: ''; position: absolute; top: -50px; right: -50px; width: 150px; height: 150px; border-radius: 50%;
    background: radial-gradient(circle, rgba(220,38,38,.4), transparent 70%);
}

.logo-circle { 
    width: 90px;
    height: 90px;
    margin: auto;
    border-radius: 50%;
    background-color: rgba(255,255,255,.1);
    border: 2px solid rgba(255,255,255,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-card { margin: -50px 18px 18px; padding: 24px; background: #FFF; border-radius: 22px; box-shadow: var(--shadow); margin-top: 20px; border: 1px solid var(--gray-border); }
.login-card h3 { margin-bottom: 18px; }
.alert-login { margin-top: 16px; padding: 12px; border-radius: 10px; background: var(--primary-soft); color: #991B1B; border: 1px solid var(--primary-border); }
.login-footer { margin-top: 24px; text-align: center; color: var(--text-light); font-size: 13px; }

.success-page { text-align: center; padding: 40px 20px; }
.success-icon { margin-bottom: 20px; }
.success-icon .material-icons { font-size: 80px; color: var(--primary); }
.success-page h2 { font-size: 24px; margin-bottom: 10px; }
.success-page p { color: var(--text-light); margin-bottom: 25px; }

.empty-state { text-align: center; padding: 50px 20px; }
.empty-state .material-icons { font-size: 64px; color: var(--text-soft); }
.empty-state h4 { margin-top: 12px; }
.empty-state p { color: var(--text-light); }

.page-header { padding: 28px 20px 18px; }
.page-header h3 { margin: 0; font-size: 26px; font-weight: 700; color: var(--primary); }
.page-header small { display: block; margin-top: 6px; font-size: 13px; color: var(--text-light); }

/*=====================================================
    18. ANIMATION & MODAL
======================================================*/
.fade-up { animation: fadeUp .35s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.image-preview-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 9999; justify-content: center; align-items: center; }
.image-preview-modal img { max-width: 92%; max-height: 90%; border-radius: 18px; background: #FFF; }
.close-preview { position: absolute; top: 18px; right: 22px; font-size: 34px; color: #FFF; cursor: pointer; }

/*=====================================================
    BOTTOM NAVIGATION — BACKGROUND ABU-ABU PREMIUM
======================================================*/
.bottom-nav {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 100%;
    max-width: 430px;
    height: 78px;
    
    /* ✅ PAKSA WARNA ABU-ABU DENGAN !IMPORTANT */
    background: #F9FAFB !important; 
    
    border-top: 1px solid var(--gray-border);
    z-index: 999;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
}

.bottom-nav-menu {
    display: flex;
    width: 100%;
    height: 100%;
    padding: 0 12px;
    align-items: center;
}

.bottom-nav-menu .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    gap: 6px;
    color: #9CA3AF;
    transition: all 0.2s ease;
    position: relative;
}

/* Icon Container (State Tidak Aktif) */
.nav-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #FFFFFF; /* ✅ Putih bersih agar kontras dengan background abu-abu */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04); /* Shadow abu-abu sangat tipis */
}

/* Material Icons di dalam nav-icon */
.nav-icon .material-icons {
    font-size: 22px !important;
    width: 22px !important;
    height: 22px !important;
    color: #9CA3AF; /* Abu-abu untuk state tidak aktif */
    transition: all 0.25s ease;
}

/* Teks Menu */
.nav-text {
    font-size: 10px;
    font-weight: 600;
    color: #9CA3AF; /* Abu-abu untuk state tidak aktif */
    transition: all 0.25s ease;
}

/* ===== STATE: ACTIVE (Menu yang sedang dibuka) ===== */
.bottom-nav-menu .nav-item.active .nav-icon {
    background: var(--primary); /* ✅ Merah Solid (#DC2626) saat aktif */
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.30); /* Shadow merah halus */
    transform: translateY(-2px); /* Efek mengambang sedikit */
}

.bottom-nav-menu .nav-item.active .nav-icon .material-icons {
    color: #FFFFFF; /* ✅ Ikon berubah putih saat aktif */
}

.bottom-nav-menu .nav-item.active .nav-text {
    color: var(--primary); /* Teks merah saat aktif */
    font-weight: 700;
}

/* ===== STATE: HOVER / TAP (Efek interaktif) ===== */
.bottom-nav-menu .nav-item:active .nav-icon {
    transform: scale(0.92);
}

/* ===== RESPONSIVE untuk layar kecil ===== */
@media (max-width: 380px) {
    .bottom-nav { height: 72px; }
    .nav-icon {
        width: 38px;
        height: 38px;
    }
    .nav-icon .material-icons {
        font-size: 20px !important;
    }
    .nav-text {
        font-size: 9px;
    }
}

/*=====================================================
    20. RESPONSIVE
======================================================*/
@media (max-width: 430px) {
    .mobile-container { margin: 0; max-width: 100%; border-radius: 0; }
    .bottom-nav { border-radius: 0; }
}

@media (min-width: 431px) {
    body { padding: 20px; }
    .mobile-container { height: 90vh; max-height: 900px; }
}

/*=====================================================
    GLOBAL DASHBOARD TOP BAR (DOMINAN ABU-ABU)
======================================================*/
.dashboard-top-wrapper{
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(135deg, var(--surface-dark) 0%, var(--surface-dark-light) 100%);
    padding:16px 18px 22px;
    box-shadow:0 8px 24px rgba(0,0,0,.15);
    margin:12px;
    border-radius:15px;
    border-bottom: 1px solid rgba(220, 38, 38, 0.2);
}

.dashboard-top-wrapper::before {
    content: ''; position: absolute; top: -40px; right: -40px; width: 120px; height: 120px; border-radius: 50%;
    background: radial-gradient(circle, rgba(220,38,38,.30), transparent 70%); pointer-events: none;
}

.dashboard-top{
    display:flex;
    align-items:center;
    gap:12px;
}

.dashboard-search{
    flex:1;
}

.search-form{
    display:flex;
    align-items:center;
    background:#fff;
    height:48px;
    border-radius:18px;
    padding:0 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.search-icon{
    color:var(--text-soft);
    font-size:22px;
    margin-right:10px;
}

.search-input{
    flex:1;
    border:none;
    outline:none;
    background:transparent;
    font-size:15px;
}

.header-right{
    display:flex;
    align-items:center;
    gap:10px;
    flex-shrink:0;
}

.header-btn{
    width:46px;
    height:46px;
    border-radius:50%;
    display:flex;
    justify-content:center;
    align-items:center;
    background:rgba(255,255,255,.05);
    color:var(--text-soft);
    backdrop-filter:blur(10px);
    transition:.2s;
}

.header-btn:hover{
    background:rgba(220,38,38,.15);
    color:var(--primary-light);
    transform:translateY(-2px);
}

.notification-badge{
    position:absolute;
    top:-4px;
    right:-4px;
    min-width:18px;
    height:18px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:10px;
    font-weight:700;
    background:#FFFFFF;
    color:var(--primary);
    border:2px solid var(--surface-dark);
}

/*=====================================================
    SEARCH
======================================================*/
.search-page{
    margin:18px;
}

.search-form-page{
    display:flex;
    align-items:center;
    background:#fff;
    border-radius:18px;
    padding:14px 18px;
    box-shadow:var(--shadow);
    border: 1px solid var(--gray-border);
}

.search-input-page{
    flex:1;
    border:none;
    outline:none;
    margin-left:10px;
    background:transparent;
    font-size:15px;
}

.search-info{
    margin:20px 18px 12px;
    color:var(--text-light);
    font-size:14px;
}

.search-result{
    margin:0 18px 28px;
    display:flex;
    flex-direction:column;
    gap:12px;
}

.search-card{
    display:flex;
    align-items:center;
    gap:14px;
    background:#fff;
    padding:16px 18px;
    border-radius:18px;
    box-shadow:var(--shadow);
    border: 1px solid var(--gray-border);
    color:inherit;
}

.search-card:hover{
    text-decoration:none;
}

.search-card-icon{
    width:46px;
    height:46px;
    border-radius:14px;
    background:var(--primary-soft);
    color:var(--primary);
    display:flex;
    align-items:center;
    justify-content:center;
}

.search-card-body{
    flex:1;
}

.search-title{
    font-size:15px;
    font-weight:600;
    color:var(--text);
}

.search-arrow{
    color:var(--text-soft);
}

.empty-search{
    margin:60px 18px;
    text-align:center;
    color:var(--text-soft);
}

.empty-search .material-icons{
    font-size:64px;
    margin-bottom:10px;
}

/*==========================================
    SIMPANAN
==========================================*/
.page-header{
    margin:18px;
    margin-top: -12px;
}

.back-button{
    width:42px;
    height:42px;
    border-radius:12px;
    background:var(--primary-soft);
    display:flex;
    align-items:center;
    justify-content:center;
    color:var(--primary);
    box-shadow:var(--shadow);
    text-decoration:none;
    border: 1px solid var(--primary-border);
}

.page-header h4{
    margin:0;
    font-size:22px;
    font-weight:700;
}

.page-header p{
    margin:0;
    color:var(--text-light);
}

.saving-summary{
    margin:18px;
}

.modern-card{
    border-radius:22px;
    border:none;
    box-shadow:var(--shadow);
    background: #fff;
    border: 1px solid var(--gray-border);
}

.card-mobile-title{
    display:flex;
    align-items:center;
    font-size:18px;
    font-weight:700;
}

.btn-modern{
    border-radius:14px;
    padding:14px;
    font-size:15px;
    font-weight:600;
}

/*==========================================
    HISTORY CARD
==========================================*/
.modern-history-card{
    border: 1px solid var(--gray-border);
    border-radius:20px;
    box-shadow:var(--shadow);
    padding:18px;
    margin-bottom:16px;
    background: #fff;
}

.history-top{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:16px;
}

.history-left{
    display:flex;
    align-items:center;
    gap:14px;
}

.history-icon{
    width:52px;
    height:52px;
    border-radius:16px;
    background:var(--primary-soft);
    color:var(--primary);
    display:flex;
    justify-content:center;
    align-items:center;
}

.history-icon .material-icons{
    font-size:28px;
}

.history-right{
    text-align:right;
}

.history-divider{
    height:1px;
    background:var(--gray-border);
    margin:16px 0;
}

.upload-proof-card{
    background:var(--primary-soft);
    border-radius:16px;
    padding:16px;
    margin-top:16px;
    border: 1px solid var(--primary-border);
}

.history-value{
    font-size:18px;
    font-weight:700;
    color:var(--text);
}

.badge{
    border-radius:30px;
    padding:7px 12px;
    font-size:12px;
    font-weight:600;
}

.status-badge{
    display:inline-block;
    margin-top:8px;
    padding:6px 12px;
    border-radius:20px;
    font-size:12px;
    font-weight:600;
    white-space:nowrap;
}

.status-draft{
    background:var(--gray-light);
    color:var(--surface-dark-light);
}

.status-warning{
    background:var(--primary-soft);
    color:#92400E;
}

.status-info{
    background:var(--primary-soft);
    color:#1D4ED8;
}

.status-primary{
    background:var(--primary-soft);
    color:#1E40AF;
}

.status-success{
    background:var(--primary-soft);
    color:#166534;
}

.status-danger{
    background:var(--primary-soft);
    color:#B91C1C;
}

.pagination{
    gap:8px;
}

.page-link{
    border-radius:12px;
    border:none;
    color:var(--text);
    background: var(--gray-light);
    box-shadow:none;
}

.page-item.active .page-link{
    background:var(--primary);
    color: #fff;
}

/*==========================================
    UPLOAD BUKTI TRANSFER
==========================================*/
input[type="file"]{
    height:34px;
    padding:6px 12px;
    font-size:14px;
    border-radius:12px;
    border: 1px solid var(--gray-border);
}

/*==========================================
    HERO PINJAMAN
==========================================*/
.loan-hero{
    margin:18px;
}

.loan-hero-header{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
}

.loan-label{
    font-size:14px;
    opacity:.9;
}

.loan-number{
    font-size:16px;
    margin-top:4px;
}

.loan-status{
    display:inline-block;
    background:rgba(255,255,255,.18);
    padding:8px 16px;
    border-radius:30px;
    font-weight:600;
}

.loan-icon{
    font-size:32px;
    opacity:.25;
}

.loan-info-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:14px;
}

.loan-info{
    background:#fff;
    border-radius:18px;
    padding:16px;
    box-shadow:var(--shadow);
    border: 1px solid var(--gray-border);
}

.loan-info small{
    display:block;
    color:var(--text-light);
    margin-bottom:6px;
}

.loan-info strong{
    color:var(--text);
}

.loan-bottom{
    display:flex;
    justify-content:space-between;
    align-items:flex-end;
    margin-top:12px;
}

/* ================================
   1. CARD UTAMA (FOTO & INFO DASAR)
================================ */
.summary-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-border);
    position: relative;
    overflow: hidden;
}

/* Hapus gradient hijau di atas, biarkan bersih atau subtle */
.summary-card.text-center::before { display: none; } 

/* ================================
   2. WRAPPER FOTO (Abu-abu dengan border Merah)
================================ */
.profile-photo-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: var(--gray-light);
    border: 3px solid var(--primary);
    box-shadow: var(--shadow-red);
    margin-top: 8px;
    padding: 4px;
}

/* ================================
   3. FOTO PROFIL (di dalam wrapper)
================================ */
.profile-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffffff;
    background-color: #e9ecef;
    transition: transform 0.3s ease;
}

.profile-photo:hover {
    transform: scale(1.03);
}

/* ================================
   4. ICON DEFAULT (jika tidak ada foto)
================================ */
.profile-default-icon {
    font-size: 60px;
    color: var(--text-soft);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 3px solid var(--gray-border);
}

/* ================================
   5. NAMA ANGGOTA
================================ */
.summary-card h4 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin: 16px 0 6px 0 !important;
    letter-spacing: -0.3px;
    word-break: break-word;
}

/* ================================
   6. BADGE NOMOR ANGGOTA
================================ */
.member-badge {
    display: inline-block;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    border: 1px solid var(--primary-border);
    margin-top: 12px;
}

/* ================================
   7. RESPONSIVE (Layar kecil)
================================ */
@media (max-width: 360px) {
    .summary-card {
        padding: 20px 16px;
    }
    .profile-photo-wrapper {
        width: 110px;
        height: 110px;
    }
    .profile-default-icon {
        font-size: 60px;
    }
    .summary-card h4 {
        font-size: 18px;
    }
}

/* ================================
   JUDUL SECTION
================================ */
.summary-card .profile-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--text) !important;
    margin-bottom: 16px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px dashed var(--gray-border) !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    letter-spacing: -0.2px;
    position: relative;
}

.summary-card .profile-title::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 16px;
    background: var(--primary);
    border-radius: 2px;
}

/* ================================
   PROFILE ITEM - TETAP HORIZONTAL
================================ */
.summary-card .profile-item {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px dashed var(--gray-border);
    width: 100%;
    box-sizing: border-box;
}

.summary-card .profile-item:last-child {
    border-bottom: none !important;
    padding-bottom: 4px !important;
}

.summary-card .profile-item:first-of-type {
    padding-top: 4px !important;
}

/* ================================
   LABEL (KIRI)
================================ */
.summary-card .profile-item > small {
    font-size: 12px !important;
    color: var(--text-light) !important;
    font-weight: 500 !important;
    flex-shrink: 0 !important;
    min-width: 110px;
    max-width: 40%;
    line-height: 1.5 !important;
    text-align: left !important;
    display: block !important;
    margin: 0 !important;
    word-break: break-word;
}

/* ================================
   VALUE / DATA (KANAN)
================================ */
.summary-card .profile-item > strong {
    font-size: 13px !important;
    color: var(--text) !important;
    font-weight: 600 !important;
    text-align: right !important;
    flex: 1 !important;
    word-break: break-word;
    line-height: 1.5 !important;
    display: block !important;
    margin: 0 !important;
    min-width: 0;
}

/* ================================
   HOVER EFFECT
================================ */
.summary-card .profile-item:hover {
    background-color: var(--primary-soft);
    margin: 0 -20px;
    padding-left: 20px;
    padding-right: 20px;
    border-radius: 8px;
}

/* ================================
   RESPONSIVE - TETAP HORIZONTAL
================================ */
@media (max-width: 480px) {
    .summary-card .profile-item {
        gap: 8px;
        padding: 12px 0;
    }
    .summary-card .profile-item > small {
        min-width: 90px;
        font-size: 11px !important;
    }
    .summary-card .profile-item > strong {
        font-size: 12px !important;
    }
}

@media (max-width: 360px) {
    .summary-card .profile-item > small {
        min-width: 80px;
        font-size: 11px !important;
    }
    .summary-card .profile-item > strong {
        font-size: 12px !important;
    }
}

/* ================================
   EMPTY STATE (Belum Ada Data)
================================ */
.empty-state {
    background: #ffffff;
    border-radius: 16px;
    padding: 48px 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-border);
    text-align: center;
    margin-bottom: 16px;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    font-size: 40px !important;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-soft);
    color: var(--primary) !important;
    border: 2px solid var(--primary-border);
    margin-bottom: 16px;
}

.empty-state-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.empty-state-description {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.5;
    margin: 0;
}

.empty-state-action {
    margin-top: 24px;
}

.empty-state-action .btn-kopostra {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    background: var(--surface-dark-light);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: .25s;
    cursor: pointer;
}

.empty-state-action .btn-kopostra:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

@media (max-width: 480px) {
    .empty-state {
        padding: 36px 20px;
    }
    .empty-state-icon {
        width: 70px;
        height: 70px;
        font-size: 35px !important;
    }
    .empty-state-title {
        font-size: 15px;
    }
    .empty-state-description {
        font-size: 13px;
    }
}

/* =====================================
   HEADER MASING-MASING HALAMAN CONTENT
======================================== */
.page-header-custom {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 15px;
    padding: 12px 20px 12px 70px;
    min-height: 70px;
    margin: 16px;
    position: relative;
    box-shadow: var(--shadow);
    box-sizing: border-box;
    width: calc(100% - 32px);
    border: 1px solid var(--gray-border);
}

/* === LINGKARAN BACK BUTTON === */
.back-circle {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: none;
    z-index: 2;
    border: 1px solid var(--primary-border);
}

.back-circle:active {
    transform: translateY(-50%) scale(.94);
}

.back-circle .material-icons {
    color: var(--primary);
    font-size: 22px;
}

/* === TEKS JUDUL === */
.header-title {
    flex: 1;
    min-width: 0;
}

.header-title h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Alert khusus untuk data yang terkunci/readonly */
.alert-locked {
    background-color: var(--primary-soft);
    border: 1px solid var(--primary-border);
    color: #991B1B;
    border-radius: 8px;
    display: inline-block;
    text-align: center;
    line-height: 1.4;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.05);
    margin: 0 16px 16px !important;
    padding: 12px 16px !important;
    font-size: 13px;
}

/* Wrapper untuk menengahkan alert */
.alert-wrapper-center {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Pesan pada surat pengajuan Pinjaman */
.alert.alert-success {
    margin-left: 16px;
    margin-right: 16px;
    padding-left: 16px;
    padding-right: 16px;
    background: var(--primary-soft);
    color: #166534;
    border: 1px solid #BBF7D0;
}

/* hilangkan margin bawaan browser */
body {
    margin: 0;
}

/* ======================================================
   FIX: PAKSA SEMUA SISA WARNA HIJAU JADI MERAH & ABU
   ====================================================== */

/* 1. Override Bootstrap Success Colors (Hijau -> Merah) */
.text-success { color: var(--primary) !important; }
.bg-success { background-color: var(--primary-soft) !important; color: var(--primary) !important; }
.btn-success { 
    background-color: var(--primary) !important; 
    border-color: var(--primary) !important; 
    color: #fff !important; 
}

/* 2. Perbaiki Alert Success yang masih ada kode hijau (#166534) */
.alert-success, .alert.alert-success {
    background-color: var(--primary-soft) !important;
    color: #991B1B !important; /* Merah gelap */
    border: 1px solid var(--primary-border) !important;
}
.alert-success .material-icons, 
.alert-success svg {
    color: var(--primary) !important;
}

/* 3. Perbaiki Status Badge Success */
.status-success, .badge.bg-success {
    background-color: var(--primary-soft) !important;
    color: var(--primary) !important;
    border: 1px solid var(--primary-border);
}

/* 4. Paksa semua Icon (SVG & Material) mewarisi warna parent */
.material-icons, 
svg {
    fill: currentColor !important;
    stroke: currentColor !important;
}

/* Jika ada icon di dalam quick menu atau history yang bandel */
.quick-icon .material-icons,
.history-icon .material-icons,
.search-card-icon .material-icons,
.list-menu .material-icons {
    color: var(--primary) !important;
}

/* 5. Override warna hijau pada border atau background spesifik */
.border-success { border-color: var(--primary) !important; }
.list-group-item-success { 
    color: var(--primary) !important; 
    background-color: var(--primary-soft) !important; 
}

/* Logo Topbar - TANPA BACKGROUND */
.mkt-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: visible;
}

.mkt-logo img {
    height: 100%;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    display: block;
}
