/* ==============================================
   AGENDA SIDEBAR CONTROLS - PREMIUM EDITION
   Menu Lateral Direito Recolhível
   ============================================== */

/* Variáveis da Sidebar */
:root {
    --agenda-sidebar-width: 280px;
    --agenda-sidebar-collapsed-width: 68px;
    --agenda-sidebar-transition: 0.24s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-padding: 1rem;
    --sidebar-item-radius: 14px;
    --sidebar-btn-height: 48px;
}

/* ==============================================
   LAYOUT BASE - Flex com Sidebar à Direita
   ============================================== */

.content-area {
    display: flex;
    position: relative;
    min-height: calc(100vh - var(--header-height, 72px));
}

/* ==============================================
   SIDEBAR PRINCIPAL - LADO DIREITO
   ============================================== */

.agenda-controls-sidebar {
    position: sticky;
    top: 0;
    right: 0;
    order: 2;
    /* Garante que fique à direita no flexbox */
    width: var(--agenda-sidebar-width);
    height: calc(100vh - var(--header-height, 72px));
    background: linear-gradient(180deg, var(--theme-card-bg) 0%, var(--theme-bg-secondary) 100%);
    border-left: 1px solid var(--theme-border-color);
    transition: width var(--agenda-sidebar-transition);
    z-index: 100;
    overflow: visible;
    /* Permite que o botão toggle apareça fora */
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.06);
}

/* Container interno com scroll */
.sidebar-controls-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.25rem 0;
    gap: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Scrollbar elegante */
.agenda-controls-sidebar::-webkit-scrollbar {
    width: 3px;
}

.agenda-controls-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.agenda-controls-sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color), var(--primary-dark));
    border-radius: 10px;
}

/* ==============================================
   ESTADO RECOLHIDO - DESIGN PREMIUM
   ============================================== */

.agenda-controls-sidebar.collapsed {
    width: var(--agenda-sidebar-collapsed-width);
}

/* Esconder textos quando colapsado */
.agenda-controls-sidebar.collapsed .sidebar-section-title,
.agenda-controls-sidebar.collapsed .sidebar-btn-text,
.agenda-controls-sidebar.collapsed .sidebar-date-text,
.agenda-controls-sidebar.collapsed .filter-content {
    display: none !important;
}

/* Centralizar seções quando colapsado */
.agenda-controls-sidebar.collapsed .sidebar-section {
    padding: 0.75rem 0.625rem;
    align-items: center;
}

.agenda-controls-sidebar.collapsed .sidebar-section>* {
    width: 100%;
}

/* ==============================================
   BOTÃO TOGGLE - PREMIUM
   ============================================== */

.sidebar-toggle-btn {
    position: absolute;
    left: -16px;
    top: 24px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: 3px solid var(--theme-card-bg);
    cursor: pointer;
    z-index: 101;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(var(--primary-r), var(--primary-g), var(--primary-b), 0.35);
    font-size: 0.75rem;
}

.sidebar-toggle-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(var(--primary-r), var(--primary-g), var(--primary-b), 0.5);
}

.sidebar-toggle-btn i {
    transition: transform 0.35s ease;
}

/* Ícone é trocado via JavaScript - não precisa de rotação CSS */

/* ==============================================
   SEÇÕES
   ============================================== */

.sidebar-section {
    padding: 1rem var(--sidebar-padding);
    border-bottom: 1px solid rgba(var(--primary-r), var(--primary-g), var(--primary-b), 0.08);
    display: flex;
    flex-direction: column;
    transition: padding var(--agenda-sidebar-transition), border-color 0.2s ease;
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-section-title {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--theme-text-secondary);
    margin-bottom: 0.875rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    white-space: nowrap;
    opacity: 0.7;
    transition: color 0.2s ease, opacity 0.2s ease;
}

/* ==============================================
   NAVEGAÇÃO DE DATA - PREMIUM
   ============================================== */

.sidebar-date-nav {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

/* Container dos botões de navegação */
.sidebar-date-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    background: var(--theme-bg-secondary);
    border-radius: var(--sidebar-item-radius);
    padding: 0.375rem;
    border: 1px solid var(--theme-border-color);
}

/* Botões prev/next */
.sidebar-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--theme-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.sidebar-nav-btn:hover {
    background: var(--theme-card-bg);
    color: var(--primary-color);
    transform: scale(1.05);
}

.sidebar-nav-btn:active {
    transform: scale(0.95);
}

/* Display da data atual */
.sidebar-date-display {
    flex: 1;
    text-align: center;
    padding: 0.5rem 0.25rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.25s ease;
    min-width: 0;
}

