/**
 * Authentication styles (Spec 0106)
 */

/* Login modal overlay - highest z-index to block all interaction */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay, rgba(0, 0, 0, 0.9));
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.auth-overlay.hidden {
  display: none;
}

/* Login form container */
.auth-dialog {
  background: var(--bg-secondary, #1e1e1e);
  border: 1px solid var(--border-color, #333);
  border-radius: 8px;
  padding: 32px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.auth-dialog h2 {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary, #fff);
  text-align: center;
}

.auth-dialog p {
  margin: 0 0 24px 0;
  color: var(--text-secondary, #888);
  font-size: 14px;
  text-align: center;
  line-height: 1.5;
}

/* Token input */
.auth-input-group {
  margin-bottom: 16px;
}

.auth-input-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary, #888);
  font-size: 13px;
}

.auth-input {
  width: 100%;
  padding: 12px;
  background: var(--bg-primary, #0a0a0a);
  border: 1px solid var(--border-color, #333);
  border-radius: 4px;
  color: var(--text-primary, #fff);
  font-family: var(--font-mono, monospace);
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

.auth-input:focus {
  outline: none;
  border-color: var(--accent-color, #3b82f6);
}

.auth-input::placeholder {
  color: var(--text-muted, #555);
}

/* Error message */
.auth-error {
  color: var(--danger-color, #ef4444);
  font-size: 13px;
  margin-bottom: 16px;
  padding: 8px 12px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 4px;
  text-align: center;
}

.auth-error.hidden {
  display: none;
}

/* Submit button */
.auth-submit {
  width: 100%;
  padding: 12px;
  background: var(--accent-color, #3b82f6);
  border: none;
  border-radius: 4px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.auth-submit:hover {
  background: #2563eb;
}

.auth-submit:disabled {
  background: var(--text-muted, #555);
  cursor: not-allowed;
}

/* Help text */
.auth-help {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color, #333);
  color: var(--text-muted, #666);
  font-size: 12px;
  text-align: center;
}

.auth-help code {
  background: var(--bg-primary, #0a0a0a);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: var(--font-mono, monospace);
}

/* Logout indicator in header */
.auth-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 16px;
  padding: 4px 12px;
  background: var(--bg-primary, #0a0a0a);
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-secondary, #888);
}

.auth-status.hidden {
  display: none;
}

.auth-logout-btn {
  background: none;
  border: none;
  color: var(--text-muted, #666);
  cursor: pointer;
  padding: 2px 4px;
  font-size: 12px;
  text-decoration: underline;
}

.auth-logout-btn:hover {
  color: var(--danger-color, #ef4444);
}

/* Lock icon */
.auth-lock-icon {
  font-size: 40px;
  margin-bottom: 16px;
  text-align: center;
}
