/* ===== منشئ روابط الحملات — تصميم زجاجي ===== */
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

:root {
  --bg: #f2f3f7;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --faint: #a1a1a6;
  --glass: rgba(255, 255, 255, .58);
  --glass-strong: rgba(255, 255, 255, .8);
  --glass-border: rgba(255, 255, 255, .75);
  --hairline: rgba(0, 0, 0, .08);
  --field: rgba(255, 255, 255, .7);
  --field-focus: rgba(255, 255, 255, .95);
  --blue: #0a7cff;
  --violet: #6e5bff;
  --pink: #e04fd8;
  --cyan: #2fc6f6;
  --green: #1fb85b;
  --orange: #ff8a00;
  --red: #e5383b;
  --on-accent: #fff;
  --menu-bg: rgba(255, 255, 255, .93);
  --grad: linear-gradient(120deg, var(--blue), var(--violet) 55%, var(--pink));
  --blob-1: #8ec5ff; --blob-2: #c6b5ff; --blob-3: #ffc1ec; --blob-4: #9ff0e3;
  --shadow: 0 1px 1px rgba(0,0,0,.03), 0 10px 30px -10px rgba(30, 40, 80, .18);
  --shadow-lg: 0 30px 80px -20px rgba(30, 40, 80, .28);
  --radius: 22px;
  --radius-sm: 14px;
  --ease: cubic-bezier(.32, .72, 0, 1);
  --spring: cubic-bezier(.34, 1.4, .64, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Arabic", "SF Pro Display", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --mono: "SF Mono", ui-monospace, "IBM Plex Mono", Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #05060b; --text: #f5f5f7; --muted: #a1a1aa; --faint: #6b6b74;
    --glass: rgba(28, 30, 40, .52); --glass-strong: rgba(30, 32, 44, .85); --glass-border: rgba(255, 255, 255, .09);
    --hairline: rgba(255, 255, 255, .08); --field: rgba(255, 255, 255, .06); --field-focus: rgba(255, 255, 255, .1);
    --blue: #3d9bff; --violet: #8b7bff; --pink: #f06ae6; --cyan: #5ad8ff; --green: #34d273; --red: #ff5a5f; --menu-bg: rgba(24, 26, 36, .95);
    --blob-1: #1846c9; --blob-2: #5a2bc4; --blob-3: #a1238f; --blob-4: #0c7f84;
    --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 20px 40px -20px rgba(0,0,0,.7);
    --shadow-lg: 0 40px 100px -20px rgba(0,0,0,.8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #05060b; --text: #f5f5f7; --muted: #a1a1aa; --faint: #6b6b74;
  --glass: rgba(28, 30, 40, .52); --glass-strong: rgba(30, 32, 44, .85); --glass-border: rgba(255, 255, 255, .09);
  --hairline: rgba(255, 255, 255, .08); --field: rgba(255, 255, 255, .06); --field-focus: rgba(255, 255, 255, .1);
  --blue: #3d9bff; --violet: #8b7bff; --pink: #f06ae6; --cyan: #5ad8ff; --green: #34d273; --red: #ff5a5f; --menu-bg: rgba(24, 26, 36, .95);
  --blob-1: #1846c9; --blob-2: #5a2bc4; --blob-3: #a1238f; --blob-4: #0c7f84;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 20px 40px -20px rgba(0,0,0,.7);
  --shadow-lg: 0 40px 100px -20px rgba(0,0,0,.8);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4, h5 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--blue); text-decoration: none; }
button { font: inherit; color: inherit; }
code {
  font-family: var(--mono); font-size: .84em; padding: .1em .45em; border-radius: 6px;
  background: var(--field); border: 1px solid var(--hairline); direction: ltr; unicode-bidi: isolate;
}
.hidden { display: none !important; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }

/* ===== خلفية متحركة ===== */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(127,127,127,.14) 1px, transparent 1px); background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 75%);
}
.blob { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(80px); opacity: .55; will-change: transform; }
.blob.b1 { background: var(--blob-1); top: -18vmax; right: -10vmax; animation: drift1 26s var(--ease) infinite alternate; }
.blob.b2 { background: var(--blob-2); top: 10vmax; left: -16vmax; animation: drift2 32s var(--ease) infinite alternate; }
.blob.b3 { background: var(--blob-3); bottom: -22vmax; right: 18vmax; animation: drift3 28s var(--ease) infinite alternate; }
.blob.b4 { background: var(--blob-4); bottom: -10vmax; left: 10vmax; width: 30vmax; height: 30vmax; animation: drift1 36s var(--ease) infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate(-12vmax, 10vmax) scale(1.15); } }
@keyframes drift2 { to { transform: translate(14vmax, 6vmax) scale(.9); } }
@keyframes drift3 { to { transform: translate(-6vmax, -12vmax) scale(1.1); } }

/* ===== الزجاج ===== */
.glass {
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius);
  -webkit-backdrop-filter: blur(28px) saturate(180%); backdrop-filter: blur(28px) saturate(180%);
  box-shadow: var(--shadow);
}

/* ===== الشريط العلوي ===== */
.nav-shell { position: sticky; top: 12px; z-index: 40; padding: 0 16px; }
.nav {
  position: relative; max-width: 1160px; margin: 0 auto; display: flex; align-items: center; gap: 14px;
  padding: 8px 12px 8px 8px; border-radius: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; flex: 0 0 auto; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--grad); display: grid; place-items: center;
  box-shadow: 0 6px 16px -6px var(--violet);
}
.brand-mark svg { width: 19px; height: 19px; fill: none; stroke: #fff; stroke-width: 2.3; stroke-linecap: round; }
.brand b { font-size: 15px; font-weight: 650; white-space: nowrap; }

.segmented {
  position: relative; display: flex; gap: 2px; padding: 3px; margin-inline: auto;
  background: var(--field); border: 1px solid var(--hairline); border-radius: 13px;
}
.segmented::-webkit-scrollbar { display: none; }
.seg-indicator {
  position: absolute; top: 3px; bottom: 3px; right: 0; border-radius: 10px; background: var(--glass-strong);
  box-shadow: 0 2px 8px rgba(0,0,0,.08), 0 0 0 .5px var(--hairline); transition: transform .5s var(--ease), width .5s var(--ease);
  pointer-events: none;
}
.seg {
  position: relative; z-index: 1; border: 0; background: none; cursor: pointer; padding: 7px 14px; border-radius: 10px;
  font-size: 13.5px; font-weight: 550; color: var(--muted); white-space: nowrap; transition: color .3s;
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
}
.seg:hover, .seg.active { color: var(--text); }
.seg .count, .dd-item .count { font-size: 11px; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--hairline); line-height: 18px; text-align: center; }

/* ===== القوائم المنسدلة في الشريط ===== */
.seg-group { position: relative; display: flex; flex: 0 0 auto; }
.seg .chev { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; opacity: .55; margin-inline-start: -2px; transition: transform .5s var(--spring), opacity .2s; }
.seg-group.open .seg { color: var(--text); }
.seg-group.open .chev { transform: rotate(180deg); opacity: 1; }
.dropdown {
  position: absolute; top: calc(100% + 14px); left: 50%; z-index: 60; width: 310px; padding: 8px;
  background: var(--menu-bg); border-radius: 20px; box-shadow: var(--shadow-lg), 0 0 0 .5px var(--hairline);
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translate(-50%, -10px) scale(.94); transform-origin: 50% 0;
  transition: opacity .22s var(--ease), transform .5s var(--spring), visibility 0s linear .5s;
}
/* جسر غير مرئي حتى لا تُغلق القائمة عند نزول المؤشر إليها */
.dropdown::before { content: ""; position: absolute; inset-inline: 0; top: -16px; height: 16px; }
.seg-group.open .dropdown {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0) scale(1);
  transition: opacity .25s var(--ease), transform .55s var(--spring), visibility 0s;
}
.dd-label { font-size: 11.5px; font-weight: 600; color: var(--faint); padding: 6px 10px 4px; letter-spacing: .02em; }
.dd-item {
  display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; cursor: pointer;
  padding: 9px 10px; border-radius: 14px; text-align: start; color: var(--text);
  opacity: 0; transform: translateY(-6px); transition: background .2s, opacity .3s var(--ease), transform .45s var(--spring);
}
.seg-group.open .dd-item { opacity: 1; transform: none; transition-delay: 0s, calc(var(--i, 0) * 45ms + 60ms), calc(var(--i, 0) * 45ms + 60ms); }
.dd-item:hover, .dd-item:focus-visible { background: var(--field); outline: none; }
.dd-item.active { background: color-mix(in srgb, var(--blue) 9%, transparent); }
.dd-ico {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: var(--field); border: 1px solid var(--hairline); color: var(--muted); transition: transform .45s var(--spring), background .3s, color .3s;
}
.dd-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.dd-item:hover .dd-ico { transform: scale(1.08) rotate(-5deg); color: var(--text); }
.dd-item.active .dd-ico { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 14px -6px var(--violet); }
.dd-txt { min-width: 0; }
.dd-txt b { display: block; font-size: 14px; font-weight: 600; line-height: 1.35; }
.dd-txt small { display: block; font-size: 12px; color: var(--muted); line-height: 1.45; }
.dd-item .count { margin-inline-start: auto; }

.user-wrap { position: relative; flex: 0 0 auto; }
.user-btn {
  display: flex; align-items: center; gap: 8px; border: 1px solid var(--hairline); background: var(--field);
  border-radius: 14px; padding: 4px 10px 4px 4px; cursor: pointer; transition: background .2s;
}
.user-btn:hover { background: var(--field-focus); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 13px; flex: 0 0 auto;
}
.user-btn .uname { font-size: 13px; font-weight: 550; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.menu {
  position: absolute; top: calc(100% + 10px); left: 0; width: 250px; padding: 8px; border-radius: 18px; z-index: 50;
  background: var(--glass-strong); transform-origin: top left; animation: pop .35s var(--spring);
}
.menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--hairline); margin-bottom: 6px; }
.menu-head b { display: block; }
.menu-head span { font-size: 12.5px; color: var(--muted); }
.menu button {
  display: flex; width: 100%; align-items: center; gap: 10px; border: 0; background: none; padding: 9px 12px; border-radius: 10px;
  cursor: pointer; text-align: start; font-size: 14px;
}
.menu button:hover { background: var(--field); }
.menu button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .75; }
.menu .danger { color: var(--red); }
@keyframes pop { from { opacity: 0; transform: scale(.92) translateY(-6px); } }

/* ===== العنوان الرئيسي ===== */
.hero { text-align: center; padding: 64px 0 40px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--glass-border); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  animation: rise .9s var(--ease) both;
}
.eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 25%, transparent); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px transparent; } }
.hero h1 { font-size: clamp(32px, 6vw, 60px); font-weight: 750; letter-spacing: -.03em; margin-top: 18px; line-height: 1.15; animation: rise 1s .08s var(--ease) both; }
.grad-text {
  background: var(--grad); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 8s linear infinite;
}
@keyframes shine { to { background-position: 200% center; } }
.hero p { color: var(--muted); font-size: clamp(16px, 2vw, 19px); max-width: 620px; margin: 16px auto 0; animation: rise 1s .16s var(--ease) both; }

