/* ===================================================================
   PORTAN UI FINAL – MOBILE APP 

    AUTHOR  : CODE-IN 
    DESIGN  : CODE-IN
    VERSION : 1.0
    EMAIL   : code.in@gmail.com
    LICENSE : FREE FOR PERSONAL AND COMMERCIAL USE
   =================================================================== */

/* ================= ROOT VARIABLE ================= */
:root {
    --primary: #782691;
    --accent: #d3bbe9;
    --primary-dark: #360b4e;
    --bg-color: #dfc6eb;
    --text-main: #1f1c2b;
    --text-muted: #a0a0a0;
    --header-height: 70px;
    --nav-height: 75px;
    --bg: #dfc6eb;
    --white: #fff;
    --gray: #777;
    --radius: 20px;
    --shadow: 0 10px 25px rgba(0,0,0,.1);
    --light-gray: #f1f2f6;
    --header-height: 56px;
    --bottom-nav-height: 64px;
    --gutter: 8px;
    --secondary: #6d4480;
    --card-bg: rgba(241, 230, 248, 0.75);
    --text: #282630;
    --success: #107936;
    --warning: #f59e0b;
    --danger: #b61313;
    --bg-app: #dfc6eb;
}
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    overflow: hidden; /* Mencegah seluruh body scroll */
}

/* ================= GLOBAL STYLES ================= */
.container {
    width: 100%;
    height: calc(100% - var(--header-height) - var(--bottom-nav-height));
    padding: var(--gutter);
    overflow-y: auto; /* Hanya konten di dalam container yang bisa scroll */
}
.container-register{
    width: 100%;
    height: 100%;
    overflow-y: auto; /* Hanya konten di dalam container yang bisa scroll */
}
h1, h2, h3, h4, h5, h6, p {
    margin: 0;
    padding: 0;
    color: var(--text-main);
}
a {
    text-decoration: none;
    color: inherit;
}
button {
    border: none;
    outline: none;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
}
/* ================= HEADER STYLES ================= */
.header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--white);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.header h1 {
    font-size: 1.5rem;
    color: var(--primary-dark);
}
/* ================= BOTTOM NAVIGATION STYLES ================= */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: #fff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-radius: 25px 25px 0 0;
    box-shadow: 0 -10px 20px rgba(0,0,0,0.05);
    padding-bottom: env(safe-area-inset-bottom); /* Support iPhone Notch */
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: 0.3s;
}

.nav-link.active {
    color: var(--primary);
}

.nav-link i { font-size: 1.4rem; margin-bottom: 4px; }
.nav-link span { font-size: 0.7rem; font-weight: 500; }

.nav-center {
    background: var(--primary-dark);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.6rem;
    margin-top: -35px;
}
.scrollable-content {
    flex: 1; /* Mengambil sisa ruang antara header dan nav */
    overflow-y: auto; /* Aktifkan scroll hanya di sini */
    padding: 10px;
    padding-bottom: calc(var(--nav-height) + 20px); /* Ruang agar konten tidak tertutup nav */
    -webkit-overflow-scrolling: touch; /* Scroll halus di iOS */
}
/* ================= CARD COMPONENT STYLES ================= */
.card {
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    margin-bottom: 16px;
}
.card h3 {
    margin-bottom: 8px;
    color: var(--primary-dark);
}
.card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}
/* ================= BUTTON STYLES ================= */
.button {
    background-color: var(--primary);
    color: var(--white);
    padding: 12px 20px;
    border-radius: var(--radius);
    font-size: 1rem;
    transition: background-color 0.3s ease;
}
.button:hover {
    background-color: var(--primary-dark);
}
/* ================= FORM STYLES ================= */
/* Input Styling */
.form-group {
    position: relative; /* Menjadi titik acuan untuk ikon */
    width: 100%;
    margin-bottom: 10px;
}
input{
    font-family: 'Poppins', sans-serif;
    color: var(--text-main);
}
.input-field { position: relative; margin-bottom: 20px; }

