/* ── Login page — standalone, no Base.astro ─────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Root ─────────────────────────────────────────────────────── */

.login-root {
  display: flex;
  min-height: 100vh;
  overflow: hidden;
}

/* ── Left panel ───────────────────────────────────────────────── */

.login-left {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 100%;
  overflow: hidden;
  padding: 48px 24px;
  background: #FDF5F0;
}

@media (min-width: 768px) {
  .login-left {
    width: 42%;
    padding: 64px 24px;
  }
}

.login-left-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #FDF5F0 0%, #fff 50%, rgba(230, 200, 185, 0.25) 100%);
  opacity: 0.7;
  pointer-events: none;
}

/* ── Box ──────────────────────────────────────────────────────── */

.login-box {
  position: relative;
  z-index: 1;
  width: 340px;
  max-width: 88vw;
  margin-top: -16px;
}

/* ── Logo ─────────────────────────────────────────────────────── */

.login-logo {
  margin-bottom: 20px;
}

.login-logo img {
  height: 48px;
  width: auto;
  display: block;
}

.login-divider {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 0 0 24px;
}

/* ── Heading ──────────────────────────────────────────────────── */

.login-heading {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: #0F172A;
  margin: 0 0 6px;
}

.login-subheading {
  font-size: 0.875rem;
  line-height: 1.65;
  color: #6b7280;
  margin: 0 0 28px;
}

/* ── Error ────────────────────────────────────────────────────── */

.login-error {
  font-size: 0.8125rem;
  color: #ef4444;
  text-align: center;
  margin: 0 0 14px;
}

.login-error[hidden] { display: none; }

/* ── Form ─────────────────────────────────────────────────────── */

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

.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

.login-input-wrap {
  position: relative;
}

.login-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: #C4C9D4;
  pointer-events: none;
}

.login-input {
  width: 100%;
  padding: 12px 12px 12px 40px;
  font-size: 0.875rem;
  font-family: inherit;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.login-input::placeholder { color: #D1D5DB; }

.login-input:focus {
  border-color: #7B3626;
  box-shadow: 0 0 0 3px rgba(123, 54, 38, 0.15);
}

.login-input--password {
  padding-right: 40px;
}

.login-pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #C4C9D4;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}

.login-pw-toggle:hover { color: #9CA3AF; }

.login-pw-toggle svg {
  width: 15px;
  height: 15px;
}

/* ── Remember + Forgot ────────────────────────────────────────── */

.login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  user-select: none;
}

.login-remember-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border: 1.5px solid #D1D5DB;
  border-radius: 4px;
  background: #fff;
  transition: border-color 0.15s, background 0.15s;
}

.login-remember-box.is-checked {
  border-color: #7B3626;
  background: #7B3626;
}

.login-remember-box svg {
  width: 9px;
  height: 9px;
}

.login-remember-label {
  font-size: 0.8125rem;
  color: #6B7280;
}

.login-forgot {
  font-size: 0.8125rem;
  color: #7B3626;
  text-decoration: none;
  transition: color 0.15s;
}

.login-forgot:hover { color: #5c2819; }

/* ── Submit ───────────────────────────────────────────────────── */

.login-submit {
  width: 100%;
  padding: 13px;
  margin-top: 4px;
  font-size: 0.9375rem;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.06em;
  color: #fff;
  background: linear-gradient(90deg, #9B4528 0%, #7B3626 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(123, 54, 38, 0.3);
  transition: opacity 0.15s, box-shadow 0.15s;
}

.login-submit:hover:not(:disabled) {
  opacity: 0.92;
  box-shadow: 0 4px 14px rgba(123, 54, 38, 0.35);
}

.login-submit:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

/* ── Register link ────────────────────────────────────────────── */

.login-register {
  margin-top: 20px;
  text-align: center;
  font-size: 0.8125rem;
  color: #6b7280;
}

.login-register-link {
  font-weight: 600;
  color: #7B3626;
  text-decoration: none;
  transition: color 0.15s;
}

.login-register-link:hover { color: #5c2819; }

/* ── Copyright ────────────────────────────────────────────────── */

.login-copyright {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  z-index: 1;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 300;
  color: #9ca3af;
}

.login-copyright a {
  color: inherit;
  text-decoration: underline;
  transition: color 0.15s;
}

.login-copyright a:hover { color: #6b7280; }

/* ── Right panel ──────────────────────────────────────────────── */

.login-right {
  display: none;
  flex: 1;
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  .login-right {
    display: block;
  }
}

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