/* ============================================
   JISHORA AUTH PAGES - Shared Styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---- CSS Variables ---- */
:root {
  --primary:        #FF8C42;
  --primary-dark:   #ff7a28;
  --secondary:      #ff6b1a;
  --secondary-dark: #e65c10;
  --accent:         #ffaa5c;
  --gradient-btn:   linear-gradient(135deg, #FF8C42 0%, #ff6b1a 100%);
  --gradient-bg:    linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  --gradient-card:  linear-gradient(160deg, #ffffff 0%, #fafbfc 100%);
  --text-dark:      #1e293b;
  --text-mid:       #475569;
  --text-light:     #94a3b8;
  --border:         #e2e8f0;
  --border-focus:   #FF8C42;
  --input-bg:       #f8fafc;
  --input-hover:    #fff5ee;
  --white:          #ffffff;
  --shadow-card:    0 25px 60px rgba(0, 0, 0, 0.08), 0 8px 20px rgba(0,0,0,0.04);
  --shadow-btn:     0 8px 25px rgba(255, 140, 66, 0.35);
  --shadow-input:   0 4px 12px rgba(0, 0, 0, 0.08);
  --radius-card:    24px;
  --radius-input:   14px;
  --radius-btn:     14px;
  --transition:     0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--gradient-bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  position: relative;
  overflow-x: hidden;
}

/* ---- Animated Background Blobs ---- */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
  animation: blobFloat 8s ease-in-out infinite alternate;
}
body::before {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #FF8C42 0%, transparent 70%);
  top: -150px; left: -150px;
}
body::after {
  width: 450px; height: 450px;
  background: radial-gradient(circle, #ffaa5c 0%, transparent 70%);
  bottom: -120px; right: -120px;
  animation-delay: -4s;
}

@keyframes blobFloat {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, 30px) scale(1.08); }
}

/* ---- Auth Wrapper ---- */
.auth-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  animation: cardEntrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

@keyframes cardEntrance {
  from { opacity: 0; transform: translateY(40px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---- Card ---- */
.auth-card {
  background: var(--gradient-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 40px 40px 36px;
  border: 1px solid rgba(255,255,255,0.9);
  backdrop-filter: blur(4px);
  position: relative;
  overflow: clip;
}

/* ---- Card Header ---- */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-area img {
  height: 38px;
  width: auto;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Language Selector */
.lang-selector {
  position: relative;
  display: inline-block;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.lang-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 4px 14px rgba(12, 161, 188, 0.2);
}
.lang-btn .lang-flag {
  width: 22px;
  height: 16px;
  object-fit: cover;
  border-radius: 3px;
  display: block;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}
.lang-btn .lang-chevron {
  font-size: 0.6rem;
  color: var(--text-light);
  margin-left: 2px;
  transition: transform var(--transition);
}
.lang-selector.open .lang-btn { border-color: var(--primary); color: var(--primary); }
.lang-selector.open .lang-chevron { transform: rotate(180deg); }

/* Dropdown panel */
.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.13);
  min-width: 170px;
  z-index: 200;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.lang-selector.open .lang-dropdown {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--text-dark);
  transition: background var(--transition);
  border: none;
  background: none;
  width: 100%;
  font-family: inherit;
  text-align: left;
}
.lang-option:hover { background: #e6f7fa; color: var(--primary); }
.lang-option.active {
  background: #e6f7fa;
  color: var(--primary);
  font-weight: 700;
}
.lang-option .opt-flag {
  width: 22px;
  height: 16px;
  object-fit: cover;
  border-radius: 3px;
  display: block;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  flex-shrink: 0;
}
.lang-option .opt-check {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--primary);
  opacity: 0;
}
.lang-option.active .opt-check { opacity: 1; }

/* ---- Title Block ---- */
.auth-title {
  text-align: center;
  margin-bottom: 32px;
}

.auth-title h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.auth-title p {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.6;
  max-width: 320px;
  margin: 0 auto;
}

/* ---- Divider ---- */
.title-divider {
  width: 48px;
  height: 4px;
  background: var(--gradient-btn);
  border-radius: 4px;
  margin: 12px auto 0;
}

/* ---- Form ---- */
.auth-form { display: flex; flex-direction: column; gap: 16px; }

/* Field Group */
.field-group { display: flex; flex-direction: column; gap: 6px; }

.field-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dark);
  letter-spacing: 0.3px;
  padding-left: 2px;
}

/* Input Wrapper */
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 16px;
  width: 18px;
  height: 18px;
  color: var(--primary);
  pointer-events: none;
  transition: var(--transition);
  flex-shrink: 0;
}

