* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #0f1117; color: #e1e4e8; line-height: 1.5; }

/* Login */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card { background: #161b22; padding: 2rem; border-radius: 8px; width: 320px; border: 1px solid #30363d; }
.login-card h1 { text-align: center; margin-bottom: 1.5rem; color: #58a6ff; }
.login-card input { width: 100%; padding: 0.6rem; margin-bottom: 0.8rem; background: #0d1117; border: 1px solid #30363d; border-radius: 4px; color: #e1e4e8; font-size: 0.95rem; }
.login-card button { width: 100%; padding: 0.6rem; background: #238636; color: #fff; border: none; border-radius: 4px; cursor: pointer; font-size: 1rem; }
.login-card button:hover { background: #2ea043; }
.alert { background: #da3633; color: #fff; padding: 0.5rem; border-radius: 4px; margin-bottom: 1rem; text-align: center; }

/* Layout */
header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; border-bottom: 1px solid #30363d; background: #161b22; position: sticky; top: 0; z-index: 10; }
.header-right { display: flex; align-items: center; gap: 0.8rem; }
main { padding: 1.2rem; max-width: 1400px; margin: 0 auto; }
section { margin-bottom: 1.2rem; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.7rem; gap: 0.7rem; }
h2 { margin-bottom: 0.7rem; font-size: 1.15rem; color: #79c0ff; }

/* Cards */
.card { background: #161b22; border: 1px solid #30363d; border-radius: 8px; padding: 1rem; }
.phases { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0.9rem; }
.phase-card { position: relative; }
.phase-card h3 { margin-bottom: 0.5rem; }
.badge { display: inline-block; padding: 0.12rem 0.42rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; border: 1px solid #444c56; }
.badge-done { background: #1f6feb33; color: #79c0ff; }
.badge-in-progress { background: #d2992233; color: #f2cc60; }
.badge-planned { background: #8b949e33; color: #c9d1d9; }
.state-up { background: #23863633; color: #3fb950; border-color: #238636; }
.state-warn { background: #d2992233; color: #f2cc60; border-color: #d29922; }
.state-down { background: #da363333; color: #ff7b72; border-color: #da3633; }
.checklist { list-style: none; margin-top: 0.5rem; }
.checklist li { margin: 0.25rem 0; font-size: 0.92rem; }
.checklist li.done { color: #7d8590; text-decoration: line-through; }
.check { margin-right: 0.4rem; }

/* Metrics */
.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 0.75rem; }
.metric { background: #161b22; border: 1px solid #30363d; border-radius: 8px; padding: 0.7rem; }
.metric-label { font-size: 0.84rem; color: #8b949e; margin-bottom: 0.3rem; }
.metric-val { font-size: 0.9rem; }
.bar { width: 100%; height: 8px; background: #30363d; border-radius: 999px; overflow: hidden; margin: 0.25rem 0 0.45rem; }
.bar-fill { height: 100%; transition: width 0.2s ease; }

/* Tables */
table { width: 100%; border-collapse: collapse; background: #161b22; border: 1px solid #30363d; border-radius: 8px; overflow: hidden; }
th, td { padding: 0.55rem; text-align: left; border-bottom: 1px solid #21262d; font-size: 0.88rem; vertical-align: top; }
th { background: #0d1117; color: #8b949e; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.03em; }
tr:hover td { background: #0f141c; }
.muted { color: #8b949e; font-size: 0.8rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; word-break: break-all; }

/* Buttons */
.btn, .btn-sm { background: #238636; color: #fff; border: none; border-radius: 4px; cursor: pointer; }
.btn { padding: 0.5rem 0.8rem; }
.btn-sm { padding: 0.32rem 0.52rem; font-size: 0.75rem; }
.btn:hover, .btn-sm:hover { background: #2ea043; }

/* Alerts */
.alerts { display: grid; gap: 0.5rem; }
.alert-row { background: #161b22; border: 1px solid #30363d; border-radius: 8px; padding: 0.55rem; display: grid; gap: 0.2rem; }
.alert-row strong { color: #e6edf3; }

/* Toolbar */
.toolbar { display: flex; align-items: center; gap: 0.5rem; }
.toolbar select { background: #0d1117; color: #e1e4e8; border: 1px solid #30363d; border-radius: 4px; padding: 0.25rem 0.45rem; }

/* Logs */
.log-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0.75rem; }
.log-card { background: #161b22; border: 1px solid #30363d; border-radius: 8px; overflow: hidden; }
.log-head { display: flex; justify-content: space-between; gap: 0.6rem; padding: 0.45rem 0.6rem; background: #0d1117; border-bottom: 1px solid #30363d; font-size: 0.82rem; }
.log-body { max-height: 240px; overflow: auto; padding: 0.5rem; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 0.76rem; line-height: 1.4; }
.log-line { white-space: pre-wrap; word-break: break-word; color: #c9d1d9; border-bottom: 1px dashed #21262d; padding: 0.1rem 0; }

@media (max-width: 780px) {
  main { padding: 0.8rem; }
  th:nth-child(2), td:nth-child(2), th:nth-child(6), td:nth-child(6), th:nth-child(7), td:nth-child(7) { display: none; }
  .log-grid { grid-template-columns: 1fr; }
}
