@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

/* Global Styles */
.hidden {
    display: none !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.logo {
    display: block;
    max-width: 100%; /* Sesuaikan dengan lebar form */
    height: auto; /* Menjaga rasio aspek */
    margin: 0 auto 20px; /* Margin bawah untuk jarak dengan form */
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #061018;
    color: #b9b9c0;
    line-height: 1.6;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px;
    padding-top: 70px; /* Sesuaikan dengan tinggi header */
}

/* Login Form */
#loginForm {
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
    background-color: #07141d;
    border: 1.5px solid #192f3e;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    text-align: center;
}

#loginForm .logo {
    width: 200px; /* Ukuran logo di login form */
    height: auto;
    margin-bottom: 20px;
}

#loginForm h2 {
    margin-bottom: 20px;
    color: #b9b9c0;
}

#loginForm input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1.5px solid #192f3e;
    border-radius: 4px;
    background-color: #040e15;
    color: #b9b9c0;
    font-size: 16px;
    transition: all 0.3s ease;
}

#loginForm input:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
    outline: none;
}

#loginForm button {
    width: 100%;
    padding: 10px;
    background: linear-gradient(to bottom right, #0b2b36, #163c48);
    color: #b9b9c0;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#loginForm button:hover {
    background: linear-gradient(to bottom right, #163c48, #0b2b36);
}

/* User Settings */
#userSettings {
    margin-top: 20px;
}

#userSettings h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #b9b9c0;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #07141d;
    border: 1.5px solid #192f3e;
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #192f3e; /* Garis pemisah */
    border-right: 1px solid #192f3e; /* Garis pemisah antar kolom */
}

th {
    background-color: #0b2b36;
    color: #b9b9c0;
}

td {
    background-color: #07141d;
    color: #b9b9c0;
}

td a {
    color: #007bff;
    text-decoration: none;
}

td a:hover {
    text-decoration: underline;
}

/* Warna bergantian untuk baris tabel */
tbody tr:nth-child(odd) {
    background-color: #0b2b36; /* Warna untuk baris ganjil */
}

tbody tr:nth-child(even) {
    background-color: #07141d; /* Warna untuk baris genap */
}

/* Button Styles in Table */
td button {
    padding: 8px 12px;
    margin: 2px;
    background: linear-gradient(to bottom right, #0b2b36, #163c48);
    color: #b9b9c0;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

td button:hover {
    background: linear-gradient(to bottom right, #163c48, #0b2b36);
}

td:last-child, th:last-child {
    border-right: none; /* Menghapus border kanan pada kolom terakhir */
}

#userTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #07141d;
    border: 1.5px solid #192f3e;
    border-radius: 8px;
    overflow: hidden;
    display: block; /* Membuat tabel menjadi block untuk overflow */
    max-width: 100%; /* Membatasi lebar maksimum */
    overflow-x: auto; /* Menambahkan scroll horizontal jika diperlukan */
}

#userTable thead {
    display: table; /* Memastikan header tetap terlihat */
    width: 100%; /* Menyesuaikan lebar header dengan tabel */
}

#userTable tbody {
    display: block; /* Memisahkan body dari header */
    max-height: 300px; /* Batasi tinggi tabel */
    overflow-y: auto; /* Scroll vertikal jika diperlukan */
}

#userTable th, #userTable td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #192f3e; /* Garis pemisah */
    border-right: 1px solid #192f3e; /* Garis pemisah antar kolom */
    white-space: nowrap; /* Mencegah teks wrap */
}

#userTable th {
    background-color: #0b2b36;
    color: #b9b9c0;
    position: sticky; /* Membuat header tetap terlihat saat di-scroll */
    top: 0; /* Posisi header di bagian atas */
    z-index: 1; /* Memastikan header berada di atas konten */
}

#userTable td {
    background-color: #07141d;
    color: #b9b9c0;
}

#userTable td:last-child, #userTable th:last-child {
    border-right: none; /* Menghapus border kanan pada kolom terakhir */
}

/* Add New User Form */
#addUserForm {
    margin-top: 20px;
    padding: 20px;
    background-color: #07141d;
    border: 1.5px solid #192f3e;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#addUserForm h3 {
    margin-bottom: 15px;
    color: #b9b9c0;
}

#addUserForm input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1.5px solid #192f3e;
    border-radius: 4px;
    background-color: #040e15;
    color: #b9b9c0;
    font-size: 16px;
    transition: all 0.3s ease;
}

#addUserForm input:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
    outline: none;
}