.sidebar-date-display:hover {
    background: var(--theme-card-bg);
}

.sidebar-date-text {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--theme-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    transition: color 0.2s ease;
}

/* Botão Hoje - Premium */
.sidebar-today-btn {
    width: 100%;
    height: var(--sidebar-btn-height);
    border-radius: var(--sidebar-item-radius);
    border: 2px solid var(--primary-color);
    background: linear-gradient(135deg, rgba(var(--primary-r), var(--primary-g), var(--primary-b), 0.08) 0%, transparent 100%);
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    font-size: 0.875rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.sidebar-today-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(var(--primary-r), var(--primary-g), var(--primary-b), 0.35);
}

.sidebar-today-btn i {
    font-size: 1rem;
}

/* Estado colapsado - Navegação de data */
.agenda-controls-sidebar.collapsed .sidebar-date-controls {
    flex-direction: column;
    padding: 0.25rem;
    gap: 0.25rem;
}

.agenda-controls-sidebar.collapsed .sidebar-nav-btn {
    width: 44px;
    height: 38px;
}

.agenda-controls-sidebar.collapsed .sidebar-date-display {
    display: none;
}

.agenda-controls-sidebar.collapsed .sidebar-today-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 12px;
}

.agenda-controls-sidebar.collapsed .sidebar-today-btn .sidebar-btn-text {
    display: none;
}

/* ==============================================
   VIEW TOGGLE - PREMIUM (Dia/Semana/Mês)
   ============================================== */

.sidebar-view-toggle {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.sidebar-view-btn {
    width: 100%;
    height: var(--sidebar-btn-height);
    border-radius: var(--sidebar-item-radius);
    border: none;
    background: var(--theme-bg-secondary);
    color: var(--theme-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background-color 0.24s ease, color 0.24s ease, box-shadow 0.24s ease, transform 0.2s ease;
    position: relative;
    overflow: hidden;
}

.sidebar-view-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: transform 0.25s ease;
    border-radius: 0 4px 4px 0;
}

.sidebar-view-btn:hover {
    background: var(--theme-card-bg);
    color: var(--theme-text-primary);
    transform: translateX(4px);
}

.sidebar-view-btn.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(var(--primary-r), var(--primary-g), var(--primary-b), 0.3);
}

.sidebar-view-btn.active::before {
    transform: scaleY(1);
    background: white;
}

.sidebar-view-btn i {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.sidebar-view-btn .sidebar-btn-text {
    flex: 1;
    text-align: left;
    white-space: nowrap;
    transition: color 0.2s ease;
}

/* Estado colapsado - View toggle */
.agenda-controls-sidebar.collapsed .sidebar-view-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
    margin: 0 auto;
    border-radius: 12px;
}

.agenda-controls-sidebar.collapsed .sidebar-view-btn::before {
    display: none;
}

.agenda-controls-sidebar.collapsed .sidebar-view-btn:hover {
    transform: scale(1.08);
}

/* ==============================================
   BOTÕES DE AÇÃO - PREMIUM
   ============================================== */

.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.sidebar-action-btn {
    width: 100%;
    height: var(--sidebar-btn-height);
    border-radius: var(--sidebar-item-radius);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    transition: background-color 0.24s ease, color 0.24s ease, box-shadow 0.24s ease, transform 0.2s ease;
    position: relative;
    overflow: hidden;
}

.sidebar-action-btn i {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.sidebar-action-btn .sidebar-btn-text {
    flex: 1;
    text-align: left;
    white-space: nowrap;
    transition: color 0.2s ease;
}

/* Nova Comanda - Verde Premium */
.sidebar-action-btn.btn-comanda {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.sidebar-action-btn.btn-comanda:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

/* Bloquear Horário - Amber Premium */
.sidebar-action-btn.btn-bloquear {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.sidebar-action-btn.btn-bloquear:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
}

/* Estado colapsado - Ações */
.agenda-controls-sidebar.collapsed .sidebar-action-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
    margin: 0 auto;
    border-radius: 12px;
}

/* ==============================================
   FILTROS - PREMIUM
   ============================================== */

.sidebar-filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.filter-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

/* Esconder ícone quando expandido - só mostra quando colapsado */
.filter-icon {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--theme-bg-secondary);
    border: 1px solid var(--theme-border-color);
    align-items: center;
    justify-content: center;
    color: var(--theme-text-secondary);
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.25s ease;
}

.filter-icon:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Mostrar ícone só quando colapsado */
.agenda-controls-sidebar.collapsed .filter-icon {
    display: flex;
}