/* ===== اللوحات ===== */
.panel { display: none; }
.panel.active { display: block; }
.panel.active .stagger > * { animation: rise .7s var(--ease) both; }
.panel.active .stagger > *:nth-child(2) { animation-delay: .07s; }
.panel.active .stagger > *:nth-child(3) { animation-delay: .14s; }
.panel.active .stagger > *:nth-child(4) { animation-delay: .21s; }
.panel.active .layout > *, .panel.active > details { animation: rise .8s var(--ease) both; }
.panel.active .layout > *:nth-child(2) { animation-delay: .1s; }
.panel.active > details { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.985); filter: blur(6px); } }

.section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.section-title h2 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.section-title p { color: var(--muted); margin-top: 4px; }

.card { padding: 26px; }
.stagger > .card + .card, .col > .card + .card { margin-top: 18px; }
.card h3 { font-size: 17px; font-weight: 650; }
.card-head { margin-bottom: 16px; }
.card-head p { color: var(--muted); font-size: 13.5px; margin-top: 4px; }

.layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.sticky { position: sticky; top: 96px; }

/* ===== الخطوات ===== */
.step { display: grid; grid-template-columns: 34px 1fr; gap: 0 14px; }
.step + .step { margin-top: 26px; padding-top: 26px; border-top: 1px solid var(--hairline); }
.step-num {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px;
  background: var(--field); border: 1px solid var(--hairline); color: var(--muted); transition: all .5s var(--spring);
}
.step.done .step-num { background: var(--grad); color: #fff; border-color: transparent; transform: scale(1.06); box-shadow: 0 6px 16px -6px var(--violet); }
.step-head h3 { margin-top: 3px; }
.step-head p { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.step-body { grid-column: 2; margin-top: 14px; }

/* ===== الحقول ===== */
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
label code { font-weight: 400; color: var(--muted); font-size: 11.5px; margin-inline-start: 4px; }
input[type="text"], input[type="url"], input[type="password"], input[type="search"], input[type="date"], input:not([type]), textarea, select {
  width: 100%; font: inherit; color: var(--text); background: var(--field); border: 1px solid var(--hairline);
  border-radius: var(--radius-sm); padding: 12px 14px; outline: none; transition: background .25s, border-color .25s, box-shadow .25s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, textarea:focus, select:focus {
  background: var(--field-focus); border-color: color-mix(in srgb, var(--blue) 60%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 18%, transparent);
}
input[dir="ltr"], textarea[dir="ltr"] { font-family: var(--mono); font-size: 14px; text-align: left; }
input[dir="ltr"]::placeholder, textarea[dir="ltr"]::placeholder { font-family: var(--font); }
.input-xl { font-size: 17px !important; padding: 16px 18px !important; border-radius: 16px !important; }
input.invalid { border-color: var(--red); box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 15%, transparent); }
.field { margin-bottom: 14px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.hint.error { color: var(--red); }
.hint.success { color: var(--green); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; margin: 10px 0; cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--blue); width: 16px; height: 16px; flex: 0 0 auto; }

/* مفتاح تبديل بأسلوب iOS */
.switch { position: relative; display: inline-block; width: 44px; height: 26px; flex: 0 0 auto; margin: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--hairline); cursor: pointer; transition: background .3s; }
.switch span::after {
  content: ""; position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: transform .4s var(--spring);
}
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(-18px); }
.switch input:disabled + span { opacity: .5; cursor: not-allowed; }

/* ===== بطاقات المنصات ===== */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.tile {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px 12px; cursor: pointer;
  background: var(--field); border: 1px solid var(--hairline); border-radius: 16px;
  transition: transform .45s var(--spring), background .25s, box-shadow .3s; font-size: 13px; font-weight: 600; text-align: center;
}
.tile:hover { transform: translateY(-3px); background: var(--field-focus); box-shadow: var(--shadow); }
.tile:active { transform: scale(.96); }
.tile .ico {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff;
  background: var(--c, var(--blue)); box-shadow: 0 8px 18px -8px var(--c, var(--blue));
}
.tile .ico svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tile small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); font-family: var(--mono); direction: ltr; }
.tile.on { background: var(--field-focus); box-shadow: 0 0 0 2px var(--blue), var(--shadow); }
.tile.on::after {
  content: "✓"; position: absolute; top: 7px; left: 7px; width: 18px; height: 18px; border-radius: 50%; background: var(--blue); color: #fff;
  font-size: 11px; display: grid; place-items: center; animation: pop .4s var(--spring);
}

details.more { margin-top: 22px; border-top: 1px solid var(--hairline); padding-top: 16px; }
details.more summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--blue);
}
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before {
  content: "+"; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--field);
  border: 1px solid var(--hairline); transition: transform .4s var(--spring);
}
details.more[open] summary::before { transform: rotate(45deg); }
details.more[open] .more-body { animation: rise .5s var(--ease); }
.more-body { margin-top: 16px; }

/* ===== الأزرار ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--hairline);
  background: var(--field); color: var(--text); font-weight: 600; font-size: 14px; padding: 10px 18px; border-radius: 999px;
  cursor: pointer; transition: transform .35s var(--spring), background .2s, box-shadow .3s, opacity .2s; white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--field-focus); transform: translateY(-1px); }
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn.primary {
  position: relative; overflow: hidden; border: 0; color: var(--on-accent); background: var(--grad);
  box-shadow: 0 10px 24px -10px var(--violet);
}
.btn.primary::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%);
  transform: translateX(120%); transition: transform .9s var(--ease);
}
.btn.primary:hover::after { transform: translateX(-120%); }
.btn.primary:hover { box-shadow: 0 14px 30px -10px var(--violet); }
.btn.danger { color: var(--red); }
.btn.sm { padding: 6px 12px; font-size: 12.5px; }
.btn.lg { padding: 14px 24px; font-size: 15px; }
.btn.block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ===== بطاقة النتيجة ===== */
.result { position: relative; }
.result.ready::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--angle), var(--blue), var(--violet), var(--pink), var(--cyan), var(--blue));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin 6s linear infinite;
}
@keyframes spin { to { --angle: 360deg; } }
.glow { position: absolute; inset: 12% 8% -6%; z-index: -1; border-radius: 40px; filter: blur(50px); opacity: 0; background: var(--grad); transition: opacity 1s var(--ease); pointer-events: none; }
.result.ready + .glow, .result-col.ready .glow { opacity: .3; }
.result-col { position: relative; }
.result-empty { text-align: center; padding: 30px 10px 20px; color: var(--muted); }
.orb {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: var(--grad); opacity: .9;
  animation: float 4s ease-in-out infinite; display: grid; place-items: center; box-shadow: 0 16px 40px -12px var(--violet);
}
.orb svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; }
@keyframes float { 50% { transform: translateY(-8px); } }
.todo { list-style: none; padding: 0; margin: 16px auto 0; display: inline-flex; flex-direction: column; gap: 8px; text-align: start; font-size: 14px; }
.todo li { display: flex; align-items: center; gap: 10px; transition: color .3s; }
.todo li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--faint); transition: all .4s var(--spring); flex: 0 0 auto; }
.todo li.ok { color: var(--text); }
.todo li.ok::before { background: var(--green); border-color: var(--green); box-shadow: inset 0 0 0 3px var(--glass-strong); }

.url-out {
  font-family: var(--mono); font-size: 13.5px; line-height: 1.7; word-break: break-all; text-align: left; direction: ltr;
  padding: 16px; border-radius: 16px; background: var(--field); border: 1px solid var(--hairline); margin: 14px 0;
}
.url-out .k { color: var(--blue); }
.url-out .v { color: var(--pink); }
.url-out .s { color: var(--faint); }
.url-out.flash { animation: flash .8s var(--ease); }
@keyframes flash { from { background: color-mix(in srgb, var(--blue) 16%, transparent); } }

