:root {
  --ink: #15231f;
  --ink-soft: #3d524b;
  --muted: #6b7f77;
  --line: #d5e0db;
  --panel: rgba(255, 252, 248, 0.92);
  --accent: #1f6f5b;
  --accent-deep: #145344;
  --accent-soft: #e6f3ee;
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --radius: 14px;
  --font-display: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --font-body: "Figtree", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, #c8e6dc 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 80%, #d9e4f0 0%, transparent 50%),
    linear-gradient(160deg, #eef5f1 0%, #e8eef2 48%, #f3efe8 100%);
  -webkit-font-smoothing: antialiased;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
}

.login-brand {
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 6vw, 5rem);
  display: flex;
  align-items: flex-end;
  color: #f7fffb;
}

.brand-atmosphere {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(145deg, rgba(20, 83, 68, 0.88) 0%, rgba(25, 58, 72, 0.82) 100%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(180deg, #1a6b58 0%, #1c4554 100%);
  transform: scale(1.02);
  animation: atmosphere-drift 18s ease-in-out infinite alternate;
}

.brand-content {
  position: relative;
  z-index: 1;
  max-width: 28rem;
  animation: rise-in 0.7s ease-out both;
}

.brand-mark {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.brand-title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 500;
  line-height: 1.25;
  color: rgba(247, 255, 251, 0.88);
}

.brand-desc {
  margin: 0;
  max-width: 22rem;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(247, 255, 251, 0.72);
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3rem);
}

.login-form {
  width: min(100%, 24rem);
  padding: 2rem 2.1rem 2.15rem;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: calc(var(--radius) + 4px);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px rgba(21, 48, 42, 0.08);
  animation: rise-in 0.7s ease-out 0.12s both;
}

.form-header {
  margin-bottom: 1.75rem;
}

.form-header h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.form-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.05rem;
}

.field label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.field input {
  width: 100%;
  height: 2.85rem;
  padding: 0 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.98rem;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field input::placeholder {
  color: #9aaba4;
}

.field input:focus {
  border-color: #7eb8a6;
  box-shadow: 0 0 0 3px rgba(31, 111, 91, 0.14);
}

.form-error {
  margin: 0 0 0.95rem;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 0.88rem;
}

.submit-btn {
  width: 100%;
  height: 2.95rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: #f7fffb;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.submit-btn:hover {
  background: var(--accent-deep);
}

.submit-btn:active {
  transform: translateY(1px);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes atmosphere-drift {
  from {
    transform: scale(1.02) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.06) translate3d(-1.5%, 1%, 0);
  }
}

@media (max-width: 860px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-brand {
    min-height: 38vh;
    align-items: flex-end;
    padding: 2rem 1.4rem 1.8rem;
  }

  .brand-mark {
    font-size: clamp(2rem, 9vw, 2.6rem);
  }

  .login-panel {
    align-items: flex-start;
    padding: 1.25rem 1rem 2rem;
  }

  .login-form {
    padding: 1.5rem 1.25rem 1.6rem;
  }
}
