/* ================================================================
   MY DOMAINS — management UX (2026-11-30), shared by EN and AR pages.
   Loaded after my-domains.css / my-domains-ar.css. Logical properties so
   one file works in both directions.
================================================================ */
.mydomains-wrap { max-width: 1000px; }
body.md-lock { overflow: hidden; }

/* ── Summary + tools ── */
.md-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 16px; }
.md-stats { display: flex; flex-wrap: wrap; gap: 10px; }
.md-stats > div { display: flex; align-items: baseline; gap: 8px; padding: 10px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.md-stats b { font-size: 1.15rem; color: var(--text-primary); }
.md-stats span { font-size: 0.76rem; color: var(--text-muted); }
.md-stats > div.warn { border-color: rgba(250, 178, 25, 0.45); }
.md-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.md-search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); }
.md-search input { background: none; border: 0; outline: 0; color: var(--text-primary); font: inherit; font-size: 0.86rem; width: 190px; }
.md-search:focus-within { border-color: var(--border-cyan); }

/* ── Buttons & chips ── */
.md-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 15px; border-radius: 10px; border: 1px solid var(--border); background: rgba(255, 255, 255, 0.04); color: var(--text-primary); font: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; transition: border-color 0.15s, background 0.15s, transform 0.15s; }
.md-btn:hover { border-color: rgba(255, 255, 255, 0.28); }
.md-btn.pri { background: var(--grad-cyan); border-color: transparent; color: #000; }
.md-btn.pri:hover { box-shadow: 0 0 18px rgba(0, 195, 255, 0.35); }
.md-btn.ghost { background: transparent; border-style: dashed; color: var(--text-secondary); }
.md-btn.wide { width: 100%; height: 46px; font-size: 0.9rem; }
.md-btn:disabled { opacity: 0.55; cursor: wait; }
.md-icon { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: transparent; color: var(--text-muted); cursor: pointer; flex-shrink: 0; }
.md-icon:hover { color: #ff7a90; border-color: rgba(255, 122, 144, 0.45); }
.md-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 99px; font-size: 0.72rem; font-weight: 700; white-space: nowrap; background: rgba(255, 255, 255, 0.06); color: var(--text-secondary); }
.md-chip.ok { background: rgba(12, 163, 12, 0.16); color: #5fd35f; }
.md-chip.warn { background: rgba(250, 178, 25, 0.15); color: #fac35a; }
.md-chip.bad { background: rgba(208, 59, 59, 0.18); color: #ff8a8a; }
.md-chip.info { background: rgba(0, 195, 255, 0.12); color: var(--cyan); }

/* ── Domain rows ── */
.md-list { display: flex; flex-direction: column; gap: 10px; }
.md-row { display: grid; grid-template-columns: minmax(0, 1fr) 170px auto auto; align-items: center; gap: 18px; padding: 16px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); transition: border-color 0.15s; }
.md-row:hover { border-color: var(--border-cyan); }
.md-row.is-pending { grid-template-columns: minmax(0, 1fr) auto; border-style: dashed; border-color: rgba(0, 195, 255, 0.35); }
.md-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.md-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: rgba(0, 195, 255, 0.1); color: var(--cyan); font-size: 1.15rem; }
.md-txt { min-width: 0; }
.md-txt h3 { margin: 0; font-size: 1rem; font-weight: 700; color: var(--text-primary); overflow-wrap: anywhere; font-family: "Inter", "Cairo", sans-serif; }
.md-txt p { margin: 3px 0 0; font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }
.md-life small { display: block; margin-top: 6px; font-size: 0.72rem; color: var(--text-muted); }
.md-bar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.md-bar i { display: block; height: 100%; border-radius: 99px; background: var(--cyan); }
.md-bar.warn i { background: #fab219; }
.md-bar.bad i { background: #d03b3b; }
.md-acts { display: flex; gap: 8px; }

/* ── Drawer ── */
.md-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(3, 5, 10, 0.66); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; transition: opacity 0.2s; }
.md-overlay.show { opacity: 1; }
.md-overlay[hidden] { display: none; }
.md-drawer { position: absolute; inset-block: 0; inset-inline-end: 0; width: min(580px, 100vw); display: flex; flex-direction: column; background: #0c0f18; border-inline-start: 1px solid rgba(255, 255, 255, 0.1); box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5); transform: translateX(100%); transition: transform 0.28s var(--ease); }
html[dir="rtl"] .md-drawer { transform: translateX(-100%); }
.md-overlay.show .md-drawer { transform: none; }
.md-d-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 12px; }
.md-d-head h2 { margin: 0 0 8px; font-size: 1.15rem; color: var(--text-primary); overflow-wrap: anywhere; font-family: "Inter", "Cairo", sans-serif; }
.md-x { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: transparent; color: var(--text-secondary); cursor: pointer; flex-shrink: 0; }
.md-x:hover { color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.md-tabs { display: flex; gap: 4px; padding: 0 16px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.md-tabs::-webkit-scrollbar { display: none; }
.md-tabs button { flex: 0 0 auto; padding: 12px 10px; border: 0; background: none; color: var(--text-muted); font: inherit; font-size: 0.84rem; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.md-tabs button:hover { color: var(--text-primary); }
.md-tabs button[aria-selected="true"] { color: var(--text-primary); border-bottom-color: var(--cyan); }
.md-d-body { flex: 1; overflow-y: auto; padding: 20px 22px 28px; }
.md-panel[hidden] { display: none; }
.md-h3 { margin: 0 0 6px; font-size: 1rem; color: var(--text-primary); font-family: "Inter", "Cairo", sans-serif; }
.md-h4 { margin: 22px 0 10px; font-size: 0.8rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; }
.md-hint { margin: 0 0 16px; font-size: 0.8rem; line-height: 1.6; color: var(--text-muted); }
.md-hint a { color: var(--cyan); }
.md-card { padding: 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border); margin: 0 0 14px; }
.md-kv { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 12px 16px; margin: 0; font-size: 0.86rem; }
.md-kv dt { color: var(--text-muted); }
.md-kv dd { margin: 0; color: var(--text-primary); overflow-wrap: anywhere; }
.md-mono { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 0.8rem; }
.md-ok { color: #5fd35f; }
.md-mute { color: var(--text-muted); }
.md-life-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.md-life-card small { display: block; color: var(--text-muted); font-size: 0.74rem; }
.md-life-card b { display: block; font-size: 1.2rem; color: var(--text-primary); margin: 4px 0 2px; }
.md-life-card span { color: var(--text-secondary); font-size: 0.8rem; }
.md-ring { --p: 100; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: conic-gradient(var(--cyan) calc(var(--p) * 1%), rgba(255, 255, 255, 0.08) 0); }
.md-ring.warn { background: conic-gradient(#fab219 calc(var(--p) * 1%), rgba(255, 255, 255, 0.08) 0); }
.md-ring.bad { background: conic-gradient(#d03b3b calc(var(--p) * 1%), rgba(255, 255, 255, 0.08) 0); }
.md-ring span { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: #0c0f18; font-size: 0.82rem; font-weight: 700; color: var(--text-primary); }
.md-quick { display: flex; flex-direction: column; gap: 8px; }
.md-quick > * { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--border); background: rgba(255, 255, 255, 0.02); color: var(--text-primary); font: inherit; font-size: 0.86rem; text-align: start; text-decoration: none; cursor: pointer; }
.md-quick > *:hover { border-color: var(--border-cyan); background: rgba(0, 195, 255, 0.04); }
.md-quick i:first-child { color: var(--cyan); font-size: 1.05rem; }
.md-quick span { flex: 1; }
.md-quick i:last-child { color: var(--text-muted); }

/* Forms in the drawer */
.md-panel input, .md-panel select { height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.04); color: var(--text-primary); font: inherit; font-size: 0.88rem; min-width: 0; width: 100%; }
.md-panel select option { color: #111; }
.md-panel input:focus, .md-panel select:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0, 195, 255, 0.12); }
.md-ns { display: flex; flex-direction: column; gap: 10px; margin: 0 0 14px; }
.md-ns[hidden] { display: none; }
.md-ns-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) 40px; gap: 10px; align-items: center; }
.md-ns-n { font-size: 0.74rem; font-weight: 700; color: var(--text-muted); }
.md-rec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin: 0 0 10px; }
.md-rec-head b { color: var(--text-primary); font-size: 0.88rem; }
.md-rec-head small { color: var(--text-muted); font-size: 0.74rem; }
.md-rec { display: grid; grid-template-columns: 110px minmax(0, 1fr) 96px; gap: 10px; align-items: center; }
.md-rec .md-prio[hidden] { display: none; }
.md-dns-root .md-rec:has(.md-prio[hidden]) { grid-template-columns: 110px minmax(0, 1fr); }
.md-subs { display: flex; flex-direction: column; gap: 10px; margin: 0 0 12px; }
.md-sub { grid-template-columns: 110px 100px minmax(0, 1fr) 40px; }
.md-foot { position: sticky; bottom: -28px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 14px 0 0; margin-top: 4px; background: linear-gradient(to bottom, rgba(12, 15, 24, 0), #0c0f18 30%); }
.md-foot[hidden] { display: none; }
.md-loading { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 0.84rem; padding: 14px 0; }
.md-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.15); border-top-color: var(--cyan); animation: md-spin 0.8s linear infinite; }
@keyframes md-spin { to { transform: rotate(360deg); } }
.md-err { color: #ff8a8a; }

/* Renew */
.md-quote > div:first-child { margin-bottom: 14px; }
.md-quote small { display: block; color: var(--text-muted); font-size: 0.76rem; }
.md-quote b { display: block; font-family: "Orbitron", sans-serif; font-size: 1.9rem; color: var(--text-primary); margin: 6px 0 2px; }
.md-quote span { color: var(--text-secondary); font-size: 0.84rem; }
.md-pay { margin: 0 0 16px; }
.md-paypal { background: #fff; border-radius: 12px; padding: 16px 14px 8px; }
.md-paypal[hidden] { display: none; }
.md-note { font-size: 0.82rem; color: var(--text-secondary); margin: 10px 0 0; min-height: 1em; }
.md-note.bad { color: #ff8a8a; }
.md-center { text-align: center; padding: 28px 18px; }
.md-center p { color: var(--text-secondary); line-height: 1.7; margin: 10px 0 18px; }
.md-big { font-size: 2.4rem; color: var(--cyan); }

/* Toast */
.md-toast { position: fixed; z-index: 1100; inset-inline: 0; margin-inline: auto; inset-block-end: 24px; width: max-content; max-width: calc(100vw - 32px); display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; background: #0b0e1a; border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: 0 16px 44px rgba(0, 0, 0, 0.55); color: #f0f4ff; font-size: 0.84rem; transform: translateY(16px); opacity: 0; pointer-events: none; transition: transform 0.22s, opacity 0.22s; }
.md-toast.show { transform: none; opacity: 1; }
.md-toast.ok i { color: #5fd35f; }
.md-toast.bad i { color: #ff8a8a; }

/* ── Mobile ── */
@media (max-width: 720px) {
  .md-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main main" "life chip" "acts acts"; gap: 12px; padding: 14px; }
  .md-row .md-main { grid-area: main; }
  .md-row .md-chip { grid-area: chip; align-self: center; }
  .md-row .md-life { grid-area: life; }
  .md-row .md-acts { grid-area: acts; }
  .md-row .md-acts .md-btn { flex: 1; }
  .md-row.is-pending { grid-template-areas: "main main" "chip chip"; }
  .md-row.is-pending .md-chip { justify-self: start; }
  .md-top { flex-direction: column; align-items: stretch; }
  .md-tools .md-btn { flex: 1; }
  .md-search { flex: 1 1 100%; }
  .md-search input { width: 100%; }
  .md-drawer { width: 100vw; border: 0; }
  .md-d-head { padding: 16px 16px 10px; }
  .md-d-body { padding: 16px 16px 24px; }
  .md-kv { grid-template-columns: 1fr; gap: 4px; }
  .md-kv dd { margin-bottom: 10px; }
  .md-rec, .md-dns-root .md-rec:has(.md-prio[hidden]) { grid-template-columns: 96px minmax(0, 1fr); }
  .md-rec .md-prio { grid-column: 1 / -1; }
  .md-sub { grid-template-columns: minmax(0, 1fr) 92px 40px; }
  .md-sub .md-val { grid-column: 1 / -1; grid-row: 2; }
  .md-foot .md-btn { flex: 1; }
}

