/* SHABAB METRIC PRO 1.4.0 — menu like SHABAB POS RESTAURANT (coloured square, UPPERCASE group, count, line in the group colour), ONE Windows-style
   Settings page, Theme & Font studio (font / text size / density), Search everything (Ctrl+K), Help. Light theme default; works with all 10 themes. */

/* ---------------------------------------------------------------- font / size / density (Theme & Font studio, per login; nothing set = 1.3.0 look) */
html[data-font="segoe"] body, html[data-font="segoe"] .in, html[data-font="segoe"] button { font-family: "Segoe UI", "Noto Kufi Arabic", system-ui, sans-serif; }
html[data-font="system"] body, html[data-font="system"] .in, html[data-font="system"] button { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Kufi Arabic", sans-serif; }
html[data-font="arial"] body, html[data-font="arial"] .in, html[data-font="arial"] button { font-family: Arial, "Noto Kufi Arabic", sans-serif; }
html[data-font="tahoma"] body, html[data-font="tahoma"] .in, html[data-font="tahoma"] button { font-family: Tahoma, "Noto Kufi Arabic", sans-serif; }
html[data-font="verdana"] body, html[data-font="verdana"] .in, html[data-font="verdana"] button { font-family: Verdana, "Noto Kufi Arabic", sans-serif; }
html[data-font="georgia"] body, html[data-font="georgia"] .in, html[data-font="georgia"] button { font-family: Georgia, "Noto Kufi Arabic", serif; }
html[data-size="13"] body { font-size: 13px; } html[data-size="14"] body { font-size: 14px; } html[data-size="16"] body { font-size: 16px; }
html[data-size="17"] body { font-size: 17px; } html[data-size="18"] body { font-size: 18px; }
html[data-density="compact"] .card { padding: 11px 12px; }
html[data-density="compact"] .btn { padding: 7px 12px; }
html[data-density="compact"] .pill { padding: 6px 11px; }
html[data-density="compact"] td, html[data-density="compact"] th { padding-top: 5px; padding-bottom: 5px; }
html[data-density="compact"] .sgrp .sub a { padding-top: 5px; padding-bottom: 5px; }
html[data-density="compact"] main { padding-top: 12px; }

/* ---------------------------------------------------------------- the menu like POS (PC side menu) */
nav.side.pos .sgrp > button { gap: 9px; padding: 9px 10px; font-size: 11.5px; letter-spacing: .1em; font-weight: 700; color: var(--sideInk); }
html[lang="ar"] nav.side.pos .sgrp > button { letter-spacing: 0; font-size: 13px; }
html[lang="ar"] nav.side.pos .glbl { white-space: normal; overflow: visible; line-height: 1.35; } /* Arabic group names are longer: wrap, never cut */
nav.side.pos .sgrp > button:hover { color: var(--sideHover); }
nav.side.pos .sgrp.on > button { color: var(--sideInk); background: none; font-weight: 800; }
.gsq { display: inline-block; width: 11px; height: 11px; border-radius: 3px; flex: none; box-shadow: 0 0 0 2px color-mix(in srgb, var(--gc, #64748B) 22%, transparent); }
nav.side.pos .glbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
nav.side.pos .gcnt { font-size: 10.5px; font-weight: 700; letter-spacing: 0; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, var(--gc, #64748B) 14%, transparent); color: var(--sideInk); }
nav.side.pos .sgrp > button .chev { margin-inline-start: 0; }
nav.side.pos .sgrp .sub { margin-inline-start: 15px; border-inline-start: 2px solid color-mix(in srgb, var(--gc, #64748B) 55%, transparent); padding-inline-start: 2px; }
nav.side.pos .sgrp .sub a { display: flex; align-items: center; gap: 9px; }
nav.side.pos .sgrp .sub a svg { width: 16px; height: 16px; flex: none; opacity: .75; }
nav.side.pos .sgrp .sub a.on { background: var(--sideOn); color: var(--sideOnInk); box-shadow: inset 3px 0 0 var(--gc, transparent); }
html[dir="rtl"] nav.side.pos .sgrp .sub a.on { box-shadow: inset -3px 0 0 var(--gc, transparent); }
nav.side.pos .sgrp .sub a.on svg { opacity: 1; }
/* glass dock (68 px icons; the square is the icon) */
@media (min-width: 900px) {
  html[data-theme^="glass"] nav.side.pos .sgrp > button .gsq { width: 14px; height: 14px; }
  html[data-theme^="glass"] nav.side.pos .sgrp > button .gcnt { display: none; }
  html[data-theme^="glass"] nav.side.pos:hover .sgrp > button .gcnt, html[data-theme^="glass"] nav.side.pos:focus-within .sgrp > button .gcnt { display: inline-block; font-size: 10.5px; }
  html[data-theme^="glass"] nav.side.pos:hover .sgrp > button, html[data-theme^="glass"] nav.side.pos:focus-within .sgrp > button { font-size: 11.5px; gap: 9px; padding: 9px 10px; }
}
/* phone More page in the same look */
.moremenu.pos .card h3 { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
html[lang="ar"] .moremenu.pos .card h3 { letter-spacing: 0; font-size: 14px; }
.moremenu.pos .card h3 small { margin-inline-start: auto; font-size: 11px; color: var(--mute); }
.moremenu.pos .card { border-top: 3px solid var(--gc, var(--line)); }
/* one entry = several pages: tabs above the page */
.etabs { display: flex; gap: 6px; overflow-x: auto; padding: 0 0 12px; scrollbar-width: none; }
.etabs::-webkit-scrollbar { display: none; }
/* header search button */
.top .sbtn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 34px; padding: 0; border-radius: 10px; border: 1px solid var(--topLine, var(--line)); background: transparent; color: var(--topInk, var(--ink)); cursor: pointer; flex: none; }
.top .sbtn:hover { border-color: var(--accent); }
.top .sbtn svg { width: 17px; height: 17px; }

/* ---------------------------------------------------------------- SETTINGS (Windows-style) */
.st140 { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 18px; align-items: start; }
.stside { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 10px; }
.stuser { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: var(--r, 14px); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); min-width: 0; }
.stuser .av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--btn); color: var(--onAccent); font-weight: 700; flex: none; }
.stuser b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stuser small { display: block; color: var(--mute); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stuser > div { min-width: 0; }
.stcats { display: flex; flex-direction: column; gap: 2px; }
.stcat { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 11px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 13.5px; }
.stcat:hover { background: var(--soft); }
.stcat.on { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
.stsq { --sc: #64748B; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--sc) 15%, transparent); color: var(--sc); }
.stsq svg { width: 17px; height: 17px; }
html[data-theme="dark"] .stsq, html[data-theme="premium"] .stsq, html[data-theme="darkpink"] .stsq, html[data-theme="glassnight"] .stsq, html[data-theme="modern"] .stsq, html[data-theme="corporate"] .stsq { background: color-mix(in srgb, var(--sc) 30%, transparent); color: color-mix(in srgb, var(--sc) 55%, #fff); }
.stmain { min-width: 0; }
.stsbox { display: flex; align-items: center; gap: 10px; padding: 4px 14px; border-radius: 14px; background: var(--field); border: 1px solid var(--line); margin: 0 0 14px; box-shadow: var(--shadow); }
.stsbox svg { width: 19px; height: 19px; color: var(--mute); flex: none; }
.stsbox .in { border: 0; background: transparent; box-shadow: none; font-size: 15px; padding: 11px 0; flex: 1; min-width: 0; }
.stsbox .in:focus { outline: none; }
.sth { display: flex; align-items: center; gap: 10px; margin: 4px 0 12px; font-size: 20px; }
.sth small { font-size: 12px; color: var(--mute); font-weight: 600; }
.sth3 { margin: 18px 0 8px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accentInk); }
html[lang="ar"] .sth3 { letter-spacing: 0; font-size: 14px; }
.strows { display: grid; gap: 8px; }
.strows.two { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.strow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; min-width: 0; }
.strow:hover { border-color: var(--accent); }
.strow .stsq { width: 38px; height: 38px; border-radius: 11px; }
.strow .stsq svg { width: 20px; height: 20px; }
.stt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.stt b { font-size: 14.5px; }
.stt small { color: var(--mute); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stgo { color: var(--mute); font-size: 22px; line-height: 1; flex: none; }
.stco { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.stco img { width: 44px; height: 44px; border-radius: 12px; }
.stco b { display: block; font-size: 16px; }
.stco small { color: var(--mute); font-size: 12px; }
.stco .sp { flex: 1; }
.stlang { display: flex; gap: 6px; }
.stcrumb { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; margin: 2px 0 4px; }
.stcrumb a { color: var(--accentInk); text-decoration: none; font-weight: 600; }
.stcrumb .btn { padding: 6px 9px; }
.stcrumb .btn svg { width: 16px; height: 16px; }
html[dir="rtl"] .stcrumb .btn svg { transform: scaleX(-1); }
.stcrumb .sep { color: var(--mute); }
.strowc { margin-top: 8px; }
.st4 { margin: 14px 0 6px; font-size: 13px; color: var(--accentInk); }
.stform .grid { margin: 0; }
.stform > .btn[type="submit"] { margin-top: 10px; min-width: 160px; }
.strowc .mapcard { box-shadow: none; border: 0; padding: 0; background: none; }
/* features + modules */
.ftlist { display: grid; gap: 8px; }
.ftrow { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card2); cursor: pointer; }
.ftrow .ftn { flex: 1; font-weight: 600; }
.ftst { font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 2px 8px; border-radius: 999px; color: var(--mute); background: var(--soft); }
.ftst.on { color: var(--green); background: color-mix(in srgb, var(--green) 14%, transparent); }
.tgl { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 999px; background: color-mix(in srgb, var(--mute) 35%, transparent); position: relative; cursor: pointer; flex: none; margin: 0; transition: background-color .2s; }
.tgl::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: inset-inline-start .2s; }
.tgl:checked { background: var(--green); }
.tgl:checked::after { inset-inline-start: 21px; }
.tgl:disabled { opacity: .55; cursor: not-allowed; }
/* studio */
.thgrid.st button { text-align: start; }
.stfont { align-items: end; margin-top: 8px; }
.stfont input[type="range"] { width: 100%; padding: 0; accent-color: var(--accent); }
.stfont .f .lbl { display: block; font-size: 12px; color: var(--mute); margin-bottom: 5px; font-weight: 600; }
.stprev { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; padding: 12px; border: 1px dashed var(--line); border-radius: 14px; background: var(--bg); }
.pvmenu { display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: 12px; background: var(--side); border: 1px solid var(--line); }
.pvg { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--sideInk); padding: 6px 8px; border-radius: 8px; }
.pvg.on { background: var(--sideOn); color: var(--sideOnInk); }
.pvbody { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pvbig { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pvbig small { font-size: 13px; color: var(--accentInk); margin-inline-end: 4px; }
.stprev .tbl { max-height: none; }
.stact { margin-top: 12px; align-items: center; }
.stdirty { color: var(--amber); font-size: 12.5px; font-weight: 600; }
.btn.pulse { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }

/* ---------------------------------------------------------------- SEARCH (Ctrl+K) */
.srch140 { position: fixed; inset: 0; z-index: 80; background: rgba(5, 15, 35, .45); display: flex; justify-content: center; align-items: flex-start; padding: 9vh 16px 16px; }
.srch140 .sbox { width: min(640px, 100%); max-height: 78vh; display: flex; flex-direction: column; background: var(--card2); color: var(--ink); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 60px -16px rgba(0,0,0,.45); overflow: hidden; }
html[data-theme^="glass"] .srch140 .sbox { background: var(--card2, #fff); }
.srch140 .sq { display: flex; align-items: center; gap: 10px; padding: 6px 14px; border-bottom: 1px solid var(--line); }
.srch140 .sq svg { width: 20px; height: 20px; color: var(--mute); flex: none; }
.srch140 .sq .in { border: 0; background: transparent; box-shadow: none; font-size: 16px; padding: 12px 0; flex: 1; min-width: 0; }
.srch140 .sq .in:focus { outline: none; }
.srch140 kbd, .help140 kbd { font: 600 11px/1 inherit; padding: 3px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--soft); color: var(--mute); }
.sres { overflow-y: auto; padding: 6px; }
.sgh { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accentInk); padding: 10px 10px 4px; }
html[lang="ar"] .sgh { letter-spacing: 0; font-size: 12.5px; }
.sit { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.sit small { color: var(--mute); font-size: 12px; }
.sit.on, .sit:hover { background: color-mix(in srgb, var(--accent) 15%, transparent); }
.sft { border-top: 1px solid var(--line); padding: 8px 14px; font-size: 11.5px; color: var(--mute); }
.sft span { font-weight: 700; }

/* ---------------------------------------------------------------- HELP */
.help140 { max-width: 860px; display: grid; gap: 12px; }
.help140 ul { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; }
.hct { font-size: 16px; margin: 0; }

/* ---------------------------------------------------------------- phone */
@media (max-width: 899px) {
  .st140 { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .stside { position: static; }
  .stuser { display: none; }
  .stcats { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; scrollbar-width: none; }
  .stcats::-webkit-scrollbar { display: none; }
  .stcat { flex: none; border: 1px solid var(--line); background: var(--pill); padding: 6px 10px 6px 6px; font-size: 13px; }
  html[dir="rtl"] .stcat { padding: 6px 6px 6px 10px; }
  .stcat .stsq { width: 26px; height: 26px; border-radius: 8px; }
  .strows.two { grid-template-columns: minmax(0, 1fr); }
  .stprev { grid-template-columns: minmax(0, 1fr); }
  .pvmenu { flex-direction: row; overflow-x: auto; }
  .srch140 { padding-top: 12px; }
}
/* phone header: the 1.4.0 search button fits next to the bell + language button (no side scroll at 360 - 420 px) */
@media (max-width: 440px) {
  .top { gap: 7px; padding-inline: 10px; }
  .top .brand b { font-size: 13px; letter-spacing: .01em; }
  .top .brand { gap: 7px; }
  .top .sbtn { width: 30px; height: 32px; }
  .top .brand { min-width: 0; flex: 0 1 auto; }
  .top .brand > div { min-width: 0; overflow: hidden; }
  .top .brand b { display: block; overflow: hidden; text-overflow: ellipsis; }
  .top .live { font-size: 0; gap: 0; letter-spacing: 0; } /* the pulsing green dot stays; the word LIVE makes room for the search button */
  html[data-theme^="glass"] header.top { margin-inline: 6px; }
}
