/* منصة الأنشطة — مدرسة فلسطين الثانوية
   تصميم هادئ ونظيف: أسطح بيضاء، حدود رفيعة، لون واحد للتمييز، أيقونات خطية، حركة ناعمة */
:root {
  --bg: #f6f8fa;
  --surface: #ffffff;
  --subtle: #f8fafc;
  --hover: #f1f5f9;
  --border: #e5e9ef;
  --border-strong: #d4dbe3;
  --text: #0f1b2a;
  --text-2: #3d4b5c;
  --muted: #6b7889;
  --faint: #98a3b1;

  --accent: #0b84c6;
  --accent-hover: #0970a8;
  --accent-soft: #eaf5fc;
  --accent-ring: rgba(11, 132, 198, .18);

  --gold: #b7861a;   --gold-soft: #fbf5e6;
  --silver: #6b7889; --silver-soft: #f1f4f7;
  --bronze: #a0623a; --bronze-soft: #f9efe8;
  --green: #1a7f4b;  --green-soft: #eaf6ef;
  --red: #c23a2b;    --red-soft: #fdeeec;

  --r: 12px;
  --r-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(15, 27, 42, .04);
  --shadow: 0 1px 2px rgba(15, 27, 42, .04), 0 4px 12px rgba(15, 27, 42, .04);
  --shadow-lg: 0 12px 32px rgba(15, 27, 42, .12);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: 'IBM Plex Sans Arabic', system-ui, 'Segoe UI', Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14.5px; line-height: 1.7; min-height: 100vh; }
