/* Features page: bento grids with small, real UI snippets */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; margin-top: 36px; }
.b { grid-column: span 2; position: relative; overflow: hidden; display: grid; gap: 10px; align-content: start;
  padding: 22px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.b.w3 { grid-column: span 3; } .b.w4 { grid-column: span 4; } .b.w6 { grid-column: span 6; } .b.r2 { grid-row: span 2; }
.b h3 { font-size: 1.02rem; }
.b > p { color: var(--muted); font-size: .94rem; }
.b.main { padding: 18px; gap: 14px; align-content: center; }
.b.main .frame { transform: none; }
.viz { border-radius: 14px; background: var(--ink-2); border: 1px solid var(--line); padding: 16px; min-height: 116px; display: grid; align-content: center; gap: 10px; }

/* layout switcher */
.lay-img { border-radius: 14px; overflow: hidden; background: #000; box-shadow: 0 0 0 1px #24363D, 0 30px 60px -36px var(--shadow); aspect-ratio: 16 / 10; }
.lay-img img { width: 100%; height: 100%; object-fit: cover; transition: opacity .35s; }
.chipset { display: flex; flex-wrap: wrap; gap: 8px; }
.chipset button, .chipset span { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--ink-2); color: var(--text); font: 600 .84rem/1 var(--display); display: inline-flex; align-items: center; }
.chipset button { cursor: pointer; }
.chipset button:hover { border-color: var(--muted); }
.chipset button[aria-pressed="true"], .chipset .on { border-color: var(--green); box-shadow: 0 0 14px -6px var(--green); color: var(--green-ink); }
.chipset .off { opacity: .45; text-decoration: line-through; }

/* tiny panels with LED bars */
.leds { display: flex; justify-content: space-around; gap: 10px; }
.mp { position: relative; width: 70px; height: 46px; border-radius: 8px; background: linear-gradient(145deg, #23292D, #0B0F12); box-shadow: 0 0 0 1px #2A363C; display: grid; place-items: center; }
.mp i { width: 44px; height: 26px; border-radius: 4px; background: var(--c); opacity: .9; }
.mp::before, .mp::after { content: ""; position: absolute; top: 7px; bottom: 7px; width: 3px; border-radius: 2px; background: var(--c); box-shadow: 0 0 10px 2px var(--c); }
.mp::before { left: -2px; } .mp::after { right: -2px; }
.mp-lbl { text-align: center; font-size: .78rem; color: var(--muted); margin-top: 6px; }
.mp.lt { background: linear-gradient(145deg, #E8EEF1, #CBD5DA); } .mp.lt i { background: #117A53; }

/* generic mini rows */
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: .86rem; }
.row b { font-weight: 600; }
.row small { color: var(--muted); }
.pill { font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--c, var(--green)) 16%, transparent); color: var(--c-ink, var(--green-ink)); white-space: nowrap; }
.pill.am { --c: var(--amber); --c-ink: #A86207; } .pill.ro { --c: var(--rose); --c-ink: var(--rose-ink, #C21F3E); } .pill.cy { --c: var(--cyan); --c-ink: var(--cyan); }
[data-theme="dark"] .pill.am { --c-ink: #FFB547; } [data-theme="dark"] .pill.ro { --c-ink: #FF7A92; }
.mini-btn { min-height: 34px; padding: 0 14px; border-radius: 999px; border: 0; cursor: pointer; font: 600 .82rem/1 var(--display); background: linear-gradient(135deg, #0D8049, #0A6638); color: #fff; }
.mini-btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.mini-btn:focus-visible, .chipset button:focus-visible, .sw-row input:focus-visible + i { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* setup stepper */
.stepper { display: grid; gap: 8px; }
.stepper div { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: center; font-size: .86rem; }
.stepper em { font-style: normal; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 700; border: 1px solid var(--green); color: var(--green-ink); }
.stepper .done em { background: color-mix(in srgb, var(--green) 20%, transparent); }
.code { font-family: ui-monospace, Consolas, monospace; font-size: .8rem; padding: 5px 9px; border-radius: 7px; background: var(--surface); border: 1px dashed var(--line); justify-self: start; }

/* approval card */
.appr { display: grid; gap: 8px; }
.appr .acts { display: flex; gap: 8px; }
.appr .res { font-size: .84rem; font-weight: 600; min-height: 1.2em; }
.appr .res.ok { color: var(--green-ink); } .appr .res.no { color: var(--rose-ink, var(--rose)); }

/* sync mini */
.syncm { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.syncm .l { display: grid; gap: 6px; }
.syncm .l span { font-size: .8rem; font-weight: 600; padding: 6px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); text-align: center; }
.syncm .hubm { display: grid; justify-items: center; gap: 4px; font-size: .78rem; color: var(--muted); }
.syncm .hubm img { width: 40px; height: 40px; }
.syncm .ar { width: 46px; height: 2px; position: relative; background: var(--line); }
.syncm .ar::after { content: ""; position: absolute; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); animation: syncm 1.8s var(--ease) 4; }
@keyframes syncm { from { left: -4px; } 50% { left: calc(100% - 4px); } to { left: -4px; } }
.week { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; text-align: center; font-size: .74rem; color: var(--muted); }
.week b { display: block; margin-top: 5px; height: 26px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); }
.week b.on { background: color-mix(in srgb, #1A5FB4 70%, transparent); border-color: #1A5FB4; }
.perm { display: grid; gap: 6px; font-size: .86rem; }
.perm span { display: flex; gap: 8px; align-items: center; }
.perm .y::before { content: "✓"; color: var(--green-ink); font-weight: 700; }
.perm .n::before { content: "✕"; color: var(--rose-ink, var(--rose)); font-weight: 700; }

/* order tracker */
.track { display: grid; gap: 12px; }
.track .steps3 { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; font-size: .8rem; color: var(--muted); }
.track .steps3 span.on { color: var(--text); font-weight: 600; }
.track .bar { height: 6px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.track .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--green), var(--cyan)); transition: width 1.2s var(--ease); }
.track .msg { font-size: .86rem; min-height: 1.3em; }
.tabs3 { display: flex; gap: 6px; }
.tabs3 span { font-size: .76rem; font-weight: 600; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); }
.tabs3 span.on { background: linear-gradient(135deg, #C9430D, #A8360A); color: #fff; border-color: transparent; }
.note { font-size: .82rem; padding: 8px 10px; border-radius: 10px 10px 10px 2px; background: color-mix(in srgb, var(--amber) 14%, transparent); border: 1px solid color-mix(in srgb, var(--amber) 40%, transparent); }

/* sold-out switches */
.sw-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: .86rem; }
.sw-row.out b { opacity: .5; text-decoration: line-through; }
.sw-row label { position: relative; width: 40px; height: 22px; flex: none; }
.sw-row input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.sw-row label i { position: absolute; inset: 0; border-radius: 99px; background: var(--switch-off); transition: background .2s; }
.sw-row label i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.sw-row input:checked + i { background: #117A53; }
.sw-row input:checked + i::after { transform: translateX(18px); }
[dir="rtl"] .sw-row input:checked + i::after { transform: translateX(18px); }
.alertm { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: #fff; background: linear-gradient(90deg, #C9430D, #A8360A); font-size: .86rem; font-weight: 600; }
.alertm svg { width: 18px; height: 18px; flex: none; }

/* admin minis */
.fp { display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(3, 26px); gap: 5px; }
.fp span { border-radius: 5px; background: color-mix(in srgb, var(--c) 30%, transparent); border: 1.5px solid var(--c); }
.roles { width: 100%; border-collapse: collapse; font-size: .82rem; }
.roles th, .roles td { padding: 6px 8px; text-align: center; border-bottom: 1px solid var(--line); }
.roles th:first-child, .roles td:first-child { text-align: start; }
.roles th { color: var(--muted); font-weight: 600; }
.roles .y { color: var(--green-ink); font-weight: 700; } .roles .n { color: var(--muted); }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); align-items: end; gap: 6px; height: 90px; }
.bars span { border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, var(--cyan), color-mix(in srgb, var(--cyan) 30%, transparent)); }
.bars-x { display: grid; grid-template-columns: repeat(7, 1fr); font-size: .7rem; color: var(--muted); text-align: center; }
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .84rem; }
.crumb span { padding: 6px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); }
.crumb i { color: var(--muted); font-style: normal; }
.viz-note { font-size: .74rem; color: var(--muted); }

@media (max-width: 980px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .b, .b.w3 { grid-column: span 1; } .b.w4, .b.w6, .b.main { grid-column: span 2; } .b.r2 { grid-row: auto; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; }
  .b, .b.w3, .b.w4, .b.w6, .b.main { grid-column: span 1; }
}
@media (prefers-reduced-motion: reduce) { .syncm .ar::after { animation: none; } .track .bar i { transition: none; } }
/* mini panels on the Features page: full LED frame */
.mp::before, .mp::after { display: none; }
.mp { box-shadow: 0 0 0 2px var(--c), 0 0 10px 2px var(--c); }
