.adm { background: var(--bg); }
.adm-top { position: sticky; top: 0; z-index: 30; background: rgba(242,246,241,.94); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.adm-top-in { display: flex; align-items: center; justify-content: space-between; height: 62px; }

.adm-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; padding-top: 28px; padding-bottom: 80px; align-items: start; }
.adm-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.adm-side { position: sticky; top: 80px; display: grid; gap: 18px; max-height: calc(100vh - 96px); overflow-y: auto; padding-bottom: 4px; scrollbar-width: thin; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 14px; }
.card h2 { font-size: 26px; margin: 0; display: flex; align-items: center; gap: 10px; }
.card h2 span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #f3dfb9; font: 600 14px "Montserrat", sans-serif; flex: none; }
.card h2 small { font: 400 13px "Montserrat", sans-serif; color: var(--muted); }
.out h2 { font-size: 22px; }

label { display: grid; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink); min-width: 0; }
label small { font-weight: 400; color: var(--muted); }
input:not([type=radio]), select, textarea {
  font: 400 16px/1.4 "Montserrat", sans-serif; color: var(--ink);
  width: 100%; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(23,73,61,.12); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }

.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.seg label { display: block; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 12px 8px; cursor: pointer; font-size: 14px; transition: .2s; }
.seg input:checked + span { background: var(--brand); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: -2px; }