.filter-content {
    flex: 1;
    transition: opacity 0.2s ease;
    min-width: 0;
}

.filter-label {
    font-size: 0.75rem;
    color: var(--theme-text-secondary);
    font-weight: 600;
    margin-bottom: 0.375rem;
    display: block;
}

.filter-select {
    width: 100%;
    height: 42px;
    padding: 0 2.25rem 0 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    background: var(--theme-bg-secondary);
    border: 1px solid var(--theme-border-color);
    border-radius: 10px;
    color: var(--theme-text-primary);
    cursor: pointer;
    transition: all 0.25s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
}

.filter-select:hover {
    border-color: var(--primary-color);
}

.filter-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-r), var(--primary-g), var(--primary-b), 0.15);
    outline: none;
}

/* Estado colapsado - Filtros */
.agenda-controls-sidebar.collapsed .sidebar-filter-group {
    align-items: center;
}

.agenda-controls-sidebar.collapsed .filter-header {
    justify-content: center;
}

/* ==============================================
   FILTER POPOVER (quando sidebar está colapsada)
   ============================================== */

.filter-popover {
    display: none;
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    width: 240px;
    background: var(--theme-card-bg);
    border: 1px solid var(--theme-border-color);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    overflow: hidden;
}

.filter-popover.show {
    display: block;
    animation: popover-appear 0.2s ease-out;
}

@keyframes popover-appear {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(8px);
    }

    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

.filter-popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    background: var(--theme-bg-secondary);
    border-bottom: 1px solid var(--theme-border-color);
    font-weight: 700;
    font-size: 0.8125rem;
    color: var(--theme-text-primary);
}

.filter-popover-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--theme-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.filter-popover-close:hover {
    background: #ef4444;
    color: white;
}

.filter-popover-body {
    padding: 1rem;
}

.filter-popover-body .filter-select {
    width: 100%;
}

/* ==============================================
   WRAPPER DE CONTEÚDO DA AGENDA
   ============================================== */

.agenda-content-wrapper {
    flex: 1;
    order: 1;
    /* Fica antes da sidebar no flexbox */
    min-width: 0;
    transition: all var(--agenda-sidebar-transition);
    padding: 1rem;
}

/* Desktop: sidebar acompanha a altura real da área da agenda */
@media (min-width: 1024px) {
    .content-area {
        align-items: stretch;
    }

    .agenda-controls-sidebar {
        position: relative;
        top: auto;
        height: auto;
        min-height: 100%;
        align-self: stretch;
    }

    .sidebar-controls-content {
        height: 100%;
        min-height: 0;
        overflow-y: auto;
    }
}

/* Remover date header que foi movido para sidebar */
.agenda-date-header {
    display: none !important;
}

/* ==============================================
   BOTÃO MOBILE PARA ABRIR SIDEBAR (Tablet)
   ============================================== */

.agenda-sidebar-mobile-toggle {
    display: none;
    position: fixed;
    right: 1rem;
    bottom: 5rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    cursor: pointer;
    z-index: 99;
    box-shadow: 0 6px 24px rgba(var(--primary-r), var(--primary-g), var(--primary-b), 0.4);
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.agenda-sidebar-mobile-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 32px rgba(var(--primary-r), var(--primary-g), var(--primary-b), 0.5);
}

/* Overlay */
.agenda-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.agenda-sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* ==============================================
   RESPONSIVIDADE
   ============================================== */

/* Desktop Grande (1440px+) */
@media (min-width: 1440px) {
    :root {
        --agenda-sidebar-width: 300px;
        --agenda-sidebar-collapsed-width: 72px;
    }
}

/* Desktop Normal (1200px - 1439px) */
@media (min-width: 1200px) and (max-width: 1439px) {
    :root {
        --agenda-sidebar-width: 270px;
    }
}

/* Desktop Pequeno / Notebook (1024px - 1199px) */
@media (min-width: 1024px) and (max-width: 1199px) {
    :root {
        --agenda-sidebar-width: 250px;
        --agenda-sidebar-collapsed-width: 64px;
    }

    .sidebar-section {
        padding: 0.875rem 0.875rem;
    }

    .sidebar-action-btn,
    .sidebar-view-btn,
    .sidebar-today-btn {
        height: 44px;
        font-size: 0.8125rem;
    }
}

