:root {
  --bg: #ffffff;
  --card: #111827e6;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --primary: #10b981;
  --primary-600: #059669;
  --ring: rgba(16,185,129,.35);
  --danger-bg: rgba(127,29,29,.35);
  --danger-border: rgba(239,68,68,.45);
  --danger-text: #fecaca;
  --shadow: 0 12px 34px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  background-image: url('../images/loginBg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--text);
  display: flex;
  justify-content: left;
  align-items: center;
  padding-left: 180px;
  min-height: 100vh;
}

/* Card */
.card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.08);
  overflow: hidden;
  padding:30px;
}

/* Header */
.header {
  padding: 24px 40px 30px;
  text-align: center;
}

.brand {
  display: flex;
  align-items: center;
  font-weight: 800;
  font-size: 32px;
}


.brand .dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 6px rgba(16,185,129,.25);
}
.brand span{
  display: block;
  margin: 0 auto;
}

.title {
  font-size: 22px;
  margin: 16px 0 6px;
  text-align: center;
}


.subtitle {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

/* Form */
form {
  padding: 10px 24px 24px;
}

.field {
  margin-bottom: 16px;
}
.field:last-of-type {
  margin-bottom: 60px;
}

.label {
  display: block;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 6px;
}

/* Django inputs */
input[type="text"],
input[type="password"] {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  background: #0b1220;
  border: 1px solid #1f2937;
  color: var(--text);
  outline: none;
  direction: rtl;
  transition: border-color .15s ease, box-shadow .15s ease;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--ring);
}

/* Helper & errors */
.helper {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.errors,
.errorlist {
  list-style: none;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger-text);
  font-size: 13px;
}

.errorlist {
  margin-top: 8px;
}

/* Remember row */
.row.auth-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 14px 0 18px;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}

.checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

/* Button */
.btn {
  width: 200px;
  display: block;
  margin: 0 auto;
  height: 46px;
  border: none;
  border-radius: 14px;
  background: var(--primary);
  color: #00110b;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: background .2s ease, transform .06s ease;
}

.btn:hover { background: var(--primary-600); }
.btn:active { transform: translateY(1px); }


@media (max-width: 480px) {
  body {
    padding-left: 20px;
    padding-right: 20px;
    justify-content: center;
    align-items: center;
  }

  .card {
    border-radius: 16px;
    padding: 20px 10px;
  }

  form {
    padding: 10px 15px 15px;
  }

  .title {
    font-size: 20px;
  }

  .field:last-of-type {
    margin-bottom: 40px;
  }

  input {
    height: 44px;
  }

  .btn {
    width: 100%;
    height: 46px;
  }
}

/* ردیف ثبت‌نام */
.register-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  font-size: 14px;
  color: var(--muted);
}

.btn-register {
  height: 38px;
  padding: 0 22px;
  border: 2px solid var(--primary);
  border-radius: 14px;
  background: transparent;
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background .2s ease, color .2s ease;
}

.btn-register:hover {
  background: var(--primary);
  color: #00110b;
}

@media (max-width: 480px) {
  .register-row {
    flex-direction: column;
    gap: 8px;
  }

  .btn-register {
    width: 100%;
    justify-content: center;
  }
}
/* ====================================
   PASSWORD TOGGLE
==================================== */

.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-left: 52px;
}

.toggle-password {
  position: absolute;

  left: 12px;
  top: 50%;

  transform: translateY(-50%);

  width: 36px;
  height: 36px;

  border: none;
  background: transparent;

  cursor: pointer;

  font-size: 18px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #94a3b8;

  transition: .2s;
}

.toggle-password:hover {
  color: #10b981;
}
.toggle-password img {
  width: 20px;
  height: 20px;

  object-fit: contain;

  filter: brightness(0) invert(1);
}
/* ====================================
   FORGOT PASSWORD
==================================== */

.forgot-password-row {
  margin-top: 8px;
  margin-right:8px;
  text-align: right;
}

.forgot-password-link {
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
  transition: color .2s ease;
}

.forgot-password-link:hover {
  color: var(--primary);
}

/* ====================================
   VERIFY CODE PAGE
==================================== */

.verify-title {
  text-align: center;
  margin: 0 0 18px;
  font-size: 22px;
}

.info-box {
  background: rgba(16,185,129,.12);
  border: 1px solid rgba(16,185,129,.35);

  color: #d1fae5;

  border-radius: 12px;

  padding: 12px 14px;

  margin-bottom: 20px;

  text-align: center;

  font-size: 14px;
  line-height: 1.8;
}

.action-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

.btn-secondary {
  width: 200px;
  height: 46px;

  border-radius: 14px;

  border: 1px solid #374151;

  background: transparent;

  color: #e5e7eb;

  text-decoration: none;

  display: flex;
  align-items: center;
  justify-content: center;

  font-weight: 700;
}

.btn-secondary:hover {
  background: rgba(255,255,255,.05);
}

@media (max-width:480px) {

  .action-buttons {
      flex-direction: column;
  }

  .btn-secondary,
  .btn {
      width: 100%;
  }
}