:root {
    --bg: #120f0d;
    --bg-deep: #0b0908;
    --surface: #1c1815;
    --surface-hover: #241e1a;
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.18);
    --text: #fffaf7;
    --muted: rgba(255, 250, 247, 0.64);
    --orange: #e86c24;
    --orange-bright: #ff8a43;
    --radius-sm: 16px;
    --radius-md: 24px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg-deep); }
body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--text);
    background:
        radial-gradient(circle at 50% -16rem, rgba(232, 108, 36, 0.13), transparent 31rem),
        var(--bg);
    font-family: "Inter", sans-serif;
    -webkit-font-smoothing: antialiased;
}

button { font: inherit; }
.signin-page {
    width: min(100% - 32px, 680px);
    min-height: 100vh;
    margin-inline: auto;
    padding: clamp(32px, 7vh, 72px) 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.brand {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 11px;
    margin-bottom: 38px;
    color: var(--text);
    font-family: "Manrope", sans-serif;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.025em;
}
.brand-mark {
    width: 38px;
    height: 38px;
    display: block;
    flex: 0 0 38px;
    object-fit: contain;
}
.signin-header { margin-bottom: 28px; }
.signin-header h1 {
    margin: 0;
    font-family: "Manrope", sans-serif;
    font-size: clamp(2rem, 7vw, 2.75rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.052em;
}
.signin-header p {
    max-width: 510px;
    margin: 13px 0 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.65;
}
.signin-panel {
    padding: clamp(20px, 5vw, 28px);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.28);
}
.destination-heading {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}
.destination-list { display: grid; gap: 12px; }
.destination-button {
    width: 100%;
    min-height: 92px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 19px 20px;
    color: var(--text);
    text-align: left;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.025);
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}
.destination-button:hover {
    border-color: rgba(232, 108, 36, 0.48);
    background: var(--surface-hover);
    transform: translateY(-1px);
}
.destination-button:focus-visible,
.signin-action:focus-visible {
    outline: 3px solid var(--orange-bright);
    outline-offset: 3px;
}
.destination-button:disabled { cursor: wait; opacity: 0.58; transform: none; }
.destination-label {
    display: block;
    font-family: "Manrope", sans-serif;
    font-size: 1.03rem;
    font-weight: 800;
    letter-spacing: -0.025em;
}
.destination-copy {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.875rem;
    line-height: 1.5;
}
.destination-arrow {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: var(--orange-bright);
    background: rgba(232, 108, 36, 0.11);
}
.destination-arrow svg { width: 18px; height: 18px; }
.account-status,
.message-box,
.loading-state {
    margin-bottom: 16px;
    padding: 13px 15px;
    border-radius: 13px;
    font-size: 0.875rem;
    line-height: 1.5;
}
.account-status,
.loading-state {
    color: var(--muted);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.025);
}
.loading-state { display: flex; align-items: center; gap: 11px; }
.loading-dot {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--orange-bright);
    box-shadow: 0 0 0 5px rgba(232, 108, 36, 0.12);
}
.message-box.info { color: #fed7aa; border: 1px solid rgba(232, 108, 36, 0.36); background: rgba(232, 108, 36, 0.09); }
.message-box.error { color: #fecaca; border: 1px solid rgba(239, 68, 68, 0.4); background: rgba(239, 68, 68, 0.09); }
.recovery-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.signin-action {
    min-height: 48px;
    padding: 12px 16px;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.045);
    font-weight: 700;
    cursor: pointer;
}
.signin-action:first-child { border-color: var(--orange); background: var(--orange); }
.signin-action:hover { background: rgba(255, 255, 255, 0.08); }
.signin-action:first-child:hover { background: #d55b13; }
.hidden { display: none !important; }
.legal-notice {
    margin: 20px auto 0;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.6;
    text-align: center;
}
.legal-notice a { color: #ffb27f; text-underline-offset: 3px; }
.legal-notice a:focus-visible { outline: 3px solid var(--orange-bright); outline-offset: 3px; border-radius: 3px; }

@media (max-width: 520px) {
    .signin-page { width: min(100% - 24px, 680px); padding: 24px 0; }
    .brand { margin-bottom: 30px; }
    .signin-panel { border-radius: 20px; }
    .destination-button { min-height: 104px; padding: 17px; }
    .destination-arrow { width: 32px; height: 32px; }
    .recovery-actions { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .destination-button { transition: none; }
}
