/* Shared formal auth layout for NegarLine */
body.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-app, #0e1621);
  padding: 24px;
}

.login-container {
  display: flex;
  width: 100%;
  max-width: 920px;
  min-height: 540px;
  background: var(--bg-panel, #17212b);
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  border: 1px solid var(--border-soft, rgba(255,255,255,0.06));
}

.brand-side {
  flex: 1;
  background: #020617;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px 36px;
  position: relative;
  overflow: hidden;
  color: white;
}

.brand-side .grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(36, 129, 204, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 129, 204, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 0;
  pointer-events: none;
}

.brand-side::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(36, 129, 204, 0.28) 0%, rgba(94, 168, 245, 0.1) 40%, transparent 70%);
  border-radius: 50%;
  top: 10%;
  left: 10%;
  z-index: 1;
  animation: authFloat1 8s ease-in-out infinite;
}

.brand-side::after {
  content: '';
  position: absolute;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(94, 168, 245, 0.2) 0%, rgba(36, 129, 204, 0.08) 40%, transparent 70%);
  border-radius: 50%;
  bottom: 5%;
  right: 5%;
  z-index: 1;
  animation: authFloat2 10s ease-in-out infinite;
}

@keyframes authFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.9; }
  33% { transform: translate(40px, 30px) scale(1.1); opacity: 1; }
  66% { transform: translate(-20px, 50px) scale(0.95); opacity: 0.85; }
}

@keyframes authFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.85; }
  40% { transform: translate(-50px, -30px) scale(1.15); opacity: 1; }
  70% { transform: translate(30px, -40px) scale(0.9); opacity: 0.8; }
}

.brand-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 320px;
}

.brand-logo {
  width: 160px;
  height: 160px;
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-content h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  background: linear-gradient(90deg, #5ea8f5, #2481cc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-content p {
  font-size: 0.9rem;
  color: #7b8e9f;
  line-height: 1.7;
  font-weight: 300;
}

.features {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  text-align: right;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  color: #7b8e9f;
}

.feature-item span {
  width: 24px;
  height: 24px;
  background: rgba(36, 129, 204, 0.18);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.75rem;
  color: #5ea8f5;
}

.form-side {
  flex: 1;
  background: var(--bg-panel, #17212b);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 28px;
}

.form-container {
  width: 100%;
  max-width: 340px;
}

.form-header {
  margin-bottom: 22px;
}

.form-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main, #fff);
  margin-bottom: 6px;
}

.form-header p {
  color: var(--text-dim, #7b8e9f);
  font-size: 0.86rem;
  line-height: 1.6;
}

.form-side .field {
  margin-bottom: 14px;
}

.form-side .field label {
  display: block;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--text-dim, #7b8e9f);
  margin-bottom: 5px;
}

.form-side .field-input-wrap {
  position: relative;
}

.form-side .field-input-wrap input {
  width: 100%;
  height: 44px;
  padding: 0 40px 0 12px;
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text-main, #fff);
  background: var(--bg-input, #24303f);
  transition: all 0.2s ease;
  outline: none;
}

.form-side .field-input-wrap input:focus {
  border-color: var(--accent, #2481cc);
  box-shadow: 0 0 0 3px rgba(36, 129, 204, 0.2);
}

.form-side .field-input-wrap input::placeholder {
  color: var(--text-faint, #52626f);
}

.form-side .field-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint, #52626f);
  pointer-events: none;
  display: flex;
}

.form-side .field-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.form-side .toggle-password {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-faint, #52626f);
  padding: 4px;
  display: flex;
}

.form-side .toggle-password .icon-eye-off { display: none; }
.form-side .toggle-password.showing .icon-eye { display: none; }
.form-side .toggle-password.showing .icon-eye-off { display: block; }

.form-side .toggle-password svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.form-side .remember-me-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim, #7b8e9f);
  font-size: 0.84rem;
  cursor: pointer;
  margin-bottom: 12px;
}

.form-side .remember-me-row input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent, #2481cc);
  cursor: pointer;
}

.form-side .btn {
  width: 100%;
  height: 44px;
  background: var(--accent-grad, linear-gradient(135deg, #5ea8f5, #2481cc));
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.93rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-side .btn:hover {
  box-shadow: 0 8px 18px -6px rgba(36, 129, 204, 0.5);
  transform: translateY(-1px);
}

.form-side .auth-switch {
  text-align: center;
  margin-top: 14px;
  font-size: 0.84rem;
  color: var(--text-dim, #7b8e9f);
}

.form-side .auth-switch a {
  color: var(--accent-light, #5ea8f5);
  font-weight: 500;
}

.form-side .auth-switch a:hover {
  text-decoration: underline;
}

.form-side .error-msg {
  background: rgba(224, 85, 85, 0.12);
  color: #e05555;
  border: 1px solid rgba(224, 85, 85, 0.25);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.84rem;
  margin-bottom: 14px;
  line-height: 1.5;
}

.form-side .success-msg {
  background: rgba(46, 160, 67, 0.15);
  border: 1px solid rgba(46, 160, 67, 0.35);
  color: #3fb950;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.84rem;
  margin-bottom: 14px;
  line-height: 1.5;
}

.form-side .captcha-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.form-side .captcha-row img {
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  cursor: pointer;
  background: #17212b;
}

.form-side .captcha-row button {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: #8899a6;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
}

.form-side .captcha-row input[type="text"] {
  flex: 1;
  min-width: 110px;
  text-transform: uppercase;
  letter-spacing: 2px;
  height: 40px;
  padding: 0 10px;
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: var(--bg-input, #24303f);
  color: #fff;
  font-family: inherit;
}

.form-side .btn-about {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 11px;
  background: transparent;
  border: 1.5px solid var(--accent, #2481cc);
  border-radius: 10px;
  color: var(--accent, #2481cc);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.form-side .btn-about:hover {
  background: var(--accent, #2481cc);
  color: #fff;
}

.form-side .btn-terms {
  border-color: rgba(255,255,255,0.25);
  color: #8899a6;
  margin-top: 8px;
}

.form-side .btn-terms:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}

.form-side small {
  color: #8899a6;
  font-size: 12px;
  display: block;
  margin-top: 4px;
}

@media (max-width: 800px) {
  .login-container {
    flex-direction: column;
    max-width: 420px;
    min-height: auto;
  }
  .brand-side {
    padding: 32px 24px;
  }
  .brand-logo {
    width: 120px;
    height: 120px;
  }
  .features {
    display: none;
  }
  .form-side {
    padding: 24px 20px;
  }
}
