/* ── القاعات الدراسية — أنماط الواجهة ── */
:root {
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --secondary: #2dd4bf;
  --accent: #ea580c;
  --bg: #f0fdfa;
  --surface: #ffffff;
  --fg: #134e4a;
  --muted: #5e807c;
  --border: #cdede8;
  --border-strong: #9ad9ce;
  --danger: #dc2626;
  --tint: #0d9488;
  --tint-soft: #e3f7f4;
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 26px;
  --shadow: 0 6px 22px rgba(13, 98, 90, .08);
  --shadow-lg: 0 18px 44px rgba(13, 98, 90, .16);
  --font-head: 'Baloo Bhaijaan 2', 'Tajawal', system-ui, sans-serif;
  --font-body: 'Tajawal', 'Baloo Bhaijaan 2', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--fg);
  background: linear-gradient(180deg, #f0fdfa 0%, #f7fefd 45%, #fdfaf4 100%);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.25; letter-spacing: -.01em; }

.glow {
  position: fixed; inset: -30% -10% auto -10%; height: 60vh;
  pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(45, 212, 191, .32), transparent 62%);
}

.ico { display: inline-flex; align-items: center; }
.ico svg { width: 1.05em; height: 1.05em; stroke-width: 1.9; }

.muted { color: var(--muted); }
/* ── ألوان الشعب ── */
.tint-teal   { --tint: #0d9488; --tint-soft: #e3f7f4; }
.tint-indigo { --tint: #4f46e5; --tint-soft: #eae8fd; }
.tint-amber  { --tint: #d97706; --tint-soft: #fdf0dd; }
.tint-rose   { --tint: #db2777; --tint-soft: #fdeaf3; }

/* ── تخطيط عام ── */
.view { position: relative; z-index: 1; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.35rem;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

/* ── أزرار ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1.4rem; border-radius: 999px; border: none;
  font-family: var(--font-body); font-size: .95rem; font-weight: 700;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, opacity .18s ease;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff; box-shadow: 0 8px 24px rgba(13, 148, 136, .3);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(13, 148, 136, .42); }
.btn-ghost { background: transparent; border: 1.5px solid var(--border-strong); color: var(--primary-dark); }
.btn-ghost:hover:not(:disabled) { background: var(--tint-soft, #e3f7f4); transform: translateY(-2px); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(220, 38, 38, .35); }
.btn-block { width: 100%; margin-top: .35rem; }
.btn-sm { padding: .45rem .9rem; font-size: .85rem; }
/* ── حقول الإدخال ── */
input, textarea, select {
  width: 100%; padding: .7rem 1rem; font-family: var(--font-body); font-size: .95rem;
  color: var(--fg); background: #f8fefd; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); outline: none; resize: vertical;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--primary); background: #fff;
  box-shadow: 0 0 0 4px rgba(13, 148, 136, .14);
}
input.error, textarea.error { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(220, 38, 38, .12); }
input::placeholder, textarea::placeholder { color: #96b5b1; }
label { display: block; font-size: .85rem; font-weight: 700; color: var(--muted); margin-bottom: .35rem; }
.field { margin-top: 1rem; }
.field-label { display: block; font-size: .85rem; font-weight: 700; color: var(--muted); margin-bottom: .4rem; }
.field-error { color: var(--danger); font-size: .85rem; font-weight: 600; margin-top: .35rem; }

/* ── مفتاح الاختيار (دور المستخدم) ── */
.seg { display: flex; gap: .4rem; background: #f3fbfa; border: 1.5px solid var(--border); border-radius: 999px; padding: .3rem; }
.seg-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .55rem 1rem; border: none; border-radius: 999px; cursor: pointer;
  font-family: var(--font-body); font-size: .9rem; font-weight: 700; color: var(--muted);
  background: transparent; transition: all .2s ease;
}
.seg-btn:hover { color: var(--primary-dark); }
.seg-btn.active { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; box-shadow: 0 6px 18px rgba(13, 148, 136, .3); }

/* ── شارات وصور رمزية ── */
.badge {
  display: inline-flex; align-items: center; gap: .25rem; font-size: .72rem; font-weight: 700;
  padding: .18rem .6rem; border-radius: 999px;
  background: rgba(13, 148, 136, .12); color: var(--primary-dark);
}
.badge.amber { background: rgba(234, 88, 12, .12); color: #b45309; }
.chip { display: inline-flex; align-items: center; font-size: .72rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; background: var(--tint-soft); color: var(--tint); }
.role-badge { font-size: .7rem; font-weight: 700; padding: .12rem .5rem; border-radius: 999px; }
.role-teacher { background: rgba(79, 70, 229, .12); color: #4338ca; }
.role-student { background: #eef2f1; color: #4f6b68; }

.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 40px; height: 40px; border-radius: 50%;
  font-family: var(--font-head); font-size: .95rem; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #64748b, #94a3b8);
}
.avatar-teacher { background: linear-gradient(135deg, #4f46e5, #6366f1); }
.avatar-student { background: linear-gradient(135deg, #0d9488, #2dd4bf); }
.avatar-sm { width: 32px; height: 32px; font-size: .8rem; }
/* ── تبويبات ── */
.tabs { display: inline-flex; gap: .3rem; background: #f3fbfa; border: 1.5px solid var(--border); border-radius: 999px; padding: .3rem; }
.tab {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1.1rem; border: none; border-radius: 999px; cursor: pointer; background: transparent;
  font-family: var(--font-body); font-size: .9rem; font-weight: 700; color: var(--muted);
  transition: all .2s ease;
}
.tab:hover { color: var(--primary-dark); }
.tab.active { background: #fff; color: var(--primary-dark); box-shadow: 0 4px 14px rgba(13, 148, 136, .18); }

/* ── عناوين الأقسام ── */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.section-head h2 { display: flex; align-items: center; gap: .5rem; font-size: clamp(1.15rem, 2.4vw, 1.5rem); }
.section-head h2 .ico { color: var(--primary); }

/* ── تنبيه معلومة ── */
.callout {
  display: flex; gap: .8rem; align-items: flex-start;
  padding: 1rem 1.2rem; border-radius: var(--radius);
  background: linear-gradient(135deg, #ecfdf9, #fff7ed);
  border: 1.5px dashed var(--border-strong);
}
.callout .ico { color: var(--accent); flex: 0 0 auto; margin-top: .2rem; }
.callout p { font-size: .95rem; }

/* ── حالة فراغ ── */
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.empty .ico { color: #a7cdc8; }
.empty .ico svg { width: 42px; height: 42px; stroke-width: 1.5; }
.empty p { font-size: 1rem; font-weight: 600; }
.empty p.muted { font-weight: 400; font-size: .9rem; }

/* ── هياكل تحميل ── */
.skeleton { background: linear-gradient(90deg, #eaf6f4 25%, #f7fdfc 50%, #eaf6f4 75%); background-size: 200%; animation: shimmer 1.4s infinite; border-radius: var(--radius); }
.sk-line { height: 18px; margin-bottom: 1rem; }
.sk-w30 { width: 30%; } .sk-w60 { width: 60%; }
.sk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.2rem; margin-top: 1.5rem; }
.sk-card { height: 190px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ── إشعارات ── */
.toast-wrap { position: fixed; bottom: 1.5rem; left: 1.5rem; z-index: 120; display: flex; flex-direction: column; gap: .5rem; }
.toast {
  padding: .8rem 1.3rem; border-radius: var(--radius-sm); font-size: .92rem; font-weight: 700;
  background: #fff; box-shadow: var(--shadow-lg); animation: fadeUp .3s ease;
}
.toast.success { border-inline-start: 4px solid var(--primary); color: var(--primary-dark); }
.toast.error { border-inline-start: 4px solid var(--danger); color: var(--danger); }

/* ── نافذة ── */
.overlay { position: fixed; inset: 0; z-index: 110; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(19, 78, 74, .45); backdrop-filter: blur(4px); animation: fadeIn .2s ease; }
.modal { background: #fff; border-radius: var(--radius-lg); padding: 1.8rem; width: 100%; max-width: 440px; box-shadow: var(--shadow-lg); animation: fadeUp .25s ease; }
.modal h3 { font-size: 1.25rem; margin-bottom: .5rem; }
.modal p { color: var(--muted); font-size: .95rem; }
.modal-actions { display: flex; gap: .6rem; justify-content: flex-start; margin-top: 1.5rem; }
/* ── الشريط العلوي ── */
.navbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem 1.5rem;
  background: rgba(255, 255, 255, .85); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-brand { display: flex; align-items: center; gap: .7rem; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 13px; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 8px 20px rgba(13, 148, 136, .32);
}
.brand-mark .ico svg { width: 22px; height: 22px; }
.brand-mark-lg { width: 58px; height: 58px; border-radius: 18px; }
.brand-mark-lg .ico svg { width: 30px; height: 30px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-family: var(--font-head); font-size: 1.05rem; }
.brand-text small { color: var(--muted); font-size: .75rem; }
.nav-actions { display: flex; align-items: center; gap: .6rem; }

.user-chip {
  display: inline-flex; align-items: center; gap: .6rem; cursor: pointer;
  padding: .35rem .8rem .35rem .5rem; border-radius: 999px;
  background: #f3fbfa; border: 1.5px solid var(--border);
  transition: all .2s ease;
}
.user-chip:hover { border-color: var(--primary); transform: translateY(-1px); }
.user-chip .avatar { width: 34px; height: 34px; font-size: .82rem; }
.user-meta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.user-meta strong { font-size: .88rem; }
.user-meta small { color: var(--muted); font-size: .72rem; }

/* ── شاشة الدخول ── */
.auth { max-width: 1120px; margin: 0 auto; padding: clamp(1.5rem, 5vh, 3.5rem) 1.5rem 3rem; display: grid; gap: 1.5rem; grid-template-columns: 1.05fr .95fr; align-items: start; }
.auth-card { padding: 2rem; }
.auth-head { text-align: center; margin-bottom: 1.5rem; }
.auth-head .brand-mark { margin: 0 auto .9rem; }
.auth-head h1 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: .4rem; }
.auth-head p { color: var(--muted); font-size: .95rem; }
.auth-side { padding: 1rem .5rem; }
.auth-side h2 { font-size: clamp(1.3rem, 2.6vw, 1.75rem); margin-bottom: .7rem; }
.auth-side > p { color: var(--muted); margin-bottom: 1.2rem; }
.feature-list { list-style: none; display: flex; flex-direction: column; gap: .7rem; }
.feature-list li { display: flex; align-items: center; gap: .6rem; font-weight: 600; font-size: .95rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .7rem .9rem; box-shadow: var(--shadow); }
.feature-list .ico { color: var(--primary); }

/* ── اختيار الشعبة ── */
.room-pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.room-pick {
  display: flex; align-items: center; gap: .7rem; text-align: start; cursor: pointer;
  padding: .75rem .85rem; border-radius: var(--radius-sm); background: #fff;
  border: 1.5px solid var(--border); font-family: var(--font-body);
  transition: all .2s ease;
}
.room-pick:hover { transform: translateY(-2px); border-color: var(--tint); box-shadow: var(--shadow); }
.room-pick.active { border-color: var(--tint); background: var(--tint-soft); box-shadow: 0 8px 22px rgba(13, 98, 90, .12); }
.room-letter {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 40px; height: 40px; border-radius: 12px; font-family: var(--font-head);
  font-size: 1.1rem; font-weight: 700; color: #fff; background: var(--tint);
}
.room-pick-meta { display: flex; flex-direction: column; line-height: 1.3; }
.room-pick-meta strong { font-size: .92rem; color: var(--fg); }
.room-pick-meta small { color: var(--muted); font-size: .75rem; }
.room-pick .check { margin-inline-start: auto; color: var(--tint); }
/* ── الترويسة الترحيبية ── */
.hero { text-align: center; padding: 1.5rem .5rem .5rem; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .02em;
  color: var(--primary-dark); background: #e3f7f4;
  padding: .35rem .9rem; border-radius: 999px; margin-bottom: .9rem;
}
.hero h1 { font-size: clamp(1.6rem, 4vw, 2.6rem); margin-bottom: .6rem; }
.hero > p { color: var(--muted); max-width: 620px; margin: 0 auto; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; }
.stat-card { display: flex; flex-direction: column; gap: .3rem; padding: 1.2rem; }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.stat-card strong { font-family: var(--font-head); font-size: clamp(1.6rem, 4vw, 2.2rem); color: var(--primary-dark); line-height: 1; }
.stat-card span { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); font-size: .85rem; font-weight: 600; }
.stat-card span .ico { color: var(--secondary); }

/* ── شبكة القاعات ── */
.halls-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.2rem; }
.hall-card { display: flex; flex-direction: column; gap: .9rem; border-top: 4px solid var(--tint); position: relative; }
.hall-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.hall-head { display: flex; align-items: center; gap: .75rem; }
.hall-letter {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 48px; height: 48px; border-radius: 14px;
  font-family: var(--font-head); font-size: 1.35rem; font-weight: 700;
  color: #fff; background: var(--tint); box-shadow: 0 8px 18px rgba(13, 98, 90, .2);
}
.hall-title h3 { font-size: 1.1rem; display: flex; align-items: center; gap: .4rem; }
.hall-title p { color: var(--muted); font-size: .82rem; }
.hall-stats { display: flex; flex-wrap: wrap; gap: .5rem; }
.hall-stats span {
  display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 600;
  color: var(--tint); background: var(--tint-soft); padding: .25rem .6rem; border-radius: 999px;
}
.hall-last { display: flex; flex-direction: column; gap: .2rem; font-size: .85rem; min-height: 2.6rem; }
.hall-last strong { font-weight: 700; }
.hall-last span { color: var(--muted); font-size: .78rem; }
.hall-card .btn { margin-top: auto; }
.dot-badge { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(234, 88, 12, .55); animation: pulse 2s infinite; margin-inline-start: auto; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(234, 88, 12, 0); } 100% { box-shadow: 0 0 0 0 rgba(234, 88, 12, 0); } }
/* ── آخر النشاط ── */
.activity { padding: .6rem; display: flex; flex-direction: column; }
.activity-row { display: flex; align-items: center; gap: .8rem; padding: .7rem .8rem; border-radius: var(--radius-sm); cursor: pointer; transition: background .18s ease; }
.activity-row:hover { background: #f4fcfb; }
.activity-body { flex: 1; min-width: 0; }
.activity-body p { display: flex; align-items: center; gap: .4rem; font-size: .88rem; flex-wrap: wrap; }
.activity-text { color: var(--muted); font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-time { color: var(--muted); font-size: .76rem; white-space: nowrap; }

/* ── رأس القاعة ── */
.room-head {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  border: 1.5px solid var(--border);
  background: linear-gradient(135deg, var(--tint-soft), #fff 65%);
  border-inline-start: 6px solid var(--tint);
  padding: 1.2rem 1.4rem;
}
.hall-letter-lg { width: 58px; height: 58px; font-size: 1.6rem; border-radius: 18px; }
.room-head-title { flex: 1; min-width: 180px; }
.room-head-title h1 { font-size: clamp(1.25rem, 3vw, 1.7rem); }
.room-head-title p { color: var(--muted); font-size: .88rem; }
.room-head-stats { display: flex; gap: .5rem; flex-wrap: wrap; }
.room-head-stats span { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; font-weight: 600; background: #fff; border: 1px solid var(--border); padding: .3rem .7rem; border-radius: 999px; color: var(--tint); }

/* ── شريط أدوات القاعة ── */
.room-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.search { position: relative; display: flex; align-items: center; min-width: 220px; flex: 1; max-width: 330px; }
.search .ico { position: absolute; inset-inline-start: .85rem; color: var(--muted); pointer-events: none; }
.search input { padding-inline-start: 2.4rem; border-radius: 999px; background: #fff; }
.search input::-webkit-search-cancel-button { cursor: pointer; }
/* ── تغذية الرسائل ── */
.feed {
  display: flex; flex-direction: column; gap: .8rem;
  padding: 1rem; max-height: min(60vh, 600px); overflow-y: auto;
}
.feed::-webkit-scrollbar { width: 9px; }
.feed::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
.feed::-webkit-scrollbar-track { background: transparent; }

.msg {
  display: flex; gap: .8rem; padding: .9rem 1rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #fbfefd; animation: fadeUp .35s ease both;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.msg:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.msg.is-lesson { background: linear-gradient(135deg, var(--tint-soft), #fff 70%); border-color: var(--border-strong); border-inline-start: 4px solid var(--tint); }
.msg-body { flex: 1; min-width: 0; }
.msg-head { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; font-size: .88rem; }
.msg-head strong { font-weight: 700; }
.msg-head time { margin-inline-start: auto; color: var(--muted); font-size: .75rem; }
.you { color: var(--muted); font-weight: 400; font-size: .75rem; }
.msg-title { font-size: 1.05rem; color: var(--tint); margin: .4rem 0 .2rem; }
.msg-text { white-space: pre-wrap; word-break: break-word; font-size: .95rem; }
.msg-note {
  display: flex; align-items: center; gap: .4rem; margin-top: .55rem;
  background: #fff8ed; border: 1px dashed #f0c58a; color: #8a5a0b;
  font-size: .84rem; font-weight: 600; padding: .4rem .7rem; border-radius: var(--radius-sm);
}
.msg-actions { display: flex; gap: .4rem; margin-top: .55rem; opacity: 0; transition: opacity .2s ease; }
.msg:hover .msg-actions, .msg:focus-within .msg-actions { opacity: 1; }
.act {
  display: inline-flex; align-items: center; gap: .3rem; cursor: pointer;
  border: none; background: transparent; color: var(--muted);
  font-family: var(--font-body); font-size: .78rem; font-weight: 700;
  padding: .25rem .5rem; border-radius: 7px; transition: all .18s ease;
}
.act:hover { background: #edf7f5; color: var(--primary-dark); }
.act.danger:hover { background: #fdeaea; color: var(--danger); }
/* ── صندوق الكتابة ── */
.composer { display: flex; flex-direction: column; gap: .7rem; }
.composer.lesson-mode { border-color: #f7c9a3; box-shadow: 0 12px 30px rgba(234, 88, 12, .13); }
.lesson-toggle {
  align-self: flex-start; display: inline-flex; align-items: center; gap: .4rem; cursor: pointer;
  padding: .45rem 1.05rem; border-radius: 999px; font-family: var(--font-body);
  font-size: .86rem; font-weight: 700; color: var(--primary-dark);
  background: #fff; border: 1.5px dashed var(--border-strong); transition: all .2s ease;
}
.lesson-toggle:hover { background: #e9faf7; transform: translateY(-1px); }
.lesson-toggle.on { background: var(--accent); border: 1.5px solid var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(234, 88, 12, .3); }
.lesson-fields { display: none; flex-direction: column; gap: .3rem; }
.lesson-fields.visible { display: flex; }
.composer-row { display: flex; align-items: flex-end; gap: .6rem; }
.composer-row textarea { flex: 1; min-height: 48px; max-height: 150px; }
.composer-row .btn { flex: 0 0 auto; }
.composer-hint { font-size: .74rem; color: var(--muted); text-align: end; }

/* ── تذييل ── */
.site-footer { position: relative; z-index: 1; text-align: center; padding: 2rem 1.5rem 2.5rem; color: var(--muted); font-size: .82rem; }

/* ── حركات ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.fade-up { animation: fadeUp .5s ease both; }
.delay-1 { animation-delay: .12s; }

img, svg { max-width: 100%; }
button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid rgba(13, 148, 136, .45); outline-offset: 2px;
}

/* ── استجابة الشاشات ── */
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-side { padding: 0 .5rem; }
}
@media (max-width: 640px) {
  .container { padding: 1.25rem 1rem 3rem; gap: 1.1rem; }
  .navbar { padding: .6rem .9rem; }
  .brand-text small { display: none; }
  .user-meta { display: none; }
  .user-chip { padding: .3rem; }
  .stats { grid-template-columns: 1fr; }
  .halls-grid, .sk-grid { grid-template-columns: 1fr; }
  .room-pick-grid { grid-template-columns: 1fr; }
  .room-toolbar { flex-direction: column; align-items: stretch; }
  .search { max-width: none; }
  .tabs { width: 100%; }
  .tab { flex: 1; justify-content: center; }
  .room-head { flex-direction: column; align-items: flex-start; }
  .msg-actions { opacity: 1; }
  .composer-row { flex-wrap: wrap; }
  .composer-row textarea { order: 1; width: 100%; }
  .composer-row .btn { order: 2; width: 100%; }
  .composer-row .avatar { order: 0; }
  .feed { max-height: none; padding: .7rem; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
