body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #10141c;
    color: #e9eef7;
}

.header {
    background: #172033;
    border-bottom: 1px solid #2f3d5c;
    padding: 18px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    margin: 0;
    font-size: 22px;
}

.header a {
    color: #9fd0ff;
    text-decoration: none;
    margin-left: 16px;
}

.container {
    max-width: 1250px;
    margin: 28px auto;
    padding: 0 18px;
}

.card {
    background: #172033;
    border: 1px solid #2f3d5c;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 22px;
    box-shadow: 0 8px 30px rgba(0,0,0,.25);
}

.login-card {
    max-width: 420px;
    margin: 80px auto;
}

label {
    display: block;
    margin-top: 12px;
    color: #b8c7dd;
}

input,
select,
textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    margin-top: 6px;
    border-radius: 8px;
    border: 1px solid #3a4a6e;
    background: #0d1320;
    color: #fff;
}

button,
.button {
    display: inline-block;
    background: #2c84ff;
    color: #fff;
    border: 0;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    margin-top: 14px;
}

.button:hover,
button:hover {
    opacity: 0.9;
}

.button.danger,
button.danger {
    background: #c43b3b;
}

.button.secondary {
    background: #475775;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

th,
td {
    padding: 10px;
    border-bottom: 1px solid #2f3d5c;
    text-align: left;
    vertical-align: top;
}

th {
    color: #9fd0ff;
    font-size: 13px;
    text-transform: uppercase;
}

/* Stats Panel */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.stat-box {
    background: #0d1320;
    border: 1px solid #2f3d5c;
    border-radius: 12px;
    padding: 18px 14px;
    text-align: center;
    box-shadow: inset 0 0 18px rgba(44,132,255,0.08);
}

.stat-box h3 {
    margin: 0;
    font-size: 28px;
    color: #4ea1ff;
}

.stat-box p {
    margin: 6px 0 0;
    color: #b8c7dd;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Badge Base */
.badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
    line-height: 1.35;
    text-align: center;
    min-width: 90px;
    border: 1px solid transparent;
}

/* Green - Active / Good Heartbeat */
.badge.active {
    background: #144f2b;
    color: #8dffb5;
    border-color: #28a745;
}

/* Orange - Lost Comms */
.badge.warning {
    background: #5a3900;
    color: #ffd27a;
    border-color: #ff9800;
}

/* Red - Offline / No Report / Auto Clocked Out */
.badge.danger {
    background: #4d2028;
    color: #ffb1bf;
    border-color: #c43b3b;
}

/* Normal Clocked Out */
.badge.out {
    background: #4d2630;
    color: #ffb1bf;
    border-color: #7d3a49;
}

.badge small {
    display: block;
    margin-top: 3px;
    font-size: 10px;
    font-weight: normal;
    opacity: 0.9;
}

.notice {
    padding: 12px;
    border-radius: 8px;
    background: #20304d;
    margin-bottom: 14px;
}

.error {
    background: #4d2028;
}

.small {
    font-size: 12px;
    color: #aab7c9;
}

.actions a {
    margin-right: 8px;
}

.actions form {
    display: inline-block;
    margin: 0;
}

.actions button {
    margin-top: 0;
}

.inline-form {
    display: flex;
    gap: 10px;
    align-items: end;
    flex-wrap: wrap;
}

.inline-form label {
    width: 100%;
}

.inline-form select {
    min-width: 220px;
}