/* ===== قروب الاستراحة — الأنماط المشتركة ===== */
:root {
  --bg: #FAF6EF;
  --surface: #F5EFE6;
  --white: #FFFFFF;
  --border: #E7DDCC;
  --border-strong: #D8CCB6;
  --track: #EAE1D2;
  --text: #2A2A24;
  --text-2: #4A463D;
  --muted: #6F6A5E;
  --olive: #4F6B4A;
  --olive-dark: #3D5539;
  --amber: #E8A33D;
  --amber-tint: #FCEFD6;
  --amber-border: #F1D49C;
  --amber-text: #7A5212;
  --green: #5FB88A;
  --green-tint: #E3F3EA;
  --green-border: #BFE3CD;
  --green-text: #2F7A52;
  --green-deep: #1F5A3B;
  --red-tint: #F8E6E1;
  --red-border: #EBC9BF;
  --red-text: #A4523F;
  --font: 'Rubik', 'Alexandria', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  transition: background .3s, color .3s;
}
button, input, textarea, select { font-family: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: var(--olive); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

.page {
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  padding: 28px 20px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* أزرار عامة */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; padding: 0 20px; border-radius: 16px;
  font-size: 16px; font-weight: 600; border: none; text-decoration: none;
  transition: transform .1s, background .2s, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--olive); color: #fff; }
.btn-primary:disabled { opacity: .45; }
.btn-ghost { background: transparent; border: 1.5px solid var(--border-strong); color: var(--text-2); font-weight: 500; }
.btn-row { display: flex; gap: 12px; }
.btn-row .btn { flex: 1 1 0; }
.btn-row .btn.wide { flex: 2 1 0; }
.icon { width: 18px; height: 18px; flex-shrink: 0; }

.pill-label {
  align-self: center; padding: 6px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 13px; color: var(--olive); font-weight: 500;
}

.notice {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 16px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--border);
}
.notice .ico { flex-shrink: 0; width: 36px; height: 36px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.notice h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.notice p { margin: 0; font-size: 13px; line-height: 1.7; color: var(--muted); }
.notice.warn { background: var(--amber-tint); border-color: var(--amber-border); }
.notice.warn p { color: var(--amber-text); }

.spacer { flex-grow: 1; }
.center { text-align: center; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

.demo-banner {
  position: sticky; top: 0; z-index: 50;
  background: var(--amber); color: #2A2A24; text-align: center;
  font-size: 12px; font-weight: 600; padding: 6px 12px;
}

/* شاشة دخول/انتقال ناعم */
.screen { animation: slideIn .35s ease both; }
.screen.back { animation-name: slideInBack; }
@keyframes slideIn { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
@keyframes slideInBack { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .screen { animation: none; } }

.loader { display: flex; justify-content: center; padding: 60px 0; }
.loader span { width: 34px; height: 34px; border-radius: 999px; border: 3px solid var(--track); border-top-color: var(--olive); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 14px;
  font-size: 14px; z-index: 100; max-width: 90vw; text-align: center;
  animation: slideIn .3s ease both;
}
