/* ============================================================
   Lumina Shop — admin dashboard styles
   RTL, dark, glass panels, soft ambient orbs
   ============================================================ */

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #070b14;
  --bg-soft: #0c1220;
  --sidebar: rgba(9, 14, 26, 0.92);
  --card: rgba(16, 24, 42, 0.78);
  --card-solid: #10182a;
  --card-hover: rgba(22, 32, 54, 0.92);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #edf3fb;
  --muted: #8b97ad;
  --faint: #667085;
  --teal: #3ee0c5;
  --teal-dim: rgba(62, 224, 197, 0.16);
  --gold: #f0b429;
  --gold-dim: rgba(240, 180, 41, 0.16);
  --violet: #8b7cff;
  --violet-dim: rgba(139, 124, 255, 0.18);
  --rose: #ff7a8a;
  --green: #3dd68c;
  --blue: #5cb8ff;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
  --radius: 18px;
  --radius-sm: 12px;
  --sidebar-w: 248px;
  --font: "Vazirmatn", "Noto Sans Arabic", "Tahoma", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html { background: var(--bg); }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  text-align: start;   /* direction comes from <html dir>, switched by js/i18n.js */
  min-height: 100%;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font-family: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
img { max-width: 100%; }

/* ---------- Ambient background ---------- */
.orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.orbs span {
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  opacity: 0.7;
}
.orbs .o1 {
  width: 520px; height: 520px;
  top: -180px; left: -80px;
  background: radial-gradient(circle, rgba(240, 180, 41, 0.38), transparent 68%);
}
.orbs .o2 {
  width: 460px; height: 460px;
  bottom: -140px; right: 18%;
  background: radial-gradient(circle, rgba(62, 224, 197, 0.28), transparent 68%);
}
.orbs .o3 {
  width: 380px; height: 380px;
  bottom: 8%; left: 28%;
  background: radial-gradient(circle, rgba(139, 124, 255, 0.26), transparent 68%);
}
.orbs .o4 {
  width: 240px; height: 240px;
  top: 28%; left: 8%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.18), transparent 70%);
}

.app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;   /* sidebar sits on the start edge: right in FA, left in EN */
  height: 100vh;
  min-height: 700px;
}

/* ---------- Sidebar (right in FA/RTL, left in EN/LTR) ---------- */
.sidebar {
  order: -1;
  border-inline-end: 1px solid var(--line);
  background: var(--sidebar);
  backdrop-filter: blur(22px);
  display: flex;
  flex-direction: column;
  padding: 20px 16px 16px;
  min-height: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px 18px;
}
.brand-mark {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #2af0d0, #1aa89a 45%, #f0b429);
  box-shadow: 0 8px 20px rgba(62, 224, 197, 0.28);
  flex: 0 0 auto;
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.brand-text span { font-size: 11px; color: var(--muted); font-weight: 500; }

.side-search {
  position: relative;
  margin-bottom: 16px;
}
.side-search input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 12px;
  padding-inline-start: 36px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.side-search input:focus {
  border-color: rgba(62, 224, 197, 0.45);
  background: rgba(62, 224, 197, 0.05);
}
.side-search svg {
  position: absolute;
  inset-inline-start: 11px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--faint);
  pointer-events: none;
}

.nav-label {
  font-size: 11px;
  color: var(--faint);
  padding: 8px 10px 6px;
  font-weight: 600;
}

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; min-height: 0; overflow: auto; }

.nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 11px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  text-align: start;
  transition: background 0.18s, color 0.18s, transform 0.18s;
}
.nav-btn svg { width: 18px; height: 18px; flex: 0 0 auto; opacity: 0.85; }
.nav-btn:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.nav-btn.active {
  background: linear-gradient(90deg, rgba(62, 224, 197, 0.18), rgba(62, 224, 197, 0.06));
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(62, 224, 197, 0.22);
}
.nav-btn.active svg { color: var(--teal); opacity: 1; }
.nav-btn .badge {
  margin-inline-start: auto;
  background: var(--teal-dim);
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
}

