/* =============================================================================
   shell.css — أنماط غلاف التطبيق متعدد الأدوات: الرئيسية، الدخول، مؤشر المزامنة،
   الإعدادات العامة. يعتمد على رموز الألوان في app.css.
   ========================================================================== */

a.icon-btn { text-decoration: none; }
.brand span { font-size: 18px; font-weight: 700; }

/* ---------- الرئيسية ---------- */
.hub-greeting { margin: 18px 4px 10px; color: var(--ink-2); font-size: 14px; }
.hub-greeting b { font-weight: 600; color: var(--ink); unicode-bidi: isolate; }
.tools { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .tools { grid-template-columns: 1fr 1fr; } }
.tool-card {
  position: relative; display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px; box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s, border-color .15s; overflow: hidden;
}
.tool-card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .12;
  background: radial-gradient(220px 140px at 100% 0%, var(--tint, var(--brand)), transparent 70%);
}
.tool-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.tool-card.soon { opacity: .62; cursor: default; }
.tool-card.soon:hover { transform: none; box-shadow: var(--shadow); border-color: var(--line); }
.tool-icon {
  width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-size: 28px; flex: none;
  background: color-mix(in srgb, var(--tint, var(--brand)) 14%, transparent);
}
.tool-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tool-body b { font-size: 17px; }
.tool-body small { color: var(--ink-2); font-size: 13px; line-height: 1.45; }
.tool-summary { margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--brand-ink); }
.tool-soon { font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); flex: none; }
.tool-card .chev { color: var(--muted); display: inline-flex; }

/* ---------- مؤشر المزامنة ---------- */
.sync-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line);
  max-width: 44vw; white-space: nowrap; overflow: hidden;
}
.sync-pill span { overflow: hidden; text-overflow: ellipsis; }
.sync-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.sync-pill.ok i { background: var(--mark-credit); }
.sync-pill.busy i { background: #eda100; animation: pulse 1.1s ease-in-out infinite; }
.sync-pill.err i { background: var(--mark-debit); }
.sync-pill.off i { background: var(--muted); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------- الدخول ---------- */
.auth-title { font-size: 17px; margin: 6px 0 2px; }
.auth-links { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.link-btn { color: var(--brand-ink); font-weight: 600; font-size: 13.5px; padding: 4px 2px; }
.link-btn:hover { text-decoration: underline; }
.note-box.success { background: var(--credit-soft); color: var(--credit); }
.logo-emoji { font-size: 60px; line-height: 1; }

/* ---------- التحميل ---------- */
.loading { display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--ink-2); }
.loading img { width: 72px; height: 72px; border-radius: 20px; box-shadow: 0 14px 30px rgba(11,37,69,.28); }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line-strong); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- شريط التنقّل بأربعة عناصر ---------- */
.nav .container.four { grid-template-columns: repeat(4, 1fr); }
.nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; font-weight: 600; color: var(--muted); text-decoration: none; }
.nav a svg { width: 24px; height: 24px; }

/* بطاقة الترحيب/الدخول تحتاج مساحة أقل من الأسفل (لا شريط تنقّل) */
.onboard .card.auth { padding-top: 22px; }
.onboard .note-box { margin-bottom: 4px; }
