/* Circular / orbital apps launcher — v3 */

/*
 * Keep a single scroll container on body.
 * overflow-x:hidden alone forces overflow-y:auto on body, which plus html
 * scrolling creates a second scrollbar (left side in RTL).
 */
html:has(.apps-orbit-body) {
    margin: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    overflow: hidden;
}

.apps-orbit-body {
    margin: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    font-family: IRANYekanXFaNum, IRANSans, Tahoma, sans-serif;
    background: #070b16;
    color: #e2e8f0;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

.apps-orbit-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.apps-orbit-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.42;
    animation: appsOrbitDrift 22s ease-in-out infinite;
}

.apps-orbit-glow--1 {
    width: 480px;
    height: 480px;
    top: -140px;
    right: -100px;
    background: #4338ca;
}

.apps-orbit-glow--2 {
    width: 420px;
    height: 420px;
    bottom: -120px;
    left: -80px;
    background: #0e7490;
    animation-delay: -8s;
}

.apps-orbit-glow--3 {
    width: 280px;
    height: 280px;
    top: 45%;
    left: 55%;
    background: #7c3aed;
    opacity: 0.28;
    animation-delay: -14s;
}

.apps-orbit-stars {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1.5px 1.5px at 12% 18%, rgba(255, 255, 255, 0.35), transparent),
        radial-gradient(1.5px 1.5px at 28% 72%, rgba(255, 255, 255, 0.25), transparent),
        radial-gradient(1px 1px at 55% 22%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1.5px 1.5px at 78% 48%, rgba(255, 255, 255, 0.22), transparent),
        radial-gradient(1px 1px at 88% 82%, rgba(255, 255, 255, 0.28), transparent),
        radial-gradient(1px 1px at 42% 55%, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 65% 12%, rgba(255, 255, 255, 0.22), transparent),
        radial-gradient(1.5px 1.5px at 8% 48%, rgba(255, 255, 255, 0.18), transparent);
    opacity: 0.75;
    animation: appsOrbitTwinkle 6s ease-in-out infinite;
}

.apps-orbit-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 60% at 50% 45%, transparent 20%, rgba(7, 11, 22, 0.72) 100%);
}

@keyframes appsOrbitDrift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(24px, -18px) scale(1.06); }
}

@keyframes appsOrbitTwinkle {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 0.85; }
}

.apps-orbit-shell {
    position: relative;
    z-index: 1;
    max-width: 980px;
    margin: 0 auto;
    padding: 1rem 1rem 2rem;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
    overflow-x: clip;
}

.apps-orbit-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    animation: appsOrbitFade 0.5s ease both;
    flex-shrink: 0;
}

.apps-orbit-user {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    max-width: min(52vw, 280px);
    padding: 0.45rem 0.85rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.45);
    color: #e2e8f0;
    font-size: 0.88rem;
    font-weight: 600;
}

.apps-orbit-user i {
    flex-shrink: 0;
    color: #a5b4fc;
    font-size: 1.05rem;
}

.apps-orbit-user-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.apps-orbit-top-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
}

.apps-orbit-share,
.apps-orbit-switch,
.apps-orbit-logout {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(10px);
    color: #cbd5e1;
    font-size: 0.86rem;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}

.apps-orbit-share {
    border-color: rgba(99, 102, 241, 0.35);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.28), rgba(59, 130, 246, 0.18));
    color: #e0e7ff;
}

.apps-orbit-share:hover,
.apps-orbit-switch:hover,
.apps-orbit-logout:hover {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(148, 163, 184, 0.4);
    color: #f8fafc;
    transform: translateY(-1px);
}

.apps-orbit-share:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.45), rgba(59, 130, 246, 0.28));
    border-color: rgba(165, 180, 252, 0.5);
    color: #fff;
}

.apps-orbit-share.is-done {
    border-color: rgba(16, 185, 129, 0.45);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.35), rgba(5, 150, 105, 0.2));
    color: #d1fae5;
}

