/* ============================================
   LOGIN PAGE — login.css
   ============================================ */

/* --- Page Split Layout (mirrored from register) --- */
.login-page {
  display: flex;
  min-height: 100vh;
  direction: rtl;
}

/* ============================================
   LEFT SIDE — Brand Panel (45%)
   ============================================ */
.login-brand-side {
  width: 45%;
  background: #7145D6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  min-height: 100vh;
  position: relative;
}

.login-brand-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-brand-logo {
  font-family: 'Cairo', sans-serif;
  font-size: 40px;
  font-weight: 800;
  color: #FFFFFF;
}

/* --- Fake Stat Card --- */
.login-stat-card {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 20px 24px;
  max-width: 260px;
  width: 100%;
  margin-top: 40px;
  text-align: right;
}

.login-stat-live {
  display: flex;
  align-items: center;
  gap: 6px;
}

.login-stat-dot {
  width: 8px;
  height: 8px;
  background: #0C936B;
  border-radius: 50%;
  display: inline-block;
}

.login-stat-live span:last-child {
  font-size: 12px;
  color: #3D3D3D;
  font-weight: 500;
}

.login-stat-number {
  font-size: 36px;
  font-weight: 800;
  color: #0F0F0F;
  margin-top: 8px;
  line-height: 1.2;
}

.login-stat-label {
  font-size: 13px;
  color: #7D7FA5;
}

.login-stat-divider {
  height: 1px;
  background: #EBEBEB;
  margin: 16px 0;
}

.login-stat-avatars {
  display: flex;
  align-items: center;
  direction: ltr;
}

.login-stat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  margin-left: -8px;
}

.login-stat-avatar:first-child {
  margin-left: 0;
}

.login-stat-count {
  font-size: 13px;
  color: #7D7FA5;
  margin-right: 8px;
}

/* --- Brand Bottom --- */
.login-brand-bottom {
  position: absolute;
  bottom: 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.login-brand-bottom span {
  color: #FFFFFF;
  opacity: 0.7;
  font-size: 14px;
}

.login-brand-bottom a {
  color: #FFFFFF;
  font-weight: 700;
  text-decoration: underline;
  font-size: 14px;
}

/* ============================================
   RIGHT SIDE — Form Area (55%)
   ============================================ */
.login-form-side {
  width: 55%;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  min-height: 100vh;
}

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

/* --- Header --- */
.login-header {
  margin-bottom: 36px;
}

.login-title {
  font-size: 28px;
  font-weight: 800;
  color: #0F0F0F;
}

.login-subtitle {
  font-size: 15px;
  color: #7D7FA5;
  margin-top: 8px;
}

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

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #3D3D3D;
  margin-bottom: 6px;
}

/* --- Input Styling --- */
.form-group input {
  border: 1.5px solid #DDDDE3;
  border-radius: 10px;
  padding: 12px 16px;
  font-family: 'Cairo', sans-serif;
  font-size: 15px;
  direction: rtl;
  text-align: right;
  color: #0F0F0F;
  background-color: #FFFFFF;
  width: 100%;
  transition: border-color 200ms ease, box-shadow 200ms ease;
  -webkit-appearance: none;
  appearance: none;
}

.form-group input::placeholder {
  color: #ADADB8;
}

.form-group input:focus {
  border-color: #7145D6;
  box-shadow: 0 0 0 3px rgba(113, 69, 214, 0.12);
  outline: none;
  background-color: #FFFFFF !important;
}

/* Error state */
.form-group.has-error input {
  border-color: #E74A41;
}

.form-group .error-message {
  font-size: 12px;
  color: #E74A41;
  margin-top: 4px;
  display: none;
}

.form-group.has-error .error-message {
  display: block;
}

/* --- Password Wrapper --- */
.input-password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-password-wrapper input {
  padding-left: 48px;
}

.password-toggle {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Forgot Password --- */
.login-forgot {
  text-align: left;
  margin-top: -4px;
}

.login-forgot a {
  font-size: 13px;
  color: #7145D6;
  font-weight: 500;
  text-decoration: none;
}

.login-forgot a:hover {
  text-decoration: underline;
}

/* --- Error Banner --- */
.login-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #E74A41;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  text-align: center;
}

/* --- Submit Button --- */
.login-submit-btn {
  width: 100%;
  background: #7145D6;
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  padding: 15px;
  font-family: 'Cairo', sans-serif;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 200ms ease;
  margin-top: 24px;
}

.login-submit-btn:hover {
  background: #5E38B5;
}

/* --- Divider --- */
.login-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
}

.login-divider-line {
  flex: 1;
  height: 1px;
  background: #EBEBEB;
}

.login-divider-text {
  font-size: 13px;
  color: #7D7FA5;
  padding: 0 12px;
}

/* --- Account Type Select --- */
.login-type-select {
  margin-bottom: 0;
}

.login-type-label {
  font-size: 12px;
  color: #7D7FA5;
  margin-bottom: 8px;
}

.login-type-buttons {
  display: flex;
  gap: 8px;
}

.login-type-btn {
  flex: 1;
  background: #F8F7FF;
  border: 1.5px solid #EBEBEB;
  border-radius: 10px;
  padding: 10px;
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #3D3D3D;
  text-align: center;
  cursor: pointer;
  transition: border-color 200ms ease, color 200ms ease, background 200ms ease;
}

.login-type-btn:hover {
  border-color: #7145D6;
  color: #7145D6;
  background: #FFFFFF;
}

.login-type-btn.active {
  border-color: #7145D6;
  background: #F3F0FF;
  color: #7145D6;
}

/* --- Register Link --- */
.login-register-link {
  text-align: center;
  margin-top: 32px;
  font-size: 14px;
  color: #7D7FA5;
}

.login-register-link a {
  color: #7145D6;
  font-weight: 600;
  margin-right: 4px;
}

.login-register-link a:hover {
  text-decoration: underline;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .login-page {
    flex-direction: column;
  }

  .login-brand-side {
    display: none;
  }

  .login-form-side {
    width: 100%;
    min-height: 100vh;
    padding: 32px 20px;
  }
}
