/* Mofid dashboard login page (RTL) — visually matches the dashboard. */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, "Vazirmatn", sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  color: #333;
}

.login-wrap { width: 100%; max-width: 420px; padding: 20px; }

.login-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  padding: 34px 30px 26px;
}

.login-brand { text-align: center; margin-bottom: 26px; }
.brand-icon { font-size: 44px; line-height: 1; margin-bottom: 10px; }
.login-brand h1 { font-size: 22px; color: #444; margin-bottom: 4px; font-weight: 700; }
.login-brand p { color: #888; font-size: 13px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; color: #555; margin-bottom: 6px; }
.field input {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fafafa;
  transition: border-color .15s, box-shadow .15s;
  direction: ltr;
  text-align: left;
}
.field input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102,126,234,.18);
  background: #fff;
}

.password-row { position: relative; display: flex; align-items: stretch; }
.password-row input { padding-right: 0; }
.toggle-pass {
  border: 1px solid #ddd;
  border-left: none;
  background: #fafafa;
  color: #666;
  font-size: 15px;
  padding: 0 12px;
  border-radius: 0 8px 8px 0; /* RTL: attaches to left side */
  cursor: pointer;
  flex: 0 0 auto;
}
.toggle-pass:hover { background: #f0f0f0; }

.login-error {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ef9a9a;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 16px;
  text-align: center;
}

.signin-btn {
  width: 100%;
  padding: 13px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: #667eea;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s, transform .05s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.signin-btn:hover { background: #5a6fd6; }
.signin-btn:active { transform: scale(.99); }
.signin-btn:disabled { opacity: .7; cursor: not-allowed; }

.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

.login-foot { text-align: center; color: #aaa; font-size: 12px; margin-top: 18px; }

@media (max-width: 480px) {
  .login-card { padding: 26px 18px 20px; }
  .login-brand h1 { font-size: 19px; }
}
