/* =========================================================
   مهام رواء — تصميم فني هادئ
   مستوحى من TIDE: خلفيات كريمية، بطاقات بصرية، Pastel
   ========================================================= */

@font-face {
  font-family: 'Rawa Display';
  src: url('../assets/fonts/thmanyahserifdisplay-Black.otf') format('opentype');
  font-weight: 900;
  font-display: swap;
}
@font-face {
  font-family: 'Rawa Display';
  src: url('../assets/fonts/thmanyahserifdisplay-Bold.otf') format('opentype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Rawa Display';
  src: url('../assets/fonts/thmanyahserifdisplay-Regular.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'NT Panorama';
  src: url('../assets/fonts/nt-panorama-naskh.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'NT Panorama';
  src: url('../assets/fonts/nt-panorama-naskh-long.otf') format('opentype');
  font-weight: 600;
  font-display: swap;
}

:root {
  /* ألوان رواء الأساسية */
  --rawa-blue: #2B5FC7;
  --rawa-blue-dark: #143A8A;
  --rawa-mint: #2ABFA3;
  --rawa-mint-dark: #0F7867;

  /* خلفيات ناعمة - مستوحاة من TIDE */
  --bg-cream: #FAF7F2;
  --bg-cream-dark: #F2EDE3;
  --bg-paper: #FFFEFB;
  --bg-card: #FFFFFF;

  /* ألوان pastel للبطاقات */
  --pastel-peach: #FFE4D6;
  --pastel-mint:  #DEF5EC;
  --pastel-sky:   #DCEAF8;
  --pastel-cream: #FFF4D6;
  --pastel-rose:  #FFDEE4;
  --pastel-lilac: #ECE0F5;
  --pastel-sage:  #E2EBDC;

  /* نصوص بتباين هادئ لكن واضح */
  --ink-900: #0A1F3D;
  --ink-700: #2C3E5C;
  --ink-500: #5B6B85;
  --ink-300: #9AA8BD;
  --ink-100: #E2E8F0;
  --line:    #E8E2D8;

  /* الحالات */
  --pri-high:   #E76C5C;
  --pri-medium: #F4B860;
  --pri-low:    #88B89E;

  --font-display: 'Rawa Display', 'Cormorant Garamond', 'Times New Roman', serif;
  --font-body:    'NT Panorama', system-ui, -apple-system, sans-serif;

  --shadow-soft: 0 8px 24px rgba(15, 35, 70, 0.06);
  --shadow-card: 0 4px 16px rgba(15, 35, 70, 0.05);
  --shadow-deep: 0 16px 40px rgba(15, 35, 70, 0.10);

  --radius-sm: 12px;
  --radius:    20px;
  --radius-lg: 28px;
  --radius-xl: 36px;
}

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

html, body {
  font-family: var(--font-body);
  background: var(--bg-cream);
  color: var(--ink-900);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
input, textarea, select { font-family: inherit; font-size: 15px; }

/* خلفية متدرجة هادئة في كل الصفحات */
body {
  background:
    radial-gradient(ellipse at top right, rgba(43, 95, 199, 0.04), transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(42, 191, 163, 0.04), transparent 50%),
    var(--bg-cream);
  min-height: 100vh;
  padding-bottom: 100px; /* مساحة للتنقل السفلي */
}

/* ===== الحاوية ===== */
.app {
  max-width: 540px;
  margin: 0 auto;
  padding: 24px 20px 0;
  position: relative;
}

/* ===== Status bar الرسومي ===== */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.status-bar .icon-btn {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--bg-paper);
  box-shadow: var(--shadow-card);
  color: var(--ink-700);
  transition: transform 0.2s;
}
.status-bar .icon-btn:active { transform: scale(0.94); }
.status-bar .icon-btn svg { width: 22px; height: 22px; }

/* ===== رأس البروفايل (مثل صورة TIDE) ===== */
.profile-header {
  margin-bottom: 32px;
  position: relative;
}
.profile-header .greeting {
  font-size: 14px;
  color: var(--ink-500);
  margin-bottom: 4px;
  font-weight: 500;
}
.profile-header h1 {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink-900);
  margin-bottom: 8px;
}
.profile-header .meta {
  font-size: 14px;
  color: var(--ink-500);
  font-weight: 500;
}
.profile-header .avatar {
  position: absolute;
  top: 0; left: 0;
  width: 72px; height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--rawa-blue), var(--rawa-mint));
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  box-shadow: var(--shadow-card);
  border: 3px solid var(--bg-paper);
}

