#app-loading[hidden] { display: none !important; }
#app-loading { position: fixed; inset: 0 0 auto; z-index: 10000; pointer-events: none; }
.app-loading-track { height: 3px; background: #93c5fd55; overflow: hidden; }
.app-loading-track::after { content: ''; display: block; width: 38%; height: 100%; background: #2563eb; animation: app-progress 1s ease-in-out infinite; }
.app-loading-label { display: block; width: max-content; margin: 8px auto; padding: 6px 14px; border-radius: 999px; background: #1e293b; color: #fff; font-size: 12px; box-shadow: 0 4px 16px #0003; }
@keyframes app-progress { from { transform: translateX(-100%); } to { transform: translateX(365%); } }
.app-submit-busy { opacity: .75; cursor: wait !important; }
.app-submit-busy::before { content: ''; display: inline-block; vertical-align: middle; width: 1em; height: 1em; margin-inline-end: .5em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: app-spin .7s linear infinite; }
@keyframes app-spin { to { transform: rotate(360deg); } }
.app-feedback { position: fixed; right: 16px; bottom: 16px; z-index: 9999; width: min(390px, calc(100vw - 32px)); display: grid; gap: 8px; pointer-events: none; }
.app-toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 14px; border: 1px solid #cbd5e1; border-left: 4px solid #16a34a; border-radius: 12px; background: #fff; color: #0f172a; box-shadow: 0 8px 28px #0002; animation: app-toast-in .2s ease-out; }
.app-toast-error { border-left-color: #dc2626; }
.dark .app-toast { background: #1e293b; color: #f1f5f9; border-top-color: #475569; border-right-color: #475569; border-bottom-color: #475569; }
.app-toast span { flex: 1; overflow-wrap: anywhere; font-size: 14px; }
.app-toast button { padding: 5px; border-radius: 6px; }
.app-toast button:hover { background: #94a3b833; }
@keyframes app-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .app-loading-track::after, .app-submit-busy::before, .app-toast { animation: none; } }
@media print { #app-loading, .app-feedback { display: none !important; } }
