/* ─── Fonts (Geist via jsdelivr) ─── */
@font-face {
  font-family: "Geist";
  src: url("https://cdn.jsdelivr.net/npm/geist@1.3.1/dist/fonts/geist-sans/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("https://cdn.jsdelivr.net/npm/geist@1.3.1/dist/fonts/geist-mono/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* ─── Theme ─── */
:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --panel: #111111;
  --panel-2: #161616;
  --border: #1f1f1f;
  --border-strong: #2a2a2a;
  --fg: #ededed;
  --fg-muted: #888888;
  --fg-dim: #555555;
  --cursor: #7bafd4;
  --danger: #ef4444;
  --success: #10b981;
  --warning: #7bafd4;
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Consolas, monospace;

  --tabbar-h: 3.25rem;
}

* { box-sizing: border-box; }

/* Change this one value to scale the entire dashboard shell. */
html { font-size: 20px; }

body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

/* ─── Tab bar ─── */
.tabs {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--tabbar-h);
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: stretch;
  padding: 0 0.5rem 0 0;
  user-select: none;
  -webkit-app-region: drag;
}

.tab-list {
  display: flex;
  align-items: stretch;
  -webkit-app-region: no-drag;
}

.tab {
  display: flex;
  align-items: center;
  gap: 0.63rem;
  padding: 0 1rem;
  min-width: 11.25rem;
  max-width: 18.75rem;
  height: 100%;
  font-size: 1rem;
  color: var(--fg-muted);
  border-right: 1px solid var(--border);
  position: relative;
  cursor: pointer;
}
.tab:hover { color: var(--fg); background: var(--panel-2); }
.tab.active {
  color: var(--fg);
  background: var(--bg);
}

.tab-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.94rem;
  letter-spacing: 0.01em;
}

.tab-close {
  opacity: 0;
  color: var(--fg-dim);
  font-size: 1.13rem;
  line-height: 1;
  padding: 0.13rem 0.25rem;
  border-radius: 0.19rem;
  transition: opacity 0.1s;
}
.tab:hover .tab-close, .tab.active .tab-close { opacity: 1; }
.tab-close:hover { color: var(--fg); background: var(--border-strong); }

.tab-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--fg-dim);
  flex-shrink: 0;
}
.tab.active .tab-dot {
  background: #f5f5f5;
  box-shadow: 0 0 0.5rem rgba(245, 245, 245, 0.45);
}
.tab-dot.waiting { background: #7bafd4; }
.tab.dirty .tab-dot { background: #7bafd4; }
.tab.dirty.active .tab-dot { background: #f5f5f5; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.tab-spacer { flex: 1; }


/* ─── OpenClaw active banner (overlays terminal) ─── */
.openclaw-banner {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 0.5rem 1rem;
  background: rgba(123, 175, 212, 0.12);
  border-bottom: 1px solid rgba(123, 175, 212, 0.25);
  font-family: var(--font-mono);
  font-size: 0.81rem;
  color: #7bafd4;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.openclaw-banner .session-dot {
  width: 0.44rem;
  height: 0.44rem;
  background: #7bafd4;
  animation: pulse 1.4s ease-in-out infinite;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0 0.25rem;
  -webkit-app-region: no-drag;
}
.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 2.475rem;
  height: 2.475rem;
  padding: 0;
  color: var(--fg-dim);
  font-size: 1.243rem;
  line-height: 1;
  border: none;
  background: transparent;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.nav-btn[hidden] { display: none; }
.nav-btn:hover { color: var(--fg); background: var(--panel-2); }
.nav-btn svg { display: block; width: 0.9em; height: 0.9em; }
.nav-reset svg { width: 0.882em; height: 0.882em; }
.nav-btn .kbd { padding: 0; font-size: 0.908rem; }
.nav-btn:disabled { cursor: default; opacity: 0.55; }
.nav-btn.is-busy svg { animation: nav-btn-spin 0.9s linear infinite; }
@keyframes nav-btn-spin { to { transform: rotate(360deg); } }

/* ─── Notification bell ─── */
.nav-bell { position: relative; }
.nav-bell-dot {
  position: absolute;
  top: 0.5rem;
  right: 0.7rem;
  width: 0.44rem;
  height: 0.44rem;
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 0 2px var(--panel), 0 0 0.5rem rgba(123, 175, 212, 0.55);
}

/* ─── Notification panel ─── */
.notif-panel {
  position: fixed;
  z-index: 500;
  width: 22rem;
  max-height: 28rem;
  display: flex;
  flex-direction: column;
  background: rgba(14, 14, 14, 0.86);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0.5rem;
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.4),
    0 3px 8px rgba(0, 0, 0, 0.25),
    0 12px 40px rgba(0, 0, 0, 0.35);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  pointer-events: none;
  overflow: hidden;
}
.notif-panel.open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.notif-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.notif-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}
.notif-list::-webkit-scrollbar { width: 3px; }
.notif-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 3px; }
.notif-list::-webkit-scrollbar-track { background: transparent; }

