/* ======================================================================
   United Kingdoms of Africa — Diaspora Elections Login
   Visual system aligned with the main UKA website
   ====================================================================== */

:root {
  --gold: #c9a84c;
  --gold-light: #e8c97a;
  --gold-dim: #8a6a2a;

  --onyx: #0d0d0f;
  --deep: #111217;
  --surface: #181921;
  --surface2: #1e1f2b;

  --border: rgba(201, 168, 76, 0.18);
  --border-strong: rgba(201, 168, 76, 0.38);

  --text: #e8e4da;
  --muted: #8d8a82;
  --muted-2: #6f6c66;

  --red: #c0392b;
  --green: #1a7a55;

  --danger: #d45447;
  --success: #2ecc71;

  --shadow: 0 24px 70px rgba(0, 0, 0, 0.46);
}

/* ----------------------------------------------------------------------
   Reset
   ---------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  min-height: 100%;
  background: var(--onyx);
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 16%, rgba(201, 168, 76, 0.07), transparent 31rem),
    radial-gradient(circle at 82% 78%, rgba(26, 122, 85, 0.055), transparent 30rem),
    radial-gradient(circle at 72% 10%, rgba(192, 57, 43, 0.045), transparent 25rem),
    var(--onyx);
  color: var(--text);
  font-family: "Barlow", "Segoe UI", Arial, sans-serif;
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

a {
  color: var(--gold);
  text-decoration: none;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

a:hover {
  color: var(--gold-light);
}

button,
input {
  font: inherit;
}

/* ----------------------------------------------------------------------
   Main Layout
   ---------------------------------------------------------------------- */

.page-shell {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  max-width: 1480px;
  margin: 0 auto;
}

/* ----------------------------------------------------------------------
   Left / Institutional Panel
   ---------------------------------------------------------------------- */

.brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3rem, 6vw, 7rem);
  overflow: hidden;
  border-right: 1px solid var(--border);
}

.brand-panel::before {
  content: "";
  position: absolute;
  width: min(64vw, 720px);
  aspect-ratio: 1;
  border: 1px solid rgba(201, 168, 76, 0.06);
  border-radius: 50%;
  left: 49%;
  top: 50%;
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 0 80px rgba(201, 168, 76, 0.018),
    0 0 0 160px rgba(201, 168, 76, 0.012);
  pointer-events: none;
}

.brand-panel::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background:
    linear-gradient(
      90deg,
      var(--red) 0 33.333%,
      var(--gold) 33.333% 66.666%,
      var(--green) 66.666% 100%
    );
}

.brand-panel > * {
  position: relative;
  z-index: 1;
}

.home-link {
  position: absolute;
  top: 2rem;
  left: clamp(2rem, 4vw, 4rem);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.home-link:hover {
  color: var(--gold);
}

.brand-mark {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  margin-bottom: 2rem;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(232, 201, 122, 0.14), transparent 48%),
    rgba(201, 168, 76, 0.045);
  color: var(--gold);
  font-family: "Cinzel", Georgia, serif;
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  box-shadow:
    0 0 0 7px rgba(201, 168, 76, 0.025),
    0 14px 38px rgba(0, 0, 0, 0.32);
}

.eyebrow {
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.27em;
  text-transform: uppercase;
}

.brand-panel h1 {
  max-width: 720px;
  margin-top: 0.7rem;
  color: var(--text);
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(2.6rem, 5.7vw, 5.4rem);
  font-weight: 900;
  line-height: 1.03;
  letter-spacing: -0.02em;
}

.lead {
  max-width: 650px;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.45vw, 1.15rem);
  line-height: 1.85;
}

.status-card {
  max-width: 650px;
  margin-top: 2.3rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(30, 31, 43, 0.68);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.status-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.55rem;
  color: var(--text);
  font-size: 0.9rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 12px rgba(46, 204, 113, 0.45);
}

.status-card p {
  color: var(--muted);
  font-size: 0.81rem;
  line-height: 1.65;
}

.security-list {
  max-width: 650px;
  margin-top: 1.3rem;
  display: grid;
  gap: 0.7rem;
}

.security-list > div {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.79rem;
}

.security-list > div > span {
  color: var(--gold);
  font-weight: 700;
  line-height: 1.45;
}

.security-list strong {
  color: var(--text);
  font-weight: 600;
}

/* ----------------------------------------------------------------------
   Right / Login Panel
   ---------------------------------------------------------------------- */

.login-panel {
  display: grid;
  place-items: center;
  padding: clamp(2rem, 5vw, 5rem);
  background:
    linear-gradient(180deg, rgba(17, 18, 23, 0.64), rgba(13, 13, 15, 0.88));
}

.login-card {
  width: min(100%, 500px);
  padding: clamp(2rem, 4vw, 3rem);
  border: 1px solid var(--border);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 0%, rgba(201, 168, 76, 0.055), transparent 40%),
    var(--surface);
  box-shadow: var(--shadow);
}

.card-heading {
  margin-bottom: 2rem;
}

.card-heading h2 {
  margin-top: 0.45rem;
  color: var(--text);
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(1.9rem, 4vw, 2.55rem);
  font-weight: 900;
  line-height: 1.15;
}

