/* Login overlay - covers entire screen */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

/* Hide when authenticated */
.login-overlay.hidden {
  display: none;
}

/* Login card */
.login-card {
  background: white;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
}

.login-card h1 {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 600;
}

.login-card .subtitle {
  color: #666;
  margin: 0 0 32px 0;
}

/* Form fields */
.login-field {
  margin-bottom: 20px;
}

.login-field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 14px;
}

.login-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
}

.login-field input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Error message */
.login-error {
  background: #fef2f2;
  color: #dc2626;
  padding: 10px 12px;
  border-radius: 4px;
  margin-bottom: 20px;
  font-size: 14px;
  display: none;
}

.login-error.visible {
  display: block;
}

/* Submit button */
.login-button {
  width: 100%;
  padding: 12px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.login-button:hover {
  background: #1d4ed8;
}

.login-button:disabled {
  background: #93c5fd;
  cursor: not-allowed;
}

/* User menu */
.user-menu {
  position: relative;
  margin-left: auto; /* Push to far right */
}

.user-menu-trigger {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.user-menu-trigger:hover {
  background: #d1d5db;
}

.user-menu-trigger svg {
  width: 18px;
  height: 18px;
  color: #6b7280;
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s, visibility 0.15s;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Invisible bridge to prevent gap */
.user-menu-dropdown::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}

/* Show dropdown on hover */
.user-menu:hover .user-menu-dropdown {
  opacity: 1;
  visibility: visible;
}

.user-menu-name {
  padding: 12px 16px;
  font-weight: 500;
  font-size: 14px;
  color: #111;
}

.user-menu-divider {
  height: 1px;
  background: #e5e7eb;
}

.user-menu-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  text-align: left;
  background: none;
  border: none;
  font-size: 14px;
  color: #4b5563;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}

.user-menu-item:hover {
  background: #f9fafb;
  color: #111;
}