.notif-empty {
  padding: 2rem 1rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--fg-dim);
}

.notif-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.375rem;
  margin-bottom: 0.125rem;
  background: transparent;
  border: 1px solid transparent;
  overflow: hidden;
  transition: background 0.12s;
}
.notif-item:hover { background: rgba(255, 255, 255, 0.03); }
.notif-item.notif-leaving {
  pointer-events: none;
  opacity: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-top-width: 0;
  border-bottom-width: 0;
  transition: max-height 0.22s ease, opacity 0.18s ease,
              padding 0.22s ease, margin 0.22s ease, border-color 0.18s ease;
}
.notif-item.notif-pending { border-color: rgba(74, 158, 255, 0.18); background: rgba(74, 158, 255, 0.06); }
.notif-item.notif-type-notification.notif-pending {
  border-color: rgba(245, 158, 11, 0.22);
  background: rgba(245, 158, 11, 0.06);
}
.notif-item.notif-approved .notif-desc,
.notif-item.notif-denied .notif-desc,
.notif-item.notif-dismissed .notif-desc,
.notif-item.notif-expired .notif-desc { color: var(--fg-muted); }

.notif-body { display: flex; flex-direction: column; gap: 0.25rem; }
.notif-desc {
  font-size: 0.81rem;
  color: var(--fg);
  line-height: 1.35;
  word-break: break-word;
}
.notif-meta {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.02em;
  color: var(--fg-dim);
}
.notif-item.notif-approved .notif-meta,
.notif-item.notif-denied .notif-meta,
.notif-item.notif-dismissed .notif-meta,
.notif-item.notif-expired .notif-meta { color: var(--fg-dim); }

.notif-actions {
  display: flex;
  gap: 0.375rem;
  justify-content: flex-end;
}
.notif-btn {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.31rem 0.69rem;
  border-radius: 0.313rem;
  border: 1px solid transparent;
  transition: background 0.12s, color 0.12s, border-color 0.12s, opacity 0.12s;
}
.notif-btn:disabled { opacity: 0.5; cursor: default; }
.notif-deny {
  color: var(--fg-muted);
  background: transparent;
  border-color: rgba(255, 255, 255, 0.1);
}
.notif-deny:hover:not(:disabled) { color: var(--fg); background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.15); }
.notif-approve {
  color: #0a0a0a;
  background: #ededed;
  border-color: #ededed;
}
.notif-approve:hover:not(:disabled) { background: #ffffff; border-color: #ffffff; }
.notif-dismiss {
  color: var(--fg-muted);
  background: transparent;
  border-color: rgba(255, 255, 255, 0.1);
}
.notif-dismiss:hover:not(:disabled) { color: var(--fg); background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.15); }

.kbd {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  padding: 0.19rem 0.5rem;
  border-radius: 0.25rem;
}

/* ─── Page host ─── */
.page-host {
  position: fixed;
  inset: var(--tabbar-h) 0 0 0;
  background: var(--bg);
  overflow: hidden;
}
.page-pane {
  position: absolute;
  inset: 0;
  display: none;
}
.page-pane.active { display: block; }

/* Chat (terminal) pane — full bleed, no padding. */
.page-pane[data-page-id="chat"] {
  padding: 0;
  overflow: hidden;
}
.page-pane .xterm {
  height: 100% !important;
  width: 100% !important;
  font-variant-emoji: text;
}
.page-pane .xterm-viewport {
  height: 100% !important;
  width: 100% !important;
}
.page-pane .xterm-screen {
  height: 100% !important;
  width: 100% !important;
}
.page-pane .xterm-viewport::-webkit-scrollbar {
  display: none;
}
.page-pane .xterm-viewport {
  scrollbar-width: none;
}

/* Iframe-mounted ops pages — full-bleed inside the pane. */
.page-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--bg);
  display: block;
}

