*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { height: 100%; }
body {
  font-family: 'Cairo', 'Inter', sans-serif;
  direction: rtl;
  background: #0f0f0f;
  color: #e0e0e0;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
}

::selection { background: rgba(110, 173, 188, 0.3); color: #fff; }

.auth-wrap {
  width: 100%; max-width: 360px;
  padding: 0;
}


.top-logo {
  position: fixed; top: 24px; right: 28px; z-index: 10;
  font-family: 'Syne', 'Cairo', sans-serif;
  font-size: 18px; font-weight: 700; color: #fff;
  text-decoration: none;
}
.top-logo span { color: #6EADBC; }
.back-home {
  position: fixed; top: 24px; left: 28px; z-index: 10;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  font-size: 13px; color: #888; text-decoration: none;
  border: 1px solid #333; border-radius: 10px;
  transition: all 0.2s;
}
.back-home svg { width: 16px; height: 16px; }
.back-home:hover { border-color: #6EADBC; color: #6EADBC; }

.auth-header { text-align: center; margin-bottom: 24px; }
.auth-header h2 {
  font-size: 20px; font-weight: 700; color: #fff;
  margin-bottom: 4px;
}
.auth-header p {
  font-size: 13px; color: #777;
  font-weight: 400;
}

.form-group { margin-bottom: 14px; direction: rtl; }
.form-group label {
  display: block; margin-bottom: 6px;
  font-size: 12px; font-weight: 500; color: #888;
}
.password-wrap {
  position: relative;
}
.password-wrap .form-input {
  padding-left: 40px;
}
.toggle-password {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  width: 22px; height: 22px;
  padding: 0; display: flex; align-items: center; justify-content: center;
  opacity: 0.35; transition: opacity 0.2s;
}
.toggle-password:hover { opacity: 0.7; }
.toggle-password svg { width: 18px; height: 18px; fill: none; stroke: #e0e0e0; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.toggle-password .eye-off { display: none; }

.form-input {
  width: 100%; padding: 12px 16px;
  border-radius: 10px;
  border: none;
  background: #222;
  color: #e0e0e0;
  font-family: 'Inter', 'Cairo', sans-serif;
  font-size: 14px;
  direction: rtl;
  transition: all 0.2s;
  outline: none;
}
.form-input::placeholder { color: #555; font-size: 13px; }
.form-input:focus {
  border-color: #6EADBC;
  background: #1a1a1a;
  box-shadow: 0 0 0 3px rgba(110,173,188,0.1);
}

.form-extra {
  display: flex; justify-content: flex-start; margin-top: -2px; margin-bottom: 20px;
}
.form-extra a {
  font-size: 12px; color: #6EADBC;
  text-decoration: none; transition: color 0.2s;
}
.form-extra a:hover { color: #8fc5d4; }

.btn-submit {
  width: 100%; padding: 12px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #2a7a8c, #1f5f6e);
  color: #fff;
  font-family: 'Cairo', 'Inter', sans-serif;
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(42,122,140,0.3);
}
.btn-submit:active { transform: translateY(0); }

.divider {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0; direction: rtl;
}
.divider-line { flex: 1; height: 1px; background: rgba(255,255,255,0.06); }
.divider-text {
  font-size: 11px; color: #555;
  white-space: nowrap;
}

.social-row {
  display: flex; gap: 8px;
}
.social-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px;
  border-radius: 10px;
  border: none;
  background: #222;
  color: #888;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif; font-size: 13px;
}
.social-btn:hover {
  background: #2a2a2a;
  color: #ccc;
}
.social-btn svg { width: 16px; height: 16px; }

.auth-footer {
  text-align: center; margin-top: 18px;
  font-size: 13px; color: #666;
}
.auth-footer a {
  color: #6EADBC; text-decoration: none;
  font-weight: 600; transition: color 0.2s;
}
.auth-footer a:hover { color: #8fc5d4; }

.terms {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 16px;
}
.terms input[type="checkbox"] {
  width: 14px; height: 14px; accent-color: #6EADBC;
  cursor: pointer;
}
.terms label {
  font-size: 12px; color: #777;
  cursor: pointer;
}
.terms label a { color: #6EADBC; text-decoration: none; }
.terms label a:hover { color: #8fc5d4; }

@media (max-width: 640px) {
  .top-logo { font-size: 17px; top: 16px; right: 16px; }
  .back-home { font-size: 12px; top: 18px; left: 16px; padding: 5px 10px; border-radius: 8px; }
}
