/* Main layout styles */
body, html {
    height: 100%;
    margin: 0;
    overflow-x: visible;
    position: relative;
}

/* Animated background elements */
.bg-animated-elements {
    position: fixed;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

/* Animated circles */
.animated-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.25;
}

/*.circle-1 {
    width: 180px;
    height: 180px;
    background: linear-gradient(45deg, #4154f1, #717ff5);
    left: 10%;
    top: 10%;
    animation: float-around 15s infinite ease-in-out alternate;
}

.circle-2 {
    width: 120px;
    height: 120px;
    background: linear-gradient(45deg, #ff5722, #ff9800);
    left: 40%;
    bottom: 30%;
    animation: float-around 18s infinite ease-in-out alternate-reverse;
}*/

/* Animated bars */
.animated-bar {
    position: absolute;
    border-radius: 6px;
    opacity: 0.75;
}

.bar-1 {
    width: 30px;
    height: 200px;
    background: #4CAF50;
    left: 5%;
    bottom: 8%;
    animation: grow-bar 7s infinite ease-in-out;
}

.bar-2 {
    width: 30px;
    height: 160px;
    background: #2196F3;
    left: 10%;
    bottom: 8%;
    animation: grow-bar 8s 0.5s infinite ease-in-out;
}

.bar-3 {
    width: 30px;
    height: 120px;
    background: #9C27B0;
    left: 15%;
    bottom: 8%;
    animation: grow-bar 6s 1s infinite ease-in-out;
}

.bar-4 {
    width: 30px;
    height: 80px;
    background: #FFF9A3;
    left: 20%;
    bottom: 8%;
    animation: grow-bar 9s 1.5s infinite ease-in-out;
}

.bar-5 {
    width: 30px;
    height: 40px;
    background: #FF9A59;
    left: 25%;
    bottom: 8%;
    animation: grow-bar 5s infinite ease-in-out;
}

/* Chart-like element */
.chart-circle {
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 12px solid rgba(255, 69, 0, 0.2);
    border-top: 12px solid rgba(255, 69, 0, 0.5);
    right: 4%;
    top: 1%;
    /*transform: translateX(-4%);*/
    animation: rotate-chart 8s linear infinite;
}

/* Keyframes animations */
@keyframes float-around {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(-20px, 20px) rotate(5deg);
    }

    50% {
        transform: translate(20px, -10px) rotate(-5deg);
    }

    75% {
        transform: translate(-10px, -20px) rotate(10deg);
    }

    100% {
        transform: translate(10px, 10px) rotate(-10deg);
    }
}

@keyframes grow-bar {
    0%, 100% {
        height: 60px;
        opacity: 0.25;
    }

    50% {
        height: 200px;
        opacity: 0.25;
    }
}

@keyframes rotate-chart {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.main-container {
    height: calc(100vh - 164px);
}

.main-content-panel {
    height: 100%;
}

.right-panel {
    overflow-y: auto;
    height: 100%;
}

/* Business insights background */
.business-insights-bg {
    background-image: url('../images/BusinessInsights.png');
    background-size: cover;
    background-position: center;
    position: relative;
    max-width:100%;
    height: auto;
    overflow-y: auto;
}

    .business-insights-bg::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(to bottom right, rgba(37, 99, 235, 0.9), rgba(59, 130, 246, 0.7));
        z-index: 1;
    }

    .business-insights-bg > * {
        position: relative;
        z-index: 2;
    }

/* Login button highlight animation */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
    }
}

.login-button-highlight {
    animation: pulse 2s infinite;
    transform: scale(1.05);
}

