/* Минимальные стили без внешних зависимостей — чтобы ничего не ломалось,
   если CDN вдруг недоступен на хостинге. */

* { box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    margin: 0;
    background: #f9fafb;
    color: #1f2937;
}
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 760px; margin: 0 auto; padding: 24px 16px; }
.container-wide { max-width: 1000px; margin: 0 auto; padding: 24px 16px; }

h1 { font-size: 28px; margin: 0 0 8px; }
h2 { font-size: 20px; margin: 0 0 12px; }

.muted { color: #6b7280; }
.center { text-align: center; }

/* Кнопки */
.btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
}
.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; text-decoration: none; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-success { background: #16a34a; color: #fff; }
.btn-muted { background: #e5e7eb; color: #374151; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Форма */
.form-field { width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; margin-bottom: 10px; }
label.inline { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; margin-right: 16px; }

/* Таблица */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid #e5e7eb; font-size: 14px; vertical-align: top; }
th { color: #6b7280; font-weight: 500; font-size: 13px; }

/* Тег / бейдж */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-gray { background: #f3f4f6; color: #374151; }
.badge-green { background: #dcfce7; color: #15803d; }
.badge-yellow { background: #fef9c3; color: #854d0e; }
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-red { background: #fee2e2; color: #b91c1c; }
.badge-outline { background: #fff; border: 1px solid #d1d5db; color: #374151; }

/* Навигация админки */
.admin-nav { display: flex; gap: 20px; padding: 14px 24px; background: #fff; border-bottom: 1px solid #e5e7eb; font-weight: 600; font-size: 14px; }
.admin-nav a { color: #374151; }
.admin-nav a.active { color: #2563eb; }

/* Карточка блюда на сайте */
.menu-item { display: flex; gap: 14px; margin-bottom: 20px; align-items: flex-start; }
.menu-item img, .menu-item .photo-placeholder { width: 90px; height: 90px; border-radius: 10px; object-fit: cover; background: #e5e7eb; flex-shrink: 0; }
.menu-item-body { flex: 1; }
.menu-item-top { display: flex; justify-content: space-between; gap: 8px; }
.menu-item-name { font-weight: 600; }
.menu-item-price { font-weight: 700; white-space: nowrap; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 30px; }
.filter-tag { padding: 7px 14px; border-radius: 999px; border: 1px solid #d1d5db; background: #fff; font-size: 13px; cursor: pointer; }
.filter-tag.active { background: #16a34a; color: #fff; border-color: #16a34a; }

.allergen-warning { font-size: 12px; color: #c2410c; margin-top: 4px; }

/* Модальное окно (простое, без JS-фреймворков) */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; overflow-y: auto; }
.modal-box { background: #fff; border-radius: 14px; padding: 24px; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; }

.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.flash-success { background: #dcfce7; color: #15803d; }
.flash-error { background: #fee2e2; color: #b91c1c; }

/* Экран кухни (планшет) */
.kitchen-wrap { height: 100vh; background: #111827; color: #fff; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 16px; overflow: hidden; }
.kitchen-col { display: flex; flex-direction: column; min-height: 0; }
.kitchen-col h2 { display: flex; justify-content: space-between; align-items: center; font-size: 22px; }
.kitchen-count { background: rgba(255,255,255,0.1); border-radius: 999px; padding: 2px 12px; font-size: 15px; }
.kitchen-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding-right: 4px; }
.order-card { background: #1f2937; border-radius: 14px; padding: 16px; }
.order-card.late { background: rgba(127,29,29,0.6); border: 1px solid #ef4444; }
.order-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.order-card-number { font-size: 20px; font-weight: 700; }
.order-card-time { font-size: 13px; color: #9ca3af; }
.order-card.late .order-card-time { color: #fca5a5; font-weight: 600; }
.order-card ul { list-style: none; padding: 0; margin: 0 0 12px; font-size: 17px; }
.order-card li { display: flex; justify-content: space-between; padding: 2px 0; }
.order-card .comment { font-size: 13px; color: #fde047; margin-bottom: 10px; }
.order-advance-btn { width: 100%; background: #2563eb; color: #fff; border: none; border-radius: 10px; padding: 12px; font-size: 16px; font-weight: 600; cursor: pointer; }
.order-advance-btn:active { background: #1d4ed8; }
.empty-col { color: #6b7280; text-align: center; padding: 30px 0; }

/* Простой столбчатый график без библиотек */
.bar-chart { display: flex; align-items: flex-end; gap: 3px; height: 160px; border-bottom: 1px solid #e5e7eb; }
.bar-chart .bar { flex: 1; background: #3b82f6; border-radius: 3px 3px 0 0; min-height: 2px; position: relative; }
.bar-chart .bar:hover { background: #2563eb; }

@media (max-width: 800px) {
    .kitchen-wrap { grid-template-columns: 1fr; height: auto; }
}
