:root {
    --bg-0: #f0faf6;
    --bg-1: #e4f4ef;
    --accent: #0d9488;
    --accent-2: #14b8a6;
    --accent-glow: rgba(13, 148, 136, 0.28);
    --card: rgba(255, 255, 255, 0.88);
    --card-border: rgba(255, 255, 255, 0.95);
    --text: #0f172a;
    --muted: #64748b;
    --input-bg: rgba(255, 255, 255, 0.92);
    --input-border: rgba(148, 163, 184, 0.35);
    --input-focus: rgba(13, 148, 136, 0.55);
    --danger: #b91c1c;
    --danger-bg: rgba(254, 226, 226, 0.85);
    --danger-border: rgba(248, 113, 113, 0.45);
    --radius: 16px;
    --shadow: 0 20px 60px rgba(15, 118, 110, 0.12), 0 4px 16px rgba(15, 23, 42, 0.06);
}

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

html,
body {
    height: 100%;
}

body {
    font-family: "Plus Jakarta Sans", sans-serif;
    color: var(--text);
    background: var(--bg-0);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.scene {
    position: relative;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(1.25rem, env(safe-area-inset-top)) max(1.25rem, env(safe-area-inset-right)) max(1.25rem, env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left));
    isolation: isolate;
}

.scene__bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(ellipse 85% 65% at 15% 8%, rgba(45, 212, 191, 0.35) 0%, transparent 55%),
        radial-gradient(ellipse 75% 55% at 90% 85%, rgba(56, 189, 248, 0.22) 0%, transparent 50%),
        radial-gradient(ellipse 60% 45% at 50% 50%, rgba(255, 255, 255, 0.9) 0%, transparent 70%),
        linear-gradient(165deg, var(--bg-0) 0%, #ecfdf5 40%, var(--bg-1) 100%);
}

.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    z-index: -1;
    animation: float 12s ease-in-out infinite alternate;
}

.orb--1 {
    width: 320px;
    height: 320px;
    top: -80px;
    right: -60px;
    background: rgba(45, 212, 191, 0.35);
}

.orb--2 {
    width: 260px;
    height: 260px;
    bottom: 8%;
    left: -60px;
    background: rgba(125, 211, 252, 0.32);
    animation-delay: -4s;
}

.grid-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.06;
    background-image:
        linear-gradient(rgba(13, 148, 136, 0.35) 1px, transparent 1px),
        linear-gradient(90deg, rgba(13, 148, 136, 0.35) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, black 20%, transparent 75%);
}

.shell {
    width: min(100%, 420px);
    animation: enter 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.brand-block {
    text-align: center;
    margin-bottom: 1.75rem;
}

.brand-block__logo {
    width: 88px;
    height: 88px;
    object-fit: contain;
    margin: 0 auto 1rem;
    filter: drop-shadow(0 8px 20px rgba(13, 148, 136, 0.2));
}

.brand-block__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(13, 148, 136, 0.1);
    border: 1px solid rgba(13, 148, 136, 0.2);
    margin-bottom: 0.85rem;
}

.brand-block__badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

.brand-block h1 {
    font-family: "Sora", sans-serif;
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.brand-block p {
    margin-top: 0.45rem;
    font-size: 0.92rem;
    color: var(--muted);
    line-height: 1.5;
}

.card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: calc(var(--radius) + 4px);
    padding: 1.75rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    color: var(--danger);
    font-size: 0.875rem;
    line-height: 1.45;
}

.alert svg {
    flex-shrink: 0;
    margin-top: 1px;
}

.field {
    margin-bottom: 1.1rem;
}

.field label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    letter-spacing: 0.01em;
}

.input-wrap {
    position: relative;
}

.input-wrap svg.icon {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--muted);
    pointer-events: none;
    transition: color 0.2s ease;
}

.input-wrap input {
    width: 100%;
    padding: 0.85rem 0.95rem 0.85rem 2.75rem;
    border: 1px solid var(--input-border);
    border-radius: 12px;
    background: var(--input-bg);
    color: var(--text);
    font: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.input-wrap input::placeholder {
    color: #94a3b8;
}

.input-wrap input:focus {
    outline: none;
    border-color: var(--input-focus);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.input-wrap:focus-within svg.icon {
    color: var(--accent);
}

.input-wrap--password input {
    padding-right: 2.75rem;
}

.toggle-password {
    position: absolute;
    right: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.toggle-password:hover {
    color: var(--text);
    background: rgba(13, 148, 136, 0.08);
}

.form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0.25rem 0 1.35rem;
}

.remember {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.85rem;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
}

.remember input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--accent);
    cursor: pointer;
}

.submit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.95rem 1rem;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    color: #fff;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 4px 24px var(--accent-glow);
    transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.submit:hover {
    box-shadow: 0 6px 32px var(--accent-glow);
    transform: translateY(-1px);
}

.submit:active {
    transform: translateY(0);
}

.submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.submit svg {
    width: 18px;
    height: 18px;
}

.card-foot {
    margin-top: 1.35rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    text-align: center;
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.5;
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
    margin-top: 1.25rem;
}

.feature {
    text-align: center;
    padding: 0.75rem 0.5rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(15, 118, 110, 0.06);
}

.feature__icon {
    font-size: 1.1rem;
    margin-bottom: 0.35rem;
}

.feature__label {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--muted);
    line-height: 1.3;
}

@keyframes enter {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes float {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(20px, -16px) scale(1.06);
    }
}

@media (max-width: 480px) {
    .card {
        padding: 1.35rem;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .feature {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        text-align: left;
        padding: 0.65rem 0.85rem;
    }

    .feature__icon {
        margin-bottom: 0;
    }
}

@media (prefers-reduced-motion: reduce) {

    .shell,
    .orb {
        animation: none;
    }
}

.portal-link {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--muted, #5c6b78);
}

.portal-link a {
    color: var(--accent, #1f6f5b);
    font-weight: 600;
    text-decoration: none;
}

.portal-link a:hover {
    text-decoration: underline;
}