:root {
  --ink: #1d1d1f; --sub: #6e6e73; --faint: #a1a1a6; --bg: #f5f5f7; --card: #fff; --line: #e5e5ea; --side: #fbfbfd;
  --blue: #0071e3; --blue-deep: #0058b0; --blue-bg: #e8f1ff;
  --red: #d70015; --red-bg: #fff0f1; --amber: #b25000; --amber-bg: #fff6e5;
  --green: #1a7f37; --green-bg: #e9f7ee; --gold: #8a6100; --gold-bg: #fff1c7;
  --radius: 16px; --ease: cubic-bezier(.16, 1, .3, 1);
  --sidebar-w: 264px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14px/1.55 'Tajawal', -apple-system, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3, .brand { font-family: 'Cairo', 'Tajawal', sans-serif; letter-spacing: -0.01em; }
[hidden] { display: none !important; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--sub); }
.ltr { direction: ltr; unicode-bidi: plaintext; }
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea { width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 11px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: -1px; border-color: transparent; }
textarea { min-height: 150px; resize: vertical; line-height: 1.8; }
input[dir="ltr"] { text-align: left; }
label { display: block; font-weight: 700; font-size: 12.5px; color: var(--sub); }
label > input, label > select, label > textarea, label > .input-row { margin-top: 5px; font-weight: 400; color: var(--ink); font-size: 14px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---------- أزرار ---------- */
.btn {
  border: 1px solid var(--line); background: #fff; border-radius: 100px; padding: 7px 16px; cursor: pointer;
  font-weight: 700; white-space: nowrap; color: var(--ink); display: inline-flex; align-items: center; gap: 6px;
  transition: background-color .15s, transform .1s var(--ease);
}
.btn:hover { background: var(--bg); text-decoration: none; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-deep); }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: var(--red-bg); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: rgba(0,0,0,.05); }
.btn.small { padding: 4px 11px; font-size: 12.5px; }
.btn.wide { width: 100%; justify-content: center; padding: 10px; }
.icon-btn { border: 0; background: transparent; cursor: pointer; padding: 5px 7px; border-radius: 8px; color: var(--sub); line-height: 1; }
.icon-btn:hover { background: rgba(0,0,0,.06); color: var(--ink); }
.icon-btn:disabled { opacity: .3; cursor: default; }

