/* * Berkas: aset/css/tema-global.css
 * Deskripsi: Tema Utama Promosi.net untuk Admin, Pengguna, dan Mitra 
 */

/* Mengatur Variabel Utama Pico CSS */
:root {
    /* Warna Utama Aplikasi (Biru Solid) */
    --pico-primary: #0056b3;
    --pico-primary-background: #0056b3;
    --pico-primary-hover: #004494;
    --pico-primary-hover-background: #004494;
    --pico-primary-focus: rgba(0, 86, 179, 0.25);
    
    /* Tipografi dan Warna Teks Dasar (Tanpa Gradasi) */
    --pico-color: #212529;
    --pico-font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    /* Merampingkan Ukuran Secara Global untuk Mobile */
    --pico-font-size: 14px;
    --pico-spacing: 0.75rem;
    --pico-form-element-spacing-vertical: 0.5rem;
    --pico-form-element-spacing-horizontal: 0.75rem;
    --pico-border-radius: 0.375rem;
    
    /* Ketegasan Antarmuka (Batas dan Bayangan Gelap untuk Visibilitas) */
    --pico-border-color: #6c757d;
    --pico-card-border-color: #495057;
    --pico-card-box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    
    /* Latar Belakang Global */
    --pico-background-color: #f8f9fa;
    --pico-card-background-color: #ffffff;
}

/* Penyesuaian Khusus Promosi.net */
body {
    margin: 0;
    /* Memberikan ruang 80px di bawah agar teks/watermark tidak tertutup menu navigasi bawah */
    padding: 0 0 80px 0; 
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Mengatur wadah utama agar tidak terlalu lebar di layar besar */
main.container {
    max-width: 800px;
}

/* Tombol Promosi.net - Solid dan Tegas */
button, 
[type="submit"], 
[type="button"] {
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 2px solid var(--pico-primary-hover);
}

/* Efek Sorot pada Formulir (Input) */
input:focus,
select:focus,
textarea:focus {
    border-color: var(--pico-primary);
    box-shadow: 0 0 0 3px var(--pico-primary-focus);
}

/* Kotak Kartu (Card) dengan garis tepi gelap */
article {
    border: 1px solid var(--pico-card-border-color);
    box-shadow: var(--pico-card-box-shadow);
}

/* --------------------------------------------------------
   PERBAIKAN JENDELA DIALOG (MODAL) UNTUK SMARTPHONE
   -------------------------------------------------------- */
dialog {
    display: none; 
    position: fixed; 
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%; 
    height: 100%;
    margin: 0;
    padding: var(--pico-spacing);
    box-sizing: border-box;
    z-index: 9999; 
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.6); 
}

dialog[open] {
    display: flex; 
}

dialog article {
    width: 100%;
    max-width: 400px; 
    margin: auto; 
    padding: calc(var(--pico-spacing) * 1.5); 
    box-sizing: border-box;
    overflow-y: auto; 
    max-height: 90vh; 
}

/* --------------------------------------------------------
   DESAIN KOMPONEN NOTIFIKASI (ALERT) GLOBAL
   -------------------------------------------------------- */
