/* ===== Auth Modal ===== */
.auth-overlay{
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(7,17,32,0.55);
  backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
  padding: 24px; opacity: 0; transition: opacity 0.25s ease;
}
.auth-overlay.open{ display: flex; opacity: 1; }

.auth-modal{
  background: #fff;
  border-radius: 16px;
  width: 100%; max-width: 400px;
  padding: 32px 28px 28px;
  box-shadow: 0 12px 40px rgba(7,17,32,0.18);
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}
.auth-overlay.open .auth-modal{ transform: translateY(0); }

.auth-close{
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; font-size: 22px;
  line-height: 1; cursor: pointer; color: #7a7f8a;
  padding: 4px;
}
.auth-close:hover{ color: #071120; }

.auth-brand{
  text-align: center; font-family: 'JetBrains Mono',monospace;
  font-size: 20px; font-weight: 600; letter-spacing: -0.3px;
  margin-bottom: 4px; color: #071120;
}

.auth-tabs{
  display: flex; margin: 20px 0 16px;
  border-bottom: 1px solid #eaeced;
}
.auth-tab{
  flex: 1; text-align: center; padding: 10px 0;
  font-size: 14px; font-weight: 600; color: #7a7f8a;
  background: none; border: none; cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.auth-tab:hover{ color: #071120; }
.auth-tab.active{ color: #071120; border-bottom-color: #071120; }

.auth-form{ display: flex; flex-direction: column; gap: 12px; }

.auth-form input{
  padding: 11px 14px; border: 1px solid #d9dbde;
  border-radius: 8px; font-size: 14px; font-family: inherit;
  outline: none; transition: border-color 0.2s;
}
.auth-form input:focus{ border-color: #071120; }

.auth-form .btn-primary{
  padding: 11px; border: none; border-radius: 8px;
  background: #071120; color: #fff; font-size: 14px;
  font-weight: 600; cursor: pointer; transition: opacity 0.2s;
  text-align: center; justify-content: center; display: flex; width: 100%;
}
.auth-form .btn-primary:hover{ opacity: 0.88; }
.auth-form .btn-primary:disabled{ opacity: 0.5; cursor: not-allowed; }
.auth-forgot{
  display: block; text-align: center;
  font-size: 12.5px; color: var(--ink-dim);
  text-decoration: none; margin-top: 4px;
}
.auth-forgot:hover{ color: var(--signal); }

.auth-error{
  background: #fee8e8; color: #c53030;
  font-size: 13px; padding: 8px 12px;
  border-radius: 6px; display: none;
  text-align: center;
}
.auth-error.show{ display: block; }

.auth-divider{
  text-align: center; font-size: 13px; color: #7a7f8a;
  margin: 4px 0; position: relative;
}
.auth-divider::before,
.auth-divider::after{
  content: ''; display: inline-block; width: 38%;
  height: 1px; background: #eaeced; vertical-align: middle;
}
.auth-divider::before{ margin-right: 8px; }
.auth-divider::after{ margin-left: 8px; }

.auth-oauth-btn{
  display: flex; align-items: center; justify-content: center;
  gap: 8px; width: 100%; padding: 10px;
  border: 1px solid #d9dbde; border-radius: 8px;
  background: #fff; font-size: 14px; font-weight: 500;
  cursor: pointer; transition: background 0.2s; color: #071120;
}
.auth-oauth-btn:hover{ background: #f5f5f6; }
.auth-oauth-btn svg{ width: 18px; height: 18px; flex-shrink: 0; }

.btn-ghost-sm{
  background: none; border: 1px solid #d9dbde;
  color: #071120; font-size: 13px; font-weight: 500;
  padding: 7px 14px; border-radius: 8px; cursor: pointer;
  transition: background 0.2s; font-family: inherit;
  text-align: center; justify-content: center;
}
.btn-ghost-sm:hover{ background: #f5f5f6; }
.btn-signup{ background:var(--signal); color:#fff; border-color:var(--signal); }
.btn-signup:hover{ opacity:0.88; }

@media(max-width:480px){
  .auth-modal{ padding: 24px 20px 20px; }
  .auth-overlay{ padding: 16px; align-items: flex-end; }
  .auth-modal{ border-radius: 16px 16px 0 0; }
}