/* ---------- تسجيل الدخول ---------- */
.login-view { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { background: #fff; padding: 32px; border-radius: 22px; width: 100%; max-width: 360px; display: grid; gap: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.06); }
.login-card h1 { font-size: 20px; margin: 0 0 6px; text-align: center; }
.login-logo { height: 54px; margin: 0 auto; }
.form-error { color: var(--red); background: var(--red-bg); padding: 8px 12px; border-radius: 10px; margin: 0; font-size: 13px; }

/* ---------- الهيكل: قائمة جانبية + محتوى ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--side);
  border-left: 1px solid var(--line); display: flex; flex-direction: column; padding: 16px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; font-weight: 800; font-size: 15px; }
.brand img { height: 26px; }
.nav-section { margin-bottom: 14px; }
.nav-title { font-size: 11.5px; font-weight: 800; color: var(--faint); padding: 0 10px 6px; letter-spacing: .02em; }
.nav-link {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; color: var(--ink);
  font-weight: 500; transition: background-color .12s;
}
.nav-link:hover { background: rgba(0,0,0,.045); text-decoration: none; }
.nav-link.active { background: var(--blue-bg); color: var(--blue-deep); font-weight: 700; }
.nav-link .ico { width: 18px; text-align: center; opacity: .8; flex: none; }
.nav-link .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-link .count { font-size: 12px; color: var(--faint); font-weight: 500; }
.nav-link.empty { color: var(--faint); }
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dot.error { background: var(--red); }
.dot.warning { background: #f0a020; }
.dot.ok { background: #34c759; }
.dot.none { background: transparent; }
.nav-badge { background: var(--red); color: #fff; font-size: 11px; font-weight: 800; border-radius: 100px; padding: 0 7px; line-height: 18px; }
.groups-nav { display: grid; gap: 1px; }
.groups-nav .nav-link { padding: 5px 10px; }
.groups-nav .nav-link .label { font-weight: 700; }
.sidebar-footer { margin-top: auto; border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 2px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px 10px 10px; }
.avatar-sm { width: 30px; height: 30px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; flex: none; }
.user-chip .who { line-height: 1.3; min-width: 0; }
.user-chip .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .who span { font-size: 12px; color: var(--sub); }

.content { min-width: 0; }
.sidebar-scrim { display: none; }
.mobile-bar { display: none; }
main { padding: 28px 32px 60px; max-width: 1320px; outline: none; }

/* ---------- عناوين الصفحات ---------- */
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--sub); margin-bottom: 10px; flex-wrap: wrap; }
.crumbs a { color: var(--sub); }
.crumbs a:hover { color: var(--blue); }
.page-head { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { margin: 0; font-size: 26px; line-height: 1.2; letter-spacing: -0.02em; }
.page-head .sub { color: var(--sub); margin-top: 4px; }
.page-head .spacer { flex: 1; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input[type="search"] { max-width: 280px; }
.toolbar select { width: auto; }

/* ---------- بطاقات ---------- */
.card { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); }
.card-pad { padding: 18px 20px; }
.card h3 { margin: 0 0 12px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.card h3 .spacer { flex: 1; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat { padding: 16px 18px; }
.stat .num { font-family: 'Cairo', sans-serif; font-size: 28px; font-weight: 800; line-height: 1.1; }
.stat .lbl { color: var(--sub); font-size: 13px; }
.stat.error .num { color: var(--red); }
.stat.warning .num { color: var(--amber); }

.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.group-card { padding: 16px 18px; display: grid; gap: 10px; color: var(--ink); transition: box-shadow .2s var(--ease), transform .12s var(--ease); }
.group-card:hover { box-shadow: 0 6px 22px rgba(0,0,0,.07); text-decoration: none; }
.group-card:active { transform: scale(.985); }
.group-card .top { display: flex; align-items: center; gap: 8px; }
.group-card .top b { font-family: 'Cairo', sans-serif; font-size: 18px; flex: 1; }
.group-card .meta { color: var(--sub); font-size: 13px; }
.group-card.empty { opacity: .55; }
.progress { height: 6px; background: var(--bg); border-radius: 100px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: #34c759; border-radius: 100px; }
.progress-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--sub); }

/* ---------- شارات ---------- */
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 100px; white-space: nowrap; line-height: 1.6; }
.pill.error { background: var(--red-bg); color: var(--red); }
.pill.warning { background: var(--amber-bg); color: var(--amber); }
.pill.info { background: var(--bg); color: var(--sub); }
.pill.ok { background: var(--green-bg); color: var(--green); }
.pill.draft { background: var(--bg); color: var(--sub); border: 1px dashed #c7c7cc; }
.pill.group { background: hsl(var(--gh, 212) 90% 95%); color: hsl(var(--gh, 212) 70% 36%); }
.pill.lead { background: var(--gold-bg); color: var(--gold); }
.pill.spec { background: var(--bg); color: #48484d; font-weight: 500; }
.pills { display: flex; gap: 4px; flex-wrap: wrap; }

/* ---------- جدول المشاريع ---------- */
.table-card { overflow: hidden; }
.table-scroll { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; min-width: 820px; }
table.data th {
  text-align: right; font-size: 12px; color: var(--sub); font-weight: 700; padding: 10px 14px; background: var(--side);
  border-bottom: 1px solid var(--line); white-space: nowrap; user-select: none;
}
table.data th.sortable { cursor: pointer; }
table.data th.sortable:hover { color: var(--ink); }
table.data th .arrow { opacity: .5; font-size: 10px; }
table.data td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tbody tr { cursor: pointer; transition: background-color .1s; }
table.data tbody tr:hover { background: #f8f9fb; }
table.data tbody tr:active { background: var(--blue-bg); }
table.data tbody tr:last-child td { border-bottom: 0; }
.proj-cell { display: flex; align-items: center; gap: 12px; min-width: 240px; }
.proj-cell .txt { min-width: 0; }
.proj-cell b { display: block; font-size: 14.5px; }
.proj-cell .desc { color: var(--sub); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; display: block; }
.proj-cell .desc.missing { color: var(--red); }
.logo { width: 40px; height: 40px; border-radius: 11px; object-fit: cover; flex: none; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; background: var(--bg); border: 1px solid rgba(0,0,0,.04); }
.logo.lg { width: 88px; height: 88px; border-radius: 22px; font-size: 30px; }
.avatar-stack { display: flex; align-items: center; }
.avatar-stack .av { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; margin-inline-start: -8px; color: #fff; font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; object-fit: cover; }
.avatar-stack .av:first-child { margin-inline-start: 0; }
.avatar-stack .more { font-size: 12px; color: var(--sub); margin-inline-start: 6px; }
.link-icons { display: flex; gap: 4px; }
.link-icons .li { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--bg); color: var(--ink); }
.link-icons .li.off { opacity: .22; }
.link-icons .li.bad { background: var(--red-bg); color: var(--red); }
.link-icons svg { width: 12px; height: 12px; }
.chev { color: var(--faint); font-size: 18px; }
.empty { text-align: center; color: var(--sub); padding: 50px 20px; }
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }

/* ---------- بروفايل المشروع ---------- */
.profile-head { padding: 24px; display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.profile-head .logo-wrap { position: relative; }
.profile-head .logo-wrap label { position: absolute; inset-inline-start: -4px; bottom: -4px; width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 14px; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.profile-head .logo-wrap input { display: none; }
.profile-head .head-info { flex: 1; min-width: 220px; }
.profile-head h1 { margin: 0 0 8px; font-size: 28px; line-height: 1.2; letter-spacing: -0.02em; }
.profile-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.profile-grid > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; min-width: 0; }
.about { white-space: pre-line; line-height: 1.95; font-size: 15px; margin: 0; }
.missing-box { border: 1.5px dashed #f1a7ae; background: var(--red-bg); border-radius: 12px; padding: 16px; color: var(--red); display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.member-card {
  position: relative; border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 8px;
  cursor: pointer; background: #fff; transition: box-shadow .2s var(--ease), transform .1s var(--ease), border-color .2s; text-align: right;
}
.member-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.07); border-color: #d8d8de; }
.member-card:active { transform: scale(.985); }
.member-card.leader { border-color: #efd28a; background: linear-gradient(#fffdf6, #fff); }
.member-card.has-error { box-shadow: inset 0 0 0 1px var(--red); }
.member-card .who { display: flex; gap: 10px; align-items: center; }
.member-card .avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; }
.member-card .name { font-weight: 700; line-height: 1.35; }
.member-card .role { color: var(--sub); font-size: 12.5px; }
.member-card .contact { display: grid; gap: 1px; font-size: 12.5px; color: var(--sub); }
.member-card .contact .row { display: flex; gap: 6px; align-items: center; min-width: 0; }
.member-card .contact .row span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-card .contact .missing { color: var(--red); }
.member-card .order-btns { position: absolute; top: 8px; inset-inline-start: 8px; display: flex; gap: 0; opacity: 0; transition: opacity .15s; }
.member-card:hover .order-btns, .member-card:focus-within .order-btns { opacity: 1; }
.member-card .flag { position: absolute; top: 12px; inset-inline-start: 12px; }
.member-card:hover .flag { opacity: 0; }
.add-card { border: 1.5px dashed #c7c7cc; border-radius: 14px; display: flex; align-items: center; justify-content: center; min-height: 120px; color: var(--sub); font-weight: 700; cursor: pointer; background: transparent; }
.add-card:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-bg); }

/* معاينة الشعار بنفس شكل كرت الموقع */
.logo-preview-wrap { display: grid; gap: 6px; }
.card-preview {
  position: relative; overflow: hidden; height: 168px; max-width: 360px; border-radius: 16px;
  background: hsl(var(--gh, 212) 60% 96%); display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
}
.card-preview .pv-bg { position: absolute; inset: -20px; width: calc(100% + 40px); height: calc(100% + 40px); object-fit: cover; filter: blur(22px) saturate(1.2); opacity: .45; }
.card-preview::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,.15)); }
.card-preview .pv-logo { position: relative; z-index: 1; max-width: 78%; max-height: 128px; object-fit: contain; border-radius: 16px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.card-preview.no-logo { background: linear-gradient(135deg, hsl(var(--gh, 212) 72% 58%), hsl(calc(var(--gh, 212) + 30) 70% 42%)); }
.card-preview.no-logo::after { display: none; }
.card-preview.no-logo span { font-family: 'Cairo', sans-serif; font-weight: 800; font-size: 46px; color: #fff; }
.image-guide { background: var(--blue-bg); border-radius: 12px; padding: 12px 14px; font-size: 12.5px; color: #1d3b66; line-height: 1.7; }
.image-guide ul { margin: 6px 0 0; padding-inline-start: 18px; }
.mentor-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mentor-list li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--bg); }
.mentor-list .mentor-name { font-weight: 700; flex: 1; }
.kv { display: grid; gap: 10px; margin: 0; }
.kv > div { display: flex; justify-content: space-between; gap: 10px; }
.kv dt { color: var(--sub); }
.kv dd { margin: 0; font-weight: 700; text-align: left; }
.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.link-list li { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--bg); min-width: 0; }
.link-list .li { width: 26px; height: 26px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.link-list .li svg { width: 13px; height: 13px; }
.link-list .txt { flex: 1; min-width: 0; }
.link-list .txt b { display: block; font-size: 12.5px; }
.link-list .txt a, .link-list .txt span { display: block; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: right; }
.link-list li.off .txt span { color: var(--faint); direction: rtl; }
.link-list li.bad { background: var(--red-bg); }

/* ---------- المشاكل ---------- */
.issue-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.issue-list li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border-radius: 10px; background: var(--bg); }
.issue-list .msg { flex: 1; min-width: 0; font-size: 13.5px; }
.issue-list .val { display: block; color: var(--sub); font-size: 12px; word-break: break-all; unicode-bidi: plaintext; margin-top: 2px; }
.issue-list .who { font-weight: 700; }
.issue-list .where { color: var(--sub); font-size: 12.5px; }
.assign-values { display: grid; gap: 6px; margin-top: 8px; }
.assign-item { display: flex; gap: 6px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 5px 7px; flex-wrap: wrap; }
.assign-item.done { opacity: .5; }
.assign-item.done code { text-decoration: line-through; }
.assign-item code { direction: ltr; text-align: left; font-size: 12.5px; flex: 1 1 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assign-item select { flex: 1; min-width: 0; padding: 3px 7px; font-size: 12.5px; }
.issue-list li > * { min-width: 0; }
.issue-list li > .btn { flex: none; }
.ok-box { display: flex; align-items: center; gap: 8px; color: var(--green); background: var(--green-bg); border-radius: 10px; padding: 12px; font-weight: 700; }

/* ---------- اللوحة الجانبية للتعديل (drawer) ---------- */
.drawer-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.28); z-index: 60; opacity: 0; transition: opacity .3s var(--ease); }
.drawer-scrim.open { opacity: 1; }
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; width: min(520px, 100vw); background: #fff; z-index: 61;
  box-shadow: 10px 0 50px rgba(0,0,0,.18); display: flex; flex-direction: column;
  transform: translateX(-100%); transition: transform .32s var(--ease);
}
.drawer.open { transform: translateX(0); }
#drawer-form { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 18px; flex: 1; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 22px; display: grid; gap: 14px; align-content: start; }
.drawer-foot { display: flex; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--side); align-items: center; }
.drawer-foot .spacer { flex: 1; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.input-row { display: flex; gap: 6px; align-items: center; }
.input-row input { margin: 0; }
.upload-label input { display: none; }
.field-error input, .field-error select, .field-error textarea { border-color: var(--red); background: var(--red-bg); }
.field-warning input, .field-warning select { border-color: #f0b44c; background: var(--amber-bg); }
.hint { font-size: 12px; color: var(--sub); font-weight: 400; }
.photo-edit { display: flex; align-items: center; gap: 14px; }
.photo-edit .avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 22px; flex: none; }
.switch { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink); font-weight: 700; cursor: pointer; padding: 10px 12px; border-radius: 12px; background: var(--gold-bg); }
.switch input { width: 18px; height: 18px; margin: 0; }
.note-box { background: var(--bg); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; color: var(--sub); }

