@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,600&display=swap');

:root {
  --forest: #0d332d;
  --forest-light: #194c40;
  --cream: #f7f8f2;
  --ink: #1b3930;
  --line: #d9e6dc;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'DM Sans', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--forest); }
button, input { font: inherit; }
[hidden] { display: none !important; }

.login-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  padding: 32px 20px;
  isolation: isolate;
  background: radial-gradient(circle at 17% 82%, #277947 0, transparent 39%), radial-gradient(circle at 82% 13%, #a12d31 0, transparent 38%), linear-gradient(125deg, #075230 0%, #f8faf4 50%, #a3222b 100%);
}
.ambient { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.ambient-ring {
  position: absolute;
  width: min(82vw, 920px);
  aspect-ratio: 1;
  border: 1px solid rgba(208, 236, 213, .13);
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: breathe 12s ease-in-out infinite;
}
.ambient-ring-two { width: min(65vw, 720px); animation-delay: -4s; }
.ambient-ring-three { width: min(49vw, 530px); animation-delay: -8s; }
.ambient-glow { position: absolute; width: 430px; height: 430px; border-radius: 50%; background: #76ba82; filter: blur(110px); opacity: .16; right: -120px; top: -130px; animation: drift 14s ease-in-out infinite alternate; }

.login-panel {
  width: min(100%, 440px);
  position: relative;
  padding: 46px 46px 48px;
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 24px;
  background: var(--cream);
  box-shadow: 0 30px 90px rgba(3, 26, 20, .34), 0 2px 8px rgba(3, 26, 20, .12);
  animation: panel-in .8s cubic-bezier(.18, .7, .2, 1) both;
}
.brand { display: flex; align-items: center; gap: 16px; margin-bottom: 46px; }
.brand-logo { width: 76px; height: 76px; object-fit: contain; flex: none; border-radius: 10px; background: #fff; }
.brand-mark { width: 58px; height: 58px; flex: none; display: grid; place-items: center; border-radius: 17px; background: var(--forest); color: #f4f8ed; position: relative; box-shadow: 0 9px 18px rgba(13, 51, 45, .18); }
.brand-mark span { font: 600 39px/1 var(--serif); transform: translateY(-2px); }
.brand-mark i { width: 8px; height: 8px; position: absolute; bottom: 12px; right: 11px; border-radius: 50%; background: #b4dcae; }
.brand-name h1 { margin: 0; font: 600 30px/1 var(--serif); letter-spacing: -.8px; }
.brand-name p { margin: 6px 0 0; color: #547465; font-size: 10px; font-weight: 700; letter-spacing: 2.2px; }

.login-form h2 { margin: 0 0 26px; font: 600 30px/1.15 var(--serif); letter-spacing: -.7px; }
.login-form label { display: block; margin: 18px 0 8px; font-size: 12px; font-weight: 700; color: #35574a; }
.input-wrap { position: relative; }
.input-wrap input { width: 100%; height: 53px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); padding: 0 15px; outline: none; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.input-wrap input::placeholder { color: #a6b7aa; }
.input-wrap input:hover { border-color: #a3c8ad; }
.input-wrap input:focus { border-color: #61a778; box-shadow: 0 0 0 4px rgba(103, 172, 121, .16); transform: translateY(-1px); }
.input-wrap:has(.show-password) input { padding-right: 84px; }
.show-password { position: absolute; right: 8px; top: 8px; height: 37px; padding: 0 11px; border: 0; border-radius: 7px; background: transparent; color: #4e8060; font-size: 11px; font-weight: 700; cursor: pointer; }
.show-password:hover, .show-password:focus-visible { background: #edf5ed; }
.show-password:focus-visible, .submit-button:focus-visible { outline: 3px solid #8bcba0; outline-offset: 3px; }
.form-error { margin: 16px 0 0; padding: 11px 13px; border-radius: 9px; background: #fff0eb; color: #a84239; font-size: 12px; line-height: 1.45; }
.submit-button { width: 100%; min-height: 52px; margin-top: 28px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; border: 0; border-radius: 11px; background: var(--forest); color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: 0 12px 22px rgba(13, 51, 45, .19); transition: background .2s ease, transform .2s ease, box-shadow .2s ease; }
.submit-button span { font-size: 20px; font-weight: 400; }
.submit-button:hover { background: var(--forest-light); transform: translateY(-2px); box-shadow: 0 16px 27px rgba(13, 51, 45, .24); }
.submit-button:active { transform: translateY(0); }
.submit-button:disabled { opacity: .68; cursor: wait; transform: none; }

@keyframes panel-in { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes breathe { 0%, 100% { opacity: .5; transform: translate(-50%, -50%) scale(1); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.045); } }
@keyframes drift { to { transform: translate(-140px, 100px); } }

@media (max-width: 520px) {
  .login-shell { padding: 18px; }
  .login-panel { padding: 38px 28px 40px; border-radius: 20px; }
  .brand { margin-bottom: 36px; }
  .ambient-ring { width: 120vw; }
  .ambient-ring-two { width: 94vw; }
  .ambient-ring-three { width: 68vw; }
}
@media (prefers-reduced-motion: reduce) {
  .ambient-ring, .ambient-glow, .login-panel { animation: none; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
