/* Reset */
* {
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background: #f8fafc;
}

/* Mencegah gambar melewati layar */
img {
    display: block;
    max-width: 100%;
}

/* Glass effect */
.glass-panel {
    background: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

/* Gradient text */
.text-gradient {
    background: linear-gradient(135deg, #4f46e5, #2563eb);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Tab */
.tab-content {
    display: none;
    width: 100%;
    min-width: 0;
    animation: fadeIn 0.25s ease-in-out;
}

.tab-content.active {
    display: block;
}

/* Form */
input,
select,
textarea,
button {
    max-width: 100%;
}

input,
select,
textarea {
    min-width: 0;
}

/* Toast */
#toast-container {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 9999;
    width: min(360px, calc(100% - 40px));
}

/* Loader */
.loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e5e7eb;
    border-left-color: #4f46e5;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

/* Animations */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tablet */
@media (max-width: 1023px) {
    .desktop-sticky {
        position: static !important;
        top: auto !important;
    }

    .mobile-navigation {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .mobile-navigation li {
        min-width: 0;
    }

    .mobile-navigation button {
        justify-content: center;
        padding-left: 8px;
        padding-right: 8px;
        white-space: nowrap;
    }
}

/* Mobile */
@media (max-width: 640px) {
    body {
        font-size: 14px;
    }

    /* Ukuran card utama */
    .tab-content > .bg-white {
        padding: 16px !important;
        border-radius: 16px !important;
    }

    /* Padding card bagian dalam */
    .tab-content .p-6 {
        padding: 16px !important;
    }

    .tab-content .px-5 {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .tab-content .py-4 {
        padding-top: 14px !important;
        padding-bottom: 14px !important;
    }

    /* Judul halaman */
    .tab-content h2 {
        font-size: 20px !important;
        line-height: 28px;
    }

    /* Judul card */
    .tab-content h3 {
        overflow-wrap: anywhere;
    }

    /* Tombol logout memenuhi layar */
    .mobile-full-button {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    /* Card toko */
    #daftar-toko {
        gap: 16px !important;
    }

    #daftar-toko > div {
        width: 100%;
        min-width: 0;
    }

    #daftar-toko .h-44 {
        height: 190px !important;
    }

    /* Status toko tidak keluar card */
    #daftar-toko .flex.justify-between {
        gap: 10px;
        flex-wrap: wrap;
    }

    /* Form */
    input,
    select,
    textarea {
        font-size: 16px !important;
    }

    /* Toast mobile */
    #toast-container {
        top: 76px;
        right: 12px;
        left: 12px;
        width: auto;
    }

    /* Menu navigasi mobile */
    .mobile-navigation {
        gap: 6px;
    }

    .mobile-navigation button {
        min-height: 52px;
        padding: 8px 4px;
        gap: 5px;
        font-size: 12px;
        flex-direction: column;
    }

    .mobile-navigation button i {
        width: auto !important;
        font-size: 16px !important;
    }
}