/* شامل — Minimal Futuristic + Holographic */
:root {
  --bg: #05060b;
  --bg-2: #0a0c16;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --surface-3: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #eef1ff;
  --text-2: #a5abc8;
  --text-3: #6c7294;
  --cyan: #7df9ff;
  --violet: #b892ff;
  --pink: #ff8ad8;
  --mint: #6dffc1;
  --amber: #ffd27a;
  --red: #ff6b8a;
  --holo: linear-gradient(115deg, #7df9ff 0%, #b892ff 35%, #ff8ad8 65%, #7df9ff 100%);
  --holo-soft: linear-gradient(115deg, rgba(125, 249, 255, .18), rgba(184, 146, 255, .14), rgba(255, 138, 216, .16));
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, .7);
  --glow: 0 0 0 1px rgba(125, 249, 255, .25), 0 0 24px -4px rgba(125, 249, 255, .35);
  --font: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --num: 'Space Grotesk', 'IBM Plex Sans Arabic', sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14.5px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--cyan); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(184, 146, 255, .35); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .08); border-radius: 10px; border: 2px solid var(--bg); }
.ic { width: 18px; height: 18px; flex: none; vertical-align: -4px; }
.card h3 .ic { width: 17px; height: 17px; color: var(--cyan); }
.num, .mono { font-family: var(--num); font-feature-settings: 'tnum'; letter-spacing: -.01em; }

/* ---------- الخلفية ---------- */
.aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.aurora i { position: absolute; width: 55vmax; height: 55vmax; border-radius: 50%; filter: blur(110px); opacity: .16; animation: drift 28s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { background: #2ad6ff; top: -25vmax; right: -15vmax; }
.aurora i:nth-child(2) { background: #8d5cff; bottom: -30vmax; left: -10vmax; animation-delay: -9s; }
.aurora i:nth-child(3) { background: #ff5fc8; top: 30%; left: 35%; width: 35vmax; height: 35vmax; opacity: .08; animation-delay: -16s; }
@keyframes drift { to { transform: translate(6vmax, 4vmax) scale(1.12); } }
.grid-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; background-image: linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 75%); }

/* ---------- عناصر هولوجرامية ---------- */
.holo-text { background: var(--holo); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 8s linear infinite; }
@keyframes shimmer { to { background-position: 200% center; } }
.holo-border { position: relative; }
.holo-border::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: var(--holo); background-size: 300% 300%; animation: shimmer 10s linear infinite; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; opacity: .55; }
.scan { position: relative; overflow: hidden; }
.scan::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent, rgba(125, 249, 255, .06) 50%, transparent); height: 40%; animation: scan 6s ease-in-out infinite; pointer-events: none; }
@keyframes scan { 0% { transform: translateY(-120%); } 100% { transform: translateY(320%); } }

