/* public/css/style.css */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #0B0E14;
  --surface: #1A1F2B;
  --surface-hover: #222838;
  --text: #F5F3EE;
  --text-dim: #8B92A3;
  --accent: #5EEAD4;
  --amber: #F59E0B;
  --red: #EF4444;
  --border: #2A3040;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: 'Fraunces', serif; font-weight: 600; margin: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.shell {
  max-width: 560px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.shell-wide {
  max-width: 880px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
}

.field {
  margin-bottom: 1.1rem;
}

.field label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 0.35rem;
}

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

.field input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.btn {
  display: inline-block;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: #0B0E14;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-align: center;
}

.btn:hover { background: #7FF3DE; }

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-secondary:hover { background: var(--surface-hover); }

.btn-small {
  width: auto;
  padding: 0.45rem 0.8rem;
  font-size: 0.82rem;
}

.error-msg {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #FCA5A5;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.88rem;
  margin-bottom: 1.2rem;
}

.muted-link {
  text-align: center;
  margin-top: 1.2rem;
  font-size: 0.88rem;
  color: var(--text-dim);
}

/* --- The pulse indicator: signature element --- */
.pulse {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
}

.pulse.active { background: var(--accent); }
.pulse.active::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent);
  animation: breathe 2.2s ease-in-out infinite;
}

.pulse.past_due { background: var(--amber); }
.pulse.suspended, .pulse.inactive { background: var(--red); opacity: 0.55; }

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(2.1); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .pulse.active::after { animation: none; }
}

.status-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.status-label {
  font-size: 0.95rem;
}

.status-sub {
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* --- Admin table --- */
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 0.8rem 0.6rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
th { color: var(--text-dim); font-weight: 500; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.78rem;
  background: var(--bg);
  border: 1px solid var(--border);
}

select.inline-select {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.5rem;
  font-size: 0.8rem;
  font-family: inherit;
}

header.topbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2rem;
}
