nav a {
  margin-left: 20px;
  color: var(--black);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background .15s;
}
nav a:hover {
  background: var(--yellow);
}

:root {
  --yellow:       #ffd500;
  --yellow-hover: #ffdf33;
  --yellow-soft:  #fff8cc;
  --black:        #1a1a1a;
  --black-hover:  #333333;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: #1a1a1a;
  background: #f4f4f4;
  line-height: 1.5;
}

.container { max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* Шапка */
.topbar { background: #fff; border-bottom: 3px solid var(--yellow); }
.topbar .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo {
  display: inline-block;
  background: var(--yellow);
  color: var(--black);
  font-size: 20px; font-weight: 800; letter-spacing: -.5px;
  padding: 6px 12px; border-radius: 6px;
}
.logo span { margin-left: 2px; }

/* Заголовки */
h1 { font-size: 28px; margin: 28px 0 8px; line-height: 1.2; }
h2 { font-size: 22px; margin: 32px 0 12px; }
.lead { color: #555; margin: 0 0 24px; font-size: 17px; }

/* Карточки */
.card {
  background: #fff; border-radius: 12px; padding: 24px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  margin-bottom: 20px;
}
.card.center { text-align: center; }

/* Формы */
label { display: block; margin-bottom: 16px; font-weight: 600; font-size: 14px; }
input, select, textarea {
  display: block; width: 100%; margin-top: 6px;
  padding: 12px 14px; border: 1px solid #ccc; border-radius: 8px;
  font-size: 16px; font-weight: 400; font-family: inherit;
  background: #fff;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--black);
  outline: none;
  box-shadow: 0 0 0 3px var(--yellow);
}

.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { width: auto; margin: 3px 0 0; }
.check a {
  color: var(--black);
  text-decoration: underline;
  text-decoration-color: var(--yellow);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.check a:hover { background: var(--yellow); }

.row { display: flex; gap: 8px; align-items: center; }
.row-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.row-form input, .row-form label { margin-bottom: 0; }
.row-form label { flex: 1; }

/* Итого */
.total { font-size: 20px; margin: 16px 0; }
.total b { color: var(--black); }

/* Кнопки — чёрные */
.btn {
  display: inline-block; width: 100%; padding: 16px;
  background: var(--black); color: #fff;
  border: 2px solid var(--black); border-radius: 10px;
  font-size: 18px; font-weight: 700; cursor: pointer;
  text-align: center; text-decoration: none; transition: background .15s;
}
.btn:hover { background: var(--black-hover); border-color: var(--black-hover); }
.btn:disabled {
  background: #d9d9d9; border-color: #d9d9d9;
  color: #777; cursor: not-allowed;
}
.btn-small { width: auto; padding: 12px 24px; font-size: 15px; }

/* Предупреждение о StopTime — жёлтый */
.warning {
  background: var(--yellow-soft);
  border: 1px solid var(--yellow);
  color: var(--black);
  padding: 12px 16px; border-radius: 8px; margin-bottom: 12px;
  font-weight: 600; text-align: center;
}

/* Flash-сообщения */
.flash {
  padding: 12px 16px; border-radius: 8px; margin-top: 16px;
  font-weight: 600; border-left: 4px solid var(--yellow);
}
.flash-ok    { background: #f2f2f2; color: var(--black); }
.flash-error { background: var(--yellow-soft); color: var(--black); }

/* Таблицы */
table {
  width: 100%; border-collapse: collapse; background: #fff;
  border-radius: 12px; overflow: hidden;
}
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #eee; }
th { background: var(--black); color: #fff; font-size: 14px; }
tfoot th { background: #f4f4f4; color: var(--black); }
details summary { cursor: pointer; color: var(--black); font-weight: 600; }
details summary:hover { background: var(--yellow); }
.details-list { margin: 8px 0 0; padding-left: 20px; font-size: 14px; }
.details-list li { margin-bottom: 4px; }

/* Модальное окно согласия */
dialog {
  border: none; border-radius: 12px; padding: 24px;
  max-width: 560px; width: 90%;
  box-shadow: 0 10px 40px rgba(0,0,0,.25);
}
dialog::backdrop { background: rgba(0,0,0,.5); }
.consent-text { white-space: pre-line; font-size: 15px; color: #333; }

/* Степпер количества */
.qty-stepper {
  display: flex;
  align-items: stretch;
  margin-top: 6px;
}

.qty-stepper input {
  margin: 0;
  flex: 1;
  border-radius: 0;
  border-left: none;
  border-right: none;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  -moz-appearance: textfield;
}
.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty-btn {
  flex: 0 0 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--black);
  color: #fff;
  border: 2px solid var(--black);
  font-size: 24px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
  padding: 0;
  user-select: none;
}
.qty-btn:hover { background: var(--black-hover); border-color: var(--black-hover); }
.qty-btn:disabled {
  background: #d9d9d9; border-color: #d9d9d9; color: #999; cursor: not-allowed;
}

.qty-btn#qtyMinus { border-radius: 8px 0 0 8px; }
.qty-btn#qtyPlus  { border-radius: 0 8px 8px 0; }

/* Инлайн-формы в таблице объектов */
.inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
}
.inline-form input[type="text"] {
  margin: 0;
  padding: 8px 10px;
  font-size: 14px;
}
.inline-form .btn-small {
  padding: 8px 14px;
  font-size: 14px;
  white-space: nowrap;
}

/* Скрытые объекты — приглушённый вид */
tr.row-inactive td {
  opacity: .55;
}
tr.row-inactive .inline-form input,
tr.row-inactive .inline-form .btn-small {
  opacity: 1;
}

/* Бейджи */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.badge-on  { background: var(--yellow); color: var(--black); }
.badge-off { background: #e5e5e5; color: #666; }

/* Логин-страница */
.login-card {
  max-width: 420px;
  margin: 40px auto;
}

/* Кто вошёл и кнопка «Выйти» в шапке */
.nav-user {
  margin-left: 20px;
  font-weight: 600;
  font-size: 15px;
}
.nav-logout {
  display: inline;
  margin-left: 12px;
}
.link-btn {
  background: none;
  border: none;
  padding: 4px 8px;
  font: inherit;
  font-weight: 600;
  color: var(--black);
  cursor: pointer;
  border-radius: 6px;
}
.link-btn:hover {
  background: var(--yellow);
}

/* Блок меню на странице заказа */
.menu-card { border-left: 6px solid var(--yellow); }
.menu-card h2 { margin: 0 0 4px; font-size: 20px; }
.menu-day {
  color: #777;
  font-size: 14px;
  margin: 0 0 12px;
}
.menu-list {
  margin: 0;
  padding-left: 20px;
  font-size: 16px;
  line-height: 1.7;
}
.menu-list li::marker { color: var(--yellow); }


/* Таблица меню на клиентской странице */
.menu-table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
  border-radius: 0;
  overflow: visible;
  font-size: 15px;
}
.menu-table th,
.menu-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid #eee;
}
.menu-table thead th {
  background: transparent;
  color: #777;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .3px;
  border-bottom: 2px solid var(--yellow);
}
.menu-table tbody tr:last-child td {
  border-bottom: none;
}
.menu-table .col-num {
  width: 48px;
  text-align: center;
  color: #888;
}
.menu-table .col-weight {
  width: 110px;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Футер сайта */
.site-footer {
  margin-top: 48px;
  padding: 20px 0;
  background: var(--black);
  color: #ddd;
  font-size: 14px;
  border-top: 4px solid var(--yellow);
}
.site-footer .footer-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 24px;
  text-align: center;
}
.site-footer b { color: #fff; }
.site-footer a {
  color: var(--yellow);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}
.site-footer a:hover {
  text-decoration: underline;
}

/* Подсказка под полем */
.hint {
  display: block;
  margin-top: 4px;
  color: #777;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
}

/* Примечание в детализации для кассира */
.note-line {
  margin-top: 4px;
  padding: 6px 10px;
  background: var(--yellow-soft);
  border-left: 3px solid var(--yellow);
  border-radius: 4px;
  font-size: 13px;
  color: var(--black);
  white-space: pre-wrap;
  word-break: break-word;
}

/* Таблица сводки кассира */
.cashier-table {
  table-layout: fixed;
}
.cashier-table .col-object  { width: auto; }
.cashier-table .col-total   { width: 110px; }
.cashier-table .col-details { width: 45%; }

.cashier-table .cell-total {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* На узких экранах — обычная авторазметка, фиксированные ширины мешают */
@media (max-width: 640px) {
  .cashier-table { table-layout: auto; }
  .cashier-table .col-total   { width: auto; }
  .cashier-table .col-details { width: auto; }
}

/* Сводка кассира: карточка на объект */
.cashier-object {
  padding: 0;
  overflow: hidden;
}

.obj-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 20px;
  background: var(--black);
  color: #fff;
}
.obj-name  { font-size: 16px; }
.obj-name b { color: var(--yellow); }
.obj-total { font-size: 15px; white-space: nowrap; }
.obj-total b {
  display: inline-block;
  min-width: 32px;
  padding: 2px 10px;
  margin-left: 4px;
  background: var(--yellow);
  color: var(--black);
  border-radius: 999px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Таблица заказов внутри карточки объекта */
.orders-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 0;
  table-layout: fixed;
}
.orders-table th,
.orders-table td {
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid #eee;
  font-size: 15px;
}
.orders-table thead th {
  background: #fafafa;
  color: #555;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .3px;
  border-bottom: 2px solid var(--yellow);
}
.orders-table tbody tr:last-child td { border-bottom: none; }

.orders-table .col-num   { width: 48px;  text-align: center; color: #888; }
.orders-table .col-time  { width: 130px; text-align: right;
                           white-space: nowrap; font-variant-numeric: tabular-nums; }
.orders-table .col-qty   { width: 120px; text-align: right;
                           font-variant-numeric: tabular-nums; font-weight: 700; }

/* Строка с примечанием */
.orders-table .note-row td { padding-top: 0; border-bottom: 1px solid #eee; }
.orders-table .note-cell {
  color: #555;
  font-size: 14px;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--yellow-soft);
  border-left: 4px solid var(--yellow);
}

/* Итог за день */
.cashier-grand-total {
  font-size: 16px;
  text-align: right;
}
.cashier-grand-total b {
  display: inline-block;
  min-width: 44px;
  padding: 2px 12px;
  background: var(--yellow);
  color: var(--black);
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
  .orders-table { table-layout: auto; }
  .orders-table .col-time, .orders-table .col-qty { width: auto; }
  .obj-header { font-size: 14px; }
}
.cashier-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}
.cashier-list .card {
  margin-bottom: 0;   /* гасим стандартный отступ, работает gap */
}

/* Акцентное поле «Объект» в форме заказа */
.field-highlight {
  position: relative;
  padding: 16px 16px 14px;
  margin: 0 -16px 20px;         /* «выдвигаем» блок за границы карточки,
                                   чтобы жёлтая подложка дышала */
  border-radius: 12px;
  background: var(--yellow-soft);
  border: 2px solid var(--yellow);
}
.field-highlight .field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 16px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 8px;
}
.field-highlight .field-badge {
  display: inline-block;
  padding: 3px 10px;
  background: var(--black);
  color: var(--yellow);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2px;
  text-transform: uppercase;
  white-space: nowrap;
}
.field-highlight select {
  margin-top: 0;
  font-size: 17px;
  font-weight: 700;
  padding: 14px 16px;
  border: 2px solid var(--black);
  background: #fff;
}
.field-highlight select:focus {
  border-color: var(--black);
  box-shadow: 0 0 0 3px var(--yellow);
}