.sidebar-foot {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex: 0 0 auto;
  color: #fff;
}
.user-meta { display: flex; flex-direction: column; min-width: 0; }
.user-meta strong { font-size: 12.5px; font-weight: 600; }
.user-meta span { font-size: 11px; color: var(--muted); }

/* ---------- Main column ---------- */
.main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 18px 22px 20px 22px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.greet h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
}
.greet .sub {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sample-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid rgba(240, 180, 41, 0.28);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  letter-spacing: 0;
}
.sample-pill i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}

.top-actions { display: flex; align-items: center; gap: 8px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 11px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.18s, border-color 0.18s, transform 0.15s;
}
.btn:hover { background: rgba(255, 255, 255, 0.08); }
.btn:active { transform: scale(0.98); }
.btn svg { width: 16px; height: 16px; }
.btn-primary {
  background: linear-gradient(180deg, #5af0d6, #2ac4ad);
  color: #042822;
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(62, 224, 197, 0.22);
}
.btn-primary:hover { background: linear-gradient(180deg, #6ff5de, #34d0b8); }
.icon-btn {
  width: 38px; height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.08); }
.icon-btn svg { width: 18px; height: 18px; }

.view { display: none; min-height: 0; flex: 1; overflow: auto; padding-inline-end: 4px; }
.view.active { display: flex; flex-direction: column; }
.view::-webkit-scrollbar { width: 8px; height: 8px; }
.view::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 8px; }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}
.card-title {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 500;
}
.card-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

/* ---------- Overview grid ---------- */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 14px;
  padding-bottom: 8px;
}
.span-1 { grid-column: span 1; }
.span-2 { grid-column: span 2; }
[data-widget] { cursor: grab; }
[data-widget]:active { cursor: grabbing; }
.grip {
  width: 12px; height: 10px;
  display: inline-block;
  margin-inline-end: 8px;
  background:
    radial-gradient(circle, #8b97ad 1.1px, transparent 1.25px) 0 0 / 5px 5px,
    radial-gradient(circle, #8b97ad 1.1px, transparent 1.25px) 0 5px / 5px 5px;
  background-size: 5px 5px;
  background-repeat: repeat;
  opacity: 0.55;
  flex: 0 0 auto;
  align-self: center;
}
.card-kicker .grip { order: -1; }
.chart-card { min-height: 290px; display: flex; flex-direction: column; }
.live-card { display: flex; flex-direction: column; gap: 14px; }
.goal-card { display: flex; flex-direction: column; }
.stat { min-height: 118px; }
.stat .value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 6px 0 8px;
}
.stat .value .unit {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-inline-start: 4px;
}
.delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
}
.delta.down { color: var(--rose); }
.delta .cmp { color: var(--muted); font-weight: 500; margin-inline-start: 4px; }

.spark { position: absolute; inset-inline-end: 12px; bottom: 10px; width: 110px; height: 40px; opacity: 0.95; pointer-events: none; }


.seg {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
}
.seg button {
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.seg button.active {
  background: linear-gradient(180deg, #3ee0c5, #22b89f);
  color: #042822;
}

.chart-wrap { flex: 1; min-height: 200px; position: relative; margin-top: 8px; }
.chart-wrap svg, .chart-wrap canvas { width: 100%; height: 100%; display: block; }
.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: #151d30;
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  opacity: 0;
  transform: translate(-50%, -120%);
  transition: opacity 0.12s;
  white-space: nowrap;
  z-index: 3;
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
}

.live-head { display: flex; align-items: center; justify-content: space-between; }
.live-dot {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--green); font-weight: 600;
}
.live-dot::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(61, 214, 140, 0.7);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 214, 140, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(61, 214, 140, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 214, 140, 0); }
}
.live-number { font-size: 36px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.live-number small { font-size: 13px; color: var(--muted); font-weight: 500; margin-inline-start: 4px; }
.metric-row { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); }
.metric-row b { color: var(--text); font-weight: 600; }

