* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #0f1117;
    color: #e0e0e0;
    min-height: 100vh;
}

/* Login */
.login-overlay {
    position: fixed;
    inset: 0;
    background: #0f1117;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.login-box {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 32px;
    width: 360px;
    text-align: center;
}

.login-box h2 {
    font-size: 20px;
    color: #f0f0f0;
    margin-bottom: 8px;
}

.login-hint {
    font-size: 13px;
    color: #8b949e;
    margin-bottom: 20px;
}

.login-box input {
    width: 100%;
    padding: 10px 14px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 14px;
    margin-bottom: 12px;
    outline: none;
}

.login-box input:focus {
    border-color: #58a6ff;
}

.login-box button {
    width: 100%;
    padding: 10px;
    background: #238636;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.login-box button:hover {
    background: #2ea043;
}

.login-error {
    color: #f85149;
    font-size: 13px;
    margin-top: 12px;
    min-height: 18px;
}

/* Logout */
.btn-logout {
    padding: 4px 12px;
    background: transparent;
    border: 1px solid #30363d;
    border-radius: 6px;
    color: #8b949e;
    font-size: 12px;
    cursor: pointer;
}

.btn-logout:hover {
    border-color: #8b949e;
    color: #e0e0e0;
}

/* Header */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: #161b22;
    border-bottom: 1px solid #30363d;
}

header h1 {
    font-size: 18px;
    font-weight: 600;
    color: #f0f0f0;
}

.badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.ok { background: #1a7f37; color: #fff; }
.badge.error { background: #cf222e; color: #fff; }

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

section {
    margin-bottom: 32px;
}

h2 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #c9d1d9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.count {
    background: #30363d;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    color: #8b949e;
}

.card-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 12px;
}

.card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 16px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: #f0f0f0;
}

.status {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status.healthy { background: #1a3a2a; color: #3fb950; }
.status.unhealthy { background: #3a1a1a; color: #f85149; }
.status.degraded { background: #3a2a1a; color: #d29922; }
.status.firing { background: #3a1a1a; color: #f85149; }
.status.warning { background: #3a2a1a; color: #d29922; }
.status.critical { background: #3a1a1a; color: #f85149; }

.metrics-row {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.metric {
    flex: 1;
}

.metric-label {
    font-size: 11px;
    color: #8b949e;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.metric-value {
    font-size: 20px;
    font-weight: 700;
    color: #f0f0f0;
}

.metric-value.warn { color: #d29922; }
.metric-value.crit { color: #f85149; }

.metric-value-sm {
    font-size: 13px;
    font-weight: 600;
    color: #f0f0f0;
}

.metric-value-sm.warn { color: #d29922; }
.metric-value-sm.crit { color: #f85149; }

.metric-bar {
    height: 4px;
    background: #30363d;
    border-radius: 2px;
    margin-top: 4px;
    overflow: hidden;
}

.metric-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease;
}

.bar-ok { background: #3fb950; }
.bar-warn { background: #d29922; }
.bar-crit { background: #f85149; }

.disk-section {
    margin-top: 12px;
}

.disk-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.disk-name {
    font-size: 12px;
    color: #8b949e;
    min-width: 40px;
}

.disk-row .metric-bar {
    flex: 1;
    margin-top: 0;
}

.card-detail {
    font-size: 12px;
    color: #8b949e;
    margin-top: 8px;
}

.card-detail span {
    margin-right: 12px;
}

.alert-card {
    border-left: 3px solid #d29922;
}

.alert-card.critical {
    border-left-color: #f85149;
}

.alert-summary {
    font-size: 13px;
    color: #c9d1d9;
    margin-top: 4px;
}

.alert-desc {
    font-size: 12px;
    color: #8b949e;
    margin-top: 4px;
}

.empty-state {
    text-align: center;
    padding: 24px;
    color: #484f58;
    font-size: 14px;
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 8px 24px;
    background: #161b22;
    border-top: 1px solid #30363d;
    font-size: 12px;
    color: #8b949e;
}
