/* assets/css/auth.css — TradingView-like modal (B) */
.auth-modal{ position: fixed; inset:0; display:none; z-index: 60; }
.auth-modal.open{ display:block; }
.auth-backdrop{ position:absolute; inset:0; background: rgba(2,6,23,.35); backdrop-filter: blur(8px); }
.auth-card{
  position:absolute;
  right: 22px;
  top: 88px;
  width: min(420px, calc(100% - 44px));
  border-radius: 18px;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(15,23,42,.14);
  box-shadow: 0 30px 70px rgba(15,23,42,.16);
  padding: 14px 14px 14px;
  animation: authIn .18s ease both;
}
@keyframes authIn{ from{ transform: translateY(-6px); opacity:0; } to{ transform: translateY(0); opacity:1; } }

.auth-top{ display:flex; align-items:center; justify-content:space-between; gap: 12px; padding: 4px 2px 10px; }
.auth-title{ font-weight: 950; color:#0f172a; letter-spacing:-.2px; }
.auth-close{
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.92);
  cursor:pointer;
  font-weight: 950;
}

.auth-seg{
  display:flex;
  gap:8px;
  background: rgba(15,23,42,.04);
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 999px;
  padding: 6px;
}
.auth-seg button{
  flex:1;
  border:none;
  background: transparent;
  cursor:pointer;
  padding: 10px 12px;
  border-radius: 999px;
  font-weight: 950;
  color: rgba(15,23,42,.80);
}
.auth-seg button.active{
  background: linear-gradient(90deg, rgba(22,163,74,.92), rgba(22,163,74,.75));
  color:#fff;
  box-shadow: 0 12px 24px rgba(22,163,74,.18);
}

.auth-body{ padding-top: 10px; }
.auth-hint{
  color:#64748b;
  font-weight: 750;
  font-size: 12px;
  line-height: 1.35;
  margin: 2px 2px 10px;
}

.auth-msg{
  font-weight: 850;
  font-size: 12px;
  margin: 0 2px 8px;
  color: #0f172a;
}
.auth-msg.err{ color: #dc2626; }
.auth-msg.ok{ color: #16a34a; }
.auth-msg:not(:empty) {
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 8px;
}
.auth-msg.err:not(:empty) { background: rgba(220,38,38,.08); }
.auth-msg.ok:not(:empty) { background: rgba(22,163,74,.08); }
.hidden{ display:none !important; }

.auth-form{ display:flex; flex-direction:column; gap: 12px; }
.auth-field{ display:flex; flex-direction:column; gap: 6px; }
.auth-field span{ font-weight: 900; font-size: 12px; color: rgba(15,23,42,.78); }
.auth-field input{
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,.14);
  background: rgba(255,255,255,.92);
  font-size: 14px;
}
.auth-field input:focus{
  outline: 3px solid rgba(22,163,74,.18);
  border-color: rgba(22,163,74,.55);
}

.auth-pass{ position: relative; }
.auth-eye{
  position:absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px; height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.85);
  cursor:pointer;
  font-size: 14px;
}

.auth-row{
  display:flex;
  justify-content:space-between;
  gap:10px;
  font-weight: 850;
  font-size: 12px;
}
.auth-link{
  color: rgba(15,23,42,.72);
  text-decoration:none;
}
.auth-link:hover{ text-decoration: underline; }

.auth-submit{
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(22,163,74,.25);
  background: linear-gradient(90deg, rgba(22,163,74,.92), rgba(22,163,74,.75));
  color:#fff;
  font-weight: 950;
  cursor:pointer;
  box-shadow: 0 14px 34px rgba(22,163,74,.18);
}
.auth-submit:disabled{
  opacity:.55;
  cursor:not-allowed;
  box-shadow:none;
}

.pw-rules{
  border: 1px dashed rgba(15,23,42,.14);
  background: rgba(15,23,42,.03);
  border-radius: 12px;
  padding: 10px 10px;
  font-weight: 850;
  font-size: 12px;
  color:#64748b;
  display:grid;
  gap: 6px;
}
.pw-rules .ok{ color:#16a34a; }

.auth-foot{
  font-size: 12px;
  color:#64748b;
  font-weight: 750;
  margin-top: 8px;
  line-height: 1.35;
}
.auth-foot a{ color:#0f172a; font-weight: 900; text-decoration: none; }
.auth-foot a:hover{ text-decoration: underline; }

@media (max-width: 1100px){
  .auth-card{
    left: 22px; right: 22px;
    top: 92px;
    width:auto;
  }
}

@media (max-width: 680px){
  .auth-modal.open{
    display:flex;
    align-items:flex-start;
    justify-content:center;
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
  }
  .auth-backdrop{ position:fixed; }
  .auth-card{
    position:relative;
    left:auto; right:auto; top:auto;
    width:calc(100% - 24px);
    max-width:420px;
    margin:20px auto;
    max-height:none;
  }
}

/* Terms checkbox */
.auth-terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
  margin: 8px 0 4px;
  cursor: pointer;
}
.auth-terms input[type="checkbox"] {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: #2563eb;
  cursor: pointer;
}
.auth-terms a {
  color: #0f172a;
  font-weight: 700;
  text-decoration: none;
}
.auth-terms a:hover {
  text-decoration: underline;
}

/* Email autocomplete dropdown */
.email-ac-box {
  position: absolute; left: 0; right: 0; top: 100%;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 100;
  max-height: 200px; overflow-y: auto; margin-top: 2px;
}
.email-ac-item {
  padding: 10px 14px; font-size: 14px; color: #334155;
  cursor: pointer; transition: background .1s;
}
.email-ac-item:hover, .email-ac-active {
  background: #f1f5f9; color: #0f172a;
}
.email-ac-item:first-child { border-radius: 10px 10px 0 0; }
.email-ac-item:last-child { border-radius: 0 0 10px 10px; }

/* Name validation warning */
.auth-name-warn {
  font-size: 12px; color: #ef4444; margin-top: 4px;
  font-weight: 600; line-height: 1.3;
}

/* Mobile: bigger touch targets for autocomplete */
@media (max-width: 680px) {
  .email-ac-item { padding: 14px 16px; font-size: 15px; }
  .email-ac-box { border-radius: 12px; }
}
