:root {
  --brand: #0f766e; --brand-dark: #115e59; --brand-soft: #ccfbf1; --side: #0b1f1e;
  --bg: #f4f6f8; --card: #fff; --text: #1f2933; --muted: #6b7785; --line: #e3e8ee;
  --ok: #16a34a; --bad: #dc2626; --warn: #d97706;
  --radius: 10px; --shadow: 0 1px 3px rgba(16, 24, 40, .08);
  font-family: system-ui, -apple-system, "Segoe UI", Tahoma, "Noto Sans Arabic", Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-size: 15px; }
a { color: var(--brand); }
button, input, select { font: inherit; }

/* Layout */
.layout { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.sidebar { background: var(--side); color: #d5e4e2; display: flex; flex-direction: column; padding: 18px 12px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; color: #fff; font-weight: 700; font-size: 17px; }
.brand img { width: 34px; height: 34px; background: #fff; border-radius: 9px; padding: 3px; object-fit: contain; }
.brand img.custom { width: auto; max-width: 170px; height: 44px; background: #fff; padding: 6px 10px; border-radius: 10px; }
.sidebar .brand:has(img.custom) { flex-direction: column; align-items: flex-start; gap: 8px; }
.brand .bt { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand .bt small { font-weight: 500; font-size: 12px; color: #9fb4b1; }
.sidebar .brand { padding-bottom: 18px; margin-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.08); }
.nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: #c6d6d4; text-decoration: none; margin-bottom: 2px; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.active { background: var(--brand); color: #fff; }
.nav .ico { width: 18px; text-align: center; }
.sidebar .spacer { flex: 1; }
.sidebar .side-actions { display: flex; flex-direction: column; gap: 6px; padding: 0 4px; }
.sidebar .side-actions button { background: transparent; color: #c6d6d4; border: 1px solid rgba(255,255,255,.15); border-radius: 8px; padding: 8px; cursor: pointer; }
.sidebar .side-actions button:hover { color: #fff; border-color: rgba(255,255,255,.35); }
.sidebar .who { font-size: 13px; color: #8fa9a6; padding: 10px 4px 0; }

.main { display: flex; flex-direction: column; min-width: 0; }
.content { padding: 26px 30px; flex: 1; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 22px; }
footer.app-footer { padding: 14px 30px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); background: #fff; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
footer .ver { font-weight: 600; color: var(--brand-dark); }

/* Elements */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card + .card { margin-top: 18px; }
.card h2 { margin: 0 0 14px; font-size: 16px; }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; color: var(--text); padding: 8px 14px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #c5ced8; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { border-color: var(--bad); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
input[type=text], input[type=password], input[type=number], input[type=time], input[type=date], select {
  width: 100%; padding: 9px 11px; border: 1px solid #cfd7e0; border-radius: 8px; background: #fff; color: var(--text);
}
input:focus, select:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }
.error { color: var(--bad); font-size: 14px; margin: 8px 0; min-height: 1em; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stat .label { color: var(--muted); font-size: 13px; }
.stat .value { font-size: 28px; font-weight: 700; margin-top: 4px; }
.stat.ok .value { color: var(--ok); } .stat.bad .value { color: var(--bad); }

/* Tables */
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: start; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.list td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-inline-end: 6px; background: #9aa5b1; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(22,163,74,.15); }
.dot.off { background: var(--bad); }
.pill { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; background: #eef2f6; color: #445; }
.pill.brand { background: var(--brand-soft); color: var(--brand-dark); }

/* Media grid */
.dropzone { border: 2px dashed #b8c4cf; border-radius: var(--radius); padding: 30px; text-align: center; color: var(--muted); background: #fff; cursor: pointer; margin-bottom: 18px; }
.dropzone.drag { border-color: var(--brand); background: #f0fdfa; color: var(--brand-dark); }
.progress { height: 6px; background: #e5e9ef; border-radius: 3px; overflow: hidden; margin-top: 10px; }
.progress > div { height: 100%; background: var(--brand); width: 0; transition: width .2s; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.tile .thumb { aspect-ratio: 16/9; background: #111 center/contain no-repeat; position: relative; }
.tile .thumb video, .tile .thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tile .thumb .badge { position: absolute; top: 6px; inset-inline-start: 6px; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 4px; }
.tile .meta { padding: 10px; font-size: 13px; flex: 1; }
.tile .meta .nm { font-weight: 600; word-break: break-word; margin-bottom: 4px; }
.tile .acts { display: flex; gap: 6px; padding: 0 10px 10px; }
.tile.selectable { cursor: pointer; }
.tile.selected { outline: 3px solid var(--brand); }

/* Playlists */
.split { display: grid; grid-template-columns: 260px 1fr; gap: 18px; align-items: start; }
.pl-list a { display: block; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--text); border: 1px solid transparent; }
.pl-list a:hover { background: #f1f5f9; }
.pl-list a.active { background: var(--brand-soft); border-color: #99f6e4; }
.pl-list .sub { font-size: 12px; color: var(--muted); }
.pl-items .it { display: grid; grid-template-columns: 26px 96px 1fr 120px auto; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; background: #fff; }
.pl-items .it.dragging { opacity: .4; }
.pl-items .it .handle { cursor: grab; color: var(--muted); text-align: center; user-select: none; }
.pl-items .it .th { width: 96px; height: 54px; background: #111; border-radius: 4px; overflow: hidden; }
.pl-items .it .th img, .pl-items .it .th video { width: 100%; height: 100%; object-fit: cover; }

/* Menu boards */
.menu-top { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.menu-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 40%); gap: 18px; align-items: start; }
.menu-side { position: sticky; top: 16px; }
.menu-form .card + .card { margin-top: 14px; }
.menu-preview { width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.menu-preview.portrait { aspect-ratio: 9 / 16; max-height: 75vh; width: auto; margin: 0 auto; }
.row3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.menu-sec-head { display: flex; gap: 12px; align-items: flex-end; }
.menu-sec-head .btn-row { margin-bottom: 14px; }
.mi-head, .mi { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 100px; gap: 8px; align-items: center; }
.mi-head { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; padding: 0 0 6px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.mi { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.mi input[type=text], .mi select { padding: 7px 9px; }
.mi.out input[type=text] { text-decoration: line-through; opacity: .55; }
.mi-bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.mi-badge { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.mi-badge select { width: 120px; padding: 5px 8px; }
.mi-badge span { display: none; }
.mi-bar { gap: 10px; }
.mi-sold { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }
.mi-sold input { width: 17px; height: 17px; accent-color: var(--brand); }
.mi-ops { flex-wrap: nowrap; }
.mi-desc { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mi-desc[hidden] { display: none; }
.menu-th { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 26px; color: #2dd4bf; background: #0d1413; }
.menu-mini { width: 100%; height: 100%; }
@media (max-width: 1280px) { .menu-grid { grid-template-columns: 1fr; } .menu-side { position: static; order: -1; } }

/* Widgets */
.chk-row { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 10px; }
.chk { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.chk input { width: 17px; height: 17px; accent-color: var(--brand); }
.ptable input { width: 100px; padding: 6px 8px; }
.ptable td { padding: 8px 10px; }

/* Days picker */
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.days label { border: 1px solid #cfd7e0; border-radius: 8px; padding: 6px 10px; cursor: pointer; user-select: none; font-size: 13px; }
.days input { display: none; }
.days label.on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; z-index: 50; overflow-y: auto; }
.modal { background: #fff; border-radius: 12px; width: 100%; max-width: 520px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modal.wide { max-width: 900px; }
.modal header { padding: 16px 20px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 16px; display: flex; justify-content: space-between; align-items: center; }
.modal header button { background: none; border: 0; font-size: 22px; cursor: pointer; color: var(--muted); line-height: 1; }
.modal .body { padding: 20px; max-height: 70vh; overflow-y: auto; }
.modal .foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }

/* Toast */
#toast-root { position: fixed; bottom: 20px; inset-inline-end: 20px; z-index: 60; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #0b1f1e; color: #fff; padding: 10px 16px; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.2); font-size: 14px; animation: fadein .2s; }
.toast.err { background: var(--bad); }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Auth */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: linear-gradient(135deg, var(--side), var(--brand)); }
.auth .card { width: 100%; max-width: 400px; padding: 28px; }
.auth .brand { color: var(--text); padding: 0 0 18px; }
.auth .brand img { background: var(--brand-soft); }
.auth .foot { text-align: center; color: rgba(255,255,255,.75); font-size: 13px; margin-top: 16px; }
.auth-wrap { display: flex; flex-direction: column; align-items: center; width: 100%; }
.lang-btn { background: none; border: 0; color: var(--brand); cursor: pointer; padding: 0; text-decoration: underline; }

/* Responsive */
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px; gap: 4px; }
  .brand { padding: 4px 8px; }
  .nav { display: flex; flex-wrap: wrap; gap: 2px; width: 100%; }
  .nav a { padding: 8px 10px; font-size: 14px; }
  .sidebar .spacer, .sidebar .who { display: none; }
  .sidebar .side-actions { flex-direction: row; }
  .content { padding: 18px 14px; }
  .split { grid-template-columns: 1fr; }
  .pl-items .it { grid-template-columns: 22px 70px 1fr; }
  .pl-items .it .th { width: 70px; height: 40px; }
  .pl-items .it .dur, .pl-items .it .ops { grid-column: 2 / -1; }
  .row2 { grid-template-columns: 1fr; }
  .mi-head { display: none; }
  .mi { grid-template-columns: 1fr 1fr; }
  .mi .mi-price { grid-column: 1 / -1; }
}

/* ===== v1.3 design: industry theming & new components ===== */
.card { border-radius: 14px; }
.btn { border-radius: 9px; }
.nav a { font-weight: 500; }
.nav a.active { box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 40%, transparent); }

/* Home hero */
.hero { position: relative; overflow: hidden; border-radius: 18px; padding: 30px 34px; margin-bottom: 20px; color: #fff; min-height: 170px;
  background: linear-gradient(120deg, var(--side) 0%, var(--brand-dark) 55%, var(--brand) 100%); box-shadow: 0 14px 34px color-mix(in srgb, var(--brand) 30%, transparent); }
.hero h1 { margin: 0 0 6px; font-size: 28px; }
.hero p { margin: 0; opacity: .85; max-width: 560px; }
.hero .art { position: absolute; inset-inline-end: 0; top: 0; bottom: 0; width: 42%; background-size: cover; background-position: center;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 40%); mask-image: linear-gradient(to right, transparent, #000 40%); opacity: .95; }
[dir=rtl] .hero .art { -webkit-mask-image: linear-gradient(to left, transparent, #000 40%); mask-image: linear-gradient(to left, transparent, #000 40%); }
.hero .hero-logo { height: 52px; max-width: 220px; object-fit: contain; margin-bottom: 14px; display: block; background: #fff; padding: 7px 12px; border-radius: 12px; box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.hero .pill-row { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; position: relative; }
.hero .pill-row span { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25); padding: 4px 12px; border-radius: 99px; font-size: 13px; }
.hero > * { position: relative; }

/* Quick actions */
.qa { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 20px; }
.qa a { display: flex; gap: 12px; align-items: center; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--text);
  box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s, border-color .15s; }
.qa a:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: 0 10px 24px rgba(16,24,40,.1); }
.qa .ic { width: 42px; height: 42px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-dark); display: flex; align-items: center; justify-content: center; font-size: 20px; flex: none; }
.qa b { display: block; font-size: 14px; }
.qa small { color: var(--muted); font-size: 12px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.home-grid .card + .card { margin-top: 0; }
.home-col { display: flex; flex-direction: column; gap: 18px; }
.tips li { margin-bottom: 10px; line-height: 1.45; }
.tips li::marker { color: var(--brand); }

/* Template gallery */
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tcard { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; cursor: pointer; transition: transform .15s, border-color .15s, box-shadow .15s; display: flex; flex-direction: column; }
.tcard:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: 0 10px 22px rgba(16,24,40,.12); }
.tcard .tv { aspect-ratio: 16 / 9; position: relative; background: #111; }
.tcard .tv > div { position: absolute; inset: 0; }
.tcard .tl { padding: 10px 12px; font-size: 13px; font-weight: 600; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.tcard .tl .pill { font-weight: 500; }
.tcard.blank .tv { display: flex; align-items: center; justify-content: center; background: repeating-linear-gradient(45deg, #f6f8fa, #f6f8fa 10px, #eef2f6 10px, #eef2f6 20px); color: var(--muted); font-size: 34px; }
.tsection { margin: 4px 0 10px; font-weight: 700; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

/* Business type picker */
.biz { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.biz label { cursor: pointer; border: 2px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; transition: border-color .15s, transform .15s; display: block; }
.biz label:hover { transform: translateY(-2px); }
.biz input { display: none; }
.biz .bi { aspect-ratio: 4 / 3; background-size: cover; background-position: center; }
.biz .bn { padding: 8px 10px; font-weight: 700; font-size: 14px; }
.biz .bn small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.biz label.on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.auth .card.wide { max-width: 760px; }
.steps { display: flex; gap: 6px; margin-bottom: 16px; }
.steps span { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.steps span.on { background: var(--brand); }

/* Logo & brand */
.logo-box { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.logo-prev { width: 180px; height: 90px; border: 1px dashed #cbd5e1; border-radius: 12px; display: flex; align-items: center; justify-content: center; background:
  repeating-conic-gradient(#f1f5f9 0% 25%, #fff 0% 50%) 50% / 16px 16px; }
.logo-prev img { max-width: 160px; max-height: 76px; object-fit: contain; }
input[type=color] { width: 54px; height: 38px; padding: 2px; border: 1px solid #cfd7e0; border-radius: 8px; background: #fff; cursor: pointer; }

/* Photo picker & item photo */
.mi-photo { width: 64px; height: 48px; border-radius: 8px; overflow: hidden; border: 1px dashed #cbd5e1; background: #f8fafc; display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex: none; font-size: 11px; color: var(--muted); padding: 0; }
.mi-photo img, .mi-photo video { width: 100%; height: 100%; object-fit: cover; }
.mi-swatch { width: 44px; height: 34px; }
.mi-meta { width: 130px !important; }
.mi-feat { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); cursor: pointer; }
.mi-feat input { accent-color: #f59e0b; width: 16px; height: 16px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pgrid .ph { aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; border: 2px solid transparent; cursor: pointer; background: #f1f5f9; position: relative; }
.pgrid .ph img, .pgrid .ph video { width: 100%; height: 100%; object-fit: cover; }
.pgrid .ph .vtag { position: absolute; top: 6px; left: 6px; background: rgba(0,0,0,.7); color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 4px; }
.pgrid .ph:hover { border-color: var(--brand); }
.pgrid .ph.none { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; border: 2px dashed #cbd5e1; }
.photo-field { display: flex; gap: 10px; align-items: center; }
.photo-field .mi-photo { width: 96px; height: 60px; }

/* Layout picker */
.layouts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 14px; }
.layouts label { border: 2px solid var(--line); border-radius: 10px; padding: 8px 6px; text-align: center; cursor: pointer; font-size: 12px; font-weight: 600; background: #fff; }
.layouts label.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.layouts input { display: none; }
.layouts .lx { height: 34px; margin: 0 auto 6px; width: 54px; border-radius: 5px; background: #e8edf2; position: relative; overflow: hidden; }
.layouts .lx i { position: absolute; background: #b8c4d0; border-radius: 2px; }

/* Queue control */
.qctl { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.qctl .qc { border: 1px solid var(--line); border-radius: 14px; padding: 12px; text-align: center; background: #fff; }
.qctl .qn { font-size: 14px; font-weight: 700; }
.qctl .qv { font-size: 40px; font-weight: 800; color: var(--brand); line-height: 1.1; margin: 4px 0 10px; font-variant-numeric: tabular-nums; }
.qctl .big { width: 100%; justify-content: center; padding: 11px; font-size: 16px; font-weight: 700; }
.qctl .row .btn { padding: 5px 4px; font-size: 12px; }
.qctl .row { display: flex; gap: 6px; margin-top: 8px; }
.qctl .row .btn { flex: 1; justify-content: center; }
@media (max-width: 1100px) { .home-grid { grid-template-columns: 1fr; } .hero .art { opacity: .35; width: 60%; } .layouts { grid-template-columns: repeat(3, 1fr); } }

/* ===== v1.4: customers, users, roles ===== */
.org-switch { display: block; margin: 0 4px 12px; }
.org-switch span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #8fa9a6; margin-bottom: 4px; }
.org-switch select { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.18); padding: 7px 9px; }
.org-switch select option { color: #111; }
.org-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.org-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.org-card.current { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.org-card.paused { opacity: .65; }
.oc-art { height: 110px; background-size: cover; background-position: center; position: relative; }
.oc-art img { position: absolute; left: 12px; bottom: 10px; height: 40px; max-width: 150px; object-fit: contain; background: #fff; padding: 5px 8px; border-radius: 10px; }
.oc-body { padding: 14px 16px 16px; }
.oc-name { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.pill.bad { background: #fee2e2; color: #b91c1c; }
.staff-note { background: var(--brand-soft); color: var(--brand-dark); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: 14px; }
.staff-mode .mi-bar > :not(.mi-sold):not(.mi-ops), .staff-mode .mi-ops > :not([data-desc]), .staff-mode [data-add-item], .staff-mode #addSection,
.staff-mode .menu-sec-head .btn-row, .staff-mode #dupMenu, .staff-mode #delMenu, .staff-mode [data-desc] { display: none !important; }
.staff-mode input:disabled, .staff-mode select:disabled { background: #f6f8fa; color: #667; }
.staff-mode .menu-form > .card:not(.menu-sec), .staff-mode .menu-top .btn-row .pill { display: none !important; }

/* ===== v1.5: screen care ===== */
.dot.sleep { background: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.live-box { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 10px; overflow: hidden; }
.live-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #9aa5b1; font-size: 20px; }
textarea { width: 100%; padding: 9px 11px; border: 1px solid #cfd7e0; border-radius: 8px; font: inherit; resize: vertical; }

/* v1.9 — orientation, synced groups, video walls */
.orient { display: inline-block; width: 1.1em; text-align: center; color: var(--muted, #64748b); }
.pill.warn { background: #fef3c7; color: #92400e; }
.note.warn { background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; border-radius: 8px; padding: 8px 10px; font-size: 13px; margin: 6px 0 10px; }
.note.warn[hidden] { display: none; }
.tile .thumb .badge.shape { top: auto; bottom: 6px; }
.live-box.portrait { aspect-ratio: 9 / 16; max-height: 70vh; width: auto; margin: 0 auto; }
.mode-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mode-card { border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; display: block; }
.mode-card input { display: none; }
.mode-card.on { border-color: var(--brand); background: var(--brand-soft, #f0fdfa); }
.mode-card .mc-t { font-weight: 700; margin-bottom: 4px; }
.sub-h { font-size: 14px; margin: 14px 0 8px; }
.mem-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.mem-pl { display: flex; align-items: center; gap: 6px; }
.mem-pl select { max-width: 220px; }
.wall-grid { display: grid; gap: 8px; background: #0f172a; padding: 10px; border-radius: 10px; }
.wall-cell { background: #1e293b; border: 2px dashed #475569; border-radius: 6px; aspect-ratio: 16 / 9; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 8px; min-width: 0; }
.wall-grid.portrait .wall-cell { aspect-ratio: 9 / 16; }
.wall-cell.filled { border-style: solid; border-color: var(--brand); background: #134e4a; }
.wall-cell .wc-pos { color: #cbd5e1; font-size: 11px; text-align: center; }
.wall-cell select { width: 100%; font-size: 12px; padding: 4px; }
@media (max-width: 720px) { .mode-cards { grid-template-columns: 1fr; } }
.field input[type=range] { width: 100%; padding: 0; }
.field > small { display: block; margin-top: 4px; }
.mode-cards { margin-bottom: 6px; }

/* v1.10 — USB export */
.mode-cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mode-card.disabled { opacity: .55; cursor: not-allowed; }
.progress { height: 10px; background: #e2e8f0; border-radius: 99px; overflow: hidden; margin: 10px 0 14px; }
.progress > div { height: 100%; background: var(--brand); transition: width .4s; }
.ux-step { font-weight: 600; }
.ux-file { font-size: 15px; }
.ux-howto { margin: 6px 0 10px; padding-inline-start: 20px; line-height: 1.6; }
a.btn { text-decoration: none; }
/* Light (silver/white) logos: dark tile instead of white */
html[data-logo-tone="light"] .brand img.custom { background: #161618; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
html[data-logo-tone="light"] .hero .hero-logo { background: rgba(10,10,11,.75); box-shadow: 0 6px 16px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.12); }
