/* =====================================================================
   AdRewards admin — "pro" skin (3.41).  Loaded AFTER app + ux css.  Every rule lives under .admin-ui: the member / public pages are untouched.
   Goals: a confident, flat data-product look — borders carry structure, shadow is reserved for things that actually float
   (hover lift, popovers); one small shape vocabulary (pill / 8px / 12px) instead of one radius stamped on everything;
   dense readable tables; info notes folded to one line; real status chips. Same classes as 3.18 — values only, no JS changes needed.
   ===================================================================== */
.admin-ui {
  --p-bg: #f3f4f7;
  --p-card: #ffffff;
  --p-sunken: #f1f2f6;
  --p-line: #e3e6ec;
  --p-line-2: #d6dae3;
  --p-row: #eef0f4;
  --p-ink: #11141b;
  --p-ink-2: #3c4452;
  --p-muted: #818a9a;
  --p-gold: #e8b93c;
  --p-gold-ink: #7a5a06;
  --p-shadow: 0 1px 2px rgba(15, 20, 32, .05), 0 1px 1px rgba(15, 20, 32, .04);
  --p-shadow-up: 0 2px 4px rgba(15, 20, 32, .07), 0 12px 28px rgba(15, 20, 32, .10);
  --a-radius: 12px;
  --a-radius-sm: 8px;
  --a-pad: 20px;
  --a-gap: 16px;
  color: var(--p-ink);
  background: var(--p-bg);
  font-size: 14px;
  font-feature-settings: "tnum" 1, "cv11" 1;
}
.admin-ui ::selection { background: rgba(232, 185, 60, .35); }
.admin-ui .main { background: var(--p-bg); }
.admin-ui .tabular, .admin-ui .table td, .admin-ui .kpi b, .admin-ui .rv-tile .v { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- sidebar */
.admin-ui .sidebar {
  width: 248px; padding: 18px 12px 14px;
  background: linear-gradient(180deg, #14161c 0%, #1a1d26 100%);
  border-inline-end: 1px solid rgba(255, 255, 255, .05);
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .14) transparent;
}
.admin-ui.shell { grid-template-columns: 248px minmax(0, 1fr); }
@media (max-width: 900px) { .admin-ui.shell { grid-template-columns: minmax(0, 1fr); } }
.admin-ui .sidebar::-webkit-scrollbar { width: 6px; }
.admin-ui .sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); border-radius: 6px; }
.admin-ui .sidebar .logo { padding: 2px 10px 14px; font-size: 17px; }
.admin-ui .sidebar input {
  height: 36px; border-radius: var(--a-radius-sm); border: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .045);
  color: #fff; font-size: 13px; padding: 0 12px; transition: border-color .15s, background .15s;
}
.admin-ui .sidebar input::placeholder { color: rgba(255, 255, 255, .38); }
.admin-ui .sidebar input:focus { outline: none; border-color: rgba(232, 185, 60, .55); background: rgba(255, 255, 255, .07); box-shadow: none; }
.admin-ui .side-link { padding: 8px 10px; border-radius: var(--a-radius-sm); font-size: 13.5px; font-weight: 500; gap: 10px; color: rgba(255, 255, 255, .6); transition: background .15s, color .15s; }
.admin-ui .side-link svg { width: 17px; height: 17px; opacity: .85; }
.admin-ui .side-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.admin-ui .side-link.active { background: rgba(232, 185, 60, .15); color: #fcd670; font-weight: 600; }
.admin-ui .side-link.active svg { opacity: 1; }
.admin-ui .side-link.active::before { inset-inline-start: -12px; top: 9px; bottom: 9px; width: 2px; border-radius: 2px; background: var(--p-gold); }
.admin-ui .side-link .count { min-width: 20px; height: 20px; font-size: 11px; box-shadow: 0 0 0 3px rgba(232, 185, 60, .14); }
.admin-ui .side-sep { margin: 18px 10px 5px; font-size: 10px; letter-spacing: .15em; color: rgba(255, 255, 255, .32); font-weight: 600; }
.admin-ui .side-foot { border-top-color: rgba(255, 255, 255, .07); }

/* ---------------------------------------------------------------- top bar + page head */
.admin-ui .topbar {
  padding: 8px 28px; min-height: 54px;
  background: rgba(243, 244, 247, .82); backdrop-filter: saturate(1.5) blur(14px); -webkit-backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid var(--p-line);
}
.admin-ui .topbar .badge-dark {
  background: #fff; color: var(--p-ink-2); border: 1px solid var(--p-line); font-weight: 600; padding: 4px 11px 4px 9px; gap: 7px;
}
.admin-ui .topbar .badge-dark::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .18); }
.admin-ui .content { max-width: 1280px; padding: 6px 28px 80px; }
.admin-ui .page-head { margin: 14px 0 18px; padding-bottom: 0; border-bottom: 0; }
.admin-ui .page-head h1 { font-size: 24px; font-weight: 680; letter-spacing: -.016em; color: var(--p-ink); }
.admin-ui .page-head .icon-btn { background: #fff; border: 1px solid var(--p-line); }
.admin-ui .page-head .icon-btn:hover { background: var(--p-sunken); border-color: var(--p-line-2); }

/* ---------------------------------------------------------------- cards: border carries the shape, shadow is not the default */
.admin-ui .card { background: var(--p-card); border: 1px solid var(--p-line); border-radius: var(--a-radius); padding: var(--a-pad); box-shadow: none; }
.admin-ui .card h3 { font-size: 15.5px; font-weight: 650; letter-spacing: -.005em; }
.admin-ui .card h4 { font-size: 13.5px; font-weight: 650; }
.admin-ui .card .small.muted, .admin-ui .muted.small { color: var(--p-muted); }
.admin-ui details > summary { list-style: none; cursor: pointer; }
.admin-ui details > summary::-webkit-details-marker { display: none; }
.admin-ui details > summary::before { content: "›"; display: inline-block; margin-inline-end: 6px; transition: transform .15s; font-weight: 700; }
.admin-ui details[open] > summary::before { transform: rotate(90deg); }
[dir="rtl"] .admin-ui details > summary::before { content: "‹"; }
[dir="rtl"] .admin-ui details[open] > summary::before { transform: rotate(-90deg); }
.admin-ui .skeleton { border-radius: var(--a-radius-sm); }

/* ---------------------------------------------------------------- KPI tiles: a stat block, not a decorated card */
.admin-ui .kpi { position: relative; background: #fff; border: 1px solid var(--p-line); border-radius: var(--a-radius); padding: 15px 17px 14px; box-shadow: none; transition: box-shadow .2s, border-color .2s, transform .2s; overflow: hidden; }
.admin-ui .kpi:hover { box-shadow: var(--p-shadow-up); border-color: var(--p-line-2); transform: translateY(-1px); }
.admin-ui .kpi .eyebrow { font-size: 11.5px; letter-spacing: .02em; text-transform: none; font-weight: 500; color: var(--p-muted); }
.admin-ui .kpi b { font-size: 27px; font-weight: 680; letter-spacing: -.02em; margin-top: 5px; }
.admin-ui .kpi small { font-size: 12px; }
.admin-ui .kpi.dark { background: linear-gradient(135deg, #1a1d26 0%, #292e3a 100%); border-color: transparent; }
.admin-ui .kpi.dark::after { content: ""; position: absolute; inset-inline-end: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, rgba(232, 185, 60, .28), transparent 70%); }
.admin-ui .kpi.dark .eyebrow { color: rgba(255, 255, 255, .6); }
.admin-ui .kpi.dark small { color: rgba(255, 255, 255, .6); }
.admin-ui .ov-h { margin: 12px 0 -4px; font-size: 11.5px; letter-spacing: .1em; font-weight: 650; }
.admin-ui .ov-status { border-radius: var(--a-radius); box-shadow: none; border: 1px solid var(--p-line); }
.admin-ui .ov-list { border-radius: var(--a-radius); box-shadow: none; border: 1px solid var(--p-line); }
.admin-ui .ov-qa-item { background: #fff; border: 1px solid var(--p-line); box-shadow: none; transition: border-color .15s, box-shadow .15s; }
.admin-ui .ov-qa-item:hover { border-color: var(--p-line-2); box-shadow: var(--p-shadow); }

/* ---------------------------------------------------------------- tables */
.admin-ui .table-wrap { background: #fff; border: 1px solid var(--p-line); border-radius: var(--a-radius); box-shadow: none; }
.admin-ui .table { font-size: 13.5px; }
.admin-ui .table th { background: var(--p-sunken); color: var(--p-muted); font-size: 11px; font-weight: 650; letter-spacing: .06em; padding: 10px 14px; border-bottom: 1px solid var(--p-line); }
.admin-ui .table td { padding: 11px 14px; border-bottom: 1px solid var(--p-row); }
.admin-ui .table tr:last-child td { border-bottom: 0; }
.admin-ui .table tr:hover td { background: var(--p-sunken); }
.admin-ui .table td strong { font-weight: 600; }
.admin-ui .table td .small { font-size: 12px; line-height: 1.35; }

/* ---------------------------------------------------------------- badges, segmented, tabs */
.admin-ui .badge { font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; letter-spacing: 0; }
.admin-ui .badge-green { background: #e5f6ec; color: #15803d; }
.admin-ui .badge-red { background: #fdebeb; color: #b91c1c; }
.admin-ui .badge-orange { background: #fdf0df; color: #b45309; }
.admin-ui .badge-blue { background: #e8effd; color: #1d4ed8; }
.admin-ui .badge-gold { background: #fcf1d0; color: #7a5a06; }
.admin-ui .badge-neutral { background: #eef0f4; color: #4b5563; }
.admin-ui .segmented { background: #e9ebf0; border-radius: var(--a-radius-sm); padding: 3px; gap: 2px; }
.admin-ui .segmented button { padding: 7px 14px; font-size: 13px; border-radius: 6px; font-weight: 600; color: var(--p-muted); }
.admin-ui .segmented button:hover { color: var(--p-ink); }
.admin-ui .segmented button.active { background: #fff; color: var(--p-ink); box-shadow: 0 1px 2px rgba(15, 20, 32, .1), 0 1px 6px rgba(15, 20, 32, .06); }
.admin-ui .tabs button { font-size: 13.5px; }
.admin-ui .tabs button.active { border-bottom-width: 2px; border-bottom-color: var(--p-gold); }

/* ---------------------------------------------------------------- forms + buttons */
.admin-ui .field-label { font-size: 12.5px; font-weight: 600; color: var(--p-ink-2); }
.admin-ui .input, .admin-ui .select, .admin-ui .textarea { height: 38px; border: 1px solid var(--p-line-2); border-radius: var(--a-radius-sm); background: #fff; transition: border-color .15s, box-shadow .15s; }
.admin-ui .textarea { height: auto; }
.admin-ui .input:hover, .admin-ui .select:hover, .admin-ui .textarea:hover { border-color: #c3c9d6; }
.admin-ui .input:focus, .admin-ui .select:focus, .admin-ui .textarea:focus { outline: none; border-color: var(--p-gold); box-shadow: 0 0 0 3px rgba(232, 185, 60, .2); }
.admin-ui .input:disabled { background: var(--p-sunken); color: var(--p-muted); }
.admin-ui .btn { --h: 38px; border-radius: var(--a-radius-sm); font-weight: 600; letter-spacing: 0; }
.admin-ui .btn-sm { --h: 32px; border-radius: 7px; }
.admin-ui .btn-gold { background: var(--p-gold); color: #231a02; box-shadow: none; }
.admin-ui .btn-gold:hover { background: #efc24b; box-shadow: none; }
.admin-ui .btn-soft, .admin-ui .btn-ghost { background: #fff; border: 1px solid var(--p-line-2); color: var(--p-ink-2); }
.admin-ui .btn-soft:hover, .admin-ui .btn-ghost:hover { background: var(--p-sunken); border-color: #c3c9d6; }
.admin-ui .btn-dark { background: #1a1d26; }
.admin-ui .btn:hover { transform: none; }
.admin-ui :focus-visible { outline: 2px solid rgba(232, 185, 60, .75); outline-offset: 2px; }
.admin-ui .table-wrap::-webkit-scrollbar, .admin-ui .tabs::-webkit-scrollbar { height: 8px; }
.admin-ui .table-wrap::-webkit-scrollbar-thumb { background: #d4d8e0; border-radius: 8px; }

/* ---------------------------------------------------------------- notices: only the ones that matter stay loud */
.admin-ui .notice { border-radius: var(--a-radius-sm); font-size: 13px; padding: 9px 12px; line-height: 1.5; }
.admin-ui .notice-ok { background: #f0faf4; color: #166534; border-color: #c9ecd6; }
.admin-ui .notice-err { background: #fef2f2; color: #991b1b; border-color: #f6cccc; }
.admin-ui .notice-blue { background: #eff4ff; color: #1e40af; border-color: #d3e0fb; }
/* info notes: one quiet line, a click opens the whole text */
.admin-ui .notice-info {
  position: relative; cursor: pointer; background: transparent; border: 1px dashed var(--p-line-2); color: var(--p-muted);
  max-height: 37px; overflow: hidden; padding-block: 8px; align-items: center; transition: max-height .2s ease, background .15s;
}
.admin-ui .notice-info:hover { background: rgba(15, 20, 32, .025); }
.admin-ui .notice-info > div { flex: 1; min-width: 0; }
.admin-ui .notice-info:not(.open) > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-ui .notice-info::after { content: "⌄"; position: absolute; inset-inline-end: 12px; top: 5px; font-size: 14px; opacity: .45; font-weight: 700; pointer-events: none; }
.admin-ui .notice-info.open { max-height: 900px; align-items: flex-start; background: var(--p-sunken); color: var(--p-ink-2); }
.admin-ui .notice-info.open::after { content: "⌃"; }
.admin-ui .notice-info svg { margin-top: 0; opacity: .7; }
.admin-ui .notice-info.open svg { margin-top: 1px; }

/* ---------------------------------------------------------------- live videos (admin → Ads) */
.admin-ui .rv-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.admin-ui .rv-head h3 { display: flex; align-items: center; gap: 8px; }
.admin-ui .rv-live { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: #15803d; background: #e5f6ec; border-radius: 999px; padding: 3px 10px; }
.admin-ui .rv-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; animation: rvPulse 1.8s infinite; }
@keyframes rvPulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .5); } 70% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.admin-ui .rv-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.admin-ui .rv-tile { border: 1px solid var(--p-line); border-radius: var(--a-radius); padding: 11px 14px; background: #fff; }
.admin-ui .rv-tile .l { font-size: 11.5px; color: var(--p-muted); font-weight: 500; }
.admin-ui .rv-tile .v { font-size: 21px; font-weight: 650; letter-spacing: -.015em; margin-top: 2px; line-height: 1.25; }
.admin-ui .rv-tile .s { font-size: 11.5px; color: var(--p-muted); }
.admin-ui .rv-tile.good .v { color: #15803d; }
.admin-ui .rv-tile.bad .v { color: #b91c1c; }
.admin-ui .rv-chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--p-line-2); background: #fff; border-radius: 999px; padding: 4px 12px 4px 9px; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--p-ink-2); transition: border-color .15s, background .15s; }
.admin-ui .rv-chip:hover { border-color: #b7bfce; background: var(--p-sunken); }
.admin-ui .rv-chip i { width: 8px; height: 8px; border-radius: 50%; background: #9aa3b5; display: inline-block; }
.admin-ui .rv-chip.ok i { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .18); }
.admin-ui .rv-chip.warn i { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, .2); }
.admin-ui .rv-chip.bad i { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, .18); }
.admin-ui .rv-chip.warn { border-color: #f7d9a3; background: #fffaf0; }
.admin-ui .rv-chip.bad { border-color: #f6c6c6; background: #fff6f6; }
.admin-ui .rv-user { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.admin-ui .rv-pts { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.admin-ui .rv-pts b { font-size: 15px; font-weight: 650; }
.admin-ui .rv-cut { display: inline-flex; font-size: 10.5px; font-weight: 650; color: #b45309; background: #fdf0df; border-radius: 6px; padding: 1px 7px; cursor: help; }
.admin-ui .rv-st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.admin-ui .rv-st.ok { background: #e5f6ec; color: #15803d; }
.admin-ui .rv-st.wait { background: #eef0f4; color: #6b7385; }
.admin-ui .rv-st.none { background: #fdf0df; color: #b45309; }
.admin-ui .rv-st.off { background: transparent; color: #9aa3b5; padding-inline: 0; font-weight: 500; }
.admin-ui .lvl { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 6px; font-size: 11px; font-weight: 650; line-height: 1.6; background: #eef0f4; color: #4b5563; white-space: nowrap; }
.admin-ui .lvl::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.admin-ui .lvl.l0 { background: #fbeedd; color: #9a4a0f; }
.admin-ui .lvl.l1 { background: #eceff4; color: #475569; }
.admin-ui .lvl.l2 { background: #fcf1d0; color: #7a5a06; }
.admin-ui .lvl.l3 { background: #e0f2f6; color: #0e7490; }
.admin-ui .lvl.l4 { background: #ece8fd; color: #6d28d9; }

/* the checklist behind the status chip */
.admin-ui .dg { border: 1px solid var(--p-line); border-radius: var(--a-radius); background: #fcfcfe; padding: 4px 16px; }
.admin-ui .dg-step { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--p-row); }
.admin-ui .dg-step:last-child { border-bottom: 0; }
.admin-ui .dg-ico { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; margin-top: 1px; background: #eef0f4; color: #6b7385; }
.admin-ui .dg-ico.ok { background: #dcf3e5; color: #15803d; }
.admin-ui .dg-ico.warn { background: #fdecc8; color: #b45309; }
.admin-ui .dg-ico.bad { background: #fde0e0; color: #b91c1c; }
.admin-ui .dg-t { font-weight: 600; font-size: 13.5px; }
.admin-ui .dg-d { font-size: 12.5px; color: var(--p-muted); margin-top: 2px; line-height: 1.55; }
.admin-ui .dg-url { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.admin-ui .dg-url code { direction: ltr; text-align: left; font-size: 11.5px; background: var(--p-sunken); border: 1px solid var(--p-line); border-radius: var(--a-radius-sm); padding: 6px 10px; word-break: break-all; flex: 1; min-width: 220px; }

/* rewards by level */
.admin-ui .lv-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.admin-ui .lv-in { width: 92px; text-align: center; font-weight: 650; font-variant-numeric: tabular-nums; }
.admin-ui .lv-table td { vertical-align: middle; }
.admin-ui .lv-bar { height: 6px; border-radius: 6px; background: #eceef3; overflow: hidden; min-width: 90px; }
.admin-ui .lv-bar > i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #22c55e, #16a34a); }
.admin-ui .lv-bar > i.cut { background: linear-gradient(90deg, #f59e0b, #ea7a0c); }
.admin-ui .lv-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.admin-ui .lv-foot { display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 700px) { .admin-ui .lv-foot { grid-template-columns: 1fr; } }

/* tables that turn into small cards on a phone */
@media (max-width: 720px) {
  .admin-ui .rv-table, .admin-ui .rv-table tbody { display: block; }
  .admin-ui .rv-table thead { display: none; }
  .admin-ui .rv-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; padding: 13px 14px; border-bottom: 1px solid var(--p-row); }
  .admin-ui .rv-table tr:last-child { border-bottom: 0; }
  .admin-ui .rv-table td { display: block; padding: 0 !important; border: 0 !important; background: none !important; min-width: 0 !important; }
  .admin-ui .rv-table td::before { content: attr(data-label); display: block; font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--p-muted); font-weight: 600; margin-bottom: 3px; }
  .admin-ui .rv-table td:first-child { grid-column: 1 / -1; }
  .admin-ui .lv-in { width: 84px; }
}
.admin-ui .card .segmented { align-self: flex-start; max-width: 100%; }
.admin-ui .card .card { box-shadow: none; background: var(--p-sunken); padding: 14px; border-radius: var(--a-radius-sm); border-color: var(--p-line); }

/* ---------------------------------------------------------------- phones */
@media (max-width: 900px) {
  .admin-ui .content { padding: 4px 14px 110px; }
  .admin-ui .topbar { padding: 8px 14px; }
  .admin-ui .page-head h1 { font-size: 21px; }
  .admin-ui .card { padding: 15px; }
  .admin-ui .kpi b { font-size: 22px; }
  .admin-ui .rv-tile .v { font-size: 18px; }
  .admin-ui .table th, .admin-ui .table td { padding-inline: 10px; }
}
@media print { .admin-ui .sidebar, .admin-ui .topbar { display: none; } }

/* link pages v2 — admin editor */
.admin-ui .lp-admin-plan { border: 1px solid var(--p-line); border-radius: var(--a-radius); padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--p-sunken); }

/* =====================================================================================================================
   3.44 — panel navigation: groups that open/close, a real drawer on phones, a page header that stays visible while you scroll
   ===================================================================================================================== */
.admin-ui .side-grp { display: block; }
.admin-ui .side-sep-btn {
  display: flex; align-items: center; gap: 8px; width: 100%; margin: 12px 0 2px; padding: 6px 10px; border: 0; border-radius: 8px;
  background: none; cursor: pointer; text-align: start; font-family: inherit; transition: background .15s, color .15s;
}
.admin-ui .side-sep-btn > span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-ui .side-sep-btn:hover { background: rgba(255, 255, 255, .05); color: rgba(255, 255, 255, .62); }
.admin-ui .side-sep-btn[aria-disabled="true"] { cursor: default; }
.admin-ui .side-sep-btn[aria-disabled="true"]:hover { background: none; color: rgba(255, 255, 255, .32); }
.admin-ui .side-sep-btn:focus-visible { outline: 2px solid rgba(232, 185, 60, .7); outline-offset: 1px; }
.admin-ui .side-chev { flex: none; opacity: .75; transition: transform .22s ease; }
.admin-ui .side-sep-btn[aria-expanded="false"] .side-chev { transform: rotate(-90deg); }
html[dir="rtl"] .admin-ui .side-sep-btn[aria-expanded="false"] .side-chev { transform: rotate(90deg); }
.admin-ui .side-sep-btn[aria-disabled="true"] .side-chev { opacity: .3; }
.admin-ui .side-sep-count {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--p-gold); color: #1a1d24;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0; display: inline-grid; place-items: center;
}
.admin-ui .side-group { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .24s cubic-bezier(.2, .8, .2, 1); }
.admin-ui .side-group.open { grid-template-rows: 1fr; }
.admin-ui .side-group-in {
  min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 3px; margin-inline: -12px; padding-inline: 12px;
  visibility: hidden; transition: visibility 0s linear .24s;
}
.admin-ui .side-group.open .side-group-in { visibility: visible; transition-delay: 0s; }
@media (prefers-reduced-motion: reduce) {
  .admin-ui .side-group, .admin-ui .side-chev, .admin-ui .side-group-in { transition: none; }
}

.admin-ui .admin-nav-backdrop { display: none; }
.admin-ui .admin-nav-btn {
  align-items: center; gap: 10px; height: 40px; max-width: 72vw; padding: 0 14px; border-radius: 10px; position: relative;
  border: 1px solid var(--p-line); background: #fff; color: var(--p-ink); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
}
.admin-ui .admin-nav-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-ui .admin-nav-btn svg { flex: none; }
.admin-ui .admin-nav-dot { position: absolute; top: -3px; inset-inline-end: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--p-gold); border: 2px solid var(--p-bg); }

@media (max-width: 900px) {
  .admin-ui.nav-open .sidebar {
    display: flex !important; position: fixed; top: 0; bottom: 0; inset-inline-start: 0; width: min(86vw, 320px); height: 100dvh; z-index: 70;
    box-shadow: 24px 0 48px rgba(0, 0, 0, .35); animation: adminDrawerIn .24s cubic-bezier(.2, .8, .2, 1);
  }
  html[dir="rtl"] .admin-ui.nav-open .sidebar { box-shadow: -24px 0 48px rgba(0, 0, 0, .35); animation-name: adminDrawerInRtl; }
  .admin-ui .admin-nav-backdrop { display: block; position: fixed; inset: 0; z-index: 60; background: rgba(10, 12, 16, .5); animation: adminFadeIn .2s ease; }
  .admin-ui .side-link { padding: 11px 10px; }            /* thumb-sized rows inside the drawer */
}
@keyframes adminDrawerIn { from { transform: translateX(-24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes adminDrawerInRtl { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes adminFadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (min-width: 901px) {
  .admin-ui .topbar { position: static; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 0; min-height: 0; padding-top: 12px; padding-bottom: 0; }
  .admin-ui .page-head { position: sticky; top: 0; z-index: 25; margin: 0 -10px 14px; padding: 14px 10px 12px; background: var(--p-bg); }
}

/* Arabic: letter-spacing pulls cursive letters apart and the 10-11px caps sizes are too small to read — labels get normal spacing and a size that fits the script */
html[dir="rtl"] .admin-ui .side-sep,
html[dir="rtl"] .admin-ui .ov-h,
html[dir="rtl"] .admin-ui .table th,
html[dir="rtl"] .admin-ui .eyebrow,
html[dir="rtl"] .admin-ui .tools-h,
html[dir="rtl"] .admin-ui .rv-table td::before { letter-spacing: 0; text-transform: none; }
html[dir="rtl"] .admin-ui .side-sep { font-size: 12px; }
html[dir="rtl"] .admin-ui .table th, html[dir="rtl"] .admin-ui .ov-h { font-size: 12.5px; }
