/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Share Tech Mono', monospace;
    background: linear-gradient(135deg, #e6f7ff, #b3d9ff);
    min-height: 100vh;
    color: #003366;
    position: relative;
    overflow-x: hidden;
}
/* ===== ANIMASI GELOMBANG ===== */
.bg-animation {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.wave {
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 200%;
    height: 120px;
    background: repeating-linear-gradient(90deg, rgba(0, 150, 255, 0.15), rgba(0, 200, 255, 0.1) 50%, transparent 50%, transparent 100%);
    border-radius: 50% 50% 0 0;
    animation: waveAnim 8s linear infinite;
}
.wave:nth-child(2) {
    bottom: -20px;
    animation-duration: 12s;
    opacity: 0.6;
}
.wave:nth-child(3) {
    bottom: -30px;
    animation-duration: 16s;
    opacity: 0.3;
}
@keyframes waveAnim {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== LOGIN PANEL (terang) ===== */
.glass-panel {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 2px solid #3399ff;
    border-radius: 32px;
    padding: 44px 38px;
    width: 420px;
    max-width: 94%;
    box-shadow: 0 20px 60px rgba(0, 100, 200, 0.2);
    animation: floatIn 0.8s ease;
}
@keyframes floatIn {
    0% { opacity: 0; transform: scale(0.95) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}
.logo-icon { text-align: center; font-size: 42px; margin-bottom: -5px; }
.glass-panel h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 38px;
    font-weight: 900;
    text-align: center;
    color: #0066cc;
    text-shadow: 0 0 20px rgba(0, 100, 200, 0.3);
    letter-spacing: 6px;
    margin-bottom: 4px;
}
.glitch {
    animation: glitch 2.5s infinite;
}
@keyframes glitch {
    0%, 100% { text-shadow: 2px 0 #3399ff, -2px 0 #0066cc; }
    25% { text-shadow: -2px 0 #3399ff, 2px 0 #0066cc; }
    50% { text-shadow: 2px 0 #3399ff, -2px 0 #0066cc; }
    75% { text-shadow: -2px 0 #3399ff, 2px 0 #0066cc; }
}
.subtitle {
    font-family: 'Share Tech Mono', monospace;
    color: #0066cc;
    text-align: center;
    font-size: 13px;
    letter-spacing: 3px;
    margin-bottom: 28px;
    border-bottom: 2px solid #3399ff;
    padding-bottom: 18px;
    text-transform: uppercase;
}
.glass-input {
    width: 100%;
    padding: 14px 18px;
    margin: 10px 0;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid #3399ff;
    border-radius: 40px;
    color: #003366;
    font-family: 'Share Tech Mono', monospace;
    font-size: 15px;
    outline: none;
    transition: 0.25s ease;
}
.glass-input:focus {
    border-color: #0066cc;
    box-shadow: 0 0 20px rgba(0, 100, 200, 0.2);
    background: #ffffff;
}
.glass-input::placeholder { color: #888; }
.glass-btn {
    width: 100%;
    padding: 16px;
    margin-top: 18px;
    background: linear-gradient(135deg, #3399ff, #0066cc);
    border: none;
    border-radius: 40px;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 3px;
    cursor: pointer;
    transition: 0.25s ease;
    text-transform: uppercase;
    box-shadow: 0 4px 20px rgba(0, 100, 200, 0.3);
}
.glass-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 0 40px rgba(0, 100, 200, 0.4);
}
.glass-btn:active { transform: scale(0.97); }
.switch-auth { text-align: center; margin-top: 18px; color: #555; font-size: 13px; }
.switch-auth span { color: #0066cc; cursor: pointer; font-weight: bold; }
.switch-auth span:hover { color: #3399ff; text-shadow: 0 0 10px #3399ff; }
.footer-text { text-align: center; margin-top: 20px; font-size: 11px; color: #888; letter-spacing: 2px; }

/* ===== PANEL LAYOUT ===== */
#panel-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
}
.sidebar {
    width: 210px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 2px solid #3399ff;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    flex-shrink: 0;
}
.sidebar .logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    font-weight: 900;
    color: #0066cc;
    text-align: center;
    padding-bottom: 28px;
    border-bottom: 2px solid #3399ff;
    letter-spacing: 3px;
}
.sidebar ul {
    list-style: none;
    padding: 16px 0;
    flex: 1;
}
.sidebar ul li {
    padding: 12px 16px;
    margin: 4px 0;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.2s ease;
    color: #003366;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 3px solid transparent;
}
.sidebar ul li:hover {
    background: rgba(0, 100, 200, 0.1);
    border-left-color: #3399ff;
}
.sidebar ul li.active {
    background: rgba(0, 100, 200, 0.15);
    border-left-color: #0066cc;
    font-weight: bold;
}
.sidebar ul li#logoutBtn {
    margin-top: auto;
    color: #cc3333;
}
.sidebar ul li#logoutBtn:hover {
    background: rgba(204, 51, 51, 0.1);
    border-left-color: #cc3333;
}
.sidebar-footer {
    text-align: center;
    font-size: 10px;
    color: #888;
    padding-top: 16px;
    border-top: 2px solid #3399ff;
    letter-spacing: 2px;
}
.main-content {
    flex: 1;
    padding: 30px 35px;
    overflow-y: auto;
    position: relative;
    z-index: 2;
}
.content-section {
    display: none;
    animation: fadeUp 0.4s ease;
}
.content-section.active { display: block; }
@keyframes fadeUp {
    0% { opacity: 0; transform: translateY(12px); }
    100% { opacity: 1; transform: translateY(0); }
}
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.page-header h2 {
    font-family: 'Orbitron', sans-serif;
    color: #0066cc;
    text-shadow: 0 0 10px rgba(0, 100, 200, 0.1);
    font-size: 22px;
    letter-spacing: 2px;
}
.status-badge {
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    color: #00aa00;
    background: rgba(0, 200, 0, 0.1);
    padding: 6px 16px;
    border-radius: 40px;
    border: 2px solid #00aa00;
}

/* ===== STATS WIDGET (dengan stroke) ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.stat-widget {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    border: 2px solid #3399ff;
    border-radius: 20px;
    padding: 22px 18px;
    text-align: center;
    transition: 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 100, 200, 0.1);
}
.stat-widget:hover {
    border-color: #0066cc;
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 100, 200, 0.2);
}
.stat-widget .icon { font-size: 28px; display: block; margin-bottom: 6px; }
.stat-widget .value {
    font-family: 'Orbitron', sans-serif;
    font-size: 34px;
    font-weight: 900;
    color: #0066cc;
    line-height: 1.2;
}
.stat-widget .label { font-size: 12px; color: #666; letter-spacing: 1px; text-transform: uppercase; margin-top: 4px; }
.stat-widget.online .value { color: #00aa00; }
.stat-widget.offline .value { color: #cc3333; }
.stat-widget.command .value { color: #ff9900; }

/* ===== GLASS CARD ===== */
.glass-card {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid #3399ff;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 100, 200, 0.1);
    transition: 0.3s ease;
}
.glass-card:hover { border-color: #0066cc; }

/* ===== DEVICE CARDS ===== */
.device-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 18px;
}
.device-card {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    border: 2px solid #3399ff;
    border-radius: 18px;
    padding: 18px 16px;
    transition: 0.3s ease;
    cursor: default;
    box-shadow: 0 4px 20px rgba(0, 100, 200, 0.05);
}
.device-card:hover {
    border-color: #0066cc;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 100, 200, 0.15);
}
.device-card .device-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #003366;
}
.device-card .device-status {
    font-size: 13px;
    margin: 6px 0 10px;
}
.device-card .device-status.online { color: #00aa00; }
.device-card .device-status.offline { color: #cc3333; }
.device-card .device-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.device-card .device-actions .glass-btn-modern {
    padding: 6px 14px;
    font-size: 11px;
    flex: 1 0 auto;
}

/* ===== GLASS BUTTON MODERN (dengan stroke) ===== */
.glass-btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 2px solid #3399ff;
    border-radius: 40px;
    color: #003366;
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: 0.25s ease;
    box-shadow: 0 2px 12px rgba(0, 100, 200, 0.1);
    text-transform: uppercase;
}
.glass-btn-modern:hover {
    background: rgba(0, 100, 200, 0.1);
    border-color: #0066cc;
    box-shadow: 0 0 30px rgba(0, 100, 200, 0.2);
    transform: scale(1.03) translateY(-1px);
}
.glass-btn-modern:active { transform: scale(0.95); }
.glass-btn-danger {
    border-color: #cc3333;
    color: #cc3333;
}
.glass-btn-danger:hover {
    background: rgba(204, 51, 51, 0.1);
    border-color: #cc3333;
}

/* ===== GLASS TABLE ===== */
.glass-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid #3399ff;
}
.glass-table th {
    background: rgba(0, 100, 200, 0.1);
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    letter-spacing: 1px;
    color: #0066cc;
    padding: 14px 16px;
    text-align: left;
    border-bottom: 2px solid #3399ff;
}
.glass-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #cce5ff;
    font-size: 13px;
    color: #003366;
}
.glass-table tr:hover td { background: rgba(0, 100, 200, 0.05); }

/* ===== RESPONSIVE ANDROID ===== */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
        padding: 16px 8px;
    }
    .sidebar .logo { font-size: 14px; letter-spacing: 1px; }
    .sidebar ul li {
        padding: 10px 8px;
        font-size: 0;
        justify-content: center;
        border-left: none;
        border-bottom: 2px solid transparent;
    }
    .sidebar ul li span { display: none; }
    .sidebar ul li.active { border-bottom-color: #0066cc; background: transparent; }
    .sidebar-footer { display: none; }
    .main-content { padding: 16px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .device-grid { grid-template-columns: 1fr; }
    .glass-panel { width: 96%; padding: 30px 20px; }
    .page-header h2 { font-size: 18px; }
    /* Menampilkan ikon saja di sidebar, tetap terlihat */
    .sidebar ul li::before { content: attr(data-icon); font-size: 20px; }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; background: #e6f7ff; }
::-webkit-scrollbar-thumb { background: #3399ff; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #0066cc; }