:root {
  --bg: #f7f3ed;
  /* page background (cream) */
  --panel: #fffaf3;
  /* right side background */
  --ink: #0f172a;
  /* main text */
  --muted: #6b7280;
  /* secondary text */
  --brand: #3f3d9d;
  /* purple */
  --brand-500: #4f46e5;
  /* focus ring */
  --green: #6ea24f;
  /* primary button */
  --green-600: #5c8d42;
  --border: #dcdfe5;
  --radius: 14px;
  --shadow: 0 12px 30px rgba(17, 24, 39, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: v ar(--ink);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.logo-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Layout */
.split {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
}

.photo {
  position: relative;
  overflow: hidden;
  background: #ddd;
}

.photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.back {
  position: absolute;
  left: 18px;
  top: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.back svg {
  width: 18px;
  height: 18px;
  fill: #374151;
}

.auth {
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.brand {
  position: absolute;
  right: 22px;
  top: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #4b5563;
}

.brand .mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.brand {
  width: 64px;
  height: 58px;
  fill: var(--brand);
}

.panel {
  width: min(460px, 86%);
  margin: 40px auto;
}

h1 {
  font-size: 2.15rem;
  margin: 0 0 6px;
  color: #2f365f;
}

.sub {
  color: #6b7d5e;
  margin-bottom: 24px;
}

/* Form */
.field {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 10px 12px;
  border-radius: 12px;
}

.field + .field {
  margin-top: 14px;
}

.field:focus-within {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
}

.icon {
  width: 18px;
  height: 18px;
  opacity: 0.7;
}

.icon svg {
  width: 18px;
  height: 18px;
  fill: #94a3b8;
}

.input {
  border: 0;
  outline: 0;
  font: inherit;
  width: 100%;
  color: #111827;
}

.input::placeholder {
  color: #9aa2b1;
}

.forgot {
  display: inline-block;
  margin: 8px 2px 18px;
  color: #4b5563;
  text-decoration: none;
  font-weight: 600;
}

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

.btn-primary {
  width: 100%;
  border: 0;
  background: var(--green);
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 800;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  background: var(--green-600);
}

.btn-primary:focus {
  outline: none;
  box-shadow: var(--shadow), 0 0 0 4px rgba(34, 197, 94, 0.28);
}

.btn-primary .arrow {
  margin-left: 8px;
}

.hint {
  margin-top: 18px;
  color: #4b5563;
}

.hint a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 700;
}

.hint a:hover {
  text-decoration: underline;
}

/* Accessibility helpers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Responsive */
@media (max-width: 980px) {
  .split {
    grid-template-columns: 1fr;
  }

  .brand {
    right: 14px;
  }

  .panel {
    width: min(560px, 92%);
  }

  .back {
    left: 14px;
  }

  .photo {
    height: 40vh;
  }
}

.login-email-msg,
#loginEmailMsg {
  color: #ef4444;
  font-size: 0.9rem;
  margin-top: 6px;
  min-height: 1.1em;
}
