/* APKSync base styles — Tailwind (CDN) handles the rest */
:root { color-scheme: light; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Cairo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Keep latin text readable inside RTL layout */
[dir='ltr'] { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

input, textarea, select, button { font-family: inherit; }

.line-clamp-\[12\] {
  display: -webkit-box;
  -webkit-line-clamp: 12;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

::selection { background: #1e84f8; color: #fff; }

/* thin scrollbars for tables */
.overflow-x-auto::-webkit-scrollbar { height: 8px; }
.overflow-x-auto::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }

/* ---------- dark mode (html.dark) ---------- */
html.dark { color-scheme: dark; }
html.dark body { background: #0b1220 !important; color: #e2e8f0 !important; }
html.dark .bg-white { background-color: #111a2b !important; }
html.dark .bg-white\/90 { background-color: rgba(17,26,43,.92) !important; }
html.dark .bg-slate-50 { background-color: #0b1220 !important; }
html.dark .bg-slate-100 { background-color: #16213a !important; }
html.dark .bg-slate-900 { background-color: #1e293b !important; }
html.dark .border-slate-200 { border-color: #1f2b45 !important; }
html.dark .border-slate-100 { border-color: #1a2439 !important; }
html.dark .divide-slate-100 > * + * { border-color: #1a2439 !important; }
html.dark .text-slate-900,
html.dark .text-slate-800,
html.dark .text-slate-700 { color: #e6edf7 !important; }
html.dark .text-slate-600 { color: #b6c2d6 !important; }
html.dark .text-slate-500 { color: #93a3bb !important; }
html.dark .text-slate-400 { color: #7b8aa3 !important; }
html.dark input,
html.dark textarea,
html.dark select { background-color: #0f1829 !important; color: #e6edf7 !important; border-color: #24314c !important; }
html.dark .hover\:bg-slate-100:hover { background-color: #16213a !important; }
html.dark .shadow-sm, html.dark .shadow, html.dark .shadow-lg, html.dark .shadow-md { box-shadow: none !important; }
html.dark ::selection { background: #1e84f8; color: #fff; }
html.dark .overflow-x-auto::-webkit-scrollbar-thumb { background: #2b3a55; }

/* theme toggle button */
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: .7rem; border: 1px solid #e2e8f0; background: #fff; color: #475569; cursor: pointer; }
.theme-toggle:hover { background: #f1f5f9; }
html.dark .theme-toggle { border-color: #24314c; background: #16213a; color: #e6edf7; }
