/* Reset & Base Style */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background:
    linear-gradient(
        180deg,
        #141b26,
        #0d2b66
    );
    color: #ffffff;
    overflow: hidden; /* Mencegah scroll pada main dashboard body */
}

/* Layout Wrapper dengan Flexbox */
.dashboard-wrapper {
    display: flex;
    width: 100vw;
    height: 100vh;
}

/* ================= STYLE SIDEBAR KIRI ================= */
.sidebar-left {
    width: 240px;
    background-color: #080f2b;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
}

.logo {
    font-size: 30px;
    font-weight: bold;
    margin-bottom: 40px;
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex-grow: 1; /* Mendorong box akun ke bawah */
}

.nav-item {
    color: #a0a5c0;
    text-decoration: none;
    padding: 12px 15px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: 0.3s;
}

.nav-item:hover, .nav-item.active {
    background-color: #5d5fef; /* Warna ungu menu aktif */
    color: #fff;
}

.account-box {
    background-color: #121936;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.account-greeting {
    background-color: #5d5fef;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 8px;
}

.account-desc {
    font-size: 11px;
    color: #8c93b3;
    line-height: 1.4;
}

.btn-logout {
    background-color: #ff5c5c;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.btn-logout:hover {
    background-color: #e04a4a;
}

/* ================= STYLE AREA UTAMA (PREVIEW) ================= */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    justify-content: center;
}

.preview-title {
    align-self: flex-start;
    font-size: 18px;
    font-weight: normal;
    color: #a0a5c0;
    margin-bottom: 20px;
}

/* CONTAINER UTAMA BINGKAI MOCKUP */
.kiosk-mockup {
    position: relative;
    width: 360px;   /* Ukuran fisik pratinjau portrait di dashboard */
    height: 640px;
    background-color: #1c1c1e;
    border: 8px solid #48484a;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0px 10px 30px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
    z-index: 1; /* Mengunci posisi layer mockup di bawah sidebar */
    transform: scale(1.25);
    transform-origin: center center; /* Biar membesarnya pas di tengah-tengah */
}

/* KETIKA MODE LANDSCAPE, UKURAN FISIK PREVIEW DI DASHBOARD DIAKALI BERBEDA */
.kiosk-mockup.mode-landscape {
    width: 576px;  
    height: 324px;
    transform: scale(1.5);
    transform-origin: center center; /* Biar membesarnya presisi dari tengah */
}

/* JURUS PAMUNGKAS: MEMAKSA IFRAME POTRAIT MENGECIL PROPORSIONAL */
.kiosk-mockup iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1080px;  /* Resolusi kanvas asli portrait */
    height: 1920px; /* Resolusi kanvas asli portrait */
    border: none;
    background-color: #333;
    /* Geser titik pusat skala ke tengah dan perkecil 0.333x (dari 1080px ke ~360px) */
    transform: translate(-50%, -50%) scale(0.3333); 
    transform-origin: center center;
}

/* JURUS PAMUNGKAS: MEMAKSA IFRAME LANDSCAPE MENGECIL PROPORSIONAL */
.kiosk-mockup.mode-landscape iframe {
    width: 1920px; /* Resolusi kanvas asli landscape */
    height: 1080px;/* Resolusi kanvas asli landscape */
    /* Perkecil 0.3x (dari 1920px ke ~576px) agar muat di bingkai dashboard */
    transform: translate(-50%, -50%) scale(0.3);
}

/* ================= STYLE SIDEBAR KANAN ================= */
.sidebar-right {
    width: 500px;
    background-color: #080f2b;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    z-index: 10;
}

.btn-create-event {
    background-color: #5d5fef;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

.badge-pro {
    background-color: #27ae60;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
}

/* Grid 2x2 Statistik */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.stat-card {
    background-color: #ffffff;
    color: #080f2b;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-size: 20px;
    font-weight: bold;
    color: #5d5fef;
}

.stat-label {
    font-size: 11px;
    color: #7f8c8d;
}

/* Kotak Cari */
.search-box {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #7f8c8d;
}

.search-box input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 13px;
}

/* List Card Event */
.event-list {
    flex-grow: 1;
    overflow-y: auto; /* Aktifkan scroll vertikal jika event banyak */
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 5px;
}

/* Kustomisasi scrollbar biar estetik */
.event-list::-webkit-scrollbar {
    width: 5px;
}
.event-list::-webkit-scrollbar-thumb {
    background: #2c3e50;
    border-radius: 10px;
}

.event-card {
    background-color: #ffffff;
    color: #000;
    border-radius: 8px;
    padding: 8px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.event-thumb {
    width: 50px;
    height: 50px;
    background-color: #bdc3c7;
    border-radius: 6px;
}

.event-info h4 {
    font-size: 13px;
    margin-bottom: 4px;
}

.event-status {
    background-color: #27ae60;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
}

/* 3. Pengaman tambahan untuk tombol aksi di dalam card */
.event-actions button, 
.event-actions a {
    position: relative;
    z-index: 20; /* Memastikan tombol mutlak berada di posisi terdepan dan siap menerima klik */
    cursor: pointer !important;
}