:root {
  --bg: #f7f6f2;
  --surface: #fff;
  --text: #292621;
  --muted: #7d766e;
  --line: #ece8e2;
  --accent: #0e5a34;
  --accent-soft: #e7f1eb;
  --shadow: 0 28px 80px rgba(70, 55, 40, 0.13);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 12%, #dcece2 0, transparent 30%),
    radial-gradient(circle at 90% 88%, #edf3df 0, transparent 30%), var(--bg);
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  color: var(--text);
}
button,
input {
  font: inherit;
}
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 70px 24px;
  position: relative;
}
.back-link {
  position: absolute;
  top: 26px;
  right: 32px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #655f58;
  text-decoration: none;
  font-weight: 600;
}
.back-link:hover {
  color: var(--accent);
}
.login-card {
  width: min(1060px, 100%);
  min-height: 650px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 32px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.brand-panel {
  position: relative;
  padding: 38px;
  overflow: hidden;
  background: linear-gradient(145deg, #f9fcfa, #eaf4ee);
}
.brand-lockup,
.mobile-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  width: 48px;
  height: 48px;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.brand-lockup strong,
.mobile-brand strong {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
}
.brand-lockup small {
  display: block;
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.7px;
}
.brand-message {
  position: relative;
  z-index: 2;
  margin-top: 58px;
  max-width: 500px;
}
.mini-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  background: #fff;
  padding: 9px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.brand-message h1 {
  font-size: clamp(42px, 5vw, 68px);
  line-height: 1.12;
  margin: 18px 0 15px;
  letter-spacing: -2px;
}
.brand-message h1 em {
  font-style: normal;
  color: var(--accent);
}
.brand-message p {
  color: var(--muted);
  line-height: 1.9;
  font-size: 16px;
  max-width: 450px;
}
.food-visual {
  position: absolute;
  left: -70px;
  bottom: -115px;
  width: 430px;
  height: 430px;
  border-radius: 50%;
  border: 12px solid rgba(255, 255, 255, 0.86);
  box-shadow: 0 28px 70px rgba(14, 90, 52, 0.18);
}
.food-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.visual-badge {
  position: absolute;
  right: -35px;
  top: 78px;
  background: #fff;
  padding: 13px 16px;
  border-radius: 16px;
  box-shadow: 0 14px 35px rgba(50, 40, 30, 0.12);
  color: var(--accent);
  font-weight: 700;
  display: flex;
  gap: 9px;
  align-items: center;
}
.form-panel {
  padding: 75px 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.mobile-brand {
  display: none;
}
.form-heading > span {
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
}
.form-heading h2 {
  font-size: 38px;
  margin: 6px 0;
}
.form-heading p {
  color: var(--muted);
  margin: 0 0 33px;
  line-height: 1.8;
}
.form-panel form > label {
  display: block;
  font-weight: 700;
  font-size: 13px;
  margin: 17px 0 8px;
}
.field {
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fcfbf9;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 16px;
  transition: 0.25s;
}
.field:focus-within {
  border-color: #78ad8e;
  background: #fff;
  box-shadow: 0 0 0 4px #eaf4ee;
}
.field > i {
  color: #a39b92;
}
.field input {
  border: 0;
  outline: 0;
  background: transparent;
  flex: 1;
  min-width: 0;
}
.field button {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #817a72;
  cursor: pointer;
}
.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 24px;
  font-size: 13px;
}
.remember {
  display: flex;
  align-items: center;
  gap: 8px;
}
.remember input {
  accent-color: var(--accent);
}
.forgot {
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
}
.submit-btn {
  height: 56px;
  border: 0;
  border-radius: 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(14, 90, 52, 0.25);
  transition: 0.25s;
  margin-top: 20px;
}
.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(14, 90, 52, 0.3);
}
.demo-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  margin: 20px 0 0;
}
.demo-note i {
  color: var(--accent);
  margin-top: 4px;
}
@media (max-width: 820px) {
  .login-page {
    padding: 80px 18px 28px;
  }
  .back-link {
    top: 22px;
    right: 22px;
  }
  .login-card {
    grid-template-columns: 1fr;
    min-height: auto;
    max-width: 520px;
  }
  .brand-panel {
    display: none;
  }
  .form-panel {
    padding: 40px 28px;
  }
  .mobile-brand {
    display: flex;
    margin-bottom: 40px;
  }
  .form-heading h2 {
    font-size: 32px;
  }
}
@media (max-width: 480px) {
  .back-link span {
    display: none;
  }
  .login-card {
    border-radius: 24px;
  }
  .form-panel {
    padding: 30px 20px;
  }
  .form-options {
    align-items: flex-start;
    gap: 14px;
  }
  .submit-btn {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* Narrow-screen resilience */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
.login-page,
.login-card,
.form-panel,
.form-panel form {
  min-width: 0;
}
.login-card {
  max-width: 100%;
}
.form-panel {
  width: 100%;
}
.field input {
  width: 100%;
  min-width: 0;
}
.form-heading,
.form-heading p,
.demo-note {
  overflow-wrap: anywhere;
}

@media (max-width: 480px) {
  .login-page {
    display: block;
    min-height: 100svh;
    padding: 66px 12px 18px;
  }
  .back-link {
    top: 18px;
    right: 16px;
  }
  .login-card {
    width: 100%;
    max-width: none;
    border-radius: 22px;
  }
  .form-panel {
    padding: 26px 16px 22px;
  }
  .mobile-brand {
    margin-bottom: 26px;
    justify-content: center;
  }
  .form-heading {
    text-align: center;
  }
  .form-heading h2 {
    font-size: 29px;
    line-height: 1.25;
    margin: 6px 0;
  }
  .form-heading p {
    font-size: 12px;
    line-height: 1.7;
    margin-bottom: 24px;
  }
  .field {
    height: 52px;
    border-radius: 14px;
    padding: 0 13px;
  }
  .form-panel form > label {
    font-size: 12px;
    margin: 14px 0 7px;
  }
  .form-options {
    width: 100%;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 16px 0 20px;
  }
  .remember {
    flex: 0 0 auto;
  }
  .forgot {
    max-width: 100%;
    padding: 4px 0;
    white-space: normal;
    text-align: left;
  }
  .submit-btn {
    min-width: 0;
    height: 52px;
    padding: 0 12px;
    gap: 10px;
    font-size: 13px;
  }
  .submit-btn span {
    min-width: 0;
    white-space: normal;
    line-height: 1.4;
    text-align: center;
  }
  .demo-note {
    font-size: 10px;
    margin-top: 16px;
  }
}

.brand-lockup img {
  width: 190px;
  height: 86px;
  object-fit: contain;
  filter: invert(1);
}
.mobile-brand img {
  width: 150px;
  height: 64px;
  object-fit: contain;
}
.login-error {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff0ef;
  color: #a13d35;
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 320px) {
  .login-page {
    padding-inline: 8px;
  }
  .form-panel {
    padding-inline: 12px;
  }
  .mobile-brand {
    margin-bottom: 20px;
  }
  .brand-mark {
    width: 42px;
    height: 42px;
  }
  .form-heading h2 {
    font-size: 25px;
  }
  .form-options {
    font-size: 11px;
  }
  .submit-btn {
    font-size: 12px;
  }
}