a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; font-weight: 600; letter-spacing: -.005em; }
p { margin: 0 0 .6em; }
::selection { background: var(--accent-soft); }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.end { justify-content: flex-end; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.hidden { display: none !important; }
.ic { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ic.sm { width: 15px; height: 15px; }
.ic.lg { width: 22px; height: 22px; }

/* حركة دخول ناعمة للصفحات */
.fade { animation: fadeUp .28s var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- أزرار ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 16px;
  border-radius: var(--r-sm); border: 1px solid transparent; font: inherit; font-weight: 500; font-size: 14px; cursor: pointer; white-space: nowrap;
  background: var(--accent); color: #fff; transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .1s;
}
.btn:hover { background: var(--accent-hover); color: #fff; }
.btn:active { transform: scale(.985); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-ring); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.secondary { background: var(--surface); color: var(--text-2); border-color: var(--border-strong); }
.btn.secondary:hover { background: var(--hover); color: var(--text); }
.btn.quiet { background: transparent; color: var(--text-2); }
.btn.quiet:hover { background: var(--hover); color: var(--text); }
.btn.danger { background: var(--surface); color: var(--red); border-color: #f1cdc8; }
.btn.danger:hover { background: var(--red-soft); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn.block { width: 100%; }
.btn.icon { width: 36px; padding: 0; }
.btn.icon.sm { width: 30px; }

/* ---------- حقول ---------- */
label { display: block; font-weight: 500; font-size: 13.5px; color: var(--text-2); margin-bottom: 6px; }
.field { margin-bottom: 16px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=datetime-local], textarea, select {
  width: 100%; font: inherit; font-size: 14px; color: var(--text); height: 40px; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-sm); transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; min-height: 110px; padding: 10px 12px; resize: vertical; line-height: 1.7; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, textarea:hover, select:hover { border-color: #c3ccd6; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
input[type=file] { font: inherit; font-size: 13px; color: var(--muted); max-width: 100%; }
input[type=file]::file-selector-button { font: inherit; font-size: 13px; margin-inline-end: 10px; height: 32px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); cursor: pointer; }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }
.chip-check { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; margin: 0 0 8px 8px; border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--surface); font-weight: 400; color: var(--text-2); cursor: pointer; transition: all .15s; }
.chip-check:hover { background: var(--hover); }
.chip-check:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-hover); }

/* ---------- بطاقات وأقسام ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.card.pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-head h3 { font-size: 15px; }
.card-body { padding: 18px; }
.section { margin-top: 32px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.section-head h2 { font-size: 16px; }
.section-head a { font-size: 13px; }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; border: 1px dashed var(--border-strong); border-radius: var(--r); background: var(--surface); }
.empty .ic { width: 28px; height: 28px; color: var(--faint); margin: 0 auto 8px; display: block; }
.divider { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }

/* ---------- وسوم وحالات ---------- */
.tag { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 6px; font-size: 12px; font-weight: 500; background: var(--hover); color: var(--text-2); white-space: nowrap; }
.tag .ic { width: 13px; height: 13px; }
.tag.accent { background: var(--accent-soft); color: var(--accent-hover); }
.tag.gold { background: var(--gold-soft); color: var(--gold); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.status.open { color: var(--green); } .status.open::before { background: #2fb36d; }
.status.closed { color: var(--muted); } .status.closed::before { background: #c4ccd5; }

/* ---------- الصورة الشخصية ---------- */
.avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; display: inline-grid; place-items: center; font-weight: 600; font-size: 14px; color: #fff; background: #7aa7c7; object-fit: cover; overflow: hidden; user-select: none; }
.avatar.xs { width: 24px; height: 24px; font-size: 11px; }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.avatar.xl { width: 104px; height: 104px; font-size: 36px; border: 4px solid var(--surface); box-shadow: var(--shadow); }
.person { display: inline-flex; align-items: center; gap: 8px; color: var(--text); min-width: 0; }
.person:hover .pname { color: var(--accent); }
.pname { font-weight: 500; transition: color .15s; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- الشعار ---------- */
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); }
.logo:hover { color: var(--text); }
.logo-img { height: 38px; width: auto; }
.logo span { display: flex; flex-direction: column; line-height: 1.3; font-weight: 600; font-size: 15px; }
.logo small { font-size: 11.5px; font-weight: 400; color: var(--muted); }

/* ---------- الدخول ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 420px; padding: 32px 28px; }
.auth-logo { width: 150px; margin: 0 auto 18px; }
.auth h1 { font-size: 21px; text-align: center; }
.auth .lead { text-align: center; color: var(--muted); margin: 4px 0 22px; }
.option-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--r); color: var(--text); background: var(--surface); transition: border-color .15s, background .15s, transform .15s var(--ease); }
.option-row + .option-row { margin-top: 10px; }
.option-row:hover { border-color: var(--accent); background: var(--subtle); color: var(--text); }
.option-row .oi { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.option-row b { display: block; font-weight: 600; }
.option-row .muted { font-size: 13px; }
.option-row .chev { color: var(--faint); transition: transform .15s var(--ease); }
.option-row:hover .chev { transform: translateX(-3px); color: var(--accent); }
.back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.back:hover { color: var(--text); }
.ms-btn { gap: 10px; }
.note { background: var(--subtle); border: 1px solid var(--border); color: var(--text-2); padding: 10px 12px; border-radius: var(--r-sm); font-size: 13px; }
.err { background: var(--red-soft); color: var(--red); padding: 10px 12px; border-radius: var(--r-sm); font-size: 13.5px; margin-bottom: 14px; }
details.demo { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 14px; }
details.demo summary { cursor: pointer; font-size: 13px; color: var(--muted); list-style: none; }
details.demo summary::-webkit-details-marker { display: none; }

/* ---------- هيكل اللوحة ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--surface); border-left: 1px solid var(--border); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 16px 12px; overflow-y: auto; }
.side .logo { padding: 4px 8px 18px; }
.nav a { position: relative; display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 12px; border-radius: var(--r-sm); color: var(--text-2); font-weight: 500; transition: background .15s, color .15s; }
.nav a .ic { color: var(--faint); transition: color .15s; }
.nav a:hover { background: var(--hover); color: var(--text); }
.nav a:hover .ic { color: var(--text-2); }
.nav a.active { background: var(--accent-soft); color: var(--accent-hover); }
.nav a.active .ic { color: var(--accent); }
.nav a.active::before { content: ''; position: absolute; right: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px 0 0 3px; background: var(--accent); }
.nav .grp { font-size: 11.5px; font-weight: 500; color: var(--faint); padding: 18px 12px 6px; }
.side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }
.me-link { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-sm); color: var(--text); transition: background .15s; }
.me-link:hover { background: var(--hover); color: var(--text); }
.me-link .grow b { display: block; font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-link .grow span { font-size: 12px; color: var(--muted); }
.main { min-width: 0; }
.page { max-width: 1120px; margin: 0 auto; padding: 28px 32px 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; }
.page-head .muted { margin-top: 2px; }
.crumb { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.crumb:hover { color: var(--text); }
.mobile-bar { display: none; }

/* شريط تبويب بنمط مقسّم */
.seg { display: inline-flex; gap: 2px; padding: 3px; background: #edf1f5; border-radius: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.seg button { white-space: nowrap; font: inherit; font-size: 13.5px; font-weight: 500; height: 32px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; display: inline-flex; align-items: center; gap: 6px; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(15, 27, 42, .08); }

/* ---------- إحصاءات ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.stat { padding: 16px 18px; border-inline-start: 1px solid var(--border); }
.stat:first-child { border-inline-start: 0; }
.stat .n { font-size: 24px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 12.5px; color: var(--muted); }

/* اختصارات الأقسام */
.shortcuts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.shortcut { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); color: var(--text); transition: border-color .15s, box-shadow .2s var(--ease), transform .2s var(--ease); }
.shortcut:hover { border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-1px); color: var(--text); }
.shortcut .si { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.shortcut b { font-weight: 600; display: block; }
.shortcut span { font-size: 12.5px; color: var(--muted); }

/* ---------- بطاقة المحتوى ---------- */
.post { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; color: var(--text); cursor: pointer; transition: border-color .15s, box-shadow .2s var(--ease), transform .2s var(--ease); }
.post:hover { border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--text); }
.post .cover { aspect-ratio: 16/8; background: var(--subtle) center/cover no-repeat; border-bottom: 1px solid var(--border); }
.post .pb { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.post .ptype { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); }
.post .ptype > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.post h3 { font-size: 15.5px; }
.post .excerpt { color: var(--muted); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post .pf { margin-top: auto; padding-top: 10px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.post .pf span { display: inline-flex; align-items: center; gap: 4px; }
.post .done { color: var(--green); }

/* ---------- الفائزون ---------- */
.winner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); }
.winner .grow b { display: block; font-weight: 600; }
.winner .grow span { font-size: 12.5px; color: var(--muted); }
.rank { display: inline-flex; align-items: center; justify-content: center; height: 24px; padding: 0 9px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.rank.r1 { background: var(--gold-soft); color: var(--gold); }
.rank.r2 { background: var(--silver-soft); color: var(--silver); }
.rank.r3 { background: var(--bronze-soft); color: var(--bronze); }
.rank.r4 { background: var(--accent-soft); color: var(--accent-hover); }
.leaders { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.leader { text-align: center; padding: 22px 12px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); }
.leader .avatar { margin: 0 auto 10px; }
.leader b { display: block; font-weight: 600; }
.leader .muted { font-size: 12.5px; }
.leader .rank { margin-top: 10px; }
.leader.first { border-color: #ead9ad; box-shadow: 0 0 0 3px var(--gold-soft); }

/* ---------- الجداول ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: right; padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-weight: 500; font-size: 12.5px; color: var(--muted); background: var(--subtle); }
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--subtle); }
tr:last-child td { border-bottom: 0; }
td select { height: 34px; min-width: 150px; }

/* ---------- تفاصيل المحتوى ---------- */
.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.detail-img { border-radius: var(--r-sm); width: 100%; max-height: 420px; object-fit: cover; margin-bottom: 16px; }
.content { font-size: 15px; color: var(--text-2); line-height: 1.85; }
.meta-list { display: grid; gap: 12px; font-size: 13.5px; }
.meta-list div { display: flex; align-items: flex-start; gap: 10px; color: var(--text-2); }
.meta-list .ic { color: var(--faint); margin-top: 3px; }
.meta-list b { color: var(--text); font-weight: 500; }
.file { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--text); transition: background .15s, border-color .15s; }
.file + .file { margin-top: 8px; }
.file:hover { background: var(--subtle); border-color: var(--border-strong); color: var(--text); }
.file .ext { width: 38px; height: 38px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 600; font-size: 11px; }
audio { width: 100%; max-width: 420px; height: 38px; }

/* ---------- التصويت ---------- */
.options { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.opt { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; transition: border-color .15s, box-shadow .2s var(--ease); }
.opt:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.opt.mine { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.opt img { aspect-ratio: 4/3; object-fit: cover; width: 100%; background: var(--subtle); }
.opt .ob { padding: 14px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.opt .ol { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.opt .ob .btn { margin-top: auto; }
.bar { height: 6px; border-radius: 99px; background: var(--hover); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .6s var(--ease); }
.opt.top .bar > i { background: var(--gold); }
.pct { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.opt-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; margin-bottom: 8px; }

/* ---------- المشاركات ---------- */
.sub { padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); }
.sub + .sub { margin-top: 10px; }
.sub .stext { background: var(--subtle); border: 1px solid var(--border); padding: 10px 12px; border-radius: var(--r-sm); white-space: pre-wrap; margin: 10px 0; color: var(--text-2); }
.sub img { max-height: 240px; border-radius: var(--r-sm); margin: 10px 0; }
.sub audio { margin-top: 10px; }
.feedback { display: flex; gap: 8px; background: var(--accent-soft); color: var(--accent-hover); padding: 10px 12px; border-radius: var(--r-sm); margin-top: 10px; font-size: 13.5px; }
.rec { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px; border: 1px dashed var(--border-strong); border-radius: var(--r-sm); background: var(--subtle); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* ---------- الملف الشخصي ---------- */
.profile-cover { height: 120px; border-radius: var(--r) var(--r) 0 0; background: linear-gradient(120deg, #e3f1fa, #f3f8fc 60%, #eef4f8); border-bottom: 1px solid var(--border); }
.profile-head { padding: 0 24px 18px; display: flex; align-items: flex-start; gap: 18px; margin-top: -52px; flex-wrap: wrap; }
.profile-head .info { padding-top: 60px; }
.profile-head > .btn { margin-top: 64px; }
.profile-head .avatar-wrap { position: relative; }
.profile-head .cam { position: absolute; bottom: 4px; left: 4px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border-strong); color: var(--text-2); cursor: pointer; transition: background .15s; }
.profile-head .cam:hover { background: var(--hover); }
.profile-head h1 { font-size: 21px; }
.profile-head .info { flex: 1; min-width: 200px; padding-bottom: 4px; }
.profile-head .info .row { margin-top: 6px; }
.bio { color: var(--text-2); margin: 0 24px 22px; white-space: pre-wrap; }
.bio.empty-bio { color: var(--faint); }
.kv { display: grid; gap: 0; }
.kv > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.kv > div:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.kv b { font-weight: 500; text-align: left; overflow-wrap: anywhere; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--border); color: var(--text); transition: background .12s; }
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: var(--subtle); color: var(--text); }

/* ---------- نوافذ وتنبيهات ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 27, 42, .32); display: grid; place-items: center; z-index: 100; padding: 16px; animation: fadeIn .18s ease both; }
.modal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 460px; padding: 22px; box-shadow: var(--shadow-lg); max-height: 90vh; overflow: auto; animation: pop .22s var(--ease) both; }
.modal h3 { font-size: 17px; margin-bottom: 14px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
#toast-root { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { display: flex; align-items: center; gap: 8px; background: #16222f; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 13.5px; box-shadow: var(--shadow-lg); animation: pop .22s var(--ease) both; }
.toast.bad { background: var(--red); }

/* ---------- الجوال ---------- */
@media (max-width: 920px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 0 0 auto; width: 272px; z-index: 60; transform: translateX(100%); transition: transform .25s var(--ease); box-shadow: none; }
  .side.open { transform: none; box-shadow: var(--shadow-lg); }
  .scrim { position: fixed; inset: 0; background: rgba(15, 27, 42, .3); z-index: 55; animation: fadeIn .2s both; }
  .mobile-bar { display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 12px 0 16px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 40; }
  .mobile-bar .logo-img { height: 32px; }
  .page { padding: 20px 16px 48px; }
  .layout-2 { grid-template-columns: 1fr; }
  .stat { border-inline-start: 0; border-top: 1px solid var(--border); }
  .leaders { grid-template-columns: 1fr; }
  .profile-head { padding: 0 16px 18px; }
  .bio { margin: 0 16px 18px; }
}

/* ================= الهوية البصرية: أزرق وأبيض زجاجي (Glass) ================= */
:root {
  --glass: rgba(255, 255, 255, .6);
  --glass-strong: rgba(255, 255, 255, .78);
  --glass-border: rgba(255, 255, 255, .7);
  --glass-line: rgba(11, 110, 180, .14);
  --blur: saturate(140%) blur(16px);
  --accent: #0b74c0;
  --accent-hover: #0a63a6;
  --accent-soft: rgba(11, 132, 198, .12);
  --border: var(--glass-line);
  --shadow: 0 2px 8px rgba(13, 60, 110, .06), 0 8px 28px rgba(13, 60, 110, .08);
  --shadow-sm: 0 1px 2px rgba(13, 60, 110, .05);
  --shadow-lg: 0 16px 48px rgba(13, 60, 110, .22);
  /* زوايا أنعم على كل الموقع */
  --r: 18px;
  --r-sm: 12px;
}
/* عناصر فيها زوايا ثابتة — نعّمها */
.btn { border-radius: 12px; }
.btn.sm { border-radius: 10px; }
.btn.icon.sm, .btn.icon { border-radius: 10px; }
.tag, .rank, .status { border-radius: 8px; }
.seg { border-radius: 14px; }
.seg button { border-radius: 11px; }
.avatar.xl { border-radius: 28px; }
.modal { border-radius: 20px; }
.auth-card { border-radius: 22px; }
.stats { border-radius: 18px; }
.profile-cover { border-radius: 18px 18px 0 0; }
.cover, .post .cover { border-radius: 0; }
.detail-img, .opt img, .sub img { border-radius: 12px; }
body {
  background:
    radial-gradient(1100px 680px at 88% -8%, rgba(56, 160, 230, .40), transparent 60%),
    radial-gradient(900px 600px at 4% 108%, rgba(120, 200, 255, .38), transparent 60%),
    radial-gradient(700px 500px at 50% 50%, rgba(190, 225, 255, .25), transparent 70%),
    linear-gradient(160deg, #eaf4fd 0%, #f4f9ff 45%, #e8f2fc 100%);
  background-attachment: fixed;
}
/* الأسطح الزجاجية */
.card, .side, .mobile-bar, .topbar, .stats, .shortcut, .post, .sub, .opt, .winner, .leader, .modal, .note, .option-row, .seg {
  background: var(--glass);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border-color: var(--glass-border);
}
.card, .post, .shortcut, .sub, .opt, .winner, .leader, .stats { box-shadow: var(--shadow); }
.card-head, .list-row, .stat, th, td { border-color: var(--glass-line); }
th { background: rgba(255, 255, 255, .35); }
tbody tr:hover, .list-row:hover, .shortcut:hover, .post:hover { background: rgba(255, 255, 255, .45); }
.subtle, .hover { background: rgba(255, 255, 255, .4) !important; }
/* الحقول زجاجية */
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=datetime-local], textarea, select {
  background: rgba(255, 255, 255, .72); border-color: rgba(11, 110, 180, .28);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
}
input:focus, textarea:focus, select:focus { background: #fff; }
/* الشريط الجانبي زجاجي أبيض */
.side { background: var(--glass-strong); border-left-color: var(--glass-border); }
.nav a.active { background: rgba(11, 132, 198, .16); }
.nav a.active::before { background: var(--accent); }
/* صفحة الدخول */
.auth-card { background: var(--glass-strong); box-shadow: var(--shadow-lg); }
.seg { background: rgba(13, 80, 140, .08); }
.seg button.on { background: rgba(255, 255, 255, .92); }
/* الأزرار تبقى زرقاء صريحة */
.btn { box-shadow: 0 4px 14px rgba(11, 116, 192, .28); }
.btn.secondary, .btn.quiet { background: rgba(255, 255, 255, .6); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.modal-bg { background: rgba(13, 50, 95, .3); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.toast { background: rgba(14, 40, 70, .9); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }

/* ===== التاسك مانجر (أقسام لوحة الطالب): مستطيلات موحّدة ===== */
.shortcuts { grid-template-columns: repeat(4, 1fr); gap: 12px; }
.shortcut { min-height: 84px; border-radius: 18px; }
@media (max-width: 760px) { .shortcuts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 440px) { .shortcuts { grid-template-columns: 1fr; } }

/* توحيد خانتي الدخول في نفس العرض */
.auth-card .field input { width: 100%; }

.consent { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.55); border: 1px solid rgba(11,110,180,.22); font-size: 14px; cursor: pointer; text-align: right; line-height: 1.6; }
.consent input { width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--accent, #0b74c0); cursor: pointer; }
.consent b { color: var(--accent, #0b74c0); }
.btn.off { opacity: .5; filter: grayscale(.3); }
