/* Customer app loading animations (owner, Nov 2026) — one per kind of screen, chosen on Admin → Apps & branding
   (AppLoaders). .ubl = the full-screen layer (portal layout); .ubl-demo = the same box inside the admin preview.
   Only the box of the chosen style shows: .ubl[data-style=X] [data-s=X]. Never on screen longer than 4 s / 8 s. */
/* UbiFi preloader (owner, Nov 2026): Wi-Fi waves rising from a dot, the logo, a light pulse running along a fibre */
.ubl { position: fixed; inset: 0; z-index: 9999; display: none; place-items: center; background: radial-gradient(circle at 50% 38%, #ffffff 0, #f6f0ff 45%, #efe4ff 100%); }
html.pl-boot .ubl, .ubl.show { display: grid; animation: ublFail .35s var(--ubl-first-max, 4s) forwards; }   /* never longer than the set time (Apps & branding, default 4 s) */
.ubl.show { background: rgba(250, 247, 255, .82); backdrop-filter: blur(3px); animation: ublIn .2s ease-out, ublFail .35s var(--ubl-max, 8s) forwards; }
.ubl.hide { animation: ublOut .45s ease-in forwards !important; }
.ubl-box { display: grid; justify-items: center; gap: 14px; }
.ubl-waves { position: relative; width: 120px; height: 84px; }
.ubl-waves span { position: absolute; left: 50%; bottom: 8px; border: 7px solid transparent; border-top-color: var(--brand); border-radius: 50%; transform: translateX(-50%); opacity: .15; animation: ublWave 1.4s ease-in-out infinite; }
.ubl-waves span:nth-child(1) { width: 44px; height: 44px; bottom: -6px; animation-delay: 0s; }
.ubl-waves span:nth-child(2) { width: 80px; height: 80px; bottom: -24px; animation-delay: .18s; border-top-color: #a855f7; }
.ubl-waves span:nth-child(3) { width: 116px; height: 116px; bottom: -42px; animation-delay: .36s; border-top-color: var(--brand-2); }
.ubl-waves i { position: absolute; left: 50%; bottom: 0; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 0 0 0 rgba(139, 44, 245, .5); animation: ublDot 1.4s ease-out infinite; }
.ubl-logo { height: 46px; width: auto; animation: ublLogo .6s cubic-bezier(.2, .8, .2, 1) both; }
.ubl-fiber { width: 180px; height: 4px; border-radius: 4px; background: #e7dcfa; overflow: hidden; position: relative; }
.ubl-fiber b { position: absolute; top: 0; left: -40%; width: 40%; height: 100%; border-radius: 4px; background: linear-gradient(90deg, transparent, var(--brand), var(--brand-2), transparent); animation: ublRun 1.1s linear infinite; }
.ubl p { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .2px; }
.ubl.show [data-s="fibre"] p { display: none; } .ubl.show .ubl-logo { height: 38px; animation: none; }
@keyframes ublWave { 0%, 100% { opacity: .15; } 40% { opacity: 1; } }
@keyframes ublDot { 0% { box-shadow: 0 0 0 0 rgba(139, 44, 245, .45); } 100% { box-shadow: 0 0 0 16px rgba(139, 44, 245, 0); } }
@keyframes ublRun { to { left: 100%; } }
@keyframes ublLogo { from { opacity: 0; transform: translateY(8px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes ublIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes ublOut { to { opacity: 0; visibility: hidden; } }
@keyframes ublFail { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .ubl { display: none !important; } }
.ubl .ubl-box, .ubl-demo .ubl-box { display: none; }
.ubl[data-style="fibre"] [data-s="fibre"], .ubl[data-style="speed"] [data-s="speed"], .ubl[data-style="pay"] [data-s="pay"],
.ubl[data-style="bill"] [data-s="bill"], .ubl[data-style="wifi"] [data-s="wifi"], .ubl[data-style="dots"] [data-s="dots"], .ubl-demo .ubl-box { display: grid; }
.ubl[data-style="dots"].show { background: rgba(250, 247, 255, .55); backdrop-filter: none; }
.ubl-demo { position: relative; height: 230px; border-radius: 16px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 50% 38%, #ffffff 0, #f6f0ff 45%, #efe4ff 100%); }
.ubl-demo.off { color: #8a84a0; font-size: 13px; }
.ubl-demo .ubl-logo { height: 34px; } .ubl-demo p { margin: 0; font-size: 12px; font-weight: 600; color: #6b6480; text-align: center; }

/* speed — a speedometer whose needle sweeps up and back */
.uls-gauge { position: relative; width: 150px; height: 82px; overflow: hidden; }
.uls-arc { position: absolute; left: 0; top: 0; width: 150px; height: 150px; border-radius: 50%; box-sizing: border-box;
  border: 12px solid transparent; border-top-color: var(--brand, #8b2cf5); border-left-color: #c084fc; border-right-color: var(--brand-2, #e0338a); transform: rotate(-45deg); }
.uls-ticks { position: absolute; left: 22px; top: 22px; width: 106px; height: 106px; border-radius: 50%; border: 2px dashed #d8cdf0; }
.uls-needle { position: absolute; left: 73px; bottom: 0; width: 4px; height: 62px; border-radius: 4px; background: #1d1b26; transform-origin: 50% 100%; animation: ulsSweep 1.6s ease-in-out infinite; }
.uls-hub { position: absolute; left: 63px; bottom: -12px; width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, var(--brand, #8b2cf5), var(--brand-2, #e0338a)); }
.uls-mbps { font-size: 13px; font-weight: 700; color: #6b6480; } .uls-mbps b { font-size: 22px; color: #1d1b26; animation: ulsBlink 1.6s ease-in-out infinite; }
@keyframes ulsSweep { 0% { transform: rotate(-80deg); } 55% { transform: rotate(70deg); } 70% { transform: rotate(58deg); } 100% { transform: rotate(-80deg); } }
@keyframes ulsBlink { 0%, 100% { opacity: .35; } 55% { opacity: 1; } }

/* pay — a card with a lock that closes, three dots */
.ulp-card { position: relative; width: 150px; height: 94px; border-radius: 14px; background: linear-gradient(135deg, #1d1b26, #5b21b6 60%, var(--brand-2, #e0338a));
  box-shadow: 0 14px 30px rgba(91, 33, 182, .35); animation: ulpFloat 1.8s ease-in-out infinite; }
.ulp-chip { position: absolute; left: 16px; top: 18px; width: 26px; height: 20px; border-radius: 5px; background: linear-gradient(135deg, #fde68a, #f59e0b); }
.ulp-line { position: absolute; left: 16px; bottom: 26px; width: 90px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .55); }
.ulp-line.short { bottom: 14px; width: 54px; background: rgba(255, 255, 255, .35); }
.ulp-lock { position: absolute; right: -14px; top: -14px; width: 40px; height: 40px; border-radius: 50%; background: #16a34a; box-shadow: 0 6px 16px rgba(22, 163, 74, .45); display: grid; place-items: center; animation: ulpPop 1.8s ease-in-out infinite; }
.ulp-lock i { position: relative; width: 14px; height: 11px; border-radius: 3px; background: #fff; margin-top: 6px; }
.ulp-lock i::before { content: ""; position: absolute; left: 2px; bottom: 8px; width: 6px; height: 7px; border: 2px solid #fff; border-bottom: 0; border-radius: 6px 6px 0 0; animation: ulpShut 1.8s ease-in-out infinite; pointer-events: none; }
.ulp-dots, .uld { display: flex; gap: 7px; justify-content: center; }
.ulp-dots i, .uld i { width: 9px; height: 9px; border-radius: 50%; background: var(--brand, #8b2cf5); animation: uldHop 1s ease-in-out infinite; }
.ulp-dots i:nth-child(2), .uld i:nth-child(2) { animation-delay: .15s; background: #a855f7; }
.ulp-dots i:nth-child(3), .uld i:nth-child(3) { animation-delay: .3s; background: var(--brand-2, #e0338a); }
.uld i { width: 13px; height: 13px; }
@keyframes ulpFloat { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-6px) rotate(2deg); } }
@keyframes ulpPop { 0%, 30% { transform: scale(.6); opacity: 0; } 45% { transform: scale(1.12); opacity: 1; } 60%, 100% { transform: scale(1); opacity: 1; } }
@keyframes ulpShut { 0%, 40% { transform: translateY(-4px); } 55%, 100% { transform: none; } }
@keyframes uldHop { 0%, 100% { transform: translateY(0); opacity: .45; } 40% { transform: translateY(-9px); opacity: 1; } }

/* bill — a bill rolls out of a printer, lines and the ₹ appear */
.ulb-printer { position: relative; width: 150px; height: 124px; overflow: hidden; }
.ulb-slot { position: absolute; left: 10px; top: 0; width: 130px; height: 26px; border-radius: 10px; background: linear-gradient(135deg, #1d1b26, #5b21b6); z-index: 2; }
.ulb-paper { position: absolute; left: 30px; top: 14px; width: 90px; height: 96px; border-radius: 0 0 6px 6px; background: #fff; box-shadow: 0 8px 18px rgba(40, 20, 80, .15);
  padding: 22px 12px 0; box-sizing: border-box; display: grid; gap: 7px; align-content: start; animation: ulbOut 1.8s ease-in-out infinite; clip-path: inset(0 0 0 0); }
.ulb-paper i { display: block; height: 6px; border-radius: 3px; background: #d8c8f5; } .ulb-paper i:nth-child(2) { width: 70%; } .ulb-paper i:nth-child(3) { width: 85%; }
.ulb-paper b { position: absolute; right: 10px; bottom: 8px; font-size: 20px; font-weight: 800; color: var(--brand, #8b2cf5); }
@keyframes ulbOut { 0% { transform: translateY(-92px); opacity: 1; } 55%, 88% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(0); opacity: 0; } }

/* wifi — the Wi-Fi bars light up one by one above a router */
.ulw-wifi { position: relative; width: 120px; height: 80px; }
.ulw-wifi span { position: absolute; left: 50%; bottom: 0; border: 8px solid transparent; border-top-color: var(--brand, #8b2cf5); border-radius: 50%; transform: translateX(-50%); opacity: .15; animation: ulwBar 1.5s ease-in-out infinite; }
.ulw-wifi span:nth-child(1) { width: 40px; height: 40px; bottom: -12px; }
.ulw-wifi span:nth-child(2) { width: 78px; height: 78px; bottom: -31px; animation-delay: .2s; border-top-color: #a855f7; }
.ulw-wifi span:nth-child(3) { width: 116px; height: 116px; bottom: -50px; animation-delay: .4s; border-top-color: var(--brand-2, #e0338a); }
.ulw-wifi i { position: absolute; left: 50%; bottom: 0; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--brand, #8b2cf5); }
.ulw-router { display: flex; gap: 8px; justify-content: center; align-items: center; width: 110px; height: 26px; border-radius: 9px; background: linear-gradient(135deg, #1d1b26, #5b21b6); }
.ulw-router b { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; animation: ulwLed 1s steps(1) infinite; }
.ulw-router b:nth-child(2) { animation-delay: .33s; } .ulw-router b:nth-child(3) { animation-delay: .66s; }
@keyframes ulwBar { 0%, 100% { opacity: .15; } 35%, 60% { opacity: 1; } }
@keyframes ulwLed { 0%, 49% { opacity: 1; } 50%, 100% { opacity: .25; } }
/* loading times on Admin → Apps & branding */
.ld-times { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ld-time { display: flex; flex-direction: column; gap: 3px; font-size: 12px; flex: 1 1 130px; }
.ld-time > span:first-child { font-weight: 600; }
.ld-tin { display: flex; gap: 4px; } .ld-tin input { width: 80px; min-width: 0; flex: 1; } .ld-tin select { width: 70px; flex: 0 0 70px; }
