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

:root {
  --green: #1A7A4A;
  --green-dark: #135c37;
  --green-soft: #e6f4ed;
  --ink: #17211c;
  --muted: #6d7a73;
  --line: rgba(23, 33, 28, 0.12);
  --surface: #ffffff;
  --surface-soft: #f5f8f6;
  --red: #b8322c;
  --red-soft: #fdeceb;
  --shadow: 0 26px 70px rgba(23, 33, 28, 0.16);
  --shadow-soft: 0 12px 34px rgba(23, 33, 28, 0.1);
  --radius: 12px;
  --ease: 0.18s ease;
}

html,
body {
  min-height: 100%;
  font-family: 'DM Sans', sans-serif;
  background: #edf5f1;
  color: var(--ink);
}

body {
  overflow-x: hidden;
}

.page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(420px, 1.15fr);
  background:
    linear-gradient(90deg, rgba(26, 122, 74, 0.06) 0 1px, transparent 1px),
    linear-gradient(180deg, rgba(26, 122, 74, 0.05) 0 1px, transparent 1px),
    #edf5f1;
  background-size: 40px 40px;
}

.panel-left {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 44px;
  padding: 34px;
  background: var(--green);
  color: #ffffff;
  overflow: hidden;
}

.panel-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.13), transparent 34%),
    linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
  pointer-events: none;
}

.brand,
.panel-hero,
.features {
  position: relative;
  z-index: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: #ffffff;
  color: var(--green);
  border-radius: 12px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
}

.brand-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
}

.brand-name {
  font-family: 'DM Serif Display', serif;
  font-size: 25px;
  line-height: 1;
  letter-spacing: 0;
}

.brand-name small {
  display: block;
  margin-top: 5px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.66);
}

.panel-hero {
  max-width: 520px;
}

.panel-hero h2 {
  font-size: clamp(38px, 5.2vw, 68px);
  line-height: 0.98;
  color: #ffffff;
  margin-bottom: 22px;
  letter-spacing: 0;
  font-family: 'DM Serif Display', serif;
}

.panel-hero p {
  max-width: 410px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 16px;
  line-height: 1.75;
}

.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  max-width: 560px;
}

.feature {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.feature-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 999px;
  background: #ffffff;
  opacity: 0.75;
}

.feature span {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  line-height: 1.35;
}

.panel-right {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 48px;
}

.login-box {
  width: min(100%, 456px);
  padding: 34px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.login-header {
  margin-bottom: 26px;
}

.login-header h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 34px;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 8px;
}

.login-header p {
  color: var(--muted);
  font-size: 14px;
}

.form-group {
  margin-bottom: 16px;
}

label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.input-wrap {
  position: relative;
}

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

input[type="text"],
input[type="password"] {
  width: 100%;
  height: 48px;
  padding: 0 44px 0 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdfc;
  color: var(--ink);
  font: 500 14px/1 'DM Sans', sans-serif;
  outline: none;
  transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
}

input::placeholder {
  color: #a6b0aa;
}

input:hover {
  background: #ffffff;
  border-color: rgba(23, 33, 28, 0.2);
}

input:focus {
  background: #ffffff;
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(26, 122, 74, 0.12);
}

.input-wrap:focus-within .input-icon {
  color: var(--green);
}

.pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #99a59e;
  cursor: pointer;
  transform: translateY(-50%);
}

.pw-toggle:hover {
  background: var(--green-soft);
  color: var(--green);
}

.pw-toggle svg {
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.error-msg {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 11px 13px;
  margin-bottom: 16px;
  border: 1px solid rgba(184, 50, 44, 0.18);
  border-radius: 10px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
}

.error-msg.show {
  display: flex;
}

.error-msg svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.btn-login {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: 50px;
  margin-top: 8px;
  border: 0;
  border-radius: 10px;
  background: var(--green);
  color: #ffffff;
  font: 800 15px/1 'DM Sans', sans-serif;
  cursor: pointer;
  box-shadow: 0 14px 26px rgba(26, 122, 74, 0.24);
  transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
}

.btn-login:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(26, 122, 74, 0.28);
}

.btn-login:active {
  transform: translateY(0);
  box-shadow: 0 9px 18px rgba(26, 122, 74, 0.2);
}

.btn-login svg {
  width: 16px;
  height: 16px;
}

.btn-login.loading .btn-text {
  opacity: 0;
}

.btn-login.loading .spinner {
  display: block;
}

.spinner {
  position: absolute;
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.login-footer {
  margin-top: 24px;
  text-align: center;
  color: #9aa49f;
  font-size: 12px;
  line-height: 1.8;
}

.login-footer a {
  color: var(--green);
  text-decoration: none;
  font-weight: 800;
}

.login-footer a:hover {
  color: var(--green-dark);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
  .page {
    grid-template-columns: 1fr;
    background: #edf5f1;
  }

  .panel-left {
    min-height: auto;
    padding: 24px;
    gap: 26px;
  }

  .panel-hero h2 {
    font-size: 38px;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .panel-right {
    padding: 24px;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .panel-left {
    display: none;
  }

  .panel-right {
    min-height: 100vh;
    padding: 18px;
    align-items: center;
  }

  .login-box {
    padding: 24px;
    border-radius: 16px;
  }

  .login-header h1 {
    font-size: 30px;
  }

}
