@font-face {
    font-family: 'GoogleSans';
    src: url('/fonts/GoogleSans.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #0a0a0a;
    --surface: #171717;
    --surface-2: #1f1f1f;
    --surface-3: #262626;
    --border: #2e2e2e;
    --border-strong: #3a3a3a;
    --text: #e5e7eb;
    --text-muted: #a1a1a1;
    --text-dim: #737373;
    --primary: #4250af;
    --primary-light: #accbfa;
    --primary-bright: #6b7cff;
    --success: #22c55e;
    --danger: #f87171;
    --warning: #fbbf24;
    --radius: 16px;
    --radius-lg: 24px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
    --font: 'GoogleSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: dark;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

[hidden] {
    display: none !important;
}

a {
    color: var(--primary-light);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background:
        radial-gradient(900px 500px at 15% 0%, rgba(66, 80, 175, 0.18), transparent 60%),
        radial-gradient(700px 500px at 85% 10%, rgba(107, 124, 255, 0.10), transparent 60%),
        radial-gradient(600px 400px at 50% 100%, rgba(66, 80, 175, 0.08), transparent 60%),
        var(--bg);
}

.blob {
    position: absolute;
    border-radius: 999px;
    filter: blur(80px);
    opacity: 0.35;
}

.blob-1 {
    width: 320px;
    height: 320px;
    background: #4250af;
    top: -120px;
    left: -80px;
}

.blob-2 {
    width: 260px;
    height: 260px;
    background: #6b7cff;
    top: 10%;
    right: -100px;
    opacity: 0.2;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: #accbfa;
    bottom: -160px;
    left: 40%;
    opacity: 0.08;
}

.site-header {
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
    padding: 24px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.brand:hover {
    text-decoration: none;
}

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(66, 80, 175, 0.35);
}

.brand-name {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.brand-name span {
    color: var(--primary-light);
}

.header-nav {
    display: flex;
    gap: 8px;
}

.header-link {
    font-size: 13px;
    color: var(--text-muted);
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid transparent;
}

.header-link:hover {
    color: var(--text);
    background: var(--surface-2);
    border-color: var(--border);
    text-decoration: none;
}

.main {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px 32px;
}

.card {
    width: min(100%, 480px);
    background: linear-gradient(180deg, rgba(31, 31, 31, 0.92), rgba(23, 23, 23, 0.96));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    animation: card-in 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(172, 203, 250, 0.45), transparent);
}

@keyframes card-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.card-head {
    text-align: center;
}

.logo-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 18px;
}

.logo-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(66, 80, 175, 0.4);
}

.eyebrow {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--primary-light);
}

h1 {
    margin: 0 0 8px;
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: -0.03em;
    font-weight: 600;
}

h2 {
    margin: 0 0 8px;
    font-size: 26px;
    letter-spacing: -0.02em;
    font-weight: 600;
}

.subtitle {
    margin: 0 auto;
    max-width: 360px;
    color: var(--text-muted);
    font-size: 14px;
}

.service-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 22px 0 24px;
}

.service-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    font-size: 12.5px;
    color: var(--text-muted);
}

.service-chip b {
    color: var(--text);
    font-weight: 600;
}

.service-chip img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.field {
    margin-bottom: 16px;
}

.field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 7px;
}

.field input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid var(--border-strong);
    background: #121212;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.field input::placeholder {
    color: var(--text-dim);
}

.field input:hover {
    border-color: #4a4a4a;
}

.field input:focus {
    border-color: var(--primary-bright);
    box-shadow: 0 0 0 3px rgba(66, 80, 175, 0.28);
    background: #141414;
}

.field input[aria-invalid='true'] {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15);
}

.hint {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--text-dim);
}

.field-error {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--danger);
}

.field-error:empty {
    display: none;
}

.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 48px;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}

.toggle-password:hover {
    background: var(--surface-3);
    color: var(--text);
}

.toggle-password svg {
    width: 18px;
    height: 18px;
}

