/* kerja infra — shared look for the monitoring dashboard and its login page. */

:root {
  --bg: #10131a;
  --panel: #161a23;
  --panel-border: #262c3a;
  --text: #e7e9f0;
  --muted: #838aa0;
  --accent: #ffb545;
  --accent-ink: #241a06;
  --up: #4fd1a5;
  --down: #ff6b6b;
  --checking: #5a6178;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

code, .mono {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* --- Dashboard --- */

.board {
  max-width: 640px;
  margin: 0 auto;
  padding: 56px 20px 40px;
}

.board__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}

.board__head h1 {
  margin: 0 0 6px;
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.board__sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.board__sub code {
  font-size: 0.85em;
}

.signout {
  flex: none;
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 6px 12px;
  white-space: nowrap;
}

.signout:hover {
  color: var(--text);
  border-color: var(--muted);
}

.manifest {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  background: var(--panel);
  overflow: hidden;
}

.row {
  border-bottom: 1px solid var(--panel-border);
}

.row:last-child {
  border-bottom: none;
}

.row__link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  column-gap: 12px;
  row-gap: 2px;
  padding: 16px 20px;
  text-decoration: none;
  color: var(--text);
}

.row__link:hover {
  background: rgba(255, 255, 255, 0.03);
}

.row__status {
  grid-row: 1 / 3;
  align-self: center;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--checking);
}

.row__status[data-state="checking"] {
  animation: pulse 1.4s ease-in-out infinite;
}

.row__status[data-state="up"] { background: var(--up); }
.row__status[data-state="down"] { background: var(--down); }

@keyframes pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.row__name {
  font-weight: 500;
}

.row__path {
  grid-column: 3;
  grid-row: 1;
  color: var(--muted);
  font-size: 0.8rem;
  align-self: baseline;
}

.row__desc {
  grid-column: 2 / 4;
  color: var(--muted);
  font-size: 0.85rem;
}

.board__foot {
  margin: 16px 4px 0;
  color: var(--muted);
  font-size: 0.8rem;
}

@media (max-width: 480px) {
  .board { padding: 40px 16px 32px; }
  .row__link { grid-template-columns: auto 1fr; padding: 14px 16px; }
  .row__path { grid-column: 2; grid-row: 2; }
  .row__desc { grid-column: 2; grid-row: 3; }
}

/* --- Login --- */

.auth {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth__card {
  width: 100%;
  max-width: 340px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 32px 28px;
}

.auth__card h1 {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.auth__sub {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

.auth__error {
  margin: 0 0 20px;
  padding: 10px 12px;
  border: 1px solid var(--down);
  border-radius: 6px;
  color: var(--down);
  font-size: 0.85rem;
}

.field {
  display: block;
  margin-bottom: 16px;
}

.field span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.field input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}

.field input:focus-visible {
  border-color: var(--accent);
}

.auth__card button {
  width: 100%;
  margin-top: 8px;
  padding: 11px 12px;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.auth__card button:hover {
  filter: brightness(1.05);
}
