/* ============================================================
   Stay Vault Days — Web Vault Panel styles
   Inherits tokens from styles.css (dark premium theme).
   ============================================================ */

.vault-main { min-height: calc(100vh - 80px); padding: 48px 0 96px; }
.vault-wrap { max-width: 980px; margin: 0 auto; padding: 0 24px; }

/* ---- shared panel ---- */
.panel {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
}

/* ---- intro / trust banner ---- */
.vault-intro { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.vault-intro .eyebrow {
  color: var(--gold); font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; font-size: 13px;
}
.vault-intro h1 {
  font-family: var(--font-display); font-size: 42px; line-height: 1.1;
  margin: 14px 0 12px; color: var(--text);
}
.vault-intro p { color: var(--muted); font-size: 18px; line-height: 1.6; }

/* ---- the key-lock graphic ---- */
.vault-door {
  width: 132px; height: 132px; margin: 0 auto 28px; position: relative;
  display: grid; place-items: center;
}
.vault-door .ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--line);
  background: radial-gradient(circle at 35% 30%, rgba(79,108,255,0.18), transparent 60%);
}
.vault-door .ring::after {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  border: 1px dashed rgba(138,155,255,0.25);
  animation: vault-spin 26s linear infinite;
}
.vault-door .shackle {
  width: 56px; height: 44px; border: 7px solid var(--gold);
  border-bottom: none; border-radius: 30px 30px 0 0;
  position: relative; top: 14px;
  transition: transform 0.5s cubic-bezier(.2,.8,.2,1), opacity 0.4s;
}
.vault-door .body {
  width: 78px; height: 60px; background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  border-radius: 12px; position: relative; top: -2px;
  box-shadow: 0 10px 30px rgba(242,200,121,0.25);
  display: grid; place-items: center;
}
.vault-door .body::after {
  content: ""; width: 12px; height: 12px; border-radius: 50%;
  background: #2a1e05; box-shadow: 0 14px 0 -4px #2a1e05;
}
.vault-door.opened .shackle { transform: translateY(-10px) rotate(22deg); transform-origin: right bottom; }
@keyframes vault-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .vault-door .ring::after { animation: none; }
}

/* ---- dropzone ---- */
.dropzone {
  border: 2px dashed rgba(138,155,255,0.35); border-radius: 14px;
  padding: 28px; text-align: center; cursor: pointer; transition: all 0.2s;
  background: rgba(79,108,255,0.04); margin-bottom: 18px;
}
.dropzone:hover, .dropzone.drag { border-color: var(--indigo-soft); background: rgba(79,108,255,0.10); }
.dropzone .dz-icon { font-size: 30px; }
.dropzone .dz-title { font-weight: 600; color: var(--text); margin-top: 8px; }
.dropzone .dz-sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
#fileLabel { color: var(--indigo-soft); font-size: 14px; font-weight: 600; }

/* ---- key field ---- */
.key-row { display: flex; gap: 10px; margin-bottom: 14px; }
.key-field { position: relative; flex: 1; }
.key-field input {
  width: 100%; padding: 16px 60px 16px 16px; font-size: 17px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px;
  color: var(--text); font-family: var(--font-body);
}
.key-field input:focus { outline: none; border-color: var(--indigo); }
.key-field .reveal {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 13px; font-weight: 600;
}

/* ---- buttons ---- */
.btn {
  font-family: var(--font-body); font-weight: 600; font-size: 16px;
  padding: 15px 26px; border-radius: 12px; border: none; cursor: pointer;
  transition: transform 0.15s, opacity 0.2s; display: inline-flex; align-items: center; gap: 8px;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--indigo); color: #fff; width: 100%; justify-content: center; }
.btn-gold { background: linear-gradient(180deg, var(--gold), var(--gold-deep)); color: #2a1e05; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-danger { background: transparent; color: var(--red); border: 1px solid rgba(239,68,68,0.4); }

/* ---- key-lock education cards ---- */
.key-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 26px; }
.key-fact { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.key-fact .kf-ic { font-size: 22px; }
.key-fact h4 { font-size: 15px; margin: 8px 0 4px; color: var(--text); }
.key-fact p { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 0; }
.key-warn {
  margin-top: 18px; padding: 16px 18px; border-radius: 12px;
  background: rgba(242,179,94,0.08); border: 1px solid rgba(242,179,94,0.3);
  color: var(--amber); font-size: 14px; line-height: 1.55; display: flex; gap: 10px;
}
.key-warn b { color: var(--text); }

/* ---- unlocked: header ---- */
.vault-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; flex-wrap: wrap; gap: 12px; }
.vault-head .vh-left { display: flex; align-items: center; gap: 12px; }
.vault-head .vh-badge {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(95,208,163,0.12); color: var(--green); font-size: 20px;
}
.vault-head h2 { font-family: var(--font-display); font-size: 24px; margin: 0; }
.vault-head .vh-file { color: var(--muted); font-size: 13px; }
.vh-actions { display: flex; gap: 10px; align-items: center; }
.dirty-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--amber); }

