/* endorso app (PWA), appendorso 01-11. System fonts only: no third-party requests. */
:root {
    --blue: #2563eb;
    --text: #0f172a;
    --text-muted: #475569;
    --line: #e2e8f0;
    --bg: #f8fafc;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Arabic", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
    padding-bottom: env(safe-area-inset-bottom);
}
a { color: var(--blue); }
.app-header {
    position: sticky; top: 0; z-index: 2;
    display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
    padding: 0.6rem 1rem; padding-top: calc(0.6rem + env(safe-area-inset-top));
    background: #fff; border-bottom: 1px solid var(--line);
}
.app-brand { display: flex; align-items: center; gap: 0.4rem; font-weight: 800; color: var(--text); text-decoration: none; }
.app-brand img { border-radius: 6px; }
.app-nav { display: flex; gap: 0.9rem; font-size: 0.95rem; }
.app-nav a { color: var(--text-muted); text-decoration: none; padding: 0.25rem 0; }
.app-nav a[aria-current="page"] { color: var(--blue); font-weight: 700; border-bottom: 2px solid var(--blue); }
.app-main { max-width: 640px; margin: 0 auto; padding: 1rem; }
.app-h1 { font-size: 1.4rem; margin: 0.25rem 0 1rem; }
.app-h2 { font-size: 1.1rem; margin: 1.25rem 0 0.5rem; }
.app-muted { color: var(--text-muted); font-size: 0.85rem; }
.app-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1rem; margin-bottom: 1rem; }
.app-list { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.app-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.65rem 0.85rem; border-top: 1px solid var(--line); }
.app-row:first-child { border-top: 0; }
.app-row img { border-radius: 8px; object-fit: contain; background: #fff; flex: none; }
.app-row form { margin: 0; flex: none; }
.app-name { flex: 1; min-width: 0; display: flex; flex-direction: column; font-weight: 600; overflow-wrap: anywhere; }
.app-name small { font-weight: 400; }
.app-btn {
    display: inline-block; border: 1px solid var(--line); background: #fff; color: var(--text);
    border-radius: 999px; padding: 0.45rem 0.95rem; font: inherit; font-size: 0.9rem; font-weight: 600;
    text-decoration: none; cursor: pointer;
}
.app-btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.app-filter { display: flex; flex-direction: column; gap: 0.25rem; margin-bottom: 0.6rem; font-size: 0.85rem; color: var(--text-muted); }
.app-filter input { font: inherit; font-size: 1rem; padding: 0.5rem 0.75rem; border: 1px solid var(--line); border-radius: 10px; }
.app-install { margin: 0.75rem 1rem 0; padding: 0.85rem 1rem; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 12px; }
.app-install-line { font-size: 0.82rem; color: var(--text-muted); margin: 0 0 0.5rem; }
.app-install-title { font-weight: 700; margin: 0.25rem 0; }
.app-brainstorm p { margin: 0.6rem 0 0; }
.app-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin: 0; }
.app-stats div { text-align: center; }
.app-stats dt { font-size: 0.8rem; color: var(--text-muted); }
.app-stats dd { margin: 0; font-size: 1.4rem; font-weight: 800; }
.app-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.app-table th, .app-table td { padding: 0.4rem; text-align: end; border-top: 1px solid var(--line); }
.app-table thead th { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; border-top: 0; }
.app-table tbody th { text-align: start; }
.app-sheet { max-width: 480px; width: calc(100% - 32px); border: 0; border-radius: 16px; padding: 1.25rem; color: var(--text); }
.app-sheet::backdrop { background: rgba(15, 23, 42, 0.45); }
.app-sheet h2 { font-size: 1.15rem; margin: 0 0 0.75rem; }
.app-sheet-text { font-size: 0.9rem; background: var(--bg); border: 1px dashed #cbd5e1; border-radius: 8px; padding: 0.75rem; overflow-wrap: anywhere; }
.app-sheet-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0; }
.app-sheet-close { text-align: end; margin: 0.5rem 0 0; }
[hidden] { display: none !important; }