/* ---------- جداول عامة ---------- */
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { text-align: right; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { font-size: 12px; color: var(--sub); background: var(--side); }
table.list tr:last-child td { border-bottom: 0; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 100px; z-index: 100; box-shadow: 0 8px 30px rgba(0,0,0,.2); max-width: 90vw; }
.toast.error { background: var(--red); }
.dialog { border: 0; border-radius: 18px; padding: 24px; width: min(440px, 92vw); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.dialog::backdrop { background: rgba(0,0,0,.35); }
.dialog form { display: grid; gap: 12px; }
.dialog h3 { margin: 0; }
.dialog .actions { display: flex; gap: 8px; justify-content: flex-end; }
.section-gap { display: grid; gap: 18px; }

/* ---------- شاشات صغيرة: القائمة بتصير منزلقة ---------- */
@media (max-width: 1100px) {
  .profile-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; top: 0; right: 0; bottom: 0; width: min(290px, 86vw); z-index: 50; transform: translateX(100%); transition: transform .3s var(--ease); box-shadow: -10px 0 40px rgba(0,0,0,.15); }
  .shell.nav-open .sidebar { transform: translateX(0); }
  .sidebar-scrim { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.25); z-index: 49; }
  .shell.nav-open .sidebar-scrim { display: block; }
  .mobile-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: rgba(251,251,253,.85); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
  .menu-btn { font-size: 20px; }
  .mobile-title { font-family: 'Cairo', sans-serif; font-weight: 800; }
  main { padding: 18px 14px 40px; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .drawer, .sidebar { transition: opacity .2s ease; }
  .drawer:not(.open) { opacity: 0; }
  .btn:active, .member-card:active, .group-card:active { transform: none; }
}