.input-wrap input {
  width: 100%;
  padding: 14px 16px 14px 46px;
  background: var(--input-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-input);
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text-dark);
  transition: var(--transition);
  outline: none;
}

.input-wrap input::placeholder { color: var(--text-light); }

.input-wrap input:hover {
  border-color: #a5d8e0;
  background: var(--input-hover);
}

.input-wrap input:focus {
  border-color: var(--border-focus);
  background: var(--white);
  box-shadow: var(--shadow-input);
}

.input-wrap input:focus + .input-icon,
.input-wrap:focus-within .input-icon {
  color: var(--primary-dark);
}

/* Password toggle */
.pwd-toggle {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-light);
  transition: var(--transition);
  display: flex;
  align-items: center;
}
.pwd-toggle:hover { color: var(--primary); }
.pwd-toggle svg { width: 18px; height: 18px; }

/* Input with right button (captcha) */
.input-wrap.has-addon input { border-radius: var(--radius-input) 0 0 var(--radius-input); }

/* ---- Captcha Row ---- */
.captcha-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.captcha-row .input-wrap {
  flex: 1;
}

.captcha-row .input-wrap input {
  border-radius: var(--radius-input);
}

.captcha-box {
  min-width: 110px;
  background: linear-gradient(135deg, #ff6b1a 0%, #FF8C42 100%);
  border-radius: var(--radius-input);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  user-select: none;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(255, 140, 66, 0.35);
  flex-shrink: 0;
}

.captcha-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 3px,
    rgba(255,255,255,0.1) 3px,
    rgba(255,255,255,0.1) 6px
  );
}

.captcha-box:hover {
  background: linear-gradient(135deg, #e65c10 0%, #ff7a28 100%);
  transform: scale(1.02);
}

.captcha-code {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 4px;
  color: var(--white);
  font-family: 'Courier New', monospace;
  position: relative;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.captcha-hint {
  font-size: 0.68rem;
  color: var(--text-light);
  padding-left: 2px;
  margin-top: 2px;
}

/* ---- Remember / Forgot Row ---- */
.options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
}

.remember-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-mid);
  font-weight: 500;
  user-select: none;
}

.remember-label input[type="checkbox"] { display: none; }

.custom-check {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.remember-label input:checked ~ .custom-check {
  background: var(--primary);
  border-color: var(--primary);
}

.custom-check svg {
  width: 11px; height: 11px;
  stroke: white;
  stroke-width: 3;
  opacity: 0;
  transform: scale(0.5);
  transition: var(--transition);
}

.remember-label input:checked ~ .custom-check svg {
  opacity: 1;
  transform: scale(1);
}

.forgot-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}
.forgot-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ---- Submit Button ---- */
.btn-submit {
  width: 100%;
  padding: 15px;
  background: var(--gradient-btn);
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.btn-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
  opacity: 0;
  transition: var(--transition);
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(12, 161, 188, 0.55);
}
.btn-submit:hover::before { opacity: 1; }
.btn-submit:active { transform: translateY(0); }

/* Ripple */
.btn-submit .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transform: scale(0);
  animation: rippleAnim 0.6s linear;
  pointer-events: none;
}
@keyframes rippleAnim {
  to { transform: scale(4); opacity: 0; }
}

/* ---- Divider OR ---- */
.or-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
}
.or-divider::before,
.or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.or-divider span {
  font-size: 0.78rem;
  color: var(--text-light);
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* ---- Social Buttons ---- */
.social-row {
  display: flex;
  gap: 12px;
}

.btn-social {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-input);
  background: var(--white);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}
