/* SHAKO panels UX 2026-11-12: simpler create / edit / renew dialogs and calmer subscriber page.
 * Visual only. Egypt = blue, International = purple (same tokens as the points badges). RTL-first, logical props. */
:root { --ux-egypt: #1764d8; --ux-egypt-bg: #eaf2ff; --ux-intl: #8a45d1; --ux-intl-bg: #f4ecfd; --ux-danger: #c62f4b;
  --ux-danger-bg: #fdecef; --ux-warn: #a15c00; --ux-warn-bg: #fff4e0; }

/* ---------------------------------------------------------------- subscription type: two clear choices */
.market-choices { border: 0; padding: 0; margin: 0 0 4px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; min-width: 0; }
.market-choices legend { font-weight: 700; font-size: .9rem; margin-bottom: 8px; padding: 0; color: var(--ink, #1c1a3a); }
.market-choice { position: relative; display: flex !important; align-items: flex-start; gap: 10px; padding: 12px 14px;
  border: 1.5px solid var(--line-strong, #dddaf0); border-radius: 12px; background: #fff; cursor: pointer; margin: 0;
  transition: border-color .15s, background-color .15s, box-shadow .15s; min-width: 0; }
.market-choice input { margin: 3px 0 0; width: 18px; height: 18px; flex: none; accent-color: var(--brand, #5354df); }
.market-choice-body { display: grid; gap: 2px; min-width: 0; }
.market-choice-body strong { font-size: 1rem; }
.market-choice-body small { color: var(--muted, #6c6a86); font-size: .8rem; font-weight: 500; }
.market-choice .market-balance { font-weight: 700; }
.market-choice.market-egypt .market-choice-body strong, .market-choice.market-egypt .market-balance { color: var(--ux-egypt); }
.market-choice.market-worldwide .market-choice-body strong, .market-choice.market-worldwide .market-balance { color: var(--ux-intl); }
.market-choice.market-egypt:has(input:checked) { border-color: var(--ux-egypt); background: var(--ux-egypt-bg); box-shadow: 0 0 0 3px rgba(23, 100, 216, .12); }
.market-choice.market-worldwide:has(input:checked) { border-color: var(--ux-intl); background: var(--ux-intl-bg); box-shadow: 0 0 0 3px rgba(138, 69, 209, .12); }
.market-choice:has(input:focus-visible) { outline: 2px solid var(--brand, #5354df); outline-offset: 2px; }

/* ---------------------------------------------------------------- «خيارات إضافية» / collapsible groups */
.create-form { display: grid; gap: 14px; }
.create-more, .edit-group { border: 1px solid var(--line, #ebe9f4); border-radius: 12px; background: var(--soft, #fbfbfe); }
.create-more > summary, .edit-group > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 4px 10px; padding: 12px 14px; font-weight: 700; border-radius: 12px; }
.create-more > summary::-webkit-details-marker, .edit-group > summary::-webkit-details-marker { display: none; }
.create-more > summary::before, .edit-group > summary::before { content: "+"; display: inline-grid; place-items: center; width: 22px; height: 22px;
  border-radius: 6px; background: var(--brand-50, #f1f1fe); color: var(--brand, #5354df); font-weight: 800; flex: none; }
.create-more[open] > summary::before, .edit-group[open] > summary::before { content: "−"; }
.create-more > summary small, .edit-group > summary small { font-weight: 500; color: var(--muted, #6c6a86); font-size: .8rem; }
.create-more > summary:hover, .edit-group > summary:hover { background: var(--brand-50, #f1f1fe); }
.create-more > summary:focus-visible, .edit-group > summary:focus-visible { outline: 2px solid var(--brand, #5354df); outline-offset: 2px; }
.create-more-body { padding: 4px 14px 14px; display: grid; gap: 12px; }
.edit-group[open] { background: #fff; }
.edit-group > :not(summary) { margin-inline: 14px; }
.edit-group > :last-child { margin-bottom: 14px; }
.password-auto-hint { display: block; margin-top: 4px; font-size: .78rem; }

/* ---------------------------------------------------------------- what an action changes */
.impact-tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; vertical-align: middle; }
.impact-credentials { background: var(--ux-danger-bg); color: var(--ux-danger) !important; }
.impact-points, .impact-expiry { background: var(--ux-warn-bg); color: var(--ux-warn) !important; }
h3 .impact-tag { margin-inline-start: 6px; }

/* ---------------------------------------------------------------- facts line + renewal summary */
.subscriber-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 4px 0 12px; font-size: .88rem; color: var(--muted, #6c6a86); }
.subscriber-facts bdi { color: var(--ink, #1c1a3a); font-weight: 700; }
.renew-summary:empty { display: none; }
.renew-summary { display: grid; grid-template-columns: 1fr auto 1fr 1.2fr; gap: 10px; align-items: center; padding: 12px 14px;
  border: 1px solid var(--line, #ebe9f4); border-radius: 12px; background: #fff; }
.renew-summary > div { display: grid; gap: 2px; min-width: 0; }
.renew-summary span, .renew-summary small { color: var(--muted, #6c6a86); font-size: .78rem; }
.renew-summary strong { font-size: .95rem; }
.renew-arrow { font-size: 1.3rem; color: var(--brand, #5354df); }
html[dir="ltr"] .renew-arrow { transform: scaleX(-1); }
@media (max-width: 640px) {
  .renew-summary { grid-template-columns: 1fr auto 1fr; }
  .renew-summary > div:last-child { grid-column: 1 / -1; border-top: 1px solid var(--line, #ebe9f4); padding-top: 8px; }
  .market-choices { grid-template-columns: 1fr 1fr; gap: 8px; }
  .market-choice { padding: 10px; }
}

/* ---------------------------------------------------------------- subscriber page: calmer bulk clean-up, separated delete */
.danger-outline { color: var(--ux-danger) !important; border-color: #f1c4cd !important; background: #fff !important; }
.danger-outline:hover { background: var(--ux-danger-bg) !important; }
.crossview-entry.cv-compact { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 18px; margin-top: 16px; box-shadow: none; }
.crossview-entry.cv-compact .cv-entry-text strong { font-size: .95rem; }
.crossview-entry.cv-compact .cv-entry-text p { margin: 2px 0 0; }
/* Delete stays in the row (owner decision A3) but is set apart from everyday actions. */
.subscriber-actions [data-mode="delete"], .account-action-group [data-mode="delete"] { margin-inline-start: 10px; position: relative; }
.subscriber-actions [data-mode="delete"]::before, .account-action-group [data-mode="delete"]::before { content: ""; position: absolute;
  inset-inline-start: -7px; top: 15%; bottom: 15%; width: 1px; background: var(--line-strong, #dddaf0); }

/* A plain Reseller only ever sees its own panel: the «جهة الإدارة» column repeats its own name on every row. */
.subscriber-table.own-panel-only th:nth-child(3), .subscriber-table.own-panel-only td:nth-child(3) { display: none; }
/* Collapsible groups inside the edit dialog: no double padding from .modal-section. */
.modal-section.edit-group { padding: 0; }
