/* ============================================================
   Auth modal + header user state
   ============================================================ */

.user-badge {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--tk-red-tint);
  color: var(--tk-red);
  font-size: 13px;
  font-weight: 600;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#signInBtn,
#signOutBtn,
#dashboardBtn {
  cursor: pointer;
}

/* ============================================ modal */
.auth-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(6px);
}
.auth-modal[hidden] { display: none; }

.auth-modal-inner {
  position: relative;
  background: #fff;
  border-radius: 20px;
  padding: 40px 36px 32px 36px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.28);
  animation: modal-pop 0.18s ease-out;
}

@keyframes modal-pop {
  from { transform: scale(0.96); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

body.modal-open { overflow: hidden; }

.auth-close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: #94A3B8;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 8px;
}
.auth-close:hover { background: #F1F5F9; color: #0F172A; }

.auth-modal-inner h2 {
  margin: 0 0 8px 0;
  font-size: 26px;
  letter-spacing: -0.02em;
}
.auth-sub {
  font-size: 15px;
  color: #475569;
  margin: 0 0 24px 0;
  line-height: 1.5;
}

.auth-form { margin-bottom: 20px; }
.auth-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 14px;
}
.auth-label input {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  margin-top: 6px;
  font-family: inherit;
  background: #fff;
  color: #0F172A;
}
.auth-label input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(30, 41, 59, 0.18);
}

.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease;
  font-family: inherit;
}
.auth-btn.primary {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.auth-btn.primary:hover {
  background: var(--navy-dark);
  border-color: var(--navy-dark);
}
.auth-btn.primary:disabled {
  background: #94A3B8;
  border-color: #94A3B8;
  cursor: wait;
}
.auth-btn.google {
  background: #fff;
  color: #1F2937;
  border-color: #CBD5E1;
}
.auth-btn.google:hover {
  border-color: #94A3B8;
  background: #F8FAFC;
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  color: #94A3B8;
  font-size: 13px;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #E2E8F0;
}
.auth-divider span { padding: 0 14px; }

.auth-message {
  margin: 16px 0 0 0;
  font-size: 14px;
  color: #B91C1C;
  min-height: 20px;
  line-height: 1.4;
}
.auth-message.success { color: #047857; }

.auth-fine {
  margin: 24px 0 0 0;
  font-size: 12px;
  color: #94A3B8;
  text-align: center;
  line-height: 1.5;
}
.auth-fine a { color: var(--navy); }
.auth-fine a:hover { text-decoration: underline; }

@media (max-width: 480px) {
  .auth-modal-inner { padding: 32px 24px 24px 24px; }
  .auth-modal-inner h2 { font-size: 22px; }
}
