﻿/* Основные настройки */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #1a3c34, #4a1c2a) !important; /* Тёмно-зелёный и бордовый градиент */
    color: #ffffff !important; /* Белый текст */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin-bottom: 60px;
    padding-top: 80px; /* Отступ для фиксированной шапки */
}

main {
    color: #ffffff !important; /* Белый текст для main */
}

a, p, h1, h2, h3, h4, h5, h6, span, label, .card-title, .card-text, .nav-link, .navbar-brand, .form-control, .form-input, .validation-message, .status {
    color: #ffffff !important; /* Белый текст для всех текстовых элементов */
}

a {
    text-decoration: none;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
}

/* Фокус для элементов */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem rgba(74, 28, 42, 0.2), 0 0 0 0.25rem #4a1c2a !important; /* Бордовый акцент */
}

h1:focus {
    outline: none;
}

/* Валидация полей */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #1a3c34 !important; /* Тёмно-зелёный для валидных полей */
}

.invalid {
    outline: 1px solid #dc2626 !important; /* Темно-красный для невалидных полей */
}

.validation-message {
    color: #ffffff !important; /* Белый для сообщений об ошибках */
}

/* Градиентный фон */
.gradient-background {
    background: linear-gradient(90deg, #1a3c34, #4a1c2a) !important; /* Тёмно-зелёный и бордовый градиент */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Шапка (NavBar) */
.navbar {
    background: linear-gradient(90deg, #1a3c34, #4a1c2a) !important; /* Тёмно-зелёный и бордовый градиент */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

    .navbar .navbar-brand {
        font-size: 1.5rem;
        font-weight: 700; /* Жирный шрифт */
        color: #ffffff !important; /* Белый текст */
    }

    .navbar .navbar-nav .nav-link {
        color: #ffffff !important; /* Белый текст */
        font-weight: 700; /* Жирный шрифт */
        text-transform: uppercase;
        padding: 10px 20px;
        border-radius: 6px;
        background: rgba(74, 28, 42, 0.2);
        transition: all 0.3s ease;
    }

        .navbar .navbar-nav .nav-link:hover {
            background: rgba(212, 127, 148, 0.3) !important; /* Светло-бордовый при наведении */
            color: #d47f94 !important;
            transform: translateY(-2px);
        }

.navbar-brand img.logo {
    max-height: 100px;
    margin-right: 10px;
    vertical-align: middle;
}

/* Навигационные элементы */
.nav-item {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.nav-link {
    display: inline-flex !important;
    align-items: center !important;
    height: 100% !important;
    padding: 0.5rem 1rem !important;
    border-radius: 6px !important;
    transition: background-color 0.3s ease, color 0.3s ease !important;
}

    .nav-link:hover {
        background: rgba(212, 127, 148, 0.3) !important;
        color: #d47f94 !important;
    }

    .nav-link.text-only {
        background: none !important;
        border: none !important;
        padding: 0 !important;
        color: #ffffff !important; /* Белый текст */
        text-decoration: none !important;
        cursor: default !important;
    }

        .nav-link.text-only.separator {
            margin: 0 10px !important;
        }

    .nav-link i, .nav-link span {
        font-size: 1.5rem;
        margin-right: 0.75rem;
        vertical-align: middle;
    }

.nav-item a.logout {
    color: #ffffff !important; /* Белый текст */
}

    .nav-item a.logout:hover {
        background: rgba(212, 127, 148, 0.3) !important;
        color: #d47f94 !important;
    }

/* Основной контент */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 0px;
    margin-bottom: 120px;
}

.container {
    max-width: 1200px;
    padding: 24px;
    background: rgba(26, 60, 52, 0.1) !important; /* Полупрозрачный тёмно-зелёный фон */
    border-radius: 12px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.content {
    padding-top: 1.1rem;
}

.page-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #ffffff !important; /* Белый текст */
    background: linear-gradient(90deg, #1a3c34, #4a1c2a) !important; /* Тёмно-зелёный и бордовый градиент */
    padding: 12px;
    border-radius: 12px;
}

.breadcrumb-item.active {
    color: #ffffff !important; /* Белый цвет для активного элемента */
}
/* Затемнение градиентного фона и панели */
.gradient-background {
    background: linear-gradient(90deg, #1a3c34, #4a1c2a) !important; /* Тёмно-зелёный и бордовый градиент */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.navbar {
    background: linear-gradient(90deg, #1a3c34, #4a1c2a) !important; /* Тёмно-зелёный и бордовый градиент */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Жирный шрифт для nav-link */
.nav-link {
    display: inline-flex !important;
    align-items: center !important;
    height: 100% !important;
    padding: 0.5rem 1rem !important;
    border-radius: 6px !important;
    transition: background-color 0.3s ease, color 0.3s ease !important;
    font-weight: 700 !important; /* Жирный шрифт */
}

/* Контейнеры */
.text-container {
    background: rgba(26, 60, 52, 0.1) !important;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.main-section-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.section-container {
    background: rgba(26, 60, 52, 0.1) !important;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Изображения */
.img-block {
    max-width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    margin: 0 auto;
    border-radius: 6px;
    border: 2px solid #d47f94 !important; /* Светло-бордовый бордер */
    transition: transform 0.3s ease;
}

    .img-block:hover {
        border-color: #4a1c2a !important; /* Бордовый */
        transform: scale(1.03);
    }

.rounded-image {
    max-width: 100px;
    border-radius: 8px;
}

/* Поля ввода */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"].form-input,
textarea.form-input,
.form-input {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid rgba(74, 28, 42, 0.4) !important; /* Бордовый бордер */
    background: rgba(26, 60, 52, 0.2) !important; /* Полупрозрачный тёмно-зелёный фон */
    border-radius: 6px !important;
    font-size: 1rem;
    color: #ffffff !important; /* Белый текст */
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

    input[type="text"]:focus,
    input[type="email"]:focus,
    input[type="password"]:focus,
    input[type="file"].form-input:focus,
    textarea.form-input:focus,
    .form-input:focus {
        background: rgba(26, 60, 52, 0.3) !important;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        border-color: #d47f94 !important; /* Светло-бордовый бордер */
    }

    .form-input option {
        background: rgba(74, 28, 42, 0.95) !important;
        color: #ffffff !important; /* Белый текст */
    }

textarea.form-input {
    resize: vertical;
}

.form-input::-ms-expand {
    display: none;
}

/* Чекбоксы */
.darker-border-checkbox.form-check-input,
.form-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #d47f94 !important; /* Светло-бордовый акцент */
    cursor: pointer;
    border-color: #999999;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Большие поля ввода */
.form-input-lg {
    font-size: 1.2rem;
    padding: 20px;
    height: auto;
}

textarea.form-input-lg {
    resize: vertical;
    font-size: 1.2rem;
}

/* Кнопки */
button, .btn {
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff !important;
    background: #1a3c34 !important; /* Тёмно-зелёный фон */
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

    button:hover, .btn:hover {
        transform: translateY(-3px);
        background: #4a1c2a !important; /* Бордовый */
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
    }

    button:active, .btn:active {
        transform: translateY(0);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    }

.btn-primary {
    background: #1a3c34 !important;
    color: #ffffff !important;
}

    .btn-primary:hover {
        background: #4a1c2a !important;
        transform: scale(1.05);
    }

.btn-secondary {
    background: rgba(26, 60, 52, 0.2) !important;
    color: #ffffff !important; /* Белый текст */
}

    .btn-secondary:hover {
        background: rgba(26, 60, 52, 0.3) !important;
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
    }

.btn-danger {
    background: #dc2626 !important; /* Темно-красный */
    color: #ffffff !important;
}

    .btn-danger:hover {
        background: #b91c1c !important;
        transform: translateY(-3px);
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
    }

.action-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
}

    .action-buttons button {
        padding: 8px 16px;
        border-radius: 6px;
    }

    .action-buttons .primary-button {
        background: #1a3c34 !important;
        color: #ffffff !important;
    }

        .action-buttons .primary-button:hover {
            background: #4a1c2a !important;
        }

    .action-buttons .secondary-button {
        background: rgba(26, 60, 52, 0.2) !important;
        color: #ffffff !important; /* Белый текст */
    }

        .action-buttons .secondary-button:hover {
            background: rgba(26, 60, 52, 0.3) !important;
        }

/* Ссылки действий */
.action-links {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.action-link {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff !important;
    text-decoration: none;
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.primary-link {
    background: #1a3c34 !important;
}

    .primary-link:hover {
        transform: translateY(-3px);
        background: #4a1c2a !important;
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
    }

.secondary-link {
    background: rgba(26, 60, 52, 0.2) !important;
    color: #ffffff !important; /* Белый текст */
}

    .secondary-link:hover {
        transform: translateY(-3px);
        background: rgba(26, 60, 52, 0.3) !important;
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
    }

.danger-link {
    background: #dc2626 !important;
    color: #ffffff !important;
}

    .danger-link:hover {
        transform: translateY(-3px);
        background: #b91c1c !important;
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
    }

/* Иконки действий */
.action-icons {
    display: flex;
    gap: 8px;
}

.action-icon {
    color: #ffffff !important; /* Белый текст */
    text-decoration: none;
    transition: color 0.3s ease;
}

    .action-icon:hover {
        color: #d47f94 !important; /* Светло-бордовый */
    }

.view-icon {
    color: #d47f94 !important; /* Светло-бордовый */
}

    .view-icon:hover {
        color: #4a1c2a !important; /* Бордовый */
    }

.edit-icon {
    color: #1a3c34 !important; /* Тёмно-зелёный */
}

    .edit-icon:hover {
        color: #d47f94 !important; /* Светло-бордовый */
    }

.delete-icon {
    color: #dc2626 !important; /* Темно-красный */
}

    .delete-icon:hover {
        color: #d47f94 !important; /* Светло-бордовый */
    }

/* Таблицы */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    font-size: 1rem;
    background: rgba(26, 60, 52, 0.1) !important;
    border-radius: 8px;
    overflow: hidden;
    color: #ffffff !important; /* Белый текст */
}

    .table th, .table td {
        padding: 10px 12px;
        text-align: center;
        border-bottom: 1px solid rgba(74, 28, 42, 0.3) !important;
        border-right: 1px solid rgba(74, 28, 42, 0.3) !important;
    }

    .table th {
        background: rgba(26, 60, 52, 0.3) !important;
        font-weight: 600;
    }

        .table th:last-child, .table td:last-child {
            border-right: none;
        }

    .table tbody tr:last-child td {
        border-bottom: none;
    }

    .table tbody tr:hover {
        background: rgba(74, 28, 42, 0.2) !important;
    }

.table-body {
    background: rgba(26, 60, 52, 0.1) !important;
}

.custom-grid thead th {
    background: rgba(26, 60, 52, 0.3) !important;
    color: #ffffff !important; /* Белый текст */
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
}

.custom-grid td, .custom-grid th {
    text-align: center;
    vertical-align: middle;
}

/* Статусы */
.status {
    display: inline-block;
    padding: 3px 6px;
    border-radius: 4px;
    font-weight: 600;
    color: #ffffff !important;
    font-size: 0.9em;
}

    .status.available {
        background: #1a3c34 !important; /* Тёмно-зелёный */
    }

    .status.unavailable {
        background: #dc2626 !important; /* Темно-красный */
    }

    .status.processing {
        background-color: #d47f94 !important; /* Светло-бордовый */
        color: #ffffff !important; /* Белый текст */
    }

    .status.shipped {
        background-color: #4a1c2a !important; /* Бордовый */
        color: #ffffff !important;
    }

    .status.delivered {
        background-color: #1a3c34 !important; /* Тёмно-зелёный */
        color: #ffffff !important;
    }

    .status.unknown {
        background-color: #999999 !important; /* Серый */
        color: #ffffff !important;
    }

/* Карточки */
.employees-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.employee-card {
    margin-bottom: 20px;
    text-align: center;
}

    .employee-card .img-block {
        width: 150px;
        height: 150px;
        border-radius: 50%;
        border: 3px solid #d47f94 !important; /* Светло-бордовый бордер */
        margin-bottom: 15px;
    }

        .employee-card .img-block:hover {
            border-color: #4a1c2a !important; /* Бордовый */
        }

.card {
    background: rgba(26, 60, 52, 0.1) !important;
    color: #ffffff !important; /* Белый текст */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

    .card:hover {
        transform: scale(1.03);
    }

.card-title, .card-text {
    color: #ffffff !important; /* Белый текст */
}

/* Формы */
form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 100%;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-field {
    display: flex;
    align-items: center;
    gap: 12px;
}

    .input-field label {
        width: 150px;
        text-align: right;
        color: #ffffff !important; /* Белый текст */
    }

/* Модальные окна */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: rgba(26, 60, 52, 0.1) !important;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
    color: #ffffff !important; /* Белый текст */
}

    .modal-content h4 {
        margin-top: 0;
        font-size: 1.2rem;
        font-weight: 600;
    }

.modal-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 20px;
}

/* Пагинация */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.custom-pagination {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pagination-item {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff !important;
    background: #1a3c34 !important; /* Тёмно-зелёный фон */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease;
}

    .pagination-item:hover:not(.disabled) {
        transform: translateY(-3px);
        background: #4a1c2a !important; /* Бордовый */
    }

    .pagination-item.active {
        background: #d47f94 !important; /* Светло-бордовый */
        box-shadow: 0 4px 10px rgba(212, 127, 148, 0.4);
    }

    .pagination-item.disabled {
        background: #999999 !important;
        cursor: not-allowed;
        box-shadow: none;
    }

/* Футер */
.footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: linear-gradient(90deg, #1a3c34, #4a1c2a) !important; /* Тёмно-зелёный и бордовый градиент */
    padding: 10px 0;
    border-top: 1px solid rgba(212, 127, 148, 0.4);
    z-index: 1000;
    text-align: center;
    color: #ffffff !important; /* Белый текст */
}

    .footer p, .footer a, .footer span {
        color: #ffffff !important; /* Белый текст */
    }

/* Логотип */
.logo {
    max-height: 100px;
    margin-right: 10px;
}

/* Ошибки Blazor */
.blazor-error-boundary {
    background: #dc2626 !important; /* Темно-красный */
    padding: 1rem;
    color: #ffffff !important;
    border-radius: 4px;
}

    .blazor-error-boundary::after {
        content: "Произошла ошибка.";
    }

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        padding: 95%;
    }

    .input-field {
        flex-direction: column;
        align-items: flex-start;
    }

        .input-field label {
            width: auto;
            text-align: left;
        }

    .page-title {
        font-size: 1.5rem;
        padding: 8px;
    }

    .employee-card .img-block {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 640px) {
    .navbar-brand {
        font-size: 1.2rem;
    }

    .logo {
        max-height: 60px;
    }

    .rounded-image {
        max-width: 100%;
    }
}
