/* SealedChain Phase 1 — shared styling, using the brand palette from
   Section 18 of the master document. */

:root {
  --void: #020205;
  --deep-ink: #080f28;
  --steel-shadow: #0e1c38;
  --jewel-blue: #1448d8;
  --steel-blue: #4070c8;
  --chrome-blue: #80a8e0;
  --silver: #ccdcf8;
  --chrome-white: #f0f6ff;
  --white: #ffffff;

  --error: #d84a4a; /* used sparingly, never as the only signal (colorblind-safe: paired with text/icons below) */
  --success: #2fae7a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--void);
  color: var(--chrome-white);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  padding: 24px 16px 60px;
}

.wrap {
  max-width: 560px;
  margin: 0 auto;
}

.config-warning {
  background: var(--error);
  color: white;
  padding: 10px 16px;
  font-size: 13px;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 10;
}

header.app-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--steel-shadow);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 0;
}

.brand-mark img {
  display: block;
  height: 28px;
  width: auto;
}

.brand-mark img.brand-logo {
  height: 26px;
}

nav.tabs {
  display: flex;
  gap: 8px;
}

nav.tabs a {
  color: var(--chrome-blue);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--steel-shadow);
}

nav.tabs a.active {
  background: var(--deep-ink);
  color: var(--chrome-white);
  border-color: var(--jewel-blue);
}

.header-left {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.auth-status {
  font-size: 13px;
  color: var(--silver);
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.auth-email {
  color: var(--chrome-white);
}

.link-btn {
  background: none;
  border: 1px solid var(--steel-shadow);
  color: var(--chrome-blue);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.link-btn:hover {
  border-color: var(--jewel-blue);
}

.card {
  background: var(--deep-ink);
  border: 1px solid var(--steel-shadow);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 13px;
  color: var(--silver);
  margin-bottom: 6px;
  margin-top: 16px;
}

label:first-child {
  margin-top: 0;
}

select, input[type="text"], input[type="file"], textarea {
  width: 100%;
  background: var(--steel-shadow);
  border: 1px solid var(--steel-blue);
  color: var(--chrome-white);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
}

textarea {
  resize: vertical;
  min-height: 60px;
}

button {
  margin-top: 20px;
  width: 100%;
  background: var(--jewel-blue);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

button:disabled {
  background: var(--steel-shadow);
  color: var(--silver);
  cursor: not-allowed;
}

button:hover:not(:disabled) {
  background: var(--steel-blue);
}

.status-line {
  font-size: 13px;
  color: var(--silver);
  margin-top: 12px;
  min-height: 18px;
}

.status-line.error {
  color: var(--error);
}

.status-line.error::before {
  content: "⚠ ";
}

.status-line.success {
  color: var(--success);
}

.status-line.success::before {
  content: "✓ ";
}

.result {
  text-align: center;
}

.result .serial {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--chrome-white);
  margin: 12px 0;
}

.result #qr-canvas {
  background: white;
  padding: 12px;
  border-radius: 8px;
  display: inline-block;
  margin: 12px 0;
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
}

.badge.sealed { background: var(--steel-shadow); color: var(--chrome-blue); }
.badge.verified { background: rgba(47, 174, 122, 0.15); color: var(--success); }
.badge.flagged { background: rgba(216, 74, 74, 0.15); color: var(--error); }
.badge.stub { background: var(--steel-shadow); color: var(--silver); }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.photo-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--steel-shadow);
}

.field-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--steel-shadow);
  font-size: 13px;
}

.field-row:last-child {
  border-bottom: none;
}

.field-row .k {
  color: var(--silver);
}

.field-row .v {
  color: var(--chrome-white);
  font-weight: 600;
}

.timeline {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.timeline-step {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--steel-shadow);
}

.timeline-step:last-child {
  border-bottom: none;
}

.timeline-marker {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  border: 1px solid var(--steel-shadow);
  color: var(--silver);
}

.timeline-step.done .timeline-marker {
  background: var(--jewel-blue);
  border-color: var(--jewel-blue);
  color: var(--chrome-white);
}

.timeline-title {
  font-size: 14px;
  color: var(--chrome-white);
  font-weight: 600;
}

.timeline-subtitle {
  font-size: 12.5px;
  color: var(--silver);
  margin-top: 2px;
}

/* Community tab (Phase 7 preview) — hot/cold grid, predictions poll,
   SC Score card, newsletter signup. All demo/preview UI — see tracker.js. */

.section-heading {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--chrome-blue);
  margin: 20px 0 10px;
}

