/* Tema Elegan: Biru Profesional, Abu-abu Slate, & Putih Bersih */
:root {
    --blue-900: #0f294a;
    --blue-700: #1d4ed8;
    --blue-600: #2563eb;
    --blue-100: #dbeafe;
    --blue-50:  #eff6ff;
    --slate-900: #0f172a;
    --slate-700: #334155;
    --slate-500: #64748b;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50:  #f8fafc;
    --white:     #ffffff;
    --success:   #059669;
    --warning:   #d97706;
    --danger:    #dc2626;
    --radius-lg: 16px;
    --radius-md: 10px;
    --shadow-md: 0 10px 25px -5px rgba(15, 41, 74, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }

body {
    background-color: var(--slate-100);
    color: var(--slate-900);
    min-height: 100vh;
}

/* Top Navbar */
.top-navbar {
    background: linear-gradient(135deg, var(--blue-900), var(--blue-700));
    color: var(--white);
    padding: 14px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 4px 12px rgba(15, 41, 74, 0.15);
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
    background: var(--white);
    color: var(--blue-900);
    font-weight: 800;
    padding: 8px 12px;
    border-radius: 10px;
    letter-spacing: 1px;
}
.brand h1 { font-size: 1.05rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.brand p { font-size: 0.78rem; color: var(--blue-100); }
.badge-version { background: rgba(255,255,255,0.2); font-size: 0.7rem; padding: 2px 8px; border-radius: 99px; }

/* Sensor Simulator Chips */
.sensor-simulator {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    padding: 6px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.18);
}
.sim-title { font-size: 0.78rem; font-weight: 600; margin-right: 4px; }
.toggle-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    background: rgba(15, 23, 42, 0.35);
    padding: 4px 10px;
    border-radius: 99px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.toggle-chip:hover { background: rgba(15, 23, 42, 0.55); }
.toggle-chip input { accent-color: #38bdf8; cursor: pointer; }

/* View Switcher */
.view-switcher { display: flex; background: rgba(15, 23, 42, 0.3); padding: 4px; border-radius: 10px; }
.btn-switch {
    background: transparent;
    border: none;
    color: var(--blue-100);
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 7px;
    cursor: pointer;
    transition: 0.2s;
}
.btn-switch.active { background: var(--white); color: var(--blue-900); }

/* Workspace Layouts */
.workspace {
    display: grid;
    gap: 24px;
    padding: 24px;
    max-width: 1440px;
    margin: 0 auto;
}
.workspace.layout-split { grid-template-columns: 400px 1fr; align-items: start; }
.workspace.layout-mobile { grid-template-columns: 1fr; justify-items: center; }
.workspace.layout-mobile .panel-admin { display: none; }
.workspace.layout-admin { grid-template-columns: 1fr; }
.workspace.layout-admin .panel-mobile { display: none; }

@media (max-width: 960px) {
    .workspace.layout-split { grid-template-columns: 1fr; }
    .panel-mobile { display: flex; justify-content: center; }
}

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.35s ease forwards; }

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--slate-900);
    color: var(--white);
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 0.85rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    z-index: 9999;
    transition: opacity 0.3s;
}
.hidden { display: none !important; }