.sub { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--hairline); }
.sub h4 { font-size: 14px; font-weight: 650; margin-bottom: 10px; }
.inline { display: flex; gap: 8px; align-items: stretch; }
.inline input { flex: 1; min-width: 0; padding: 10px 14px; }
.prefix {
  display: inline-flex; align-items: center; padding: 0 12px; font-family: var(--mono); font-size: 12.5px; color: var(--muted);
  background: var(--field); border: 1px solid var(--hairline); border-radius: var(--radius-sm); max-width: 45%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.short-out {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 12px 14px; border-radius: 14px;
  background: color-mix(in srgb, var(--green) 12%, transparent); border: 1px solid color-mix(in srgb, var(--green) 30%, transparent);
  animation: rise .6s var(--ease);
}
.short-out a { font-family: var(--mono); font-weight: 600; color: var(--green); word-break: break-all; direction: ltr; }
.qr { display: flex; gap: 16px; align-items: center; }
.qr-img { width: 112px; height: 112px; flex: 0 0 auto; background: #fff; border-radius: 16px; padding: 8px; box-shadow: var(--shadow); }
.qr-img svg { width: 100%; height: 100%; display: block; }

.kv { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.kv td { padding: 8px 0; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.kv tr:last-child td { border-bottom: 0; }
.kv td:first-child { color: var(--muted); width: 42%; }
.kv td:last-child { font-family: var(--mono); direction: ltr; text-align: left; word-break: break-all; }
.kv .none { color: var(--faint); }

/* ===== الجداول والقوائم ===== */
.table-scroll { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: start; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 10px; border-bottom: 1px solid var(--hairline); white-space: nowrap; }
table.data td { padding: 12px 10px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data td code { display: block; width: fit-content; margin-top: 4px; }
.mono-cell { font-family: var(--mono); font-size: 12.5px; direction: ltr; text-align: left; word-break: break-all; min-width: 200px; }
.pill {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 550; padding: 2px 10px; border-radius: 999px;
  background: var(--field); border: 1px solid var(--hairline); color: var(--muted); white-space: nowrap;
}
.pill.blue { color: var(--blue); background: color-mix(in srgb, var(--blue) 10%, transparent); border-color: color-mix(in srgb, var(--blue) 25%, transparent); }
.pill.violet { color: var(--violet); background: color-mix(in srgb, var(--violet) 12%, transparent); border-color: color-mix(in srgb, var(--violet) 25%, transparent); }
.pill.green { color: var(--green); background: color-mix(in srgb, var(--green) 12%, transparent); border-color: color-mix(in srgb, var(--green) 25%, transparent); }
.pill.red { color: var(--red); background: color-mix(in srgb, var(--red) 10%, transparent); border-color: color-mix(in srgb, var(--red) 25%, transparent); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }

.alert { border-radius: 14px; padding: 11px 14px; font-size: 14px; margin-top: 8px; border: 1px solid transparent; }
.alert.warn { background: color-mix(in srgb, var(--orange) 12%, transparent); border-color: color-mix(in srgb, var(--orange) 28%, transparent); color: color-mix(in srgb, var(--orange) 70%, var(--text)); }
.alert.error { background: color-mix(in srgb, var(--red) 10%, transparent); border-color: color-mix(in srgb, var(--red) 25%, transparent); color: var(--red); }
.alert.ok { background: color-mix(in srgb, var(--green) 10%, transparent); border-color: color-mix(in srgb, var(--green) 25%, transparent); color: var(--green); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { padding: 20px 22px; }
.stat span { font-size: 13px; color: var(--muted); font-weight: 550; }
.stat b { display: block; font-size: 34px; font-weight: 750; letter-spacing: -.03em; margin-top: 4px; font-variant-numeric: tabular-nums; }

.list { display: flex; flex-direction: column; gap: 12px; }
.item { padding: 18px 20px; transition: transform .45s var(--spring), box-shadow .3s; animation: rise .6s var(--ease) both; }
.item:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.item-top { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; }
.item-main { min-width: 0; flex: 1; }
.item-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.item-link { font-family: var(--mono); font-weight: 600; font-size: 15px; direction: ltr; display: inline-block; word-break: break-all; }
.item-dest { font-family: var(--mono); font-size: 12px; color: var(--muted); direction: ltr; text-align: left; word-break: break-all; margin-top: 4px; }
.clicks { text-align: center; min-width: 76px; }
.clicks b { display: block; font-size: 30px; font-weight: 750; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.clicks span { font-size: 12px; color: var(--muted); }
.item-stats { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 18px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--hairline); font-size: 13px; }
.item-stats h5 { margin: 0 0 8px; font-size: 12px; color: var(--muted); font-weight: 600; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 56px; }
.bars div { flex: 1; border-radius: 4px 4px 2px 2px; background: var(--grad); min-height: 3px; transform-origin: bottom; animation: grow .9s var(--ease) both; }
.bars div[data-v="0"] { background: var(--hairline); }
@keyframes grow { from { transform: scaleY(0); } }
.bar-labels { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--faint); margin-top: 5px; }
.mini { list-style: none; margin: 0; padding: 0; }
.mini li { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; }
.mini b { font-variant-numeric: tabular-nums; }
.item-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.empty-state { text-align: center; padding: 46px 20px; color: var(--muted); }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar input[type="search"] { flex: 1; min-width: 200px; width: auto; }
.mini-seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--field); border: 1px solid var(--hairline); border-radius: 12px; }
.mini-seg button { border: 0; background: none; padding: 6px 14px; border-radius: 9px; cursor: pointer; font-size: 13px; font-weight: 550; color: var(--muted); transition: all .3s var(--ease); }
.mini-seg button.on { background: var(--glass-strong); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.1); }

/* ===== المستخدمون ===== */
.user-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.user-row .avatar { width: 44px; height: 44px; font-size: 17px; }
.user-row .who { flex: 1; min-width: 160px; }
.user-row .who b { display: block; font-size: 15px; }
.user-row .who span { font-size: 12.5px; color: var(--muted); font-family: var(--mono); direction: ltr; display: inline-block; }
.item.inactive { opacity: .6; }
.perm-grid { display: grid; gap: 8px; }
.perm {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 14px;
  background: var(--field); border: 1px solid var(--hairline); font-size: 14px; font-weight: 500; cursor: pointer; margin: 0;
}
.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.role-pick label {
  margin: 0; padding: 14px; border-radius: 14px; background: var(--field); border: 1px solid var(--hairline); cursor: pointer;
  transition: box-shadow .3s, background .2s; font-weight: 600;
}
.role-pick label small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 2px; }
.role-pick input { position: absolute; opacity: 0; }
.role-pick label:has(input:checked) { background: var(--field-focus); box-shadow: 0 0 0 2px var(--blue); }

/* ===== النوافذ المنبثقة ===== */
dialog {
  border: 0; padding: 0; background: transparent; color: var(--text); max-width: min(520px, calc(100% - 32px)); width: 100%;
  margin: auto; overflow: visible;
}
dialog::backdrop { background: rgba(0,0,0,.35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
dialog[open] .sheet { animation: sheet .55s var(--spring); }
@keyframes sheet { from { opacity: 0; transform: translateY(24px) scale(.96); } }
.sheet { padding: 26px; background: var(--glass-strong); max-height: 88vh; overflow: auto; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.sheet-head h3 { font-size: 20px; }
.sheet-foot { display: flex; gap: 8px; margin-top: 20px; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--hairline); background: var(--field); cursor: pointer;
  display: grid; place-items: center; transition: transform .3s var(--spring), background .2s; flex: 0 0 auto;
}
.icon-btn:hover { background: var(--field-focus); }
.icon-btn:active { transform: scale(.9); }
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.tips { margin: 18px 0 0; padding-inline-start: 20px; color: var(--muted); font-size: 14px; }
.tips li { margin: 6px 0; }

/* ===== التنبيه ===== */
.toast {
  position: fixed; bottom: 26px; left: 50%; z-index: 100; transform: translate(-50%, 30px) scale(.95); opacity: 0; pointer-events: none;
  padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 10px;
  background: var(--glass-strong); border: 1px solid var(--glass-border); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  box-shadow: var(--shadow-lg); transition: opacity .3s, transform .55s var(--spring); max-width: calc(100% - 32px);
}
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: 0 0 auto; }
.toast.err::before { background: var(--red); }
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

.footer { text-align: center; color: var(--faint); font-size: 13px; padding: 50px 16px 40px; }

/* ===== صفحة الدخول ===== */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 400px; padding: 38px 30px 30px; text-align: center; animation: sheet .9s var(--spring); }
.auth-card .brand-mark { width: 62px; height: 62px; border-radius: 18px; margin: 0 auto 20px; animation: float 5s ease-in-out infinite; }
.auth-card .brand-mark svg { width: 30px; height: 30px; }
.auth-card h1 { font-size: 26px; font-weight: 750; }
.auth-card > p { color: var(--muted); margin: 6px 0 26px; }
.auth-card form { text-align: start; }
.auth-card .btn { margin-top: 6px; }
.auth-foot { margin-top: 22px; font-size: 12.5px; color: var(--faint); }
.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: rot .7s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }


