/* Служебные экраны: бармен и админка */
.panel { background: var(--night-2); min-height: 100vh; }

.panel-head {
  position: sticky; top: 0; z-index: 20;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px;
  padding: 12px var(--gutter);
  background: #0d0a07; border-bottom: 1px solid rgba(194, 154, 91, .25);
}
.panel-head__title { margin-right: auto; line-height: 1.1; }
.panel-head__brand { font: 400 11px/1 var(--f-display); letter-spacing: .2em; text-transform: uppercase; color: var(--text-dim); }
.panel-head h1 { margin: 2px 0 0; font: 500 24px/1 var(--f-display); letter-spacing: .06em; text-transform: uppercase; }
.panel-nav { display: flex; gap: 4px; }
.panel-nav a {
  padding: 8px 12px; border-radius: var(--radius); color: var(--text-dim); text-decoration: none;
  font: 400 13px/1 var(--f-display); letter-spacing: .12em; text-transform: uppercase;
}
.panel-nav a:hover { color: var(--text); }
.panel-nav a[aria-current="page"] { background: rgba(194, 154, 91, .16); color: var(--brass-2); }
.panel-head__tools { display: flex; align-items: center; gap: 14px; }
.panel-head__clock { font: 700 22px/1 var(--f-mono); color: var(--brass-2); }

.panel-note {
  margin: 14px var(--gutter) 0; padding: 10px 14px; max-width: 980px;
  border-left: 3px solid var(--brass); background: rgba(194, 154, 91, .07);
  color: var(--text-dim); font-size: 14px; line-height: 1.45;
}

/* ---------- Доска бармена ---------- */
.board { display: grid; gap: 18px; padding: 18px var(--gutter) 40px; align-items: start; }
@media (min-width: 900px) { .board { grid-template-columns: 1fr 1fr .8fr; } }
.board__title { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font: 500 18px/1 var(--f-display); letter-spacing: .14em; text-transform: uppercase; }
.board__count { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 14px; background: var(--brass); color: var(--night); font: 700 15px/1 var(--f-mono); }
.board__list { display: grid; gap: 12px; }
.board__empty { padding: 26px 12px; border: 1px dashed rgba(240, 230, 207, .18); border-radius: var(--radius); color: var(--text-dim); text-align: center; font-size: 14px; }

