
/* === ГЛОБАЛЬНЫЙ СБРОС === */
*, *::before, *::after {
    box-sizing: border-box; /* Это решит 90% проблем с вылезанием */
}

/* ... дальше твой старый код (body, container и т.д.) ... */
/* === ЛЕЙАУТ И СЕТКА === */
body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding-bottom: 50px;
}

.container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 20px;
}

/* Навигация */
.nav {
    background: var(--nav-bg);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}
.nav a {
    color: var(--nav-text);
    text-decoration: none;
    margin-right: 20px;
    font-weight: 600;
    opacity: 0.8;
    transition: 0.2s;
}
.nav a:hover, .nav a.active { opacity: 1; color: #fff; }
.nav-right { display: flex; gap: 10px; align-items: center; }

/* Заголовки страниц */
.header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.header-row h1 { color: var(--text-main); margin: 0; font-size: 24px; }
.section-title { font-size: 18px; font-weight: bold; margin-bottom: 15px; display: block; color: var(--text-main); }

/* Сетка страницы сотрудников */
.emp-container { display: grid; grid-template-columns: 350px 1fr; gap: 30px; align-items: start; }
.sticky-form { position: sticky; top: 20px; }
.emp-card { 
    background: var(--bg-card); 
    padding: 20px; 
    border-radius: 8px; 
    border: 1px solid var(--border); 
    margin-bottom: 15px; 
    box-shadow: var(--shadow); 
}

/* Сводная панель внизу */
.summary-bar {
    background: var(--nav-bg);
    color: #fff;
    padding: 20px;
    margin-top: 20px;
    border-radius: 8px;
    display: flex;
    justify-content: flex-end;
    gap: 30px;
}
.summary-label { color: #aaa; font-size: 11px; text-transform: uppercase; font-weight: bold; }
.summary-val { font-size: 20px; font-weight: bold; font-family: monospace; }
.val-green { color: var(--green); }
.val-red { color: var(--red); }
.val-white { color: #fff; }

@media (max-width: 900px) {
    .emp-container { grid-template-columns: 1fr; }
    .sticky-form { position: static; }
}