/* ============ Админка ============ */
.a-top {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.a-top .bar { max-width: 1040px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: calc(12px + env(safe-area-inset-top)) 16px 4px; }
.a-top .neon-title { padding: 2px 0; font-size: clamp(14px, 4.4vw, 17px); margin-right: auto; flex: 1 1 0; min-width: 0; line-height: 1.15; letter-spacing: .05em; white-space: normal; overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
.a-top .bar .btn { flex: none; white-space: nowrap; }
/* на телефоне «Экран бара» — только колокольчик, чтобы названию хватало места */
@media (max-width: 430px) { .a-top .bar .btn .lbl { display: none; } .a-top .bar .btn.bell { width: 40px; padding: 0; } }
/* вертикальный запас под свечение: overflow-x у ленты обрезает всё, что вылезло за padding */
.tabs { position: relative; max-width: 1040px; margin: 0 auto; display: flex; gap: 8px; overflow-x: auto; padding: 16px 20px 20px; scrollbar-width: none; scroll-padding-inline: 20px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; min-height: 40px; padding: 0 16px; border-radius: 12px; color: var(--muted); font-weight: 700; border: 1.5px solid transparent; }
.tab.active { color: #fff; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 50%, transparent), inset 0 0 10px color-mix(in srgb, var(--accent) 16%, transparent); }

.a-main { max-width: 1040px; margin: 0 auto; padding: 18px 16px 80px; }
.a-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 16px; }
.a-h h2 { font-family: var(--font-display); font-size: 20px; font-weight: 700; margin-right: auto; }
.panel { background: linear-gradient(180deg, #11131c, #0c0e15); border: 1px solid var(--line); border-radius: 22px; padding: 18px; }
.panel + .panel { margin-top: 16px; }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) { .tiles { grid-template-columns: 1fr 1fr; } }
.tile { padding: 16px; border-radius: 20px; background: linear-gradient(180deg, #121521, #0c0e15); border: 1px solid var(--line); }
.tile .k { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.tile .v { font-family: var(--font-display); font-size: 26px; font-weight: 700; margin-top: 8px; font-variant-numeric: tabular-nums; }
.tile.c1 .v { color: var(--accent); text-shadow: 0 0 14px color-mix(in srgb, var(--accent) 40%, transparent); }
.tile.c2 .v { color: var(--ok); text-shadow: 0 0 14px color-mix(in srgb, var(--ok) 40%, transparent); }
.tile.c3 .v { color: var(--accent2); text-shadow: 0 0 14px color-mix(in srgb, var(--accent2) 40%, transparent); }
.top-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.top-row:last-child { border-bottom: 0; }
.links { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 16px; }
.link-card { display: block; padding: 16px; border-radius: 18px; border: 1px solid var(--line2); background: #0d0f16; color: var(--text); }
.link-card b { display: block; font-size: 16px; }
.link-card span { color: var(--muted); font-size: 13px; }

/* меню */
.cat-block { border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(180deg, #10121b, #0b0d14); margin-bottom: 16px; overflow: hidden; }
.cat-head { display: flex; align-items: center; gap: 6px; padding: 14px 14px 14px 18px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--accent) 4%, transparent); }
.cat-head .t { flex: 1; font-weight: 800; font-size: 16px; letter-spacing: .02em; }
.mini { width: 34px; height: 34px; border-radius: 10px; background: var(--card2); color: var(--muted); display: inline-grid; place-items: center; font-size: 15px; flex: none; }
.mini:hover { color: #fff; }
.mini.danger:hover { color: var(--danger); }
.item-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.item-row:last-child { border-bottom: 0; }
.item-row .th { position: relative; width: 54px; height: 54px; border-radius: 14px; overflow: hidden; flex: none; background: #171a26; }
.item-row .th img { width: 100%; height: 100%; object-fit: cover; }
.item-row .th .ph b { font-size: 22px; }
.item-row .nm { flex: 1; min-width: 0; cursor: pointer; }
.item-row .nm b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
.item-row .nm span { display: block; margin-top: 3px; }
.item-row .nm span { color: var(--accent); font-weight: 800; font-size: 14px; }
.item-row.stop .nm b { color: var(--muted); text-decoration: line-through; }
.item-row .acts { display: flex; gap: 4px; align-items: center; }
.sw-col { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; }
.sw-col small { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); line-height: 1; }
.sw-col .on { display: none; color: var(--danger); }
.sw-col:has(input:checked) .on { display: inline; }
.sw-col:has(input:checked) .off { display: none; }
.add-line { padding: 10px 14px; }
@media (max-width: 560px) { .item-row .acts .mv { display: none; } }

.photo-box { position: relative; aspect-ratio: 16 / 10; border-radius: 18px; overflow: hidden; background: #171a26; border: 1px dashed var(--line2); }
.photo-box img { width: 100%; height: 100%; object-fit: cover; }
.photo-acts { display: flex; gap: 8px; margin-top: 10px; }
.photo-acts label { cursor: pointer; }
.photo-acts input { display: none; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }

/* столы */
.tbl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tbl { padding: 16px; border-radius: 22px; background: linear-gradient(180deg, #121521, #0c0e15); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.tbl .qr { background: #fff; border-radius: 16px; padding: 10px; aspect-ratio: 1; }
.tbl .qr img { width: 100%; height: 100%; }
.tbl .lbl { display: flex; align-items: center; gap: 8px; }
.tbl .lbl b { flex: 1; font-size: 17px; }
.tbl .url { font-size: 12px; color: var(--dim); word-break: break-all; }
.tbl .row { display: flex; gap: 6px; flex-wrap: wrap; }

/* дизайн */
.design { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
@media (max-width: 860px) { .design { grid-template-columns: 1fr; } }
.presets { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.preset { display: flex; align-items: center; gap: 8px; padding: 8px 12px 8px 8px; border-radius: 14px; border: 1.5px solid var(--line2); background: #0d0f16; font-weight: 700; font-size: 14px; }
.preset.active { border-color: #fff; }
.preset .sw { display: flex; }
.preset .sw i { width: 18px; height: 18px; border-radius: 50%; margin-right: -5px; border: 2px solid #0d0f16; }
.colors { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.color-in { display: flex; align-items: center; gap: 10px; }
.color-in input[type=color] { width: 46px; height: 46px; border: 0; padding: 0; background: none; border-radius: 12px; cursor: pointer; flex: none; }
.color-in input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.color-in input[type=color]::-webkit-color-swatch { border: 1px solid var(--line2); border-radius: 12px; }

.phone { position: sticky; top: 130px; border-radius: 36px; padding: 12px; background: #000; border: 1px solid #222; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.phone-screen { border-radius: 26px; overflow: hidden; height: 560px; position: relative; }
.phone-screen .p-hero { text-align: center; padding: 26px 10px 18px; border-bottom: 1px solid var(--line); }
.phone-screen .p-hero .neon-title { font-size: 22px; }
.phone-screen .p-hero .pill { margin-top: 10px; font-size: 11px; padding: 4px 12px; }
.phone-screen .p-chips { display: flex; gap: 6px; padding: 12px 10px; overflow: hidden; }
.phone-screen .p-chips span { padding: 7px 12px; border-radius: 99px; border: 1.5px solid var(--line2); font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.phone-screen .p-chips span.on { border-color: var(--accent); color: #fff; box-shadow: var(--glow-a); }
.phone-screen .p-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 4px 10px; }
.phone-screen .p-card { border-radius: 16px; border: 1px solid var(--line); padding: 8px; background: linear-gradient(180deg, #11131c, #0c0e15); }
.phone-screen .p-card .ph-wrap { position: relative; aspect-ratio: 1 / .82; border-radius: 12px; overflow: hidden; }
.phone-screen .p-card .ph b { font-size: 26px; }
.phone-screen .p-card .n { font-weight: 800; font-size: 12px; margin: 8px 2px 6px; }
.phone-screen .p-card .r { display: flex; justify-content: space-between; align-items: center; padding: 0 2px; }
.phone-screen .p-card .price { font-size: 13px; }
.phone-screen .p-card .icon-btn { width: 28px; height: 28px; border-radius: 9px; font-size: 15px; border-width: 1.5px; }
.phone-screen .p-cart { position: absolute; left: 10px; right: 10px; bottom: 12px; }
.phone-screen .p-cart .btn { width: 100%; min-height: 44px; justify-content: space-between; border-radius: 14px; font-size: 13px; }

/* персонал */
.staff-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.staff-row:last-child { border-bottom: 0; }
.staff-row .nm { flex: 1; font-weight: 700; }
.role { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 4px 9px; border-radius: 8px; }
.role.admin { color: var(--accent2); background: color-mix(in srgb, var(--accent2) 12%, transparent); }
.role.bar { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.hint { color: var(--muted); font-size: 13px; margin-top: 10px; }
