/* ── OpenClaw Dashboard Auth Overlay ── */
#oc-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0f;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  opacity: 1;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
#oc-auth-overlay.oc-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Animated background */
#oc-auth-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(168, 85, 247, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(59, 130, 246, 0.06) 0%, transparent 50%);
  animation: oc-bg-pulse 8s ease-in-out infinite alternate;
}
@keyframes oc-bg-pulse {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}

/* Card */
.oc-auth-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 20px;
  padding: 40px 36px 36px;
  background: rgba(17, 17, 27, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  backdrop-filter: blur(24px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.03) inset;
}

/* Avatar / Logo */
.oc-auth-avatar {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(168,85,247,0.2));
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
}

.oc-auth-title {
  text-align: center;
  color: #f0f0f5;
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -0.3px;
}

.oc-auth-subtitle {
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
  margin: 0 0 32px;
}

/* Form */
.oc-auth-form { display: flex; flex-direction: column; gap: 16px; }

.oc-auth-field {
  position: relative;
  display: flex;
  align-items: center;
}

.oc-auth-field svg {
  position: absolute;
  left: 14px;
  color: rgba(255,255,255,0.25);
  pointer-events: none;
  transition: color 0.2s;
}
.oc-auth-field:focus-within svg { color: rgba(99,102,241,0.8); }

.oc-auth-input {
  width: 100%;
  padding: 14px 44px 14px 44px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: #f0f0f5;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.oc-auth-input::placeholder { color: rgba(255,255,255,0.2); }
.oc-auth-input:focus {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Toggle password visibility */
.oc-auth-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.25);
  cursor: pointer;
  padding: 4px;
  display: flex;
  transition: color 0.2s;
}
.oc-auth-toggle:hover { color: rgba(255,255,255,0.5); }

/* Submit button */
.oc-auth-submit {
  padding: 14px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
  margin-top: 4px;
}
.oc-auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}
.oc-auth-submit:active { transform: translateY(0); }
.oc-auth-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Error */
.oc-auth-error {
  text-align: center;
  color: #f87171;
  font-size: 13px;
  min-height: 18px;
  margin: 0;
  opacity: 0;
  transition: opacity 0.2s;
}
.oc-auth-error.visible { opacity: 1; }

/* Footer */
.oc-auth-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.2);
  font-size: 12px;
}

/* ── Logout button ── */
#oc-logout-btn {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 99999;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}
#oc-logout-btn:hover {
  background: rgba(220, 38, 38, 0.8);
  color: #fff;
  border-color: rgba(220,38,38,0.5);
  transform: scale(1.08);
}

/* Mobile */
@media (max-width: 480px) {
  .oc-auth-card { padding: 32px 24px 28px; margin: 0 16px; }
  .oc-auth-title { font-size: 20px; }
}