/* ---------- الهيكل ---------- */
.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 22px 14px; border-left: 1px solid var(--line); background: linear-gradient(180deg, rgba(10, 12, 22, .85), rgba(5, 6, 11, .6)); backdrop-filter: blur(16px); display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 20px; }
.brand img { width: 38px; height: 38px; border-radius: 11px; box-shadow: 0 0 30px -6px rgba(125, 249, 255, .5); }
.brand b { font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.brand small { display: block; color: var(--text-3); font-size: 11px; margin-top: 3px; letter-spacing: .05em; }
.nav-group { margin-top: 12px; }
.nav-group > span { display: block; font-size: 11px; color: var(--text-3); padding: 0 12px 6px; letter-spacing: .04em; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 11px; color: var(--text-2); transition: .2s; position: relative; font-size: 14px; }
.nav a svg { width: 18px; height: 18px; flex: none; opacity: .8; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--holo-soft); color: var(--text); box-shadow: inset 0 0 0 1px rgba(125, 249, 255, .18); }
.nav a.active::before { content: ''; position: absolute; right: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--holo); }
.nav a .badge { margin-inline-start: auto; }
.sidebar-foot { margin-top: auto; padding-top: 18px; }
.main { min-width: 0; padding: 22px 32px 60px; }
.topbar { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.topbar h1 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.topbar .sub { color: var(--text-3); font-size: 13px; }
.topbar .spacer { flex: 1; }
.search { position: relative; }
.search input { width: 260px; padding-inline-start: 38px; }
.search svg { position: absolute; top: 50%; right: 12px; width: 16px; transform: translateY(-50%); color: var(--text-3); }
.btn.menu-btn { display: none; }

/* ---------- البطاقات ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; backdrop-filter: blur(14px); position: relative; }
.card.holo-border { border-color: transparent; }
.card h3 { margin: 0 0 14px; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card h3 .more { margin-inline-start: auto; font-size: 12.5px; font-weight: 400; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.span2 { grid-column: span 2; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); font-size: 12.5px; }
.mt { margin-top: 16px; }
.kpi { display: flex; flex-direction: column; gap: 6px; min-height: 112px; }
.kpi .label { color: var(--text-2); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.kpi .label svg { width: 16px; color: var(--cyan); }
.kpi .value { font-family: var(--num); font-size: 30px; font-weight: 500; letter-spacing: -.03em; line-height: 1.1; }
.kpi .value small { font-size: 14px; color: var(--text-3); font-family: var(--font); margin-inline-start: 4px; }
.kpi .trend { font-size: 12px; color: var(--text-3); margin-top: auto; }
.trend .up { color: var(--mint); } .trend .down { color: var(--red); }

/* ---------- الأزرار والحقول ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); cursor: pointer; transition: .2s; font-size: 13.5px; font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--surface-3); border-color: rgba(255, 255, 255, .22); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { border: 0; color: #060812; background: var(--holo); background-size: 200% auto; font-weight: 600; box-shadow: 0 8px 30px -10px rgba(125, 249, 255, .6); }
.btn.primary:hover { background-position: right center; filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.danger { color: var(--red); border-color: rgba(255, 107, 138, .3); background: rgba(255, 107, 138, .06); }
.btn.ok { color: var(--mint); border-color: rgba(109, 255, 193, .3); background: rgba(109, 255, 193, .06); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 9px; }
.btn.icon { padding: 8px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
input, select, textarea { width: 100%; padding: 10px 13px; border-radius: 11px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .25); outline: none; transition: .2s; }
input:focus, select:focus, textarea:focus { border-color: rgba(125, 249, 255, .55); box-shadow: 0 0 0 3px rgba(125, 249, 255, .12); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a5abc8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 12px center; padding-inline-end: 34px; }
select option { background: var(--bg-2); }
input[type=checkbox] { width: auto; accent-color: var(--cyan); }
input[type=range] { padding: 0; accent-color: var(--violet); }
textarea { min-height: 90px; resize: vertical; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-section { grid-column: 1 / -1; font-size: 12px; color: var(--cyan); letter-spacing: .05em; padding-top: 6px; border-top: 1px solid var(--line); margin-top: 4px; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 13px; border-radius: 9px; color: var(--text-2); cursor: pointer; font-size: 13px; }
.seg button.on { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px rgba(125, 249, 255, .25); }

/* ---------- الجداول ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: start; font-weight: 500; color: var(--text-3); font-size: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr { transition: .15s; }
tbody tr:hover { background: var(--surface); }
tbody tr.click { cursor: pointer; }
tr:last-child td { border-bottom: 0; }
td .actions { display: flex; gap: 6px; justify-content: flex-end; }
.empty { text-align: center; color: var(--text-3); padding: 34px 10px; }
.empty svg { width: 34px; height: 34px; opacity: .4; display: block; margin: 0 auto 8px; }

/* ---------- شارات وصور ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 500; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.badge.plain::before { display: none; }
.badge.green { color: var(--mint); border-color: rgba(109, 255, 193, .25); background: rgba(109, 255, 193, .07); }
.badge.amber { color: var(--amber); border-color: rgba(255, 210, 122, .25); background: rgba(255, 210, 122, .07); }
.badge.red { color: var(--red); border-color: rgba(255, 107, 138, .25); background: rgba(255, 107, 138, .07); }
.badge.cyan { color: var(--cyan); border-color: rgba(125, 249, 255, .25); background: rgba(125, 249, 255, .07); }
.badge.violet { color: var(--violet); border-color: rgba(184, 146, 255, .25); background: rgba(184, 146, 255, .07); }
.badge.count { padding: 0 7px; min-width: 20px; justify-content: center; background: var(--holo); color: #060812; border: 0; font-weight: 700; }
.badge.count::before { display: none; }
.avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 600; font-size: 13px; color: #fff; position: relative; background: conic-gradient(from var(--h, 0deg), hsl(var(--hue) 90% 65%), hsl(calc(var(--hue) + 70) 90% 70%), hsl(calc(var(--hue) + 150) 90% 70%), hsl(var(--hue) 90% 65%)); }
.avatar::after { content: ''; position: absolute; inset: 2px; border-radius: 50%; background: var(--bg-2); }
.avatar span { position: relative; z-index: 1; }
.avatar.lg { width: 76px; height: 76px; font-size: 26px; }
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person b { font-weight: 500; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person small { color: var(--text-3); font-size: 12px; display: block; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ---------- تقدم ---------- */
.progress { height: 7px; border-radius: 10px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: inherit; background: var(--holo); background-size: 200% 100%; animation: shimmer 6s linear infinite; }
.ring { --p: 50; width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(closest-side, var(--bg-2) 80%, transparent 81%), conic-gradient(var(--cyan), var(--violet) calc(var(--p) * 1%), rgba(255, 255, 255, .06) 0); }
.ring b { font-family: var(--num); font-size: 26px; font-weight: 500; }

/* ---------- قوائم ---------- */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 14px; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--text); border-image: var(--holo) 1; border-bottom: 2px solid; }

