/* modern.css — shared 2026 design system for all panel pages */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700;800&display=swap');

/* ── Animations ─────────────────────────────────────────── */
@keyframes lp-orb-drift {
    0%,100% { transform: translate(0,0) scale(1); }
    33%     { transform: translate(40px,-30px) scale(1.15); }
    66%     { transform: translate(-30px,20px) scale(0.9); }
}
@keyframes lp-card-in {
    0%   { opacity:0; transform: translateY(40px) scale(0.94); filter: blur(8px); }
    100% { opacity:1; transform: translateY(0)    scale(1);    filter: blur(0); }
}
@keyframes lp-edge-glow {
    0%,100% { box-shadow:
        0 0 0 1px rgba(255,255,255,0.06),
        0 30px 80px -20px rgba(167,139,250,0.35),
        0 0 80px -10px rgba(236,72,153,0.25); }
    50%     { box-shadow:
        0 0 0 1px rgba(255,255,255,0.10),
        0 30px 80px -20px rgba(236,72,153,0.45),
        0 0 80px -10px rgba(56,189,248,0.30); }
}
@keyframes lp-shimmer    { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes lp-icon-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes lp-twinkle    { 0%,100% { opacity: 0.15; } 50% { opacity: 0.7; } }
@keyframes lp-grid-scroll{ 0% { transform: translateY(0); } 100% { transform: translateY(60px); } }

/* ── Background scene (orbs + grid + stars) ─────────────── */
.lp-bg {
    position: fixed; inset: 0; overflow: hidden; z-index: 0;
    background: radial-gradient(ellipse at top, #1a0a2e 0%, #0a0510 60%, #000000 100%);
}
.lp-bg::before {
    content:''; position:absolute; inset:0;
    background-image:
        linear-gradient(rgba(167,139,250,0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(167,139,250,0.06) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(circle at 50% 50%, black 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(circle at 50% 50%, black 0%, transparent 70%);
    animation: lp-grid-scroll 12s linear infinite;
}
.lp-orb {
    position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.55;
    mix-blend-mode: screen; pointer-events: none;
}
.lp-orb.o1 { width: 500px; height: 500px; top: -150px; left: -100px;
             background: radial-gradient(circle, #a78bfa 0%, transparent 65%);
             animation: lp-orb-drift 18s ease-in-out infinite; }
.lp-orb.o2 { width: 480px; height: 480px; bottom: -180px; right: -120px;
             background: radial-gradient(circle, #ec4899 0%, transparent 65%);
             animation: lp-orb-drift 22s ease-in-out infinite reverse; }
.lp-orb.o3 { width: 420px; height: 420px; top: 40%; left: 50%; transform: translate(-50%, -50%);
             background: radial-gradient(circle, #38bdf8 0%, transparent 65%);
             animation: lp-orb-drift 26s ease-in-out infinite; opacity: 0.35; }

.lp-stars { position: absolute; inset: 0; pointer-events: none; }
.lp-star  { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: white;
            box-shadow: 0 0 4px white; animation: lp-twinkle 3s ease-in-out infinite; }

/* ── Glass card ─────────────────────────────────────────── */
.lp-card {
    position: relative; z-index: 1;
    background: rgba(15,10,30,0.55);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 28px;
    padding: 48px 40px;
    animation: lp-card-in 0.8s cubic-bezier(0.16, 1, 0.3, 1), lp-edge-glow 5s ease-in-out infinite;
    font-family: 'Inter', system-ui, sans-serif;
}
.lp-card::before {
    content:''; position:absolute; inset: 0; border-radius: 28px; pointer-events: none;
    background: linear-gradient(135deg,
        rgba(167,139,250,0.18) 0%, transparent 30%,
        transparent 70%, rgba(236,72,153,0.18) 100%);
}

/* ── Hero icon ──────────────────────────────────────────── */
.lp-icon-halo {
    width: 84px; height: 84px; border-radius: 24px;
    background: linear-gradient(135deg, #a78bfa 0%, #ec4899 50%, #fb923c 100%);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 20px 50px -10px rgba(236,72,153,0.55), inset 0 1px 0 rgba(255,255,255,0.3);
    animation: lp-icon-pulse 3s ease-in-out infinite;
    position: relative;
}
.lp-icon-halo::after {
    content:''; position:absolute; inset:-8px; border-radius: 28px;
    background: linear-gradient(135deg, #a78bfa, #ec4899, #fb923c);
    filter: blur(20px); opacity: 0.4; z-index: -1;
}
.lp-icon-halo.green {
    background: linear-gradient(135deg, #34d399 0%, #06b6d4 50%, #6366f1 100%);
}
.lp-icon-halo.green::after {
    background: linear-gradient(135deg, #34d399, #06b6d4, #6366f1);
}
.lp-icon-halo.amber {
    background: linear-gradient(135deg, #fbbf24 0%, #f97316 50%, #ec4899 100%);
}
.lp-icon-halo.amber::after {
    background: linear-gradient(135deg, #fbbf24, #f97316, #ec4899);
}

/* ── Typography ─────────────────────────────────────────── */
.lp-title {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-weight: 800; font-size: 2.1rem; letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 0%, #c4b5fd 50%, #f9a8d4 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}

/* ── Inputs ─────────────────────────────────────────────── */
.lp-input {
    width: 100%; padding: 14px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px; color: #f3f4f6; font-size: 0.95rem;
    transition: all 0.25s ease;
}
.lp-input:focus {
    outline: none;
    background: rgba(255,255,255,0.08);
    border-color: rgba(167,139,250,0.55);
    box-shadow: 0 0 0 4px rgba(167,139,250,0.12),
                0 0 30px -5px rgba(167,139,250,0.4);
}
.lp-input::placeholder { color: rgba(255,255,255,0.30); }

.lp-label {
    display: block; font-size: 0.78rem; font-weight: 600;
    color: rgba(196,181,253,0.85);
    text-transform: uppercase; letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.lp-input-wrap { position: relative; }
.lp-input-wrap > i {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: rgba(196,181,253,0.5); width: 18px; height: 18px; pointer-events: none;
    transition: color 0.25s;
}
.lp-input-wrap input:focus ~ i { color: rgba(196,181,253,0.95); }
.lp-input-wrap input { padding-left: 44px; }

/* ── Button ─────────────────────────────────────────────── */
.lp-button {
    position: relative; overflow: hidden;
    width: 100%; padding: 14px 20px; border-radius: 12px;
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-weight: 700; font-size: 0.95rem; letter-spacing: 0.02em;
    color: white; cursor: pointer; border: none;
    background: linear-gradient(135deg, #a78bfa 0%, #ec4899 50%, #fb923c 100%);
    background-size: 200% 200%;
    box-shadow: 0 12px 30px -8px rgba(236,72,153,0.55),
                inset 0 1px 0 rgba(255,255,255,0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-position 0.4s ease;
}
.lp-button::before {
    content:''; position:absolute; inset:0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.25) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: lp-shimmer 3s linear infinite;
    pointer-events: none;
}
.lp-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px -8px rgba(236,72,153,0.65),
                inset 0 1px 0 rgba(255,255,255,0.35);
    background-position: 100% 0;
}
.lp-button:active { transform: translateY(0); }

.lp-button.green {
    background: linear-gradient(135deg, #34d399 0%, #06b6d4 50%, #6366f1 100%);
    background-size: 200% 200%;
    box-shadow: 0 12px 30px -8px rgba(6,182,212,0.55), inset 0 1px 0 rgba(255,255,255,0.25);
}
.lp-button.amber {
    background: linear-gradient(135deg, #fbbf24 0%, #f97316 50%, #ec4899 100%);
    background-size: 200% 200%;
    box-shadow: 0 12px 30px -8px rgba(249,115,22,0.55), inset 0 1px 0 rgba(255,255,255,0.25);
}

/* ── Subtle dashboard polish (opt-in via .lp-polish on body) ── */
body.lp-polish {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0a0815 0%, #0d0a1f 30%, #100a1d 60%, #0a0d1a 100%) !important;
    background-attachment: fixed;
    position: relative;
}
/* Soft ambient orbs in the background of the whole panel */
body.lp-polish::before {
    content:'';
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(circle at 12% 8%,  rgba(167,139,250,0.10), transparent 35%),
        radial-gradient(circle at 88% 92%, rgba(236,72,153,0.10),  transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(56,189,248,0.05),  transparent 60%);
    filter: blur(20px);
}
body.lp-polish > * { position: relative; z-index: 1; }

body.lp-polish .bg-gray-800,
body.lp-polish .bg-gray-900 {
    background: rgba(20, 18, 35, 0.55) !important;
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
}
body.lp-polish .bg-gray-700,
body.lp-polish .bg-gray-700\/40,
body.lp-polish .bg-gray-700\/50 {
    background: rgba(40, 35, 60, 0.45) !important;
}
body.lp-polish .border-gray-700,
body.lp-polish .border-gray-600 { border-color: rgba(255,255,255,0.06) !important; }

/* Headings/titles get the modern font automatically */
body.lp-polish h1, body.lp-polish h2, body.lp-polish h3, body.lp-polish h4 {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    letter-spacing: -0.01em;
}

/* Subtle hover lift on rounded cards */
body.lp-polish .rounded-lg, body.lp-polish .rounded-xl, body.lp-polish .rounded-2xl {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

/* Topbar of the React shell — heavier glass */
body.lp-polish #appTopbar {
    background: rgba(15, 12, 30, 0.75) !important;
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border-bottom: 1px solid rgba(167,139,250,0.20) !important;
}
body.lp-polish #appSidebar {
    background: rgba(15, 12, 30, 0.65) !important;
    backdrop-filter: blur(16px) saturate(130%);
    -webkit-backdrop-filter: blur(16px) saturate(130%);
    border-right: 1px solid rgba(167,139,250,0.12) !important;
}
body.lp-polish #appSidebar nav { padding: 16px 12px; }

/* ── Sidebar nav items ──────────────────────────────────── */
.lp-nav-item {
    position: relative;
    width: 100%;
    display: flex; align-items: center; gap: 12px;
    padding: 11px 12px;
    margin-bottom: 4px;
    border-radius: 12px;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 500; font-size: 0.92rem;
    color: rgba(196,181,253,0.65);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: left;
    overflow: hidden;
}
.lp-nav-item.lp-nav-collapsed { justify-content: center; gap: 0; padding: 11px 0; }

.lp-nav-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border-radius: 9px;
    background: rgba(167,139,250,0.06);
    color: rgba(196,181,253,0.7);
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.lp-nav-label {
    flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.lp-nav-chevron { color: rgba(196,181,253,0.4); transition: transform 0.25s ease; }

/* Hover state — slide in, brighten icon, subtle gradient sweep */
.lp-nav-item:hover {
    color: rgba(255,255,255,0.95);
    background: linear-gradient(90deg, rgba(167,139,250,0.10), rgba(236,72,153,0.06) 60%, transparent);
    border-color: rgba(167,139,250,0.18);
    transform: translateX(2px);
}
.lp-nav-item:hover .lp-nav-icon {
    background: linear-gradient(135deg, rgba(167,139,250,0.25), rgba(236,72,153,0.20));
    color: white;
    box-shadow: 0 4px 12px -2px rgba(167,139,250,0.35);
}
.lp-nav-item:hover .lp-nav-chevron { color: rgba(255,255,255,0.85); }

/* Active state — gradient pill, neon left bar, brighter icon halo */
.lp-nav-item.lp-nav-active {
    color: white;
    background: linear-gradient(90deg,
        rgba(167,139,250,0.22) 0%,
        rgba(236,72,153,0.16) 60%,
        rgba(236,72,153,0.04) 100%);
    border-color: rgba(167,139,250,0.30);
    box-shadow: 0 6px 20px -8px rgba(167,139,250,0.45),
                inset 0 1px 0 rgba(255,255,255,0.06);
    font-weight: 600;
    transform: translateX(0);
}
.lp-nav-item.lp-nav-active::before {
    content: '';
    position: absolute; left: 0; top: 8px; bottom: 8px;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: linear-gradient(180deg, #a78bfa, #ec4899);
    box-shadow: 0 0 12px rgba(236,72,153,0.6);
}
.lp-nav-item.lp-nav-active .lp-nav-icon {
    background: linear-gradient(135deg, #a78bfa, #ec4899);
    color: white;
    box-shadow: 0 6px 18px -3px rgba(236,72,153,0.55),
                inset 0 1px 0 rgba(255,255,255,0.30);
}

/* Sub-menu items (Settings → Dashboard / Bundles / etc) */
.lp-nav-item.lp-nav-sub {
    margin-left: 14px;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: rgba(196,181,253,0.50);
    border-left: 1px dashed rgba(167,139,250,0.20);
    border-radius: 0 10px 10px 0;
    margin-bottom: 2px;
}
.lp-nav-item.lp-nav-sub .lp-nav-icon { width: 26px; height: 26px; border-radius: 7px; }
.lp-nav-item.lp-nav-sub:hover {
    border-left-color: rgba(167,139,250,0.55);
    border-left-style: solid;
}
.lp-nav-item.lp-nav-sub.lp-nav-active {
    border-left-color: rgba(236,72,153,0.7);
    border-left-style: solid;
}

/* Custom scrollbar for the sidebar nav */
body.lp-polish #appSidebar nav::-webkit-scrollbar { width: 6px; }
body.lp-polish #appSidebar nav::-webkit-scrollbar-track { background: transparent; }
body.lp-polish #appSidebar nav::-webkit-scrollbar-thumb {
    background: rgba(167,139,250,0.20);
    border-radius: 3px;
}
body.lp-polish #appSidebar nav::-webkit-scrollbar-thumb:hover { background: rgba(167,139,250,0.40); }

/* Inputs in dashboard get a softer glass treatment */
body.lp-polish input[type="text"],
body.lp-polish input[type="email"],
body.lp-polish input[type="password"],
body.lp-polish input[type="number"],
body.lp-polish input[type="search"],
body.lp-polish input[type="url"],
body.lp-polish input[type="date"],
body.lp-polish select,
body.lp-polish textarea {
    background: rgba(255,255,255,0.04) !important;
    border-color: rgba(255,255,255,0.10) !important;
    transition: all 0.2s ease;
}
body.lp-polish input:focus,
body.lp-polish select:focus,
body.lp-polish textarea:focus {
    background: rgba(255,255,255,0.07) !important;
    border-color: rgba(167,139,250,0.55) !important;
    box-shadow: 0 0 0 3px rgba(167,139,250,0.10) !important;
}
