/* Shared look for the app pages (dashboard, projects, preview, ...). Tailwind does the rest. */
:root { --nav-h: 4.25rem; }

body { -webkit-tap-highlight-color: transparent; }
.has-nav { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 1rem); }

/* Soft entrance, used ONLY for rows that are genuinely new (never on a progress update) */
.row-enter { animation: row-rise 0.35s ease both; }
@keyframes row-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .row-enter, .pulse-dot, .bar-live::after, .skeleton::after { animation: none !important; } }

/* Loading placeholders */
.skeleton { position: relative; overflow: hidden; background: rgba(148, 163, 184, 0.16); }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* Progress bars: the width glides to its new value, so a live render never "jumps" */
.bar { transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
.bar-live { position: relative; overflow: hidden; }
.bar-live::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent); transform: translateX(-100%); animation: shimmer 1.6s infinite; }
.pulse-dot { animation: pulse-dot 1.6s ease-in-out infinite; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.45; transform: scale(0.8); } }

/* Cards */
.card { border-radius: 1rem; border: 1px solid rgba(148, 163, 184, 0.22); background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); }
.dark .card { background: #111b2e; border-color: rgba(51, 65, 85, 0.7); box-shadow: none; }
.card-hover { transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease; }
.card-hover:hover { transform: translateY(-1px); border-color: rgba(99, 102, 241, 0.55); box-shadow: 0 6px 18px rgba(79, 70, 229, 0.12); }

/* Bottom navigation */
.app-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; justify-content: center; padding-bottom: env(safe-area-inset-bottom, 0px); background: rgba(255, 255, 255, 0.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid rgba(148, 163, 184, 0.25); }
.dark .app-nav { background: rgba(10, 17, 32, 0.88); border-top-color: rgba(51, 65, 85, 0.6); }
.app-nav-inner { width: 100%; max-width: 1000px; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; height: var(--nav-h); }
.app-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10px; font-weight: 700; letter-spacing: 0.02em; color: #94a3b8; padding: 6px 0; }
.app-nav a i { font-size: 17px; }
.app-nav a.active { color: #6366f1; }
.app-nav a.create span.plus { width: 46px; height: 46px; border-radius: 9999px; margin-top: -22px; display: flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, #6366f1, #7c3aed); box-shadow: 0 8px 20px rgba(99, 102, 241, 0.45); border: 3px solid #f9fafb; }
.dark .app-nav a.create span.plus { border-color: #0f172a; }
.app-nav a.create { color: #6366f1; }
