/* ════════════════════════════════════════════════════════════════
   Magnum Vault Momentum Design System: shared stylesheet
   Used by every HTML page served by evergreen-worker.
   V3.0.0 · 2026-06-08
   ════════════════════════════════════════════════════════════════ */

:root {
  /* PRIMARY GOLD PALETTE */
  --mv-gold:               #fabd59;
  --mv-gold-dark:          #d4a950;
  --mv-gold-border:        #b8893e;
  --mv-gold-glow:          rgba(250, 189, 89, 0.4);
  --mv-gold-subtle:        rgba(250, 189, 89, 0.1);
  --mv-gold-border-subtle: rgba(250, 189, 89, 0.3);
  --mv-border-card:        rgba(184, 137, 62, 0.3);

  /* BACKGROUNDS */
  --mv-bg-primary:         #000000;
  --mv-bg-card:            #1a1a1a;
  --mv-bg-elevated:        rgba(0, 0, 0, 0.95);
  --mv-bg-glass:           rgba(0, 0, 0, 0.6);

  /* TEXT */
  --mv-text-primary:       #ffffff;
  --mv-text-secondary:     #cccccc;
  --mv-text-muted:         #888888;
  --mv-text-dim:           #666666;

  /* ACCENT (urgency only) */
  --mv-red:                #DC143C;
  --mv-red-subtle:         rgba(220, 20, 60, 0.1);
  --mv-green-dot:          #22c55e;

  /* BORDERS */
  --mv-border:             #333333;

  /* SPACING & SHAPES */
  --mv-section-pad:        80px;
  --mv-container-max:      1400px;
  --mv-container-narrow:   1200px;
  --mv-container-text:     1000px;
  --mv-container-pad:      20px;
  --mv-card-pad:           30px;
  --mv-card-radius:        10px;
  --mv-card-radius-lg:     15px;
  --mv-card-radius-xl:     20px;
  --mv-btn-radius:         10px;

  /* TYPOGRAPHY */
  --mv-font-display:       'Russo One', sans-serif;
  --mv-font-body:          'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mv-font-mono:          'Menlo', 'Monaco', monospace;
}

/* ── Reset ─────────────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Animations ────────────────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}
@keyframes goldPulse {
  0%, 100% { box-shadow: 0 0 50px rgba(250, 189, 89, 0.4); }
  50%      { box-shadow: 0 0 80px rgba(250, 189, 89, 0.6); }
}
@keyframes borderSlide {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
@keyframes scannerMove {
  0%   { left: -100%; }
  100% { left: 100%; }
}

/* ── Base body ─────────────────────────────────────────────────── */
body {
  font-family: var(--mv-font-body);
  background: var(--mv-bg-primary);
  color: var(--mv-text-primary);
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.55;
  position: relative;
}

/* Atmospheric Magnum Vault gear image, fixed at low opacity behind everything. */
body.mv-atmospheric::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url('/assets/brand/gear.jpeg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  opacity: 0.1;
  z-index: -1;
  pointer-events: none;
}

/* ── Top bar (brand + breadcrumb) ──────────────────────────────── */
.mv-top-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 36px;
  border-bottom: 1px solid var(--mv-border-card);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
}
.mv-brand-cluster { display: flex; align-items: center; gap: 18px; }
.mv-brand-name {
  font-family: var(--mv-font-display);
  font-size: 18px;
  letter-spacing: 0.18em;
  background: linear-gradient(90deg, #ffffff 0%, var(--mv-gold) 50%, #ffffff 100%);
  background-size: 1000px 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}
.mv-brand-divider { color: var(--mv-gold-border); font-size: 16px; }
.mv-page-name {
  font-family: var(--mv-font-display);
  font-size: 13px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--mv-text-muted);
}

/* ── Container ─────────────────────────────────────────────────── */
.mv-container {
  max-width: var(--mv-container-text);
  margin: 0 auto;
  padding: 48px 32px 80px;
}
.mv-container--wide  { max-width: var(--mv-container-narrow); }
.mv-container--xwide { max-width: var(--mv-container-max); }

