:root {
    --gw-bg: #f3f5f8;
    --gw-card: #ffffff;
    --gw-text: #1f2933;
    --gw-muted: #5f6b7a;
    --gw-border: #d9dee5;
    --gw-accent: #0078d4;
    --gw-accent-hover: #006abc;
    --gw-error-bg: #fdecea;
    --gw-error-text: #8a1c12;
    --gw-info-bg: #e8f3fc;
    --gw-info-text: #0b4a7a;
}

@media (prefers-color-scheme: dark) {
    :root {
        --gw-bg: #14171c;
        --gw-card: #1d2128;
        --gw-text: #e6e9ee;
        --gw-muted: #9aa5b3;
        --gw-border: #333a45;
        --gw-accent: #3a9be8;
        --gw-accent-hover: #5aaced;
        --gw-error-bg: #3b1d1a;
        --gw-error-text: #f4b8b0;
        --gw-info-bg: #16304a;
        --gw-info-text: #b9dcf7;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--gw-bg);
    color: var(--gw-text);
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

.gw-shell {
    max-width: 420px;
    margin: 0 auto;
    padding: 56px 16px 24px;
}

.gw-brand {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: .02em;
    margin-bottom: 16px;
    color: var(--gw-accent);
}

.gw-card {
    background: var(--gw-card);
    border: 1px solid var(--gw-border);
    border-radius: 8px;
    padding: 28px 28px 24px;
}

.gw-card h1 { font-size: 20px; font-weight: 600; margin: 0 0 4px; }
.gw-card .gw-sub { color: var(--gw-muted); margin: 0 0 20px; }

.gw-field { margin-bottom: 14px; }
.gw-field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.gw-field input[type=text], .gw-field input[type=password] {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid var(--gw-border);
    border-radius: 4px;
    background: var(--gw-card);
    color: var(--gw-text);
    font-size: 15px;
}
.gw-field input:focus { outline: 2px solid var(--gw-accent); outline-offset: -1px; border-color: var(--gw-accent); }

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

.gw-button {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gw-accent);
    border-radius: 4px;
    background: var(--gw-accent);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}
.gw-button:hover { background: var(--gw-accent-hover); }
.gw-button.secondary { background: transparent; color: var(--gw-text); border-color: var(--gw-border); font-weight: 500; }
.gw-button.secondary:hover { border-color: var(--gw-accent); }
.gw-button + .gw-button { margin-top: 8px; }

.gw-divider { display: flex; align-items: center; gap: 10px; color: var(--gw-muted); font-size: 13px; margin: 20px 0 14px; }
.gw-divider::before, .gw-divider::after { content: ""; flex: 1; border-top: 1px solid var(--gw-border); }

.gw-alert { padding: 10px 12px; border-radius: 4px; margin-bottom: 16px; font-size: 14px; }
.gw-alert.error { background: var(--gw-error-bg); color: var(--gw-error-text); }
.gw-alert.info { background: var(--gw-info-bg); color: var(--gw-info-text); }

.gw-muted { color: var(--gw-muted); font-size: 14px; }
.gw-foot { text-align: center; color: var(--gw-muted); font-size: 12px; margin-top: 16px; }
.gw-card a { color: var(--gw-accent); }
