:root {
    --bg: #eef1f6;
    --surface: #ffffff;
    --surface-muted: #f1f4f8;
    --border: #dfe3e8;
    --border-strong: #c7cdd6;
    --text: #1f2933;
    --text-muted: #6b7684;
    --accent: #2f6fed;
    --accent-hover: #1f56c9;
    --accent-soft: #eaf1fd;
    --danger: #d32f2f;
    --warn-bg: #fff8e1;
    --warn-border: #ffe082;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
    --shadow-md: 0 10px 30px rgba(15, 23, 42, .12);
}

* { box-sizing: border-box; }

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

h1 { font-size: 20px; font-weight: 700; margin: 0 0 18px; color: var(--text); }

/* Layout & Topbar */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
    height: 56px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    position: sticky;
    top: 0;
    z-index: 30;
}

.topbar-left { display: flex; align-items: center; gap: 10px; }
.topbar-burger { display: none; background: none; border: none; font-size: 20px; color: var(--text-muted); cursor: pointer; }

/* Ограничение размера логотипа в шапке */
.topbar-logo {
    width: 32px !important;
    height: 32px !important;
    object-fit: contain;
    border-radius: 6px;
    flex-shrink: 0;
}

.topbar-center { flex: 1; display: flex; justify-content: center; padding: 0 24px; }
.topbar-search {
    width: 100%; max-width: 380px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 12px;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
}

.topbar-right { display: flex; align-items: center; gap: 8px; }
.topbar-user {
    padding: 4px 12px;
    border-radius: 16px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

/* Sidebar & Body */
.app-body { flex: 1; display: flex; }

.sidebar {
    width: 240px; flex: 0 0 240px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 16px 10px;
}

.sidebar-section-title {
    font-size: 11px; font-weight: 700; letter-spacing: .06em;
    text-transform: uppercase; color: var(--text-muted); margin: 18px 8px 8px;
}
.sidebar-section-title:first-child { margin-top: 4px; }

.sidebar-item {
    display: block; padding: 8px 12px; margin: 2px 0; border-radius: 8px;
    color: var(--text); font-size: 13.5px; font-weight: 500;
    border: none; background: none; width: 100%; text-align: left; cursor: pointer; text-decoration: none;
}
.sidebar-item:hover { background: var(--surface-muted); text-decoration: none; }
.sidebar-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.sidebar-cta { margin: 14px 0; }
.sidebar-form { margin: 0; width: 100%; }

.content { flex: 1; padding: 28px; }

/* Forms & Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 28px 32px;
    box-shadow: var(--shadow-sm);
}

input[type=text], input[type=email], input[type=password] {
    width: 100%; padding: 8px 12px;
    border: 1px solid var(--border-strong);
    border-radius: 6px; background: var(--surface-muted);
    color: var(--text); font-size: 14px; box-shadow: none !important;
}
input[type=text]:focus, input[type=email]:focus, input[type=password]:focus {
    outline: none; border-color: var(--accent); background: var(--surface);
    box-shadow: 0 0 0 3px var(--accent-soft) !important;
}

button, .btn, .btn-primary {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #fff !important; padding: 8px 20px;
    border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 600;
    display: inline-block; text-decoration: none; border: none;
}
button:hover, .btn:hover, .btn-primary:hover {
    background-color: var(--accent-hover) !important;
}

/* Auth Page Layout */
.auth-body {
    background: #eef1f6; min-height: 100vh;
    display: flex; align-items: center; justify-content: center; padding: 24px;
}
.auth-container { width: 100%; max-width: 400px; }
.auth-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; box-shadow: var(--shadow-md); padding: 32px;
}
.auth-logo-wrap { display: flex; justify-content: center; margin-bottom: 16px; }

/* Ограничение размера логотипа на странице входа */
.auth-logo {
    width: 64px !important;
    height: 64px !important;
    object-fit: contain;
}

.auth-nav { color: var(--text-muted); font-size: 13px; text-align: center; }
.auth-divider { border: none; border-top: 1px solid var(--border); margin: 18px 0; }
.auth-content h1 { text-align: center; font-size: 18px; margin-bottom: 16px; }
.auth-content button[type=submit] { width: 100%; margin-top: 6px; padding: 10px; }