.apps-orbit-switch--icon {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
}

/* Tip panel removed — action button lives on each node */

.apps-orbit-stage {
    --node-size: 64px;
    --radius: min(34vw, 250px);
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    min-height: min(70vh, 640px);
    margin: 0 auto;
    display: grid;
    place-items: center;
    overflow: clip;
    box-sizing: border-box;
}

.apps-orbit-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}

.apps-orbit-spoke {
    stroke: rgba(148, 163, 184, 0.22);
    stroke-width: 1.4;
    stroke-dasharray: 5 10;
    stroke-linecap: round;
    opacity: 0;
    animation:
        appsOrbitSpokeIn 0.7s ease forwards,
        appsOrbitDash 2.8s linear infinite;
    transition: stroke 0.25s, opacity 0.25s, stroke-width 0.25s;
}

.apps-orbit-spoke.is-dim {
    opacity: 0.12 !important;
}

.apps-orbit-spoke.is-active {
    stroke: rgba(226, 232, 240, 0.55);
    stroke-width: 2;
    opacity: 1 !important;
}

.apps-orbit-spoke-glow {
    stroke-width: 3.5;
    stroke-linecap: round;
    opacity: 0;
    transition: opacity 0.25s;
    filter: blur(1px);
}

.apps-orbit-spoke-glow.is-active {
    opacity: 0.85;
}

.apps-orbit-packet {
    opacity: 0.55;
    filter: drop-shadow(0 0 4px currentColor);
    transition: opacity 0.25s;
}

.apps-orbit-packet.is-dim {
    opacity: 0.08;
}

.apps-orbit-packet.is-active {
    opacity: 1;
}

@keyframes appsOrbitSpokeIn {
    from { opacity: 0; stroke-dashoffset: 40; }
    to { opacity: 1; stroke-dashoffset: 0; }
}

@keyframes appsOrbitDash {
    to { stroke-dashoffset: -60; }
}

.apps-orbit-rings {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: none;
}

.apps-orbit-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.apps-orbit-ring--1 {
    width: calc(var(--radius) * 1.15);
    height: calc(var(--radius) * 1.15);
    animation: appsOrbitSpin 48s linear infinite;
    border-style: dashed;
}

.apps-orbit-ring--2 {
    width: calc(var(--radius) * 1.85);
    height: calc(var(--radius) * 1.85);
    animation: appsOrbitSpin 70s linear infinite reverse;
}

.apps-orbit-ring--3 {
    width: calc(var(--radius) * 2.35);
    height: calc(var(--radius) * 2.35);
    opacity: 0.55;
    animation: appsOrbitSpin 90s linear infinite;
    border-style: dotted;
}

.apps-orbit-orbit-path {
    position: absolute;
    width: calc(var(--radius) * 2);
    height: calc(var(--radius) * 2);
    border-radius: 50%;
    border: 1px solid rgba(99, 102, 241, 0.18);
    box-shadow: 0 0 24px rgba(99, 102, 241, 0.08);
}

@keyframes appsOrbitSpin {
    to { transform: rotate(360deg); }
}

.apps-orbit-core {
    position: relative;
    z-index: 3;
    width: 158px;
    height: 158px;
    display: grid;
    place-items: center;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    animation: appsOrbitCoreIn 0.7s cubic-bezier(0.34, 1.4, 0.64, 1) both;
    transition: transform 0.35s ease;
}

.apps-orbit-core:hover {
    transform: scale(1.06);
}