.toggle-password .eye-off {
    display: none;
}

.toggle-password[aria-pressed='true'] .eye-open {
    display: none;
}

.toggle-password[aria-pressed='true'] .eye-off {
    display: block;
}

.strength {
    height: 4px;
    border-radius: 999px;
    background: var(--surface-3);
    margin-top: 10px;
    overflow: hidden;
}

.strength-bar {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: var(--danger);
    transition: width 0.2s, background 0.2s;
}

.strength[data-strength='weak'] .strength-bar {
    width: 33%;
    background: var(--danger);
}

.strength[data-strength='medium'] .strength-bar {
    width: 66%;
    background: var(--warning);
}

.strength[data-strength='strong'] .strength-bar {
    width: 100%;
    background: var(--success);
}

.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.submit {
    width: 100%;
    height: 48px;
    margin-top: 8px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #4250af, #5b6bd6);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.12s, filter 0.15s, box-shadow 0.15s;
    box-shadow: 0 10px 30px rgba(66, 80, 175, 0.35);
}

.submit:hover:not(:disabled) {
    filter: brightness(1.08);
    box-shadow: 0 12px 36px rgba(66, 80, 175, 0.45);
}

.submit:active:not(:disabled) {
    transform: translateY(1px);
}

.submit:disabled {
    opacity: 0.7;
    cursor: wait;
}

.spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.form-note {
    margin: 14px 0 0;
    text-align: center;
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.45;
}

.alert {
    margin-top: 14px;
    padding: 11px 13px;
    border-radius: 10px;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #fecaca;
    font-size: 13px;
}

.site-footer {
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 24px 24px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--text-dim);
    font-size: 12px;
}

.footer-links {
    display: flex;
    gap: 14px;
}

.footer-links a {
    color: var(--text-dim);
}

.footer-links a:hover {
    color: var(--text-muted);
}

.success-card {
    text-align: center;
}

.success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 30% 20%, rgba(34, 197, 94, 0.35), rgba(34, 197, 94, 0.08));
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #86efac;
}

.success-icon svg {
    width: 30px;
    height: 30px;
}

.credentials {
    margin: 22px 0;
    padding: 4px 16px;
    border-radius: 14px;
    background: #121212;
    border: 1px solid var(--border);
    text-align: left;
}

.credentials > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
}

.credentials > div:last-child {
    border-bottom: 0;
}

.credentials dt {
    color: var(--text-dim);
    font-size: 12.5px;
}

.credentials dd {
    margin: 0;
    font-size: 13.5px;
    font-weight: 500;
    overflow-wrap: anywhere;
    text-align: right;
}

.success-services {
    display: grid;
    gap: 10px;
    margin: 20px 0 4px;
}

.service-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border-radius: 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    text-align: left;
    transition: border-color 0.15s, background 0.15s, transform 0.12s;
}

.service-link:hover {
    text-decoration: none;
    border-color: var(--border-strong);
    background: var(--surface-3);
    transform: translateY(-1px);
}

.service-link img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    flex-shrink: 0;
}

.service-link span {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.service-link b {
    font-size: 14px;
    font-weight: 600;
}

.service-link small {
    font-size: 12px;
    color: var(--text-dim);
}

.service-link .arrow {
    width: 18px;
    height: 18px;
    color: var(--text-dim);
    flex-shrink: 0;
}

.ghost-button {
    width: 100%;
    height: 44px;
    margin-top: 18px;
    border-radius: 12px;
    border: 1px solid var(--border-strong);
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.ghost-button:hover {
    color: var(--text);
    border-color: #4a4a4a;
    background: var(--surface-2);
}

@media (max-width: 560px) {
    .site-header {
        padding-top: 18px;
    }

    .header-nav {
        display: none;
    }

    .main {
        padding-top: 24px;
    }

    .card {
        padding: 24px 20px;
        border-radius: 20px;
    }

    h1 {
        font-size: 26px;
    }

    .site-footer {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding-bottom: 18px;
    }
}

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