/* --- STYLE CSS --- */
body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #ffd1dc 0%, #ff9a9e 100%);
    color: #444;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
}

/* Style untuk Modal Pop-up */
.modal {
    display: none; /* Sembunyikan secara default */
    position: fixed; 
    z-index: 999; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.5); /* Latar belakang hitam transparan */
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto; 
    padding: 20px;
    border: 1px solid #888;
    width: 400px; /* Lebar modal */
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: fadeIn 0.3s;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed #ccc;
    margin-bottom: 15px;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

@keyframes fadeIn {
    from {opacity: 0; transform: translateY(-20px);}
    to {opacity: 1; transform: translateY(0);}
}


.container {
    max-width: 900px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.96);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(233, 30, 99, 0.15);
}

/* Header Layout Flexbox */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px dashed #ffc1e3;
    padding-bottom: 20px;
}

.logo-box {
    width: 120px; /* Ukuran area logo */
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.title-box {
    text-align: center;
    flex: 1; /* Mengisi ruang tengah */
}

h1 {
    color: #c2185b;
    margin: 0;
    font-size: 2em;
}

.clock {
    font-size: 3.5em;
    font-weight: 800;
    background: -webkit-linear-gradient(#ff0844, #ffb199);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 5px 0;
    font-family: 'Courier New', monospace;
}

#status-text {
    font-size: 1em;
    background: #fff0f6;
    padding: 5px 15px;
    border-radius: 15px;
    color: #880e4f;
    display: inline-block;
}

/* Settings Panel (Dropdown) */
.settings-panel summary {
    cursor: pointer;
    color: #e91e63;
    font-weight: bold;
    margin-bottom: 10px;
    outline: none;
}

/* Tombol & Form */
.btn-save {
    background: linear-gradient(to right, #ec008c, #fc6767);
    color: white;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
}
.btn-save:hover { opacity: 0.9; }

#btn-active {
    background: linear-gradient(45deg, #ff0844, #ffb199);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 10px;
}

/* Card Style */
.card {
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    border: 1px solid #ffebf1;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.form-group { display: flex; gap: 10px; margin-bottom: 15px; }
input, select { padding: 10px; border: 2px solid #ffd1dc; border-radius: 8px; flex: 1; }

table { width: 100%; border-collapse: collapse; margin-top: 10px; }
th { background-color: #e91e63; color: white; padding: 10px; text-align: left; }
td { padding: 10px; border-bottom: 1px solid #ffebf1; }
.btn-delete { color: #d81b60; text-decoration: none; font-weight: bold; font-size: 0.9em; }

/* Responsive untuk HP */
@media (max-width: 600px) {
    .main-header { flex-direction: column; gap: 10px; }
    .clock { font-size: 2.5em; }
    .form-group { flex-direction: column; }
}


/* --- Tambahan Style Baru --- */

/* --- UPDATE BAGIAN INI DI STYLE.CSS --- */

.content-grid {
    display: grid;
    /* Kiri (Form) 320px, Kanan (Tabel) mengambil sisa ruang */
    grid-template-columns: 320px 1fr; 
    gap: 20px;
    align-items: start; /* Agar tinggi tidak memaksa sama */
}

/* Tambahan: Agar tabel punya scroll sendiri jika datanya panjang */
.table-wrapper {
    max-height: 600px; /* Tinggi maksimal tabel sebelum muncul scroll */
    overflow-y: auto;  /* Scroll vertikal */
    overflow-x: auto;  /* Scroll horizontal */
}

/* Mempercantik Tabel agar lebih renggang */
table {
    width: 100%;
    border-collapse: collapse;
}

table th, table td {
    padding: 12px 15px; /* Menambah jarak isi sel (padding) */
    text-align: left;
}

/* Responsif untuk HP (tetap tumpuk ke bawah) */
@media (max-width: 768px) {
    .content-grid { grid-template-columns: 1fr; }
}

.jam-badge {
    background: #e91e63;
    color: white;
    padding: 3px 8px;
    border-radius: 5px;
    font-weight: bold;
    font-family: monospace;
}

.status-container {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
}

.badge-next {
    font-size: 0.9em;
    color: #555;
    background: #eee;
    padding: 5px 15px;
    border-radius: 20px;
}

.active-blink {
    color: #ff0000 !important;
    font-weight: bold;
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
    50% { opacity: 0; }
}

.btn-mini {
    border: none;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}
.btn-play { background: #4CAF50; }
.btn-edit { background: #2196F3; }
.btn-del { background: #f44336; text-decoration: none; display: inline-block;}

.btn-reset {
    flex: 1;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}