:root {
  --bg: #0e0d0b;
  --surface: #191714;
  --surface-alt: #221f1a;
  --line: rgba(255, 244, 224, 0.11);
  --line-strong: rgba(255, 244, 224, 0.22);
  --text: #faf6ee;
  --text-dim: #a9a192;
  --honey: #f5a623;
  --honey-ink: #171209;
  --emerald: #34d399;
  --danger: #fb7185;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: radial-gradient(circle at top right, rgba(245, 166, 35, 0.08), transparent 45%), var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

.vault-shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 14px calc(env(safe-area-inset-bottom, 0px) + 20px);
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  gap: 12px;
}

.vault-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  border-radius: 10px;
  flex-shrink: 0;
}

.brand-title {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-dim);
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.banner {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.banner-error {
  border-color: rgba(251, 113, 133, 0.45);
  color: #fecdd3;
  background: rgba(251, 113, 133, 0.08);
}

.banner-success {
  border-color: rgba(52, 211, 153, 0.4);
  color: #a7f3d0;
  background: rgba(52, 211, 153, 0.08);
}

.vault-main {
  flex: 1;
}

.panel {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 16px;
}

.center-panel {
  max-width: 460px;
  margin: 18px auto;
}

.stack-sm {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stack-md {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.row-between {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.row-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}

h1, h2, h3, p {
  margin: 0;
}

.title-lg {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.title-md {
  font-size: 15px;
  font-weight: 700;
}

.muted {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.45;
}

.label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.input, .select {
  width: 100%;
  min-height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--text);
  padding: 0 11px;
  font-size: 13px;
  outline: none;
}

.input:focus, .select:focus {
  border-color: var(--honey);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 13px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: var(--surface-alt);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  opacity: 0.92;
}

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

.btn-honey {
  background: linear-gradient(135deg, #ffc247, #f5a623);
  border-color: transparent;
  color: var(--honey-ink);
  font-weight: 700;
}

.btn-danger {
  border-color: rgba(251, 113, 133, 0.4);
  color: #fecdd3;
  background: rgba(251, 113, 133, 0.12);
}

.btn-sm {
  min-height: 30px;
  padding: 0 10px;
  font-size: 11px;
  border-radius: 9px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
}

.pill-emerald {
  border-color: rgba(52, 211, 153, 0.4);
  color: var(--emerald);
  background: rgba(52, 211, 153, 0.08);
}

.pill-honey {
  border-color: rgba(245, 166, 35, 0.4);
  color: var(--honey);
  background: rgba(245, 166, 35, 0.08);
}

.recovery-box {
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed rgba(245, 166, 35, 0.55);
  background: rgba(245, 166, 35, 0.07);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  word-break: break-all;
  color: #ffd478;
}

.card-shell {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-highlight {
  border-color: var(--honey);
  box-shadow: 0 0 0 1px rgba(245, 166, 35, 0.35);
}

.card-visual {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 14px;
  min-height: 158px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #faf6ee;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 10px 24px rgba(0, 0, 0, 0.32);
}

.card-finish-metallic { background: linear-gradient(135deg, #27221B 0%, #16130F 55%, #0B0907 100%); }
.card-finish-obsidian { background: linear-gradient(135deg, #1E1C22 0%, #111014 60%, #09080A 100%); }
.card-finish-cobalt { background: linear-gradient(135deg, #12294B 0%, #0B1B33 60%, #071121 100%); }
.card-finish-emerald { background: linear-gradient(135deg, #11342A 0%, #0A201A 60%, #061410 100%); }
.card-finish-ruby { background: linear-gradient(135deg, #3D1422 0%, #240B14 60%, #14050B 100%); }
.card-finish-honey { background: linear-gradient(135deg, #52350B 0%, #2E1D06 60%, #170E03 100%); }

.card-bank {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #ffd478;
}

.card-name {
  font-size: 14px;
  font-weight: 700;
  margin-top: 2px;
}

.card-pan {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin: 12px 0 8px;
}

.card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.78);
}

.secret-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.secret-cell {
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 7px 8px;
}

.secret-cell-label {
  font-size: 10px;
  color: var(--text-dim);
}

.secret-cell-val {
  font-size: 12px;
  font-weight: 700;
  margin-top: 2px;
}

.vault-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 4px;
  font-size: 11px;
  color: var(--text-dim);
}

.vault-footer a {
  color: var(--honey);
  text-decoration: none;
  font-weight: 600;
}

@media (max-width: 600px) {
  .vault-shell {
    padding: 8px 10px 18px;
  }
  .panel {
    padding: 13px;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
}