.apps-orbit-core:hover .apps-orbit-core-inner {
    border-color: rgba(165, 180, 252, 0.65);
    box-shadow:
        0 0 0 8px rgba(99, 102, 241, 0.16),
        0 20px 56px rgba(99, 102, 241, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.apps-orbit-core:focus-visible {
    outline: none;
}

.apps-orbit-core:focus-visible .apps-orbit-core-inner {
    outline: 2px solid rgba(255, 255, 255, 0.55);
    outline-offset: 4px;
}

.apps-orbit-core--static {
    cursor: default;
}

.apps-orbit-core--static:hover {
    transform: none;
}

.apps-orbit-core--static:hover .apps-orbit-core-inner {
    border-color: rgba(165, 180, 252, 0.35);
    box-shadow:
        0 0 0 6px rgba(99, 102, 241, 0.08),
        0 16px 48px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.apps-orbit-core.is-lit {
    transform: scale(1.05);
}

.apps-orbit-core.is-lit .apps-orbit-core-inner {
    border-color: rgba(165, 180, 252, 0.65);
    box-shadow:
        0 0 0 8px rgba(99, 102, 241, 0.16),
        0 20px 56px rgba(99, 102, 241, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.apps-orbit-core-pulse {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid rgba(99, 102, 241, 0.45);
    animation: appsOrbitPulse 2.8s ease-out infinite;
}

.apps-orbit-core-pulse--delay {
    animation-delay: 1.2s;
}

@keyframes appsOrbitPulse {
    0% { transform: scale(0.92); opacity: 0.7; }
    100% { transform: scale(1.35); opacity: 0; }
}

.apps-orbit-core-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 55%, #1e1b4b 100%);
    border: 1px solid rgba(165, 180, 252, 0.35);
    box-shadow:
        0 0 0 6px rgba(99, 102, 241, 0.08),
        0 16px 48px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.75rem;
    gap: 0.2rem;
    overflow: hidden;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.apps-orbit-core-shine {
    position: absolute;
    top: -40%;
    left: -30%;
    width: 70%;
    height: 70%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.14), transparent 70%);
    pointer-events: none;
}

.apps-orbit-core-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: #f8fafc;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.apps-orbit-core-tag {
    font-size: 0.68rem;
    color: #94a3b8;
}

/* Node box = icon only; label is outside so spokes hit icon centers */
.apps-orbit-node {
    --angle: calc((360deg / var(--count)) * var(--i) - 90deg);
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 4;
    width: var(--node-size);
    height: var(--node-size);
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transform:
        translate(-50%, -50%)
        rotate(var(--angle))
        translate(var(--radius))
        rotate(calc(-1 * var(--angle)));
    display: block;
    text-decoration: none;
    color: inherit;
    opacity: 0;
    animation: appsOrbitNodeIn 0.55s ease forwards;
    animation-delay: var(--delay, 0s);
    transition: filter 0.3s, opacity 0.3s;
}

.apps-orbit-node:focus-visible {
    outline: none;
}

.apps-orbit-node:focus-visible .apps-orbit-node-icon {
    outline: 2px solid rgba(255, 255, 255, 0.55);
    outline-offset: 3px;
}

.apps-orbit-stage.is-focusing .apps-orbit-node:not(.is-hot) {
    opacity: 0.35;
    filter: grayscale(0.35) saturate(0.7);
}

.apps-orbit-node.is-hot {
    z-index: 6;
    opacity: 1 !important;
    filter: none !important;
}

/* Locked nodes — icon stays normal, only the label is blurred */
.apps-orbit-node.is-locked {
    cursor: not-allowed;
}

.apps-orbit-node-label--locked {
    filter: blur(5px);
    opacity: 0.6;
    user-select: none;
    color: #94a3b8;
}

.apps-orbit-node.is-locked.is-hot .apps-orbit-node-label--locked {
    opacity: 0.72;
    color: #cbd5e1;
}

.apps-orbit-stage.is-focusing .apps-orbit-node.is-locked:not(.is-hot) {
    opacity: 0.35;
}

.apps-orbit-node-halo,
.apps-orbit-node-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
}

.apps-orbit-node-halo {
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.25s, transform 0.25s;
}

.apps-orbit-node.is-hot .apps-orbit-node-halo {
    opacity: 0.55;
    transform: scale(1.35);
    animation: appsOrbitHalo 1.6s ease-out infinite;
}

.apps-orbit-node-ring {
    inset: -4px;
    border: 1.5px solid rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    opacity: 0.75;
}

.apps-orbit-node--blue .apps-orbit-node-halo { background: radial-gradient(circle, rgba(59, 130, 246, 0.55), transparent 70%); }
.apps-orbit-node--sky .apps-orbit-node-halo { background: radial-gradient(circle, rgba(14, 165, 233, 0.55), transparent 70%); }
.apps-orbit-node--indigo .apps-orbit-node-halo { background: radial-gradient(circle, rgba(99, 102, 241, 0.55), transparent 70%); }
.apps-orbit-node--emerald .apps-orbit-node-halo { background: radial-gradient(circle, rgba(16, 185, 129, 0.55), transparent 70%); }
.apps-orbit-node--violet .apps-orbit-node-halo { background: radial-gradient(circle, rgba(139, 92, 246, 0.55), transparent 70%); }
.apps-orbit-node--amber .apps-orbit-node-halo { background: radial-gradient(circle, rgba(245, 158, 11, 0.55), transparent 70%); }
.apps-orbit-node--rose .apps-orbit-node-halo { background: radial-gradient(circle, rgba(244, 63, 94, 0.55), transparent 70%); }
.apps-orbit-node--slate .apps-orbit-node-halo { background: radial-gradient(circle, rgba(100, 116, 139, 0.55), transparent 70%); }
.apps-orbit-node--teal .apps-orbit-node-halo { background: radial-gradient(circle, rgba(20, 184, 166, 0.55), transparent 70%); }

@keyframes appsOrbitHalo {
    0% { opacity: 0.55; transform: scale(1.15); }
    100% { opacity: 0; transform: scale(1.7); }
}

.apps-orbit-node-icon {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.22);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        0 10px 26px rgba(0, 0, 0, 0.35);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s;
    animation: appsOrbitFloat 4.5s ease-in-out infinite;
    animation-delay: var(--float-delay, 0s);
}

