* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #111827;
    color: #e5e7eb;
}
a { color: #93c5fd; text-decoration: none; }
a:hover { text-decoration: underline; }
.layout { display: flex; min-height: 100vh; }
.sidebar {
    width: 250px;
    background: #0b1220;
    border-right: 1px solid #1f2937;
    padding: 24px 16px;
}
.brand { font-size: 24px; font-weight: 700; margin-bottom: 24px; }
.sidebar-user { margin-bottom: 20px; }
.nav { display: flex; flex-direction: column; gap: 10px; }
.nav a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    background: #111827;
}
.content { flex: 1; padding: 24px; }
.auth-card, .card, .stat-card {
    background: #0f172a;
    border: 1px solid #1f2937;
    border-radius: 14px;
    padding: 20px;
}
.auth-card {
    max-width: 420px;
    margin: 80px auto;
}
.topbar {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
}
.topbar-actions, .toolbar, .action-links {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.stack { display: flex; flex-direction: column; gap: 14px; }
label { display: flex; flex-direction: column; gap: 6px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #334155;
    background: #111827;
    color: #e5e7eb;
}
.checkbox-inline {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 10px 16px;
    border-radius: 10px;
    background: #2563eb;
    color: white;
    border: 0;
    cursor: pointer;
}
.btn-secondary { background: #334155; }
.btn-small { padding: 8px 12px; font-size: 12px; }
.small-input { width: 110px; }
.table-wrap { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 12px 10px;
    border-bottom: 1px solid #1f2937;
    text-align: left;
    vertical-align: middle;
}
tr:hover { background: rgba(255,255,255,0.02); }
.row-alarm { background: rgba(127, 29, 29, 0.25); }
.dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
}
.dot-green { background: #22c55e; }
.dot-red { background: #ef4444; }
.alert {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 14px;
}
.alert-danger { background: #7f1d1d; }
.alert-success { background: #14532d; }
.muted { color: #94a3b8; }
.small { font-size: 12px; }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}
.stat-value { font-size: 32px; font-weight: 700; margin-bottom: 6px; }
.inline-form { display: inline-flex; gap: 10px; align-items: center; }
.form-card { max-width: 720px; }
@media (max-width: 900px) {
    .layout { flex-direction: column; }
    .sidebar { width: 100%; }
    .topbar { flex-direction: column; align-items: flex-start; }
}