.input-field i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 1.1rem;
}

.input-field input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid var(--light-gray);
    border-radius: 12px;
    outline: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--light-gray);
}

.input-field input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 10px rgba(180, 92, 231, 0.1);
    outline: none;
}

/* ================= MODAL STYLES ================= */
.modal { display: none; /* Tersembunyi secara default */ position: fixed; z-index: 10001; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); backdrop-filter: blur(5px); animation: fadeIn 0.3s ease; }

/* Kotak Modal */
.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    animation: slideDown 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Header, Body, Footer */
.modal-header { padding: 20px 25px; background: #f8f9fa; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { color: #6c5ce7; margin: 0; }
.modal-body { padding: 25px; overflow-y: auto; color: #444; line-height: 1.6; }
.modal-footer { padding: 15px 25px; border-top: 1px solid #eee; text-align: right; }
.close-modal { font-size: 28px; font-weight: bold; color: #aaa; cursor: pointer; }
.close-modal:hover { color: #ff4757; }

/* Animasi */
@keyframes slideDown { from { transform: translateY(-50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
/* ================= SCROLLBAR STYLES ================= */
.container::-webkit-scrollbar {
    width: 8px;
}
.container::-webkit-scrollbar-thumb {
    background-color: var(--light-gray);
    border-radius: 4px;
}
.container::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary);
}
/* ================= RESPONSIVE STYLES ================= */
@media (min-width: 600px) {
    .container {
        padding: 24px;
    }
    .card {
        padding: 24px;
    }
    .button {
        padding: 14px 24px;
        font-size: 1.1rem;
    }
    .input-field {
        padding: 14px;
        font-size: 1.1rem;
    }
}
/*=================== SPLASH SCREEN =========================*/
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Gradasi dominan ungu dan putih */
    background: linear-gradient(180deg, #ffffff 0%, #df9bfe 50%, #5a2d56 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.8s ease-in-out;
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: translateY(20px);
    animation: slideUpFade 1s forwards ease-out;
}

.splash-logo {
    font-size: 5em;
    font-weight: 900;
    /* Efek text gradient ungu */
    background: linear-gradient(to bottom, #2d3436, #322d5a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    letter-spacing: -2px;
}

.splash-tagline {
    font-size: 1.1em;
    color: #ffffff;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-top: 5px;
    opacity: 0;
    animation: fadeIn 0.8s forwards 1.2s;
}

/* Loading Bar Modern */
.loading-bar {
    width: 250px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.loading-progress {
    width: 0%;
    height: 100%;
    background-color: var(--white);
    box-shadow: 0 0 10px rgba(255,255,255,0.8);
    animation: fillProgress 3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Animasi */
@keyframes slideUpFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fillProgress { to { width: 100%; } }

#splash-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Hilangkan class hidden untuk transisi mulus ke konten utama */
.hidden { display: none !important; }

/*=================== AUTH =========================*/
.login-wrapper {
    width: 100%;
    max-width: 420px; /* Menjaga agar tetap responsif & proporsional */
    animation: fadeIn 0.8s ease-out;
    padding: 20px;
    margin: 0 auto;   /* Tambahan cadangan untuk centering */
    top: 50%;

}

.login-box {
    background: var(--white, #ffffff);
    padding: 40px 30px;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 100%; /* Pastikan mengisi wrapper */
}

.brand {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 10px;
    letter-spacing: -1px;
}
.login-header{
    align-items: center;
    text-align: center;
    justify-content: center;
}
.login-header p {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 30px;
}
/* Notifikasi */
.notif { padding: 12px; border-radius: 10px; margin-bottom: 20px; font-size: 0.85rem; font-weight: 600; }
.notif.error { background: #ffeef0; color: #ff4757; border: 1px solid #ff4757; }
.notif.success { background: #e3fcef; color: #2ed573; border: 1px solid #2ed573; }


/* Button Login */
.btn-primary {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 20px rgba(108, 92, 231, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(108, 92, 231, 0.4);
}

.btn-primary:active { transform: translateY(0); }

/* Loading Spinner */
.spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Gaya khusus untuk icon show/hide password */
#togglePassword {
    position: absolute; /* Melayang di atas input */
    top: 50%;           /* Di tengah secara vertikal */
    transform: translateY(-50%); /* Penyesuaian presisi ke tengah */
    right: 15px;
    z-index: 10;        /* Pastikan berada di atas input */
    transition: color 0.3s;
}

#togglePassword:hover { color: var(--primary) !important; }

#togglePassworda {
    position: absolute; /* Melayang di atas input */
    top: 50%;           /* Di tengah secara vertikal */
    transform: translateY(-50%); /* Penyesuaian presisi ke tengah */
    right: 15px;
    z-index: 10;        /* Pastikan berada di atas input */
    transition: color 0.3s;
}

#togglePassworda:hover { color: var(--primary) !important; }

/* Beri sedikit padding kanan pada input agar teks tidak menabrak icon mata */
.input-field input[type="password"],
.input-field input[type="text"] { padding-right: 45px; }

.otp-inputs { display: flex; justify-content: space-between; gap: 10px; margin: 30px 0; }

.otp-inputs input {
    width: 60px;
    height: 70px;
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    border: 2px solid #f1f2f6;
    border-radius: 12px;
    background: #cebaf5;
    color: #170b27;
    transition: all 0.3s ease;
}

/* Warna saat input fokus */
.otp-inputs input:focus {
    border-color: #6c5ce7;
    background: #fff;
    box-shadow: 0 0 10px rgba(108, 92, 231, 0.1);
    outline: none;
}

/* Responsif untuk HP layar kecil */
@media (max-width: 380px) {
    .otp-inputs input { width: 50px; height: 60px; font-size: 1.5rem; }
}

@keyframes spin { to { transform: rotate(360deg); } }

.login-footer { margin-top: 25px; font-size: 0.85rem; color: var(--gray); }
.login-footer a { color: var(--primary); text-decoration: none; font-weight: 600; }

/* Responsivitas untuk Layar Kecil (HP) */
@media (max-width: 480px) {
    .login-box { padding: 30px 20px; }
    .brand { font-size: 2rem; }
}

/*=================== ALL NEED & LOADER ========================*/

#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #ffffff94 0%, #e29bfe88 50%, #792e8b98 100%);
    backdrop-filter: blur(10px); /* Efek blur kaca modern */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000; /* Pastikan di atas segalanya */
    transition: opacity 0.6s ease, visibility 0.6s;
}

.loader-content { text-align: center; }

.logo-loader {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 2px;
    margin-bottom: 20px;
    animation: pulse 1.5s infinite;
}

.spinner-container { display: flex; justify-content: center; margin-bottom: 15px; }

.custom-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(108, 92, 231, 0.1);
    border-left-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-text {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: #636e72;
    font-weight: 400;
}

/* Animasi Denyut pada Tulisan Logo */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* Class untuk menghilangkan loader via JS */
.loader-hidden { opacity: 0; visibility: hidden; }

.terms-wrapper { margin: 20px 0; text-align: left; }

/* Container utama */
.checkbox-container {
    display: block;
    position: relative;
    padding-left: 35px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--gray);
    user-select: none;
    line-height: 1.5;
}

/* Sembunyikan checkbox asli browser */
.checkbox-container input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }

/* Buat kotak centang kustom */
.checkmark {
    position: absolute;
    top: 2px;
    left: 0;
    height: 22px;
    width: 22px;
    background-color: #f1f2f6;
    border: 2px solid #dfe6e9;
    border-radius: 6px;
    transition: all 0.3s ease;
}

/* Efek saat kursor di atas kotak */
.checkbox-container:hover input ~ .checkmark { border-color: var(--primary); background-color: #efedff; }

/* Warna kotak saat dicentang */
.checkbox-container input:checked ~ .checkmark { background-color: var(--primary); border-color: var(--primary); }

/* Buat simbol centang (L terbalik) */
.checkmark:after { content: ""; position: absolute; display: none; }

/* Tampilkan simbol saat dicentang */
.checkbox-container input:checked ~ .checkmark:after { display: block; }

/* Style simbol centangnya */
.checkbox-container .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.terms-link { color: var(--primary); text-decoration: none; font-weight: 600; }
.terms-link:hover { text-decoration: underline; }

/* ==================== MAIN CONTENT STYLES ===================== */
.main-header {
    height: var(--header-height);
    background: #fff;
    padding: 0 20px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-inner {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--primary);
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    background-color: #d3bbe9;
}

.balance-card {
    background: linear-gradient(135deg, #af5ce7 0%, #49185e 100%);
    border-radius: 24px;
    padding: 25px;
    color: #fff;
    margin-bottom: 25px;
}
.balance-amount {
    margin: 10px 0;
}
.balance-label div {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.balance-label {
    display: flex;
    align-items: center;
    gap: 5px;
}

#toggleBalance {
    position: relative;
    z-index: 10001; /* Pastikan berada paling atas */
    cursor: pointer;
    font-size: 1.1rem;
    display: inline-block;
    vertical-align: middle;
}

.amount {
    font-size: 1.2rem;
    font-weight: bold;
}

.balance-actions {
    display: flex;
    justify-content: space-between;
}

.balance-actions button {
    background: var(--accent);
    color: rgb(22, 3, 27);
    border: none;
    width: 30%;
    padding: 10px;
    border-radius: 14px;
    font-size: .8rem;
}

.balance-actions span {
    display: block;
    margin-top: 4px;
}

/* TRACKING */
.tracking-card {
    position: relative;
}

.tracking-input {
    display: flex;
    margin-top: 12px;
}

.tracking-input input {
    flex: 1;
    padding: 12px;
    border-radius: 30px;
    border: none;
    background: #f1f1f1;
}

.tracking-input button {
    border: none;
    background: var(--primary);
    color: #fff;
    padding: 0 18px;
    border-radius: 50%;
    margin-left: -45px;
}

.tracking-icon {
    position: absolute;
    right: 20px;
    bottom: 20px;
    font-size: 2.5rem;
    opacity: .3;
}

/* FEATURE ROW */
.feature-row {
    display: flex;
    gap: 12px;
}

.feature {
    flex: 1;
    text-align: center;
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

/* SERVICE GRID */
.service-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 10px;
}

.service-item {
    text-align: center;
    font-size: .8rem;
}

.service-item span {
    display: block;
    margin-top: 6px;
}
/* Grid Menu Responsive */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.menu-item {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.icon-box {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    transition: transform 0.2s;
    
    
}

.menu-item:active .icon-box { transform: scale(0.9); }

.purple { background: #af5ce7; box-shadow: 0 8px 15px rgba(231, 92, 231, 0.2); }
.blue { background: #00a8ff; }
.orange { background: #fbc531; }
.green { background: #4cd137; }

.menu-item span { font-size: 0.75rem; color: var(--text-main); font-weight: 600; }

/* ==================== SLIDER STYLES ===================== */

.slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}
.slider-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
}
.slider-item {
    min-width: 100%;
    box-sizing: border-box;
}
.slider-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius);
}
.slide-card {
    height: 150px;
    border-radius: 20px;
    padding: 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.slide-content {
    z-index: 2;
    max-width: 65%;
}
.slide-content h3 {
    margin: 10px 0 5px 0;
    font-size: 1.2rem;
}

.slide-content p {
    font-size: 0.8rem;
    opacity: 0.9;
    margin: 0;
}

.slide-image {
    font-size: 4rem;
    opacity: 0.3;
    position: absolute;
    right: -10px;
    bottom: -10px;
    transform: rotate(-15deg);
}

/* Varian Warna Promo */
.promo-purple { background: linear-gradient(135deg, #6c5ce7, #a29bfe); }
.promo-blue { background: linear-gradient(135deg, #0984e3, #74b9ff); }
.promo-orange { background: linear-gradient(135deg, #e17055, #fab1a0); }

/* Slider Dots */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.dot {
    width: 8px;
    height: 8px;
    background: #dfe6e9;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.dot.active {
    width: 20px;
    background: #6c5ce7;
    border-radius: 10px;
}

/* ================= BADGE NOTIF ================= */

.badge-notif{
  position:absolute;
  top:-4px;
  right:-6px;
  background:var(--accent);
  color:var(--primary-dark);
  font-size:10px;
  width:16px;
  height:16px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* ================= FLOATING BUTTON ================= */
.fab{
  position:fixed;
  right:16px;
  bottom:90px;
  width:56px;
  height:56px;
  background:var(--accent);
  color:white;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 10px 30px rgba(0,0,0,0.3);
  z-index:1000;
}

.badge-main {
    display: inline-block;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 50px; /* Membuat bentuk kapsul */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Warna untuk Status: Selesai (Success) */
.badge-main-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #34d399;
}

/* Warna untuk Status: Proses (Warning) */
.badge-main-warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fbbf24;
}

/* Warna untuk Status: Gagal (Error) */
.badge-main-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #f87171;
}

/* Tambahan: Efek hover tipis agar interaktif */
.badge-main:hover {
    opacity: 0.8;
    cursor: default;
}

/* ================= TABLES & DATA TABLES ================= */
.table-container {
    width: 100%;
    overflow-x: auto; /* Memungkinkan scroll horizontal jika benar-benar terpaksa */
    -webkit-overflow-scrolling: touch;
}

/* Paksa tabel untuk mengikuti lebar container */
table.dataTable {
    width: 100% !important;
    margin: 0 auto;
}

/* Sembunyikan kolom yang kurang penting di layar kecil secara manual jika perlu */
@media screen and (max-width: 600px) {
    .d-mobile-none {
        display: none;
    }
}

table.dataTable thead th {
    background-color: #f1f5f9;
    color: #475569;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 12px 15px !important;
    border: none !important;
}

table.dataTable tbody tr {
    background-color: #ffffff;
    transition: transform 0.2s, box-shadow 0.2s;
}

table.dataTable tbody tr:hover {
    background-color: #f8fafc !important;
    transform: scale(1.005);
}

table.dataTable tbody td {
    padding: 15px !important;
    vertical-align: middle;
    border-top: 1px solid #f1f5f9 !important;
    border-bottom: 1px solid #f1f5f9 !important;
    color: #1e293b;
}

/* Mempercantik Input Search & Pagination */
.dataTables_filter input {
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
}


/* Merapikan elemen kontrol DataTables */
.dataTables_wrapper .dataTables_length, 
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 20px;
}

.dataTables_wrapper .dataTables_info, 
.dataTables_wrapper .dataTables_paginate {
    margin-top: 20px;
    padding-top: 10px;
}

/* Membuat tombol paginasi lebih bagus */
.page-link {
    border: none !important;
    margin: 0 3px;
    border-radius: 6px !important;
    color: #4b5563 !important;
}

.page-item.active .page-link {
    background-color: #4f46e5 !important; /* Warna ungu indigo */
    color: white !important;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.4);
}

/* Gaya untuk search box agar lebih lebar di mobile */
@media (max-width: 767px) {
    .dataTables_filter {
        text-align: left !important;
    }
    .dataTables_filter input {
        width: 100% !important;
        margin-left: 0 !important;
        margin-top: 5px;
    }
}

/*===================== ORDER PAGE =========================*/
/* PRODUCT */
.product {
    display:flex;
    gap:20px;
}

.product img {
    width:140px;
    border-radius:16px;
}

.product h2 {
    color:var(--primary);
}

.price {
    font-size:22px;
    font-weight:bold;
    margin:8px 0;
}

/* FORM */
.form-group {
    margin-bottom:18px;
}

label {
    font-size:14px;
    color: #433949ff;
}

input, select {
    width:100%;
    padding:14px;
    margin-top:6px;
    border-radius:14px;
    border:1px solid #ddd;
    outline:none;
    transition:.3s;
}

input:focus, select:focus {
    border-color:var(--primary);
    box-shadow:0 0 0 3px rgba(123,92,255,.15);
}

/* SUMMARY */
.summary-item {
    display:flex;
    justify-content:space-between;
    margin-bottom:12px;
    font-size:15px;
}

.summary-item strong {
    color:var(--primary);
}

.total {
    border-top:1px dashed #ddd;
    padding-top:15px;
    font-size:20px;
    font-weight:bold;
    color:var(--primary);
}
/* ANIMATION */
@keyframes fadeUp {
    from { opacity:0; transform:translateY(25px); }
    to { opacity:1; transform:translateY(0); }
}

.header-bayar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 18px;
        animation: fadeDown .7s ease;
}

.header-bayar h1 {
        color: var(--primary);
        font-size: 26px;
}

.badge-bayar {
        padding: 8px 14px;
        border-radius: 50px;
        font-size: 14px;
        font-weight: 600;
        color: white;
        animation: pulsebayar 2s infinite;
}

.badge-bayar.pending { background: var(--pending); }
.badge-bayar.success { background: var(--success); }
.badge-bayar.failed  { background: var(--danger); }

    /* CARD */
.card-bayar {
        background: var(--card-bg);
        backdrop-filter: blur(14px);
        border-radius: 18px;
        padding: 25px;
        box-shadow: 0 20px 50px rgba(123,92,255,.18);
        animation: fadeUp .8s ease;
        margin-bottom: 25px;
}

    /* ORDER INFO */
.order-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 8px;
}

.info-bayar h4 {
        font-size: 14px;
        color: #666;
}

.info-bayar p {
        font-weight: 600;
        margin-top: 0px;
}

    /* TOTAL */
.total-bayar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 25px;
        padding-top: 15px;
        border-top: 1px dashed #ddd;
}

.total-bayar span {
        font-size: 14px;
        color: #666;
}

.total-bayar strong {
        font-size: 22px;
        color: var(--primary);
}

    /* BUTTON */
.actions-bayar {
        display: flex;
        gap: 15px;
        margin-top: 25px;
}
.btn-bayar {
        flex: 1;
        padding: 14px;
        border-radius: 14px;
        border: none;
        cursor: pointer;
        font-size: 15px;
        font-weight: 600;
        transition: .3s;
}

.btn-bayar.primary {
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        color: white;
}

.btn-bayar.secondary {
        background: #f1efff;
        color: var(--primary);
}

.btn-bayar:hover {
        transform: translateY(-3px);
}

    /* ANIMATIONS */
@keyframes fadeUp {
        from { opacity: 0; transform: translateY(25px); }
        to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeDown {
        from { opacity: 0; transform: translateY(-25px); }
        to { opacity: 1; transform: translateY(0); }
}

@keyframes pulsebayar {
        0% { box-shadow: 0 0 0 0 rgba(255,255,255,.6); }
        70% { box-shadow: 0 0 0 12px rgba(255,255,255,0); }
        100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

    /* TIMELINE */
.timeline-bayar {
        margin-top: 15px;
}

.step-bayar {
        display: flex;
        align-items: center;
        margin-bottom: 12px;
}

.dot-bayar {
        width: 14px;
        height: 14px;
        background: var(--primary);
        border-radius: 50%;
        margin-right: 12px;
}

.step-bayar p {
        font-size: 14px;
}

    /* RESPONSIVE */
@media(max-width:600px) {
        .header-bayar {
            flex-direction: column;
            align-items: flex-start;
            gap: 10px;
        }
}

.profile-header {
    background: white;
    border-radius: 24px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    margin-bottom: 25px;
}

.avatar-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 15px auto;
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #f1f5f9;
}

.edit-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    background: #862886;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border: 3px solid white;
}

.user-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 5px;
}

.user-status {
    font-size: 12px;
    color: #10b981;
    font-weight: 300;
}

/* Statistik Row */
.stats-row {
    display: flex;
    justify-content: space-around;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-weight: 700;
    color: #1e293b;
    font-size: 1.1rem;
}

.stat-label {
    font-size: 0.75rem;
    color: #64748b;
}

/* Menu List */
.menu-section {
    margin-bottom: 25px;
}

.menu-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 10px;
    padding-left: 5px;
}

.menu-list {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.menu-profile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    text-decoration: none;
    color: #334155;
    transition: background 0.2s;
    border-bottom: 1px solid #f8fafc;
}

.menu-profile:last-child { border-bottom: none; }
.menu-profile:hover { background: #f8fafc; }

.menu-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

/* Warna Soft Icon Menu */
.bg-soft-primary { background: #e0e7ff; color: #cb46e5; }
.bg-soft-warning { background: #fef3c7; color: #d97706; }
.bg-soft-success { background: #d1fae5; color: #059669; }
.bg-soft-info { background: #e0f2fe; color: #0284c7; }
.bg-soft-error { background: #fee2e2; color: #dc2626; }

.arrow {
    font-size: 0.8rem;
    color: #cbd5e1;
}

.logout span { color: #dc2626; font-weight: 600; }

.wallet-container {
    width: 100%;
    margin: 20px auto;
    padding: 15px;
    font-family: 'Inter', sans-serif;
}

/* Card Saldo dengan Animasi Gradien */
.wallet-card {
    background: linear-gradient(-45deg, rgb(241, 170, 235), rgb(179, 82, 174), rgb(149, 20, 153), rgb(155, 94, 161));
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    border-radius: 24px;
    padding: 25px;
    color: white;
    box-shadow: 0 15px 30px rgba(229, 70, 221, 0.3);
    position: relative;
    overflow: hidden;
    width: 100%;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.wallet-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.brand-wallet {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.balance-info .label {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-bottom: 5px;
    color: #e1d4e7;
}

.balance {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -1px;
    color: #dfdae9;
}

.currency { font-size: 1.2rem; font-weight: 400; margin-right: 5px; }

/* Grid Tombol Aksi */
.action-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 30px;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.action-item:hover { transform: translateY(-5px); }

.icon-box {
    width: 55px;
    height: 55px;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 8px 15px rgba(0,0,0,0.05);
}

.bg-success { background: #d1fae5; color: #059669; }
.bg-warning { background: #ffedd5; color: #d97706; }
.bg-primary { background: #e0e7ff; color: #2b0b5fff; }
.bg-info { background: #e0f2fe; color: #0284c7; }

.action-item span {
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
}

.wallet-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 15px;
    color: #dabce7;
}

.circles { display: flex; gap: -10px; }
.circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    margin-left: -10px;
}

.slide-info{
    margin: 5px;
}
.slide-title{
    font-weight: 600;
    font-size: 16px;
    color: var(--primary);
}
.slide-date{
    font-size: 12px;
    color: var(--text-muted);
}
.slide-amount{
    font-weight: 700;
    font-size: 18px;
    color: var(--primary-dark);
}
/* Paksa SweetAlert muncul di atas modal */
.swal2-container {
    z-index: 3000 !important;
}
.edit-profile-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.section-title {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 1.1rem;
    border-left: 4px solid var(--primary);
    padding-left: 10px;
}

/* Upload Box Style */
.upload-box {
    border: 2px dashed #cbd5e1;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.upload-box:hover {
    border-color: var(--primary);
    background: #f8fafc;
}

.upload-box i {
    font-size: 3rem;
    color: #94a3b8;
    margin-bottom: 10px;
}

#previewKTP {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: 10px;
}

.hidden { display: none; }

@media (max-width: 768px) {
    .profile-grid { grid-template-columns: 1fr; }
}
/* =================================================================== 
   END OF PORTAN UI FINAL – MOBILE APP 
   =================================================================== */