/* Feature item styles */
.feature-item {
    background-color: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

    .feature-item:hover {
        background-color: rgba(255, 255, 255, 0.5);
        transform: scale(1.05);
    }

/* Content panel styling */
.content-display {
    height: 100%;
    overflow-y: auto;
}

/* Background colors */
.bg-gray {
    background-color: #eaedf1
}

/* MudBlazor overrides and extensions */
.top-panel {
    background-color: white;
}

.mud-list-item-icon {
    min-width: 36px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .main-container {
        height: auto;
    }

    .business-insights-bg,
    .right-panel {
        height: auto;
        min-height: 50vh;
    }
}
a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ═══════════════════════════════════════════════════════════
 * APP LAUNCHER — Layout wrapper
 * ═══════════════════════════════════════════════════════════ */

/* Outer flex column — fills the right panel */
.launcher-panel-wrap {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0.75rem 1px 0.75rem; /* Reduced horizontal padding to widen wrapper */
    box-sizing: border-box;
}

/* Welcome header */
.launcher-grid-header {
    text-align: center;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
}

.launcher-welcome {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
    padding: 4px 10px;
    border-radius: 20px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.launcher-welcome:hover {
    background-color: var(--mud-palette-action-default-hover);
}

.launcher-welcome-icon {
    font-size: 1.2rem !important;
    color: #6366f1 !important;
}

.launcher-grid-footer {
    border-top: 1px solid var(--mud-palette-divider);
    padding-top: 0.75rem;
    margin-top: auto;
    text-align: center;
    flex-shrink: 0;
}

.launcher-footer-link {
    color: var(--mud-palette-text-secondary) !important;
}

.launcher-footer-link:hover {
    color: var(--mud-palette-primary) !important;
}

/* Hex grid — fixed height leaving room for header + footer */
.launcher-hex-grid {
    position: relative;
    flex: 1 1 auto;
    height: calc(100% - 120px); /* panel height minus header + footer */
    min-height: 390px;          /* 3 rows × 130px */
    overflow-y: visible;
    overflow-x: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 0;
    padding-bottom: 0;
}

/* ═══════════════════════════════════════════════════════════
 * APP LAUNCHER — Irregular Golden Beehive Background
 * ═══════════════════════════════════════════════════════════ */

.beehive-wrapper {
    position: relative;
    width: 380px;
    height: 470px;
    margin: 0 auto;
    transform: none; /* Let it render at exact natural scale */
}

.hex-empty {
    z-index: 1; /* below apps */
    cursor: default;
    pointer-events: none;
    animation: none;
    transform: scale(0.85); /* Empty cells slightly smaller to increase perceived gap */
}

.hex-empty .empty-beehive-cell {
    background: rgba(254, 240, 138, 0.4);
    box-shadow: inset 0 0 15px rgba(251, 191, 36, 0.6), 0 2px 5px rgba(0,0,0,0.05);
}

.hex-empty::before {
    background: rgba(251, 191, 36, 0.5);
    opacity: 0.3;
}

/* Footer — sign out, always visible at bottom */
.launcher-footer {
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid #f1f5f9;
}

/* App cells scale up to be larger than the empty hive slots */
.launcher-hex-grid .hex-wrap:not(.hex-empty) {
    transform: scale(1.05);
    z-index: 10;
    animation: hexPopApp 0.55s ease-out backwards;
}

@keyframes hexPopApp {
    from { opacity: 0; transform: scale(0.5) rotate(-10deg); }
    to   { opacity: 1; transform: scale(1.05) rotate(0deg);   }
}

/* ═══════════════════════════════════════════════════════════
 * APP LAUNCHER — Honeycomb Hex Styles (white background)
 * ═══════════════════════════════════════════════════════════ */

.app-launcher-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 420px;
    overflow: hidden;
    animation: fadeInApps 0.7s ease-out;
}

@keyframes fadeInApps {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* App hex wrapper */
.hex-wrap {
    width: 120px;
    height: 110px;
    position: absolute;
    z-index: 10;
    cursor: pointer;
    animation: hexPop 0.55s ease-out backwards;
}

@keyframes hexPop {
    from { opacity: 0; transform: scale(0.5) rotate(-10deg); }
    to   { opacity: 1; transform: scale(1)   rotate(0deg);   }
}

/* Rounded pointy-top hex — white bg with soft shadow */
.hex-cell {
    width: 100%;
    height: 100%;
    clip-path: path("M 47.7,5.6 Q 60,0 72.3,5.6 L 107.7,21.2 Q 120,27 120,41 L 120,69 Q 120,83 107.7,88.8 L 72.3,104.4 Q 60,110 47.7,104.4 L 12.3,88.8 Q 0,83 0,69 L 0,41 Q 0,27 12.3,21.2 Z");
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(99,102,241,0.10), 0 1px 4px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    transition: transform 0.28s cubic-bezier(0.34,1.56,0.64,1),
                box-shadow 0.28s ease,
                filter 0.28s ease;
}

/* Gradient border ring — more visible on white */
.hex-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    clip-path: path("M 47.7,5.6 Q 60,0 72.3,5.6 L 107.7,21.2 Q 120,27 120,41 L 120,69 Q 120,83 107.7,88.8 L 72.3,104.4 Q 60,110 47.7,104.4 L 12.3,88.8 Q 0,83 0,69 L 0,41 Q 0,27 12.3,21.2 Z");
    transform: scale(1.06);
    transform-origin: center;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 50%, #a5f3fc 100%);
    opacity: 0.7;
    transition: opacity 0.3s ease, background 0.3s ease;
    z-index: 0;
}

.hex-wrap:not(.hex-disabled):hover::before {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
    opacity: 0.35;
}

.hex-wrap:not(.hex-disabled):hover .hex-cell {
    transform: scale(1.09);
    box-shadow: 0 8px 28px rgba(99,102,241,0.22), 0 2px 8px rgba(0,0,0,0.08);
}

.hex-wrap:not(.hex-disabled):active .hex-cell { transform: scale(0.96); }

/* Icon circle */
.hex-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    margin-bottom: 6px;
    transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

.hex-wrap:not(.hex-disabled):hover .hex-icon { transform: scale(1.22) rotate(-8deg); }
.hex-icon .mud-icon-root   { font-size: 1.15rem !important; color: white; }

/* App name label */
.hex-name {
    font-size: 0.6rem;
    font-weight: 700;
    color: #334155;
    text-align: center;
    line-height: 1.2;
    max-width: 90%;
    word-break: break-word;
}

/* Disabled state */
.hex-wrap.hex-disabled            { cursor: default; }
.hex-wrap.hex-disabled .hex-cell  { filter: grayscale(70%) opacity(0.45); box-shadow: none; }
.hex-wrap.hex-disabled::before    { opacity: 0.25; }

/* Maintenance state */
.hex-wrap.hex-maintenance {
    cursor: pointer;
}

/* Welcome banner (legacy — kept for safety) */
.hex-welcome-banner {
    position: absolute;
    top: 10px;
    left: 0; right: 0;
    text-align: center;
    z-index: 20;
    pointer-events: none;
}

/* ── Decorative background hexes (right panel) ─────────────────── */
.hex-deco-wrap {
    position: absolute;
    pointer-events: none;
    width: 100px;
    height: 87px;
    z-index: 0;
    animation: hexFloat var(--fd, 7s) ease-in-out infinite;
}

@keyframes hexFloat {
    0%,  100% { transform: scale(var(--ds, 1)) translate(0,    0)    rotate(0deg);  }
    33%        { transform: scale(var(--ds, 1)) translate(4px, -12px) rotate(2deg);  }
    66%        { transform: scale(var(--ds, 1)) translate(-3px, -6px) rotate(-1deg); }
}

.hex-deco {
    width:  100%;
    height: 100%;
    clip-path: path("M 39.3,4.7 Q 50,0 60.7,4.7 L 89.3,17 Q 100,21.7 100,33.7 L 100,53.3 Q 100,65.3 89.3,70 L 60.7,82.3 Q 50,87 39.3,82.3 L 10.7,70 Q 0,65.3 0,53.3 L 0,33.7 Q 0,21.7 10.7,17 Z");
}

/* ── Premium Glassmorphism Busy Overlay ─────────────────── */
.glass-busy-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 12px;
    animation: fadeInOverlay 0.3s ease-out;
}

@media (prefers-color-scheme: dark) {
    .glass-busy-overlay {
        background: rgba(26, 26, 39, 0.4);
    }
}

.glass-busy-content {
    text-align: center;
    color: var(--mud-palette-text-primary);
    animation: scaleInContent 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 24px;
}

.spinner-glow-wrap {
    position: relative;
    display: inline-flex;
}

.spinner-glow-wrap::after {
    content: '';
    position: absolute;
    inset: -10px;
    background: radial-gradient(circle, rgba(126, 111, 255, 0.2) 0%, transparent 70%);
    z-index: -1;
    border-radius: 50%;
    animation: pulseGlow 2s infinite ease-in-out;
}

.busy-text {
    font-weight: 700 !important;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.busy-subtext {
    color: var(--mud-palette-text-secondary);
    font-weight: 500;
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleInContent {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 1; }
}




