/* --- Сброс и базовые стили --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}
a {
    color: #0073aa;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* --- Шапка --- */
.main-header {
    background: #ffffff;
    border-bottom: 2px solid #0073aa;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.main-header .logo {
    display: flex;
    align-items: center;
}
.main-header .logo img {
    height: 40px;
    margin-right: 15px;
}
.header-user {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.95em;
}
.header-user a {
    color: #d9534f;
    font-weight: bold;
}

/* --- Контейнер страницы --- */
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

/* --- Страница входа --- */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0073aa 0%, #00a0d2 100%);
}
.login-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    padding: 40px 30px;
    width: 380px;
    max-width: 90%;
    text-align: center;
}
.login-card .logo {
    margin-bottom: 20px;
}
.login-card .logo img {
    height: 60px;
}
.login-card h2 {
    margin-bottom: 25px;
    color: #0073aa;
    font-weight: 600;
}
.login-card input[type="email"],
.login-card input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}
.login-card button {
    width: 100%;
    padding: 12px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}
.login-card button:hover {
    background: #005a87;
}
.login-card .error {
    color: #d9534f;
    margin: 10px 0;
}

/* --- Заголовки страниц --- */
.page-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.page-title h2 {
    font-size: 1.8em;
    color: #2c3e50;
}
.btn {
    display: inline-block;
    padding: 8px 18px;
    background: #0073aa;
    color: white !important;
    border-radius: 4px;
    font-size: 0.95em;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}
.btn:hover {
    background: #005a87;
    text-decoration: none;
}
.btn-secondary {
    background: #6c757d;
}
.btn-secondary:hover {
    background: #545b62;
}

/* --- Таблица заявок --- */
.tickets-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-radius: 6px;
    overflow: hidden;
}
.tickets-table th {
    background: #f0f3f5;
    text-align: left;
    padding: 12px 10px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.tickets-table td {
    padding: 10px 10px;
    border-bottom: 1px solid #ecf0f1;
    font-size: 0.95em;
}
.tickets-table tr:last-child td {
    border-bottom: none;
}
/* Цветовые классы строк */
.tickets-table tr.row-red { background-color: #ffe6e6; }
.tickets-table tr.row-blue { background-color: #e6f7ff; }
.tickets-table tr.row-orange { background-color: #fff4e6; }
.tickets-table tr.row-yellow { background-color: #ffffe6; }
.tickets-table tr.row-green { background-color: #e6ffe6; }

/* Иконки типов */
.type-icon {
    margin-right: 4px;
    color: #555;
}

/* Фильтры */
.filters {
    background: white;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
}
.filters select,
.filters input[type="date"] {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.filters button {
    padding: 6px 15px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.filters button.primary {
    background: #0073aa;
}

/* --- Управление пользователями --- */
.users-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.users-table th {
    background: #f0f3f5;
    padding: 10px;
    text-align: left;
}
.users-table td {
    padding: 10px;
    border-bottom: 1px solid #ecf0f1;
}

/* --- Детальная карточка заявки (будет использовано позже) --- */
.ticket-header {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    color: #333;
    font-weight: bold;
}
.ticket-header.red { background: #f8d7da; color: #721c24; }
.ticket-header.blue { background: #cce5ff; color: #004085; }
.ticket-header.orange { background: #ffeeba; color: #856404; }
.ticket-header.yellow { background: #fff3cd; color: #856404; }
.ticket-header.green { background: #d4edda; color: #155724; }

/* --- Формы --- */
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}