/* Dashboard module directory (Purchase/Sales/Inventory side panel app grid).
   Kept as a dedicated file so IIS/server deploys pick it up even when app.css is cached. */

.command-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.command-sub-group-title {
    color: var(--mud-palette-secondary, #64748b);
    font-weight: 800;
    font-size: 0.725rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-top: 16px;
    margin-bottom: 8px;
    padding-left: 8px;
    border-left: 3px solid var(--mud-palette-secondary, #64748b);
    width: 100%;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--app-card-size, 80px), 1fr));
    gap: 16px;
    width: 100%;
    margin-top: 4px;
}

.app-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s ease;
    position: relative;
    width: 80px;
}

.app-card.live:hover {
    transform: scale(1.05) translateY(-4px);
}

.app-card.pending {
    opacity: 0.6;
    filter: grayscale(0.8);
    cursor: not-allowed;
}

.g-app-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    background-color: #fff !important;
    position: relative;
    border: 1px solid #edf2f7;
}

.g-app-icon .mud-icon-root {
    font-size: 1.5rem !important;
}

.g-create-badge {
    position: absolute;
    bottom: -6px;
    right: -6px;
    background: #4285f4;
    border-radius: 12px;
    color: #fff;
    min-width: 22px;
    height: 22px;
    padding: 0 2px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    border: 2px solid #fff;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    white-space: nowrap;
    z-index: 5;
}

.g-create-badge .mud-icon-root {
    font-size: 14px !important;
}

.g-create-badge:hover {
    background: #3367d6;
    padding: 0 6px;
    right: -16px;
    z-index: 10;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.g-app-label {
    margin-top: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #333;
    text-align: center;
    line-height: 1.2;
}

.g-color-blue { color: #4285f4 !important; }
.g-color-indigo { color: #5c6bc0 !important; }
.g-color-green { color: #34a853 !important; }
.g-color-orange { color: #fbbc05 !important; }
.g-color-teal { color: #26a69a !important; }
.g-color-purple { color: #ab47bc !important; }
.g-color-cyan { color: #00acc1 !important; }
.g-color-red { color: #ea4335 !important; }
.g-color-gray { color: #9e9e9e !important; }

@media (max-width: 959.98px) {
    .command-menu {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
        gap: 8px !important;
        padding: 4px 0 !important;
    }

    .command-sub-group-title,
    .app-grid {
        grid-column: 1 / -1 !important;
    }
}