/* ── Page header ───────────────────────────────────────────────── */
.mv-page-header { margin-bottom: 32px; }
.mv-page-title {
  font-family: var(--mv-font-display);
  font-size: 44px;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #ffffff 0%, var(--mv-gold) 50%, #ffffff 100%);
  background-size: 1000px 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
  text-transform: uppercase;
  line-height: 1.15;
}
.mv-page-eyebrow {
  font-family: var(--mv-font-display);
  font-size: 13px;
  letter-spacing: 0.24em;
  color: var(--mv-gold);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.mv-page-blurb {
  font-size: 16px;
  color: var(--mv-text-secondary);
  margin-top: 18px;
  max-width: 720px;
  line-height: 1.6;
}
.mv-gold-line {
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, var(--mv-gold), var(--mv-gold-dark));
  margin: 16px 0 0;
  border-radius: 2px;
}
.mv-gold-line--center { margin-left: auto; margin-right: auto; }

/* ── Section box (numbered glass-morphism) ─────────────────────── */
.mv-section {
  background: linear-gradient(135deg, rgba(250, 189, 89, 0.04) 0%, rgba(0, 0, 0, 0.88) 100%);
  border: 2px solid var(--mv-border-card);
  border-radius: var(--mv-card-radius-lg);
  padding: 32px;
  margin-bottom: 26px;
  position: relative;
}
.mv-section::before {
  content: '';
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--mv-gold) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: borderSlide 5s linear infinite;
  border-radius: var(--mv-card-radius-lg) var(--mv-card-radius-lg) 0 0;
}
.mv-section-header {
  display: flex; align-items: baseline; gap: 18px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.mv-section-header-left { display: flex; align-items: baseline; gap: 18px; }
.mv-section-number {
  font-family: var(--mv-font-display);
  font-size: 14px;
  letter-spacing: 0.18em;
  color: var(--mv-gold);
  font-weight: 400;
}
.mv-section-title {
  font-family: var(--mv-font-display);
  font-size: 22px;
  letter-spacing: 0.06em;
  color: var(--mv-text-primary);
  text-transform: uppercase;
}
.mv-section-blurb {
  font-size: 14px;
  color: var(--mv-text-muted);
  margin-bottom: 22px;
  margin-top: 4px;
  max-width: 720px;
  line-height: 1.6;
}

/* ── Form fields ───────────────────────────────────────────────── */
.mv-field { margin-bottom: 20px; }
.mv-field-row {
  display: flex; gap: 18px; margin-bottom: 20px;
}
.mv-field-row > .mv-field { flex: 1; margin-bottom: 0; }

.mv-label {
  display: block;
  font-family: var(--mv-font-body);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--mv-text-secondary);
  margin-bottom: 8px;
  font-weight: 600;
}
.mv-label .mv-req { color: var(--mv-red); margin-left: 4px; }

.mv-input,
input[type="text"], input[type="email"], input[type="tel"],
input[type="time"], input[type="date"], input[type="number"],
input[type="url"], input[type="password"],
select, textarea {
  width: 100%;
  padding: 13px 16px;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid var(--mv-border-card);
  border-radius: 8px;
  color: var(--mv-text-primary);
  font-family: var(--mv-font-body);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--mv-gold);
  background: rgba(250, 189, 89, 0.03);
  box-shadow: 0 0 16px rgba(250, 189, 89, 0.15);
}
input[readonly] { opacity: 0.65; cursor: not-allowed; }
textarea { resize: vertical; min-height: 100px; line-height: 1.5; }

/* Date & time inputs: native picker indicators need help on dark theme. */
input[type="date"], input[type="time"] {
  cursor: pointer;
  color-scheme: dark;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(78%) sepia(56%) saturate(384%) hue-rotate(353deg) brightness(101%) contrast(94%);
  cursor: pointer;
  width: 18px; height: 18px;
  opacity: 0.85;
  transition: opacity 0.15s;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

/* Select dropdown arrow */
select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' stroke='%23fabd59' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
  padding-right: 38px;
  cursor: pointer;
}

.mv-hint {
  font-size: 13px;
  color: var(--mv-text-muted);
  margin-top: 8px;
  line-height: 1.55;
}
.mv-hint code {
  background: var(--mv-gold-subtle);
  padding: 2px 7px;
  border-radius: 4px;
  font-family: var(--mv-font-mono);
  font-size: 13px;
  color: var(--mv-gold);
}
.mv-hint a {
  color: var(--mv-gold);
  text-decoration: underline;
  text-decoration-color: rgba(250, 189, 89, 0.4);
}
.mv-hint a:hover { text-decoration-color: var(--mv-gold); }