/* Tablet (768px - 1023px) - Sidebar overlay */
@media (max-width: 1023px) {
    .content-area {
        display: block;
    }

    .agenda-controls-sidebar {
        position: fixed;
        right: 0;
        left: auto;
        top: var(--header-height, 72px);
        transform: translateX(100%);
        width: 300px;
        height: calc(100vh - var(--header-height, 72px));
        z-index: 1000;
        border-left: none;
        box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
    }

    .agenda-controls-sidebar.open {
        transform: translateX(0);
    }

    .agenda-content-wrapper {
        width: 100%;
    }

    .agenda-sidebar-mobile-toggle {
        display: flex;
    }

    .sidebar-toggle-btn {
        display: none;
    }

    /* Botão fechar */
    .sidebar-close-btn {
        display: flex !important;
        position: absolute;
        left: 0.75rem;
        top: 0.75rem;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: var(--theme-bg-secondary);
        border: 1px solid var(--theme-border-color);
        color: var(--theme-text-secondary);
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.25s ease;
        z-index: 10;
    }

    .sidebar-close-btn:hover {
        background: #ef4444;
        color: white;
        border-color: #ef4444;
    }
}

/* Esconder botão fechar em desktop */
@media (min-width: 1024px) {
    .sidebar-close-btn {
        display: none !important;
    }
}

/* Mobile (<=768px) - Layout tradicional */
@media (max-width: 768px) {
    .content-area {
        display: block;
        padding: 0 !important;
    }

    .agenda-controls-sidebar {
        display: none !important;
    }

    .agenda-sidebar-mobile-toggle {
        display: none !important;
    }

    .agenda-sidebar-overlay {
        display: none !important;
    }

    .agenda-content-wrapper {
        width: 100%;
        padding: 0.75rem 0;
    }

    .agenda-controls-bar-mobile {
        display: flex !important;
    }

    .agenda-date-header {
        display: flex !important;
    }
}

/* ==============================================
   DARK MODE
   ============================================== */

.theme-dark .agenda-controls-sidebar {
    background: linear-gradient(180deg, var(--theme-card-bg) 0%, #0f172a 100%);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
}

.theme-dark .sidebar-toggle-btn {
    border-color: var(--theme-card-bg);
}

.theme-dark .sidebar-section {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

.theme-dark .sidebar-action-btn.btn-bloquear:hover {
    color: white;
}

/* ==============================================
   ANIMAÇÕES
   ============================================== */

@keyframes sidebar-slide-in-right {
    from {
        transform: translateX(100%);
        opacity: 0.5;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.agenda-controls-sidebar.open {
    animation: sidebar-slide-in-right 0.35s ease-out;
}

/* Tooltip nos ícones quando colapsado */
.agenda-controls-sidebar.collapsed .sidebar-view-btn,
.agenda-controls-sidebar.collapsed .sidebar-action-btn,
.agenda-controls-sidebar.collapsed .sidebar-today-btn,
.agenda-controls-sidebar.collapsed .sidebar-nav-btn {
    position: relative;
}

.agenda-controls-sidebar.collapsed .sidebar-view-btn::after,
.agenda-controls-sidebar.collapsed .sidebar-action-btn::after,
.agenda-controls-sidebar.collapsed .sidebar-today-btn::after {
    content: attr(title);
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--secondary-color);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.agenda-controls-sidebar.collapsed .sidebar-view-btn:hover::after,
.agenda-controls-sidebar.collapsed .sidebar-action-btn:hover::after,
.agenda-controls-sidebar.collapsed .sidebar-today-btn:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ==============================================
   LEGENDA DE STATUS - SIDEBAR DIREITA
   ============================================== */

.sidebar-legend-section .client-status-legend {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.625rem;
    margin: 0;
    padding: 0;
    width: 100%;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.sidebar-legend-section .legend-badge {
    justify-content: flex-start;
    font-size: 0.78rem;
    white-space: normal;
}

.sidebar-legend-section .badge-color {
    width: 14px;
    height: 14px;
}

.sidebar-legend-section .legend-inline-info {
    margin-top: 0.25rem;
}

.agenda-controls-sidebar.collapsed .sidebar-legend-section {
    display: none;
}

@media (max-width: 1200px) {
    .sidebar-legend-section .legend-badge {
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    .sidebar-legend-section {
        display: none;
    }

    .sidebar-legend-section .client-status-legend {
        display: grid !important;
        gap: 0.5rem;
        padding: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .sidebar-legend-section .client-status-legend::after {
        display: none;
    }

    .sidebar-legend-section .legend-badge {
        justify-content: flex-start;
        padding: 0;
        border-radius: 0;
        flex: 0 0 auto;
    }

    .sidebar-legend-section .legend-badge span {
        display: inline;
    }

    .sidebar-legend-section .badge-color {
        width: 12px;
        height: 12px;
    }
}
