/* SFQA custom styles — supplement Tailwind */

/* Alpine.js: hide elements until initialized (prevents FOUC) */
[x-cloak] { display: none !important; }

/* Large touch targets for factory use (minimum 44px per WCAG) */
.touch-target {
    min-height: 44px;
    min-width: 44px;
}

/* Offline indicator */
body.offline::after {
    content: 'OFFLINE';
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: #f59e0b;
    color: #1c1917;
    padding: 2px 16px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    border-radius: 0 0 6px 6px;
    z-index: 9999;
}

/* PASS/FAIL large buttons */
.btn-pass {
    background: #16a34a;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    transition: background-color 150ms;
}
.btn-pass:hover { background: #15803d; }
.btn-pass:active { background: #166534; }

.btn-fail {
    background: #dc2626;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    transition: background-color 150ms;
}
.btn-fail:hover { background: #b91c1c; }
.btn-fail:active { background: #991b1b; }

/* Measurement input — large text for tablet */
.measurement-input {
    font-size: 1.5rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* HTMX loading indicator */
.htmx-indicator {
    opacity: 0;
    transition: opacity 200ms;
}
.htmx-request .htmx-indicator {
    opacity: 1;
}

/* Smooth page transitions via HTMX */
.htmx-swapping {
    opacity: 0;
    transition: opacity 100ms;
}

/* Page slide-up reveal animation */
@keyframes slide-up {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-slide-up {
    animation: slide-up 300ms ease-out both;
}

/* Queue row tap feedback on mobile (iOS needs this) */
#queue-body tr[hx-get] {
    -webkit-tap-highlight-color: rgba(59, 130, 246, 0.15);
}
#queue-body tr.htmx-request {
    opacity: 0.6;
    pointer-events: none;
}

/* ───────────────────────────────────────────────────────────────────────── */
/* SFQA Shopfloor design system v2 — Sutnar dashboard direction
   Tokens + composable classes for the Domů launchpad and bottom-nav.
   See /tmp/sfqa-shopfloor-redesign.html for the visual reference. */
/* ───────────────────────────────────────────────────────────────────────── */

:root {
    --sf-navy: #1e3a5f;
    --sf-navy-2: #0f1f33;
    --sf-ink: #0c0a09;
    --sf-ink-2: #292524;
    --sf-ink-3: #57534e;
    --sf-ink-4: #78716c;
    --sf-ink-5: #a8a29e;
    --sf-paper: #fafaf9;
    --sf-paper-2: #f5f5f4;
    --sf-card: #ffffff;
    --sf-border: #e7e5e4;
    --sf-border-2: #d6d3d1;
    --sf-red: #b91c1c;
    --sf-red-bg: #fef2f2;
    --sf-amber: #b45309;
    --sf-amber-bg: #fffbeb;
    --sf-emerald: #047857;
    --sf-emerald-bg: #ecfdf5;
    --sf-blue: #0369a1;
    --sf-blue-bg: #f0f9ff;
}

.sf-font-display { font-family: 'Archivo', system-ui, sans-serif; letter-spacing: -0.02em; }
.sf-font-mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-feature-settings: 'zero' 1; }

/* Section header — small Archivo caps with a divider line filling the rest */
.sf-section-label {
    font-family: 'Archivo', system-ui, sans-serif;
    font-weight: 700;
    font-size: 0.6875rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--sf-ink-4);
}
.sf-section-rule { display: flex; align-items: center; gap: 0.75rem; margin: 1.5rem 0 0.875rem; }
.sf-section-rule::after { content: ''; flex: 1; height: 1px; background: var(--sf-border); }

/* RIGHT NOW card — the launchpad centerpiece */
.sf-now-card {
    display: flex; align-items: center; gap: 1.5rem;
    background: var(--sf-card);
    border: 1px solid var(--sf-border);
    border-left: 4px solid var(--sf-ink-3);
    padding: 1.25rem 1.5rem;
    text-decoration: none; color: inherit;
    transition: all 0.15s ease;
}
.sf-now-card:hover {
    border-color: var(--sf-border-2);
    box-shadow: 0 4px 16px rgba(15,31,51,0.06);
    transform: translateY(-1px);
}
.sf-now-card--critical { border-left-color: var(--sf-red); }
.sf-now-card--warning  { border-left-color: var(--sf-amber); }
.sf-now-card--info     { border-left-color: var(--sf-blue); }
.sf-now-card--success  { border-left-color: var(--sf-emerald); }

.sf-now-number {
    font-family: 'Archivo', system-ui, sans-serif;
    font-weight: 900;
    font-size: 4rem;
    line-height: 0.85;
    letter-spacing: -0.04em;
    color: var(--sf-ink);
    font-variant-numeric: tabular-nums;
    min-width: 4.5rem;
}
.sf-now-number--sm { font-size: 2.25rem; padding-top: 0.5rem; }

.sf-now-label {
    font-family: 'Archivo', system-ui, sans-serif;
    font-weight: 800;
    font-size: 0.875rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sf-ink-2);
    line-height: 1.1;
}
.sf-now-meta {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.75rem;
    color: var(--sf-ink-3);
    margin-top: 0.375rem;
}
.sf-now-arrow {
    font-family: 'Archivo', system-ui, sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--sf-ink-4);
    margin-left: auto;
    flex-shrink: 0;
}

