:root {
    --ok: #1e8e3e;
    --warn: #e8a300;
    --crit: #d93025;
    --offline: #9aa0a6;
    --bg: #f5f6f8;
    --card-bg: #ffffff;
    --text: #202124;
    --border: #e0e0e0;
    font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }

.topbar {
    display: flex; justify-content: space-between; align-items: center;
    background: #14213d; color: #fff; padding: 14px 24px;
}
.topbar h1 { margin: 0; font-size: 1.3em; font-weight: 600; }
.topbar h1 span { font-weight: 300; }
.topbar a { color: #fff; text-decoration: none; margin-left: 16px; }
.topbar a.back { margin-left: 0; margin-right: 12px; font-size: 1.2em; }
.topbar nav a:hover { text-decoration: underline; }

.summary { display: flex; gap: 12px; padding: 16px 24px; flex-wrap: wrap; }
.chip { padding: 8px 16px; border-radius: 20px; font-weight: 600; color: #fff; }
.chip.ok { background: var(--ok); }
.chip.warn { background: var(--warn); }
.chip.crit { background: var(--crit); }
.chip.offline { background: var(--offline); }

main { padding: 0 24px 40px; }

.fleet-table { width: 100%; border-collapse: collapse; background: var(--card-bg); border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.fleet-table th, .fleet-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.fleet-table thead { background: #f0f1f3; }
.fleet-table tbody tr { cursor: pointer; }
.fleet-table tbody tr:hover { background: #f8f9fb; }
.fleet-table small { color: #666; }

.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.dot-ok { background: var(--ok); }
.dot-warn { background: var(--warn); }
.dot-crit { background: var(--crit); }
.dot-offline { background: var(--offline); }

tr.row-warn td { background: #fff8e1; }
tr.row-crit td { background: #fdecea; }
tr.row-offline td { background: #f1f1f1; color: #888; }

.detail { max-width: 1000px; margin: 24px auto; }
.status-banner { padding: 12px 20px; border-radius: 8px; margin-bottom: 20px; font-weight: 600; color: #fff; }
.status-ok, .status-banner.status-ok { background: var(--ok); }
.status-warn { background: var(--warn); }
.status-crit { background: var(--crit); }
.status-offline { background: var(--offline); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 16px; }
.card { background: var(--card-bg); border-radius: 8px; padding: 18px 20px; box-shadow: 0 1px 3px rgba(0,0,0,.08); margin-bottom: 16px; }
.card h3 { margin-top: 0; }
.card .big { font-size: 2em; font-weight: 700; margin: 4px 0; }
.card code { background: #f0f1f3; padding: 2px 6px; border-radius: 4px; }
.card pre { background: #14213d; color: #d7e3ff; padding: 12px; border-radius: 6px; overflow-x: auto; }

.mini-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.mini-table th, .mini-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.mini-table tr.row-warn td { background: #fff8e1; }
.mini-table tr.row-crit td { background: #fdecea; }

.login-body { display: flex; align-items: center; justify-content: center; height: 100vh; }
.login-box { background: var(--card-bg); padding: 32px; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,.12); width: 320px; }
.login-box h1 { text-align: center; font-size: 1.3em; margin-bottom: 24px; }
.login-box h1 span { display: block; font-weight: 300; font-size: 0.8em; }
.login-box label { display: block; margin-bottom: 14px; font-size: .9em; color: #555; }
.login-box input { width: 100%; padding: 8px; margin-top: 4px; border: 1px solid var(--border); border-radius: 6px; }
.login-box button { width: 100%; padding: 10px; background: #14213d; color: #fff; border: none; border-radius: 6px; cursor: pointer; font-weight: 600; }
.error { color: var(--crit); font-size: .9em; }