#addUserForm button {
    width: 100%;
    padding: 10px;
    background: linear-gradient(to bottom right, #0b2b36, #163c48);
    color: #b9b9c0;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#addUserForm button:hover {
    background: linear-gradient(to bottom right, #163c48, #0b2b36);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8); /* Lebih gelap untuk kontras yang lebih baik */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999; /* Pastikan z-index tinggi */
}

.loading-spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.user-settings-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.logout-button, .add-user-button {
    padding: 10px 15px;
    background: linear-gradient(to bottom right, #0b2b36, #163c48);
    color: #b9b9c0;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.logout-button:hover, .add-user-button:hover {
    background: linear-gradient(to bottom right, #163c48, #0b2b36);
}

/* Pop-up Form */
.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #07141d;
    border: 1.5px solid #192f3e;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    width: 90%; /* Lebar form menyesuaikan dengan layar */
    max-width: 400px; /* Maksimum lebar form */
}

@media (max-width: 600px) {
    .popup {
        width: 95%; /* Lebar form lebih besar di layar kecil */
    }
}

.popup.hidden {
    display: none;
}

.popup:not(.hidden) {
    display: block;
}

.popup h3 {
    margin-bottom: 15px;
    color: #b9b9c0;
}

.popup input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1.5px solid #192f3e;
    border-radius: 4px;
    background-color: #040e15;
    color: #b9b9c0;
    font-size: 16px;
    transition: all 0.3s ease;
}

.popup button {
    width: 48%;
    padding: 10px;
    background: linear-gradient(to bottom right, #0b2b36, #163c48);
    color: #b9b9c0;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.popup button:hover {
    background: linear-gradient(to bottom right, #163c48, #0b2b36);
}

/* User Card Styles dengan Layout Horizontal untuk Tombol */
.user-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.user-card {
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #0b2b36, #163c48);
    border: 1px solid #192f3e;
    border-radius: 8px;
    padding: 15px 20px;
    transition: all 0.3s ease;
    position: relative;
    border-left: 4px solid transparent;
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

.user-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-left-color: #007bff;
}

.user-info {
    flex: 1;
    min-width: 0;
    margin-bottom: 15px;
}

/* Hapus styling h3 yang lama */
.user-info h3 {
    color: #b9b9c0;
    margin-bottom: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    word-break: break-word;
}

.user-info p {
    color: #b9b9c0;
    margin-bottom: 4px;
    font-size: 13px;
    line-height: 1.4;
}

.user-info strong {
    color: #ffffff;
    font-weight: 600;
}

.user-info .created-by {
    color: #6c757d;
    font-size: 12px;
    margin-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 6px;
}

.user-info .created-by strong {
    color: #b9b9c0;
    font-weight: 600;
}

/* User Actions dengan Layout Horizontal */
.user-actions {
    margin-left: 0;
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
}

.edit-user-btn, .delete-user-btn, .url-button {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-decoration: none;
    text-align: center;
    min-width: 60px;
    flex: 1;
}

.edit-user-btn {
    background: linear-gradient(to bottom right, #1a4d5e, #256b82);
    color: #b9b9c0;
}

.edit-user-btn:hover {
    background: linear-gradient(to bottom right, #256b82, #1a4d5e);
    transform: translateY(-1px);
}

.delete-user-btn {
    background: linear-gradient(to bottom right, #dc3545, #c82333);
    color: white;
}

.delete-user-btn:hover {
    background: linear-gradient(to bottom right, #c82333, #dc3545);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.url-button {
    background: linear-gradient(to bottom right, #28a745, #218838);
    color: white;
}

.url-button:hover {
    background: linear-gradient(to bottom right, #218838, #28a745);
    transform: translateY(-1px);
    text-decoration: none;
    color: white;
}

/* Responsive Design untuk User Cards - PERBAIKAN */
@media (max-width: 768px) {
    .user-card {
        padding: 12px 15px;
    }
    
    .user-info {
        margin-bottom: 12px;
    }
    
    .user-info h3 {
        font-size: 1rem;
        margin-bottom: 6px;
    }
    
    .user-info p {
        font-size: 12px;
        margin-bottom: 3px;
    }
    
    .user-actions {
        gap: 6px;
    }
    
    .edit-user-btn, .delete-user-btn, .url-button {
        padding: 6px 10px;
        font-size: 11px;
        min-width: 55px;
    }
}

@media (max-width: 480px) {
    .user-card {
        padding: 10px 12px;
    }
    
    .user-actions {
        flex-direction: row; /* Tetap horizontal di mobile */
        justify-content: space-between; /* Space between untuk mobile */
        gap: 8px;
    }
    
    .edit-user-btn, .delete-user-btn, .url-button {
        flex: 1;
        padding: 8px 6px;
        font-size: 11px;
    }
}

/* Untuk layar sangat kecil (mobile portrait) */
@media (max-width: 360px) {
    .user-card {
        padding: 8px 10px;
    }
    
    .user-info h3 {
        font-size: 0.9rem;
    }
    
    .user-info p {
        font-size: 11px;
    }
    
    .user-actions {
        gap: 5px;
    }
    
    .edit-user-btn, .delete-user-btn, .url-button {
        padding: 6px 4px;
        font-size: 10px;
        min-width: 50px;
    }
}

/* User List Grid Responsive */
@media (max-width: 768px) {
    .user-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .user-list {
        gap: 10px;
    }
}

/* Form Columns untuk Edit User */
.form-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.form-column {
    display: flex;
    flex-direction: column;
}

/* Style untuk Edit User Form yang lebih kompak */
#editUserForm {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

#editUserForm h3 {
    margin-bottom: 20px;
    color: #b9b9c0;
    text-align: center;
}

#editUserForm .form-group {
    margin-bottom: 15px;
}

#editUserForm .form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
}

#editUserForm .form-actions button {
    margin: 0;
    padding: 10px;
    font-size: 14px;
}

/* Style untuk tombol Reset Device dan Reset IPs */
.reset-device-btn {
    background: linear-gradient(to bottom right, #28a745, #218838) !important;
    color: white !important;
}

.reset-device-btn:hover {
    background: linear-gradient(to bottom right, #218838, #28a745) !important;
    transform: translateY(-1px);
}

.reset-ips-btn {
    background: linear-gradient(to bottom right, #28a745, #218838) !important;
    color: white !important;
}

.reset-ips-btn:hover {
    background: linear-gradient(to bottom right, #218838, #28a745) !important;
    transform: translateY(-1px);
}

/* Hapus styling untuk edit-dropdown yang lama */
.edit-dropdown {
    display: none !important;
}

/* Edit Dropdown */
.edit-dropdown {
    margin-top: 10px;
    padding: 15px;
    background-color: #040e15;
    border: 1.5px solid #192f3e;
    border-radius: 8px;
    display: none; /* Tersembunyi secara default */
}

.edit-dropdown.show {
    display: block;
}

.edit-dropdown .form-group {
    margin-bottom: 10px;
}

.edit-dropdown .form-group label {
    display: block;
    margin-bottom: 5px;
    color: #b9b9c0;
}

.edit-dropdown .form-group input {
    width: 100%;
    padding: 8px;
    border: 1.5px solid #192f3e;
    border-radius: 4px;
    background-color: #07141d;
    color: #b9b9c0;
    font-size: 14px;
}

.edit-dropdown .form-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.edit-dropdown .form-actions button {
    flex: 1;
    padding: 8px 12px;
    background: linear-gradient(to bottom right, #0b2b36, #163c48);
    color: #b9b9c0;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.edit-dropdown .form-actions button:hover {
    background: linear-gradient(to bottom right, #163c48, #0b2b36);
}

/* Pagination Styles */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

#paginationSelect {
    padding: 8px 12px;
    background: linear-gradient(to bottom right, #0b2b36, #163c48);
    color: #b9b9c0;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#paginationSelect:hover {
    background: linear-gradient(to bottom right, #163c48, #0b2b36);
}

.pagination {
    display: flex;
    gap: 10px;
    align-items: center;
}

.pagination button {
    padding: 8px 12px;
    background: linear-gradient(to bottom right, #0b2b36, #163c48);
    color: #b9b9c0;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.pagination button:hover {
    background: linear-gradient(to bottom right, #163c48, #0b2b36);
}

.pagination button:disabled {
    background: #192f3e;
    color: #666;
    cursor: not-allowed;
}

.pagination span {
    color: #b9b9c0;
}

/* Header */
header {
    position: fixed; /* Membuat header tetap di atas */
    top: 0; /* Posisi header di bagian atas */
    left: 0; /* Posisi header di bagian kiri */
    width: 100%; /* Lebar header mengikuti lebar layar */
    z-index: 1000; /* Pastikan header selalu di atas elemen lain */
    background-color: #07141d; /* Warna latar belakang header */
    border-bottom: 1.5px solid #192f3e; /* Garis bawah header */
    padding: 10px 20px; /* Padding untuk konten di dalam header */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
    width: 80px; /* Ukuran kecil */
    height: auto;
}

/* Burger Menu */
.burger-menu {
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.burger-menu .bar {
    width: 25px;
    height: 3px;
    background-color: #b9b9c0;
    margin: 4px 0;
    transition: 0.4s;
}

/* Dropdown Menu */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 60px;
    right: 20px;
    background-color: #07141d;
    border: 1.5px solid #192f3e;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: #b9b9c0;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.dropdown-menu a:hover {
    background-color: #0b2b36;
}

/* Tampilkan dropdown menu saat aktif */
.dropdown-menu.active {
    display: block;
}

/* Konten Coming Soon */
.coming-soon {
    text-align: center;
    margin-top: 50px;
    animation: fadeIn 2s ease-in-out;
}

.coming-soon h1 {
    font-size: 3rem;
    color: #b9b9c0;
    animation: bounce 2s infinite;
}

.coming-soon p {
    font-size: 1.5rem;
    color: #b9b9c0;
    animation: fadeIn 3s ease-in-out;
}

/* Playlist Management Styles */
.playlist-management-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #07141d;
    border: 1.5px solid #192f3e;
    border-radius: 8px;
}

.playlist-management-header h2 {
    color: #b9b9c0;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.playlist-actions {
    display: flex;
    gap: 12px;
}

.refresh-button, .save-button, .download-button {
    padding: 10px 20px;
    background: linear-gradient(to bottom right, #0b2b36, #163c48);
    color: #b9b9c0;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
}

.refresh-button:hover, .save-button:hover, .download-button:hover {
    background: linear-gradient(to bottom right, #163c48, #0b2b36);
    transform: translateY(-1px);
}

.save-button {
    background: linear-gradient(to bottom right, #1a4d5e, #256b82);
    border-color: rgba(0, 123, 255, 0.3);
}

.save-button:hover {
    background: linear-gradient(to bottom right, #256b82, #1a4d5e);
}

.playlist-container {
    background-color: #07141d;
    border: 1.5px solid #192f3e;
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
}

.playlist-info {
    padding: 20px;
    background-color: #0b2b36;
    border-bottom: 1.5px solid #192f3e;
}

.playlist-info p {
    margin: 8px 0;
    color: #b9b9c0;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.playlist-info strong {
    color: #ffffff;
    font-weight: 600;
    min-width: 120px;
    display: inline-block;
}

#playlistSource {
    color: #007bff;
    font-weight: 500;
    background: rgba(0, 123, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
}

.playlist-editor {
    padding: 20px;
}

#playlistContent {
    width: 100%;
    height: 500px;
    padding: 20px;
    background-color: #040e15;
    border: 1.5px solid #192f3e;
    border-radius: 6px;
    color: #b9b9c0;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
    transition: all 0.3s ease;
    
    /* Enable text wrapping */
    white-space: pre-wrap; /* Ini yang penting - wrap teks tapi pertahankan line breaks */
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow-x: hidden; /* Hilangkan scroll horizontal */
    overflow-y: auto; /* Hanya scroll vertical */
    
    /* Font yang lebih baik untuk code */
    font-feature-settings: "liga" 0;
    font-variant-ligatures: none;
}

#playlistContent:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

/* Custom scrollbar untuk vertical scroll saja */
#playlistContent::-webkit-scrollbar {
    width: 8px;
}

#playlistContent::-webkit-scrollbar-track {
    background: #0b2b36;
    border-radius: 4px;
}

#playlistContent::-webkit-scrollbar-thumb {
    background: #163c48;
    border-radius: 4px;
}

#playlistContent::-webkit-scrollbar-thumb:hover {
    background: #1e4a5c;
}

/* Firefox scrollbar */
#playlistContent {
    scrollbar-width: thin;
    scrollbar-color: #163c48 #0b2b36;
}

/* Optional: Style untuk long URLs agar break dengan baik */
#playlistContent {
    word-break: break-all;
}

/* Untuk line yang sangat panjang, berikan visual break */
#playlistContent {
    /* Tambahkan background strip untuk readability */
    background-image: linear-gradient(
        to bottom,
        transparent 0%,
        transparent 1.5em,
        rgba(11, 43, 54, 0.1) 1.5em,
        rgba(11, 43, 54, 0.1) 100%
    );
    background-size: 100% 1.5em;
    background-attachment: local;
}

.playlist-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
    justify-items: center; /* ✅ Pusatkan card di grid */
}

/* VALUE dengan background kuning (seperti permintaan) */
.playlist-stat-info .stat-value {
    font-size: 18px;
    font-weight: 600;
    color: #000000;
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    padding: 8px 16px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: inline-block;
    min-width: 80px;
    text-align: center;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

/* Pastikan playlist-stat-card konsisten */
.playlist-stat-card {
    display: flex;
    align-items: center;
    padding: 25px 20px;
    background: linear-gradient(135deg, #0b2b36, #163c48);
    border: 1.5px solid #192f3e;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width: 90%;
    box-sizing: border-box;
    justify-content: flex-start; /* ✅ Pastikan content mulai dari kiri secara konsisten */
}

/* Untuk mobile yang sangat kecil */
@media (max-width: 480px) {
    .playlist-stats {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 0 10px;
    }
    
    .playlist-stat-card {
        width: 100%;
        max-width: 320px;
        padding: 20px 15px;
        min-height: 90px;
        margin: 0 auto;
    }
    
    .playlist-stat-icon {
        font-size: 2.2rem; /* ✅ Sedikit lebih kecil untuk mobile */
        margin-right: 15px;
        min-width: 45px; /* ✅ Fixed width untuk mobile */
    }
    
    .playlist-stat-info h4 {
        font-size: 12px; /* ✅ Sedikit lebih kecil */
        margin-bottom: 6px;
    }
    
    .playlist-stat-info .stat-value {
        font-size: 22px; /* ✅ Sedikit lebih kecil untuk mobile */
    }
}

/* Untuk tablet kecil */
@media (max-width: 768px) and (min-width: 481px) {
    .playlist-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 0 15px;
    }
    
    .playlist-stat-card {
        padding: 20px 15px;
    }
    
    .playlist-stat-icon {
        font-size: 2.3rem;
        margin-right: 15px;
        min-width: 45px;
    }
    
    .playlist-stat-info h4 {
        font-size: 13px;
    }
    
    .playlist-stat-info .stat-value {
        font-size: 24px;
    }
}

/* Untuk very small devices (iPhone SE dll) */
@media (max-width: 360px) {
    .playlist-stats {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 0 8px;
    }
    
    .playlist-stat-card {
        padding: 15px 12px;
        min-height: 80px;
    }
    
    .playlist-stat-icon {
        font-size: 2rem;
        margin-right: 12px;
        min-width: 40px;
    }
    
    .playlist-stat-info h4 {
        font-size: 11px;
        margin-bottom: 5px;
    }
    
    .playlist-stat-info .stat-value {
        font-size: 20px;
    }
}

/* Alternatif: Compact layout untuk mobile sangat kecil */
@media (max-width: 320px) {
    .playlist-stat-card {
        padding: 12px 10px;
        min-height: 70px;
    }
    
    .playlist-stat-icon {
        font-size: 1.8rem;
        margin-right: 10px;
        min-width: 35px;
    }
    
    .playlist-stat-info h4 {
        font-size: 10px;
        margin-bottom: 4px;
    }
    
    .playlist-stat-info .stat-value {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .playlist-stat-icon {
        font-size: 2.2rem;
        margin-right: 15px;
        min-width: 45px;
        width: 45px;
    }
}

@media (max-width: 360px) {
    .playlist-stat-icon {
        font-size: 2rem;
        margin-right: 12px;
        min-width: 40px;
        width: 40px;
    }
}

@media (max-width: 320px) {
    .playlist-stat-icon {
        font-size: 1.8rem;
        margin-right: 10px;
        min-width: 35px;
        width: 35px;
    }
}

.playlist-stat-icon {
    font-size: 2.5rem;
    margin-right: 20px;
    min-width: 50px; /* ✅ Fixed width untuk konsistensi */
    text-align: center; /* ✅ Pusatkan icon */
    flex-shrink: 0; /* ✅ Jangan biarkan icon menyusut */
}

.playlist-stat-info {
    flex: 1;
    min-width: 0; /* ✅ Prevent text overflow */
    text-align: left; /* ✅ Pastikan teks rata kiri */
}

.playlist-stat-info h4 {
    margin: 0 0 8px 0;
    color: #b9b9c0;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

.playlist-stat-info .stat-value{
    font-size: 20px;
    font-weight: 700;
    color: #000000;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    display: block;
    line-height: 1.2;
}

/* ===== IMPROVED STAT-CARD CONTENT ALIGNMENT ===== */
.stat-card {
    display: flex;
    align-items: center;
    padding: 25px 20px;
    background: linear-gradient(135deg, #0b2b36, #163c48);
    border: 1.5px solid #192f3e;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    justify-content: flex-start; /* ✅ Pastikan content mulai dari kiri secara konsisten */
}

.stat-icon {
    font-size: 2.5rem;
    margin-right: 20px;
    min-width: 50px; /* ✅ Fixed width untuk konsistensi */
    text-align: center; /* ✅ Pusatkan icon */
    flex-shrink: 0; /* ✅ Jangan biarkan icon menyusut */
}

.stat-info {
    flex: 1;
    min-width: 0; /* ✅ Prevent text overflow */
    text-align: left; /* ✅ Pastikan teks rata kiri */
}

.stat-info h4 {
    margin: 0 0 8px 0;
    color: #b9b9c0;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

.stat-info span {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    display: block;
    line-height: 1.2;
}

/* Responsive Design untuk Playlist */
@media (max-width: 968px) {
    .playlist-management-header {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }

    .playlist-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .playlist-actions button {
        flex: 1;
        min-width: 140px;
    }
}

@media (max-width: 768px) {
    .playlist-stats {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .stat-card {
        min-width: 200px;
        width: 100%;
        max-width: 250px;
    }

    #playlistContent {
        height: 400px;
        font-size: 12px;
        padding: 15px;
    }

    .playlist-info p {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .playlist-info strong {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .playlist-actions {
        flex-direction: column;
    }

    .playlist-actions button {
        min-width: auto;
        width: 100%;
    }

    .stat-card {
        min-width: auto;
        width: 100%;
    }

    #playlistContent {
        height: 350px;
    }
}

/* Tambahan styling untuk konsistensi dengan tema existing */
.playlist-management-header, 
.playlist-container,
.playlist-info,
.playlist-stats {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Konsistensi dengan user management section */
#playlistManagement {
    margin-top: 20px;
}

/* Style untuk textarea yang konsisten dengan input fields */
#playlistContent {
    font-family: 'Courier New', 'Monaco', 'Menlo', monospace;
    background-color: #040e15;
    color: #b9b9c0;
    border: 1.5px solid #192f3e;
}

#playlistContent::placeholder {
    color: #6c757d;
}

/* Hover effects yang konsisten */
.refresh-button:active, 
.save-button:active, 
.download-button:active {
    transform: translateY(0);
}

/* Profile Section Styles */
.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #07141d;
    border: 1.5px solid #192f3e;
    border-radius: 8px;
}

.profile-header h2 {
    color: #b9b9c0;
    margin: 0;
}

.profile-container {
    background-color: #07141d;
    border: 1.5px solid #192f3e;
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
}

.profile-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px;
}

@media (max-width: 768px) {
    .profile-info {
        grid-template-columns: 1fr;
    }
}

.info-card, .password-card {
    background-color: #0b2b36;
    border: 1px solid #192f3e;
    border-radius: 6px;
    padding: 20px;
}

.info-card h3, .password-card h3 {
    color: #b9b9c0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #192f3e;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.info-item strong {
    color: #b9b9c0;
    font-weight: 600;
}

.info-item span {
    color: #007bff;
    font-weight: 500;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #b9b9c0;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    background-color: #040e15;
    border: 1.5px solid #192f3e;
    border-radius: 4px;
    color: #b9b9c0;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.save-password-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(to bottom right, #1a4d5e, #256b82);
    color: #b9b9c0;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.save-password-btn:hover {
    background: linear-gradient(to bottom right, #256b82, #1a4d5e);
    transform: translateY(-1px);
}

/* Reseller Panel Styles */
.reseller-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #07141d;
    border: 1.5px solid #192f3e;
    border-radius: 8px;
}

.reseller-header h2 {
    color: #b9b9c0;
    margin: 0;
}

.add-reseller-button {
    padding: 10px 20px;
    background: linear-gradient(to bottom right, #1a4d5e, #256b82);
    color: #b9b9c0;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.add-reseller-button:hover {
    background: linear-gradient(to bottom right, #256b82, #1a4d5e);
    transform: translateY(-1px);
}

.add-reseller-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.reseller-container {
    background-color: #07141d;
    border: 1.5px solid #192f3e;
    border-radius: 8px;
    padding: 20px;
    position: relative;
}

/* Loading state untuk reseller container */
.reseller-container.loading::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(7, 20, 29, 0.8);
    border-radius: 8px;
    z-index: 1;
}

.reseller-container.loading::after {
    content: "Loading...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #b9b9c0;
    font-size: 16px;
    z-index: 2;
}

.reseller-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

/* Loading state untuk reseller list */
.reseller-list.loading {
    opacity: 0.6;
    pointer-events: none;
}

.reseller-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: linear-gradient(135deg, #0b2b36, #163c48);
    border: 1px solid #192f3e;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    border-left: 4px solid transparent;
}

/* Animation untuk card baru */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reseller-card.new-item {
    animation: fadeInUp 0.5s ease-out;
}

.reseller-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-left-color: #007bff;
}

.reseller-info {
    flex: 1;
    min-width: 0; /* Prevent flex item from overflowing */
}

.reseller-info h3 {
    color: #b9b9c0;
    margin-bottom: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    word-break: break-word;
}

.reseller-info p {
    color: #b9b9c0;
    margin-bottom: 6px;
    font-size: 13px;
    line-height: 1.4;
}

.reseller-info strong {
    color: #ffffff;
    font-weight: 600;
}

.reseller-actions {
    margin-left: 15px;
    flex-shrink: 0; /* Prevent button from shrinking */
}

.delete-reseller-btn {
    padding: 8px 16px;
    background: linear-gradient(to bottom right, #dc3545, #c82333);
    color: white;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.delete-reseller-btn:hover {
    background: linear-gradient(to bottom right, #c82333, #dc3545);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.delete-reseller-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.role-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
    margin-left: 8px;
}

.role-badge.admin {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.role-badge.reseller {
    background: linear-gradient(135deg, #28a745, #218838);
    color: white;
}

.no-resellers {
    text-align: center;
    color: #6c757d;
    padding: 40px;
    font-style: italic;
    grid-column: 1 / -1;
}

/* Animation untuk menghapus item */
@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.reseller-card.removing {
    animation: fadeOut 0.3s ease-out forwards;
}

/* Responsive Design untuk Reseller Panel */
@media (max-width: 768px) {
    .reseller-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .reseller-list {
        grid-template-columns: 1fr;
    }
    
    .reseller-card {
        flex-direction: column;
        align-items: stretch;
    }
    
    .reseller-actions {
        margin-left: 0;
        margin-top: 15px;
        align-self: flex-end;
    }
    
    .delete-reseller-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .reseller-container {
        padding: 15px;
    }
    
    .reseller-card {
        padding: 15px;
    }
    
    .reseller-info h3 {
        font-size: 1rem;
    }
    
    .reseller-info p {
        font-size: 12px;
    }
}

/* Style untuk form tambah reseller */
#addResellerForm select {
    width: 100%;
    padding: 12px;
    background-color: #040e15;
    border: 1.5px solid #192f3e;
    border-radius: 4px;
    color: #b9b9c0;
    font-size: 14px;
    margin-bottom: 15px;
    font-family: 'Poppins', sans-serif;
}

#addResellerForm select:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

#addResellerForm option {
    background-color: #07141d;
    color: #b9b9c0;
    padding: 10px;
}

/* Additional styling untuk konsistensi */
.reseller-info .role-badge {
    margin-left: 8px;
    vertical-align: middle;
}

/* Style untuk created by info */
.reseller-info p:last-child {
    color: #6c757d;
    font-size: 12px;
    margin-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 8px;
}

/* Success message styling */
.reseller-success-message {
    background: linear-gradient(135deg, #28a745, #218838);
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    text-align: center;
    animation: fadeInUp 0.3s ease-out;
}

/* Error message styling */
.reseller-error-message {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    text-align: center;
    animation: fadeInUp 0.3s ease-out;
}

/* Access Denied Styles */
.access-denied {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.denied-content {
    text-align: center;
    background-color: #0b2b36;
    border: 1.5px solid #dc3545;
    border-radius: 8px;
    padding: 40px;
    max-width: 400px;
}

.denied-content h2 {
    color: #dc3545;
    margin-bottom: 20px;
}

.denied-content p {
    color: #b9b9c0;
    margin-bottom: 30px;
}

.denied-content button {
    padding: 12px 24px;
    background: linear-gradient(to bottom right, #0b2b36, #163c48);
    color: #b9b9c0;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.denied-content button:hover {
    background: linear-gradient(to bottom right, #163c48, #0b2b36);
}

/* Animation untuk reseller card */
.reseller-card {
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form styles untuk reseller */
#addResellerForm select {
    width: 100%;
    padding: 12px;
    background-color: #040e15;
    border: 1.5px solid #192f3e;
    border-radius: 4px;
    color: #b9b9c0;
    font-size: 14px;
    margin-bottom: 15px;
}

#addResellerForm select:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

/* Username dengan background merah seperti badge admin */
.username-badge {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white !important;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 10px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Style untuk Device ID */
.device-id {
    color: #28a745;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    background: rgba(40, 167, 69, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    word-break: break-all;
}

/* Search Container Styles */
.search-container {
    position: relative;
    flex: 1;
    max-width: 400px;
    margin-right: 15px;
}

#userSearch {
    width: 100%;
    padding: 10px 40px 10px 15px;
    background-color: #040e15;
    border: 1.5px solid #192f3e;
    border-radius: 4px;
    color: #b9b9c0;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

#userSearch:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

#userSearch::placeholder {
    color: #6c757d;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
}

/* User Settings Header Layout */
.user-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

/* Responsive untuk search dan username badge */
@media (max-width: 768px) {
    .user-settings-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-container {
        max-width: none;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .username-badge {
        font-size: 1rem;
        padding: 5px 12px;
    }
}

@media (max-width: 480px) {
    .username-badge {
        font-size: 0.95rem;
        padding: 4px 10px;
    }
}

/* Monitoring Section Styles */
.monitoring-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #07141d;
    border: 1.5px solid #192f3e;
    border-radius: 8px;
}

.monitoring-header h2 {
    color: #b9b9c0;
    margin: 0;
    font-size: 1.5rem;
}

.monitoring-actions {
    display: flex;
    gap: 12px;
}

.refresh-button, .export-button, .auto-refresh-button {
    padding: 10px 20px;
    background: linear-gradient(to bottom right, #0b2b36, #163c48);
    color: #b9b9c0;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.refresh-button:hover, .export-button:hover, .auto-refresh-button:hover {
    background: linear-gradient(to bottom right, #163c48, #0b2b36);
    transform: translateY(-1px);
}

.auto-refresh-button.active {
    background: linear-gradient(to bottom right, #1a4d5e, #256b82);
}

/* ===== IMPROVED STATS GRID FOR MOBILE ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
    justify-items: center; /* ✅ Pusatkan card di grid */
}

/* Pastikan stat-card konsisten */
.stat-card {
    display: flex;
    align-items: center;
    padding: 25px 20px;
    background: linear-gradient(135deg, #0b2b36, #163c48);
    border: 1.5px solid #192f3e;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width: 100%; /* ✅ Pastikan full width dalam grid cell */
    box-sizing: border-box; /* ✅ Include padding dalam width */
}

/* Untuk mobile yang sangat kecil */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 0 10px;
    }
    
    .stat-card {
        width: 100%;
        max-width: 320px;
        padding: 20px 15px;
        min-height: 90px;
        margin: 0 auto;
    }
    
    .stat-icon {
        font-size: 2.2rem; /* ✅ Sedikit lebih kecil untuk mobile */
        margin-right: 15px;
        min-width: 45px; /* ✅ Fixed width untuk mobile */
    }
    
    .stat-info h4 {
        font-size: 12px; /* ✅ Sedikit lebih kecil */
        margin-bottom: 6px;
    }
    
    .stat-info span {
        font-size: 22px; /* ✅ Sedikit lebih kecil untuk mobile */
    }
}

/* Untuk tablet kecil */
@media (max-width: 768px) and (min-width: 481px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 0 15px;
    }
    
    .stat-card {
        padding: 20px 15px;
    }
    
    .stat-icon {
        font-size: 2.3rem;
        margin-right: 15px;
        min-width: 45px;
    }
    
    .stat-info h4 {
        font-size: 13px;
    }
    
    .stat-info span {
        font-size: 24px;
    }
}

/* Untuk very small devices (iPhone SE dll) */
@media (max-width: 360px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 0 8px;
    }
    
    .stat-card {
        padding: 15px 12px;
        min-height: 80px;
    }
    
    .stat-icon {
        font-size: 2rem;
        margin-right: 12px;
        min-width: 40px;
    }
    
    .stat-info h4 {
        font-size: 11px;
        margin-bottom: 5px;
    }
    
    .stat-info span {
        font-size: 20px;
    }
}

/* Alternatif: Compact layout untuk mobile sangat kecil */
@media (max-width: 320px) {
    .stat-card {
        padding: 12px 10px;
        min-height: 70px;
    }
    
    .stat-icon {
        font-size: 1.8rem;
        margin-right: 10px;
        min-width: 35px;
    }
    
    .stat-info h4 {
        font-size: 10px;
        margin-bottom: 4px;
    }
    
    .stat-info span {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .stat-icon {
        font-size: 2.2rem;
        margin-right: 15px;
        min-width: 45px;
        width: 45px;
    }
}

@media (max-width: 360px) {
    .stat-icon {
        font-size: 2rem;
        margin-right: 12px;
        min-width: 40px;
        width: 40px;
    }
}

@media (max-width: 320px) {
    .stat-icon {
        font-size: 1.8rem;
        margin-right: 10px;
        min-width: 35px;
        width: 35px;
    }
}

/* ===== MONITORING SECTION STYLES ===== */

/* Monitoring Header */
.monitoring-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #0b2b36, #163c48);
    border: 1.5px solid #192f3e;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.monitoring-header h2 {
    color: #b9b9c0;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.monitoring-actions {
    display: flex;
    gap: 12px;
}

.refresh-button, .export-button, .auto-refresh-button {
    padding: 10px 20px;
    background: linear-gradient(to bottom right, #1a4d5e, #256b82);
    color: #b9b9c0;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
}

.refresh-button:hover, .export-button:hover, .auto-refresh-button:hover {
    background: linear-gradient(to bottom right, #256b82, #1a4d5e);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.auto-refresh-button.active {
    background: linear-gradient(to bottom right, #28a745, #218838);
    color: white;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    display: flex;
    align-items: center;
    padding: 25px 20px;
    background: linear-gradient(135deg, #0b2b36, #163c48);
    border: 1.5px solid #192f3e;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #007bff, #00bfff);
}

.stat-card.success::before {
    background: linear-gradient(90deg, #28a745, #20c997);
}

.stat-card.warning::before {
    background: linear-gradient(90deg, #ffc107, #fd7e14);
}

.stat-card.danger::before {
    background: linear-gradient(90deg, #dc3545, #e83e8c);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border-color: #007bff;
}

/* Force consistent icon sizing */
.stat-icon {
    font-size: 2.5rem;
    margin-right: 20px;
    min-width: 50px;
    width: 50px; /* ✅ Fixed width */
    text-align: center;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-info span {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Pastikan text alignment konsisten across semua stat-card */
.stat-info {
    flex: 1;
    min-width: 0;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center; /* ✅ Vertically center content */
}

.stat-info h4, 
.stat-info span {
    text-align: left;
    width: 100%;
}

/* Optional: Jika ingin teks lebih rapi, batasi max width */
.stat-info h4 {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Monitoring Tabs */
.monitoring-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #0b2b36, #163c48);
    border: 1.5px solid #192f3e;
    border-radius: 8px;
    padding: 5px;
}

.tab-button {
    flex: 1;
    padding: 15px 20px;
    background: transparent;
    color: #b9b9c0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
}

.tab-button:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.tab-button.active {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

/* Tab Content */
.tab-content {
    background: linear-gradient(135deg, #07141d, #0b2b36);
    border: 1.5px solid #192f3e;
    border-radius: 8px;
    padding: 0;
    margin-bottom: 20px;
    overflow: hidden;
}

.tab-pane {
    display: none;
    padding: 0;
}

.tab-pane.active {
    display: block;
}

/* Monitoring Section */
.monitoring-section {
    padding: 25px;
}

/* Konsistensi dengan heading lain */
.monitoring-section h3 {
    color: #b9b9c0;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
    border-bottom: 2px solid #192f3e;
    padding-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#systemPerformanceTab .monitoring-section h3::before {
    content: '⚡';
}

#securityMonitoringTab .monitoring-section h3::before {
    content: '🛡️';
}

/* Kembalikan style tabel security events seperti semula */
#securityEventsTable {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
}

#securityEventsTable thead {
    background: linear-gradient(135deg, #163c48, #1e4a5c);
}

#securityEventsTable th {
    padding: 16px 12px;
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #192f3e;
    text-align: left;
}

#securityEventsTable tbody tr {
    background: #0b2b36;
    transition: all 0.3s ease;
    border-bottom: 1px solid #192f3e;
}

#securityEventsTable tbody tr:nth-child(even) {
    background: #09232e;
}

#securityEventsTable tbody tr:hover {
    background: #163c48;
}

#securityEventsTable td {
    padding: 14px 12px;
    color: #b9b9c0;
    font-size: 14px;
    border: none;
}

/* ===== USER ACTIVITY TABLE STYLES ===== */
.table-container.fixed-height {
    max-height: 500px;
    overflow-y: auto;
    position: relative;
}

#userActivityTable {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
}

/* Style untuk fixed header table */
#userActivityTable thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(135deg, #163c48, #1e4a5c) !important;
}

#userActivityTable th {
    padding: 16px 12px;
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #192f3e;
    text-align: left;
}

#userActivityTable tbody tr {
    background: #0b2b36;
    transition: all 0.3s ease;
    border-bottom: 1px solid #192f3e;
}

#userActivityTable tbody tr:nth-child(even) {
    background: #09232e;
}

#userActivityTable tbody tr:hover {
    background: #163c48;
    transform: scale(1.01);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#userActivityTable td {
    padding: 14px 12px;
    color: #b9b9c0;
    font-size: 14px;
    border: none;
}

/* Status Badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.active {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.status-badge.expired {
    background: linear-gradient(135deg, #dc3545, #e83e8c);
    color: white;
}

.status-badge.limited {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: black;
}

/* Action Buttons in Table */
.action-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 2px;
    font-family: 'Poppins', sans-serif;
}

.action-btn.view {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.action-btn.reset {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: black;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 30px;
}

.chart-container {
    background: linear-gradient(135deg, #0b2b36, #163c48);
    border: 1.5px solid #192f3e;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.chart-container h4 {
    margin: 0 0 20px 0;
    color: #b9b9c0;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border-bottom: 1px solid #192f3e;
    padding-bottom: 10px;
}

.chart-container canvas {
    width: 100% !important;
    height: 250px !important;
}

/* Performance Grid */
.performance-grid, .security-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

.performance-card, .security-card {
    background: linear-gradient(135deg, #0b2b36, #163c48);
    border: 1.5px solid #192f3e;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.performance-card h4, .security-card h4 {
    margin: 0 0 20px 0;
    color: #b9b9c0;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px solid #192f3e;
    padding-bottom: 10px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-item span {
    color: #b9b9c0;
    font-weight: 500;
}

.stat-item strong {
    color: #ffffff;
    font-weight: 600;
    font-size: 16px;
}

.stat-item.danger strong {
    color: #dc3545;
}

.stat-item.warning strong {
    color: #ffc107;
}

.stat-item.info strong {
    color: #17a2b8;
}

/* Security Events */
.security-events {
    margin-top: 30px;
}

/* Perbaikan Header Security Monitoring */
.security-events h4 {
    margin: 0 0 20px 0;
    color: #b9b9c0;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid #192f3e;
    padding-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.security-events h4::before {
    content: '📋';
    font-size: 20px;
}

/* Kembalikan Event Badges seperti semula */
.event-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    text-align: center;
    min-width: 100px;
    color: white;
}

.event-badge.blocked {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.event-badge.failed {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: black;
}

.event-badge.suspicious {
    background: linear-gradient(135deg, #fd7e14, #e55a00);
    color: white;
}

.event-badge.success {
    background: linear-gradient(135deg, #28a745, #218838);
    color: white;
}

.event-badge.unknown {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
}

.event-badge.failed_login {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: black;
}

.event-badge.suspicious_ua {
    background: linear-gradient(135deg, #fd7e14, #e55a00);
    color: white;
}

.event-badge.country_blocked {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
}

.event-badge.sniffing_tool_blocked {
    background: linear-gradient(135deg, #6f42c1, #5a2d9c);
    color: white;
}

.event-badge.invalid_tls_fingerprint {
    background: linear-gradient(135deg, #e83e8c, #d91a72);
    color: white;
}

/* Pastikan event badges di tabel terlihat */
#securityEventsTable td:nth-child(2) {
    text-align: center;
}

// 🔧 UPDATE CSS UNTUK ACTION BUTTONS YANG LEBIH SEDIKIT
.action-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.action-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    min-width: 160px;
}

.action-btn.primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.action-btn.warning {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: black;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* KEMBALIKAN STYLE MODAL SEBELUMNYA YANG LEBIH BAGUS */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-content {
    background: #07141d;
    border: 1.5px solid #192f3e;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.large-modal {
    max-width: 700px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #192f3e;
}

.modal-header h3 {
    margin: 0;
    color: #b9b9c0;
}

.modal-close {
    background: none;
    border: none;
    color: #b9b9c0;
    font-size: 24px;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

/* KEMBALIKAN STYLE USER DETAIL GRID SEBELUMNYA */
.user-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.detail-section {
    background: rgba(11, 43, 54, 0.5);
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #192f3e;
}

.detail-section h4 {
    margin: 0 0 15px 0;
    color: #b9b9c0;
    font-size: 16px;
    border-bottom: 1px solid #192f3e;
    padding-bottom: 8px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.detail-item strong {
    color: #b9b9c0;
    font-weight: 500;
}

.detail-item span {
    color: #ffffff;
    text-align: right;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.status-badge.active {
    background: #28a745;
    color: white;
}

.status-badge.expired {
    background: #dc3545;
    color: white;
}

.status-badge.limited {
    background: #ffc107;
    color: black;
}

/* KEMBALIKAN ACTION BUTTONS SEBELUMNYA */
.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.action-btn.primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.action-btn.warning {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: black;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Responsive untuk modal */
@media (max-width: 768px) {
    .user-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
    }
}

/* Monitoring Footer */
.monitoring-footer {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-size: 14px;
    background: linear-gradient(135deg, #0b2b36, #163c48);
    border: 1.5px solid #192f3e;
    border-radius: 8px;
    margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 968px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .charts-grid,
    .performance-grid,
    .security-grid {
        grid-template-columns: 1fr;
    }
    
    .monitoring-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .monitoring-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Perbaiki container monitoring untuk mobile */
@media (max-width: 768px) {
    .monitoring-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 15px;
    }
    
    .monitoring-actions {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .monitoring-actions button {
        flex: 1;
        min-width: 140px;
        font-size: 13px;
        padding: 8px 12px;
    }
    
    /* Pastikan content tidak terlalu mepet ke edge */
    .container {
        padding: 15px;
        padding-top: 70px;
    }
}

/* Very small mobile devices */
@media (max-width: 380px) {
    .monitoring-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .monitoring-actions button {
        width: 100%;
        min-width: auto;
    }
    
    .stats-grid {
        padding: 0 5px;
    }
}

/* Untuk desktop kecil */
@media (max-width: 1024px) and (min-width: 769px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Improve charts grid for mobile */
@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 10px;
    }
    
    .chart-container {
        padding: 20px 15px;
    }
    
    .chart-container canvas {
        height: 200px !important;
    }
}

/* Very small devices */
@media (max-width: 360px) {
    .charts-grid {
        gap: 15px;
        padding: 0 5px;
    }
    
    .chart-container {
        padding: 15px 10px;
    }
    
    .chart-container h4 {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .monitoring-tabs {
        flex-direction: column;
    }
    
    .tab-button {
        padding: 12px;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    #userActivityTable {
        min-width: 600px;
    }
}

@media (max-width: 480px) {
    .monitoring-section {
        padding: 15px;
    }
    
    .stat-card {
        padding: 20px 15px;
    }
    
    .stat-icon {
        font-size: 2rem;
        margin-right: 15px;
    }
    
    .stat-info span {
        font-size: 24px;
    }
    
    .chart-container {
        padding: 15px;
    }
    
    .performance-card, .security-card {
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .monitoring-section {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .monitoring-section {
        padding: 12px;
    }
}

/* Improve tab buttons for mobile */
@media (max-width: 768px) {
    .monitoring-tabs {
        flex-direction: column;
        padding: 8px;
    }
    
    .tab-button {
        padding: 12px 15px;
        font-size: 13px;
    }
}

/* Animation untuk smooth transitions */
.monitoring-section,
.table-container,
.chart-container,
.performance-card,
.security-card {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom scrollbar untuk table container */
.table-container.fixed-height::-webkit-scrollbar {
    width: 8px;
}

.table-container.fixed-height::-webkit-scrollbar-track {
    background: #0b2b36;
    border-radius: 4px;
}

.table-container.fixed-height::-webkit-scrollbar-thumb {
    background: #163c48;
    border-radius: 4px;
}

.table-container.fixed-height::-webkit-scrollbar-thumb:hover {
    background: #1e4a5c;
}

/* Firefox scrollbar */
.table-container.fixed-height {
    scrollbar-width: thin;
    scrollbar-color: #163c48 #0b2b36;
}

/* ===== EXPIRING SOON STYLES ===== */
#expiringSoonSection {
    margin-bottom: 30px;
}

#expiringSoonSection .table-container {
    max-height: 300px; /* Lebih pendek dari user activity */
}

.expiring-soon-warning {
    background: linear-gradient(135deg, #ffc107, #fd7e14) !important;
    color: black !important;
}

.expiring-soon-critical {
    background: linear-gradient(135deg, #dc3545, #c82333) !important;
    color: white !important;
}

.expiring-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.expiring-badge.warning {
    background: #ffc107;
    color: black;
}

.expiring-badge.critical {
    background: #dc3545;
    color: white;
}

.expiring-badge.normal {
    background: #28a745;
    color: white;
}

/* ===== FIX EVENT BADGES STYLES ===== */
.event-type {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    text-align: center;
    min-width: 100px;
    color: white;
}

/* Specific event type styles */
.event-type.blocked,
.event-type.country_blocked,
.event-type.sniffing_tool_blocked,
.event-type.device_limit_exceeded,
.event-type.ip_limit_exceeded,
.event-type.unknown_user {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.event-type.failed_login {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: black;
}

.event-type.suspicious_user_agent,
.event-type.unwanted_header,
.event-type.invalid_headers {
    background: linear-gradient(135deg, #fd7e14, #e55a00);
    color: white;
}

.event-type.invalid_tls_fingerprint,
.event-type.invalid_tls_version,
.event-type.invalid_cipher,
.event-type.invalid_http_protocol {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
}

.event-type.device_added,
.event-type.user_created {
    background: linear-gradient(135deg, #28a745, #218838);
    color: white;
}

/* Untuk modal event details */
.event-details .event-type {
    margin-left: 10px;
    vertical-align: middle;
}

/* Pastikan event badges di tabel juga ter-styling */
#securityEventsTable .event-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

#securityEventsTable .event-badge.blocked {
    background: #dc3545;
    color: white;
}

#securityEventsTable .event-badge.failed {
    background: #ffc107;
    color: black;
}

#securityEventsTable .event-badge.suspicious {
    background: #fd7e14;
    color: white;
}

/* Pastikan modal footer konsisten */
.modal-footer {
    padding: 20px;
    border-top: 1px solid #192f3e;
    text-align: right;
}

.modal-btn {
    padding: 10px 20px;
    background: linear-gradient(to bottom right, #0b2b36, #163c48);
    color: #b9b9c0;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn:hover {
    background: linear-gradient(to bottom right, #163c48, #0b2b36);
}

/* --- EXPORT MODAL STYLES --- */
.export-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.export-section {
    background: rgba(11, 43, 54, 0.5);
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #192f3e;
}

.export-section h4 {
    margin: 0 0 15px 0;
    color: #b9b9c0;
    font-size: 16px;
    border-bottom: 1px solid #192f3e;
    padding-bottom: 8px;
}

.export-btn {
    width: 100%;
    padding: 10px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #0b2b36, #163c48);
    color: #b9b9c0;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    text-align: left;
}

.export-btn:hover {
    background: linear-gradient(135deg, #163c48, #0b2b36);
    transform: translateY(-1px);
}

.export-btn.primary {
    background: linear-gradient(135deg, #1a4d5e, #256b82);
    color: white;
}

.export-btn.primary:hover {
    background: linear-gradient(135deg, #256b82, #1a4d5e);
}

.time-range-select {
    width: 100%;
    padding: 8px;
    background: #040e15;
    border: 1.5px solid #192f3e;
    border-radius: 4px;
    color: #b9b9c0;
    font-size: 14px;
}

.time-range-select:focus {
    border-color: #007bff;
    outline: none;
}

@media (max-width: 768px) {
    .export-options {
        grid-template-columns: 1fr;
    }
}

/* Tambahkan di style.css */
.no-data-message {
  text-align: center;
  padding: 40px 20px;
  color: #6c757d;
  background: rgba(11, 43, 54, 0.5);
  border-radius: 8px;
  border: 1px solid #192f3e;
}

.no-data-message h4 {
  margin-bottom: 10px;
  color: #b9b9c0;
}

.no-data-message p {
  margin-bottom: 5px;
}

.no-data-message small {
  font-size: 12px;
  opacity: 0.8;
}

/* Animasi */
@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}
