/* =====================================================================
   Live app additions: loading screen, saving bar, connection banner,
   read-only chat note, upload progress. Same tokens as styles.css.
   ===================================================================== */
:root { --pb-h: 0px; }

/* ---------- first load ---------- */
.boot { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: var(--app-bg); transition: opacity .25s ease; }
.boot.out { opacity: 0; pointer-events: none; }
.boot-in { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 24px; text-align: center; width: min(320px, 100%); }
.boot-logo { width: 44px; height: 44px; border-radius: 12px; }
.boot-logo .i { width: 26px; height: 26px; }
.boot-brand { font-weight: 700; font-size: 20px; letter-spacing: -.01em; color: var(--text); }
.boot-bar { width: 160px; height: 4px; border-radius: 4px; background: var(--ui-bg); overflow: hidden; position: relative; }
.boot-bar i { position: absolute; inset: 0 auto 0 0; width: 40%; border-radius: 4px; background: var(--primary); animation: bootSlide 1.1s ease-in-out infinite; }
@keyframes bootSlide { 0% { left: -40%; } 100% { left: 100%; } }
.boot-msg { color: var(--text-2); font-size: 14px; min-height: 20px; }
.boot-act { display: flex; gap: 8px; justify-content: center; }
.boot.err .boot-bar { display: none; }
.boot.err .boot-msg { color: var(--text); }

/* ---------- saving bar (top of the screen) ---------- */
.live-bar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 250; pointer-events: none; overflow: hidden; opacity: 0; transition: opacity .2s; }
.live-bar.on { opacity: 1; }
.live-bar i { position: absolute; top: 0; bottom: 0; width: 30%; background: var(--primary); animation: barSlide 1s ease-in-out infinite; }
@keyframes barSlide { 0% { left: -30%; } 100% { left: 100%; } }

/* ---------- offline / new version banner ---------- */
.live-net { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 240; display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-radius: 4px; background: #323338; color: #fff; font-size: 14px; box-shadow: var(--sh-lg); max-width: calc(100vw - 32px); animation: pop .15s ease-out; }
.live-net .i { color: #fff; }
.live-net .spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .8s linear infinite; flex: none; }
.live-net button { color: #fff; font-weight: 600; font-size: 14px; padding: 3px 8px; border-radius: 3px; border: 1px solid rgba(255,255,255,.7); }
.live-net button:hover { background: rgba(255,255,255,.15); }
.live-net.warn { background: #b4610a; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- uploads in progress ---------- */
.live-up { position: fixed; right: 16px; bottom: 16px; z-index: 120; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 4px; background: #fff; color: var(--text); font-size: 13px; box-shadow: var(--sh); border: 1px solid var(--line); }
.live-up .spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ui-bg); border-top-color: var(--primary); animation: spin .8s linear infinite; flex: none; }
.live-up .prog { width: 80px; height: 4px; border-radius: 4px; background: var(--ui-bg); overflow: hidden; }
.live-up .prog i { display: block; height: 100%; background: var(--primary); transition: width .2s; }
@media (max-width: 767px) { .live-up { right: 12px; left: 12px; bottom: calc(var(--bn-h) + 12px + env(safe-area-inset-bottom)); } }

/* ---------- buttons that are working ---------- */
.btn.is-busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-busy .i { opacity: 0; }
.btn.is-busy::after { content: ''; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .8s linear infinite; }
.btn:not(.btn-primary):not(.btn-success).is-busy::after { border-color: var(--ui-bg); border-top-color: var(--primary); }

/* ---------- chat: where only the admin writes ---------- */
.chat-ro { border-top: 1px solid var(--line); padding: 14px 20px; flex: none; background: var(--surface-2); color: var(--text-2); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.chat-ro .i { flex: none; color: var(--text-3); }

/* ---------- sign-in ---------- */
.login-card .acc-err:empty { display: none; }
.login-card .lg-note { font-size: 13px; color: var(--text-2); background: var(--surface-2); border-radius: 4px; padding: 10px 12px; }
.login-card input:disabled { opacity: .7; }

/* ---------- new-member details (shown once) ---------- */
.cred { display: grid; grid-template-columns: auto 1fr auto; gap: 8px 12px; align-items: center; padding: 12px 14px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; }
.cred b { font-weight: 600; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 15px; word-break: break-all; }
.cred span { color: var(--text-2); }

/* ---------- project task page: edit button ---------- */
.pj-edit { margin-left: 4px; }