/* ─── Nav dropdown ─── */
.nav-dropdown {
  -webkit-app-region: no-drag;
}
.nav-dropdown .tab-chev {
  color: var(--fg-dim);
  margin-left: 0.25rem;
  transition: transform 0.15s, color 0.15s;
  flex-shrink: 0;
}
.nav-dropdown:hover .tab-chev { color: var(--fg-muted); }
.nav-dropdown.open .tab-chev { transform: rotate(180deg); color: var(--fg); }

/* Shared floating menu — glassmorphic panel with entrance animation. */
.nav-dropdown-menu,
.chat-picker-menu {
  position: fixed;
  z-index: 500;
  background: rgba(14, 14, 14, 0.82);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0.5rem;
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.4),
    0 3px 8px rgba(0, 0, 0, 0.25),
    0 12px 40px rgba(0, 0, 0, 0.35);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  pointer-events: none;
}
.nav-dropdown-menu.open,
.chat-picker-menu.open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* ─── Nav dropdown menu ─── */
.nav-dropdown-menu {
  min-width: 13rem;
  padding: 0.25rem;
}
.nav-dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.625rem;
  font-size: 0.875rem;
  font-family: var(--font-mono);
  color: var(--fg-muted);
  background: transparent;
  border: 0;
  border-radius: 0.313rem;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background 0.12s, color 0.12s;
}
.nav-dropdown-item:hover { background: rgba(255, 255, 255, 0.07); color: var(--fg); }
.nav-dropdown-item.active { background: rgba(255, 255, 255, 0.05); color: var(--fg); }

/* ─── Chat picker menu ─── */
.chat-picker-menu {
  display: flex;
  flex-direction: column;
  width: 17rem;
  max-height: 22rem;
  overflow: hidden;
}

.chat-picker-search {
  padding: 0.375rem;
}
.chat-picker-search input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  border-radius: 0.313rem;
  padding: 0.375rem 0.5rem;
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  outline: none;
  transition: background 0.15s, border-color 0.15s;
}
.chat-picker-search input::placeholder { color: var(--fg-dim); }
.chat-picker-search input:focus { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.08); }

.chat-picker-new {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0.25rem 0.25rem;
  padding: 0.438rem 0.5rem;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 0.313rem;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--fg-muted);
  transition: background 0.12s, color 0.12s;
}
.chat-picker-new:hover { background: rgba(255, 255, 255, 0.07); color: var(--fg); }

.chat-picker-list {
  overflow-y: auto;
  flex: 1;
  padding: 0.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}
.chat-picker-list::-webkit-scrollbar { width: 3px; }
.chat-picker-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 3px; }
.chat-picker-list::-webkit-scrollbar-track { background: transparent; }

.chat-picker-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.438rem 0.5rem;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 0.313rem;
  cursor: pointer;
  gap: 0.5rem;
  transition: background 0.12s;
}
.chat-picker-item:hover { background: rgba(255, 255, 255, 0.07); }
.chat-picker-item.active { background: rgba(255, 255, 255, 0.05); }

.chat-picker-item-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.chat-picker-item-preview {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--fg-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-picker-item:hover .chat-picker-item-preview,
.chat-picker-item.active .chat-picker-item-preview { color: var(--fg); }

.chat-picker-item-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.chat-picker-item-date {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--fg-dim);
}
.chat-picker-item-active {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.563rem;
  color: var(--cursor);
  letter-spacing: 0.02em;
}
.chat-picker-active-dot {
  width: 0.313rem;
  height: 0.313rem;
  border-radius: 50%;
  background: var(--cursor);
  animation: pulse 1.4s ease-in-out infinite;
}

.chat-picker-unread-dot {
  display: inline-block;
  width: 0.44rem;
  height: 0.44rem;
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 0.375rem rgba(123, 175, 212, 0.55);
}
.chat-picker-item.unread .chat-picker-item-preview {
  color: var(--fg);
  font-weight: 500;
}

.chat-picker-delete {
  opacity: 0;
  color: var(--fg-dim);
  font-size: 0.813rem;
  padding: 0.125rem 0.313rem;
  border-radius: 0.25rem;
  flex-shrink: 0;
  line-height: 1;
  transition: opacity 0.12s, color 0.12s, background 0.12s;
}
.chat-picker-item:hover .chat-picker-delete { opacity: 0.7; }
.chat-picker-delete:hover { opacity: 1 !important; color: var(--danger); background: rgba(239, 68, 68, 0.1); }
.chat-picker-delete.disabled {
  opacity: 0.2 !important;
  cursor: not-allowed;
  pointer-events: none;
}

