/* Knox auth modal — overlay + tabs + Knox-vibe pattern grid */

.knox-pattern-grid {
  display: block;
  margin: 0 auto;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.knox-pattern-grid.pg-failed { animation: pg-shake 0.4s; }
@keyframes pg-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.auth-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: grid;
  place-items: center;
  font-family: var(--font-mono, ui-monospace, monospace);
}
.auth-modal {
  background: var(--obsidian, #0e0e14);
  border: 1px solid var(--mint, #00ffc8);
  border-radius: 12px;
  padding: 22px;
  max-width: 360px;
  width: calc(100vw - 32px);
  box-shadow: 0 0 24px rgba(0, 255, 200, 0.18);
  color: var(--ghost, #e6e6f0);
}
.auth-modal-title { font-size: 14px; font-weight: 600; color: var(--mint, #00ffc8); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; }
.auth-modal-reason { font-size: 11px; color: var(--slate, #909098); margin-bottom: 16px; word-break: break-word; }

.auth-tabs { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid rgba(0, 255, 200, 0.15); }
.auth-tab {
  flex: 1;
  padding: 8px 6px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--slate, #909098);
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}
.auth-tab:hover { color: var(--ghost, #e6e6f0); }
.auth-tab.active { color: var(--mint, #00ffc8); border-bottom-color: var(--mint, #00ffc8); }
.auth-tab[disabled] { opacity: 0.35; cursor: not-allowed; }

.auth-tab-body { min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px 0; }

.auth-pin-input {
  display: flex; gap: 8px; justify-content: center;
}
.auth-pin-input input {
  width: 36px; height: 44px;
  background: var(--void, #050508);
  border: 1.5px solid rgba(0, 255, 200, 0.25);
  border-radius: 6px;
  color: var(--ghost, #e6e6f0);
  text-align: center;
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
}
.auth-pin-input input:focus {
  outline: none;
  border-color: var(--mint, #00ffc8);
  box-shadow: 0 0 8px rgba(0, 255, 200, 0.4);
}

.auth-modal-footer { margin-top: 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.auth-fallback-link {
  background: none; border: none; color: var(--slate, #909098); font-family: inherit;
  font-size: 11px; cursor: pointer; text-decoration: underline; padding: 0;
}
.auth-fallback-link:hover { color: var(--mint, #00ffc8); }
.auth-cancel-btn {
  background: transparent; border: 1px solid rgba(255,255,255,0.15);
  color: var(--slate, #909098); padding: 6px 12px; border-radius: 4px;
  font-family: inherit; font-size: 11px; cursor: pointer;
}
.auth-cancel-btn:hover { color: var(--ghost, #e6e6f0); border-color: rgba(255,255,255,0.3); }

.auth-status {
  font-size: 11px; color: var(--slate, #909098); margin-top: 12px;
  text-align: center; min-height: 14px;
}
.auth-status.ok { color: var(--mint, #00ffc8); }
.auth-status.fail { color: var(--coral, #ff6b6b); }

.auth-mic-btn {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: var(--void, #050508);
  border: 2px solid var(--mint, #00ffc8);
  color: var(--mint, #00ffc8);
  font-size: 32px;
  cursor: pointer;
  display: grid; place-items: center;
  transition: all 0.15s;
}
.auth-mic-btn:hover { background: rgba(0, 255, 200, 0.1); }
.auth-mic-btn.recording {
  background: var(--coral, #ff6b6b);
  border-color: var(--coral, #ff6b6b);
  color: var(--void, #050508);
  animation: auth-pulse 1.5s infinite;
}
@keyframes auth-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,107,107,0.5); }
  50% { box-shadow: 0 0 0 12px rgba(255,107,107,0); }
}

.auth-faceid-btn {
  background: var(--void, #050508);
  border: 1.5px solid var(--mint, #00ffc8);
  color: var(--mint, #00ffc8);
  padding: 14px 24px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  display: flex; align-items: center; gap: 10px;
}
.auth-faceid-btn:hover { background: rgba(0,255,200,0.08); }
.auth-faceid-icon { font-size: 22px; }