.card-heading > p:last-child {
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

/* ----------------------------------------------------------------------
   Alerts
   ---------------------------------------------------------------------- */

.alert {
  margin-bottom: 1.25rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(212, 84, 71, 0.42);
  border-radius: 7px;
  background: rgba(192, 57, 43, 0.095);
  color: #f1b2ab;
  font-size: 0.82rem;
  line-height: 1.55;
}

.alert.success {
  border-color: rgba(46, 204, 113, 0.34);
  background: rgba(46, 204, 113, 0.07);
  color: #a9e4c3;
}

.hidden {
  display: none !important;
}

/* ----------------------------------------------------------------------
   Form Fields
   ---------------------------------------------------------------------- */

form {
  display: grid;
  gap: 1.35rem;
}

.field-group {
  display: grid;
  gap: 0.5rem;
}

.field-group > label {
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.035em;
}

.field-group small {
  color: var(--muted-2);
  font-size: 0.72rem;
  line-height: 1.45;
}

.field-group input[type="email"],
.field-group input[type="password"] {
  width: 100%;
  min-height: 50px;
  padding: 0.83rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 6px;
  outline: none;
  background: var(--deep);
  color: var(--text);
  caret-color: var(--gold);
  font-size: 0.95rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.015);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.field-group input:hover {
  border-color: rgba(201, 168, 76, 0.25);
}

.field-group input:focus {
  border-color: var(--gold);
  background: #121318;
  box-shadow:
    0 0 0 3px rgba(201, 168, 76, 0.09),
    0 0 22px rgba(201, 168, 76, 0.055);
}

.field-group input::placeholder {
  color: var(--muted-2);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 4.6rem !important;
}

.show-password {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  transform: translateY(-50%);
  min-width: 3.4rem;
  padding: 0.42rem 0.65rem;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.show-password:hover {
  background: rgba(201, 168, 76, 0.08);
  color: var(--gold-light);
}

.show-password:focus-visible,
.primary-btn:focus-visible,
.secondary-btn:focus-visible,
.home-link:focus-visible,
.form-row a:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}

/* ----------------------------------------------------------------------
   Form Utility Row
   ---------------------------------------------------------------------- */

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: -0.15rem;
}

.remember {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
}

.remember input {
  width: 15px;
  height: 15px;
  accent-color: var(--gold);
}

.form-row a {
  font-size: 0.76rem;
  font-weight: 600;
}

/* ----------------------------------------------------------------------
   Buttons
   ---------------------------------------------------------------------- */

.primary-btn,
.secondary-btn {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.095em;
  text-transform: uppercase;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.primary-btn {
  width: 100%;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: var(--onyx);
  box-shadow: 0 0 0 rgba(201, 168, 76, 0);
}

.primary-btn:hover {
  transform: translateY(-2px);
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: var(--onyx);
  box-shadow: 0 10px 30px rgba(201, 168, 76, 0.18);
}

.primary-btn:active {
  transform: translateY(0);
}

.primary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.form-footnote {
  color: var(--muted-2);
  font-size: 0.7rem;
  line-height: 1.55;
}

/* ----------------------------------------------------------------------
   Secondary Actions / Privacy
   ---------------------------------------------------------------------- */

.divider {
  height: 1px;
  margin: 2rem 0;
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(201, 168, 76, 0.25),
      transparent
    );
}

.secondary-actions {
  text-align: center;
}

.secondary-actions p {
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.secondary-btn {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  color: var(--text);
}

.secondary-btn:hover {
  border-color: var(--gold);
  background: rgba(201, 168, 76, 0.055);
  color: var(--gold);
  transform: translateY(-1px);
}

.privacy-note {
  margin-top: 1.5rem;
  padding: 1rem 1.05rem;
  border-left: 2px solid var(--gold-dim);
  background: rgba(201, 168, 76, 0.035);
}

.privacy-note strong {
  color: var(--text);
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
}

.privacy-note p {
  margin-top: 0.35rem;
  color: var(--muted-2);
  font-size: 0.7rem;
  line-height: 1.55;
}

/* ----------------------------------------------------------------------
   Footer
   ---------------------------------------------------------------------- */

.site-footer {
  min-height: 72px;
  padding: 1.15rem clamp(1.5rem, 4vw, 4rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  background: #090909;
  color: var(--muted);
  font-size: 0.72rem;
}

.site-footer a {
  font-size: 0.72rem;
  font-weight: 600;
}

/* ----------------------------------------------------------------------
   Responsive
   ---------------------------------------------------------------------- */

@media (max-width: 980px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    min-height: auto;
    padding: 6.5rem 2rem 3.75rem;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .brand-panel h1 {
    font-size: clamp(2.4rem, 9vw, 4.2rem);
  }

  .brand-panel::before {
    width: 720px;
  }

  .login-panel {
    padding: 3rem 1.5rem 4rem;
  }
}

@media (max-width: 620px) {
  .brand-panel {
    padding: 5.5rem 1.35rem 3rem;
  }

  .home-link {
    top: 1.5rem;
    left: 1.35rem;
  }

  .brand-mark {
    width: 66px;
    height: 66px;
    margin-bottom: 1.5rem;
    font-size: 1rem;
  }

  .brand-panel h1 {
    font-size: clamp(2.1rem, 12vw, 3.2rem);
  }

  .lead {
    margin-top: 1.1rem;
    font-size: 0.95rem;
  }

  .security-list {
    gap: 0.9rem;
  }

  .login-panel {
    padding: 2.2rem 1rem 3rem;
  }

  .login-card {
    padding: 1.6rem 1.25rem;
  }

  .form-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer {
    justify-content: center;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
