/* ================================================
   Casino Seamless — Auth Styles (login/register/profile)
   ================================================ */

/* ── Auth wrapper — centres content ── */
.csw-auth-wrap {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* ── Auth Card ── */
.csw-auth-card {
  background: var(--csw-card-bg);
  border: 1px solid var(--csw-border);
  border-radius: 20px;
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 480px;
  position: relative;
  overflow: hidden;
}
.csw-auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--csw-primary), var(--csw-gold));
}

/* ── Logo ── */
.csw-auth-logo {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--csw-gold);
  margin-bottom: 1.5rem;
  letter-spacing: -.02em;
}
.csw-auth-logo span { color: var(--csw-text); }

/* ── Auth title ── */
.csw-auth-title {
  text-align: center;
  color: var(--csw-text);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 1.5rem;
}

/* ── Tabs ── */
.csw-auth-tabs {
  display: flex;
  background: #0c1020;
  border-radius: 12px;
  padding: 5px;
  gap: 4px;
  margin-bottom: 1.75rem;
}
.csw-auth-tab {
  flex: 1;
  padding: .6rem;
  border: none;
  background: transparent;
  color: var(--csw-muted);
  border-radius: 9px;
  cursor: pointer;
  font-size: .875rem;
  font-weight: 600;
  transition: all .22s;
}
.csw-auth-tab.active {
  background: var(--csw-primary);
  color: #fff;
  box-shadow: 0 2px 12px rgba(124,58,237,.4);
}
.csw-auth-tab:hover:not(.active) { color: var(--csw-text); background: rgba(255,255,255,.05); }

/* ── Auth panel transition ── */
.csw-auth-panel { animation: csw-fadein .25s ease; }
@keyframes csw-fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── Input with icon ── */
.csw-input-icon-wrap {
  position: relative;
}
.csw-input-icon {
  position: absolute;
  left: .85rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: .95rem;
  pointer-events: none;
  z-index: 1;
}
.csw-input-icon-wrap input { padding-left: 2.75rem !important; }

/* ── Password wrap ── */
.csw-pw-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}
.csw-pw-wrap input {
  flex: 1;
  padding-right: 3rem !important;
}
.csw-pw-toggle {
  position: absolute;
  right: .75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: .95rem;
  padding: 0;
  color: var(--csw-muted);
  transition: color .2s;
  z-index: 1;
}
.csw-pw-toggle:hover { color: var(--csw-text); }

/* ── Password strength bar ── */
.csw-strength-bar {
  height: 4px;
  background: rgba(255,255,255,.08);
  border-radius: 2px;
  margin: .4rem 0 .25rem;
  overflow: hidden;
}
.csw-strength-bar div {
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: width .35s, background .35s;
}
.csw-strength-bar div.weak    { background: var(--csw-red);    }
.csw-strength-bar div.fair    { background: #f59e0b;            }
.csw-strength-bar div.good    { background: #3b82f6;            }
.csw-strength-bar div.strong  { background: var(--csw-green);   }
.csw-strength-bar div.perfect { background: #a855f7;            }

.csw-hint         { color: var(--csw-muted); font-size: .78rem; }
.csw-hint--weak   { color: #f87171; }
.csw-hint--fair   { color: #fcd34d; }
.csw-hint--good   { color: #93c5fd; }
.csw-hint--strong { color: #4ade80; }
.csw-hint--perfect{ color: #d8b4fe; }

/* ── Remember row ── */
.csw-remember-row {
  margin: .25rem 0 1rem;
}
.csw-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  cursor: pointer;
  font-size: .875rem;
  color: var(--csw-muted);
  line-height: 1.4;
}
.csw-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--csw-primary);
  flex-shrink: 0;
}
.csw-checkbox-label a { color: var(--csw-primary); text-decoration: none; }
.csw-checkbox-label a:hover { text-decoration: underline; }

/* ── Field link (forgot password) ── */
.csw-field-link {
  float: right;
  font-size: .78rem;
  color: var(--csw-primary);
  text-decoration: none;
  font-weight: 500;
}
.csw-field-link:hover { text-decoration: underline; }

/* ── Two-column form row ── */
.csw-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}

/* ── Btn spinner (inside button) ── */
.csw-btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  vertical-align: middle;
  margin-right: .3rem;
}

/* ── Footer link ── */
.csw-auth-foot {
  text-align: center;
  margin-top: 1.25rem;
  font-size: .875rem;
  color: var(--csw-muted);
}
.csw-auth-foot a { color: var(--csw-primary); text-decoration: none; }
.csw-auth-foot a:hover { text-decoration: underline; }

/* ── Shake animation (wrong password) ── */
.csw-shake {
  animation: csw-shake .45s ease;
}
@keyframes csw-shake {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-8px); }
  40%     { transform: translateX(8px); }
  60%     { transform: translateX(-5px); }
  80%     { transform: translateX(5px); }
}

/* ── Forgot password page ── */
#csw-forgot-page .csw-auth-card { max-width: 420px; }
.csw-forgot-back {
  display: block;
  text-align: center;
  margin-top: 1rem;
  font-size: .875rem;
  color: var(--csw-muted);
}
.csw-forgot-back a { color: var(--csw-primary); text-decoration: none; }

/* ── Email verification overlay ── */
.csw-auth-verify {
  text-align: center;
  padding: 2.5rem 2rem;
}
.csw-verify-icon { font-size: 3.5rem; margin-bottom: 1rem; }
.csw-auth-verify h2 { color: var(--csw-text); margin: 0 0 .75rem; }
.csw-auth-verify p  { color: var(--csw-muted); margin: 0 0 1.5rem; }

/* ══════════════════════════════════════════════════
   PROFILE PAGE
══════════════════════════════════════════════════ */
.csw-profile-hero {
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  border: 1px solid #4338ca;
  border-radius: var(--csw-radius);
  padding: 1.75rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.csw-profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--csw-primary), var(--csw-gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(124,58,237,.4);
}
.csw-profile-info { flex: 1; }
.csw-profile-info h2 { margin: 0 0 .3rem; font-size: 1.2rem; }
.csw-profile-info p  { margin: 0 0 .2rem; font-size: .875rem; color: var(--csw-muted); display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.csw-profile-joined  { font-size: .78rem !important; color: #6b7280 !important; }

.csw-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.25rem;
}

/* Danger zone card */
.csw-card--danger-zone .csw-card__header { border-bottom-color: rgba(220,38,38,.3); }
.csw-card--danger-zone .csw-card__header h3 { color: #f87171; }

/* ── Input date fix dark theme ── */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1) opacity(.6);
  cursor: pointer;
}

/* ── Responsive ── */
@media (max-width: 540px) {
  .csw-auth-card   { padding: 1.75rem 1.25rem; }
  .csw-form-row    { grid-template-columns: 1fr; }
  .csw-profile-hero{ flex-direction: column; text-align: center; }
  .csw-profile-info p { justify-content: center; }
  .csw-profile-grid{ grid-template-columns: 1fr; }
}