/* ---------- لوحة كانبان ---------- */
.kanban { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.kcol { background: rgba(0, 0, 0, .2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; min-height: 300px; }
.kcol.drop { border-color: rgba(125, 249, 255, .5); box-shadow: var(--glow); }
.kcol header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 13px; color: var(--text-2); }
.kcard { background: var(--surface-2); border: 1px solid var(--line); border-radius: 13px; padding: 12px; margin-bottom: 9px; cursor: grab; transition: .15s; }
.kcard:hover { border-color: var(--line-2); transform: translateY(-1px); }
.kcard.dragging { opacity: .4; }
.stars { color: var(--amber); letter-spacing: 1px; font-size: 12px; }

/* ---------- الهيكل التنظيمي ---------- */
.org { overflow-x: auto; padding: 10px 0 20px; }
.org ul { padding-top: 22px; position: relative; display: flex; justify-content: center; margin: 0; padding-inline: 0; }
.org li { list-style: none; position: relative; padding: 22px 8px 0; display: flex; flex-direction: column; align-items: center; }
.org li::before, .org li::after { content: ''; position: absolute; top: 0; right: 50%; border-top: 1px solid rgba(125, 249, 255, .3); width: 50%; height: 22px; }
.org li::after { right: auto; left: 50%; border-right: 1px solid rgba(125, 249, 255, .3); }
.org li:only-child::before, .org li:only-child::after { display: none; }
.org li:only-child { padding-top: 0; }
.org li:first-child::before, .org li:last-child::after { border: 0 none; }
.org li:last-child::before { border-left: 1px solid rgba(125, 249, 255, .3); border-radius: 0 0 0 0; }
.org ul ul::before { content: ''; position: absolute; top: 0; left: 50%; border-left: 1px solid rgba(125, 249, 255, .3); height: 22px; }
.org > ul { padding-top: 0; width: max-content; min-width: 100%; }
.org-node { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 14px; padding: 10px 14px; min-width: 150px; text-align: center; cursor: pointer; transition: .2s; }
.org-node:hover { box-shadow: var(--glow); }
.org-node .avatar { margin: 0 auto 6px; }
.org-node b { display: block; font-size: 13px; font-weight: 500; }
.org-node small { color: var(--text-3); font-size: 11.5px; }

/* ---------- المودال والتنبيهات ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(2, 3, 8, .7); backdrop-filter: blur(6px); z-index: 50; display: grid; place-items: center; padding: 20px; animation: fade .2s; }
.modal { width: min(680px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; background: linear-gradient(180deg, rgba(16, 19, 34, .97), rgba(9, 11, 20, .97)); border-radius: 22px; padding: 24px; box-shadow: var(--shadow); animation: pop .25s cubic-bezier(.2, .9, .3, 1.2); }
.modal.wide { width: min(980px, 100%); }
.modal header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal header h2 { margin: 0; font-size: 18px; font-weight: 600; }
.modal footer { display: flex; gap: 10px; justify-content: flex-start; margin-top: 22px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
#toasts { position: fixed; bottom: 22px; left: 22px; z-index: 80; display: flex; flex-direction: column; gap: 10px; }
.toast { padding: 12px 18px; border-radius: 13px; background: rgba(16, 19, 34, .95); border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: pop .3s; display: flex; gap: 10px; align-items: center; max-width: 380px; }
.toast.err { border-color: rgba(255, 107, 138, .45); }
.toast.ok { border-color: rgba(109, 255, 193, .4); }

/* ---------- تسجيل الدخول ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-hero { padding: 60px; display: flex; flex-direction: column; justify-content: center; gap: 22px; position: relative; overflow: hidden; }
.login-hero h1 { font-size: clamp(44px, 6vw, 86px); margin: 0; line-height: 1; font-weight: 700; letter-spacing: -.03em; }
.login-hero p { font-size: 18px; color: var(--text-2); max-width: 480px; margin: 0; }
.holo-orb { width: 340px; height: 340px; border-radius: 50%; position: absolute; left: -60px; bottom: -80px; background: conic-gradient(from 0deg, #7df9ff, #b892ff, #ff8ad8, #6dffc1, #7df9ff); filter: blur(2px); opacity: .22; animation: spin 18s linear infinite; mask: radial-gradient(circle, transparent 52%, #000 53%, #000 70%, transparent 71%); }
@keyframes spin { to { transform: rotate(360deg); } }
.feature-chips { display: flex; flex-wrap: wrap; gap: 8px; max-width: 520px; }
.feature-chips span { padding: 6px 12px; border-radius: 20px; font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); }
.login-panel { display: grid; place-items: center; padding: 30px; }
.login-card { width: min(420px, 100%); padding: 32px; border-radius: 24px; background: rgba(12, 14, 26, .7); backdrop-filter: blur(20px); }
.login-card h2 { margin: 0 0 4px; font-size: 22px; }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.demo-grid button { text-align: start; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; transition: .2s; }
.demo-grid button:hover { border-color: rgba(125, 249, 255, .4); background: var(--surface-2); }
.demo-grid b { display: block; font-size: 13px; font-weight: 500; }
.demo-grid small { color: var(--text-3); font-size: 11.5px; }

/* ---------- المساعد ---------- */
.chat { display: flex; flex-direction: column; height: calc(100vh - 160px); min-height: 420px; }
.chat-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 6px 2px 16px; }
.msg { max-width: 78%; padding: 12px 16px; border-radius: 16px; white-space: pre-wrap; line-height: 1.75; }
.msg.me { align-self: flex-start; background: var(--holo-soft); border: 1px solid rgba(125, 249, 255, .2); border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-end; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat-form { display: flex; gap: 10px; }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.suggest button { padding: 6px 12px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 12.5px; color: var(--text-2); }
.suggest button:hover { color: var(--text); border-color: rgba(184, 146, 255, .5); }

/* ---------- الحضور ---------- */
.clock-face { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 18px 0; }
.clock-face .time { font-family: var(--num); font-size: 54px; font-weight: 400; letter-spacing: -.04em; line-height: 1; }
.punch { width: 160px; height: 160px; border-radius: 50%; border: 0; cursor: pointer; position: relative; background: radial-gradient(circle at 50% 40%, rgba(125, 249, 255, .25), rgba(184, 146, 255, .12) 60%, transparent 70%); color: var(--text); font-size: 17px; font-weight: 600; display: grid; place-items: center; transition: .3s; }
.punch::before { content: ''; position: absolute; inset: 0; border-radius: 50%; padding: 2px; background: var(--holo); -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; }
.punch::after { content: ''; position: absolute; inset: -14px; border-radius: 50%; border: 1px solid rgba(125, 249, 255, .2); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { from { transform: scale(.9); opacity: 1; } to { transform: scale(1.15); opacity: 0; } }
.punch:hover { transform: scale(1.04); }
.punch.out { background: radial-gradient(circle at 50% 40%, rgba(255, 138, 216, .25), rgba(184, 146, 255, .12) 60%, transparent 70%); }
.heat { display: grid; grid-template-columns: repeat(auto-fill, minmax(14px, 1fr)); gap: 4px; }
.heat i { aspect-ratio: 1; border-radius: 4px; background: rgba(255, 255, 255, .05); }

/* ---------- الرسوم ---------- */
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--text-3); font-size: 11px; font-family: var(--font); }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12.5px; color: var(--text-2); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- القسيمة ---------- */
.slip { background: rgba(0, 0, 0, .25); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.slip .line { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.slip .line:last-child { border: 0; }
.slip .total { font-size: 17px; font-weight: 600; padding-top: 12px; }
.law-card { border-inline-start: 2px solid; border-image: var(--holo) 1; padding: 4px 14px; margin: 8px 0; }
.alert { padding: 12px 16px; border-radius: 13px; background: rgba(255, 210, 122, .06); border: 1px solid rgba(255, 210, 122, .22); color: #ffe3a8; font-size: 13px; display: flex; gap: 10px; align-items: flex-start; }
.alert.info { background: rgba(125, 249, 255, .05); border-color: rgba(125, 249, 255, .2); color: #c7fbff; }
.alert svg { width: 18px; flex: none; margin-top: 2px; }
.fade-in { animation: fadeUp .45s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } }
.stagger > * { animation: fadeUp .5s cubic-bezier(.2, .8, .2, 1) both; }
.stagger > *:nth-child(2) { animation-delay: .04s; } .stagger > *:nth-child(3) { animation-delay: .08s; } .stagger > *:nth-child(4) { animation-delay: .12s; } .stagger > *:nth-child(5) { animation-delay: .16s; } .stagger > *:nth-child(6) { animation-delay: .2s; }

/* ---------- الجوال ---------- */
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3, .g-2-1 { grid-template-columns: 1fr; } .span2 { grid-column: auto; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; right: 0; left: auto; width: 280px; z-index: 40; transform: translateX(100%); transition: transform .3s; }
  .sidebar.open { transform: none; box-shadow: var(--shadow); }
  .btn.menu-btn { display: inline-flex; }
  .main { padding: 16px 16px 60px; }
  .topbar { flex-wrap: wrap; }
  .topbar h1 { font-size: 21px; }
  .search input { width: 100%; }
  .search { order: 5; flex-basis: 100%; }
  .g2, .g4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; }
  .login-hero { padding: 40px 22px 10px; }
  .login-hero .feature-chips, .holo-orb { display: none; }
  .msg { max-width: 92%; }
  .kanban { grid-template-columns: repeat(5, 240px); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print {
  .sidebar, .topbar, .aurora, .grid-bg, .no-print { display: none !important; }
  body { background: #fff; color: #000; } .shell { display: block; } .card, .slip { border-color: #ccc; background: #fff; }
}

/* ---------- الإنجليزية (LTR) ---------- */
html[dir=ltr] body { font-family: 'IBM Plex Sans Arabic', 'Space Grotesk', system-ui, sans-serif; }
html[dir=ltr] .sidebar { border-left: 0; border-right: 1px solid var(--line); }
html[dir=ltr] .nav a.active::before { right: auto; left: -14px; }
html[dir=ltr] .search svg { right: auto; left: 12px; }
html[dir=ltr] select { background-position: right 12px center; }
html[dir=ltr] #toasts { left: auto; right: 22px; }
html[dir=ltr] .msg.me { align-self: flex-end; border-bottom-right-radius: 16px; border-bottom-left-radius: 4px; }
html[dir=ltr] .msg.bot { align-self: flex-start; border-bottom-left-radius: 16px; border-bottom-right-radius: 4px; }
html[dir=ltr] .holo-orb { left: auto; right: -60px; }
html[dir=ltr] .org li::before { right: auto; left: 50%; }
html[dir=ltr] .org li::after { left: auto; right: 50%; border-right: 0; border-left: 1px solid rgba(125, 249, 255, .3); }
.lang-btn { font-family: 'Space Grotesk', 'IBM Plex Sans Arabic', sans-serif; letter-spacing: .02em; }
@media (max-width: 860px) {
  html[dir=ltr] .sidebar { right: auto; left: 0; transform: translateX(-100%); }
  html[dir=ltr] .sidebar.open { transform: none; }
}
