:root {
    --ink: #17211b;
    --muted: #667069;
    --line: #dce2de;
    --primary: #137a50;
    --primary-dark: #0d6240;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: #f4f6f4;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
    font: inherit;
}

[v-cloak] {
    display: none;
}

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

.login-panel {
    position: relative;
    width: min(400px, 100%);
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(23, 33, 27, 0.08);
}

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

.login-brand span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #26352b;
    background: #101813;
}

.login-brand span img {
    display: block;
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.login-brand strong {
    font-size: 16px;
}

.panel-headline {
    margin: 28px 0 26px;
}

.watcher {
    position: relative;
    width: 188px;
    height: 150px;
    margin: 24px auto 0;
    animation: watcherBreathe 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 {
    position: absolute;
    top: 0;
    width: 74px;
    height: 30px;
    border: 2px solid #6aa06d;
    background: #9fd29a;
    content: "";
}

.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);
    transform: translate(var(--watcher-eye-x, 0), var(--watcher-eye-y, 0));
    transition: transform 0.15s ease, height 0.15s 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 50% 50%;
}

.watcher-robe {
    position: absolute;
    top: 82px;
    left: 50%;
    width: 104px;
    height: 48px;
    transform: translateX(-50%);
    border: 2px solid #84705b;
    border-radius: 18px 18px 10px 10px;
    background: #c5b294;
}

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

.watcher.mood-happy .watcher-mouth { height: 12px; border-bottom-width: 3px; }
.watcher.mood-sad { animation: none; }
.watcher.mood-sad .watcher-mouth { bottom: 13px; transform: translateX(-50%) rotate(180deg); }
.watcher.mood-sad .watcher-eye { height: 10px; }
.watcher.mood-curious .watcher-head { transform: translateX(-50%) rotate(-2deg); }
.watcher.mood-checking .watcher-head { animation: watcherFocus 0.9s ease-in-out infinite; }

@keyframes watcherBreathe {
    50% { transform: translateY(4px); }
}

@keyframes watcherFocus {
    50% { box-shadow: inset 0 -12px rgba(91, 144, 93, 0.12), 0 0 0 8px rgba(19, 122, 80, 0.1); }
}

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

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

.login-errors {
    margin-bottom: 18px;
    padding: 11px 12px;
    border: 1px solid #f2c5c2;
    border-radius: 6px;
    background: #fff6f5;
    color: #a22a24;
    font-size: 14px;
}

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

.login-form label {
    margin-top: 8px;
    color: #37423b;
    font-size: 13px;
    font-weight: 700;
}

.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: var(--primary);
    box-shadow: 0 0 0 3px rgba(19, 122, 80, 0.12);
}

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

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

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

.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;
}

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

@media (max-width: 480px) {
    .login-shell {
        align-items: start;
        padding: 0;
    }

    .login-panel {
        min-height: 100vh;
        padding: 28px 22px;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }
}