/* Программа */
.prow { display: grid; grid-template-columns: 96px 1fr 1fr 40px; gap: 8px; align-items: center; margin-bottom: 8px; }
.prow input { padding: 10px 12px; font-size: 15px; }
.prow .x { width: 40px; height: 40px; border: 1px solid var(--line); background: #fff; border-radius: 10px; cursor: pointer; font-size: 18px; color: var(--muted); }
.prow .x:hover { color: var(--brand); border-color: var(--brand); }

/* Темы */
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.th {
  border: 2px solid transparent; border-radius: 14px; padding: 0; background: none; cursor: pointer; text-align: center; font: inherit; color: inherit;
  transition: transform .2s, border-color .2s;
}
.th:hover { transform: translateY(-2px); }
.th[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 6px 16px rgba(23,73,61,.2); }
.th-sw { display: block; height: 62px; border-radius: 11px 11px 0 0; position: relative; overflow: hidden; }
.th-sw i { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); width: 34px; height: 3px; border-radius: 3px; }
.th-sw b { position: absolute; inset: 10px 0 auto; font: italic 500 17px/1 "Cormorant Garamond", serif; }
.th-n { display: block; padding: 7px 4px; font-size: 12px; background: #fff; border-radius: 0 0 11px 11px; border: 1px solid var(--line); border-top: 0; }

/* Предпросмотр */
.adm-side .phone { transform: none; width: 100%; max-width: 330px; height: 640px; margin: 0 auto; }
.phone-empty { position: absolute; inset: 12px; border-radius: 36px; display: grid; place-items: center; text-align: center; padding: 30px; background: #fbf7f0; color: var(--muted); font-size: 14px; z-index: 1; }
.phone.has .phone-empty { display: none; }

.linkbox input { font-size: 13px; padding: 11px 12px; }
.out-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.out-btns .btn { flex: 1; min-width: 0; padding-left: 10px; padding-right: 10px; letter-spacing: .06em; white-space: nowrap; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.hint { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.hint code { background: var(--bg-alt); padding: 1px 5px; border-radius: 4px; }
.hint.err { color: #b3261e; }
.hint.warn { color: #8a5a00; }

#guestList { display: grid; gap: 8px; }
.g { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: center; padding: 8px 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; }
.g b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g .btn { padding: 8px 12px; font-size: 10.5px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: #0b231d; color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 99; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 960px) {
  .adm-grid { grid-template-columns: 1fr; }
  .adm-side { position: static; max-height: none; overflow: visible; }
}
@media (max-width: 520px) {
  .card { padding: 18px 16px; }
  .row2 { grid-template-columns: 1fr; }
  .prow { grid-template-columns: 84px 1fr 40px; }
  .prow .pn { grid-column: 1 / 3; grid-row: 2; }
  .prow .x { grid-column: 3; grid-row: 1; }
  .g { grid-template-columns: 1fr auto auto; }
  .adm-side .phone { height: 600px; }
}
.adm-actions .btn { white-space: nowrap; padding: 10px 14px; }
@media (max-width: 520px) { .adm-top .logo small { display: none; } }

/* Кирүү коду */
.gate { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(70% 80% at 80% 15%, rgba(46,125,104,.5), transparent 70%), linear-gradient(165deg, #0f3329, #071a15); }
.gate[hidden] { display: none; }
.gate-box { width: 100%; max-width: 360px; text-align: center; color: #e9f1ec; display: grid; gap: 14px; }
.gate-box img { width: 96px; height: 96px; margin: 0 auto; }
.gate-box h1 { font-size: 34px; letter-spacing: .2em; font-family: "Forum", serif; font-weight: 400; color: #f1dba6; }
.gate-box p { color: #a9c3b6; font-size: 14px; }
.gate-box input { text-align: center; letter-spacing: .15em; background: rgba(255,255,255,.08); border-color: rgba(224,184,102,.45); color: #fff; }
.gate-box input::placeholder { color: #7f9a8c; letter-spacing: .05em; }
.gate-box .btn { background: #e0b866; border-color: #e0b866; color: #0b231d; }
.gate-err { color: #ffb4a8; font-size: 13px; }
body.gated .adm-top, body.gated main { display: none; }
.adm-actions { display: flex; gap: 8px; }
@media (max-width: 520px) { .adm-actions .btn { padding: 9px 10px; font-size: 10px; } }
@media (max-width: 400px) { .adm-top .logo > span:last-child { display: none; } }

/* Галереядан сүрөт тандоо */
.pick { display: grid; gap: 10px; padding: 14px; border: 1px dashed var(--line); border-radius: 14px; background: rgba(255,255,255,.5); }
.pick-head small { color: var(--muted); font-weight: 400; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumbs:empty { display: none; }
.thumb { position: relative; width: 88px; height: 88px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #e2ece4; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; }
.thumb .n { position: absolute; left: 4px; bottom: 4px; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--brand); color: #fff; font: 600 11px "Montserrat", sans-serif; }
.thumb.busy::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.7) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='14' fill='none' stroke='%2317493d' stroke-width='4' stroke-dasharray='60 30'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 20 20' to='360 20 20' dur='.8s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E") center / 34px no-repeat; }
.pick-btn { justify-self: start; cursor: pointer; }
.pick-btn.off { display: none; }
.pick summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
.pick details input, .pick details textarea { margin-top: 8px; }

.music-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-width: 0; }
.music-row audio { flex: 1 1 200px; min-width: 0; width: 100%; max-width: 100%; height: 40px; }
.bar { height: 6px; border-radius: 6px; background: rgba(23,73,61,.12); overflow: hidden; }
.bar[hidden] { display: none; }
.bar i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .15s; }
.music-row[hidden] { display: none; }

/* Коомдук режим (create.html) */
body[data-mode="public"] .card.out { display: none; }
.prod { display: grid; gap: 10px; }
.prod label { display: block; cursor: pointer; }
.prod input { position: absolute; opacity: 0; pointer-events: none; }
.prod span { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: .2s; align-items: center; }
.prod span b { font-weight: 600; font-size: 15px; }
.prod span small { grid-column: 1; color: var(--muted); font-size: 12.5px; }
.prod span i { grid-column: 2; grid-row: 1 / span 2; font: 500 26px "Cormorant Garamond", serif; color: var(--brand); font-style: normal; }
.prod input:checked + span { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(23,73,61,.18); background: #f4faf6; }
.prod input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.prod .best span { border-color: rgba(201,162,77,.8); }
.card.ord { background: linear-gradient(165deg, #fbfdfa, #f1f7f2); }
.ord-total { font-size: 16px; }
.ord-total b { font: 500 40px "Cormorant Garamond", serif; color: var(--brand); }
.card.ord .btn { width: 100%; padding: 16px; }

/* Заказдар (orders.html) */
.oa { padding-top: 24px; padding-bottom: 80px; max-width: 860px; }
.oa-top { display: grid; gap: 8px; margin-bottom: 14px; }
.oa-list { display: grid; gap: 14px; margin-bottom: 30px; }
.oa-item { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: grid; gap: 6px; }
.oa-item.st-paid { border-color: rgba(23,120,80,.5); }
.oa-item.st-cancelled { opacity: .6; }
.oa-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.oa-h b { font: 600 20px "Montserrat", sans-serif; letter-spacing: .04em; }
.oa-line { font-size: 14.5px; }
.oa-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ord-chip { display: inline-block; padding: 6px 14px; border-radius: 999px; font: 600 12px "Montserrat", sans-serif; }
.ord-chip.wait { background: #fff3d6; color: #8a5a00; border: 1px solid #e6c36a; }
.ord-chip.ok { background: #dff3e8; color: #17493d; border: 1px solid #8fcfaa; }
.ord-chip.off { background: #eee; color: #666; border: 1px solid #ccc; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 520px) { .row3 { grid-template-columns: 1fr; } }

.slugrow { display: flex; align-items: center; border: 1px solid var(--line, #ccc); border-radius: 10px; overflow: hidden; background: #fff; }
.slugrow span { padding: 0 8px 0 12px; color: #6b7a72; font-size: 13px; white-space: nowrap; }
.slugrow input { border: 0; flex: 1; min-width: 0; padding: 11px 10px 11px 0; font-size: 15px; background: transparent; outline: 0; }
#shortInfo.ok { color: #1d6b52; } #shortInfo.err { color: #b3283a; }

/* Музыка китепканасы */
.lib { position: fixed; inset: 0; z-index: 300; background: rgba(5,20,15,.6); display: flex; align-items: flex-end; justify-content: center; }
.lib[hidden] { display: none; }
.lib-box { width: min(560px, 100%); max-height: 82dvh; display: grid; grid-template-rows: auto auto 1fr; background: #fbf6ea; border-radius: 22px 22px 0 0; padding: 16px; gap: 10px; }
@media (min-width: 700px) { .lib { align-items: center; } .lib-box { border-radius: 22px; } }
.lib-h { display: flex; align-items: center; justify-content: space-between; font: 600 20px "Cormorant Garamond", serif; }
.lib-h button { border: 0; background: rgba(0,0,0,.08); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; }
.lib-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.lib-list { overflow-y: auto; display: grid; gap: 8px; align-content: start; }
.lib-row { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px; }
.lib-play { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 0; background: #1d6b52; color: #fff; cursor: pointer; }
.lib-t { flex: 1; min-width: 0; } .lib-t b { display: block; font-size: 14px; overflow-wrap: anywhere; } .lib-t small { color: var(--muted); }

/* Свой стиль */
.cs { border: 1px dashed var(--line); border-radius: 14px; padding: 12px 14px; background: rgba(255,255,255,.5); }
.cs summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.cs .hint { margin: 8px 0; }
.cs-body { display: grid; gap: 10px; margin-top: 10px; }
.cs:not(:has(#csOn:checked)) .cs-body { opacity: .45; pointer-events: none; }
.cs-t { margin: 6px 0 0; font: 600 13px "Montserrat", sans-serif; color: var(--muted); }
.st-colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.st-colors label { display: grid; gap: 4px; font-size: 12px; }
.st-colors input[type="color"] { width: 100%; height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 2px; background: #fff; cursor: pointer; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.chk input { width: 18px; height: 18px; }

/* Конверт жасоочу */
.ee { display: grid; gap: 10px; }
.ee-up { display: grid; gap: 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.ee-t { font-size: 12px; color: var(--muted); }
.ee-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ee-th { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.ee-st { color: #b3283a; }

/* Кичине палитра */
.pal { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 8px 6px; }
.pal .sw { display: grid; justify-items: center; gap: 3px; }
.pal .sw[hidden] { display: none; }
.pal .sw input[type="color"] { width: 34px; height: 34px; padding: 0; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); background: none; cursor: pointer; }
.pal .sw input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; } .pal .sw input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 50%; }
.pal .sw input[type="color"]::-moz-color-swatch { border: 0; border-radius: 50%; }
.pal .sw i { font: normal 500 10px/1.15 "Montserrat", sans-serif; color: var(--muted); text-align: center; max-width: 60px; overflow-wrap: anywhere; }
.sy { display: grid; gap: 10px; }
.sy-chks { display: grid; gap: 6px; align-content: end; }
.sy-seg { display: grid; grid-template-columns: repeat(3, 1fr); }
.sy-p { display: grid; gap: 8px; } .sy-p[hidden] { display: none; }
.sy-env summary { cursor: pointer; font-weight: 600; font-size: 13px; padding: 6px 0; }
.sy-env > div { display: grid; gap: 10px; padding-top: 6px; }
input[type="range"] { width: 100%; }

.lay-grid { display: grid; gap: 12px; margin: 8px 0; }
.lay-grid label { display: grid; gap: 4px; font-size: 13px; position: relative; }
.lay-grid output { position: absolute; right: 0; top: 0; color: var(--muted); font-weight: 600; }

.gate-box .gate-logo { width: min(240px, 70%); height: auto; margin: 0 auto 6px; }
.adm-top .logo-full { height: 36px; }

.sy-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.sy-seg { grid-template-columns: repeat(4, 1fr); }