/* ─── Palette ─── */
.palette-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 18vh;
  z-index: 100;
}
.palette-overlay.visible { display: flex; }

.palette {
  width: min(35rem, 90vw);
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: 0.5rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  overflow: hidden;
}
.palette-input {
  width: 100%;
  padding: 1.13rem 1.25rem;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--fg);
  font: inherit;
  font-size: 1.06rem;
  outline: none;
}
.palette-list {
  list-style: none;
  margin: 0;
  padding: 0.38rem 0;
  max-height: 20rem;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}
.palette-list::-webkit-scrollbar { width: 6px; }
.palette-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 3px; }
.palette-list::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.13); }
.palette-list::-webkit-scrollbar-track { background: transparent; }
.palette-item {
  padding: 0.63rem 1.25rem;
  font-size: 1rem;
  color: var(--fg-muted);
  cursor: pointer;
}
.palette-item.selected, .palette-item:hover {
  background: var(--panel-2);
  color: var(--fg);
}

/* ─── Slide-over ─── */
.slideover {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 38.75rem;
  max-width: 90vw;
  background: var(--panel);
  border-left: 1px solid var(--border);
  transform: translateX(100%);
  transition: transform 0.18s ease;
  z-index: 90;
  display: flex;
  flex-direction: column;
}
.slideover.visible { transform: translateX(0); }
.slideover header {
  height: 3.5rem;
  padding: 0 1.13rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.slideover-title {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  letter-spacing: 0.18em;
  color: var(--fg-muted);
  text-transform: uppercase;
}
.slideover-close {
  color: var(--fg-dim);
  font-size: 1.38rem;
  line-height: 1;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}
.slideover-close:hover { color: var(--fg); background: var(--panel-2); }
.slideover-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  font-size: 1rem;
}
.slideover-loading, .slideover-error { color: var(--fg-muted); }
.slideover-error { color: var(--danger); }

.slideover-list {
  list-style: none;
  margin: 0; padding: 0;
}
.slideover-list li {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.13rem;
}
.slideover-list strong {
  font-family: var(--font-mono);
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--fg);
}
.slideover-list span {
  font-size: 0.94rem;
  color: var(--fg-muted);
}
.slideover-pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--fg-muted);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ─── Login ─── */
.login-body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.logo-mark {
  appearance: none;
  background: var(--bg);
  border: 0;
  padding: 0;
  cursor: pointer;
  width: 160px;
  height: 160px;
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 1px var(--border);
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}
.logo-mark img {
  width: 80px;
  height: 80px;
  display: block;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.logo-mark:hover {
  transform: scale(1.04);
  filter: drop-shadow(0 0 24px rgba(123, 175, 212, 0.18));
  box-shadow: 0 0 0 1px transparent;
}
.logo-mark:active {
  transform: scale(0.98);
}
.logo-mark:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px var(--border-strong);
}
.logo-mark:active {
  transform: scale(0.98);
}
.logo-mark:focus-visible {
  outline: none;
  filter: drop-shadow(0 0 24px rgba(123, 175, 212, 0.28));
}
.logo-mark.is-loading {
  animation: logo-pulse 1.2s ease-in-out infinite;
  cursor: progress;
}
.logo-mark.is-failed {
  animation: lock-deny 320ms ease-out 1;
}
@keyframes logo-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
@keyframes lock-deny {
  0%   { transform: rotate(0deg); box-shadow: 0 0 0 1px var(--border); }
  25%  { transform: rotate(-8deg); box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.9); }
  55%  { transform: rotate(7deg); box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.9); }
  85%  { transform: rotate(-4deg); box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.9); }
  100% { transform: rotate(0deg); box-shadow: 0 0 0 1px var(--border); }
}
.login-footer {
  position: fixed;
  bottom: 1.75rem;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  text-transform: lowercase;
  color: var(--fg-dim);
  pointer-events: none;
}
.logo-mark.is-unlocking {
  animation: lock-click 140ms ease-out forwards;
  pointer-events: none;
}
.login-body.is-unlocking {
  animation: page-fade-out 320ms ease-out 280ms forwards;
}
@keyframes lock-click {
  to { box-shadow: 0 0 0 1px var(--cursor); }
}
@keyframes page-fade-out {
  to { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .logo-mark.is-unlocking { animation: none; }
  .login-body.is-unlocking { animation: none; opacity: 0; }
}