/* ── Buttons ───────────────────────────────────────────────────── */
.mv-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--mv-btn-radius);
  font-family: var(--mv-font-display);
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border: 0;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.mv-btn--primary {
  background: linear-gradient(135deg, var(--mv-gold) 0%, var(--mv-gold-dark) 100%);
  color: var(--mv-bg-primary);
}
.mv-btn--primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(250, 189, 89, 0.4);
}
.mv-btn--secondary {
  background: transparent;
  border: 2px solid rgba(136, 136, 136, 0.4);
  color: var(--mv-text-secondary);
}
.mv-btn--secondary:hover {
  border-color: var(--mv-text-muted);
  color: var(--mv-text-primary);
}
.mv-btn--ghost {
  background: rgba(250, 189, 89, 0.05);
  border: 2px solid var(--mv-gold);
  color: var(--mv-gold);
}
.mv-btn--ghost:hover {
  background: rgba(250, 189, 89, 0.12);
  transform: translateY(-2px);
}
.mv-btn:disabled { opacity: 0.5; cursor: wait; }

.mv-row-btn {
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--mv-border-card);
  border-radius: 6px;
  color: var(--mv-text-secondary);
  font-family: var(--mv-font-display);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}
.mv-row-btn:hover {
  border-color: var(--mv-gold);
  color: var(--mv-gold);
  background: rgba(250, 189, 89, 0.06);
}
.mv-row-btn.copied {
  background: rgba(34, 197, 94, 0.12);
  border-color: #4ade80;
  color: #4ade80;
}

/* ── Status pills ──────────────────────────────────────────────── */
.mv-pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: var(--mv-font-display);
}
.mv-pill--published {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.4);
}
.mv-pill--draft {
  background: rgba(250, 189, 89, 0.12);
  color: var(--mv-gold);
  border: 1px solid rgba(250, 189, 89, 0.4);
}
.mv-pill--archived {
  background: rgba(120, 120, 120, 0.1);
  color: var(--mv-text-muted);
  border: 1px solid rgba(120, 120, 120, 0.3);
}

/* ── Live indicator ────────────────────────────────────────────── */
/* Squared, not round. The no-round rule has no size exemption, and an
   8px square reads as a live indicator just as clearly. */
.mv-live-dot {
  width: 8px; height: 8px; border-radius: 2px;
  background: var(--mv-green-dot);
  animation: livePulse 2s ease-in-out infinite;
  display: inline-block;
  margin-right: 8px;
}

/* ── Footer stamp (dual version) ───────────────────────────────── */
.mv-footer-stamp {
  margin-top: 60px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: rgba(250, 189, 89, 0.5);
  font-family: var(--mv-font-mono);
}
.mv-footer-stamp .sep { color: rgba(250, 189, 89, 0.25); margin: 0 8px; }
.mv-footer-copy {
  margin-top: 18px;
  text-align: center;
  font-size: 12px;
  color: var(--mv-text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ── Toast notifications ───────────────────────────────────────── */
.mv-toast {
  position: fixed;
  bottom: 36px;
  right: 36px;
  padding: 14px 22px;
  border-radius: 8px;
  font-size: 14px;
  letter-spacing: 0.02em;
  display: none;
  z-index: 200;
  font-weight: 500;
}
.mv-toast--success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid #4ade80;
  color: #4ade80;
  display: block;
}
.mv-toast--error {
  background: rgba(220, 20, 60, 0.12);
  border: 1px solid var(--mv-red);
  color: #ff8fa3;
  display: block;
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 992px) {
  .mv-page-title { font-size: 36px; }
}
@media (max-width: 768px) {
  .mv-top-bar { padding: 16px 20px; flex-wrap: wrap; gap: 12px; }
  .mv-container { padding: 28px 20px 60px; }
  .mv-page-title { font-size: 28px; }
  .mv-section { padding: 22px 20px; }
  .mv-section-title { font-size: 18px; }
  .mv-field-row { flex-direction: column; gap: 18px; }
  .mv-field-row > .mv-field { margin-bottom: 0; }
}
@media (max-width: 480px) {
  .mv-page-title { font-size: 24px; }
  .mv-section { padding: 18px 16px; }
}