.section-heading:first-child {
  margin-top: 0;
}

.hotcold-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 8px;
}

@media (max-width: 480px) {
  .hotcold-grid { grid-template-columns: 1fr; }
}

.hotcold-col {
  background: var(--steel-shadow);
  border-radius: 10px;
  padding: 12px 14px;
}

.hotcold-col .col-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hotcold-col.hot .col-title { color: var(--chrome-white); }
.hotcold-col.cold .col-title { color: var(--chrome-white); }

.hotcold-item {
  padding: 7px 0;
  border-bottom: 1px solid rgba(204, 220, 248, 0.12);
}

.hotcold-item:last-child { border-bottom: none; }

.hotcold-item .name {
  font-size: 12.5px;
  color: var(--chrome-white);
  line-height: 1.35;
}

.hotcold-item .change {
  font-size: 11.5px;
  margin-top: 2px;
}

.hotcold-item .change.up { color: var(--success); }
.hotcold-item .change.down { color: var(--error); }

.poll {
  background: var(--steel-shadow);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 8px;
}

.poll .poll-q {
  font-size: 13.5px;
  color: var(--chrome-white);
  margin-bottom: 12px;
  font-weight: 600;
}

.poll-option {
  margin-bottom: 10px;
  cursor: pointer;
}

.poll-option:last-child { margin-bottom: 0; }

.poll-option .poll-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--silver);
  margin-bottom: 4px;
}

.poll-option .poll-label-row strong {
  color: var(--chrome-white);
}

.poll-bar-track {
  height: 8px;
  background: rgba(204, 220, 248, 0.12);
  border-radius: 999px;
  overflow: hidden;
}

.poll-bar-fill {
  height: 100%;
  background: var(--jewel-blue);
  border-radius: 999px;
}

.poll-note {
  font-size: 11.5px;
  color: var(--silver);
  margin-top: 10px;
}

.sc-score-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--steel-shadow);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 8px;
}

.sc-score-ring {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid var(--jewel-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--chrome-white);
}

.sc-score-text {
  font-size: 12.5px;
  color: var(--silver);
  line-height: 1.5;
}

.sc-score-text strong {
  color: var(--chrome-white);
}

.newsletter-box {
  background: var(--steel-shadow);
  border-radius: 10px;
  padding: 14px 16px;
}

.newsletter-box .newsletter-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--chrome-white);
  margin-bottom: 4px;
}

.newsletter-box .newsletter-sub {
  font-size: 12px;
  color: var(--silver);
  margin-bottom: 10px;
}

.newsletter-form {
  display: flex;
  gap: 8px;
}

.newsletter-form input[type="email"] {
  flex: 1;
  background: var(--void);
  border: 1px solid var(--steel-blue);
  color: var(--chrome-white);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
}

.newsletter-form button {
  margin-top: 0;
  width: auto;
  padding: 9px 16px;
  font-size: 13px;
  white-space: nowrap;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--steel-shadow);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 8px;
}

.profile-avatar {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--jewel-blue);
  color: var(--chrome-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
}

.profile-text {
  font-size: 12.5px;
  color: var(--silver);
  line-height: 1.5;
}

.profile-text strong {
  color: var(--chrome-white);
  font-size: 13.5px;
}

/* Social login buttons (login.html) */

.oauth-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.oauth-btn {
  width: 100%;
  margin-top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--steel-shadow);
  color: var(--chrome-white);
  border: 1px solid var(--steel-blue);
  border-radius: 8px;
  padding: 11px 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.oauth-btn:hover:not(:disabled) {
  border-color: var(--jewel-blue);
}

.oauth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.oauth-btn svg {
  flex: none;
  width: 18px;
  height: 18px;
}

.oauth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--silver);
  font-size: 12px;
  margin: 4px 0 20px;
}

.oauth-divider::before,
.oauth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--steel-shadow);
}

/* Landing gate (index.html) — minimal logo-only screen shown until signed in */

.landing-gate[hidden] {
  display: none;
}

.landing-gate {
  min-height: 100vh;
  margin: -24px -16px -60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
  padding: 24px;
}

.landing-logo {
  display: block;
  width: 72px;
  height: 72px;
}

.landing-wordmark {
  display: block;
  height: 30px;
  width: auto;
}

.landing-tagline {
  color: var(--silver);
  font-size: 15px;
  margin: 4px 0 8px;
}

.landing-cta {
  display: inline-block;
  background: var(--jewel-blue);
  color: white;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 32px;
  border-radius: 8px;
}

.landing-cta:hover {
  background: var(--steel-blue);
}
