/* ═══════════════════════════════════════════
   Платформа — светлая тема
   ═══════════════════════════════════════════ */

:root {
    --bg:           #ECF5FB;
    --input-bg:     #C8D9EA;
    --link:         #1B92D1;
    --btn-bg:       #37AFE2;
    --btn-hover:    #2e9cc9;
    --text:         #606060;
    --card-bg:      #ffffff;
    --border:       #C8D9EA;
    --danger:       #dc3545;
    --success:      #42b72a;
    --radius:       .5rem;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ═══ Bottom Navigation ═══ */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    z-index: 100;
    overflow-x: auto;
    scrollbar-width: none;
}

.bottom-nav::-webkit-scrollbar { display: none; }

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 64px;
    padding: .4rem .5rem;
    text-decoration: none;
    color: var(--text);
    font-size: .65rem;
    border-radius: var(--radius);
    transition: color .15s, background .15s;
    white-space: nowrap;
    cursor: pointer;
}

.nav-item:hover {
    color: var(--btn-bg);
    background: rgba(55, 175, 226, .1);
}

.nav-item.active {
    color: var(--btn-bg);
    font-weight: 600;
}

.nav-item .nav-icon {
    font-size: 1.35rem;
    line-height: 1;
}

.nav-item .nav-label {
    font-weight: 500;
}

/* ═══ Main Content ═══ */
.main-content {
    padding: 0 12px 76px;
    min-height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.module-page {
    max-width: 720px;
    margin: 0 auto;
    justify-content: flex-start;
}

.module-page h1 {
    font-size: 1.35rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.placeholder-text {
    color: var(--text);
    font-size: .95rem;
}

.user-info {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.user-info p {
    margin-bottom: .5rem;
    color: var(--text);
}

/* ═══ Auth Forms ═══ */
.auth-tabs {
    display: flex;
    gap: .5rem;
    margin-bottom: 1.5rem;
}

.tab-btn {
    flex: 1;
    padding: .65rem;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: .9rem;
    transition: all .15s;
}

.tab-btn.active {
    background: var(--btn-bg);
    border-color: var(--btn-bg);
    color: #eeeeee;
}

.auth-form {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: .85rem;
    color: var(--text);
    margin-bottom: .35rem;
}

.form-group input {
    width: 100%;
    padding: .65rem .85rem;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: .95rem;
    transition: border-color .15s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--link);
    box-shadow: 0 0 0 2px rgba(27, 146, 209, .15);
}

.form-group input::placeholder {
    color: var(--text);
    opacity: .5;
}

.btn {
    padding: .65rem 1.25rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: .95rem;
    font-weight: 600;
    transition: opacity .15s;
}

.btn-primary {
    background: var(--btn-bg);
    color: #eeeeee;
}

.btn-primary:hover {
    background: var(--btn-hover);
    opacity: 1;
}

/* ═══ Links ═══ */
a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ═══ Alerts ═══ */
.alert {
    padding: .75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: .9rem;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

/* ═══ Utility ═══ */
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