.bars { display: flex; align-items: flex-end; gap: 5px; height: 72px; margin-top: auto; }
.bars span {
  flex: 1;
  background: linear-gradient(180deg, #5cf0d6, #1a8f86);
  border-radius: 4px 4px 2px 2px;
  min-height: 4px;
  transform-origin: bottom;
  transition: height 0.7s cubic-bezier(.22,.8,.28,1);
  opacity: 0.9;
}
.bars span:last-child { box-shadow: 0 0 12px rgba(62, 224, 197, 0.45); }

.goal-ring { display: grid; place-items: center; margin: 10px auto 8px; position: relative; width: 148px; height: 148px; }
.goal-ring svg { width: 148px; height: 148px; transform: rotate(-90deg); }
.goal-ring .pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.goal-ring .pct span { font-size: 16px; color: var(--muted); font-weight: 600; margin-inline-start: 1px; }
.goal-meta { display: flex; flex-direction: column; gap: 8px; margin-top: auto; font-size: 12.5px; color: var(--muted); }
.goal-meta div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.goal-meta b { color: var(--text); font-weight: 600; }

/* Lists */
.list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.list-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 8px 6px;
  border-radius: 12px;
}
.list-row:hover { background: rgba(255,255,255,0.03); }
.thumb {
  width: 38px; height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
}
.list-row .name { font-size: 13.5px; font-weight: 600; }
.list-row .meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.list-row .end { text-align: end; font-size: 13px; font-weight: 700; }
.list-row .end small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }

