:root { 
    --bg: #f5f7f9; 
    --white: #ffffff; 
    --border: #e2e8f0; 
    --primary: #000753; 
    --accent: #00a1e7;
    --text: #334155; 
    --danger: #ef4444;
    --success: #22c55e;
}
body { background: var(--bg); font-family: 'Inter', system-ui; color: var(--text); margin: 0; }

/* Layout */
.wrapper { display: flex; height: 100vh; }
.sidebar { width: 260px; background: #fff; border-right: 1px solid var(--border); padding: 20px; flex-shrink: 0; }
.main { flex: 1; display: flex; flex-direction: column; overflow-y: auto; }
.header { height: 60px; background: #fff; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: flex-end; padding: 0 30px; position: sticky; top: 0; }

/* UI Elements */
.avatar { width: 35px; height: 35px; border-radius: 50%; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; font-size: 14px; overflow: hidden; object-fit: cover; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.nav-link { display: block; padding: 12px; color: var(--text); text-decoration: none; border-radius: 8px; margin-bottom: 5px; transition: 0.2s; }
.nav-link:hover { background: #f0f9ff; color: var(--accent); }
.nav-link.active { background: var(--bg); color: var(--primary); font-weight: 600; }

/* Tables */
.content-card { background: #fff; margin: 20px; border-radius: 12px; border: 1px solid var(--border); overflow: hidden; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th { background: #f8fafc; padding: 15px; text-align: left; font-size: 13px; color: #64748b; border-bottom: 1px solid var(--border); }
td { padding: 15px; border-bottom: 1px solid var(--border); font-size: 14px; }

/* Buttons & Badges */
.btn { padding: 8px 16px; border-radius: 6px; cursor: pointer; border: none; font-size: 14px; font-weight: 500; transition: 0.2s; text-decoration: none; display: inline-block; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-danger { background: #fff; color: var(--danger); border: 1px solid var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.badge { padding: 4px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; background: #f1f5f9; color: #475569; margin-right: 4px; }

/* Modal */
.modal-backdrop { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: none; align-items: center; justify-content: center; z-index: 1000; }
.modal { background: #fff; padding: 30px; border-radius: 12px; width: 450px; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 13px; margin-bottom: 5px; font-weight: 500; }
.form-control { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 6px; box-sizing: border-box; }
.container-fluid { padding: 20px 20px 0 20px; } /* Совпадает с margin у .content-card */

/* Полностью замени блоки связанные с login-page в style.css */

.login-page { 
    height: 100vh; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    background: linear-gradient(135deg, #000753 0%, #00a1e7 100%); 
    margin: 0;
}

.login-page .card {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    width: 100%;
    max-width: 350px; /* Фиксированная ширина карточки */
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    text-align: center;
}

/* Логотип/Заголовок на странице входа */
.login-page .card h2 {
    margin-bottom: 30px;
    color: var(--primary);
    font-size: 28px;
    font-weight: 800;
}

.login-page .card h2::after {
    content: ''; /* Текст логотипа здесь */
    display: block;
}

.login-page input {
    display: block;
    width: 100%;
    margin-bottom: 15px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
}

.login-page button {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}

.login-page button:hover {
    background: var(--accent);
}

/* Стили для форм и чекбоксов ролей */
.role-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    background: #f8fafc;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
}
.role-item { display: flex; align-items: center; font-size: 13px; cursor: pointer; }
.role-item input { width: auto; margin-right: 8px; }

/* Улучшение хедера */
/* Улучшенный хедер */
.header {
    height: 60px;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;      /* Центрирование всех элементов по вертикали */
    justify-content: flex-end; /* Все элементы прижаты к правому краю */
    padding: 0 25px;
    gap: 15px;                /* Расстояние между основными блоками: профилем, темой и выходом */
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Группа профиля (имя + аватар) */
.header-profile {
    display: flex;
    align-items: center;
    gap: 12px;                /* Расстояние между именем и кругляшком аватара */
    text-decoration: none;
    color: var(--text);
    padding: 6px 12px;
    border-radius: 8px;
    transition: background 0.2s;
}

.header-profile:hover {
    background: rgba(0, 0, 0, 0.05); /* Легкий фон при наведении */
}

/* Общий стиль для кнопок-иконок (тема и выход) */
.header-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 18px;
    opacity: 0.8;
}

.header-action-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    opacity: 1;
    color: var(--accent);
}

.header-action-btn.logout:hover {
    color: var(--danger); /* Выход подсвечиваем красным */
}