/* GEMNation Citizen Portal — shared styles for login.html, profile.html, update-info.html.
   Mirrors the palette, fonts and .citizen-* form language already used in index.html's
   "Customs" sign-in slider, applied here as full standalone pages instead of a drawer. */

:root {
  --bg-midnight: #05020a;
  --primary-purple: #2fa8e6;
  --secondary-red: #22d7e8;
  --text-primary: #f8fafc;
  --text-secondary: #e4e4e7;
}

* {
  box-sizing: border-box;
}

html {
  background-color: var(--bg-midnight);
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-midnight);
  line-height: 1.7;
}

*:focus {
  outline: 2px solid var(--primary-purple);
  outline-offset: 2px;
}

/* ================= HEADER ================= */
.portal-header {
  background: linear-gradient(
    135deg,
    rgba(10, 28, 40, 0.55) 0%,
    rgba(5, 2, 10, 0.6) 100%
  );
  backdrop-filter: blur(14px) saturate(160%) brightness(0.9);
  -webkit-backdrop-filter: blur(14px) saturate(160%) brightness(0.9);
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 5%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.portal-logo-link {
  display: inline-flex;
  line-height: 0;
}
.portal-logo {
  height: 56px;
  width: auto;
  object-fit: contain;
  filter: brightness(1.2) drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
}
.portal-logo-fallback {
  display: none;
  font-family: "Cinzel", serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #fff;
}
.portal-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.portal-nav a,
.portal-nav-btn {
  font-family: "Cinzel", serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
}
.portal-nav a:hover,
.portal-nav-btn:hover {
  color: var(--secondary-red);
}
.portal-nav a:not(.portal-nav-btn):hover {
  text-shadow: 0 0 12px rgba(34, 215, 232, 0.8);
}
.portal-nav-btn.primary {
  color: #fff;
  background: linear-gradient(135deg, rgba(34, 215, 232, 0.92) 0%, rgba(47, 168, 230, 0.9) 60%, rgba(52, 211, 153, 0.8) 100%);
  padding: 0.5rem 1.1rem;
  border-radius: 50px;
  box-shadow: 0 6px 16px rgba(47, 168, 230, 0.4);
}
.portal-nav-btn.primary:hover {
  color: #fff;
  transform: translateY(-1px);
}

.demo-badge {
  font-family: "Cinzel", serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, rgba(34, 215, 232, 0.92) 0%, rgba(47, 168, 230, 0.9) 60%, rgba(52, 211, 153, 0.8) 100%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50px;
  padding: 0.18rem 0.6rem;
  margin-left: 0.6rem;
  white-space: nowrap;
}
.demo-notice {
  font-size: 0.78rem;
  color: rgba(30, 30, 60, 0.6);
  background: rgba(47, 168, 230, 0.08);
  border: 1px dashed rgba(47, 168, 230, 0.35);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  margin: 0 0 1rem;
  line-height: 1.5;
}

/* ================= PAGE SHELL — the "Customs counter" light theme ================= */
.portal-shell {
  min-height: calc(100vh - 73px);
  background-color: #c8cdd4;
  background-image:
    radial-gradient(
      circle at 15% 20%,
      rgba(47, 168, 230, 0.1),
      transparent 45%
    ),
    radial-gradient(
      circle at 85% 80%,
      rgba(34, 215, 232, 0.08),
      transparent 45%
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.06) 2px,
      rgba(0, 0, 0, 0.06) 4px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.04) 2px,
      rgba(0, 0, 0, 0.04) 4px
    ),
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.55) 0%,
      rgba(200, 205, 212, 0.8) 40%,
      rgba(175, 182, 192, 0.9) 60%,
      rgba(220, 225, 230, 0.7) 100%
    );
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3rem 1.25rem;
}

.portal-wrap {
  width: 100%;
  max-width: 620px;
}

.customs-header {
  text-align: center;
  margin-bottom: 1.25rem;
}
.customs-flag-large {
  width: 100%;
  height: 130px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.6);
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.3),
    0 0 10px rgba(34, 215, 232, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  margin-bottom: 0.75rem;
}
.customs-flag-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.customs-title-new {
  font-family: "Cinzel", serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a2e;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  margin: 0 0 0.2rem;
}
.customs-subtitle-new {
  font-size: 0.75rem;
  font-weight: 800;
  color: #0fa8bf;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0;
}

/* ================= CARD ================= */
.portal-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  padding: 1.75rem 1.75rem 1.5rem;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.citizen-welcome-new {
  margin-bottom: 1rem;
}
.citizen-welcome-new h3 {
  font-family: "Cinzel", serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a1a2e;
  letter-spacing: 0.06em;
  margin: 0 0 0.3rem;
}
.citizen-welcome-new p {
  font-size: 0.9rem;
  color: rgba(30, 30, 60, 0.65);
  line-height: 1.5;
  margin: 0;
}