.channel-bars { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.ch-row .ch-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.ch-row .ch-top span { color: var(--muted); }
.track {
  height: 10px;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  overflow: hidden;
}
.track i {
  display: block;
  height: 100%;
  border-radius: 999px;
  width: 0;
  transition: width 0.9s cubic-bezier(.22,.8,.28,1);
}

/* ---------- Orders ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.search-field {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.search-field input, .select {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 8px 12px;
  padding-inline-start: 36px;
  font-size: 13px;
  outline: none;
}
.search-field input:focus, .select:focus { border-color: rgba(62, 224, 197, 0.45); }
.search-field svg {
  position: absolute; inset-inline-start: 10px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--faint);
}
.select { width: auto; padding: 8px 12px; min-width: 140px; appearance: auto; background: var(--card-solid); }

.tabs { display: inline-flex; gap: 4px; background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.tabs button { padding: 6px 12px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--muted); }
.tabs button.active { background: rgba(255,255,255,0.08); color: var(--text); }

.kanban {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  align-items: start;
  min-height: 0;
  flex: 1;
  padding-bottom: 8px;
}
.column {
  background: rgba(8, 12, 22, 0.55);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 10px 14px;
  min-height: 420px;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.column.hot {
  border-color: rgba(62, 224, 197, 0.45);
  background: rgba(62, 224, 197, 0.06);
  box-shadow: inset 0 0 0 1px rgba(62, 224, 197, 0.15);
}
.col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 0 4px;
}
.col-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.col-head h3 { font-size: 13.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.col-head .hint { font-size: 11px; color: var(--faint); font-weight: 500; }
.count-pill {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  color: var(--muted);
}
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.new { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.dot.packing { background: var(--blue); box-shadow: 0 0 8px var(--blue); }
.dot.shipped { background: var(--violet); box-shadow: 0 0 8px var(--violet); }
.dot.delivered { background: var(--green); box-shadow: 0 0 8px var(--green); }

.cards { display: flex; flex-direction: column; gap: 8px; min-height: 80px; }
.order-card {
  background: linear-gradient(180deg, rgba(24, 34, 56, 0.96), rgba(16, 24, 42, 0.96));
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 11px 12px 12px;
  cursor: grab;
  box-shadow: 0 8px 18px rgba(0,0,0,0.22);
  transition: transform 0.22s cubic-bezier(.22,.8,.28,1), box-shadow 0.22s, border-color 0.2s, opacity 0.2s;
  user-select: none;
  touch-action: none;
}
.order-card:hover { border-color: rgba(62, 224, 197, 0.28); transform: translateY(-1px); }
.order-card:active { cursor: grabbing; }
.order-card.dragging {
  opacity: 0.35;
  transform: scale(0.98);
}
.order-card.ghost { width: 260px; }
.oc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.oid { font-size: 11.5px; font-weight: 700; color: var(--teal); letter-spacing: 0.01em; }
.otime { font-size: 11px; color: var(--faint); }
.oc-who { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.oc-who .avatar { width: 28px; height: 28px; font-size: 10px; }
.oc-who .nm { font-size: 13px; font-weight: 600; }
.oc-who .pr { font-size: 11.5px; color: var(--muted); margin-top: 1px; line-height: 1.4; }
.oc-bot { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.amount { font-size: 13px; font-weight: 700; }
.ch-tag {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  border: 1px solid var(--line);
}
.ch-tag.web { color: var(--teal); border-color: rgba(62,224,197,0.25); background: var(--teal-dim); }
.ch-tag.instagram { color: var(--gold); border-color: rgba(240,180,41,0.25); background: var(--gold-dim); }
.ch-tag.store { color: #c4b8ff; border-color: rgba(139,124,255,0.3); background: var(--violet-dim); }
.note-chip {
  margin-top: 8px;
  font-size: 11px;
  color: #fde68a;
  background: rgba(240, 180, 41, 0.1);
  border-radius: 8px;
  padding: 4px 8px;
}

/* Orders table */
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
table.orders {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.orders th {
  text-align: start;
  font-weight: 600;
  color: var(--muted);
  font-size: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.orders td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.orders tr:last-child td { border-bottom: 0; }
table.orders tr:hover td { background: rgba(255,255,255,0.025); }
.status-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
}

/* Products / customers */
.page-head { margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.product-card, .person-card {
  padding: 16px;
}
.product-card h3, .person-card h3 { font-size: 14.5px; font-weight: 700; margin-bottom: 4px; }
.muted { color: var(--muted); font-size: 12.5px; }
.stock-ok { color: var(--green); font-weight: 600; }
.stock-low { color: var(--gold); font-weight: 600; }
.kv { display: flex; justify-content: space-between; margin-top: 10px; font-size: 13px; }
.price { font-weight: 700; font-size: 15px; }

.settings-list { max-width: 640px; display: flex; flex-direction: column; gap: 12px; }
.settings-list .card p { color: var(--muted); font-size: 13.5px; line-height: 1.8; margin: 6px 0 12px; }

.empty {
  text-align: center;
  color: var(--muted);
  padding: 28px 8px;
  font-size: 13px;
}

/* Demo helpers */
body.demo .order-card { transition: transform 0.55s cubic-bezier(.22,.8,.28,1), box-shadow 0.3s; }

/* Responsive */
@media (max-width: 1180px) {
  .overview-grid { grid-template-columns: 1fr 1fr; }
  .span-2 { grid-column: span 2; }
  .kanban { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    width: var(--sidebar-w);
    z-index: 20;
    transform: translateX(calc(var(--dir-sign, 1) * 100%));
    transition: transform 0.25s ease;
  }
  .sidebar.open { transform: none; }
  .overview-grid { grid-template-columns: 1fr; }
  .span-1, .span-2 { grid-column: span 1; }
  .kanban { grid-template-columns: 1fr; }
  .stat .value { font-size: 24px; }
}


/* ---------- Drag lift (widgets + kanban) ---------- */
.widget-ghost,
.order-card.ghost {
  position: fixed;
  z-index: 80;
  pointer-events: none;
  margin: 0;
  transform: scale(1.04) rotate(-2deg);
  box-shadow:
    0 28px 60px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(62, 224, 197, 0.28);
  cursor: grabbing;
}
.widget-ghost {
  border-radius: var(--radius);
  overflow: hidden;
}
.is-placeholder {
  opacity: 0.32;
  transform: scale(0.98);
  pointer-events: none;
  box-shadow: none;
}
body.is-dragging-widget, body.is-dragging-widget * { cursor: grabbing !important; }

/* Simulated demo cursor — visible white pointer */
.demo-cursor {
  position: fixed;
  top: 0; left: 0;
  z-index: 90;
  width: 36px; height: 36px;
  pointer-events: none;
  transform: translate(-20px, -20px);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.45));
  transition: none;
  will-change: transform;
}
.demo-cursor.down { transform-origin: 4px 3px; }
.demo-cursor.down svg { transform: scale(0.88); }
body.cursor-on, body.cursor-on * { cursor: none !important; }


/* ---------- Language toggle (FA | EN) ---------- */
.lang-toggle {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  direction: ltr;               /* fixed order: فارسی | English, so the thumb slides the same way in both languages */
  height: 38px;
  padding: 3px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  flex: 0 0 auto;
}
.lang-toggle button {
  position: relative;
  z-index: 1;
  min-width: 76px;
  padding: 0 14px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  transition: color 0.25s;
  white-space: nowrap;
}
.lang-toggle button:hover { color: var(--text); }
.lang-toggle[data-lang="fa"] button[data-lang="fa"],
.lang-toggle[data-lang="en"] button[data-lang="en"] { color: #042822; }
.lang-toggle .lt-thumb {
  position: absolute;
  z-index: 0;
  top: 3px; bottom: 3px; left: 3px;
  width: calc((100% - 6px) / 2);
  border-radius: 9px;
  background: linear-gradient(180deg, #5af0d6, #2ac4ad);
  box-shadow: 0 6px 16px rgba(62, 224, 197, 0.32);
  transition: transform 0.42s cubic-bezier(0.34, 1.45, 0.64, 1);
}
.lang-toggle[data-lang="en"] .lt-thumb { transform: translateX(100%); }

/* English / LTR: Latin text reads better with slightly tighter tracking */
html[dir="ltr"] { --dir-sign: -1; }
html[dir="ltr"] .stat .value,
html[dir="ltr"] .live-number,
html[dir="ltr"] .goal-ring .pct { letter-spacing: -0.01em; }
html[dir="ltr"] .brand-text strong { letter-spacing: 0; }

/* Smooth language switch: content fades/blurs out, swaps while hidden, fades back in */
.sidebar,
.main > .view,
.topbar .greet,
.top-actions > :not(.lang-toggle) {
  transition: opacity 0.19s ease, filter 0.19s ease, transform 0.19s ease;
}
body.lang-out .sidebar,
body.lang-out .main > .view,
body.lang-out .topbar .greet,
body.lang-out .top-actions > :not(.lang-toggle) {
  opacity: 0.1;
  filter: blur(5px);
  transform: translateY(6px);
}
body.lang-in .sidebar,
body.lang-in .main > .view,
body.lang-in .topbar .greet,
body.lang-in .top-actions > :not(.lang-toggle) {
  transition: opacity 0.36s ease, filter 0.36s ease, transform 0.36s cubic-bezier(.22,.8,.28,1);
}
@media (prefers-reduced-motion: reduce) {
  .sidebar, .main > .view, .topbar .greet, .top-actions > :not(.lang-toggle) { transition: none !important; }
}

/* Card headers: title sits next to the drag grip (start edge); extras (range toggle, live badge) go to the end edge */
.card-kicker { justify-content: flex-start; }
.card-kicker > :not(.grip):not(.card-title) { margin-inline-start: auto; }
.live-head { justify-content: flex-start; gap: 0; }
.live-head .live-dot { margin-inline-start: auto; }

/* Reel / ?demo=1: make the language switch easy to spot on a small screen */
body.demo .lang-toggle {
  height: 46px;
  box-shadow: 0 0 0 2px rgba(62, 224, 197, 0.35), 0 0 26px rgba(62, 224, 197, 0.35);
}
body.demo .lang-toggle button { font-size: 15.5px; min-width: 96px; }
.btn { white-space: nowrap; }