.btn-social:hover {
  border-color: var(--primary);
  background: #e6f7fa;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(12, 161, 188, 0.18);
}
.btn-social img { width: 18px; height: 18px; }

/* ---- Footer Link ---- */
.auth-footer {
  text-align: center;
  margin-top: 20px;
  padding-bottom: 4px;
  font-size: 0.88rem;
  color: var(--text-mid);
}
.auth-footer a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
}
.auth-footer a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ---- Name Row (Registration only) ---- */
.name-row {
  display: flex;
  gap: 12px;
}
.name-row .field-group { flex: 1; }

/* ---- Password Strength ---- */
.pwd-strength {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.strength-bars {
  display: flex;
  gap: 4px;
  flex: 1;
}
.strength-bar {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  transition: background 0.3s;
}
.strength-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-light);
  min-width: 42px;
  text-align: right;
}

/* ---- Terms Checkbox ---- */
.terms-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.terms-wrap input[type="checkbox"] { display: none; }
.terms-wrap .custom-check { margin-top: 1px; }
.terms-text {
  font-size: 0.82rem;
  color: var(--text-mid);
  line-height: 1.5;
  cursor: pointer;
  user-select: none;
}
.terms-text a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}
.terms-text a:hover { text-decoration: underline; }

/* ---- Error / Success Messages ---- */
.field-error {
  font-size: 0.75rem;
  color: #ef4444;
  padding-left: 2px;
  display: none;
}
.field-group.has-error .input-wrap input {
  border-color: #ef4444;
  background: #fff5f5;
}
.field-group.has-error .field-error { display: block; }

/* ---- Floating Label Variant ---- */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}
.step-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: var(--transition);
}
.step-dot.active {
  width: 24px;
  border-radius: 4px;
  background: var(--gradient-btn);
}
.step-dot.done { background: #22c55e; }

/* ---- Progress Rings on Register ---- */
.progress-badge {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 52px; height: 52px;
  background: var(--gradient-btn);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(12, 161, 188, 0.4);
  font-size: 0.65rem;
  font-weight: 700;
  color: white;
  line-height: 1.1;
}

/* ---- Responsive ---- */
@media (max-width: 520px) {
  .auth-card { padding: 28px 24px 28px; }
  .auth-title h1 { font-size: 1.7rem; }
  .name-row { flex-direction: column; gap: 16px; }
  .social-row { flex-direction: column; }
}


/* ---- Captcha Animation ---- */
.captcha-code {
  transition: all 0.2s ease;
  display: inline-block;
}

.captcha-box:active .captcha-code {
  transform: scale(0.95);
}

/* ---- Error State Styling ---- */
.field-group.error .input-wrap input,
.field-group.error .input-wrap {
  border-color: #ef4444 !important;
}

.field-error {
  display: none;
  color: #ef4444;
  font-size: 0.75rem;
  margin-top: 6px;
  font-weight: 500;
}

.field-group.error .field-error {
  display: block;
}

/* ---- Password Strength Colors ---- */
.strength-label {
  font-weight: 600;
  font-size: 0.75rem;
}

.strength-label.weak {
  color: #ef4444;
}

.strength-label.fair {
  color: #f97316;
}

.strength-label.good {
  color: #eab308;
}

.strength-label.strong {
  color: #22c55e;
}

/* ---- Language Selector Active State ---- */
.lang-selector.open .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-chevron {
  transition: transform var(--transition);
}

.lang-selector.open .lang-chevron {
  transform: rotate(180deg);
}


/* ---- Button Loading States ---- */
.btn-submit {
  position: relative;
  transition: all 0.3s ease;
}

.btn-submit:disabled {
  opacity: 0.8;
  cursor: not-allowed;
}

.btn-submit i.fa-spinner {
  animation: spin 1s linear infinite;
}

.btn-submit i.fa-check {
  color: white;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ---- Smooth Button State Transitions ---- */
.btn-submit:disabled {
  transform: scale(0.98);
}

.btn-submit:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-btn), 0 12px 30px rgba(255, 140, 66, 0.4);
}

.btn-submit:not(:disabled):active {
  transform: translateY(0);
}
