:root {
    --bg: #f4f6f8;
    --card: #ffffff;
    --text: #1f2933;
    --muted: #6b7280;
    --line: #e5e7eb;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --danger: #dc2626;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    --radius-lg: 24px;
    --radius-md: 16px;
}

* {
    box-sizing: border-box;
}

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

button,
input {
    font: inherit;
}

.app {
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

/* Login */

.login-screen {
    min-height: 100vh;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 32px 24px;
    background: var(--card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.brand-block {
    text-align: center;
    margin-bottom: 28px;
}

.brand-mark {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: #e8f0ff;
    color: var(--primary);
    font-size: 28px;
    font-weight: 800;
}

.brand-block h1 {
    margin: 0 0 8px;
    font-size: 26px;
    letter-spacing: -0.04em;
}

.brand-block p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}

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

.login-form label {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 700;
}

.login-form input {
    width: 100%;
    padding: 15px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    outline: none;
}

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

.form-message {
    min-height: 20px;
    margin: 4px 0 0;
    color: var(--danger);
    font-size: 14px;
}

.primary-button {
    width: 100%;
    margin-top: 8px;
    padding: 15px 18px;
    border: 0;
    border-radius: 14px;
    background: var(--primary);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.primary-button:active {
    background: var(--primary-dark);
}

.login-note {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
    line-height: 1.5;
}

/* Main */

.main-screen {
    min-height: 100vh;
    padding: 20px 16px 92px;
}

.top-bar {
    max-width: 720px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.top-bar h2 {
    margin: 0;
    font-size: 22px;
    letter-spacing: -0.03em;
}

.text-button {
    border: 0;
    background: transparent;
    color: var(--primary);
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.content-panel {
    max-width: 720px;
    margin: 0 auto;
    padding: 22px;
    min-height: 300px;
    background: var(--card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.content-panel h3 {
    margin: 0 0 10px;
    font-size: 22px;
}

.content-panel p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

/* Bottom Nav */

.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 14px;
    width: calc(100% - 24px);
    max-width: 720px;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(10px);
}

.nav-item {
    min-height: 48px;
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.nav-item.active {
    background: #e8f0ff;
    color: var(--primary);
}