.apps-orbit-svg {
    width: 58%;
    height: 58%;
    display: block;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.18));
}

.apps-orbit-node-icon::before {
    content: "";
    position: absolute;
    top: 10%;
    left: 14%;
    width: 42%;
    height: 28%;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent);
    pointer-events: none;
}

.apps-orbit-node:hover .apps-orbit-node-icon,
.apps-orbit-node.is-hot .apps-orbit-node-icon,
.apps-orbit-node:focus-visible .apps-orbit-node-icon {
    transform: scale(1.12);
    animation-play-state: paused;
}

.apps-orbit-node-label {
    position: absolute;
    top: calc(100% + 0.45rem);
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: 110px;
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
    color: #e2e8f0;
    line-height: 1.3;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
    pointer-events: none;
    white-space: normal;
}

.apps-orbit-node.is-hot .apps-orbit-node-label {
    color: #fff;
}

.apps-orbit-tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 0.7rem);
    z-index: 8;
    width: max-content;
    max-width: 180px;
    padding: 0.55rem 0.7rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    text-align: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(6px) scale(0.96);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.apps-orbit-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border: 5px solid transparent;
    border-top-color: rgba(15, 23, 42, 0.92);
}

.apps-orbit-node.is-hot .apps-orbit-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
}

.apps-orbit-tooltip-title {
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 0.15rem;
    line-height: 1.3;
}

.apps-orbit-tooltip-desc {
    display: block;
    font-size: 0.68rem;
    color: #94a3b8;
    line-height: 1.4;
}

