:root {
    --bg: #0f1420;
    --card: #1a2233;
    --border: #2c3850;
    --text: #e8edf5;
    --dim: #8b97ab;
    --accent: #4f8cff;
    --green: #3ddc84;
    --yellow: #ffd166;
    --grey: #59647a;
    --red: #ff5c5c;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    padding: 24px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

h1 { margin: 0 0 4px; font-size: 22px; }
h2 { margin: 0 0 14px; font-size: 16px; }

.subtitle { margin: 0; color: var(--dim); font-size: 13px; }
.hint { color: var(--dim); font-size: 13px; }

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 20px;
}

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
    text-align: left;
    color: var(--dim);
    font-weight: 600;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
.empty { color: var(--dim); text-align: center; padding: 20px; }

.mono { font-family: Consolas, monospace; letter-spacing: 0.5px; }
.dim { color: var(--dim); font-size: 12px; }

.lamp {
    display: inline-block;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    background: #59647a;
}
.lamp-online {
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
    animation: pulse 2s infinite;
}
.lamp-recent { background: var(--yellow); }
.lamp-idle { background: #59647a; }
.lamp-blocked { background: var(--red); }

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 4px var(--green); }
    50% { box-shadow: 0 0 12px var(--green); }
}

.status-text { font-size: 12.5px; color: var(--dim); }
.legend { color: var(--dim); font-size: 12.5px; margin: 14px 0 0; }
.legend .lamp { width: 10px; height: 10px; }

button {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 9px 16px;
    font-size: 13.5px;
    cursor: pointer;
}
button:hover { filter: brightness(1.12); }
button.secondary { background: #2c3850; }
button.small { padding: 4px 10px; font-size: 12px; background: #2c3850; }
button.small.warn { background: #8a6d1f; }
button.small.danger { background: #7a2e2e; }

.actions { white-space: nowrap; }
.actions form { display: inline-block; margin-right: 4px; }

.inline-form { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.inline-form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--dim); }

input[type=text], input[type=date], input[type=password] {
    background: #10182a;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    padding: 9px 12px;
    font-size: 14px;
    min-width: 230px;
}
input:focus { outline: none; border-color: var(--accent); }

.flash {
    border-radius: 8px;
    padding: 11px 16px;
    margin-bottom: 18px;
    font-size: 14px;
}
.flash-ok { background: #16341f; border: 1px solid #2b7a44; }
.flash-error { background: #3a1a1a; border: 1px solid #904; }
.error { color: var(--red); font-size: 13.5px; }

/* Login */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}
.login-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 34px 38px;
    width: 360px;
}
.login-card h1 { text-align: center; }
.login-card .subtitle { text-align: center; margin-bottom: 18px; }
.login-card form { display: flex; flex-direction: column; gap: 10px; }
.login-card label { font-size: 13px; color: var(--dim); }
.login-card input { min-width: 0; width: 100%; }
.login-card button { margin-top: 8px; }