/* ===== لوحة التحكم ===== */
.viz-root { --series-1: #2a78d6; --series-2: #eb6834; --grid: rgba(0,0,0,.07); }
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) .viz-root { --series-1: #3987e5; --series-2: #d95926; --grid: rgba(255,255,255,.08); } }
:root[data-theme="dark"] .viz-root { --series-1: #3987e5; --series-2: #d95926; --grid: rgba(255,255,255,.08); }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.delta { display: block; font-style: normal; font-size: 12.5px; font-weight: 550; margin-top: 4px; min-height: 18px; }
.delta.up { color: var(--green); }
.delta.down { color: var(--red); }
.chart-card { margin-bottom: 18px; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.chart-head p { font-size: 12.5px; margin-top: 2px; }
.trend { position: relative; height: 260px; }
.trend svg { width: 100%; height: 100%; display: block; overflow: visible; }
.trend .gridline { stroke: var(--grid); stroke-width: 1; }
.trend .axis-label { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.trend .line { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.trend .area { fill: url(#trendFill); }
.trend .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.trend .dot { fill: var(--series-1); stroke: var(--glass-strong); stroke-width: 2; }
.trend .draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.4s var(--ease) forwards; }
.trend .area { animation: fadeIn .9s .4s var(--ease) both; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { from { opacity: 0; } }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.dash-grid > .card { margin: 0 !important; }
.hbars { display: flex; flex-direction: column; gap: 4px; }
.hbar { display: grid; grid-template-columns: minmax(80px, 34%) 1fr auto; gap: 12px; align-items: center; padding: 6px 8px; border-radius: 10px; cursor: default; transition: background .2s; }
.hbar:hover { background: var(--field); }
.hbar .lbl { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .lbl.mono { font-family: var(--mono); font-size: 12px; direction: ltr; text-align: right; }
.hbar .track { height: 10px; border-radius: 4px; background: var(--grid); overflow: hidden; }
.hbar .fill { height: 100%; border-radius: 4px; background: var(--series-1); transform-origin: right; animation: growX .9s var(--ease) both; }
@keyframes growX { from { transform: scaleX(0); } }
.hbar .val { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 32px; text-align: left; }
.split { display: flex; gap: 2px; height: 14px; border-radius: 4px; overflow: hidden; margin: 6px 0 12px; }
.split div { height: 100%; animation: growX .9s var(--ease) both; }
.split div:first-child { border-radius: 0 4px 4px 0; }
.split div:last-child { border-radius: 4px 0 0 4px; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.viz-empty { color: var(--muted); font-size: 13.5px; padding: 18px 8px; text-align: center; }
.viz-tip {
  position: fixed; z-index: 90; pointer-events: none; padding: 8px 12px; border-radius: 12px; font-size: 13px; line-height: 1.5;
  background: var(--glass-strong); border: 1px solid var(--glass-border); box-shadow: var(--shadow-lg);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); transform: translate(-50%, calc(-100% - 12px)); white-space: nowrap;
}
.viz-tip b { font-variant-numeric: tabular-nums; }
@media (max-width: 940px) { .kpis { grid-template-columns: 1fr 1fr; } .dash-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .trend { height: 200px; } .stat b { font-size: 28px; } }


/* ===== النشر والجدولة ===== */
.pf { --pc: var(--blue); }
.pf-facebook { --pc: #1877f2; }
.pf-instagram { --pc: #e1306c; }
.pf-linkedin { --pc: #0a66c2; }
.pf-twitter { --pc: #111; }
:root[data-theme="dark"] .pf-twitter { --pc: #e7e7e7; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pf-twitter { --pc: #e7e7e7; } }
/* أيقونات المنصات الرسمية */
.pf-ico {
  width: 26px; height: 26px; border-radius: 7px; display: inline-grid; place-items: center; flex: 0 0 auto;
  background: #0a66c2; color: #fff; overflow: hidden;
}
.pf-ico svg { width: 60%; height: 60%; fill: currentColor; display: block; }
.pf-ico.pf-facebook, .pf-facebook > .pf-ico { background: none; border-radius: 50%; }
.pf-ico.pf-facebook svg, .pf-facebook > .pf-ico svg { width: 100%; height: 100%; }
.pf-ico.pf-instagram, .pf-instagram > .pf-ico { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.pf-ico.pf-instagram svg, .pf-instagram > .pf-ico svg { width: 64%; height: 64%; }
.pf-ico.pf-linkedin, .pf-linkedin > .pf-ico { background: #0a66c2; }
.pf-ico.pf-linkedin svg, .pf-linkedin > .pf-ico svg { width: 58%; height: 58%; }
.pf-ico.pf-twitter, .pf-twitter > .pf-ico { background: #000; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.pf-ico.pf-twitter svg, .pf-twitter > .pf-ico svg { width: 54%; height: 54%; }
.connect-row .btn .pf-ico, .acc .pf-ico { width: 28px; height: 28px; }
.tile .ico.brand svg { fill: currentColor; stroke: none; width: 22px; height: 22px; }
.tile .ico.brand { box-shadow: 0 8px 18px -10px rgba(0,0,0,.35), inset 0 0 0 1px rgba(0,0,0,.06); }
.accounts-card { margin-bottom: 18px; }
.acc-list { display: flex; flex-wrap: wrap; gap: 10px; }
.acc {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-radius: 14px;
  background: var(--field); border: 1px solid var(--hairline); animation: rise .5s var(--ease) both;
}
.acc img, .acc .ph { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--hairline); flex: 0 0 auto; }
.acc .ph { display: grid; place-items: center; font-weight: 700; }
.acc b { display: block; font-size: 13.5px; line-height: 1.3; }
.acc small { color: var(--muted); font-size: 12px; direction: ltr; display: block; text-align: right; }
.acc .icon-btn { width: 28px; height: 28px; }
.connect-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.connect-row .btn { gap: 10px; padding-inline-start: 8px; }
.acc-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.acc-toggle {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--hairline); background: var(--field); font-size: 13px; font-weight: 550; transition: all .3s var(--spring);
}
.acc-toggle:hover { transform: translateY(-1px); }
.acc-toggle.on { background: var(--field-focus); box-shadow: 0 0 0 2px var(--pc); }
.acc-toggle:not(.on) .pf-ico { filter: grayscale(1); opacity: .45; }
.counters { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.counter { font-size: 12px; font-variant-numeric: tabular-nums; }
.counter.over { color: var(--red); border-color: color-mix(in srgb, var(--red) 35%, transparent); }
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px; border-radius: 16px; cursor: pointer; text-align: center;
  border: 1.5px dashed color-mix(in srgb, var(--blue) 35%, var(--hairline)); background: var(--field); font-weight: 400; margin: 0;
  transition: background .25s, border-color .25s, transform .3s var(--spring);
}
.dropzone:hover, .dropzone.over { background: var(--field-focus); border-color: var(--blue); }
.dropzone.over { transform: scale(1.01); }
.dropzone svg { width: 26px; height: 26px; fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 4px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; margin-top: 10px; }
.media-item { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--hairline); animation: pop .4s var(--spring); }
.media-item img, .media-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-item .rm {
  position: absolute; top: 5px; left: 5px; width: 24px; height: 24px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; font-size: 13px;
}
.media-item .prog { position: absolute; inset: auto 0 0 0; height: 4px; background: rgba(0,0,0,.2); }
.media-item .prog i { display: block; height: 100%; background: var(--grad); transition: width .3s; }
.media-item.err::after { content: "فشل الرفع"; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(229,56,59,.75); color: #fff; font-size: 12px; font-weight: 600; }
.track-box { margin-top: 18px; }
.track-box .perm small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }

.preview { border-radius: 16px; border: 1px solid var(--hairline); background: var(--field-focus); padding: 14px; margin-bottom: 12px; animation: rise .5s var(--ease) both; }
.preview-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.preview-top .ph, .preview-top img { width: 36px; height: 36px; border-radius: 50%; background: var(--hairline); object-fit: cover; display: grid; place-items: center; font-weight: 700; }
.preview-top b { font-size: 13.5px; display: block; line-height: 1.3; }
.preview-top small { font-size: 11.5px; color: var(--muted); }
.preview-top .pf-ico { margin-inline-start: auto; width: 22px; height: 22px; }
.preview-text { font-size: 14px; white-space: pre-wrap; word-break: break-word; line-height: 1.55; }
.preview-text a { color: var(--blue); }
.preview-text .more-t { color: var(--muted); }
.preview-media { display: grid; gap: 3px; margin-top: 10px; border-radius: 12px; overflow: hidden; }
.preview-media.n2, .preview-media.n4 { grid-template-columns: 1fr 1fr; }
.preview-media.n3 { grid-template-columns: 2fr 1fr; }
.preview-media img, .preview-media video { width: 100%; height: 100%; max-height: 260px; object-fit: cover; display: block; background: var(--hairline); }
.preview-warn { font-size: 12px; color: var(--red); margin-top: 8px; }

.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.cal-head h3 { min-width: 140px; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-dow { font-size: 12px; color: var(--muted); font-weight: 600; text-align: center; padding: 4px 0; }
.cal-day {
  min-height: 108px; border-radius: 14px; padding: 6px; background: var(--field); border: 1px solid var(--hairline);
  display: flex; flex-direction: column; gap: 4px; cursor: pointer; transition: background .2s, transform .3s var(--spring); overflow: hidden;
}
.cal-day:hover { background: var(--field-focus); }
.cal-day.out { opacity: .4; }
.cal-day.today { box-shadow: 0 0 0 2px var(--blue); }
.cal-day.past { cursor: default; }
.cal-num { font-size: 12.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.cal-day.today .cal-num { color: var(--blue); }
.cal-post {
  display: flex; align-items: center; gap: 4px; font-size: 11px; padding: 3px 6px; border-radius: 7px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; background: var(--glass-strong); border-inline-start: 3px solid var(--st, var(--blue)); cursor: pointer;
}
.cal-post:hover { filter: brightness(1.05); }
.cal-more { font-size: 11px; color: var(--muted); padding: 0 4px; }
.st-scheduled { --st: var(--blue); }
.st-published { --st: var(--green); }
.st-partial, .st-publishing { --st: var(--orange); }
.st-failed, .st-rejected { --st: var(--red); }
.st-pending_approval { --st: var(--violet); }
.st-draft, .st-cancelled { --st: var(--faint); }
.st-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--st); display: inline-block; flex: 0 0 auto; }

.post-card .post-text { font-size: 14px; white-space: pre-wrap; word-break: break-word; margin: 10px 0; max-height: 7.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.post-card .thumbs { display: flex; gap: 6px; margin-bottom: 10px; }
.post-card .thumbs img, .post-card .thumbs video { width: 54px; height: 54px; border-radius: 10px; object-fit: cover; background: var(--hairline); }
.results { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.result-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.result-row .err { color: var(--red); font-size: 12px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; }
.count.hidden { display: none; }
#pendingCount { background: var(--violet); color: #fff; }

@media (max-width: 600px) {
  .cal-grid { gap: 3px; }
  .cal-day { min-height: 64px; padding: 4px; border-radius: 10px; }
  .cal-post { font-size: 0; padding: 0; height: 6px; border-inline-start-width: 0; background: var(--st); }
  .cal-post .pf-ico { display: none; }
}


/* ===== زر اللغة والاتجاه من اليسار لليمين ===== */
.lang-btn {
  flex: 0 0 auto; border: 1px solid var(--hairline); background: var(--field); color: var(--text); cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 12px; transition: background .2s, transform .3s var(--spring);
}
.lang-btn:hover { background: var(--field-focus); }
.lang-btn:active { transform: scale(.95); }
.lang-float { position: fixed; top: 16px; inset-inline-end: 16px; z-index: 10; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.i18n-pending body { visibility: hidden; }
[dir="ltr"] .seg-indicator { right: auto; left: 0; }
[dir="ltr"] .menu { left: auto; right: 0; transform-origin: top right; }
[dir="ltr"] .switch span::after { right: auto; left: 3px; }
[dir="ltr"] .switch input:checked + span::after { transform: translateX(18px); }
[dir="ltr"] .tile.on::after { left: auto; right: 7px; }
[dir="ltr"] .hbar .fill { transform-origin: left; }
[dir="ltr"] .hbar .lbl.mono, [dir="ltr"] .acc small { text-align: left; }
[dir="ltr"] .hbar .val { text-align: right; }
[dir="ltr"] .media-item .rm { left: auto; right: 5px; }
[dir="ltr"] .viz-tip, [dir="ltr"] .toast { direction: ltr; }


/* ===== مسار: الشعار والرحلة ===== */
.brand-mark svg path { fill: none; }
.brand-mark svg circle { fill: #fff; stroke: none; }
/* الدائرة المتحركة على مسار الشعار */
.brand-mark .lg-run { fill: #fff; filter: drop-shadow(0 0 2px rgba(255,255,255,.9)); }
@media (prefers-reduced-motion: reduce) { .brand-mark .lg-run { display: none; } }
.brand-mark .lg-b { animation: beacon 2.6s ease-in-out infinite; transform-origin: 19.5px 5.5px; }
@keyframes beacon { 50% { transform: scale(1.35); opacity: .75; } }
.brand-name { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name b { font-size: 17px; font-weight: 750; letter-spacing: -.01em; }
.brand-name small { font-size: 11px; color: var(--muted); font-weight: 500; }
.brand-mark.lg { width: 58px; height: 58px; border-radius: 17px; }
.brand-mark.lg svg { width: 32px; height: 32px; }

.journey { position: relative; margin: 6px auto 0; max-width: 1040px; }
.j-steps { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.j-steps li {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 0 4px 6px;
  animation: rise .8s calc(.25s + var(--i) * .09s) var(--ease) both; border-radius: 18px;
}
.j-home .j-steps li[data-go] { cursor: pointer; }
.j-home .j-steps li[data-go]:hover .j-dot { transform: translateY(-4px) scale(1.06); }
.j-home .j-steps li:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.j-dot {
  position: relative; z-index: 1; width: 52px; height: 52px; border-radius: 17px; display: grid; place-items: center;
  background: var(--glass-strong); border: 1px solid var(--glass-border); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); transition: transform .45s var(--spring);
  animation: lit 7.5s calc(var(--i) * 1.5s) ease-in-out infinite;
}
.j-dot svg { width: 22px; height: 22px; fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes lit {
  0%, 22%, 100% { box-shadow: var(--shadow); }
  6%, 14% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--violet) 22%, transparent), 0 12px 30px -8px var(--violet); transform: scale(1.06); }
}
.j-text b { display: block; font-size: 16px; font-weight: 700; }
.j-text small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.45; max-width: 180px; }
.j-text em { margin-top: 6px; font-style: normal; font-size: 11px; }
.j-track {
  position: absolute; top: 26px; inset-inline: 10%; height: 2px; border-radius: 2px; z-index: 0;
  background: linear-gradient(90deg, var(--blue), var(--violet), var(--pink)); opacity: .55;
}
.j-runner {
  position: absolute; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--violet) 35%, transparent), 0 0 18px 4px var(--violet);
  inset-inline-start: 0; animation: run 7.5s linear infinite;
}
@keyframes run { 0% { inset-inline-start: 0; opacity: 0; } 4% { opacity: 1; } 92% { opacity: 1; } 100% { inset-inline-start: 100%; opacity: 0; } }
.j-loop { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; font-size: 13px; color: var(--muted); animation: rise .8s .8s var(--ease) both; }
.j-loop svg { width: 15px; height: 15px; fill: none; stroke: var(--violet); stroke-width: 2.2; stroke-linecap: round; animation: rot 6s linear infinite; }
[dir="rtl"] .j-loop svg { animation-direction: reverse; }

/* النسخة العمودية (صفحة الدخول والجوال) */
.journey.vertical .j-steps { grid-template-columns: 1fr; gap: 14px; }
.journey.vertical .j-steps li { flex-direction: row; text-align: start; align-items: center; gap: 14px; padding: 0; }
.journey.vertical .j-dot { width: 46px; height: 46px; border-radius: 15px; flex: 0 0 auto; }
.journey.vertical .j-text small { max-width: none; }
.journey.vertical .j-track { top: 23px; bottom: 23px; inset-inline: auto; inset-inline-start: 22px; width: 2px; height: auto; background: linear-gradient(180deg, var(--blue), var(--violet), var(--pink)); }
.journey.vertical .j-runner { top: 0; inset-inline-start: 50%; margin-top: 0; margin-inline-start: -6px; animation-name: runY; }
@keyframes runY { 0% { top: 0; opacity: 0; } 4% { opacity: 1; } 92% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
.journey.vertical .j-loop { justify-content: flex-start; }

/* صفحة الدخول بقسمين */
.auth-split { padding-top: 76px; grid-template-columns: minmax(0, 1fr) 400px; gap: 40px 56px; max-width: 1080px; margin: 0 auto; align-items: center; place-items: center stretch; }
.story { animation: rise 1s var(--ease) both; }
.story-brand { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.story-brand .brand-mark { animation: float 5s ease-in-out infinite; }
.story-brand h2 { font-size: 46px; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.story-brand span { display: block; color: var(--muted); font-size: 15px; margin-top: 6px; }
.story-text { font-size: 16.5px; line-height: 1.8; color: var(--muted); margin-bottom: 28px; max-width: 520px; }
.story-text b { color: var(--text); }
.auth-split .auth-card { justify-self: end; }
.login-journey { grid-column: 1 / -1; width: 100%; padding-top: 18px; }
.login-journey .journey { max-width: none; }
.story-text { font-size: 19px; font-weight: 500; color: var(--text); }

@media (max-width: 940px) {
  .auth-split { grid-template-columns: 1fr; gap: 28px; padding-top: 70px; }
  .auth-split .auth-card { justify-self: center; }
  .story { max-width: 400px; justify-self: center; }
  .story-brand h2 { font-size: 36px; }
}
@media (max-width: 760px) {
  .journey:not(.vertical) .j-steps { grid-template-columns: 1fr; gap: 14px; max-width: 420px; margin: 0 auto; }
  .journey:not(.vertical) .j-steps li { flex-direction: row; text-align: start; gap: 14px; padding: 0; }
  .journey:not(.vertical) .j-dot { width: 46px; height: 46px; flex: 0 0 auto; }
  .journey:not(.vertical) .j-text small { max-width: none; }
  .journey:not(.vertical) .j-track { top: 23px; bottom: 23px; inset-inline: auto; inset-inline-start: calc(50% - 210px + 22px); width: 2px; height: auto; background: linear-gradient(180deg, var(--blue), var(--violet), var(--pink)); }
  .journey:not(.vertical) .j-runner { top: 0; inset-inline-start: 50%; margin-top: 0; margin-inline-start: -6px; animation-name: runY; }
}
@media (max-width: 452px) { .journey:not(.vertical) .j-track { inset-inline-start: 22px; } }


/* ===== إعادة الاستهداف ===== */
.rt-how { margin-bottom: 18px; }
.rt-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: start; gap: 12px; }
.rt-step { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.rt-step b { font-size: 14.5px; }
.rt-step small { color: var(--muted); font-size: 12.5px; max-width: 220px; }
.rt-step .j-dot { animation-duration: 4.5s; }
.rt-step:nth-child(3) .j-dot { animation-delay: 1.5s; }
.rt-step:nth-child(5) .j-dot { animation-delay: 3s; }
.rt-arrow { position: relative; width: 70px; height: 2px; margin-top: 26px; border-radius: 2px; background: linear-gradient(90deg, var(--blue), var(--pink)); opacity: .5; overflow: visible; }
.rt-arrow::after {
  content: ""; position: absolute; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 12px 3px var(--violet); inset-inline-start: 0; animation: run 1.5s linear infinite;
}
#pixelsCard { margin-bottom: 18px; }
.px-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 14px; }
.px-grid input { font-size: 13px; }
.rt-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; background: var(--field);
  border: 1px solid var(--hairline); animation: rise .5s var(--ease) both;
}
.rt-ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--hairline); flex: 0 0 auto; transition: background .3s; }
.rt-ico svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; }
.rt-ico.on { background: var(--grad); box-shadow: 0 6px 16px -6px var(--violet); }
.rt-ico.on svg { stroke: #fff; }
.rt-main { flex: 1; min-width: 0; }
.rt-main .item-link { font-size: 14px; }
.rt-stat { text-align: center; min-width: 70px; }
.rt-stat b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.rt-stat span { font-size: 11.5px; color: var(--muted); }
.px-toggle small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
@media (max-width: 940px) { .px-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) {
  .rt-flow { grid-template-columns: 1fr; }
  .rt-arrow { width: 2px; height: 26px; margin: 0 auto; background: linear-gradient(180deg, var(--blue), var(--pink)); }
  .rt-arrow::after { inset-inline-start: -4px; animation-name: runY; }
  .px-grid { grid-template-columns: 1fr; }
  .rt-row { flex-wrap: wrap; }
  .rt-main { flex-basis: calc(100% - 50px); }
}

/* ===== الشاشات الصغيرة ===== */
@media (max-width: 940px) {
  .layout { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .nav { flex-wrap: wrap; }
  .segmented { order: 3; width: 100%; margin: 0; justify-content: space-between; }
  .seg-group { position: static; }
  .dropdown { left: 0; right: 0; width: auto; transform: translateY(-10px) scale(.97); }
  .seg-group.open .dropdown { transform: none; }
  .user-wrap { margin-inline-start: auto; }
}
@media (max-width: 600px) {
  .nav-shell { top: 8px; padding: 0 10px; }
  .seg { padding: 7px 9px; font-size: 13px; gap: 4px; }
  .card { padding: 18px; }
  .hero { padding: 40px 0 26px; }
  .row-2 { grid-template-columns: 1fr; gap: 0; }
  .step { grid-template-columns: 1fr; }
  .step-num { display: none; }
  .step-body { grid-column: 1; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats .stat:last-child { grid-column: 1 / -1; }
  .item-stats { grid-template-columns: 1fr; }
  .qr { flex-direction: column; align-items: flex-start; }
  .prefix { display: none; }
  .user-btn .uname { display: none; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .role-pick { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ===== نظرة عامة على الأقسام ===== */
.overview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ov-card {
  --tone: var(--blue); position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px;
  padding: 18px 20px; text-align: start; cursor: pointer; color: var(--text); font: inherit; min-height: 188px;
  animation: ovIn .7s var(--spring) both; animation-delay: calc(var(--i, 0) * 70ms);
  transition: transform .45s var(--spring), box-shadow .3s;
}
.ov-card::before {
  content: ""; position: absolute; inset: auto -30% -60% auto; width: 70%; aspect-ratio: 1; border-radius: 50%;
  background: var(--tone); opacity: .1; filter: blur(30px); pointer-events: none; transition: opacity .4s;
}
.ov-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.ov-card:hover::before { opacity: .2; }
.ov-card:focus-visible { outline: 2px solid var(--tone); outline-offset: 2px; }
@keyframes ovIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.ov-top { display: flex; align-items: center; gap: 10px; }
.ov-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--tone); background: color-mix(in srgb, var(--tone) 13%, transparent); }
.ov-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ov-title { font-size: 14px; font-weight: 650; }
.ov-arrow { width: 16px; height: 16px; margin-inline-start: auto; fill: none; stroke: var(--faint); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s var(--spring), stroke .2s; }
[dir="ltr"] .ov-arrow { transform: scaleX(-1); }
.ov-card:hover .ov-arrow { stroke: var(--tone); transform: translateX(-4px); }
[dir="ltr"] .ov-card:hover .ov-arrow { transform: scaleX(-1) translateX(-4px); }
.ov-main { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.ov-num { display: block; font-size: 32px; font-weight: 750; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ov-unit { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.ov-spark { width: 46%; max-width: 140px; height: 38px; color: var(--tone); flex: 0 0 auto; }
.ov-spark-empty { width: 46%; max-width: 140px; height: 38px; border-bottom: 1.5px dashed var(--hairline); }
.ov-rows { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.ov-rows > span { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 10px; border-radius: 9px; background: var(--field); border: 1px solid var(--hairline); font-size: 12px; }
.ov-rows em { font-style: normal; color: var(--muted); }
.ov-rows b { font-weight: 650; font-variant-numeric: tabular-nums; }
.ov-rows .warn b { color: var(--orange); }
.ov-rows .bad b { color: var(--red); }
.ov-note { font-size: 12px; color: var(--muted); margin-top: -6px; }
.ov-card.loading { cursor: default; background: linear-gradient(100deg, var(--glass) 30%, var(--glass-strong) 50%, var(--glass) 70%) 0 0 / 300% 100%; animation: ovShimmer 1.4s linear infinite; }
.ov-card.loading::before { display: none; }
@keyframes ovShimmer { to { background-position: -150% 0; } }
@media (max-width: 940px) { .overview { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .overview { grid-template-columns: 1fr; } .ov-card { min-height: 0; } }

/* ===== نافذة تقرير أودو ===== */
.rp-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.rp-presets button {
  border: 1px solid var(--hairline); background: var(--field); color: var(--muted); cursor: pointer; font: inherit; font-size: 13px; font-weight: 550;
  padding: 7px 13px; border-radius: 11px; transition: all .3s var(--ease);
}
.rp-presets button:hover { color: var(--text); }
.rp-presets button.on { color: var(--on-accent); background: var(--grad); border-color: transparent; box-shadow: 0 6px 16px -8px var(--violet); }
.rp-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.rp-preview:empty { display: none; }
.rp-preview span { padding: 8px 12px; border-radius: 12px; background: var(--field); border: 1px solid var(--hairline); font-size: 13px; color: var(--muted); }
.rp-preview b { color: var(--text); font-size: 15px; font-variant-numeric: tabular-nums; }

/* ===== صفحات التقرير (A4 بألوان ثابتة للطباعة) ===== */
.rp-stage { position: fixed; left: -12000px; top: 0; pointer-events: none; }
.rp-page {
  width: 794px; height: 1123px; position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 0 44px;
  background: #fff radial-gradient(circle at 100% 0, rgba(10,124,255,.08), transparent 32%) no-repeat;
  color: #1d1d1f; font-family: -apple-system, BlinkMacSystemFont, "SF Arabic", "SF Pro Display", "Segoe UI", Tahoma, sans-serif; font-size: 12px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.rp-page[dir="ltr"] { background-position: 0 0; background-image: radial-gradient(circle at 0 0, rgba(10,124,255,.08), transparent 32%); }
.rp-band { flex: 0 0 auto; height: 6px; margin: 0 -44px; background: linear-gradient(120deg, #0a7cff, #6e5bff 55%, #e04fd8); }
.rp-hero { display: flex; justify-content: space-between; align-items: center; padding-top: 26px; }
.rp-brand { display: flex; align-items: center; gap: 11px; }
.rp-brand b { font-size: 19px; font-weight: 700; display: block; line-height: 1.2; }
.rp-brand small { color: #6e6e73; font-size: 11.5px; }
.rp-mark { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(135deg, #0a7cff, #6e5bff 55%, #e04fd8); box-shadow: 0 8px 18px -8px #6e5bff; }
.rp-mark.sm { width: 26px; height: 26px; border-radius: 8px; box-shadow: none; }
.rp-mark svg { width: 60%; height: 60%; fill: none; stroke: #fff; stroke-width: 2.3; stroke-linecap: round; }
.rp-mark svg circle { fill: #fff; stroke: none; }
.rp-issued { text-align: end; }
.rp-issued small { display: block; color: #8e8e93; font-size: 10.5px; }
.rp-issued b { font-size: 12px; font-weight: 600; }
.rp-title { padding: 30px 0 22px; margin-bottom: 20px; border-bottom: 1px solid #ececf0; }
.rp-eyebrow {
  display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 11px; border-radius: 99px; margin-bottom: 10px;
  color: #6e5bff; background: rgba(110,91,255,.09); border: 1px solid rgba(110,91,255,.2);
}
.rp-title h1 { font-size: 31px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.rp-title p { margin-top: 10px; color: #6e6e73; font-size: 12.5px; }
.rp-title p b { color: #1d1d1f; font-weight: 600; }
.rp-title p i, .rp-note i { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: #c7c7cc; margin: 0 10px; vertical-align: middle; }
.rp-mini { flex: 0 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 18px 0 14px; margin-bottom: 18px; border-bottom: 1px solid #ececf0; color: #6e6e73; font-size: 11px; }
.rp-mini .rp-brand b { font-size: 14px; }
.rp-body { flex: 1 1 auto; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 20px; }
.rp-kpis { display: grid; grid-template-columns: 1.55fr 1fr 1fr 1fr; gap: 10px; }
.rp-kpi { border: 1px solid #ececf0; border-radius: 16px; padding: 14px 16px; background: #fafafc; }
.rp-kpi small { display: block; color: #6e6e73; font-size: 11px; font-weight: 600; }
.rp-kpi b { display: block; font-size: 27px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; margin-top: 4px; font-variant-numeric: tabular-nums; }
.rp-kpi span { display: block; color: #8e8e93; font-size: 10.5px; margin-top: 2px; }
.rp-kpi.main { border: 0; color: #fff; background: linear-gradient(135deg, #0a7cff, #6e5bff 60%, #e04fd8); box-shadow: 0 14px 30px -16px #6e5bff; }
.rp-kpi.main small, .rp-kpi.main span { color: rgba(255,255,255,.82); }
.rp-kpi.main b { font-size: 40px; }
.rp-note { margin-top: -8px; color: #6e6e73; font-size: 11.5px; }
.rp-note b { color: #1d1d1f; }
.rp-block h2 { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.rp-block h2::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: linear-gradient(180deg, #0a7cff, #e04fd8); }
.rp-block h2 small { color: #8e8e93; font-size: 11px; font-weight: 500; }
.rp-block-head { display: flex; justify-content: space-between; align-items: center; }
.rp-block-head h2 { margin-bottom: 0; }
.rp-legend { display: flex; gap: 14px; font-size: 11px; color: #6e6e73; }
.rp-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rp-legend i { width: 10px; height: 10px; border-radius: 3px; }
.rp-chart { margin-top: 12px; border: 1px solid #ececf0; border-radius: 16px; padding: 14px 0 6px; }
.rp-chart svg { display: block; margin: 0 auto; width: calc(100% - 28px); height: auto; overflow: visible; }
.rp-chart .ax { font-size: 10px; fill: #8e8e93; font-family: inherit; }
.rp-chart .v { font-size: 9.5px; fill: #3a3a3c; font-weight: 600; font-family: inherit; }
.rp-plats { display: flex; align-items: center; gap: 34px; border: 1px solid #ececf0; border-radius: 16px; padding: 18px 24px; }
.rp-plats svg { flex: 0 0 auto; }
.rp-plats .dn-v { font-size: 28px; font-weight: 700; fill: #1d1d1f; font-family: inherit; }
.rp-plats .dn-l { font-size: 11px; fill: #8e8e93; font-family: inherit; }
.rp-plat-list { flex: 1; display: flex; flex-direction: column; gap: 14px; }
.rp-plat { display: grid; grid-template-columns: 12px 80px 1fr 46px 40px; align-items: center; gap: 10px; font-size: 12.5px; }
.rp-plat .dot { width: 12px; height: 12px; border-radius: 4px; }
.rp-plat .t, .rp-bar .t { height: 8px; border-radius: 4px; background: #f1f1f5; overflow: hidden; }
.rp-plat .t i, .rp-bar .t i { display: block; height: 100%; border-radius: 4px; }
.rp-plat .n { text-align: end; font-weight: 700; font-variant-numeric: tabular-nums; }
.rp-plat em { font-style: normal; color: #8e8e93; text-align: end; font-size: 11.5px; }
.rp-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 11.5px; table-layout: fixed; }
.rp-table th { background: #f4f4f8; color: #6e6e73; font-weight: 600; text-align: start; padding: 7px 12px; font-size: 11px; }
.rp-table th:first-child { border-start-start-radius: 10px; border-end-start-radius: 10px; }
.rp-table th:last-child { border-start-end-radius: 10px; border-end-end-radius: 10px; }
.rp-table th:first-child { width: 42%; }
.rp-table td { height: 27px; padding: 0 12px; border-bottom: 1px solid #f0f0f3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-table .num { text-align: end; font-variant-numeric: tabular-nums; }
.rp-table .mono { font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace; font-size: 10.5px; text-align: start; }
[dir="rtl"] .rp-table .mono { text-align: right; }
.rp-table tr.zero td { color: #c7c7cc; }
.rp-table tr.zero td b { font-weight: 400; }
.rp-table tr.total td { font-weight: 700; background: #fafafc; border-top: 1.5px solid #1d1d1f; border-bottom: 0; }
.rp-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 600; }
.rp-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.rp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rp-bars { border: 1px solid #ececf0; border-radius: 16px; padding: 14px 16px; }
.rp-bars h3 { font-size: 12.5px; font-weight: 700; margin-bottom: 10px; }
.rp-bar { display: grid; grid-template-columns: 34% 1fr 62px; align-items: center; gap: 10px; font-size: 11px; height: 22px; }
.rp-bar .l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-bar .t i { background: linear-gradient(90deg, #0a7cff, #6e5bff); }
[dir="rtl"] .rp-bar .t i { background: linear-gradient(270deg, #0a7cff, #6e5bff); }
.rp-bar .n { text-align: end; font-weight: 700; font-variant-numeric: tabular-nums; }
.rp-bar .n em { font-style: normal; font-weight: 400; color: #8e8e93; font-size: 10px; }
.rp-empty { color: #8e8e93; font-size: 11px; }
.rp-foot { flex: 0 0 auto; height: 50px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #ececf0; margin-top: 16px; color: #8e8e93; font-size: 10.5px; }
.rp-foot-brand { display: inline-flex; align-items: center; gap: 7px; }
.rp-page :is(small, b, span, h1, h2, h3, em, th) { white-space: nowrap; }
.rp-foot-brand i { width: 16px; height: 16px; border-radius: 5px; display: grid; place-items: center; background: linear-gradient(135deg, #0a7cff, #e04fd8); }
.rp-foot-brand svg { width: 11px; height: 11px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; }
.rp-foot-brand svg circle { fill: #fff; stroke: none; }

/* ===== أداء الإعلانات ===== */
.ads-custom { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 14px; }
.ads-custom .field { margin: 0; }
.ads-period { margin: -6px 0 14px; font-size: 13.5px; }
.ads-board { padding: 0; overflow: hidden; margin-bottom: 18px; }
.ads-band { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; color: #fff; font-weight: 700; font-size: 15px; background: var(--grad); }
.ads-band small { font-weight: 500; opacity: .85; font-size: 12px; }
.ads-rows { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.ads-row { display: flex; align-items: stretch; gap: 12px; min-width: 0; animation: ovIn .6s var(--spring) both; animation-delay: calc(var(--i, 0) * 70ms); }
.ads-row.loading { height: 92px; border-radius: 16px; background: linear-gradient(100deg, var(--field) 30%, var(--glass-strong) 50%, var(--field) 70%) 0 0 / 300% 100%; animation: ovShimmer 1.4s linear infinite; }
.ads-row-head { flex: 0 0 92px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; text-align: center; }
.ads-logo { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: 0 0 auto; }
.ads-logo svg { width: 26px; height: 26px; fill: currentColor; }
.ads-logo.ads-all svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ads-meta { background: color-mix(in srgb, #0a7cff 12%, transparent); color: #0a7cff; }
.ads-tiktok { background: #111; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.ads-snap { background: #fffc00; color: #111; }
.ads-all { background: var(--grad); color: #fff; }
.ads-logo.sm { width: 22px; height: 22px; border-radius: 7px; }
.ads-logo.sm svg { width: 13px; height: 13px; }
.ads-tiles { flex: 1 1 0; min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ads-tile { min-width: 0; border: 1px solid var(--hairline); background: var(--field); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; transition: transform .35s var(--spring), border-color .2s; }
.ads-tile:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--blue) 35%, var(--hairline)); }
.ads-tile-l { font-size: 11.5px; color: var(--muted); font-weight: 600; line-height: 1.35; min-height: 2.7em; }
.ads-tile-v { font-size: 18px; overflow: hidden; text-overflow: ellipsis; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: start; }
.ads-cur { font-style: normal; font-weight: 500; color: var(--faint); font-size: 10.5px; }
.ads-tile-sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ads-tile-note { font-size: 10.5px; color: var(--orange); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: help; }
.ads-orig { display: block; font-size: 11px; font-weight: 400; }
.ads-delta { font-style: normal; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ads-delta.good { color: var(--green); }
.ads-delta.bad { color: var(--red); }
.ads-legend { gap: 12px; }
.ads-trend { min-height: 260px; padding-inline: 10px; position: relative; }
.ads-trend svg { overflow: visible; display: block; touch-action: pan-y; }
.ads-trend .gridline { stroke: var(--grid, rgba(127,127,127,.15)); stroke-width: 1; }
.ads-trend .axis-label { fill: var(--muted); font-size: 11px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.ads-trend .axis-label.leads, .ads-trend .axis-title.leads { fill: var(--green); }
.ads-trend .axis-title { fill: var(--faint); font-size: 10.5px; font-weight: 600; font-family: var(--font); }
.ads-col rect { transform-box: fill-box; transform-origin: 50% 100%; animation: adsGrow .7s var(--spring) both; animation-delay: calc(var(--i, 0) * 18ms); transition: opacity .2s; }
.ads-col.ctx rect { opacity: .28; }
.ads-col.dim rect { opacity: .35; }
.ads-col.ctx.dim rect { opacity: .15; }
@keyframes adsGrow { from { transform: scaleY(0); } }
.ads-leads-line { fill: none; stroke: var(--green); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: adsDraw 1.2s var(--ease) .3s forwards; pointer-events: none; filter: drop-shadow(0 2px 4px rgba(31,184,91,.35)); }
@keyframes adsDraw { to { stroke-dashoffset: 0; } }
.ads-leads-dot { fill: var(--green); stroke: var(--glass-strong); stroke-width: 2; pointer-events: none; }
.ads-leads-dot.ctx { opacity: .4; }
.ads-hover { fill: color-mix(in srgb, var(--text) 6%, transparent); pointer-events: none; }
.ads-leg-line { width: 14px !important; height: 3px !important; border-radius: 2px; background: var(--green); }
.ads-tip { white-space: normal; min-width: 190px; text-align: start; }
.ads-tip .tip-head { font-weight: 650; margin-bottom: 6px; }
.ads-tip .tip-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 1px 0; }
.ads-tip .tip-row span { flex: 1; color: var(--muted); }
.ads-tip .tip-row i { width: 9px; height: 9px; border-radius: 3px; flex: 0 0 auto; }
.ads-tip .tip-row i.line { height: 3px; width: 12px; border-radius: 2px; background: var(--green); }
.ads-tip .tip-row.total { border-top: 1px solid var(--hairline); margin-top: 4px; padding-top: 5px; }
.ads-tip .tip-row.total span { color: var(--text); font-weight: 600; }
.ads-share { cursor: help; }
.ads-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; white-space: nowrap; }
.ads-share { display: block; height: 7px; border-radius: 4px; background: var(--hairline); overflow: hidden; }
.ads-share i { display: block; height: 100%; border-radius: 4px; }
.ads-conns { display: flex; flex-direction: column; gap: 12px; }
.ads-conn { padding: 14px 16px; border-radius: 18px; }
.ads-conn-head { display: flex; align-items: center; gap: 12px; }
.ads-conn-head > div { flex: 1; min-width: 0; }
.ads-conn-head b { display: block; }
.ads-conn-head small { display: block; font-size: 12.5px; }
.ads-accs { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.ads-acc { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--field); border: 1px solid var(--hairline); cursor: pointer; }
.ads-acc span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ads-acc small { font-size: 11.5px; }
@media (max-width: 700px) {
  .ads-row { flex-direction: column; }
  .ads-row-head { flex: 0 0 auto; flex-direction: row; justify-content: flex-start; }
  .ads-logo { width: 34px; height: 34px; border-radius: 10px; }
  .ads-logo svg { width: 19px; height: 19px; }
  .ads-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ===== كل الحملات ===== */
.ads-split { display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; }
.ads-split .on { color: var(--green); }
.ads-split .off { color: var(--muted); margin-inline-start: 6px; }
.ads-split small { font-size: 11px; font-weight: 500; color: var(--muted); }
.ads-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.ads-filters input[type="search"] { flex: 1 1 180px; min-width: 150px; max-width: 280px; padding: 8px 12px; }
.ads-status-tabs { display: inline-flex; gap: 6px; }
.ads-status-tabs button { border: 1px solid var(--hairline); background: var(--field); color: var(--muted); cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; padding: 7px 12px; border-radius: 11px; display: inline-flex; gap: 7px; align-items: center; transition: all .25s var(--ease); }
.ads-status-tabs button b { font-variant-numeric: tabular-nums; padding: 0 7px; border-radius: 8px; background: var(--hairline); color: var(--text); font-size: 12px; line-height: 20px; }
.ads-status-tabs button.on { color: var(--text); border-color: color-mix(in srgb, var(--blue) 45%, var(--hairline)); background: color-mix(in srgb, var(--blue) 10%, var(--field)); }
.ads-status-tabs button[data-s="on"] b { background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--green); }
.ads-daterange { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.ads-daterange input { padding: 6px 8px; width: auto; }
.ads-camps td { white-space: nowrap; }
.ads-cname { text-align: start; font-family: var(--mono); font-size: 12.5px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.ads-date small { display: block; font-size: 11px; }
.ads-camps tr.ads-off td { opacity: .62; }
.ads-camps tr.ads-off td:first-child, .ads-camps tr.ads-off td:nth-child(3) { opacity: 1; }

/* ===== مهامي اليوم ===== */
.mytasks { padding: 20px 22px 16px; margin-bottom: 20px; position: relative; overflow: hidden; }
.mytasks::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 45%; aspect-ratio: 1; border-radius: 50%; background: var(--violet); opacity: .07; filter: blur(40px); pointer-events: none; }
.mytasks.newday { animation: todoNew 1.1s var(--spring); }
@keyframes todoNew { 0% { transform: scale(.985); box-shadow: 0 0 0 0 color-mix(in srgb, var(--violet) 40%, transparent); } 40% { box-shadow: 0 0 0 10px transparent; } 100% { transform: none; } }
.todo-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.todo-ring { position: relative; width: 64px; height: 64px; flex: 0 0 auto; }
.todo-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
[dir="rtl"] .todo-ring svg { transform: rotate(-90deg) scaleY(-1); }
.todo-ring-bg { fill: none; stroke: var(--hairline); stroke-width: 6; }
.todo-ring-fg { fill: none; stroke: url(#todoGrad); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 0 999; transition: stroke-dasharray .8s var(--spring); }
.todo-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 15px; font-weight: 750; font-variant-numeric: tabular-nums; }
.todo-ring.full { animation: ringPop .7s var(--spring); }
.todo-ring.full b { color: var(--green); }
@keyframes ringPop { 50% { transform: scale(1.12); } }
.todo-title { flex: 1; min-width: 180px; }
.todo-title h3 { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.todo-round { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; color: var(--violet); background: color-mix(in srgb, var(--violet) 12%, transparent); }
.todo-title p { color: var(--muted); font-size: 13px; margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.todo-lock { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--green); }
.todo-lock svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.todo-streak { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 14px; background: var(--field); border: 1px solid var(--hairline); color: var(--muted); }
.todo-streak svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.todo-streak b { font-size: 18px; font-weight: 750; color: var(--text); font-variant-numeric: tabular-nums; }
.todo-streak small { font-size: 11.5px; }
.todo-streak.hot { color: var(--orange); border-color: color-mix(in srgb, var(--orange) 30%, var(--hairline)); background: color-mix(in srgb, var(--orange) 8%, var(--field)); }
.todo-streak.hot svg { fill: color-mix(in srgb, var(--orange) 30%, transparent); animation: flame 1.6s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes flame { 50% { transform: scale(1.08) rotate(-3deg); } }
.todo-week { display: flex; gap: 6px; }
.tw { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.tw i { width: 14px; height: 14px; border-radius: 5px; background: var(--hairline); transition: transform .3s var(--spring); }
.tw small { font-size: 10px; color: var(--faint); }
.tw.lvl1 i { background: color-mix(in srgb, var(--violet) 30%, var(--hairline)); }
.tw.lvl2 i { background: color-mix(in srgb, var(--violet) 60%, transparent); }
.tw.lvl3 i { background: var(--grad); box-shadow: 0 3px 8px -3px var(--violet); }
.tw.today i { outline: 2px solid color-mix(in srgb, var(--blue) 55%, transparent); outline-offset: 2px; }
.tw:hover i { transform: scale(1.2); }
.todo-add { display: flex; gap: 8px; margin: 16px 0 8px; align-items: center; }
.todo-add input { flex: 1; min-width: 0; padding: 11px 14px; border-radius: 14px; font-size: 14.5px; }
.todo-star-new, .todo-star { border: 0; background: none; cursor: pointer; color: var(--faint); padding: 6px; border-radius: 10px; display: grid; place-items: center; transition: color .2s, transform .35s var(--spring), background .2s; }
.todo-star-new svg, .todo-star svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.todo-star-new:hover, .todo-star:hover { background: var(--field); color: var(--orange); }
.todo-star-new[aria-pressed="true"], .todo-item.star .todo-star { color: var(--orange); }
.todo-star-new[aria-pressed="true"] svg, .todo-item.star .todo-star svg { fill: currentColor; }
.todo-star-new[aria-pressed="true"], .todo-star:active { transform: scale(1.15); }
.todo-list { list-style: none; margin: 0; padding: 0; position: relative; display: flex; flex-direction: column; gap: 6px; }
.todo-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 14px; background: var(--field); border: 1px solid var(--hairline); position: relative; transition: background .25s, border-color .25s, opacity .35s, box-shadow .25s; }
.todo-item:hover { border-color: color-mix(in srgb, var(--blue) 25%, var(--hairline)); }
.todo-item.star { border-inline-start: 3px solid var(--orange); }
.todo-item.enter { animation: tIn .5s var(--spring) both; }
@keyframes tIn { from { opacity: 0; transform: translateY(-8px) scale(.97); } }
.todo-item.leave { animation: tOut .26s var(--ease) forwards; }
@keyframes tOut { to { opacity: 0; transform: translateX(24px) scale(.96); } }
[dir="rtl"] .todo-item.leave { animation-name: tOutR; }
@keyframes tOutR { to { opacity: 0; transform: translateX(-24px) scale(.96); } }
.todo-item.dragging { z-index: 5; box-shadow: var(--shadow-lg); background: var(--glass-strong); border-color: color-mix(in srgb, var(--violet) 45%, var(--hairline)); cursor: grabbing; transition: none; }
.todo-handle { border: 0; background: none; color: var(--faint); cursor: grab; padding: 4px 2px; touch-action: none; display: grid; place-items: center; border-radius: 8px; opacity: .55; transition: opacity .2s; }
.todo-handle svg { width: 16px; height: 16px; fill: currentColor; }
.todo-item:hover .todo-handle, .todo-handle:focus-visible { opacity: 1; }
.todo-item.done .todo-handle { visibility: hidden; }
.todo-check { border: 0; background: none; padding: 0; cursor: pointer; width: 26px; height: 26px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; }
.todo-check svg { width: 26px; height: 26px; overflow: visible; }
.todo-check .c { fill: transparent; stroke: var(--faint); stroke-width: 1.8; transition: fill .3s, stroke .3s; }
.todo-check .k { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 16; stroke-dashoffset: 16; transition: stroke-dashoffset .35s var(--ease) .08s; }
.todo-check:hover .c { stroke: var(--green); }
.todo-item.done .todo-check .c { fill: var(--green); stroke: var(--green); }
.todo-item.done .todo-check .k { stroke-dashoffset: 0; }
.todo-item.pop .todo-check { animation: chkPop .45s var(--spring); }
@keyframes chkPop { 40% { transform: scale(1.28); } }
.todo-text { flex: 0 1 auto; margin-inline-end: auto; min-width: 0; font-size: 14.5px; line-height: 1.45; position: relative; outline: none; word-break: break-word; padding: 2px 4px; border-radius: 6px; transition: color .3s; background: linear-gradient(currentColor, currentColor) no-repeat 100% 55% / 0 1.5px; }
[dir="ltr"] .todo-text { background-position: 0 55%; }
.todo-item.done .todo-text { color: var(--muted); background-size: 100% 1.5px; transition: color .3s, background-size .45s var(--ease); }
.todo-text[contenteditable="true"] { background: var(--field-focus); box-shadow: 0 0 0 2px color-mix(in srgb, var(--blue) 40%, transparent); }
.todo-item.done { opacity: .72; }
.todo-tag { font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 99px; color: var(--violet); background: color-mix(in srgb, var(--violet) 12%, transparent); white-space: nowrap; }
.todo-del { border: 0; background: none; cursor: pointer; color: var(--faint); padding: 6px; border-radius: 10px; opacity: 0; transition: opacity .2s, color .2s, background .2s; display: grid; place-items: center; }
.todo-del svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.todo-item:hover .todo-del, .todo-del:focus-visible { opacity: 1; }
.todo-del:hover { color: var(--red); background: color-mix(in srgb, var(--red) 10%, transparent); }
@media (hover: none) { .todo-del, .todo-handle { opacity: .7; } }
.todo-list.fresh .todo-item { animation: tIn .5s var(--spring) both; }
.todo-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 10px 10px; color: var(--muted); text-align: center; }
.todo-empty svg { width: 34px; height: 34px; fill: none; stroke: var(--violet); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 4px; animation: floaty 3s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-4px); } }
.todo-empty b { color: var(--text); font-size: 15px; }
.todo-empty span { font-size: 13px; }
.todo-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.todo-spark { position: fixed; z-index: 95; width: 6px; height: 6px; border-radius: 50%; pointer-events: none; }

/* احتفال الإنجاز */
.celebrate { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; background: rgba(5, 6, 15, .45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; transition: opacity .4s var(--ease); }
.celebrate.show { opacity: 1; }
.celebrate canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.celebrate-card { position: relative; width: min(420px, 100%); padding: 30px 26px 24px; text-align: center; background: var(--glass-strong); border-radius: 28px; transform: translateY(24px) scale(.9); opacity: 0; transition: transform .7s var(--spring) .1s, opacity .4s var(--ease) .1s; }
.celebrate.show .celebrate-card { transform: none; opacity: 1; }
.celebrate-badge { width: 120px; height: 120px; margin: -4px auto 10px; }
.celebrate-badge svg { width: 100%; height: 100%; overflow: visible; }
.cb-ring { fill: none; stroke: url(#todoGrad); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 327; stroke-dashoffset: 327; transform: rotate(-90deg); transform-origin: 60px 60px; }
.cb-glow { fill: color-mix(in srgb, var(--green) 14%, transparent); transform: scale(0); transform-origin: 60px 60px; }
.cb-check { fill: none; stroke: var(--green); stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 70; stroke-dashoffset: 70; }
.celebrate.show .cb-ring { animation: cbRing .9s var(--ease) .25s forwards; }
.celebrate.show .cb-glow { animation: cbGlow .7s var(--spring) .55s forwards; }
.celebrate.show .cb-check { animation: cbCheck .5s var(--ease) .85s forwards; }
@keyframes cbRing { to { stroke-dashoffset: 0; } }
@keyframes cbGlow { to { transform: scale(1); } }
@keyframes cbCheck { to { stroke-dashoffset: 0; } }
.celebrate-card h2 { font-size: 26px; font-weight: 750; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.celebrate-card p { color: var(--muted); margin-top: 6px; }
.celebrate-stats { display: flex; justify-content: center; gap: 10px; margin: 18px 0 20px; }
.celebrate-stats span { flex: 1; padding: 10px 6px; border-radius: 14px; background: var(--field); border: 1px solid var(--hairline); font-size: 11.5px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; opacity: 0; transform: translateY(8px); }
.celebrate.show .celebrate-stats span { animation: statIn .5s var(--spring) forwards; }
.celebrate.show .celebrate-stats span:nth-child(1) { animation-delay: 1s; }
.celebrate.show .celebrate-stats span:nth-child(2) { animation-delay: 1.1s; }
.celebrate.show .celebrate-stats span:nth-child(3) { animation-delay: 1.2s; }
@keyframes statIn { to { opacity: 1; transform: none; } }
.celebrate-stats b { font-size: 22px; font-weight: 750; color: var(--text); }
@media (max-width: 600px) {
  .mytasks { padding: 16px; }
  .todo-week { order: 5; width: 100%; justify-content: space-between; }
  .todo-del, .todo-handle { opacity: .7; }
}
[dir="rtl"] #celebrateGo svg { transform: scaleX(-1); }
.seg-ico { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* سجل الأيام */
.todo-star { pointer-events: none; }
.todo-lockline { display: inline-flex; align-items: center; gap: 5px; }
.todo-lockline svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.tasklog { margin-top: 0; }
.log-list { display: flex; flex-direction: column; gap: 8px; }
.log-day { border: 1px solid var(--hairline); background: var(--field); border-radius: 16px; overflow: hidden; animation: ovIn .5s var(--spring) both; animation-delay: calc(var(--i, 0) * 40ms); transition: border-color .25s; }
.log-day[open] { border-color: color-mix(in srgb, var(--violet) 35%, var(--hairline)); }
.log-day summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer; }
.log-day summary::-webkit-details-marker { display: none; }
.log-ring { --p: 0; width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; background: conic-gradient(var(--violet) calc(var(--p) * 1%), var(--hairline) 0); position: relative; }
.log-day.ok .log-ring { background: conic-gradient(var(--green) calc(var(--p) * 1%), var(--hairline) 0); }
.log-ring::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--glass-strong); }
.log-ring b { position: relative; font-size: 10.5px; font-weight: 700; }
.log-main { flex: 1; min-width: 0; }
.log-main b { display: block; font-size: 14px; }
.log-main small { color: var(--muted); font-size: 12px; }
.log-chev { width: 16px; height: 16px; fill: none; stroke: var(--faint); stroke-width: 2.2; stroke-linecap: round; transition: transform .4s var(--spring); }
.log-day[open] .log-chev { transform: rotate(180deg); }
.log-tasks { list-style: none; margin: 0; padding: 0 14px 12px; display: flex; flex-direction: column; gap: 4px; animation: logOpen .4s var(--ease); }
@keyframes logOpen { from { opacity: 0; transform: translateY(-6px); } }
.log-tasks li { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; background: var(--glass); font-size: 13.5px; }
.log-tasks li small { margin-inline-start: auto; font-size: 11.5px; white-space: nowrap; }
.log-text { min-width: 0; word-break: break-word; }
.log-tasks li.done .log-text { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 70%, transparent); }
.log-check { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--faint); flex: 0 0 auto; display: grid; place-items: center; }
.log-tasks li.done .log-check { background: var(--green); border-color: var(--green); }
.log-check svg { width: 12px; height: 12px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* مدة صفحة أودو */
.odoo-range { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: -4px 0 16px; }
.odoo-range .mini-seg { flex-wrap: wrap; }
.odoo-custom { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.odoo-custom input { padding: 6px 8px; width: auto; }
.odoo-period { font-size: 13px; color: var(--muted); }
.odoo-period b { color: var(--text); font-weight: 600; }
.odoo-project { width: auto; min-width: 140px; padding: 7px 10px; font-size: 13px; }
.proj-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.proj-hero .big { font-size: 40px; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.proj-hero .big small { display: block; font-size: 13px; font-weight: 550; color: var(--muted); letter-spacing: 0; margin-top: 6px; }
.proj-plats { display: flex; flex-wrap: wrap; gap: 10px; }
.proj-plat { padding: 10px 16px; border-radius: 12px; background: var(--field); border: 1px solid var(--hairline); min-width: 110px; }
.proj-plat span { display: block; font-size: 12.5px; color: var(--muted); }
.proj-plat b { font-size: 22px; font-variant-numeric: tabular-nums; }
.proj-plat.on { border-color: var(--violet); box-shadow: 0 0 0 1px var(--violet) inset; }
.data tr.on td { background: var(--field); }

/* إجمالي الليدز لكل مشروع — أعمدة أفقية مقسّمة حسب المنصة */
.pbars { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.pbars-legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.pbars-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pbars .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.pbar { display: grid; grid-template-columns: minmax(90px, 22%) 1fr; gap: 14px; align-items: center; padding: 5px 8px; border-radius: 10px; cursor: pointer; transition: background .2s; }
.pbar:hover { background: var(--field); }
.pbar .pname { font-family: var(--mono); font-size: 13px; font-weight: 600; direction: ltr; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pbar .ptrack { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pbar .pfill { display: flex; height: 22px; min-width: 6px; border-radius: 999px; overflow: hidden; transform-origin: right; animation: growX .9s var(--ease) both; }
.pbar .seg { display: flex; align-items: center; justify-content: center; min-width: 4px; font-size: 11.5px; font-weight: 700; color: #1d1d1f; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; }
.pbar .ptotal { font-size: 16px; font-weight: 750; font-variant-numeric: tabular-nums; flex: none; }
.pbars .snap { background: linear-gradient(90deg, #f6bd3c, #fbd98a); }
.pbars .meta { background: linear-gradient(90deg, #5aaed6, #9fd0e8); }
.pbars .tt { background: linear-gradient(90deg, #e06c85, #f0a6b6); }
@media (max-width: 600px) { .pbar { grid-template-columns: 1fr; gap: 4px; } .pbar .pname { text-align: start; } }

/* رسائل واتساب */
.wa-top { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-bottom: 14px; }
.wa-top .perm { flex: 1 1 320px; }
.wa-quiet { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; }
.wa-quiet select { width: auto; padding: 6px 10px; }
.wa-quiet small { flex-basis: 100%; }
.wa-stats { display: flex; gap: 18px; font-size: 13px; color: var(--muted); }
.wa-stats b { font-size: 20px; color: var(--text); margin-inline-end: 4px; font-variant-numeric: tabular-nums; }
.wa-stats .red b { color: var(--red); }
.wa-rules td { vertical-align: middle; }
.wa-rules input { min-width: 120px; padding: 8px 10px; }
.perm > span:first-child small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 2px; }