/* ---- stats ---- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 18px; text-align: center; }
.stat .num { font-family: var(--font-display); font-size: 30px; color: var(--text); }
.stat .lbl { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* ---- trips table ---- */
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 12px; }
.section-title h3 { font-size: 17px; margin: 0; }
table.trips { width: 100%; border-collapse: collapse; }
table.trips th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted-2); padding: 8px 10px; border-bottom: 1px solid var(--line);
}
table.trips td { padding: 11px 10px; border-bottom: 1px solid var(--line); color: var(--text); font-size: 15px; }
table.trips td.num { text-align: right; font-variant-numeric: tabular-nums; }
.trips .empty { color: var(--muted); text-align: center; padding: 24px; }
.src { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; }
.src-manual { background: rgba(138,155,255,0.15); color: var(--indigo-soft); }
.src-photo { background: rgba(242,200,121,0.15); color: var(--gold); }
.src-gps { background: rgba(95,208,163,0.15); color: var(--green); }
.row-del { background: none; border: none; color: var(--muted-2); cursor: pointer; font-size: 15px; }
.row-del:hover { color: var(--red); }

/* ---- counters ---- */
.counters-list { display: grid; gap: 10px; margin-top: 4px; }
.counter-row { display: flex; align-items: center; gap: 14px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.counter-emoji { font-size: 22px; }
.counter-name { font-weight: 600; color: var(--text); }
.counter-sub { color: var(--muted); font-size: 13px; }

/* ---- save bar ---- */
.save-bar {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(120%);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 18px; display: flex; align-items: center; gap: 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.5); transition: transform 0.3s; z-index: 60;
}
.save-bar.show { transform: translateX(-50%) translateY(0); }
.save-bar .sb-text { color: var(--text); font-size: 14px; }

/* ---- dialog / modal ---- */
.modal { position: fixed; inset: 0; background: rgba(4,6,14,0.7); display: grid; place-items: center; z-index: 80; padding: 20px; }
.modal[hidden] { display: none; }
.modal .panel { max-width: 460px; width: 100%; }
.modal h3 { font-family: var(--font-display); font-size: 22px; margin: 0 0 10px; }
.modal p { color: var(--muted); line-height: 1.6; }
.modal .m-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal input {
  width: 100%; padding: 13px 14px; font-size: 16px; margin-top: 10px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; color: var(--text);
}

/* ---- toast ---- */
.toast {
  position: fixed; left: 50%; top: 24px; transform: translateX(-50%) translateY(-150%);
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  padding: 13px 20px; border-radius: 12px; font-size: 15px; z-index: 90; transition: transform 0.3s;
  max-width: 90vw; box-shadow: 0 14px 40px rgba(0,0,0,0.5);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.error { border-color: rgba(239,68,68,0.5); }
.toast.warn { border-color: rgba(242,179,94,0.5); }

@media (max-width: 720px) {
  .key-facts { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .vault-intro h1 { font-size: 32px; }
  table.trips th:nth-child(5), table.trips td:nth-child(5) { display: none; }
}

/* ---- Web vault globe + update notice (Phase 1) ---- */
.vr-notice{
  display:flex; gap:12px; align-items:flex-start;
  background:#eef2ff; border:1px solid #c7d2fe; border-radius:14px;
  padding:14px 16px; margin:0 0 20px; font-size:14px; line-height:1.5; color:#3730a3;
}
.vr-notice span{ font-size:18px; line-height:1.2; }
.vr-notice code{ background:#fff; padding:1px 6px; border-radius:6px; font-size:12px; }
.vr-globe-wrap{
  position:relative; width:100%; aspect-ratio:1/1; max-width:520px; margin:0 auto 24px;
  background:radial-gradient(circle at 50% 40%, #1c2348, #090b16);
  border-radius:20px; overflow:hidden;
}
#vaultGlobe{ position:absolute; inset:0; }
.vr-globe-hint{
  position:absolute; left:0; right:0; bottom:10px; text-align:center;
  font-size:11px; color:rgba(255,255,255,.5); pointer-events:none;
}
@media (prefers-color-scheme:dark){
  .vr-notice{ background:#161a2e; border-color:#2a3358; color:#c7d2fe; }
  .vr-notice code{ background:#0b0d14; }
}

/* ---- Shared fixed nav on the (dark) vault page ----
   components.css styles .nav as fixed + transparent; vault has no scroll JS and
   a dark surface, so pin a dark glass backdrop with light text + reserve space. */
.nav {
  background: rgba(11,15,28,0.82);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav .brand-name { color: #e8ebf7; }
.nav .brand-name b { color: #f2c879; }
.nav-links a { color: rgba(232,235,247,0.82); }
.nav-links a:hover { color: #f2c879; }
body { padding-top: 68px; }

/* ---- Self-contained mobile hamburger (vault loads no sections.css/site.js) ---- */
.nav .nav-toggle { display: none; background: none; border: 0; cursor: pointer; color: var(--text); padding: 6px; margin-left: auto; }
.nav .nav-toggle svg { width: 26px; height: 26px; display: block; }
@media (max-width: 820px) {
  .nav .nav-inner { flex-wrap: wrap; }
  .nav .nav-toggle { display: inline-flex; }
  .nav .nav-inner > .btn-nav { display: none; }
  .nav .nav-links { display: none; width: 100%; order: 3; flex-direction: column; gap: 0; }
  .nav .nav-inner.open .nav-links { display: flex; }
  .nav .nav-links a { padding: 14px 2px; border-bottom: 1px solid var(--line); font-size: 17px; }
}
