/* ClearGuard portal — design tokens */
:root {
  --brand-deep: #0f766e;
  --brand-bright: #14b8a6;
  --ink: #12201e;
  --mist: #eef5f4;
  --surface: #ffffff;
  --line: #d7e4e2;
  --slate: #5b6b69;
  --error: #b3261e;
  --error-bg: #fdecea;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--mist);
}

h1, h2, .brand-word {
  font-family: 'Archivo', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: var(--brand-deep); }

/* ---------- Auth shell (login / request-access pages) ---------- */

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: row;
}

.auth-brand {
  flex: 0 0 42%;
  max-width: 480px;
  background: radial-gradient(ellipse at 50% 38%, #1d4841 0%, #0d2621 55%, #071614 100%);
  color: #eafaf7;
  padding: 3rem 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.auth-brand .logo-plate {
  position: relative;
  width: fit-content;
  margin: 0 0 2.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-brand .logo-plate::before {
  content: "";
  position: absolute;
  top: -15%;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  height: 280px;
  background: radial-gradient(ellipse at center, rgba(20,184,166,0.4) 0%, rgba(20,184,166,0.14) 45%, rgba(20,184,166,0) 75%);
  filter: blur(6px);
  z-index: 0;
}

.auth-brand .logo-plate img {
  position: relative;
  z-index: 1;
  display: block;
  width: 200px;
  height: auto;
  filter: drop-shadow(0 16px 22px rgba(0,0,0,0.55)) drop-shadow(0 5px 8px rgba(0,0,0,0.35));
}

.auth-brand .wordmark {
  position: relative;
  z-index: 1;
  font-size: 2.6rem;
  font-weight: 700;
  color: #ffffff;
  margin: 1.3rem 0 0.4rem;
  text-shadow: 0 6px 14px rgba(0,0,0,0.45);
}

.auth-brand .tagline {
  position: relative;
  z-index: 1;
  font-size: 1rem;
  color: #a9d9d1;
  margin: 0;
}

.pillars {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 2.75rem auto 0;
  max-width: 320px;
  text-align: left;
}

.pillar {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.pillar-icon {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.14);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pillar-icon svg { width: 15px; height: 15px; }

.pillar h2 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.15rem;
  color: #ffffff;
}

.pillar p {
  font-size: 0.85rem;
  line-height: 1.45;
  margin: 0;
  color: #cfe9e4;
  max-width: 30ch;
}

.auth-formside {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
}

.auth-form-wrap {
  width: 100%;
  max-width: 380px;
}

.tabs {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.tabs a {
  flex: 1;
  text-align: center;
  padding: 0.65rem 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--slate);
  background: var(--surface);
  transition: background 0.15s ease, color 0.15s ease;
}

.tabs a.active {
  background: var(--brand-deep);
  color: #ffffff;
}

.tabs a:not(.active):hover {
  background: var(--mist);
}

.auth-form-wrap h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
}

.auth-form-wrap .sub {
  font-size: 0.9rem;
  color: var(--slate);
  margin: 0 0 1.5rem;
}

.field { margin-bottom: 1.1rem; }

.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

.field input {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--ink);
}

.field input:focus-visible {
  outline: none;
  border-color: var(--brand-bright);
  box-shadow: 0 0 0 3px rgba(20,184,166,0.25);
}

.btn-primary {
  width: 100%;
  padding: 0.75rem;
  border: none;
  border-radius: 6px;
  background: var(--brand-deep);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-primary:hover { background: #0c5c56; }
.btn-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(20,184,166,0.35);
}

.form-note {
  font-size: 0.8rem;
  color: var(--slate);
  margin-top: 1.25rem;
  line-height: 1.5;
}

.alert {
  font-size: 0.85rem;
  padding: 0.7rem 0.9rem;
  border-radius: 6px;
  margin-bottom: 1.25rem;
}

.alert-error {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid #f3c4c0;
}

.alert-success {
  background: #e6f6f3;
  color: var(--brand-deep);
  border: 1px solid #b6e3da;
}

/* Mobile: stack brand band above the form */
@media (max-width: 880px) {
  .auth-page { flex-direction: column; }
  .auth-brand {
    flex: 0 0 auto;
    max-width: none;
    padding: 2rem 1.5rem 1.75rem;
  }
  .auth-brand .logo-plate {
    margin: 0 0 2rem;
  }
  .auth-brand .logo-plate img { width: 140px; }
  .auth-brand .wordmark { font-size: 1.9rem; }
  .pillars { margin-top: 1.75rem; }
  .pillars { gap: 1rem; }
  .auth-formside { padding: 2rem 1.25rem 3rem; }
}

@media (max-width: 420px) {
  .auth-brand .logo-plate img { width: 115px; }
  .auth-brand .wordmark { font-size: 1.6rem; }
  .pillar p { max-width: none; }
}

/* ---------- Admin & home pages (unchanged simple style) ---------- */

.card {
  background: #fff;
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  width: 100%;
  max-width: 360px;
  margin: 3rem auto;
}
.admin-card { max-width: 700px; }
.card h1 { font-size: 1.4rem; margin-bottom: 1.25rem; }
.card label { display: block; font-size: 0.85rem; margin-bottom: 0.3rem; color: #444; }
.card input {
  width: 100%;
  padding: 0.6rem 0.7rem;
  margin-bottom: 1rem;
  border: 1px solid #d5d7dc;
  border-radius: 6px;
  font-size: 0.95rem;
}
.card button {
  padding: 0.65rem 1rem;
  border: none;
  border-radius: 6px;
  background: var(--brand-deep);
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
}
.card button[type="submit"]:not(.approve):not(.deny) { width: 100%; }
.card button:hover { background: #0c5c56; }
.card button.secondary { background: #6b7280; width: 100%; margin-top: 1rem; }
.card button.secondary:hover { background: #4b5563; }
.card button.approve { background: #16a34a; }
.card button.approve:hover { background: #15803d; }
.card button.deny { background: #dc2626; }
.card button.deny:hover { background: #b91c1c; }
.card .error { color: #dc2626; font-size: 0.85rem; margin-bottom: 0.75rem; }
.card .toggle { text-align: center; margin-top: 1rem; font-size: 0.85rem; }
.card .toggle a { text-decoration: none; }
.home-card { max-width: 480px; text-align: center; }
.home-card p { color: #555; margin: 0.5rem 0; }
.card table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.card th, .card td { text-align: left; padding: 0.5rem; border-bottom: 1px solid #eee; font-size: 0.9rem; }
.admin-actions { display: flex; gap: 0.4rem; }