.apps-orbit-node--blue .apps-orbit-node-icon { background: linear-gradient(155deg, #60a5fa 0%, #2563eb 55%, #1d4ed8 100%); }
.apps-orbit-node--sky .apps-orbit-node-icon { background: linear-gradient(155deg, #38bdf8 0%, #0284c7 55%, #0369a1 100%); }
.apps-orbit-node--indigo .apps-orbit-node-icon { background: linear-gradient(155deg, #818cf8 0%, #4f46e5 55%, #4338ca 100%); }
.apps-orbit-node--emerald .apps-orbit-node-icon { background: linear-gradient(155deg, #34d399 0%, #059669 55%, #047857 100%); }
.apps-orbit-node--violet .apps-orbit-node-icon { background: linear-gradient(155deg, #a78bfa 0%, #7c3aed 55%, #6d28d9 100%); }
.apps-orbit-node--amber .apps-orbit-node-icon { background: linear-gradient(155deg, #fbbf24 0%, #d97706 55%, #b45309 100%); }
.apps-orbit-node--rose .apps-orbit-node-icon { background: linear-gradient(155deg, #fb7185 0%, #e11d48 55%, #be123c 100%); }
.apps-orbit-node--slate .apps-orbit-node-icon { background: linear-gradient(155deg, #94a3b8 0%, #475569 55%, #334155 100%); }
.apps-orbit-node--teal .apps-orbit-node-icon { background: linear-gradient(155deg, #2dd4bf 0%, #0d9488 55%, #0f766e 100%); }

.apps-orbit-node--blue:hover .apps-orbit-node-icon,
.apps-orbit-node--blue.is-hot .apps-orbit-node-icon { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 12px 32px rgba(37, 99, 235, 0.7); }
.apps-orbit-node--sky:hover .apps-orbit-node-icon,
.apps-orbit-node--sky.is-hot .apps-orbit-node-icon { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 12px 32px rgba(2, 132, 199, 0.7); }
.apps-orbit-node--indigo:hover .apps-orbit-node-icon,
.apps-orbit-node--indigo.is-hot .apps-orbit-node-icon { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 12px 32px rgba(79, 70, 229, 0.7); }
.apps-orbit-node--emerald:hover .apps-orbit-node-icon,
.apps-orbit-node--emerald.is-hot .apps-orbit-node-icon { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 12px 32px rgba(5, 150, 105, 0.7); }
.apps-orbit-node--violet:hover .apps-orbit-node-icon,
.apps-orbit-node--violet.is-hot .apps-orbit-node-icon { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 12px 32px rgba(124, 58, 237, 0.7); }
.apps-orbit-node--amber:hover .apps-orbit-node-icon,
.apps-orbit-node--amber.is-hot .apps-orbit-node-icon { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 12px 32px rgba(217, 119, 6, 0.7); }
.apps-orbit-node--rose:hover .apps-orbit-node-icon,
.apps-orbit-node--rose.is-hot .apps-orbit-node-icon { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 12px 32px rgba(225, 29, 72, 0.7); }
.apps-orbit-node--slate:hover .apps-orbit-node-icon,
.apps-orbit-node--slate.is-hot .apps-orbit-node-icon { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 12px 32px rgba(71, 85, 105, 0.7); }

@keyframes appsOrbitNodeIn {
    from {
        opacity: 0;
        transform:
            translate(-50%, -50%)
            rotate(var(--angle))
            translate(calc(var(--radius) * 0.35))
            rotate(calc(-1 * var(--angle)))
            scale(0.7);
    }
    to {
        opacity: 1;
        transform:
            translate(-50%, -50%)
            rotate(var(--angle))
            translate(var(--radius))
            rotate(calc(-1 * var(--angle)))
            scale(1);
    }
}

@keyframes appsOrbitFloat {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -4px; }
}

@keyframes appsOrbitCoreIn {
    from { opacity: 0; transform: scale(0.7); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes appsOrbitFade {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.apps-orbit-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: #94a3b8;
    text-align: center;
}

.apps-orbit-empty i {
    font-size: 2.2rem;
    opacity: 0.5;
}

@media (max-width: 640px) {
    .apps-orbit-body {
        min-height: 100dvh;
        height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior-x: none;
    }

    .apps-orbit-shell {
        padding: 0.45rem 0.5rem 0.75rem;
        min-height: 100%;
        height: 100%;
        overflow-x: hidden;
        max-width: 100%;
        justify-content: flex-start;
    }

    .apps-orbit-top {
        margin-bottom: 0.25rem;
    }

    .apps-orbit-user {
        max-width: min(42vw, 160px);
        padding: 0.4rem 0.65rem;
        font-size: 0.78rem;
    }

    .apps-orbit-share-label {
        display: none;
    }

    .apps-orbit-share,
    .apps-orbit-logout {
        width: 38px;
        height: 38px;
        padding: 0;
        justify-content: center;
    }

    .apps-orbit-logout .d-none {
        display: none !important;
    }

    .apps-orbit-stage {
        --node-size: 44px;
        --radius: min(26vw, 100px);
        flex: 1 1 auto;
        width: 100%;
        max-width: 100%;
        min-height: calc(var(--radius) * 2 + 100px);
        overflow: hidden;
        margin-top: 0;
        display: grid;
        place-items: center;
        contain: layout paint;
    }

    .apps-orbit-ring--3 {
        display: none;
    }

    .apps-orbit-ring--1 {
        width: calc(var(--radius) * 1.02);
        height: calc(var(--radius) * 1.02);
    }

    .apps-orbit-ring--2 {
        width: calc(var(--radius) * 1.55);
        height: calc(var(--radius) * 1.55);
    }

    .apps-orbit-core {
        width: 86px;
        height: 86px;
    }

    .apps-orbit-core.is-lit {
        transform: scale(1.03);
    }

    .apps-orbit-core-pulse {
        inset: -4px;
    }

    .apps-orbit-core-inner {
        padding: 0.4rem;
    }

    .apps-orbit-core-name {
        font-size: 0.7rem;
    }

    .apps-orbit-core-tag {
        font-size: 0.55rem;
    }

    .apps-orbit-svg {
        width: 56%;
        height: 56%;
    }

    .apps-orbit-node-ring {
        inset: -2px;
    }

    .apps-orbit-node-halo {
        display: none;
    }

    .apps-orbit-node-label {
        top: calc(100% + 0.18rem);
        font-size: 0.52rem;
        max-width: 48px;
        line-height: 1.15;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        white-space: normal;
        word-break: break-word;
    }

    .apps-orbit-node-icon {
        animation: none;
    }

    .apps-orbit-tooltip {
        display: none !important;
    }

    .apps-orbit-glow--1,
    .apps-orbit-glow--2,
    .apps-orbit-glow--3 {
        max-width: 70vw;
        max-height: 70vw;
    }
}

@media (max-width: 380px) {
    .apps-orbit-shell {
        padding: 0.35rem 0.35rem 0.85rem;
    }

    .apps-orbit-stage {
        --node-size: 40px;
        --radius: min(24vw, 88px);
        flex: 1 1 auto;
        min-height: calc(var(--radius) * 2 + 88px);
    }

    .apps-orbit-core {
        width: 72px;
        height: 72px;
    }

    .apps-orbit-core-name {
        font-size: 0.6rem;
    }

    .apps-orbit-node-label {
        max-width: 44px;
        font-size: 0.5rem;
    }
}

@media (min-width: 900px) {
    .apps-orbit-body {
        overflow: hidden;
    }

    .apps-orbit-shell {
        height: 100%;
        min-height: 100%;
        max-height: 100%;
        overflow: hidden;
    }

    .apps-orbit-stage {
        --radius: 250px;
        --node-size: 68px;
        flex: 1 1 auto;
        min-height: 0;
        overflow: visible;
    }
}

@media (prefers-reduced-motion: reduce) {
    .apps-orbit-glow,
    .apps-orbit-stars,
    .apps-orbit-ring,
    .apps-orbit-core,
    .apps-orbit-core-pulse,
    .apps-orbit-node,
    .apps-orbit-node-icon,
    .apps-orbit-node-halo,
    .apps-orbit-spoke,
    .apps-orbit-top {
        animation: none !important;
    }

    .apps-orbit-node,
    .apps-orbit-spoke {
        opacity: 1;
    }

    .apps-orbit-tooltip {
        transition: none;
    }
}

/* —— Login page (orbit-themed, no brand logo/name) —— */

.apps-login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    min-height: 100dvh;
}

.apps-login-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 1.5rem 1.25rem;
    margin: 0 auto;
}

.apps-login-card {
    position: relative;
    padding: 1.75rem 1.5rem 1.5rem;
    border-radius: 22px;
    background: linear-gradient(
        160deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.04) 50%,
        rgba(15, 23, 42, 0.55) 100%
    );
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.apps-login-card.is-loading {
    pointer-events: none;
    opacity: 0.85;
}

.apps-login-header {
    text-align: center;
    margin-bottom: 1.35rem;
}

.apps-login-title {
    margin: 0 0 0.4rem;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #f1f5f9;
}

.apps-login-sub {
    margin: 0;
    font-size: 0.88rem;
    color: rgba(203, 213, 225, 0.78);
}

.apps-login-error {
    margin-bottom: 1rem;
    padding: 0.7rem 0.85rem;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(248, 113, 113, 0.35);
    color: #fecaca;
    font-size: 0.85rem;
    line-height: 1.5;
}

.apps-login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.apps-login-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin: 0;
}

.apps-login-label {
    font-size: 0.8rem;
    color: rgba(226, 232, 240, 0.78);
}

.apps-login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.apps-login-input-wrap > i {
    position: absolute;
    right: 0.9rem;
    color: rgba(148, 163, 184, 0.85);
    font-size: 0.85rem;
    pointer-events: none;
}

.apps-login-input {
    width: 100%;
    padding: 0.78rem 2.4rem 0.78rem 0.9rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(7, 11, 22, 0.55);
    color: #f8fafc;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.apps-login-input-wrap--password .apps-login-input {
    padding-left: 2.6rem;
}

.apps-login-password-toggle {
    position: absolute;
    left: 0.55rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: rgba(203, 213, 225, 0.85);
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.apps-login-password-toggle:hover,
.apps-login-password-toggle:focus-visible {
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.16);
    outline: none;
}

.apps-login-password-toggle:hover i,
.apps-login-password-toggle:focus-visible i {
    color: #a5b4fc;
}

.apps-login-password-toggle i {
    font-size: 0.9rem;
    pointer-events: none;
    color: inherit;
}

.apps-login-input::placeholder {
    color: rgba(148, 163, 184, 0.55);
}

.apps-login-input:focus {
    border-color: rgba(99, 102, 241, 0.7);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.22);
    background: rgba(7, 11, 22, 0.72);
}

.apps-login-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.15rem;
}

.apps-login-remember {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    font-size: 0.84rem;
    color: rgba(203, 213, 225, 0.85);
    cursor: pointer;
    user-select: none;
}

.apps-login-remember input {
    width: 1rem;
    height: 1rem;
    accent-color: #6366f1;
    cursor: pointer;
}

.apps-login-submit {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.85rem 1rem;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #4f46e5 0%, #0e7490 100%);
    color: #fff;
    font-size: 0.98rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(79, 70, 229, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.apps-login-submit:hover {
    filter: brightness(1.06);
    box-shadow: 0 12px 32px rgba(79, 70, 229, 0.42);
}

.apps-login-submit:active {
    transform: translateY(1px);
}

.apps-login-submit:disabled {
    cursor: wait;
    filter: saturate(0.7);
}

.apps-login-submit-spinner {
    display: none;
    width: 1.1rem;
    height: 1.1rem;
    margin-right: 0.55rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: appsLoginSpin 0.7s linear infinite;
}

.apps-login-card.is-loading .apps-login-submit-spinner {
    display: inline-block;
}

@keyframes appsLoginSpin {
    to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
    .apps-login-shell {
        padding: 1.1rem 0.9rem;
    }

    .apps-login-card {
        padding: 1.45rem 1.15rem 1.25rem;
        border-radius: 18px;
    }
}