/* ===== شريط الترحيب الكبير (مستوحى من TIDE Plus) ===== */
.hero-card {
  background: linear-gradient(135deg, #1A2540 0%, #0F1A30 100%);
  color: white;
  padding: 24px 28px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  min-height: 100px;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-soft);
}
.hero-card::before {
  content: "";
  position: absolute;
  top: -40%; right: -20%;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(244, 184, 96, 0.15), transparent 60%);
  border-radius: 50%;
}
.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='100' viewBox='0 0 200 100'><path d='M0 50 Q50 20 100 50 T200 50' stroke='rgba(255,255,255,0.05)' stroke-width='1.5' fill='none'/><path d='M0 65 Q50 35 100 65 T200 65' stroke='rgba(255,255,255,0.04)' stroke-width='1.5' fill='none'/><path d='M0 80 Q50 50 100 80 T200 80' stroke='rgba(255,255,255,0.03)' stroke-width='1.5' fill='none'/></svg>") no-repeat center;
  background-size: cover;
  opacity: 0.6;
}
.hero-card .content {
  position: relative;
  z-index: 1;
}
.hero-card .label {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.hero-card .label .accent {
  color: #F4B860;
  font-style: italic;
  font-weight: 400;
}
.hero-card .sub {
  font-size: 13px;
  opacity: 0.7;
  margin-top: 4px;
  letter-spacing: 0.02em;
}

/* ===== شبكة البطاقات السريعة (Favorites/Recents style) ===== */
.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.quick-card {
  background: var(--bg-paper);
  padding: 18px 20px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, box-shadow 0.2s;
}
.quick-card:active { transform: scale(0.96); }
.quick-card .ico {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.quick-card .ico.blue   { background: var(--pastel-sky); color: var(--rawa-blue); }
.quick-card .ico.mint   { background: var(--pastel-mint); color: var(--rawa-mint-dark); }
.quick-card .ico.peach  { background: var(--pastel-peach); color: #C44E1C; }
.quick-card .ico.cream  { background: var(--pastel-cream); color: #B47A00; }
.quick-card .label-text { font-weight: 600; font-size: 15px; color: var(--ink-900); }
.quick-card .count {
  margin-right: auto;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  color: var(--ink-700);
  line-height: 1;
}

/* ===== البطاقات الكبيرة (Add a Widget style) ===== */
.feature-card {
  background: var(--bg-paper);
  padding: 24px 28px;
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  position: relative;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.feature-card .feature-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  max-width: 60%;
}
.feature-card .feature-desc {
  font-size: 14px;
  color: var(--ink-500);
  max-width: 60%;
  line-height: 1.5;
}
.feature-card .feature-illustration {
  position: absolute;
  bottom: -10px; left: -10px;
  width: 140px; height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== شارة الإنجاز (My TIDE style) ===== */
.badge-card {
  background: var(--bg-paper);
  padding: 24px;
  border-radius: var(--radius-lg);
  text-align: center;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}
.badge-card .head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 0 4px;
}
.badge-card .head .title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
}
.badge-card .head .title .small-logo {
  width: 22px; height: 22px;
  background: linear-gradient(135deg, var(--rawa-blue), var(--rawa-mint));
  border-radius: 50%;
  display: inline-block;
  position: relative;
}
.badge-card .head .title .small-logo::after {
  content: ""; position: absolute;
  bottom: 4px; left: 50%;
  transform: translateX(-50%);
  width: 14px; height: 5px;
  background: var(--bg-paper);
  border-radius: 50% 50% 0 0;
}
.badge-card .head .arrow {
  color: var(--ink-300);
  font-size: 20px;
}
.badge-card .laurel {
  position: relative;
  padding: 24px 40px 12px;
  display: inline-block;
}
.badge-card .laurel::before,
.badge-card .laurel::after {
  content: ""; position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 28px; height: 60px;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.5;
}
.badge-card .laurel::before {
  right: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 70'><path d='M5 5 Q15 35 5 65 M10 10 Q20 15 25 10 M10 25 Q20 30 25 25 M10 40 Q20 45 25 40 M10 55 Q20 60 25 55' stroke='%239AA8BD' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>");
}
.badge-card .laurel::after {
  left: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 70'><path d='M25 5 Q15 35 25 65 M20 10 Q10 15 5 10 M20 25 Q10 30 5 25 M20 40 Q10 45 5 40 M20 55 Q10 60 5 55' stroke='%239AA8BD' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>");
}
.badge-card .laurel .number {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink-900);
}
.badge-card .laurel .label-pill {
  display: inline-block;
  background: var(--ink-100);
  color: var(--ink-700);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 6px;
}

/* ===== العناوين الفنية (Together, we can style) ===== */
.section-heading {
  text-align: center;
  margin: 56px 0 32px;
}
.section-heading h2 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--rawa-mint-dark);
}
.section-heading h2 .ar {
  font-style: normal;
  font-weight: 900;
  letter-spacing: -0.04em;
}

