:root {
    --orange: #ff6600;
    --orange-hover: #e65c00;
    --orange-soft: #fff1e6;
    --ink: #111827;
    --muted: #5b6472;
    --line: #e5e7eb;
    --paper: #ffffff;
    --bg: #f3f4f6;
    --error: #b42318;
    --error-bg: #fef3f2;
    --ok: #027a48;
    --shadow: 0 24px 60px rgba(17, 24, 39, 0.12);
    --radius: 20px;
    --font: "Source Sans 3", "Segoe UI", sans-serif;
    --display: Outfit, "Segoe UI", sans-serif;
}

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

html, body {
    min-height: 100%;
}

body {
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

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

a:hover {
    text-decoration: underline;
}

.login-body {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    grid-template-rows: 1fr auto;
}

.login-brand {
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 102, 0, 0.28), transparent 28%),
        linear-gradient(160deg, #0b1220 0%, #1a2333 58%, #111827 100%);
    color: #fff;
    padding: 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
    width: 100%;
}

.brand-mark,
.app-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    color: inherit;
}

.brand-mark img,
.app-brand img {
    width: 48px;
    height: 48px;
}

.brand-name,
.app-brand strong {
    display: block;
    font-family: var(--display);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.app-brand strong {
    color: var(--orange);
}

.brand-name span,
.app-brand small {
    display: block;
    font-family: var(--font);
    font-size: 0.92rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.72);
}

.app-brand small {
    color: var(--muted);
}

.login-brand h1 {
    font-family: var(--display);
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin: 0 0 20px;
}

.brand-photo {
    width: 100%;
    border-radius: 16px;
    object-fit: cover;
}

.brand-foot {
    opacity: 0.7;
}

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 28px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px 36px;
}

.login-card h2 {
    font-family: var(--display);
    font-size: 1.8rem;
    letter-spacing: -0.03em;
    margin-bottom: 6px;
}

.login-card .lead {
    color: var(--muted);
    margin-bottom: 28px;
}

.form {
    display: grid;
    gap: 16px;
}

label {
    display: grid;
    gap: 6px;
    font-weight: 600;
    font-size: 0.92rem;
}

input[type="email"],
input[type="password"] {
    width: 100%;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    padding: 13px 14px;
    font: inherit;
    color: var(--ink);
    background: #fff;
}

input:focus {
    outline: 2px solid rgba(255, 102, 0, 0.25);
    border-color: var(--orange);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 12px;
    padding: 13px 18px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

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

.btn-primary {
    background: var(--orange);
    color: #fff;
}

.btn-primary:hover {
    background: var(--orange-hover);
}

.btn-ghost {
    background: #fff;
    color: var(--ink);
    border: 1.5px solid var(--line);
}

.btn-full {
    width: 100%;
}

.alert {
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 18px;
    font-size: 0.95rem;
}

.alert-error {
    background: var(--error-bg);
    color: var(--error);
}

.site-footer {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 16px 24px;
    background: #0b1220;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.88rem;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.72);
}

.site-footer a:hover {
    color: #fff;
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body:has(.legal-page) {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-shell .site-footer,
.legal-page ~ .site-footer,
body:has(.legal-page) .site-footer {
    margin-top: auto;
    background: #fff;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.app-shell .site-footer a,
body:has(.legal-page) .site-footer a {
    color: var(--muted);
}

.app-shell .site-footer a:hover,
body:has(.legal-page) .site-footer a:hover {
    color: var(--ink);
}

.app-bar {
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 28px;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-meta {
    text-align: right;
}

.user-meta strong {
    display: block;
    font-size: 0.98rem;
}

.badge {
    display: inline-flex;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--orange-soft);
    color: var(--orange-hover);
}

.content {
    max-width: 1080px;
    margin: 0 auto;
    padding: 36px 28px 64px;
}

.content h1 {
    font-family: var(--display);
    font-size: 2rem;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.content .lead {
    color: var(--muted);
    margin-bottom: 28px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 22px;
}

.card h2 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.card p {
    color: var(--muted);
    font-size: 0.95rem;
}

.soon {
    display: inline-block;
    margin-top: 14px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.legal-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

.legal-page h1 {
    font-family: var(--display);
    margin: 12px 0 8px;
}

.legal-page .lead {
    color: var(--muted);
    margin-bottom: 28px;
}

.legal-page h2 {
    font-family: var(--display);
    font-size: 1.25rem;
    margin: 28px 0 10px;
}

.legal-page h3 {
    font-size: 1rem;
    margin: 18px 0 8px;
}

.legal-page p,
.legal-page li,
.legal-page address {
    margin-bottom: 12px;
    color: #374151;
    font-style: normal;
}

.legal-page ul {
    margin: 0 0 16px 1.2em;
}

.legal-block {
    margin-bottom: 12px;
}

.legal-page a[href^="http"],
.legal-page a[href^="mailto"],
.legal-page a[href^="tel"] {
    word-break: break-word;
}

@media (max-width: 900px) {
    .login-body {
        grid-template-columns: 1fr;
    }

    .login-brand {
        padding: 24px 24px 20px;
        min-height: auto;
        justify-content: flex-start;
        gap: 16px;
    }

    .login-brand h1 {
        margin-top: 8px;
        max-width: none;
        font-size: 2rem;
    }

    .brand-foot {
        display: none;
    }

    .login-panel {
        padding: 16px 16px 40px;
        align-items: flex-start;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .app-bar {
        padding: 14px 16px;
    }

    .content {
        padding: 24px 16px 48px;
    }
}

@media (max-width: 640px) {
    .login-card {
        padding: 28px 20px;
        box-shadow: none;
    }

    .user-chip {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}