/* Greeting */
.sf-greeting {
    font-family: 'Archivo', system-ui, sans-serif;
    font-weight: 800;
    font-size: 2.25rem;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--sf-ink);
}
@media (min-width: 1024px) { .sf-greeting { font-size: 3rem; } }

.sf-greeting-meta {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.8125rem;
    color: var(--sf-ink-3);
    margin-top: 0.625rem;
}
.sf-greeting-meta strong { color: var(--sf-ink-2); font-weight: 600; }

/* Compact context tile */
.sf-tile {
    background: var(--sf-card);
    border: 1px solid var(--sf-border);
    padding: 1rem;
    display: flex; flex-direction: column; gap: 0.5rem;
    min-height: 96px;
}
.sf-tile-label {
    font-family: 'Archivo', system-ui, sans-serif;
    font-weight: 700; font-size: 0.625rem;
    letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--sf-ink-4);
}
.sf-tile-value {
    font-family: 'Archivo', system-ui, sans-serif;
    font-weight: 800; font-size: 1.5rem; line-height: 1;
    color: var(--sf-ink); font-variant-numeric: tabular-nums;
}
.sf-tile-context { font-size: 0.75rem; color: var(--sf-ink-3); margin-top: auto; }

/* Status pill */
.sf-pill {
    display: inline-flex; align-items: center; gap: 0.375rem;
    padding: 0.125rem 0.5rem;
    font-family: 'Archivo', system-ui, sans-serif;
    font-weight: 700; font-size: 0.625rem;
    letter-spacing: 0.08em; text-transform: uppercase;
    border-radius: 2px;
}
.sf-pill--red     { background: var(--sf-red-bg); color: var(--sf-red); }
.sf-pill--amber   { background: var(--sf-amber-bg); color: var(--sf-amber); }
.sf-pill--emerald { background: var(--sf-emerald-bg); color: var(--sf-emerald); }
.sf-pill--blue    { background: var(--sf-blue-bg); color: var(--sf-blue); }

/* Strip card — single-row context */
.sf-strip {
    display: flex; align-items: center; gap: 1.25rem;
    padding: 0.875rem 1.25rem;
    background: var(--sf-card);
    border: 1px solid var(--sf-border);
    font-size: 0.8125rem;
    color: var(--sf-ink-3);
}
.sf-progress { flex: 0 0 120px; height: 6px; background: var(--sf-paper-2); border-radius: 1px; overflow: hidden; }
.sf-progress > span { display: block; height: 100%; background: var(--sf-navy); }

/* Bottom-nav CSS removed — the persistent bottom action bar was removed
   per user feedback (interfering with module content, no proper function).
   Module navigation now lives in the top-bar hamburger which opens the
   Více sheet. Record actions stay inside their own sheets/pages.
   Reachable via git blame on this file pre-2026-05-16 if needed. */

/* Subtle fade-up on launchpad sections */
@keyframes sf-fade-up {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.sf-fade-up { animation: sf-fade-up 0.35s ease-out backwards; }
.sf-fade-up.delay-1 { animation-delay: 60ms; }
.sf-fade-up.delay-2 { animation-delay: 120ms; }
.sf-fade-up.delay-3 { animation-delay: 180ms; }
.sf-fade-up.delay-4 { animation-delay: 240ms; }

/* ── DROBEČKOVÁ NAVIGACE (`.crumb`) ─────────────────────────────────────
   ⚠ JEDNO MÍSTO, A JE TO CELÁ POINTA. Do 10. 9. 2026 byly tyhle tři řádky
   NAKOPÍROVANÉ v šesti šablonách modulu `me` (assets, learning, documents,
   attendance, …). `nastaveni.html` třídu `crumb` používá, ale styly
   nedefinovalo VŮBEC — a protože oddělovač je inline `<svg viewBox="0 0 24 24">`
   BEZ rozměrů, roztáhl se na dostupný prostor: naměřeno ~330×560 px, nadpis
   „Nastavení" i celý obsah odsunuté o zhruba tisíc pixelů dolů.

   Vada nebyla v té jedné stránce, ale v tom, že se pravidlo kopírovalo.
   Odsud ho žádná stránka ztratit nemůže. Kopie v šablonách jsou teď
   nadbytečné a se stejnými hodnotami — vyklidit je patří k úklidu, ne k téhle
   opravě. Hlídá `tests/test_drobecky_maji_rozmer.py`. */
.crumb {
    display: flex; align-items: center; gap: 6px;
    font-family: var(--font-display); font-size: 12px;
    color: var(--flx-steel); margin-bottom: 10px;
}
.crumb a { color: var(--flx-blue-700); text-decoration: none; }
.crumb svg { width: 12px; height: 12px; opacity: 0.5; }
