:root {
    --bg: #f2f2f0;
    --green: #43a359;
    --lime: #9be554;
    --dark: #06251c;
    --text: #10201b;
    --muted: #66736c;
    --border: #dfe7df;
    --white: #ffffff;
    --gradient: linear-gradient(-70.2189deg, #9be554 0%, #43a359 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Inter, Arial, sans-serif;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 15%, rgba(155,229,84,.18), transparent 25%),
        radial-gradient(circle at 85% 18%, rgba(67,163,89,.15), transparent 24%),
        linear-gradient(180deg, #f2f2f0 0%, #edf3ed 100%);
    overflow-x: hidden;
}

a {
    text-decoration: none;
}

.signup-page {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 54px 20px 32px;
}

.signup-center {
    width: min(580px, 100%);
    text-align: center;
    position: relative;
    z-index: 2;
}

.signup-logo-link {
    display: inline-block;
}

.signup-logo {
    width: 150px;
    margin-bottom: 28px;
}

.signup-heading {
    margin-bottom: 24px;
}

.signup-heading h1 {
    font-size: clamp(38px, 5vw, 52px);
    line-height: 1;
    letter-spacing: -2px;
    margin-bottom: 10px;
}

.signup-heading p {
    color: var(--muted);
    line-height: 1.6;
    font-size: 15px;
}

.signup-card {
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(18px);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 30px;
    text-align: left;
    box-shadow: 0 30px 90px rgba(6,37,28,.12);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.form-alert {
    padding: 11px 13px;
    margin-bottom: 18px;
    border: 1px solid #f0c9c9;
    border-radius: 13px;
    background: #fff1f1;
    color: #9f2f2f;
    font-size: 13px;
    line-height: 1.45;
}

.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.step-dot {
    width: 11px;
    height: 11px;
    background: #dce8de;
    border-radius: 50%;
}

.step-dot.active {
    background: var(--green);
    box-shadow: 0 0 0 6px rgba(67,163,89,.12);
}

.step-line {
    width: 70px;
    height: 2px;
    background: #dce8de;
    margin: 0 8px;
}

.signup-step {
    display: none;
}

.signup-step.active {
    display: block;
    animation: fadeUp .35s ease;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    display: grid;
    gap: 8px;
    margin-bottom: 15px;
}

.form-group label {
    font-size: 13px;
    font-weight: 900;
}

.form-group input,
.form-group select {
    width: 100%;
    height: 54px;
    border-radius: 14px;
    border: 1px solid var(--border);
    padding: 0 16px;
    background: white;
    font-size: 14px;
    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(67,163,89,.12);
}

.form-group input.is-invalid,
.form-group select.is-invalid,
.subdomain-wrap.is-invalid {
    border-color: #d95050;
    box-shadow: 0 0 0 4px rgba(217,80,80,.08);
}

.field-error {
    color: #b53333;
    font-size: 12px;
    line-height: 1.4;
}

.field-help {
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.4;
}

.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 72px;
}

.password-toggle {
    position: absolute;
    right: 9px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: #eef7ee;
    color: var(--green);
    font-size: 12px;
    font-weight: 900;
    padding: 8px 11px;
    border-radius: 999px;
    cursor: pointer;
}

.subdomain-wrap {
    min-height: 54px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    display: flex;
    align-items: center;
    overflow: hidden;
    transition: .2s ease;
}

.subdomain-wrap:focus-within {
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(67,163,89,.12);
}

.subdomain-wrap input,
.subdomain-wrap input:focus {
    min-width: 0;
    height: 52px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding-right: 8px;
}

.subdomain-wrap span {
    align-self: stretch;
    display: flex;
    align-items: center;
    padding: 0 14px;
    background: #f4f8f4;
    border-left: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.primary-btn,
.secondary-btn,
.google-btn {
    height: 54px;
    border-radius: 14px;
    font-weight: 900;
    font-size: 14px;
    cursor: pointer;
    transition: .22s ease;
}

.primary-btn {
    width: 100%;
    border: 0;
    background: var(--gradient);
    color: var(--dark);
    box-shadow: 0 14px 34px rgba(67,163,89,.22);
}

.primary-btn:disabled {
    cursor: wait;
    opacity: .7;
    transform: none;
}

.secondary-btn {
    width: 100%;
    border: 1px solid var(--border);
    background: white;
    color: var(--text);
}

.primary-btn:hover,
.secondary-btn:hover,
.google-btn:hover {
    transform: translateY(-2px);
}

.or-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    color: var(--muted);
    font-size: 12px;
}

.or-divider::before,
.or-divider::after {
    content: "";
    height: 1px;
    background: var(--border);
    flex: 1;
}

.google-btn {
    width: 100%;
    background: white;
    border: 1px solid var(--border);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.google-btn span {
    width: 24px;
    height: 24px;
    background: #f5f7f5;
    color: #4285f4;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 900;
}

.bottom-text {
    text-align: center;
    margin-top: 18px;
    color: var(--muted);
    font-size: 13px;
}

.bottom-text a {
    color: var(--green);
    font-weight: 900;
}

.upload-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 4px 0 18px;
}

.upload-field {
    min-width: 0;
}

.upload-box {
    min-height: 130px;
    position: relative;
    border-radius: 20px;
    border: 1px dashed #b8d7bf;
    background: #f8faf8;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 7px;
    text-align: center;
    padding: 16px;
    cursor: pointer;
    overflow: hidden;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.upload-box:hover {
    border-color: var(--green);
    background: #f2f9f3;
    transform: translateY(-2px);
}

.upload-box:focus-within {
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(67,163,89,.12);
}

.upload-box.is-invalid {
    border-color: #d95050;
    background: #fff7f7;
}

.upload-box input {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-title {
    color: var(--dark);
    font-size: 21px;
    font-weight: 900;
}

.upload-box small {
    color: var(--muted);
    font-size: 14px;
}

.upload-image:not([hidden]) {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(6,37,28,.1);
}

.upload-box.has-file .upload-title {
    font-size: 15px;
}

.upload-box.has-file .upload-file-text {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-error {
    margin-top: 7px;
}

.button-row {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 12px;
}

.terms-note {
    margin-top: 16px;
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.55;
    text-align: center;
}

/* LOADING */
.setup-step {
    text-align: center;
}

.loader-ring {
    width: 76px;
    height: 76px;
    margin: 10px auto 22px;
    border-radius: 50%;
    border: 6px solid #e5efe7;
    border-top-color: var(--green);
    animation: spin 1.2s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.setup-step h2 {
    font-size: 25px;
    letter-spacing: -1px;
    margin-bottom: 8px;
}

.setup-step p {
    color: var(--muted);
    line-height: 1.5;
    font-size: 14px;
}

.progress-track {
    margin: 24px 0 22px;
    height: 9px;
    background: #e5efe7;
    border-radius: 999px;
    overflow: hidden;
}

.progress-track span {
    display: block;
    height: 100%;
    width: 0%;
    background: var(--gradient);
    border-radius: inherit;
    transition: width .8s ease;
}

.setup-step.active .progress-track span {
    animation: setupProgress 1.2s ease forwards;
}

@keyframes setupProgress {
    to {
        width: 92%;
    }
}

.setup-list {
    list-style: none;
    display: grid;
    gap: 12px;
}

.setup-list li {
    color: var(--muted);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.setup-list li::before {
    content: "";
    width: 9px;
    height: 9px;
    background: #dce8de;
    border-radius: 50%;
}

.setup-list li.active {
    color: var(--green);
    font-weight: 900;
}

.setup-list li.active::before {
    background: var(--green);
}

/* FLOATING BACKGROUND ICONS */
.floating-icon {
    position: absolute;
    width: 78px;
    height: 78px;
    border-radius: 24px;
    background: rgba(255,255,255,.72);
    border: 1px solid var(--border);
    box-shadow: 0 18px 50px rgba(6,37,28,.08);
    display: grid;
    place-items: center;
    color: var(--green);
    font-size: 30px;
    font-weight: 900;
    animation: floatIcon 6s ease-in-out infinite;
}

.icon-1 {
    left: 12%;
    top: 18%;
}

.icon-2 {
    right: 14%;
    top: 22%;
    animation-delay: .8s;
}

.icon-3 {
    left: 18%;
    bottom: 18%;
    animation-delay: 1.4s;
}

.icon-4 {
    right: 19%;
    bottom: 16%;
    animation-delay: 2s;
}

@keyframes floatIcon {
    0%,100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-14px) rotate(3deg);
    }
}

.signup-footer {
    margin-top: 24px;
    color: var(--muted);
    font-size: 12px;
}

/* MOBILE */
@media (max-width: 700px) {
    .floating-icon {
        display: none;
    }

    .signup-page {
        padding: 38px 16px 24px;
        align-items: flex-start;
    }

    .signup-logo {
        width: 130px;
    }

    .signup-heading h1 {
        font-size: 38px;
    }

    .signup-card {
        padding: 22px;
        border-radius: 24px;
    }

    .upload-grid {
        grid-template-columns: 1fr;
    }

    .button-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .subdomain-wrap span {
        max-width: 135px;
        padding: 0 10px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