/* ===== بطاقات المهام الفنية (illustrated cards) ===== */
.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 12px;
  margin-bottom: 32px;
}
.story-card {
  position: relative;
  border-radius: var(--radius);
  overflow: visible;
  transition: transform 0.2s;
}
.story-card:active { transform: scale(0.97); }
.story-card .image {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-card);
}
.story-card .pill {
  position: absolute;
  bottom: -12px;
  background: var(--bg-paper);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-card);
  white-space: nowrap;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.story-card.tilt-r { transform: rotate(-1.5deg); }
.story-card.tilt-l { transform: rotate(1.5deg); }
.story-card.tilt-r:active { transform: rotate(-1.5deg) scale(0.97); }
.story-card.tilt-l:active { transform: rotate(1.5deg) scale(0.97); }

.story-card .pill.bg-lilac { background: var(--pastel-lilac); }
.story-card .pill.bg-mint  { background: var(--pastel-mint); }
.story-card .pill.bg-sky   { background: var(--pastel-sky); }
.story-card .pill.bg-cream { background: var(--pastel-cream); }
.story-card .pill.bg-peach { background: var(--pastel-peach); }
.story-card .pill.bg-rose  { background: var(--pastel-rose); }

/* عرض sticky placement للـ pills (مثل TIDE) */
.story-card.right-pill .pill { left: 8px; }
.story-card.left-pill .pill { right: 8px; }

/* ===== التنقل السفلي ===== */
.bottom-nav {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 420px;
  background: var(--bg-paper);
  border-radius: 32px;
  padding: 10px;
  display: flex;
  justify-content: space-around;
  box-shadow: var(--shadow-deep);
  z-index: 100;
  border: 1px solid rgba(255, 255, 255, 0.6);
}
.bottom-nav .nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px;
  border-radius: 24px;
  color: var(--ink-300);
  transition: all 0.25s;
}
.bottom-nav .nav-item.active {
  color: var(--ink-900);
  background: var(--bg-cream-dark);
}
.bottom-nav .nav-item svg { width: 24px; height: 24px; }
.bottom-nav .nav-item .label-nav {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ===== الصفحات والتبديل ===== */
.page { display: none; animation: fade 0.3s ease; }
.page.active { display: block; }
@keyframes fade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== صفحة المهام (List view) ===== */
.tasks-list .filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 16px;
  margin: 0 -20px 16px;
  padding-right: 20px;
  padding-left: 20px;
  scrollbar-width: none;
}
.tasks-list .filter-chips::-webkit-scrollbar { display: none; }
.tasks-list .chip {
  flex-shrink: 0;
  padding: 10px 16px;
  background: var(--bg-paper);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-500);
  white-space: nowrap;
  box-shadow: var(--shadow-card);
  transition: all 0.2s;
}
.tasks-list .chip.active {
  background: var(--ink-900);
  color: white;
}