.citizen-label-new {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(30, 30, 60, 0.55);
  margin-bottom: 0.25rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.citizen-label-hint {
  font-weight: 400;
  opacity: 0.65;
  text-transform: none;
  letter-spacing: 0;
}

.citizen-input-new {
  width: 100%;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 6px;
  padding: 0.65rem 0.8rem;
  color: #111827;
  font-size: 0.92rem;
  font-family: "Inter", sans-serif;
  font-weight: 500;
  margin-bottom: 0.9rem;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.07);
  transition: all 0.3s ease;
}
.citizen-input-new::placeholder {
  color: rgba(0, 0, 0, 0.28);
}
.citizen-input-new:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(47, 168, 230, 0.45);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.05),
    0 0 0 2px rgba(47, 168, 230, 0.18);
}
.citizen-input-new:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.citizen-entry-btn {
  width: 100%;
  padding: 0.75rem;
  border-radius: 6px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, rgba(34, 215, 232, 0.92) 0%, rgba(47, 168, 230, 0.9) 60%, rgba(52, 211, 153, 0.8) 100%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.55);
  cursor: pointer;
  font-family: "Cinzel", serif;
  font-size: 0.92rem;
  letter-spacing: 0.18em;
  margin-top: 0.25rem;
  box-shadow:
    0 4px 12px rgba(34, 215, 232, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  text-transform: uppercase;
  text-decoration: none;
  display: block;
  text-align: center;
}
.citizen-entry-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 18px rgba(34, 215, 232, 0.5),
    0 0 14px rgba(47, 168, 230, 0.3);
}
.citizen-entry-btn:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
}
.citizen-entry-btn.secondary {
  background: rgba(30, 30, 60, 0.08);
  color: #1a1a2e;
  box-shadow: none;
  border: 1px solid rgba(0, 0, 0, 0.12);
}
.citizen-entry-btn.secondary:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.citizen-auth-msg {
  font-size: 0.78rem;
  line-height: 1.4;
  margin: 0.6rem 0 0;
  min-height: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.citizen-auth-msg.error {
  color: #0fa8bf;
}
.citizen-auth-msg.info {
  color: #c41540;
}
.citizen-auth-msg[hidden] {
  display: none;
}

.citizen-links-row {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}
.citizen-link {
  font-size: 0.8rem;
  color: rgba(0, 0, 0, 0.55);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.citizen-link:hover {
  color: #0fa8bf;
}

.citizen-divider {
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(0, 0, 0, 0.15),
    transparent
  );
  margin: 1.5rem 0;
}

/* ================= PROFILE ================= */
.profile-identity {
  text-align: center;
  margin-bottom: 1.25rem;
}
.profile-identity h1 {
  font-family: "Cinzel", serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 0.35rem;
  letter-spacing: 0.02em;
}
.profile-status-badge {
  display: inline-block;
  font-family: "Cinzel", serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, rgba(34, 215, 232, 0.92) 0%, rgba(47, 168, 230, 0.9) 60%, rgba(52, 211, 153, 0.8) 100%);
  padding: 0.3rem 0.85rem;
  border-radius: 50px;
  box-shadow: 0 3px 9px rgba(34, 215, 232, 0.35);
}

.profile-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1.25rem;
  margin-bottom: 1.5rem;
}
.profile-detail-grid .full-width {
  grid-column: 1 / -1;
}
.profile-detail-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(30, 30, 60, 0.5);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.15rem;
}
.profile-detail-value {
  font-size: 0.98rem;
  font-weight: 600;
  color: #1a1a2e;
  word-break: break-word;
}

.citizen-docs-grid {
  display: flex;
  flex-direction: column;
}
.citizen-doc-box {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  background: #000;
  aspect-ratio: 4/3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}
.citizen-doc-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  margin: auto;
  border-radius: 7px;
}
.citizen-doc-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  padding: 0.3rem 0.3rem 0.35rem;
}
.citizen-doc-placeholder {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
}

/* ---- Passport cover + page, side by side (profile.html) ---- */
.passport-doc-box {
  width: 100%;
  display: flex;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
}
.passport-side {
  position: relative;
  flex: 1 1 0;
  aspect-ratio: 265 / 349;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  background: #000;
}
.passport-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.portal-loading {
  text-align: center;
  color: rgba(30, 30, 60, 0.55);
  font-size: 0.9rem;
  padding: 2rem 0;
}
.portal-form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}

/* ================= BRAND BLOCK — backend pages carry GEMNETWORK branding ================= */
.brand-network {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  font-family: "Cinzel", serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  font-size: 1.05rem;
  text-decoration: none;
  line-height: 1.25;
}
.brand-network small {
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  color: #22d7e8;
  text-transform: uppercase;
  text-decoration: none;
}
.portal-logo-link,
.portal-logo-link:hover {
  text-decoration: none;
}
.portal-logo-link {
  align-items: center;
  line-height: 1.2;
}

