/* ══════════════════════════════════════════════════════════════
   Auth UI — WH40K integrated mockup palette (Rajdhani, golds, cyans)
══════════════════════════════════════════════════════════════ */

/* ── Auth Widget (header bar) ────────────────────────────── */

.auth-widget {
  display: flex;
  align-items: center;
  height: 100%;
  position: relative;
  margin-left: 8px;
}

.auth-signin-btn {
  background: transparent;
  border: 1px solid rgba(201, 163, 82, 0.25);
  color: #c9a352;
  padding: 4px 14px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: Rajdhani, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.15s;
}

.auth-signin-btn:hover {
  background: rgba(201, 163, 82, 0.1);
  color: #e0c870;
  border-color: rgba(201, 163, 82, 0.4);
}

.auth-user {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 3px;
  transition: background 0.15s;
}

.auth-user:hover {
  background: rgba(255, 255, 255, 0.05);
}

.auth-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(201, 163, 82, 0.3);
}

.auth-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(201, 163, 82, 0.12);
  color: #c9a352;
  font-size: 11px;
  font-weight: 600;
  font-family: Rajdhani, sans-serif;
}

.auth-name {
  color: #8090a0;
  font-size: 11px;
  font-weight: 600;
  font-family: Rajdhani, sans-serif;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-role {
  font-size: 9px;
  font-weight: 700;
  font-family: Rajdhani, sans-serif;
  padding: 1px 5px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-role-admin {
  background: rgba(0, 212, 255, 0.15);
  color: #00d4ff;
}

.auth-role-viewer {
  background: rgba(128, 144, 160, 0.15);
  color: #607080;
}

/* ── User dropdown menu ──────────────────────────────────── */

.auth-user-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: #0a0e18;
  border: 1px solid rgba(201, 163, 82, 0.15);
  border-radius: 4px;
  min-width: 180px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
  z-index: 200;
  overflow: hidden;
}

.auth-menu-item {
  padding: 8px 14px;
  color: #8090a0;
  font-size: 11px;
  font-family: Rajdhani, sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.1s;
}

.auth-menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ccc;
}

.auth-menu-email {
  color: #4a6080;
  font-size: 10px;
  cursor: default;
}

.auth-menu-email:hover {
  background: transparent;
  color: #4a6080;
}

.auth-menu-separator {
  height: 1px;
  background: rgba(201, 163, 82, 0.1);
  margin: 2px 0;
}

/* ── Sign-In Modal ───────────────────────────────────────── */

.auth-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  backdrop-filter: blur(4px);
}

.auth-dialog {
  background: #0d131d;
  border: 1px solid rgba(201, 163, 82, 0.2);
  border-radius: 8px;
  padding: 28px 28px 24px;
  width: 360px;
  max-width: 90vw;
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.8);
}

.auth-dialog-title {
  font-family: Rajdhani, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #c9a352;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.auth-header-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 163, 82, 0.25) 20%, rgba(201, 163, 82, 0.25) 80%, transparent);
  margin-bottom: 20px;
}

/* OAuth */
.auth-oauth-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.auth-oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  font-family: Rajdhani, sans-serif;
  cursor: pointer;
  border: 1px solid;
  transition: all 0.15s;
}

.auth-oauth-google {
  background: #fff;
  color: #333;
  border-color: #ddd;
}

.auth-oauth-google:hover {
  background: #f5f5f5;
  border-color: #ccc;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  color: #4a6080;
  font-size: 11px;
  font-family: Rajdhani, sans-serif;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(201, 163, 82, 0.12);
}

.auth-divider span {
  padding: 0 12px;
}

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

.auth-field {
  margin-bottom: 14px;
}

.auth-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  font-family: Rajdhani, sans-serif;
  color: #8090a0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-field input {
  width: 100%;
  background: #080c10;
  color: #e0e8f0;
  border: 1px solid rgba(201, 163, 82, 0.15);
  padding: 10px 12px;
  border-radius: 3px;
  font-size: 13px;
  font-family: Rajdhani, sans-serif;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.auth-field input:focus {
  border-color: #00d4ff;
}

/* Buttons */
.auth-form-buttons {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.auth-btn {
  flex: 1;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: Rajdhani, sans-serif;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-btn-primary {
  background: rgba(0, 212, 255, 0.15);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: #00d4ff;
}

.auth-btn-primary:hover:not(:disabled) {
  background: rgba(0, 212, 255, 0.25);
  border-color: rgba(0, 212, 255, 0.5);
}

.auth-btn-secondary {
  background: transparent;
  border: 1px solid rgba(201, 163, 82, 0.2);
  color: #c9a352;
}

.auth-btn-secondary:hover:not(:disabled) {
  background: rgba(201, 163, 82, 0.08);
  border-color: rgba(201, 163, 82, 0.35);
}

/* Messages */
.auth-error {
  color: #cc4444;
  font-size: 11px;
  font-family: Rajdhani, sans-serif;
  padding: 8px;
  background: rgba(204, 68, 68, 0.1);
  border-radius: 3px;
  margin-top: 8px;
}

.auth-success {
  color: #44cc44;
  font-size: 11px;
  font-family: Rajdhani, sans-serif;
  padding: 8px;
  background: rgba(68, 204, 68, 0.1);
  border-radius: 3px;
  margin-top: 8px;
}

/* Magic link */
.auth-magic-link {
  text-align: center;
  margin-top: 12px;
}

.auth-magic-link-btn {
  background: transparent;
  border: none;
  color: #00d4ff;
  font-size: 11px;
  font-family: Rajdhani, sans-serif;
  cursor: pointer;
  text-decoration: underline;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.auth-magic-link-btn:hover {
  opacity: 1;
}
