/* ══════════════════════════════════════════
   AUTH MINI WIDGET
══════════════════════════════════════════ */

#authOverlay {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
#authOverlay.auth-fade-out { opacity: 0; pointer-events: none; }
#authOverlay.auth-gone     { display: none; }

/* ══════════════════════════════════════════
   CARD — non-standard alternating radius
══════════════════════════════════════════ */

.aw-card {
  position: relative;
  z-index: 1;
  width: 264px;
  background: rgba(7, 13, 28, 0.93);
  backdrop-filter: blur(44px) saturate(1.7);
  -webkit-backdrop-filter: blur(44px) saturate(1.7);
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 26px 6px 26px 6px;
  padding: 28px 24px 20px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 28px 64px rgba(0, 0, 0, 0.72),
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 0 48px rgba(37, 99, 235, 0.1);
  text-align: center;
  animation: aw-in 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* thin top-edge shine */
.aw-card::before {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  border-radius: 1px;
}

@keyframes aw-in {
  from { opacity: 0; transform: translateY(14px) scale(0.96); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    filter: none; }
}

/* ══════════════════════════════════════════
   LOGO
══════════════════════════════════════════ */

.aw-logo-wrap {
  width: 46px; height: 46px;
  margin: 0 auto 16px;
  background: linear-gradient(150deg, #0f2347 0%, #091428 100%);
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 13px;
  display: grid;
  place-items: center;
  box-shadow:
    0 0 0 1px rgba(59, 130, 246, 0.08),
    0 6px 20px rgba(0, 0, 0, 0.45),
    0 0 20px rgba(37, 99, 235, 0.14);
}
.aw-logo-wrap i {
  font-size: 19px;
  background: linear-gradient(135deg, #60a5fa 0%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ══════════════════════════════════════════
   TYPOGRAPHY
══════════════════════════════════════════ */

.aw-title {
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: #eef2ff;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
  line-height: 1.2;
}
.aw-subtitle {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.75rem;
  color: rgba(148, 163, 184, 0.45);
  margin: 0 0 20px;
  line-height: 1.5;
}

/* ══════════════════════════════════════════
   FIELDS
══════════════════════════════════════════ */

.aw-field-group {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  overflow: hidden;
  margin-bottom: 10px;
  text-align: left;
  transition: border-color 0.22s, box-shadow 0.22s;
}
.aw-field-group:focus-within {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.aw-field-group input {
  width: 100%;
  height: 42px;
  background: transparent;
  border: none;
  outline: none;
  padding: 0 14px;
  color: #e8eeff;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.85rem;
  display: block;
  box-sizing: border-box;
  -webkit-appearance: none;
}
.aw-field-group input::placeholder {
  color: rgba(148, 163, 184, 0.28);
}
.aw-field-group input:-webkit-autofill,
.aw-field-group input:-webkit-autofill:focus {
  -webkit-text-fill-color: #e8eeff;
  -webkit-box-shadow: 0 0 0 100px #0b1526 inset;
  transition: background-color 9999s;
}

.aw-field-sep {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 0 12px;
}

/* ══════════════════════════════════════════
   ERROR
══════════════════════════════════════════ */

#authOverlayError {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.75rem;
  color: #f87171;
  min-height: 0;
  max-height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
  opacity: 0;
  border: none;
  background: none;
  text-align: center;
  line-height: 1.6;
  transition: opacity 0.22s, max-height 0.25s ease, margin 0.25s;
  word-break: break-word;
}
#authOverlayError.visible {
  opacity: 1;
  max-height: 80px;
  margin-bottom: 10px;
}

/* ══════════════════════════════════════════
   BUTTON
══════════════════════════════════════════ */

.aw-btn {
  width: 100%;
  height: 42px;
  background: #2563eb;
  border: none;
  border-radius: 10px;
  color: #fff;
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.15s;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.12) inset,
    0 4px 16px rgba(37, 99, 235, 0.42);
}
.aw-btn::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 100%);
  pointer-events: none;
}
.aw-btn:hover:not(:disabled) {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.12) inset,
    0 8px 24px rgba(37, 99, 235, 0.55);
}
.aw-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.38);
}
.aw-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.aw-btn.loading {
  animation: aw-btn-pulse 1.3s ease-in-out infinite;
}
@keyframes aw-btn-pulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(37, 99, 235, 0.42); }
  50%       { box-shadow: 0 4px 28px rgba(37, 99, 235, 0.7); }
}

/* ══════════════════════════════════════════
   FOOTER NOTE
══════════════════════════════════════════ */

.aw-footer-note {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.63rem;
  color: rgba(71, 85, 105, 0.45);
  letter-spacing: 0.02em;
  margin: 0;
}

/* ══════════════════════════════════════════
   HEADER AUTH BOX
══════════════════════════════════════════ */

#authBox {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-left: auto;
  padding: 4px 0;
}

#authUser {
  display: none;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

#btnSignOut {
  background: none;
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #f43f5e;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
#btnSignOut:hover {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.7);
}