.task-item {
  background: var(--bg-paper);
  padding: 20px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s;
}
.task-item:active { transform: scale(0.985); }
.task-item .check {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid var(--ink-300);
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.task-item.done .check {
  background: var(--rawa-mint);
  border-color: var(--rawa-mint);
}
.task-item.done .check::after {
  content: "✓";
  color: white;
  font-size: 14px;
  font-weight: 800;
}
.task-item .body { flex: 1; min-width: 0; }
.task-item .title {
  font-weight: 700;
  font-size: 16px;
  color: var(--ink-900);
  margin-bottom: 6px;
  line-height: 1.35;
}
.task-item.done .title {
  text-decoration: line-through;
  color: var(--ink-500);
}
.task-item .meta {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-500);
  flex-wrap: wrap;
  align-items: center;
}
.task-item .meta .pri {
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 11px;
}
.task-item .meta .pri.high   { background: var(--pastel-peach); color: #C44E1C; }
.task-item .meta .pri.medium { background: var(--pastel-cream); color: #966600; }
.task-item .meta .pri.low    { background: var(--pastel-sage); color: #4A7558; }

.task-item .progress-mini {
  height: 4px;
  background: var(--ink-100);
  border-radius: 2px;
  margin-top: 10px;
  overflow: hidden;
}
.task-item .progress-mini .bar {
  height: 100%;
  background: linear-gradient(90deg, var(--rawa-blue), var(--rawa-mint));
  transition: width 0.6s;
}

/* ===== Floating Action Button ===== */
.fab {
  position: fixed;
  bottom: 96px;
  left: 24px;
  width: 56px; height: 56px;
  background: var(--ink-900);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  font-weight: 300;
  box-shadow: var(--shadow-deep);
  z-index: 90;
  transition: transform 0.2s;
}
.fab:active { transform: scale(0.92); }

/* ===== Modal للتفاصيل والإضافة ===== */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(10, 31, 61, 0.4);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
  animation: fade 0.25s ease;
}
.modal-bg.show { display: flex; }
.modal {
  background: var(--bg-cream);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 24px 24px 40px;
  overflow-y: auto;
  animation: slideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.modal .handle {
  width: 40px; height: 4px;
  background: var(--ink-100);
  border-radius: 2px;
  margin: 0 auto 20px;
}
.modal h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  line-height: 1.1;
}
.modal .modal-meta {
  font-size: 13px;
  color: var(--ink-500);
  margin-bottom: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.modal .modal-section {
  margin-bottom: 24px;
}
.modal .modal-section .lbl {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin-bottom: 8px;
}
.modal .modal-section p {
  font-size: 15px;
  color: var(--ink-700);
  line-height: 1.6;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.field label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-500);
}
.field input,
.field select,
.field textarea {
  padding: 14px 16px;
  background: var(--bg-paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--rawa-blue);
}
.field textarea { resize: none; min-height: 80px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 15px;
  transition: transform 0.15s;
}
.btn:active { transform: scale(0.96); }
.btn.primary { background: var(--ink-900); color: white; width: 100%; }
.btn.ghost { background: var(--ink-100); color: var(--ink-700); }
.btn.danger { color: var(--pri-high); background: rgba(231, 108, 92, 0.1); }

/* ===== صفحة Login ===== */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 420px;
  text-align: center;
}
.login-card .logo-mark {
  width: 80px; height: 80px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--rawa-blue), var(--rawa-mint));
  margin: 0 auto 24px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}
.login-card .logo-mark::after {
  content: ""; position: absolute;
  bottom: 12px; left: 50%;
  transform: translateX(-50%);
  width: 36px; height: 12px;
  background: var(--bg-cream);
  border-radius: 50% 50% 0 0;
}
.login-card h1 {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}
.login-card h1 .it {
  font-style: italic;
  font-weight: 400;
  color: var(--rawa-mint-dark);
}
.login-card .tag {
  font-size: 15px;
  color: var(--ink-500);
  margin-bottom: 32px;
}
.login-card .field { text-align: right; }
.login-error {
  background: rgba(231, 108, 92, 0.1);
  color: var(--pri-high);
  padding: 12px;
  border-radius: 12px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}
.login-error.show { display: block; }

/* ===== صفحة Explore (المهام جماعية) ===== */
.dept-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.dept-card {
  background: var(--bg-paper);
  padding: 20px 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s;
}
.dept-card:active { transform: scale(0.97); }
.dept-card .dept-icon {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 12px;
}
.dept-card .dept-name {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
  line-height: 1.3;
}
.dept-card .dept-stat {
  font-size: 12px;
  color: var(--ink-500);
}

/* ===== Skeleton للتحميل ===== */
.skeleton {
  background: linear-gradient(90deg, var(--ink-100) 25%, var(--bg-cream-dark) 50%, var(--ink-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 110px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink-900);
  color: white;
  padding: 12px 20px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-deep);
  z-index: 300;
  animation: toastIn 0.3s ease;
}
@keyframes toastIn {
  from { transform: translate(-50%, 20px); opacity: 0; }
  to   { transform: translate(-50%, 0); opacity: 1; }
}

/* ===== شاشات أكبر (تابلت) ===== */
@media (min-width: 720px) {
  .app { max-width: 720px; padding: 32px 32px 0; }
  .profile-header h1 { font-size: 84px; }
  .quick-grid { grid-template-columns: repeat(4, 1fr); }
  .story-grid { grid-template-columns: repeat(3, 1fr); }
  .dept-grid { grid-template-columns: repeat(3, 1fr); }
  .section-heading h2 { font-size: 72px; }
}

/* ===== الوضع الداكن (للمستقبل) ===== */
@media (prefers-color-scheme: dark) {
  /* نتركها فاتحة - تتطابق مع TIDE */
}
