:root {
    --bg: #f5f7f8;
    --surface: #ffffff;
    --text: #111827;
    --muted: #667085;
    --line: #e5e7eb;
    --primary: #111827;
    --primary-hover: #252b36;
    --accent: #22c55e;
    --danger: #b42318;
    --success: #067647;
}

* {
    box-sizing: border-box;
}

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

body {
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    background: var(--bg);
    color: var(--text);
}

a {
    color: inherit;
}

.k-auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(340px, 0.9fr) minmax(520px, 1.1fr);
}

.k-auth-brand {
    background: #0d1117;
    color: white;
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.k-auth-brand::after {
    content: "";
    width: 420px;
    height: 420px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 50%;
    position: absolute;
    right: -190px;
    bottom: -110px;
}

.k-logo {
    font-size: 28px;
    font-weight: 850;
    letter-spacing: -.8px;
}

.k-logo-dot {
    color: var(--accent);
}

.k-brand-copy {
    max-width: 510px;
    position: relative;
    z-index: 2;
}

.k-brand-copy h1 {
    font-size: clamp(38px, 5vw, 64px);
    line-height: .98;
    letter-spacing: -2.4px;
    margin: 0 0 24px;
}

.k-brand-copy p {
    color: #aeb7c4;
    font-size: 18px;
    line-height: 1.65;
    max-width: 470px;
}

.k-brand-footer {
    color: #7f8997;
    font-size: 13px;
}

.k-auth-panel {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 42px 24px;
}

.k-card {
    width: min(100%, 440px);
}

.k-card h2 {
    font-size: 32px;
    margin: 0 0 8px;
    letter-spacing: -1px;
}

.k-card-subtitle {
    color: var(--muted);
    margin: 0 0 30px;
    line-height: 1.55;
}

.k-field {
    margin-bottom: 18px;
}

.k-field label {
    display: block;
    font-size: 14px;
    font-weight: 650;
    margin-bottom: 8px;
}

.k-input {
    width: 100%;
    height: 48px;
    border: 1px solid #d0d5dd;
    background: white;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 15px;
    outline: none;
    transition: .15s ease;
}

.k-input:focus {
    border-color: #667085;
    box-shadow: 0 0 0 3px rgba(17,24,39,.06);
}

.k-button {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    cursor: pointer;
    font-weight: 700;
    font-size: 15px;
}

.k-button:hover {
    background: var(--primary-hover);
}

.k-button-secondary {
    background: white;
    color: var(--text);
    border: 1px solid #d0d5dd;
}

.k-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.k-check {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

.k-link {
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
}

.k-link:hover {
    text-decoration: underline;
}

.k-divider {
    border-top: 1px solid var(--line);
    margin: 24px 0;
}

.k-bottom {
    margin-top: 26px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

.k-alert {
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.k-alert-error {
    color: var(--danger);
    background: #fef3f2;
    border: 1px solid #fecdca;
}

.k-alert-success {
    color: var(--success);
    background: #ecfdf3;
    border: 1px solid #abefc6;
}

.k-errors {
    padding-left: 19px;
    margin: 0;
}

.k-home {
    min-height: 100vh;
    padding: 38px;
    background: #f7f8fa;
}

.k-home-shell {
    max-width: 1180px;
    margin: auto;
}

.k-home-nav {
    background: white;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.k-home-card {
    margin-top: 28px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 36px;
}

.k-home-card h1 {
    margin-top: 0;
}

@media (max-width: 900px) {
    .k-auth {
        display: block;
    }

    .k-auth-brand {
        min-height: auto;
        padding: 30px 24px;
    }

    .k-brand-copy {
        margin-top: 70px;
    }

    .k-brand-copy h1 {
        font-size: 40px;
    }

    .k-auth-panel {
        min-height: auto;
        padding: 48px 22px;
    }
}
