/* ══ CREATIONWEBS AUTH STYLES ══ */

.cw-auth-wrap {
  max-width: 480px;
  margin: 40px auto;
  font-family: 'Inter', sans-serif;
}

/* ── Header ── */
.cw-auth-header {
  text-align: center;
  margin-bottom: 28px;
}
.cw-auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.cw-auth-logo-mark {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, #22883F, #1A6B3A);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
  color: #F7C535;
  box-shadow: 0 4px 14px rgba(34,136,63,.35);
}
.cw-auth-brand-name {
  font-size: 18px;
  font-weight: 800;
  color: #EDF2F7;
  letter-spacing: -.01em;
}
.cw-auth-title {
  font-size: 26px !important;
  font-weight: 800 !important;
  color: #FFFFFF !important;
  margin: 0 0 8px !important;
  letter-spacing: -.02em;
  line-height: 1.2 !important;
}
.cw-auth-subtitle {
  font-size: 14px;
  color: #7A8BA0;
  margin: 0 !important;
}

/* ── Box ── */
.cw-auth-box {
  background: #161B25;
  border: 1px solid #2A3347;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 20px 48px rgba(0,0,0,.4);
}

/* ── Notices ── */
.cw-auth-notice {
  border-radius: 9px;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
}
.cw-auth-error   { background: rgba(239,68,68,.1);  border: 1px solid #EF4444; color: #FCA5A5; }
.cw-auth-success { background: rgba(34,136,63,.1);  border: 1px solid #22883F; color: #6EE7A0; }

/* ── Fields ── */
.cw-auth-field {
  margin-bottom: 16px;
}
.cw-auth-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 0;
}
.cw-auth-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #7A8BA0;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
}
.cw-auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.cw-auth-icon {
  position: absolute;
  left: 12px;
  font-size: 14px;
  opacity: .5;
  pointer-events: none;
}
.cw-auth-input {
  width: 100%;
  background: #1E2535 !important;
  border: 1px solid #2A3347 !important;
  border-radius: 9px !important;
  padding: 11px 40px 11px 38px !important;
  font-size: 13px !important;
  color: #EDF2F7 !important;
  font-family: 'Inter', sans-serif !important;
  outline: none !important;
  transition: border-color .2s, box-shadow .2s !important;
  box-shadow: none !important;
}
.cw-auth-input:focus {
  border-color: #22883F !important;
  box-shadow: 0 0 0 3px rgba(34,136,63,.15) !important;
}
.cw-auth-input::placeholder { color: #4A5568 !important; }
.cw-auth-toggle-pass {
  position: absolute;
  right: 12px;
  cursor: pointer;
  font-size: 14px;
  opacity: .5;
  transition: opacity .2s;
  user-select: none;
}
.cw-auth-toggle-pass:hover { opacity: 1; }

/* ── Password strength ── */
.cw-password-strength {
  margin-top: 6px;
  height: 4px;
  border-radius: 4px;
  background: #2A3347;
  overflow: hidden;
  transition: all .3s;
}
.cw-password-strength::after {
  content: '';
  display: block;
  height: 100%;
  border-radius: 4px;
  transition: width .3s, background .3s;
}
.cw-pass-weak   .cw-password-strength::after,
.cw-password-strength.weak   { background: linear-gradient(90deg, #EF4444, #EF4444); }
.cw-password-strength.fair   { background: linear-gradient(90deg, #F59E0B, #F59E0B); }
.cw-password-strength.good   { background: linear-gradient(90deg, #22883F, #2EAD55); }
.cw-password-strength.strong { background: linear-gradient(90deg, #22883F, #F7C535); }

/* ── Remember / forgot row ── */
.cw-auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.cw-auth-remember {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #7A8BA0;
  cursor: pointer;
}
.cw-auth-remember input[type=checkbox] {
  accent-color: #22883F;
  width: 14px; height: 14px;
}
.cw-auth-forgot {
  font-size: 12px;
  color: #2EAD55;
  text-decoration: none;
  font-weight: 600;
  transition: color .2s;
}
.cw-auth-forgot:hover { color: #F7C535; }

/* ── Terms ── */
.cw-auth-terms {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12px;
  color: #7A8BA0;
  cursor: pointer;
  margin-bottom: 20px;
  line-height: 1.5;
}
.cw-auth-terms input[type=checkbox] { accent-color: #22883F; margin-top: 2px; flex-shrink: 0; }
.cw-auth-terms a { color: #2EAD55; text-decoration: none; }
.cw-auth-terms a:hover { color: #F7C535; }

/* ── Buttons ── */
.cw-auth-btn {
  display: block;
  width: 100%;
  padding: 13px;
  border-radius: 9px;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  background: linear-gradient(135deg, #22883F, #1A6B3A);
  color: #FFFFFF !important;
  box-shadow: 0 4px 18px rgba(34,136,63,.35);
  transition: all .2s;
  letter-spacing: .02em;
}
.cw-auth-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(34,136,63,.45);
  color: #FFFFFF !important;
}
.cw-auth-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}
.cw-auth-btn-gold {
  background: linear-gradient(135deg, #C9900A, #E5A812) !important;
  color: #0D1117 !important;
  box-shadow: 0 4px 18px rgba(201,144,10,.35) !important;
}
.cw-auth-btn-gold:hover {
  box-shadow: 0 8px 24px rgba(201,144,10,.5) !important;
  color: #0D1117 !important;
}

/* ── Divider ── */
.cw-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: #2A3347;
  font-size: 12px;
  color: #4A5568;
}
.cw-auth-divider::before,
.cw-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #2A3347;
}

/* ── Switch link ── */
.cw-auth-switch {
  text-align: center;
  font-size: 13px;
  color: #7A8BA0;
  margin: 0 !important;
}
.cw-auth-switch a {
  color: #2EAD55;
  text-decoration: none;
  font-weight: 700;
  margin-left: 4px;
}
.cw-auth-switch a:hover { color: #F7C535; }

/* ── Footer ── */
.cw-auth-footer {
  text-align: center;
  font-size: 11px;
  color: #4A5568;
  margin-top: 16px;
  padding-top: 16px;
}

/* ── Already logged in ── */
.cw-auth-already {
  background: #161B25;
  border: 1px solid #2A3347;
  border-radius: 16px;
  padding: 40px 32px;
  text-align: center;
}
.cw-auth-already-icon {
  width: 56px; height: 56px;
  background: rgba(34,136,63,.15);
  border: 2px solid #22883F;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  color: #2EAD55;
  margin: 0 auto 16px;
}
.cw-auth-already p { font-size: 14px; color: #7A8BA0; margin-bottom: 20px !important; }

/* ── Loading spinner ── */
.cw-auth-btn.loading {
  position: relative;
  color: transparent !important;
}
.cw-auth-btn.loading::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  animation: cwSpin .7s linear infinite;
}
.cw-auth-btn-gold.loading::after { border-top-color: #0D1117; }
@keyframes cwSpin { to { transform: translate(-50%,-50%) rotate(360deg); } }

@media (max-width: 500px) {
  .cw-auth-box { padding: 24px 20px; }
  .cw-auth-field-row { grid-template-columns: 1fr; }
}

/* ── LIGHT THEME for auth ── */
.cw-theme-light .cw-auth-box,
.cw-theme-light .cw-auth-already {
  background: #FFFFFF;
  border-color: #E2E8F0;
  box-shadow: 0 4px 24px rgba(0,0,0,.06);
}
.cw-theme-light .cw-auth-title { color: #1A202C !important; }
.cw-theme-light .cw-auth-brand-name { color: #1A202C; }
.cw-theme-light .cw-auth-subtitle { color: #64748B; }
.cw-theme-light .cw-auth-label { color: #64748B; }
.cw-theme-light .cw-auth-input {
  background: #F8FAFC !important;
  border-color: #E2E8F0 !important;
  color: #1A202C !important;
}
.cw-theme-light .cw-auth-input::placeholder { color: #94A3B8 !important; }
.cw-theme-light .cw-auth-divider { color: #94A3B8; }
.cw-theme-light .cw-auth-divider::before,
.cw-theme-light .cw-auth-divider::after { background: #E2E8F0; }
.cw-theme-light .cw-auth-remember,
.cw-theme-light .cw-auth-terms,
.cw-theme-light .cw-auth-switch { color: #64748B; }
.cw-theme-light .cw-auth-footer { color: #94A3B8; }
.cw-theme-light .cw-password-strength { background: #E2E8F0; }
.cw-theme-light .cw-auth-already p { color: #64748B; }
