/* Цветовая палитра для food-tech/ресторанного проекта */
:root {
    --primary: #217dbb;
    --primary-hover: #2986c7;
    --success: #27ae60;
    --success-hover: #34b46e;
    --warning: #f9ca24;
    --warning-hover: #ffe066;
    --danger: #e74c3c;
    --danger-hover: #f16a5d;
    --bg: #f8fafc;
    --card-bg: #fff;
    --text: #222;
    --text-muted: #7b8a99;
    --border: #e9ecef;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg) 0%, #c3cfe2 100%);
    color: var(--text);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.01em;
}

/* Дополнительные стили для h4 */
h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

/* Дополнительные стили для h5 */
h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

/* Упрощенные кнопки */
.btn, .btn-lg, .btn-success, .btn-warning, .btn-danger, .btn-outline-warning, .btn-outline-danger, .btn-outline-success, .btn-primary, .btn-secondary, .btn-outline-secondary {
    border-radius: 12px !important;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.6em 1.2em;
    box-shadow: 0 2px 8px rgba(52,152,219,0.10);
    transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.12s;
    border: none;
    outline: none;
}

.btn-warning, .btn-warning:active, .btn-warning:focus {
    background: linear-gradient(45deg, #f9ca24, #e67e22) !important;
    color: #fff !important;
    border: none !important;
}

.btn-warning:hover, .btn-warning:active:hover, .btn-warning:focus:hover {
    background: linear-gradient(45deg, #e67e22, #b9770e) !important;
    color: #fff !important;
    box-shadow: 0 4px 18px rgba(249,202,36,0.13);
    transform: translateY(-2px) scale(1.03);
}

.btn-primary, .btn-primary:active, .btn-primary:focus,
.btn-outline-primary, .btn-outline-primary:active, .btn-outline-primary:focus {
    background: linear-gradient(45deg, #217dbb, #3498db) !important;
    color: #fff !important;
    border: none !important;
}

.btn-primary:hover, .btn-primary:active:hover, .btn-primary:focus:hover,
.btn-outline-primary:hover, .btn-outline-primary:active:hover, .btn-outline-primary:focus:hover {
    background: linear-gradient(45deg, #145a86, #217dbb) !important;
    color: #fff !important;
    box-shadow: 0 4px 18px rgba(33,125,187,0.13);
    transform: translateY(-2px) scale(1.03);
}

.btn-success, .btn-success:active, .btn-success:focus {
    background: linear-gradient(45deg, #27ae60, #229954) !important;
    color: #fff !important;
    border: none !important;
}

.btn-success:hover, .btn-success:active:hover, .btn-success:focus:hover {
    background: linear-gradient(45deg, #229954, #1e7e4a) !important;
    color: #fff !important;
    box-shadow: 0 4px 18px rgba(39,174,96,0.13);
    transform: translateY(-2px) scale(1.03);
}

.btn-danger, .btn-outline-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover, .btn-outline-danger:hover {
    background: var(--danger-hover);
    color: #fff;
    transform: translateY(-2px) scale(1.03);
}

/* Упрощенные карточки */
.card, .product-card, .category-card, .restaurant-card, .section-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 1rem;
}

.card:hover, .product-card:hover, .category-card:hover, .restaurant-card:hover, .section-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* Упрощенные формы */
input, textarea, select {
    border-radius: 8px;
    border: 1px solid var(--border);
    padding: 0.75rem;
    font-size: 1rem;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(33, 125, 187, 0.25);
    outline: none;
}

/* Упрощенные алерты */
.alert {
    border-radius: 12px;
    border: none;
    padding: 1rem;
    margin-bottom: 1rem;
}

.alert-success {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.alert-danger {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.alert-info {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

/* Упрощенные изображения */
.product-image, .category-image {
    width: 100%;
    height: 160px;
    background: #e9ecef;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #6c757d;
    border: 2px dashed #dee2e6;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

/* Упрощенные заголовки */
.product-title, .category-title, .restaurant-title, .section-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.3;
}

/* Упрощенная навигация */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: #2c3e50 !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: #495057 !important;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 0.25rem;
}

.navbar-nav .nav-link:hover {
    color: #3498db !important;
    background: rgba(52, 152, 219, 0.1);
    transform: translateY(-1px);
}

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

/* Упрощенные списки */
.categories-list, .products-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.products-grid, .categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.product-card, .category-card, .section-card, .restaurant-card {
    flex: 1 1 250px;
    min-width: 220px;
    max-width: 320px;
    min-height: 200px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

/* Упрощенные заголовки страниц */
.page-header-unified {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.page-header-unified h1 {
    margin: 0;
    color: #2c3e50;
    font-weight: 600;
}

.page-header-unified .management-buttons {
    display: flex;
    gap: 0.5rem;
}

/* Упрощенные кнопки назад */
.back-button-container {
    display: flex;
    justify-content: flex-start;
    margin-top: 1rem;
    padding: 0.5rem 0;
}

.btn-back {
    background: linear-gradient(45deg, #6c757d, #5a6268);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-back:hover {
    background: linear-gradient(45deg, #5a6268, #495057);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    text-decoration: none;
}

.btn-back:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

/* Упрощенные пустые состояния */
.empty-state {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    margin: 1rem 0;
    padding: 2rem;
    text-align: center;
}

.empty-state h3 {
    color: #6c757d;
    font-weight: 500;
}

.empty-state p {
    color: #868e96;
    font-size: 1.1rem;
}

.empty-state h4, .empty-state h5 {
    color: #868e96;
    font-size: 1.1rem;
    font-weight: normal;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

/* Упрощенная страница продукта */
.product-page-container {
    max-width: 100%;
}

.product-header {
    margin-bottom: 1.5rem;
}

.product-header h1 {
    color: #2c3e50;
    font-weight: 600;
    margin: 0;
}

.product-weight {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-block;
    margin-top: 0.5rem;
}

.product-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.product-image-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    height: fit-content;
}

.product-image-placeholder {
    width: 100%;
    height: 300px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #6c757d;
    border: 2px dashed #dee2e6;
    margin-bottom: 1rem;
}


.product-info-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-info-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.product-info-card h4 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.product-info-card p {
    color: #495057;
    line-height: 1.6;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.product-management {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    margin-bottom: 1rem;
    display: flex;
    gap: 0.5rem;
}

/* Упрощенный футер */
.footer {
    text-align: center;
    color: #7f8c8d;
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.footer a {
    color: #3498db;
    text-decoration: none;
}

.footer a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Мобильные стили */
@media (max-width: 768px) {
    .product-content-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .product-header h1 {
        font-size: 1.5rem;
    }
    
    .navbar {
        padding: 0.5rem 1rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .navbar-nav .nav-link {
        margin: 0.25rem 0;
    }
    
    .page-header-unified {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .page-header-unified .management-buttons {
        flex-wrap: wrap;
    }
    
    .categories-list, .products-grid {
        gap: 0.75rem;
        flex-direction: column;
    }
    
    .product-card, .category-card, .section-card, .restaurant-card {
        flex: none;
        min-width: auto;
        max-width: none;
        width: 100%;
    }
    
    .btn, .btn-lg {
        font-size: 0.9rem;
        padding: 0.5em 1em;
    }
}

/* Упрощенные хлебные крошки */
.breadcrumb {
    margin: 0;
    background: transparent;
}

.breadcrumb-item a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.breadcrumb-item a:hover {
    color: #2980b9;
    text-decoration: none;
}

.breadcrumb-item.active span {
    color: #495057;
    font-weight: 600;
}

.breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: "";
    display: none;
}

/* Упрощенные модальные окна */
.modal-content {
    border-radius: 12px;
    border: none;
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
}

/* Упрощенные таблицы */
.table {
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

/* Упрощенные анимации */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Упрощенные скроллбары */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Дополнительные стили для упрощенных шаблонов */
.section-content, .category-content, .product-content, .restaurant-content {
    cursor: pointer;
    padding: 0.5rem;
    margin: -0.5rem;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.section-content:hover, .category-content:hover, .product-content:hover, .restaurant-content:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

.section-title, .category-title, .product-title, .restaurant-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.3;
    flex-shrink: 0;
}

.section-description, .category-description, .product-description, .restaurant-description {
    margin: 0.5rem 0 0 0;
    font-size: 0.9rem;
    color: #6c757d;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.4;
    flex: 1;
}

.section-actions, .category-actions, .product-actions {
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-shrink: 0;
}

.section-actions .btn, .category-actions .btn, .product-actions .btn {
    position: relative;
    z-index: 20;
}

.section-actions *, .category-actions *, .product-actions * {
    pointer-events: auto;
}

.product-weight {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-block;
    margin-top: 0.5rem;
    flex-shrink: 0;
}

/* Улучшенные стили для мобильных устройств */
@media (max-width: 768px) {
    .section-content, .category-content, .product-content, .restaurant-content {
        padding: 0.75rem;
        margin: -0.75rem;
    }
    
    .section-title, .category-title, .product-title, .restaurant-title {
        font-size: 1rem;
    }
    
    .section-description, .category-description, .product-description, .restaurant-description {
        font-size: 0.85rem;
    }
    
    .section-actions, .category-actions, .product-actions {
        margin-top: 0.5rem;
        padding-top: 0.5rem;
    }
    
    .product-weight {
        font-size: 0.8rem;
        padding: 0.2rem 0.6rem;
    }
    
    /* Дополнительные стили для мобильных карточек */
    .categories-list, .products-grid {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .product-card, .category-card, .section-card, .restaurant-card {
        width: 100%;
        flex: none;
        min-width: auto;
        max-width: none;
        min-height: auto;
        margin-bottom: 0;
    }
    
    /* Улучшенные отступы для мобильных устройств */
    .main-content {
        padding: 1rem;
        margin: 0.5rem;
    }
    
    .page-header-unified {
        padding: 0.75rem;
    }
    
    .empty-state {
        padding: 1.5rem;
        margin: 0.75rem 0;
    }
    
    /* Мобильные стили для заголовков */
    h4 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    h5 {
        font-size: 1rem;
        margin-bottom: 0.4rem;
    }
}

/* Стили для главной страницы */
.hero-section {
    text-align: center;
    margin-bottom: 2rem;
}

.hero-section h1 {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-section .lead {
    color: #6c757d;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.action-buttons-section {
    text-align: center;
    margin-bottom: 2rem;
}

.action-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.features-section {
    margin-bottom: 2rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h5 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 1rem;
}

.feature-card p {
    color: #6c757d;
    line-height: 1.6;
}

.cta-section {
    text-align: center;
}

.cta-card {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(52, 152, 219, 0.3);
}

.cta-card h3 {
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-card p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

/* Мобильные стили для главной страницы */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 1.8rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .action-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .feature-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .feature-icon {
        font-size: 2.5rem;
    }
    
    .cta-card {
        padding: 1.5rem;
    }
    
    .cta-card h3 {
        font-size: 1.5rem;
    }
    
    .cta-card p {
        font-size: 1rem;
    }
    
    /* Дополнительные стили для мобильной главной страницы */
    .features-section .row {
        margin: 0;
    }
    
    .features-section .col-md-4 {
        padding: 0;
        margin-bottom: 1rem;
    }
    
    .features-section .col-md-4:last-child {
        margin-bottom: 0;
    }
    
    /* Стили для списков на мобильных устройствах */
    .list-group-item {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .list-group-item small {
        font-size: 0.8rem;
    }
    
    /* Стили для карточек на мобильных устройствах */
    .card-body {
        padding: 1rem;
    }
    
    .card-title {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    /* Стили для строк на мобильных устройствах */
    .row {
        margin: 0;
    }
    
    .col-md-6 {
        padding: 0;
        margin-bottom: 1rem;
    }
    
    .col-md-6:last-child {
        margin-bottom: 0;
    }
    
    /* Стили для кнопок действий в empty-state */
    .empty-state .action-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .empty-state .action-buttons .btn {
        width: 100%;
        max-width: 250px;
    }
    
    /* Стили для кнопки "Назад" на мобильных устройствах */
    .btn-back {
        width: 100%;
        max-width: 200px;
        justify-content: center;
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
} 