:root {
  --bg: #002244;          /* College Navy */
  --card: #1E2D3D;        /* Dark Slate */
  --card-2: #111C28;      /* Dark Slate profundo */
  --text: #FFFFFF;
  --muted: #A5ACAF;       /* Wolf Grey */
  --accent: #69BE28;      /* Action Green */
  --accent-text: #002244;
  --danger: #FF5910;      /* Mets Orange */
  --warn: #FF5910;
  --blue: #002D72;        /* Mets Blue */
  --border: #34495e;
  --radius: 16px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.45;
  min-height: 100vh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

h1, h2, h3 { margin: 0 0 6px; line-height: 1.2; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1rem; margin-top: 18px; color: var(--muted); font-weight: 600; }
p { margin: 0 0 10px; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.center-text { text-align: center; margin-top: 18px; }

.center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.auth-card { width: 100%; max-width: 400px; }
.logo {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #69BE28, #4a8f1a);
  color: var(--accent-text);
  font-weight: 800; font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card-2);
  color: var(--text);
  font-size: 1rem;
}
.field input:focus { outline: 2px solid var(--accent); border-color: transparent; }

.btn {
  width: 100%;
  padding: 14px;
  border: 0;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}
.btn.primary { background: var(--accent); color: var(--accent-text); }
.btn.primary:disabled { opacity: 0.6; cursor: wait; }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); width: auto; padding: 8px 14px; font-size: 0.9rem; }

.link {
  background: none; border: 0; color: var(--accent);
  font-size: 0.9rem; cursor: pointer; padding: 6px 0;
}
.auth-links { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 14px; }

.msg { min-height: 1.2em; font-size: 0.9rem; margin: 0 0 12px; }
.msg.error { color: var(--danger); }
.msg.ok { color: var(--accent); }

.home { max-width: 520px; margin: 0 auto; padding: 18px 16px 40px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.topbar p { margin: 0; }

.tag {
  display: inline-block;
  background: rgba(105, 190, 40, 0.18);
  color: var(--accent);
  font-size: 0.75rem; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
  margin-bottom: 8px;
}
.big { font-size: 1.8rem; font-weight: 800; margin: 4px 0; color: var(--accent); }

.milestones { list-style: none; padding: 0; margin: 8px 0 0; }
.milestones li {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 10px 0; border-top: 1px solid var(--border); font-size: 0.95rem;
}
.milestones li span { color: var(--muted); white-space: nowrap; }

.status { list-style: none; padding: 0; margin: 8px 0 16px; }
.status li { padding: 6px 0; font-size: 0.95rem; word-break: break-word; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; background: var(--muted); }
.dot.ok { background: var(--accent); }
.dot.warn { background: var(--warn); }
.dot.bad { background: var(--danger); }

.offline-banner {
  position: sticky; top: 0; z-index: 10;
  background: var(--warn); color: #FFFFFF;
  text-align: center; font-size: 0.85rem; font-weight: 600;
  padding: 6px 10px;
}

.spinner {
  width: 40px; height: 40px;
  border: 4px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