.notifikasi {
    padding: var(--pico-spacing);
    margin-bottom: var(--pico-spacing);
    border-radius: var(--pico-border-radius);
    border-left: 4px solid;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.notifikasi-sukses { background-color: #d1e7dd; color: #0f5132; border-color: #198754; }
.notifikasi-bahaya { background-color: #f8d7da; color: #842029; border-color: #dc3545; }
.notifikasi-peringatan { background-color: #fff3cd; color: #664d03; border-color: #ffc107; }
.notifikasi-info { background-color: #cff4fc; color: #055160; border-color: #0dcaf0; }

/* Modifikasi tabel agar responsif di ponsel */
.tabel-responsif {
    overflow-x: auto;
    display: block;
    width: 100%;
}

/* --------------------------------------------------------
   NAVIGASI BAWAH (BOTTOM NAVIGATION) UNTUK SMARTPHONE
   -------------------------------------------------------- */
.nav-bawah {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--pico-card-background-color);
    border-top: 1px solid var(--pico-card-border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.5rem 0;
    z-index: 1000;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
}

.nav-item {
    text-decoration: none;
    color: var(--pico-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.nav-item:active {
    transform: scale(0.9);
}

.nav-ikon {
    font-size: 1.4rem;
    margin-bottom: 0.1rem;
}

/* Animasi masuk dasbor */
@keyframes slideIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.animasi-dasbor {
    animation: slideIn 0.6s ease-out forwards;
}

.header-dasbor {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--pico-primary);
}

.kartu-menu {
    transition: transform 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.kartu-menu:hover {
    transform: scale(1.03);
}

.kartu-menu article {
    text-align: center;
    padding: 1.5rem;
    height: 100%;
}

.tanda-air {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--pico-color);
    opacity: 0.3;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Desain Khusus Tombol Keluar Merah */
.tombol-keluar {
    background-color: transparent;
    border: 2px solid #dc3545;
    color: #dc3545;
    width: 100%;
    margin-top: 1rem;
}
.tombol-keluar:hover, .tombol-keluar:active {
    background-color: #dc3545;
    color: #ffffff;
    border-color: #dc3545;
}




/* Desain khusus Kartu Promo untuk Smartphone (Lebih Elegan & Jelas) */
.kartu-promo { 
    margin-bottom: 2rem; 
    border-radius: 12px; 
    overflow: hidden; 
    border: 1px solid #e0e0e0; /* Memberi batas tegas dengan latar */
    border-top: 4px solid var(--pico-primary); /* Aksen warna pembeda di bagian atas */
    box-shadow: 0 6px 15px rgba(0,0,0,0.05); /* Bayangan lembut */
    background: var(--pico-card-background-color); 
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.kartu-promo:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.isi-promo { padding: 1.2rem; }
.judul-promo { margin-bottom: 0.25rem; font-size: 1.1rem; }
.harga-promo { color: var(--pico-primary); font-weight: 800; font-size: 1.2rem; margin-bottom: 0.5rem; }

/* Desain Slideshow Sederhana */
.slider-wadah { position: relative; width: 100%; height: 250px; background-color: #f8f9fa; overflow: hidden; border-bottom: 1px solid #eee; }
.slide-item { display: none; width: 100%; height: 100%; }

/* --- 1. MULAI KOLEKSI GAYA TRANSISI SLIDESHOW --- */

/* GAYA 1: Fade (Memudar Halus) - AKTIF SAAT INI */
.slide-item.aktif { display: block; animation: fadeMasuk 0.6s ease-in-out; }
@keyframes fadeMasuk { from { opacity: 0.3; } to { opacity: 1; } }

/* GAYA 2: Geser Lembut dari Kanan (Slide In) */
/* .slide-item.aktif { display: block; animation: geserKanan 0.5s ease-out; } */
/* @keyframes geserKanan { from { transform: translateX(30px); opacity: 0; } to { transform: translateX(0); opacity: 1; } } */

/* GAYA 3: Zoom In Mewah (Membesar) */
/* .slide-item.aktif { display: block; animation: zoomMasuk 0.5s ease-out; } */
/* @keyframes zoomMasuk { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } } */

/* GAYA 4: Putar 3D Keren (Flip) */
/* .slide-item.aktif { display: block; animation: putarFlip 0.6s ease-out; } */
/* @keyframes putarFlip { from { transform: perspective(400px) rotateY(90deg); opacity: 0; } to { transform: perspective(400px) rotateY(0deg); opacity: 1; } } */

/* --- 1. AKHIR KOLEKSI GAYA TRANSISI SLIDESHOW --- */

.slide-img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.tombol-nav-slide { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.6); color: white; border: none; border-radius: 50%; width: 35px; height: 35px; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 2; font-size: 1rem; }
.tombol-prev { left: 10px; }
.tombol-next { right: 10px; }

/* Paginasi Ramah Smartphone */
.wadah-paginasi { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 1rem; margin-bottom: 3rem; }
.tombol-halaman { padding: 0.4rem 1rem; border-radius: 50px; font-size: 0.9rem; }

/* Layar Penuh Gambar */
#modal-gambar { padding: 0; margin: 0; max-width: 100%; max-height: 100%; width: 100vw; height: 100vh; background: rgba(0,0,0,0.95); border: none; }
.wadah-gambar-penuh { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; overflow: auto; }
#img-layar-penuh { max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; transition: transform 0.3s ease; }
.tombol-tutup-fixed { position: fixed; top: 15px; right: 15px; z-index: 9999; background: #dc3545; color: white; border: 2px solid white; border-radius: 50%; width: 45px; height: 45px; font-weight: bold; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.5); }


.header-utama {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 2rem 0;
    padding: 0.25rem 0 1rem 0;
    border-bottom: 1px solid var(--pico-card-border-color);
}

.header-utama .logo {
    font-weight: 800;
    font-size: 1.2rem;
    line-height: 1;
    margin: 0;
    padding: 0;
}

.header-utama .menu-atas {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0;
    padding: 0;
    line-height: 1;
}

.header-utama .menu-atas a {
    margin: 0;
}

/* --------------------------------------------------------
   DESAIN SIDEBAR OFF-CANVAS (MENU SAMPING)
   -------------------------------------------------------- */
.overlay-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1001;
    display: none; /* Tersembunyi bawaan */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay-sidebar.tampil {
    display: block;
    opacity: 1;
}

.sidebar-menu {
    position: fixed;
    top: 0;
    left: -320px; /* Sembunyi di luar layar (ke kiri) */
    width: 280px;
    height: 100vh;
    background-color: var(--pico-card-background-color);
    z-index: 1002;
    box-shadow: 4px 0 15px rgba(0,0,0,0.2);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.sidebar-menu.buka {
    left: 0; /* Geser masuk layar saat diaktifkan */
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--pico-card-border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
}

.sidebar-content {
    padding: 1.5rem;
    flex-grow: 1;
    overflow-y: auto; /* Memungkinkan isi menu digulir jika terlalu panjang */
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--pico-card-border-color);
    background-color: #f8f9fa;
}