:root {
    --bg: #eef3f7;
    --panel: rgba(255, 255, 255, 0.76);
    --panel-border: rgba(105, 121, 138, 0.18);
    --text: #263746;
    --muted: #6a7a86;
    --accent: #2f7d8c;
    --accent-strong: #1f6674;
    --danger: #b42318;
    --shadow: 0 24px 80px rgba(37, 55, 70, 0.18);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 12% 16%, rgba(80, 151, 162, 0.22), transparent 34%),
        linear-gradient(145deg, #f7fafc, var(--bg));
    color: var(--text);
}

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

.auth-panel {
    width: min(100%, 420px);
    padding: 24px;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(24px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.brand-mark {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #d7edf0;
    color: var(--accent-strong);
    font-weight: 800;
    font-size: 22px;
}

h1 {
    margin: 0;
    font-size: 26px;
    line-height: 1.1;
}

p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 4px;
    margin-bottom: 18px;
    border-radius: 8px;
    background: rgba(38, 55, 70, 0.07);
}

.tab {
    min-height: 40px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.tab.active {
    background: #ffffff;
    color: var(--text);
    box-shadow: 0 4px 14px rgba(38, 55, 70, 0.12);
}

.auth-form {
    display: none;
}

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

label {
    display: grid;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
}

input {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(105, 121, 138, 0.28);
    border-radius: 8px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--text);
    font: inherit;
    outline: none;
}

input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(47, 125, 140, 0.15);
}

.primary-action {
    min-height: 48px;
    margin-top: 4px;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.primary-action:disabled {
    cursor: wait;
    opacity: 0.65;
}

.message {
    min-height: 20px;
    margin-top: 16px;
    color: var(--danger);
    font-weight: 700;
}

.message.ok {
    color: var(--accent-strong);
}

@media (max-width: 420px) {
    .auth-screen {
        padding: 16px;
        place-items: stretch;
        align-content: center;
    }

    .auth-panel {
        padding: 20px;
    }
}