/* ================= SUPPORT POPUP — shared across every page (js/support.js) ================= */
.support-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  background: rgba(3, 6, 12, 0.72);
  backdrop-filter: blur(6px);
}
.support-overlay.open {
  display: flex;
}
.support-modal {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 14px;
  padding: 1.8rem 1.9rem 1.6rem;
  color: #e8f6f9;
  background:
    linear-gradient(160deg, rgba(34, 215, 232, 0.07), rgba(0, 0, 0, 0) 45%),
    repeating-linear-gradient(45deg, #23272c 0 3px, #191c20 3px 6px),
    #1b1e22;
  border: 1px solid rgba(34, 215, 232, 0.45);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.6),
    0 0 32px rgba(34, 215, 232, 0.18);
}
.support-close {
  position: absolute;
  top: 0.7rem;
  right: 0.8rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(34, 215, 232, 0.4);
  background: rgba(0, 0, 0, 0.35);
  color: #22d7e8;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
}
.support-close:hover {
  background: rgba(34, 215, 232, 0.18);
  box-shadow: 0 0 12px rgba(34, 215, 232, 0.4);
}
.support-modal h2 {
  font-family: "Cinzel", serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 0.2rem;
  color: #fff;
  text-shadow: 0 0 14px rgba(34, 215, 232, 0.45);
}
.support-modal .support-sub {
  font-size: 0.78rem;
  color: rgba(232, 246, 249, 0.65);
  margin: 0 0 1.1rem;
  line-height: 1.5;
}
.support-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}
.support-channel {
  flex: 1 1 220px;
  border-radius: 9px;
  padding: 0.7rem 0.85rem;
  background: rgba(34, 215, 232, 0.07);
  border: 1px solid rgba(34, 215, 232, 0.3);
}
.support-channel .chan-label {
  display: block;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #22d7e8;
  margin-bottom: 0.2rem;
}
.support-channel .chan-value {
  font-size: 0.86rem;
  font-weight: 600;
  color: #fff;
  word-break: break-word;
}
.support-form label {
  display: block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(232, 246, 249, 0.7);
  margin: 0.85rem 0 0.3rem;
}
.support-form label .req {
  color: #22d7e8;
}
.support-form input,
.support-form textarea {
  width: 100%;
  box-sizing: border-box;
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font: inherit;
  font-size: 0.88rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(34, 215, 232, 0.28);
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.support-form input:focus,
.support-form textarea:focus {
  border-color: #22d7e8;
  box-shadow: 0 0 10px rgba(34, 215, 232, 0.35);
}
.support-form textarea {
  min-height: 110px;
  resize: vertical;
}
.support-send {
  margin-top: 1.1rem;
  width: 100%;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  padding: 0.75rem 1rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: #04131a;
  background: linear-gradient(
    135deg,
    rgba(34, 215, 232, 0.95) 0%,
    rgba(47, 168, 230, 0.92) 60%,
    rgba(52, 211, 153, 0.85) 100%
  );
  box-shadow: 0 6px 18px rgba(34, 215, 232, 0.3);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.support-send:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(34, 215, 232, 0.45);
}
.support-privacy {
  font-size: 0.64rem;
  color: rgba(232, 246, 249, 0.45);
  margin: 0.7rem 0 0;
  line-height: 1.5;
  text-align: center;
}
.support-thanks {
  display: none;
  text-align: center;
  padding: 1.6rem 0.4rem;
}
.support-thanks h3 {
  font-family: "Cinzel", serif;
  font-size: 1.05rem;
  color: #fff;
  letter-spacing: 0.08em;
  margin: 0 0 0.5rem;
  text-shadow: 0 0 14px rgba(34, 215, 232, 0.45);
}
.support-thanks p {
  font-size: 0.82rem;
  color: rgba(232, 246, 249, 0.75);
  line-height: 1.6;
  margin: 0;
}
.foot-support-link {
  color: #22d7e8;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: text-shadow 0.2s ease;
}
.foot-support-link:hover {
  text-shadow: 0 0 12px rgba(34, 215, 232, 0.8);
}

@media (max-width: 560px) {
  .portal-shell {
    padding: 1.75rem 1rem;
  }
  .portal-card {
    padding: 1.35rem 1.15rem;
  }
  .customs-title-new {
    font-size: 1.2rem;
  }
  .profile-detail-grid,
  .portal-form-row-2 {
    grid-template-columns: 1fr;
  }
  .portal-nav {
    gap: 0.9rem;
  }
  .portal-nav a,
  .portal-nav-btn {
    font-size: 0.68rem;
  }
  .portal-logo {
    height: 42px;
  }
}
