/* Skin-driven: all brand colours come from the CSS variables the base
   template injects from the active skin. No brand values live here. */

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

body {
  background: var(--background);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
}

.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--text); }
.brand-logo { height: 28px; width: 28px; }
.brand-name { font-weight: 700; font-size: 1.15rem; }
.tagline { opacity: 0.6; font-size: 0.85rem; }

.container { flex: 1; width: 100%; max-width: 960px; margin: 0 auto; padding: 2rem 1.5rem; }

.card {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
  border-radius: 12px;
  padding: 1.5rem;
}

.auth-card { max-width: 380px; margin: 3rem auto; }
.auth-card h1 { margin-bottom: 1rem; font-size: 1.4rem; }

form label { display: block; margin: 0.9rem 0 0.3rem; font-size: 0.9rem; opacity: 0.85; }
form input[type="email"], form input[type="password"] {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--text) 20%, transparent);
  background: var(--background);
  color: var(--text);
}

.btn-primary {
  margin-top: 1.2rem;
  width: 100%;
  padding: 0.65rem;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.btn-quiet {
  background: none;
  border: 1px solid color-mix(in srgb, var(--text) 25%, transparent);
  color: var(--text);
  border-radius: 8px;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
}

.error { color: #ff6b6b; margin-bottom: 0.75rem; font-size: 0.9rem; }
.hint { font-size: 0.8rem; opacity: 0.6; margin-top: 0.3rem; }
.alt-link { margin-top: 1.2rem; font-size: 0.9rem; opacity: 0.85; }
.alt-link a { color: var(--primary); }

.home-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.home-header h1 { font-size: 1.5rem; }
.member-email { opacity: 0.7; flex: 1; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.grid h2 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.placeholder { opacity: 0.7; font-size: 0.9rem; margin-bottom: 0.9rem; }

.pill {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.pill-idle { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent); }
.pill-ok { background: color-mix(in srgb, var(--primary) 20%, transparent); color: var(--primary); }
.pill-warn { background: color-mix(in srgb, #ff6b6b 20%, transparent); color: #ff6b6b; }

/* Member dashboard (slice 4) — colours stay skin-driven. */
.dashboard { margin-bottom: 1.5rem; }
.dashboard h3 { font-size: 0.95rem; margin: 1.2rem 0 0.5rem; opacity: 0.85; }
.dash-header { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.dash-header h2 { font-size: 1.05rem; margin-right: 0.25rem; }
.dash-updated { font-size: 0.8rem; opacity: 0.6; }
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}
.stat {
  background: color-mix(in srgb, var(--text) 4%, transparent);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.stat-label { font-size: 0.75rem; opacity: 0.65; }
.stat-value { font-size: 1.15rem; font-weight: 700; }
.table-wrap { overflow-x: auto; }
.dash-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.dash-table th, .dash-table td {
  text-align: left;
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
}
.dash-table th { font-weight: 600; opacity: 0.7; font-size: 0.75rem; }

.connected-line { margin-bottom: 0.75rem; }
.request-form { margin-top: 0.9rem; }
.request-form .btn-primary { width: auto; padding: 0.5rem 1rem; margin-top: 0; }
.replace-block { margin: 1rem 0; }
.replace-block summary { cursor: pointer; opacity: 0.85; }
.remove-form { margin-top: 1rem; }

.footer {
  padding: 1rem 1.5rem;
  display: flex;
  gap: 1.25rem;
  border-top: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
}
.footer a { color: var(--text); opacity: 0.6; font-size: 0.85rem; }
