:root {
    --bg: #f5f7fa;
    --surface: #ffffff;
    --ink: #17212f;
    --muted: #667085;
    --line: #d9e0e8;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --green: #0f8a5f;
    --red: #c2413d;
    --amber: #b7791f;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 20% 16%, rgba(37, 99, 235, 0.10), transparent 28%),
        radial-gradient(circle at 78% 72%, rgba(15, 138, 95, 0.12), transparent 30%),
        linear-gradient(135deg, #eef3f8 0%, #fbfcfe 100%);
}

button,
input {
    font: inherit;
}

[v-cloak] {
    display: none;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
}

.login-stage {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 440px);
    gap: 34px;
    align-items: center;
    width: min(1040px, 100%);
}

.login-copy {
    padding: 12px;
}

.eyebrow {
    margin: 0 0 8px;
    color: #087f8c;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.login-copy h1 {
    margin: 0;
    max-width: 560px;
    font-size: 52px;
    line-height: 1;
}

.login-copy p:not(.eyebrow) {
    max-width: 560px;
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
}

.login-panel {
    position: relative;
    overflow: hidden;
    padding: 28px;
    border: 1px solid rgba(217, 224, 232, 0.95);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 24px 70px rgba(23, 33, 47, 0.14);
}

.login-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    border-top: 4px solid var(--primary);
    pointer-events: none;
}

.panel-headline {
    margin: 182px 0 20px;
}

.panel-headline h2 {
    margin: 0;
    font-size: 30px;
    line-height: 1.1;
}

.panel-headline p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.login-errors {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fef2f2;
    color: #991b1b;
    font-size: 14px;
    line-height: 1.5;
}

.login-form {
    display: grid;
    gap: 14px;
}

.login-form label {
    display: grid;
    gap: 7px;
    color: #344054;
    font-size: 13px;
    font-weight: 750;
}

.login-form input {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
}

.login-form input:focus {
    outline: none;
    border-color: rgba(37, 99, 235, 0.65);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.login-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    margin-top: 4px;
    border: 1px solid var(--primary);
    border-radius: 6px;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font-weight: 800;
}

.login-submit:hover {
    background: var(--primary-dark);
}

.login-submit:disabled {
    cursor: wait;
    opacity: 0.84;
}

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

.login-mode {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 16px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
}

.login-mode strong {
    color: #344054;
}

.watcher {
    position: absolute;
    top: 24px;
    left: 50%;
    width: 188px;
    height: 158px;
    transform: translateX(-50%);
    animation: breathe 3.6s ease-in-out infinite;
}

.watcher-ears {
    position: absolute;
    top: 34px;
    left: 50%;
    width: 172px;
    height: 34px;
    transform: translateX(-50%);
}

.watcher-ears::before,
.watcher-ears::after {
    content: "";
    position: absolute;
    top: 0;
    width: 74px;
    height: 30px;
    border: 2px solid #6aa06d;
    background: #9fd29a;
}

.watcher-ears::before {
    left: 0;
    border-radius: 80% 18% 70% 24%;
    transform: rotate(-14deg);
}

.watcher-ears::after {
    right: 0;
    border-radius: 18% 80% 24% 70%;
    transform: rotate(14deg);
}

.watcher-head {
    position: absolute;
    top: 12px;
    left: 50%;
    width: 92px;
    height: 76px;
    transform: translateX(-50%);
    border: 2px solid #6aa06d;
    border-radius: 43% 43% 48% 48%;
    background: #9fd29a;
    box-shadow: inset 0 -12px rgba(91, 144, 93, 0.12);
}

.watcher-eye {
    position: absolute;
    top: 31px;
    width: 18px;
    height: 16px;
    border-radius: 50%;
    background: #1f2937;
    box-shadow: inset 0 4px rgba(255, 255, 255, 0.16);
    transition: transform 0.18s ease, height 0.18s ease;
}

.watcher-eye.left {
    left: 20px;
}

.watcher-eye.right {
    right: 20px;
}

.watcher-mouth {
    position: absolute;
    left: 50%;
    bottom: 17px;
    width: 24px;
    height: 8px;
    transform: translateX(-50%);
    border-bottom: 2px solid #36583a;
    border-radius: 0 0 999px 999px;
    transition: transform 0.2s ease, border-radius 0.2s ease;
}

.watcher-robe {
    position: absolute;
    top: 82px;
    left: 50%;
    width: 104px;
    height: 48px;
    transform: translateX(-50%);
    border: 2px solid #8a6f54;
    border-radius: 18px 18px 10px 10px;
    background: linear-gradient(180deg, #d6c3a8, #a98f72);
}

.watcher-status {
    position: absolute;
    left: 50%;
    bottom: -10px;
    width: max-content;
    max-width: min(300px, calc(100vw - 72px));
    transform: translateX(-50%);
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
    white-space: normal;
}

.mood-happy .watcher-mouth {
    height: 12px;
    border-bottom-width: 3px;
}

.mood-happy .watcher-eye {
    transform: translateY(-1px) scale(1.06);
}

.mood-sad .watcher {
    animation: none;
}

.mood-sad .watcher-mouth {
    bottom: 13px;
    transform: translateX(-50%) rotate(180deg);
}

.mood-sad .watcher-eye {
    height: 10px;
    transform: translateY(5px);
}

.mood-checking .watcher-head {
    animation: focusPulse 0.9s ease-in-out infinite;
}

.mood-checking .watcher-status {
    color: var(--primary);
}

.mood-curious .watcher-head {
    transform: translateX(-50%) rotate(-2deg);
}

@keyframes breathe {
    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(4px);
    }
}

@keyframes focusPulse {
    0%,
    100% {
        box-shadow: inset 0 -12px rgba(91, 144, 93, 0.12), 0 0 0 rgba(37, 99, 235, 0);
    }
    50% {
        box-shadow: inset 0 -12px rgba(91, 144, 93, 0.12), 0 0 0 8px rgba(37, 99, 235, 0.10);
    }
}

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

@media (max-width: 820px) {
    .login-stage {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .login-copy h1 {
        font-size: 38px;
    }
}

@media (max-width: 520px) {
    .login-shell {
        padding: 16px;
    }

    .login-copy {
        padding: 0;
    }

    .login-panel {
        padding: 22px;
    }

    .watcher-status {
        max-width: calc(100vw - 76px);
    }
}