.ticket { padding: 14px 16px 14px; border-radius: var(--radius); box-shadow: 0 8px 18px rgba(0, 0, 0, .35); }
.ticket.is-fresh { animation: fresh 1.2s ease-out 2; }
@keyframes fresh { 30% { box-shadow: 0 0 0 5px var(--brass-2); } }
.board__col--done .ticket { opacity: .72; }
.ticket__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.ticket__num { font: 600 26px/1 var(--f-display); letter-spacing: .03em; }
.ticket__table { padding: 4px 8px; border-radius: 3px; background: var(--ink); color: var(--paper); font: 500 16px/1 var(--f-display); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.ticket__table--none { background: transparent; color: var(--ink-soft); border: 1px solid rgba(43, 33, 24, .35); }
.ticket__meta { margin: 6px 0 8px; font: 14px/1.3 var(--f-mono); color: var(--ink-soft); }
.ticket__meta.is-late { color: var(--red); font-weight: 700; }
.ticket__items { margin: 0; padding: 0; list-style: none; border-top: 1px dashed rgba(43, 33, 24, .3); }
.ticket__items label { display: grid; grid-template-columns: 24px 12px 1fr auto; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px dashed rgba(43, 33, 24, .3); font-size: 17px; cursor: pointer; }
.ticket__items input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
.ticket__items input:checked ~ .ticket__name { text-decoration: line-through; color: var(--ink-soft); }
.ticket__dot { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .3); }
.ticket__abv { font: 13px/1 var(--f-mono); color: var(--ink-soft); }
.ticket__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ticket__actions .btn--solid { flex: 1 1 auto; }
.ticket__tg { margin-top: 10px; font-size: 13px; color: var(--ink-soft); }
.ticket__tg summary { cursor: pointer; }
.ticket__tg pre { margin: 8px 0 0; padding: 10px; border-radius: var(--radius); background: #1f2c38; color: #e6edf3; font: 13px/1.45 var(--f-mono); white-space: pre-wrap; }

/* ---------- Админка ---------- */
.admin { padding: 18px var(--gutter) 60px; max-width: 1240px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 18px; border-bottom: 1px solid rgba(240, 230, 207, .12); }
.tabs button {
  flex: none; padding: 12px 16px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--text-dim);
  font: 400 14px/1 var(--f-display); letter-spacing: .12em; text-transform: uppercase;
}
.tabs button[aria-selected="true"] { color: var(--brass-2); border-bottom-color: var(--brass-2); }
.tabs button .board__count { height: 20px; min-width: 20px; font-size: 12px; margin-left: 6px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.toolbar__hint { color: var(--text-dim); font-size: 14px; margin-right: auto; }

.table-wrap { overflow-x: auto; border: 1px solid rgba(240, 230, 207, .1); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { position: sticky; top: 0; padding: 10px 12px; background: #15100c; text-align: left; font: 400 12px/1.2 var(--f-display); letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); white-space: nowrap; }
.table td { padding: 8px 12px; border-top: 1px solid rgba(240, 230, 207, .08); vertical-align: middle; }
.table tr.is-off td { opacity: .5; }
.table tr.is-off td:last-child, .table tr.is-off td:nth-last-child(2) { opacity: 1; }
.table .num { font-family: var(--f-mono); white-space: nowrap; }
.table__flask { width: 48px; }
.table__flask .flask-svg { width: 26px; height: auto; }
.table__name { font-size: 16px; }
.table__sub { display: block; color: var(--text-dim); font-size: 13px; }
.table select { padding: 6px 8px; border-radius: var(--radius); border: 1px solid rgba(240, 230, 207, .25); background: #15100c; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; white-space: nowrap; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track { width: 42px; height: 24px; border-radius: 12px; background: #4a3f35; position: relative; transition: background .2s; }
.switch__track::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); transition: transform .2s; }
.switch input:checked + .switch__track { background: var(--ok); }
.switch input:checked + .switch__track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--brass-2); outline-offset: 2px; }

.editor { display: grid; gap: 14px; }
.editor__grid { display: grid; gap: 12px; }
@media (min-width: 560px) { .editor__grid { grid-template-columns: 1fr 1fr; } .editor__wide { grid-column: 1 / -1; } }
.editor textarea.field__input { min-height: 70px; font: 15px/1.4 var(--f-serif); resize: vertical; }
.editor select.field__input { font-family: var(--f-serif); }
.editor input[type="color"].field__input { padding: 4px; height: 46px; }
.editor__range { display: grid; grid-template-columns: 1fr 30px; align-items: center; gap: 10px; }
.editor__range input { accent-color: var(--ink); }
.editor__range output { font: 700 18px/1 var(--f-mono); text-align: center; }
.editor__preview { display: flex; align-items: center; gap: 14px; }
.editor__preview #ed-preview { flex: none; width: 52px; }
.editor__preview .flask-svg { width: 52px; height: auto; }
.editor__preview .field__label { margin: 0; }
.editor__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.editor__actions .btn--danger { margin-right: auto; border-color: var(--red); color: var(--red); }

.effects-editor { width: 100%; min-height: 360px; padding: 14px; border-radius: var(--radius); border: 1px solid rgba(240, 230, 207, .2); background: #15100c; font: 16px/1.7 var(--f-mono); }

.cards { display: grid; gap: 12px; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); } }
.data-card { padding: 16px 18px; border: 1px solid rgba(240, 230, 207, .12); border-radius: var(--radius); background: rgba(0, 0, 0, .18); }
.data-card h3 { margin: 0 0 6px; font: 500 17px/1.2 var(--f-display); letter-spacing: .08em; text-transform: uppercase; }
.data-card p { margin: 0 0 12px; color: var(--text-dim); font-size: 14px; }
.status { display: inline-block; padding: 3px 8px; border-radius: 3px; font: 500 12px/1.2 var(--f-display); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; background: rgba(240, 230, 207, .1); }
.status--paid { background: var(--brass); color: var(--night); }
.status--in_work { background: #3e6a8a; }
.status--done { background: rgba(141, 179, 104, .35); }
.status--payment_failed, .status--canceled { background: rgba(224, 102, 76, .3); }
