/* Shell styles shared by both apps: lock screen, sync banner, save status,
   and small layout tweaks needed now that Ledger lives in the tab bar. */

body.locked #app { visibility: hidden; }

/* ---------- lock screen ---------- */
.lock-screen {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 0%, rgba(232,163,61,.14), transparent 45%),
    radial-gradient(circle at 85% 100%, rgba(61,170,124,.12), transparent 45%),
    var(--bg);
}
.lock-screen[hidden] { display: none; }
.lock-card {
  width: 100%; max-width: 380px;
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: 20px; padding: 32px 28px 24px;
  box-shadow: var(--shadow);
  animation: lock-in .35s ease-out;
}
@keyframes lock-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.lock-mark { width: 40px; height: 40px; margin-bottom: 14px; }
.lock-card h1 { margin: 0 0 6px; font-size: 24px; font-weight: 600; }
.lock-lead { margin: 0 0 22px; color: var(--text-dim); font-size: 14px; line-height: 1.5; }
.lock-field { display: block; margin-bottom: 14px; }
.lock-field[hidden] { display: none; }
.lock-field span {
  display: block; margin-bottom: 6px;
  font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint);
}
.lock-field input {
  width: 100%; padding: 12px 14px;
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font: inherit; font-size: 15px;
}
.lock-field input:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-glow); }
.lock-error { min-height: 18px; margin: 0 0 10px; color: var(--coral); font-size: 13px; }
.lock-submit {
  width: 100%; padding: 12px; border: none; border-radius: 999px;
  background: var(--amber); color: #1a1407; font-weight: 600; font-size: 14.5px;
  transition: filter .15s;
}
.lock-submit:hover { filter: brightness(1.08); }
.lock-submit:disabled { opacity: .6; cursor: wait; }
.lock-foot { margin: 18px 0 0; text-align: center; color: var(--text-faint); font-size: 12px; letter-spacing: .04em; }

/* ---------- sync banner ---------- */
.ws-banner {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 900;
  display: flex; align-items: center; gap: 14px;
  width: calc(100% - 32px); max-width: 620px;
  padding: 12px 14px 12px 18px;
  background: var(--surface-2); border: 1px solid var(--coral); border-radius: 14px;
  box-shadow: var(--shadow); font-size: 13.5px; line-height: 1.45;
}
.ws-banner[hidden] { display: none; }
.ws-banner-text { flex: 1; }
.ws-banner button {
  flex: none; padding: 8px 16px; border: none; border-radius: 999px;
  background: var(--coral); color: #fff; font-weight: 600; font-size: 13px;
}

/* ---------- save status ---------- */
.save-status {
  display: inline-flex; align-items: center; gap: 6px;
  align-self: center; margin-right: 4px;
  font-size: 12px; color: var(--text-faint); white-space: nowrap;
}
.save-status:empty { display: none; }
.save-status::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--teal);
}
.save-status[data-state="saving"]::before { background: var(--amber); animation: pulse 1s ease-in-out infinite; }
.save-status[data-state="error"] { color: var(--coral); }
.save-status[data-state="error"]::before { background: var(--coral); }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- five tabs + topbar on small screens ---------- */
@media (max-width: 640px) {
  /* #app-qualified: Ascent's rules are @scope'd, which beats unscoped rules of equal specificity. */
  #app .topbar { flex-wrap: wrap; gap: 12px; }
  #app .topbar-actions { flex-wrap: wrap; }
  #app .view-tabs { overflow-x: auto; scrollbar-width: none; }
  #app .view-tabs::-webkit-scrollbar { display: none; }
  #app .view-tab { flex: 1 0 auto; white-space: nowrap; }
}
