/* style.css */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f9;
    color: #343a40;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 25px;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 10px;
}

h1, h2 {
    color: #0056b3;
    border-bottom: 2px solid #0056b3;
    padding-bottom: 8px;
    margin-top: 25px;
    font-weight: 500;
}

/* --- ШАПКА И НАВИГАЦИЯ --- */
header {
    background-color: #343a40; /* Темный фон */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between; /* Разносит элементы по краям */
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    flex-shrink: 0; 
}
.logo-image {
    height: 35px;
    margin-right: 10px;
}
.system-name {
    color: white;
    font-size: 1.2em;
    font-weight: 600;
}

/* Навигация: располагается после логотипа */
.main-nav {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 30px; /* Отступ от логотипа */
    flex-grow: 1; 
    justify-content: flex-start; /* Навигационные ссылки выравниваются по левому краю */
}

.user-area {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

/* Стили элементов навигации */
.nav-item {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
    font-weight: 500;
    display: block; /* Важно для правильного отображения padding */
}
.nav-main:hover {
    background-color: #007bff;
}
.nav-report {
    background-color: #3f51b5;
}
.nav-report:hover {
    background-color: #303f9f;
}
.nav-admin-center { 
    background-color: #28a745; /* Новый стиль для кнопки в меню */
    color: white;
}
.nav-admin-center:hover { 
    background-color: #218838; 
}
.user-status {
    color: #adb5bd;
    font-size: 0.9em;
}

/* --- ФОРМЫ и ПОЛЯ --- */
label {
    font-weight: 600;
    margin-top: 10px;
    display: block;
}
input[type="text"], input[type="url"], input[type="date"], input[type="email"], input[type="number"], select, textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 15px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    box-sizing: border-box;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
input[type="text"]:focus, input[type="url"]:focus, input[type="date"]:focus, input[type="number"]:focus, select:focus, textarea:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}


/* --- КНОПКИ ДЕЙСТВИЯ --- */
button, .btn {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s, transform 0.1s;
    font-weight: 600;
    margin-right: 5px;
    text-align: center; 
    line-height: 1.2; 
}
button:active, .btn:active {
    transform: translateY(1px); 
}

/* Цветовая схема кнопок */
.btn-primary { 
    background-color: #007bff; 
    color: white; 
}
.btn-primary:hover { 
    background-color: #0056b3; 
}
.btn-secondary { 
    background-color: #6c757d; 
    color: white; 
}
.btn-secondary:hover { 
    background-color: #5a6268; 
}
.btn-danger { 
    background-color: #dc3545; 
    color: white; 
}
.btn-danger:hover { 
    background-color: #c82333; 
}
.btn-admin { 
    background-color: #28a745; 
    color: white;
}
.btn-admin:hover { 
    background-color: #218838; 
}


/* --- ТАБЛИЦЫ --- */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden; 
    margin-top: 15px;
}
th, td {
    border: none;
    border-right: 1px solid #dee2e6;
    padding: 12px;
    text-align: left;
}
th {
    background-color: #e9ecef;
    border-bottom: 2px solid #dee2e6;
    font-weight: bold;
}
th:last-child, td:last-child {
    border-right: none;
}
tr:nth-child(even) { background-color: #f7f7f7; }
tr:hover { background-color: #e6f7ff; }

/* Сообщения */
.message { padding: 10px; margin-bottom: 15px; border-radius: 4px; font-weight: bold; }
.success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.error { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* --- СТИЛИ СТАТУСОВ --- */
.status-tag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: bold;
    color: #343a40; 
}
.status-Новый { background-color: #fff3cd; color: #856404 !important; border: 1px solid #ffeeba; } 
.status-Наизучении, .status-Вработе, .status-Заявкаотправлена { background-color: #cce5ff; color: #004085 !important; border: 1px solid #b8daff; } 
.status-Отказ, .status-Проигран { background-color: #f8d7da; color: #721c24 !important; border: 1px solid #f5c6cb; } 
.status-Выигран { background-color: #d4edda; color: #155724 !important; border: 1px solid #c3e5cb; }