@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root { --green: #006048; --green-dark: #004c3a; --ink: #102a25; --muted: #70817d; }
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--ink); font-family: Manrope, sans-serif; background: #f4f8f5; overflow-x: hidden; }
body::before { position: fixed; inset: 0; z-index: -2; content: ''; background: radial-gradient(circle at 10% 10%, rgba(0, 96, 72, .14), transparent 34%), radial-gradient(circle at 90% 88%, rgba(91, 163, 135, .18), transparent 38%), #f4f8f5; }
body::after { position: fixed; inset: 0; z-index: -1; content: ''; opacity: .38; background-image: linear-gradient(rgba(0, 96, 72, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 96, 72, .045) 1px, transparent 1px); background-size: 42px 42px; }
.page-shell { min-height: 100vh; padding: 9vh 24px; }

.legacy-layout { position: relative; width: min(410px, 100%); margin: 0 auto; padding: 28px 0; text-align: center; }
.legacy-logo { margin-bottom: 25px; }
.legacy-logo img { width: min(270px, 88%); height: auto; }
.legacy-authorize { display: flex; justify-content: center; }
.legacy-authorize table { margin: auto; border-spacing: 0 11px; }
.legacy-authorize td { padding: 0; }
.legacy-register { width: 220px; margin: 17px auto 0; }
.legacy-layout .btn { width: 100%; }
.legacy-layout input:not([type='submit']) { width: 260px; }

.launch-button { position: relative; display: block; width: 100%; min-height: 57px; margin-top: 30px; overflow: hidden; border: 0; border-radius: 15px; color: #fff; background: var(--green); box-shadow: 0 13px 28px rgba(0, 96, 72, .22); cursor: pointer; font: 800 15px Manrope, sans-serif; }
.launch-button:hover { background: var(--green-dark); transform: translateY(-2px); }
.launch-button:disabled { cursor: default; }
.launch-button__shine { position: absolute; top: -60%; left: -45%; width: 30%; height: 220%; transform: rotate(22deg); background: rgba(255,255,255,.6); animation: shine 2.8s infinite; }
.launch-button span:last-child { position: relative; z-index: 1; }

.modern-layout { width: min(1180px, 100%); margin: 0 auto; text-align: center; opacity: 0; pointer-events: none; transform: translateY(28px) scale(.98); }
.modern-layout--visible { opacity: 1; pointer-events: auto; transform: none; transition: opacity .75s ease, transform .75s cubic-bezier(.2,.8,.2,1); }
.modern-layout__topline { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; color: var(--green); background: rgba(0,96,72,.1); font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.modern-layout__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(0,96,72,.12); }
.modern-layout__content { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 46px; align-items: start; margin-top: 30px; text-align: left; }
.modern-layout__copy { min-width: 0; text-align: center; }
.headline-stage { position: relative; width: 100%; height: 116px; margin: 0 auto 30px; overflow: hidden; }
.headline { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; padding: 0 18px; color: var(--green); font-size: clamp(1.75rem, 3.7vw, 3.35rem); font-weight: 800; letter-spacing: -.055em; line-height: 1.08; text-align: center; opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.headline--active { opacity: 1; transform: translateY(0); }
.modern-layout h1 { margin: 0; text-align: center; font-size: clamp(1.7rem, 3vw, 2.8rem); letter-spacing: -.055em; }
.modern-layout__description { margin: 10px 0 32px; color: var(--muted); text-align: center; }
.modern-login { display: flex; padding: 28px; flex-direction: column; border: 1px solid rgba(255,255,255,.9); border-radius: 24px; background: rgba(255,255,255,.88); box-shadow: 0 18px 48px rgba(0,70,53,.1); }
.modern-login__eyebrow { color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.modern-login h2 { margin: 8px 0 24px; color: var(--ink); font-size: 26px; letter-spacing: -.05em; }
.modern-login label { display: flex; margin-bottom: 14px; flex-direction: column; gap: 7px; color: var(--ink); font-size: 12px; font-weight: 700; }
.modern-login input { width: 100%; height: 48px; padding: 0 14px; border: 1px solid #dce7e2; border-radius: 12px; outline: none; color: var(--ink); background: #fbfdfc; font: 600 13px Manrope, sans-serif; }
.modern-login input:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(0,96,72,.1); }
.modern-login button { min-height: 51px; margin-top: 6px; border: 0; border-radius: 12px; color: #fff; background: var(--green); cursor: pointer; font: 800 13px Manrope, sans-serif; transition: background .2s, transform .2s; }
.modern-login button:hover { background: var(--green-dark); transform: translateY(-2px); }
.modern-login button span { margin-left: 8px; font-size: 17px; }
.control-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.control-card { display: flex; min-height: 190px; padding: 23px; flex-direction: column; align-items: flex-start; border: 1px solid #dce9e3; border-radius: 20px; color: var(--ink); background: rgba(255,255,255,.84); cursor: pointer; text-align: left; box-shadow: 0 10px 28px rgba(0,70,53,.06); transition: transform .25s, box-shadow .25s; }
.control-card:hover { transform: translateY(-6px); box-shadow: 0 18px 38px rgba(0,70,53,.12); }
.control-card--accent { color: #fff; border-color: var(--green); background: var(--green); }
.control-card__icon { display: grid; width: 43px; height: 43px; margin-bottom: 28px; place-items: center; border-radius: 12px; color: var(--green); background: #e4f1eb; font-size: 21px; }
.control-card--accent .control-card__icon { background: #fff; }
.control-card strong { font-size: 15px; }
.control-card small { margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.control-card--accent small { color: rgba(255,255,255,.72); }

.legacy-layout--shaking .legacy-piece { animation: shake .16s ease-in-out 4; }
.legacy-piece--falling { animation: fall 1s cubic-bezier(.7,-.1,.8,.25) forwards !important; }
.legacy-layout--gone { visibility: hidden; height: 0; padding: 0; margin-bottom: 0; overflow: hidden; transition: height .3s, padding .3s; }
@keyframes shine { 0% { left: -45%; } 52%, 100% { left: 135%; } }
@keyframes shake { 0%,100% { transform: translateX(0) rotate(0); } 25% { transform: translateX(-4px) rotate(-1deg); } 75% { transform: translateX(4px) rotate(1deg); } }
@keyframes fall { 0% { opacity: 1; transform: translate(0,0) rotate(0) scale(1); } 30% { opacity: .95; transform: translate(-8px, 12px) rotate(-3deg) scale(1.01); } 100% { opacity: 0; transform: translate(var(--fall-x, 70px), 105vh) rotate(18deg) scale(.72); } }
@media (max-width: 980px) { .modern-layout__content { grid-template-columns: 1fr; } .modern-login { width: min(420px, 100%); margin: 0 auto; grid-row: 1; } }
@media (max-width: 760px) { .page-shell { padding-top: 5vh; } .control-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 470px) { .control-grid { grid-template-columns: 1fr; } .legacy-layout input:not([type='submit']) { width: 100%; } .headline-stage { height: 105px; margin-bottom: 24px; } .headline { padding: 0 8px; font-size: 1.65rem; } .modern-layout__content { gap: 25px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
