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

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

:root {
    --green-900: #2d7a3a;
    --green-800: #3a9e4a;
    --brand:     #22c55e;
    --brand-dk:  #16a34a;
    --brand-dkr: #15803d;
    --gray-50:   #f9fafb;
    --gray-100:  #f3f4f6;
    --gray-200:  #e5e7eb;
    --gray-400:  #9ca3af;
    --gray-500:  #6b7280;
    --gray-700:  #374151;
    --gray-900:  #0f172a;
    --white:     #ffffff;
}

html, body {
    height: 100%;
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Full-page green background ─────────────────── */
body {
    background: linear-gradient(145deg, #2d8c3e 0%, #3aac50 45%, #4dc462 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

/* ── Animated background layer ─────────────────── */
.bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.bg__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    animation: orbDrift ease-in-out infinite alternate;
}
.bg__orb--a {
    width: 700px; height: 700px;
    background: radial-gradient(circle, rgba(255,255,255,.12) 0%, transparent 65%);
    top: -200px; left: -150px;
    animation-duration: 14s;
}
.bg__orb--b {
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,.08) 0%, transparent 60%);
    bottom: -180px; right: -100px;
    animation-duration: 18s;
    animation-delay: -6s;
}
.bg__orb--c {
    width: 360px; height: 360px;
    background: radial-gradient(circle, rgba(255,255,255,.07) 0%, transparent 60%);
    top: 55%; left: 55%;
    animation-duration: 22s;
    animation-delay: -3s;
}

@keyframes orbDrift {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(30px, -30px) scale(1.04); }
    100% { transform: translate(-20px, 20px) scale(.97); }
}

.bg__grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,.12) 1px, transparent 1px);
    background-size: 28px 28px;
}

/* ── Page center ────────────────────────────────── */
.center {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px 16px 20px;
}

/* ── Card ───────────────────────────────────────── */
.card {
    width: 100%;
    max-width: 430px;
    background: var(--white);
    border-radius: 22px;
    padding: 0 0 26px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(34,197,94,.12),
        0 4px 8px rgba(0,0,0,.06),
        0 20px 60px rgba(0,0,0,.28),
        0 40px 100px rgba(0,0,0,.18);
    animation: cardIn .55s cubic-bezier(.22,.68,0,1.15) both;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(28px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Green gradient accent bar at top */
.card__bar {
    height: 4px;
    background: linear-gradient(90deg, #16a34a, #4ade80, #22c55e, #86efac, #22c55e);
    background-size: 300% 100%;
    animation: barSlide 4s linear infinite;
}
@keyframes barSlide {
    0%   { background-position: 0% center; }
    100% { background-position: 300% center; }
}

/* Logo */
.card__logo {
    display: flex;
    justify-content: center;
    padding: 22px 40px 0;
}
.card__logo img {
    max-height: 48px;
    max-width: 170px;
    object-fit: contain;
}

/* Heading */
.card__head {
    text-align: center;
    padding: 16px 40px 20px;
    border-bottom: 1px solid var(--gray-100);
}
.card__head h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -.4px;
    margin-bottom: 6px;
}
.card__head p {
    font-size: 13.5px;
    color: var(--gray-500);
    line-height: 1.6;
}

/* Form padding */
form {
    padding: 20px 36px 0;
}

/* ── Field ──────────────────────────────────────── */
.field {
    margin-bottom: 14px;
}
.field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 7px;
}
.field__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 7px;
}
.field__top label { margin-bottom: 0; }

.link-forgot {
    font-size: 12px;
    font-weight: 500;
    color: var(--brand-dk);
    text-decoration: none;
    transition: color .15s;
}
.link-forgot:hover { color: var(--brand-dkr); }

/* Input wrapper */
.field__body {
    position: relative;
    display: flex;
    align-items: center;
}
.field__ico {
    position: absolute;
    left: 13px;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    pointer-events: none;
    transition: color .18s;
}
.field__body:focus-within .field__ico { color: var(--brand-dk); }

.field__body input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    border: 1.5px solid var(--gray-200);
    border-radius: 11px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: var(--gray-900);
    background: var(--gray-50);
    outline: none;
    transition: border-color .18s, box-shadow .18s, background .18s;
}
.field__body input:focus {
    border-color: var(--brand);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(34,197,94,.11);
}
.field__body input::placeholder {
    color: #c4cad3;
    font-size: 13.5px;
}

/* Eye toggle */
.field__eye {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 4px;
    line-height: 0;
    transition: color .15s;
}
.field__eye:hover { color: var(--gray-600); }

/* ── Error alert ────────────────────────────────── */
.alert {
    margin: 0 36px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 10px 14px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
}
/* alert inside form has different margin */
form .alert { margin: 0 0 14px; }

/* ── Submit button ──────────────────────────────── */
.btn-submit {
    width: 100%;
    padding: 13.5px 20px;
    background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
    border: none;
    border-radius: 11px;
    color: #fff;
    font-size: 14.5px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
    position: relative;
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
    box-shadow: 0 4px 18px rgba(22,163,74,.35), 0 1px 3px rgba(22,163,74,.2);
}
.btn-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,.13) 0%, transparent 55%);
    pointer-events: none;
}
.btn-submit:hover:not(:disabled) {
    transform: translateY(-1.5px);
    box-shadow: 0 8px 26px rgba(22,163,74,.45), 0 2px 6px rgba(22,163,74,.2);
}
.btn-submit:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(22,163,74,.3);
}
.btn-submit:disabled { opacity: .7; cursor: not-allowed; }

.btn-submit__arrow { line-height: 0; transition: transform .2s; }
.btn-submit:hover .btn-submit__arrow { transform: translateX(3px); }

@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin .75s linear infinite; display: block; }

/* ── Divider & Google ───────────────────────────── */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 36px 16px;
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}
.divider span {
    font-size: 12px;
    color: var(--gray-400);
    font-weight: 500;
    white-space: nowrap;
}

.google-wrap {
    display: flex;
    justify-content: center;
    padding: 0 36px;
}

/* ── Card footer ────────────────────────────────── */
.card__copy {
    text-align: center;
    font-size: 11.5px;
    color: var(--gray-400);
    margin-top: 16px;
    padding: 14px 36px 0;
    border-top: 1px solid var(--gray-100);
}
.card__copy a {
    color: var(--brand-dk);
    text-decoration: none;
    font-weight: 500;
}
.card__copy a:hover { color: var(--brand-dkr); }

/* ── Trust strip (below card) ───────────────────── */
.trust-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    animation: cardIn .6s .15s cubic-bezier(.22,.68,0,1.15) both;
}
.trust-strip__img {
    max-height: 28px;
    filter: brightness(0) invert(1);
    opacity: .7;
}
.trust-strip__dot {
    width: 6px; height: 6px;
    background: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 7px #4ade80;
    animation: pulse 2.2s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .45; transform: scale(.8); }
}
.trust-strip span:last-child {
    font-size: 12.5px;
    color: rgba(255,255,255,.7);
}

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 480px) {
    .card { border-radius: 18px; }
    .card__head { padding: 20px 24px 24px; }
    form { padding: 24px 24px 0; }
    .divider { margin: 20px 24px 18px; }
    .google-wrap { padding: 0 24px; }
    .card__copy { padding: 16px 24px 0; }
    .alert { margin: 0 24px 14px; }
    form .alert { margin: 0 0 14px; }
    .card__head h1 { font-size: 21px; }
}
