/* === CONTROLES DA AGENDA - SEMPRE EM LINHA === */
.controls-section {
    margin-top: 0;
    margin-bottom: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    padding: 15px;
    overflow: hidden;
}

.controls-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 0 !important;
    gap: 10px;
    flex-wrap: nowrap !important; /* NUNCA quebrar linha */
    min-height: 40px;
    width: 100%;
}

.controls-title {
    font-size: 18px !important; /* Fonte SEMPRE no tamanho padrão */
    font-weight: 600;
    color: #2d3748;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 1; /* Permitir encolhimento */
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.controls-buttons {
    display: flex !important;
    gap: 8px;
    align-items: center !important;
    flex-wrap: nowrap !important; /* NUNCA quebrar linha */
    flex-shrink: 0 !important; /* NUNCA diminuir */
    justify-content: flex-end !important; /* SEMPRE à direita */
    margin-left: auto !important; /* Forçar para a direita */
}

/* Botões de controle - Base */
.btn-control {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important; /* Centralizar conteúdo */
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: rgb(46, 40, 162);
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    min-height: 40px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.btn-control i {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0;
}

.btn-control:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
    color: #2d3748;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.btn-control.active {
    background: #4299e1;
    border-color: #3182ce;
    color: white;
    box-shadow: 0 2px 8px rgba(66, 153, 225, 0.3);
}

.btn-control.active:hover {
    background: #3182ce;
    border-color: #2c5aa0;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.4);
}

/* Indicador de estado */
.btn-control .state-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #48bb78;
    margin-left: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
    position: absolute;
    top: 4px;
    right: 4px;
}

.btn-control .state-indicator.remembered {
    opacity: 1;
}

/* === RESPONSIVIDADE - GARANTIR LINHA ÚNICA === */

/* Desktop - tudo visível */
@media (min-width: 769px) {
    .controls-title {
        font-size: 18px;
    }
    
    .btn-control {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .btn-control span:not(.state-indicator) {
        display: inline;
    }
}

/* Tablets - reduzir texto dos botões */
@media (max-width: 768px) and (min-width: 641px) {
    .controls-header {
        gap: 8px !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
    }
    
    .controls-title {
        font-size: 18px !important; /* Manter tamanho original */
        flex: 0 1 auto; /* Pode encolher mas não cresce */
        min-width: 0;
    }
    
    .controls-buttons {
        gap: 6px !important;
        flex-shrink: 0 !important;
        justify-content: flex-end !important;
        margin-left: auto !important;
    }
    
    .btn-control {
        padding: 8px 12px;
        font-size: 12px;
        min-height: 36px;
    }
    
    .btn-control span:not(.state-indicator) {
        display: inline;
        font-size: 11px;
    }
}

/* Mobile médio - título reduzido, botões compactos */
@media (max-width: 640px) and (min-width: 481px) {
    .controls-header {
        gap: 6px !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
    }
    
    .controls-title {
        font-size: 18px !important; /* Manter tamanho original */
        flex: 0 1 auto;
        min-width: 0;
        max-width: 45%; /* Aumentar espaço para o título */
    }
    
    .controls-buttons {
        gap: 4px !important;
        flex-shrink: 0 !important;
        justify-content: flex-end !important;
        margin-left: auto !important;
    }
    
    .btn-control {
        padding: 6px 10px;
        font-size: 11px;
        min-height: 32px;
        justify-content: center !important;
    }
    
    .btn-control span:not(.state-indicator) {
        display: inline;
        font-size: 10px;
    }
    
    .btn-control i {
        justify-content: center !important;
    }
}

/* Mobile pequeno - manter título, botões apenas com ícones centralizados */
@media (max-width: 480px) and (min-width: 361px) {
    .controls-header {
        gap: 6px !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
    }
    
    .controls-title {
        font-size: 18px !important; /* Manter tamanho original */
        flex: 0 1 auto;
        min-width: 0;
        max-width: 50%; /* Aumentar espaço para acomodar fonte maior */
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .controls-buttons {
        gap: 3px !important;
        flex-shrink: 0 !important;
        justify-content: flex-end !important;
        margin-left: auto !important;
    }
    
    .btn-control {
        padding: 6px !important;
        font-size: 12px;
        min-height: 30px;
        min-width: 30px;
        justify-content: center !important;
        gap: 0;
    }
    
    .btn-control i {
        font-size: 12px;
        margin: 0;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Ocultar texto, manter apenas ícones centralizados */
    .btn-control span:not(.state-indicator) {
        display: none;
    }
    
    .btn-control .state-indicator {
        top: 2px;
        right: 2px;
        width: 4px;
        height: 4px;
    }
}

/* Mobile muito pequeno - título mais curto, botões à direita */
@media (max-width: 360px) and (min-width: 321px) {
    .controls-header {
        justify-content: space-between !important;
        gap: 4px !important;
        min-height: 32px;
        flex-wrap: nowrap !important;
    }
    
    .controls-title {
        font-size: 18px !important; /* Manter tamanho original */
        flex: 0 1 auto !important;
        min-width: 0 !important;
        max-width: 40%; /* Aumentar um pouco mais para acomodar */
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: block !important; /* Manter visível */
    }
    
    .controls-buttons {
        gap: 3px !important;
        justify-content: flex-end !important;
        margin-left: auto !important;
        flex-shrink: 0 !important;
    }
    
    .btn-control {
        padding: 5px !important;
        min-height: 28px;
        min-width: 28px;
        border-radius: 4px;
        font-size: 11px;
        justify-content: center !important;
    }
    
    .btn-control i {
        font-size: 11px;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .btn-control span:not(.state-indicator) {
        display: none;
    }
    
    .btn-control .state-indicator {
        top: 1px;
        right: 1px;
        width: 4px;
        height: 4px;
    }
}

/* Telas extremamente pequenas - APENAS AGORA omitir título */
@media (max-width: 320px) {
    .controls-section {
        padding: 10px;
    }
    
    .controls-header {
        gap: 2px !important;
        min-height: 28px;
        justify-content: flex-end !important; /* Botões à direita */
        flex-wrap: nowrap !important;
    }
    
    .controls-title {
        display: none !important; /* Título oculto APENAS aqui */
    }
    
    .controls-buttons {
        gap: 2px !important;
        justify-content: flex-end !important;
        margin-left: 0 !important;
    }
    
    .btn-control {
        padding: 4px !important;
        min-height: 24px;
        min-width: 24px;
        border-radius: 3px;
        font-size: 10px;
        justify-content: center !important;
    }
    
    .btn-control i {
        font-size: 10px;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .btn-control .state-indicator {
        top: 0px;
        right: 0px;
        width: 3px;
        height: 3px;
    }
}

/* === GARANTIAS ADICIONAIS E SOBRESCRITA === */

/* Forçar que os controles NUNCA quebrem linha */
.controls-header {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    flex-wrap: nowrap !important; /* Forçar */
}

.controls-buttons {
    min-width: fit-content !important;
    flex-wrap: nowrap !important; /* Forçar */
}

/* Garantir que o título pode ser truncado */
.controls-title {
    text-overflow: ellipsis !important;
    overflow: hidden !important;
    word-break: keep-all !important;
    flex-wrap: nowrap !important;
}

/* SOBRESCRITA ESPECÍFICA PARA CONFLITOS */
@media (max-width: 768px) {
    .controls-header {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 6px !important;
        flex-wrap: nowrap !important;
        margin-bottom: 0 !important;
    }

    .controls-title {
        font-size: 18px !important; /* Manter tamanho original SEMPRE */
        flex: 0 1 auto !important;
        min-width: 0 !important;
        text-align: left !important;
        margin-bottom: 0 !important;
    }

    .controls-buttons {
        display: flex !important;
        flex-direction: row !important;
        gap: 6px !important;
        flex-shrink: 0 !important;
        flex-wrap: nowrap !important;
        justify-content: flex-end !important;
        margin-left: auto !important;
    }
}

@media (max-width: 480px) {
    .controls-header {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 4px !important;
        flex-wrap: nowrap !important;
        margin-bottom: 0 !important;
    }

    .controls-title {
        font-size: 18px !important; /* Manter tamanho original SEMPRE */
        flex: 0 1 auto !important;
        min-width: 0 !important;
        max-width: 50% !important; /* Aumentar espaço para acomodar fonte maior */
        text-align: left !important;
        margin-bottom: 0 !important;
        display: block !important; /* Manter visível */
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .controls-buttons {
        display: flex !important;
        flex-direction: row !important;
        gap: 3px !important;
        flex-shrink: 0 !important;
        flex-wrap: nowrap !important;
        justify-content: flex-end !important;
        margin-left: auto !important;
    }
    
    .btn-control {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 6px !important;
        min-height: 30px !important;
        min-width: 30px !important;
    }
    
    .btn-control i {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        height: 100% !important;
    }
}

@media (max-width: 360px) {
    .controls-header {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 3px !important;
        flex-wrap: nowrap !important;
        margin-bottom: 0 !important;
    }

    .controls-title {
        font-size: 18px !important; /* Manter tamanho original SEMPRE */
        flex: 0 1 auto !important;
        min-width: 0 !important;
        max-width: 40% !important; /* Espaço generoso para o título */
        text-align: left !important;
        margin-bottom: 0 !important;
        display: block !important; /* Manter visível até 320px */
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .controls-buttons {
        display: flex !important;
        flex-direction: row !important;
        gap: 3px !important;
        flex-shrink: 0 !important;
        flex-wrap: nowrap !important;
        justify-content: flex-end !important;
        margin-left: auto !important;
        width: auto !important;
    }
    
    .btn-control {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 5px !important;
        min-height: 28px !important;
        min-width: 28px !important;
    }
    
    .btn-control i {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        height: 100% !important;
    }
}

@media (max-width: 320px) {
    .controls-header {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 2px !important;
        flex-wrap: nowrap !important;
        margin-bottom: 0 !important;
    }

    .controls-title {
        display: none !important; /* APENAS aqui omite o título */
    }

    .controls-buttons {
        display: flex !important;
        flex-direction: row !important;
        gap: 2px !important;
        flex-shrink: 0 !important;
        flex-wrap: nowrap !important;
        justify-content: flex-end !important;
        margin-left: 0 !important;
        width: auto !important;
    }
    
    .btn-control {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 4px !important;
        min-height: 24px !important;
        min-width: 24px !important;
    }
    
    .btn-control i {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        height: 100% !important;
    }
}

/* Tooltip para botões apenas com ícones */
@media (max-width: 480px) {
    .btn-control[title]:hover::after,
    .btn-control[data-title]:hover::after {
        content: attr(title);
        position: absolute;
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.8);
        color: white;
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 10px;
        white-space: nowrap;
        z-index: 1000;
        margin-bottom: 4px;
        pointer-events: none;
    }
    
    .btn-control[data-title]:hover::after {
        content: attr(data-title);
    }
}

/* === TRANSIÇÕES SUAVES === */
.controls-title {
    transition: font-size 0.3s ease, opacity 0.3s ease;
}

.btn-control {
    transition: all 0.2s ease, padding 0.3s ease, font-size 0.3s ease;
}

/* === INDICADORES DE PRIORIDADE === */
@media (max-width: 480px) {
    /* Indicar visualmente que há mais funcionalidades */
    .controls-buttons::after {
        content: "";
        position: absolute;
        bottom: -2px;
        left: 50%;
        transform: translateX(-50%);
        width: 20px;
        height: 2px;
        background: linear-gradient(90deg, transparent 0%, #4299e1 50%, transparent 100%);
        border-radius: 1px;
        opacity: 0.6;
    }
}

/* === ESTADOS ESPECIAIS === */
.controls-header.compact {
    min-height: 24px;
}

.controls-header.minimal {
    min-height: 20px;
}

/* Forçar alinhamento perfeito */
.controls-header * {
    flex-shrink: 0;
}

.controls-title {
    flex-shrink: 1 !important; /* Apenas o título pode encolher */
}

/* === MELHORIAS DE ACESSIBILIDADE === */
@media (max-width: 480px) {
    .btn-control {
        min-width: 44px; /* Tamanho mínimo para touch */
        min-height: 44px;
    }
}

@media (max-width: 360px) {
    .btn-control {
        min-width: 40px;
        min-height: 40px;
    }
}

@media (max-width: 320px) {
    .btn-control {
        min-width: 36px;
        min-height: 36px;
    }
}

/* === Fim do CSS de Controle dos Botões = */


/* === TELAS MUITO PEQUENAS (320px) === */
@media (max-width: 320px) {
    .controls-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
        flex-wrap: nowrap;
    }

    .controls-title {
        font-size: 12px;
        flex: 1;
        min-width: 0;
        text-align: left;
    }

    .controls-buttons {
        display: flex;
        flex-direction: row;
        gap: 3px;
        flex-shrink: 0;
        flex-wrap: nowrap;
    }

    .activities-table {
        min-width: 650px !important;
        width: 650px !important;
    }

    .activities-table th:nth-child(1),
    .activities-table td:nth-child(1) {
        width: 70px;
        min-width: 70px;
    }

    .activities-table th:nth-child(2),
    .activities-table td:nth-child(2) {
        width: 70px;
        min-width: 70px;
    }

    .activities-table th:nth-child(3),
    .activities-table td:nth-child(3) {
        width: 80px;
        min-width: 80px;
    }

    .activities-table th:nth-child(4),
    .activities-table td:nth-child(4) {
        width: 260px;
        min-width: 260px;
    }

    .activities-table th:nth-child(5),
    .activities-table td:nth-child(5) {
        width: 180px !important;
        min-width: 180px !important;
    }

    .btn-action,
    .btn-publico {
        min-width: 22px;
        height: 22px;
        padding: 1px 3px;
        font-size: 0.55rem;
    }

    .btn-action i {
        font-size: 0.6rem;
    }

    .status-badge {
        min-width: 55px;
        font-size: 0.55rem;
        padding: 1px 4px;
    }

    .actions-group {
        min-width: 160px;
    }

    .stat-card {
        flex: 1 1 100%;
        margin-bottom: 4px;
    }
} /* === LAYOUT LARGO E RESPONSIVO === */
.container {
    width: 90%;
    max-width: none;
    margin: 30px auto;
    padding: 0 20px;
    padding-top: 0px;
    box-sizing: border-box;
}

/* === RESPONSIVIDADE APRIMORADA === */
@media (max-width: 1400px) {
    .container {
        width: 100%;
        padding: 0 15px;
    }
}

@media (max-width: 768px) {
    .container {
        width: 100%;
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    .container {
        width: 100%;
        padding: 0 8px;
    }
}

/* === RESET E BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8fafc;
    color: #2d3748;
    line-height: 1.6;
}

/* === CONTROLES DA AGENDA === */
.controls-section {
    margin-top: 0;
    margin-bottom: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    padding: 10px;
    overflow: hidden;
}

.controls-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    gap: 10px;
    flex-wrap: wrap;
}

.controls-title {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.controls-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* === SEÇÕES === */
.section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1b4da3;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Seções com animação suave */
.toggle-section {
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.toggle-section.hidden {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
    transform: translateY(-10px);
}

.toggle-section.visible {
    max-height: 2000px;
    opacity: 1;
    transform: translateY(0);
}

.toggle-section .section {
    margin: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

/* Seção de filtros com estilo discreto */
.filter-section {
    background: #fafbfc;
    border: 1px solid #e2e8f0;
}

/* === FORMULÁRIO === */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

label {
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-control {
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
    white-space: pre-wrap;
    line-height: 1.5;
}

.time-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.time-group input[type="checkbox"] {
    margin: 0;
}

.time-group label {
    margin: 0;
    font-size: 0.9rem;
    color: #718096;
}

.char-counter {
    font-size: 0.8rem;
    color: #718096;
    text-align: right;
    margin-top: 5px;
}

/* === BOTÕES E AÇÕES === */
.form-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 20px;
    justify-content: flex-end;
}

.btn-primary {
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 50%, #1e40af 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 58, 138, 0.4);
}

.btn-salvar {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-salvar:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

.btn-cancelar {
    background: #6b7280;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-cancelar:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

/* === FILTROS === */
.filter-controls {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 20px;
    margin-bottom: 20px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group.search-group {
    grid-column: 1 / -1;
    max-width: 100%;
}

.filter-group.btn-group {
    grid-column: 1 / -1;
    justify-content: flex-end;
    align-items: flex-end;
    flex-direction: row;
}

.filter-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #4a5568;
    margin: 0;
    white-space: nowrap;
}

.filter-select {
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    min-width: 100%;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.filter-select:focus {
    outline: none;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.1);
}

.search-input {
    width: 100%;
    max-width: 100%;
    padding: 12px 15px;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #1e3a8a;
    background: white;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.search-input::placeholder {
    color: #9ca3af;
    font-style: italic;
}

.filter-group .search-input:focus,
.filter-group .filter-select:focus {
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.btn-clear {
    background: #e53e3e;
    border: none;
    color: white;
    font-size: 12px;
    padding: 8px 12px;
    border-radius: 5px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 120px;
    justify-content: center;
    cursor: pointer;
}

.btn-clear:hover {
    background: #c53030;
    transform: translateY(-1px);
}

/* === ESTATÍSTICAS === */
.activity-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-card {
    background: white;
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    text-align: center;
    min-width: 90px;
    flex: 1;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    border-color: #4299e1;
    box-shadow: 0 2px 6px rgba(66, 153, 225, 0.15);
    transform: translateY(-1px);
}

.stat-card.clickable {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

.stat-card.clickable:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e0 100%);
}

.stat-number {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 2px;
    line-height: 1;
    word-break: keep-all;
}

.stat-label {
    display: block;
    font-size: 11px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 600;
    line-height: 1;
    word-wrap: break-word;
    hyphens: auto;
}

/* === GRUPOS DE DIAS === */
.day-group {
    margin-bottom: 25px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background: white;
}

.day-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
    color: white;
    padding: 15px 20px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.day-header.hoje {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.day-date {
    font-size: 1.1rem;
}

.day-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
}

/* === CONTÊINER DAS ATIVIDADES === */
.day-activities {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: white;
    position: relative;
}

/* === TABELA DE ATIVIDADES CORRIGIDA === */
.activities-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    table-layout: fixed;
    min-width: 1000px; /* Garantir largura mínima adequada */
}

/* LARGURAS DAS COLUNAS OTIMIZADAS - DESCRIÇÃO PRIVILEGIADA */
.activities-table th:nth-child(1),
.activities-table td:nth-child(1) {
    width: 100px;
    min-width: 100px;
}

.activities-table th:nth-child(2),
.activities-table td:nth-child(2) {
    width: 110px;
    min-width: 110px;
}

.activities-table th:nth-child(3),
.activities-table td:nth-child(3) {
    width: 120px;
    min-width: 120px;
}

.activities-table th:nth-child(4),
.activities-table td:nth-child(4) {
    width: 390px;
    min-width: 390px;
}

.activities-table th:nth-child(5),
.activities-table td:nth-child(5) {
    width: 320px;
    min-width: 320px;
}

.activities-table th {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: #1e3a8a;
    font-weight: 600;
    padding: 12px 8px;
    text-align: left;
    border-bottom: 2px solid #e2e8f0;
    font-size: 0.9rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    position: sticky;
    top: 0;
    z-index: 1;
}

.activities-table td {
    padding: 15px 8px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.activities-table tr.activity-row {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.activities-table tr.activity-row:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.activities-table tr.activity-row.tr-expanded {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.time-cell {
    font-weight: 600;
    color: #1e3a8a;
    font-size: 0.9rem;
    word-break: keep-all;
}

.type-cell {
    font-size: 0.85rem;
}

.type-badge {
    background: #e6fffa;
    color: #00a693;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    display: inline-block;
    white-space: nowrap;
}

.type-badge.remoto {
    background: #fef3c7;
    color: #d97706;
}

.local-cell {
    color: #64748b;
    font-size: 0.85rem;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.description-cell {
    font-size: 0.9rem;
    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.description-preview {
    color: #4a5568;
    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.actions-cell {
    text-align: center;
    vertical-align: middle;
    position: relative;
}

/* === ESTRUTURA DOS BOTÕES DE AÇÃO CORRIGIDA === */
.actions-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
    padding: 4px;
    min-width: 300px; /* Garantir largura mínima */
}

.actions-buttons {
    display: flex;
    flex-direction: row;
    gap: 4px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

.status-badge {
    padding: 6px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 80px;
    justify-content: center;
    white-space: nowrap;
    margin-bottom: 6px;
}

.status-badge.pendente {
    background: #fed7d7;
    color: #c53030;
}

.status-badge.concluido {
    background: #c6f6d5;
    color: #2f855a;
}

.btn-action {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    padding: 6px 8px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    margin: 0 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.btn-action:hover {
    background: #fecaca;
    transform: translateY(-1px);
}

/* === BOTÕES ESPECÍFICOS === */
.btn-publico {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.btn-publico.btn-publico-on {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.btn-publico.btn-publico-off {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.btn-edit {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.btn-edit:hover {
    background: #f59e0b;
    color: white;
}

.btn-delete {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.btn-delete:hover {
    background: #fecaca;
    color: #b91c1c;
}

.btn-share {
    background: #ede9fe;
    color: #7c3aed;
    border: 1px solid #c4b5fd;
}

.btn-share:hover {
    background: #ddd6fe;
    color: #6d28d9;
}

.btn-archive {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.btn-archive:hover {
    background: #e5e7eb;
    color: #4b5563;
}

.expand-icon {
    color: #64748b;
    font-size: 0.8rem;
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.tr-expanded .expand-icon {
    transform: rotate(180deg);
}

/* === LINHA DE EXPANSÃO === */
.expansion-row {
    display: none;
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f3ff 100%);
}

.expansion-row.show {
    display: table-row;
}

.expansion-content {
    padding: 20px;
    border-left: 4px solid #1e3a8a;
    background: white;
    border-radius: 8px;
    margin: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.expansion-content h4 {
    color: #1e3a8a;
    margin-bottom: 10px;
    font-size: 1rem;
    font-weight: 600;
}

.expansion-content .description-text {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 15px;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    hyphens: auto;
}

.expansion-content .author-info {
    font-size: 0.9rem;
    color: #64748b;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* === ESTADOS === */
.loading {
    text-align: center;
    padding: 40px;
    color: #718096;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #718096;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* === HEADER E NAVEGAÇÃO === */
.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    flex: 1;
    justify-content: center;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.nav-link i {
    font-size: 0.8rem;
}

.btn-logout {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

/* === MOBILE === */
.mobile-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 8px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
}

.mobile-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    border-top: 1px solid #e2e8f0;
}

.mobile-menu.active {
    display: block;
}

.mobile-user {
    padding: 15px 20px;
    background: #1e3a8a;
    color: white;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-user .user-avatar {
    background: #10b981;
}

.mobile-links {
    padding: 10px 0;
}

.mobile-link {
    display: block;
    padding: 12px 20px;
    color: #4a5568;
    text-decoration: none;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s ease;
}

.mobile-link:hover {
    background: #f8fafc;
    color: #1e3a8a;
}

.mobile-link i {
    width: 20px;
    margin-right: 10px;
}

/* === GARANTIR VISIBILIDADE DOS BOTÕES === */
.actions-group,
.actions-buttons,
.btn-action,
.btn-publico,
.status-badge {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* === ESTADOS DE INTERAÇÃO === */
.btn-action:disabled,
.btn-publico:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-action.loading,
.btn-publico.loading {
    opacity: 0.7;
    cursor: wait;
}

.btn-action.loading i,
.btn-publico.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* === SCROLLBAR PERSONALIZADA === */
.day-activities::-webkit-scrollbar {
    height: 10px;
}

.day-activities::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 5px;
    margin: 0 10px;
}

.day-activities::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 5px;
}

.day-activities::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* === RESPONSIVO DESKTOP GRANDE === */
@media (min-width: 1400px) {
    .activities-table {
        min-width: 1200px;
    }
    
    .activities-table th:nth-child(4),
    .activities-table td:nth-child(4) {
        width: 490px;
        min-width: 490px;
    }
    
    .activities-table th:nth-child(5),
    .activities-table td:nth-child(5) {
        width: 380px;
        min-width: 380px;
    }
    
    .actions-group {
        min-width: 360px;
    }
}

/* === RESPONSIVO TABLET === */
@media (max-width: 1024px) {
    .activities-table {
        min-width: 900px;
    }
    
    .activities-table th:nth-child(1),
    .activities-table td:nth-child(1) {
        width: 90px;
        min-width: 90px;
    }

    .activities-table th:nth-child(2),
    .activities-table td:nth-child(2) {
        width: 100px;
        min-width: 100px;
    }

    .activities-table th:nth-child(3),
    .activities-table td:nth-child(3) {
        width: 110px;
        min-width: 110px;
    }

    .activities-table th:nth-child(4),
    .activities-table td:nth-child(4) {
        width: 310px;
        min-width: 310px;
    }

    .activities-table th:nth-child(5),
    .activities-table td:nth-child(5) {
        width: 290px;
        min-width: 290px;
    }
    
    .actions-group {
        min-width: 270px;
    }
}

/* === RESPONSIVO MOBILE === */
@media (max-width: 768px) {
    .controls-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .controls-title {
        text-align: center;
        font-size: 16px;
    }

    .controls-buttons {
        justify-content: center;
        gap: 8px;
        flex-wrap: wrap;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-row:first-child {
        grid-template-columns: 1fr;
    }

    .form-row:first-child .form-group:first-child {
        grid-column: 1;
    }

    .filter-controls {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .filter-group.search-group {
        grid-column: 1;
    }

    .search-input {
        max-width: 100%;
        font-size: 16px;
    }

    .btn-clear {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }

    .activity-stats {
        gap: 8px;
        margin-bottom: 15px;
    }

    .stat-card {
        padding: 8px 6px;
        min-width: 60px;
        flex: 1 1 calc(33.333% - 6px);
    }

    .stat-number {
        font-size: 16px;
        margin-bottom: 1px;
    }

    .stat-label {
        font-size: 9px;
        letter-spacing: 0.1px;
        line-height: 1.1;
    }

    .day-activities {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        margin: 5px 0;
        background: white;
        padding-bottom: 5px;
    }

    /* === TABELA MOBILE OTIMIZADA === */
    .activities-table {
        min-width: 850px !important;
        width: 850px !important;
        font-size: 0.8rem;
        table-layout: fixed;
    }

    /* Larguras móveis otimizadas - DESCRIÇÃO PRIVILEGIADA */
    .activities-table th:nth-child(1),
    .activities-table td:nth-child(1) {
        width: 80px;
        min-width: 80px;
    }

    .activities-table th:nth-child(2),
    .activities-table td:nth-child(2) {
        width: 90px;
        min-width: 90px;
    }

    .activities-table th:nth-child(3),
    .activities-table td:nth-child(3) {
        width: 100px;
        min-width: 100px;
    }

    .activities-table th:nth-child(4),
    .activities-table td:nth-child(4) {
        width: 310px;
        min-width: 310px;
    }

    .activities-table th:nth-child(5),
    .activities-table td:nth-child(5) {
        width: 270px !important;
        min-width: 270px !important;
    }

    .activities-table th,
    .activities-table td {
        padding: 8px 6px;
        font-size: 0.8rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    /* Célula de ações mobile */
    .actions-cell {
        text-align: center;
        vertical-align: middle;
        overflow: visible;
    }

    /* Grupo de ações mobile compacto */
    .actions-group {
        gap: 4px;
        padding: 2px;
        min-width: 250px;
    }

    /* Status badge mobile */
    .status-badge {
        padding: 3px 6px;
        font-size: 0.65rem;
        margin-bottom: 4px;
        min-width: 70px;
        border-radius: 8px;
    }

    /* Botões de ação em linha mobile */
    .actions-buttons {
        gap: 2px;
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Botões individuais mobile */
    .btn-action {
        padding: 4px 6px;
        font-size: 0.65rem;
        margin: 0;
        min-width: 28px;
        height: 28px;
        border-radius: 4px;
    }

    .btn-action i {
        font-size: 0.7rem;
    }

    /* Botão público mobile */
    .btn-publico {
        padding: 4px 6px;
        min-width: 28px;
        height: 28px;
        font-size: 0.65rem;
    }

    /* Outros elementos mobile */
    .time-cell {
        font-size: 0.75rem;
        word-break: keep-all;
    }

    .type-badge {
        padding: 2px 6px;
        font-size: 0.7rem;
        white-space: nowrap;
    }

    .local-cell {
        font-size: 0.75rem;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .description-cell {
        font-size: 0.75rem;
        line-height: 1.3;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .description-preview {
        font-size: 0.75rem;
        line-height: 1.3;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .expand-icon {
        font-size: 0.7rem;
        margin-left: 5px;
    }

    /* Melhorar scrollbar mobile */
    .day-activities::-webkit-scrollbar {
        height: 8px;
    }

    .day-activities::-webkit-scrollbar-track {
        background: #f1f5f9;
        border-radius: 4px;
        margin: 0 10px;
    }

    .day-activities::-webkit-scrollbar-thumb {
        background: #94a3b8;
        border-radius: 4px;
    }

    .day-activities::-webkit-scrollbar-thumb:hover {
        background: #64748b;
    }

    /* Indicador de scroll */
    .day-activities::after {
        content: "← Deslize para ver todas as colunas →";
        display: block;
        text-align: center;
        font-size: 0.7rem;
        color: #64748b;
        padding: 8px 5px 5px 5px;
        background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
        border-top: 1px solid #e2e8f0;
        font-style: italic;
        font-weight: 500;
    }

    .expansion-content {
        padding: 15px;
        margin: 5px;
    }

    .expansion-content h4 {
        font-size: 0.9rem;
    }

    .expansion-content .description-text {
        font-size: 0.8rem;
        line-height: 1.5;
        word-wrap: break-word;
        word-break: break-word;
        overflow-wrap: break-word;
        white-space: pre-wrap;
        hyphens: auto;
    }

    .expansion-content .author-info {
        font-size: 0.8rem;
    }

    .user-info {
        display: none;
    }

    .mobile-toggle {
        display: block;
        margin-left: 0;
    }

    /* Hover/Active em dispositivos touch */
    .btn-action:active {
        transform: scale(0.9);
        opacity: 0.7;
    }

    .btn-publico:active {
        transform: scale(0.9);
        opacity: 0.7;
    }
}

/* === TELAS PEQUENAS (480px) === */
@media (max-width: 480px) {
    .controls-section {
        padding: 12px;
        margin-bottom: 15px;
    }

    .controls-title {
        font-size: 14px;
    }

    .controls-buttons {
        gap: 6px;
    }

    .section {
        padding: 15px 10px;
        margin-bottom: 20px;
    }

    .filter-controls {
        gap: 12px;
        padding: 15px;
    }

    .search-input {
        padding: 10px 12px;
        font-size: 16px;
    }

    .filter-select {
        padding: 10px;
        font-size: 0.9rem;
    }

    .day-header {
        padding: 12px 15px;
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }

    .day-date {
        font-size: 0.95rem;
    }

    .activity-stats {
        gap: 6px;
    }

    .stat-card {
        padding: 6px 4px;
        min-width: 50px;
        flex: 1 1 calc(50% - 3px);
    }

    .stat-number {
        font-size: 14px;
    }

    .stat-label {
        font-size: 8px;
        letter-spacing: 0;
    }

    /* Tabela mais compacta para telas pequenas - DESCRIÇÃO PRIVILEGIADA */
    .activities-table {
        min-width: 750px !important;
        width: 750px !important;
        font-size: 0.75rem;
    }

    .activities-table th:nth-child(1),
    .activities-table td:nth-child(1) {
        width: 70px;
        min-width: 70px;
    }

    .activities-table th:nth-child(2),
    .activities-table td:nth-child(2) {
        width: 80px;
        min-width: 80px;
    }

    .activities-table th:nth-child(3),
    .activities-table td:nth-child(3) {
        width: 90px;
        min-width: 90px;
    }

    .activities-table th:nth-child(4),
    .activities-table td:nth-child(4) {
        width: 280px;
        min-width: 280px;
    }

    .activities-table th:nth-child(5),
    .activities-table td:nth-child(5) {
        width: 230px !important;
        min-width: 230px !important;
    }

    .activities-table th,
    .activities-table td {
        padding: 6px 4px;
        font-size: 0.75rem;
    }

    /* Botões ainda menores para telas pequenas */
    .btn-action,
    .btn-publico {
        min-width: 24px;
        height: 24px;
        padding: 2px 4px;
        font-size: 0.6rem;
    }

    .btn-action i {
        font-size: 0.65rem;
    }

    .status-badge {
        font-size: 0.6rem;
        padding: 2px 5px;
        min-width: 60px;
    }

    .actions-group {
        min-width: 210px;
    }

    .time-cell {
        font-size: 0.7rem;
    }

    .type-badge {
        padding: 1px 4px;
        font-size: 0.65rem;
    }

    .local-cell {
        font-size: 0.7rem;
    }

    .description-cell,
    .description-preview {
        font-size: 0.7rem;
        line-height: 1.2;
    }

    .expand-icon {
        font-size: 0.65rem;
        margin-left: 3px;
    }

    .expansion-content {
        padding: 12px 8px;
        margin: 3px;
    }

    .expansion-content h4 {
        font-size: 0.85rem;
        margin-bottom: 8px;
    }

    .expansion-content .description-text {
        font-size: 0.75rem;
        line-height: 1.4;
        margin-bottom: 10px;
    }

    .expansion-content .author-info {
        font-size: 0.7rem;
    }
}

/* === TELAS MUITO PEQUENAS (320px) === */
@media (max-width: 320px) {
    .activities-table {
        min-width: 650px !important;
        width: 650px !important;
    }

    .activities-table th:nth-child(1),
    .activities-table td:nth-child(1) {
        width: 60px;
        min-width: 60px;
    }

    .activities-table th:nth-child(2),
    .activities-table td:nth-child(2) {
        width: 70px;
        min-width: 70px;
    }

    .activities-table th:nth-child(3),
    .activities-table td:nth-child(3) {
        width: 80px;
        min-width: 80px;
    }

    .activities-table th:nth-child(4),
    .activities-table td:nth-child(4) {
        width: 260px;
        min-width: 260px;
    }

    .activities-table th:nth-child(5),
    .activities-table td:nth-child(5) {
        width: 180px !important;
        min-width: 180px !important;
    }

    .btn-action,
    .btn-publico {
        min-width: 22px;
        height: 22px;
        padding: 1px 3px;
        font-size: 0.55rem;
    }

    .btn-action i {
        font-size: 0.6rem;
    }

    .status-badge {
        min-width: 55px;
        font-size: 0.55rem;
        padding: 1px 4px;
    }

    .actions-group {
        min-width: 160px;
    }

    .stat-card {
        flex: 1 1 100%;
        margin-bottom: 4px;
    }
}

/* === ESTILOS PARA ARQUIVADOS === */
.archived-section {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    border: 2px solid #d1d5db;
    border-radius: 12px;
    margin-top: 20px;
}

.archived-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.archived-info {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 12px;
    color: #92400e;
}

.archived-stats {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.archived-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-width: 120px;
}

.archived-stat .stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: #6b7280;
}

.archived-stat .stat-label {
    font-size: 0.9rem;
    color: #9ca3af;
    text-align: center;
}

.archived-actions {
    display: flex;
    justify-content: center;
}

.archived-group .day-header {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
}

.archived-table {
    background: #f9fafb;
}

.archived-row {
    background: white;
    border-left: 4px solid #9ca3af;
}

.archived-row.compartilhada {
    border-left-color: #8b5cf6;
}

.archived-row.propria {
    border-left-color: #10b981;
}

.type-badges {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.origin-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.origin-badge.propria {
    background: #d1fae5;
    color: #065f46;
}

.origin-badge.compartilhada {
    background: #ede9fe;
    color: #5b21b6;
}

.shared-info {
    font-size: 0.8rem;
    color: #8b5cf6;
    margin-top: 4px;
}

.archive-date-cell {
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
}

.btn-restore {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.btn-restore:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
}

.btn-delete-permanent {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.btn-delete-permanent:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
}

.archived-no-results {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

.archived-no-results i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #9ca3af;
}

/* === ESTILOS MELHORADOS PARA COMPARTILHAMENTO === */
.shared-stat {
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    border: 2px solid #8b5cf6;
}

.shared-stat .stat-number {
    color: #5b21b6;
}

.shared-stat .stat-label {
    color: #6d28d9;
}

.activity-row.compartilhada {
    background: linear-gradient(135deg, #faf5ff, #f3e8ff);
    border-left: 4px solid #8b5cf6;
}

.shared-badge {
    background: #8b5cf6;
    color: white;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 8px;
    text-transform: uppercase;
}

.compartilhamento-info {
    background: #f3e8ff;
    border: 1px solid #8b5cf6;
    border-radius: 6px;
    padding: 8px;
    margin-top: 8px;
    font-size: 0.85rem;
    color: #5b21b6;
}

.compartilhamento-info i {
    margin-right: 6px;
}

/* === ESTILOS PARA LOCAL EXTERNO === */
#localExternoRow {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 200px;
    }
}

.input-help {
    display: block;
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 8px;
    font-style: italic;
    line-height: 1.4;
}

.input-help i {
    margin-right: 5px;
    color: #9ca3af;
}

#localExterno {
    border-left: 4px solid #10b981;
    background: #f0fdf4;
    font-size: 1rem;
    padding: 12px 15px;
    line-height: 1.5;
}

#localExterno:focus {
    border-left-color: #059669;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

#localExternoRow .form-group label {
    color: #059669;
    font-weight: 600;
    font-size: 1rem;
}

#localExterno::placeholder {
    color: #9ca3af;
    font-style: italic;
    font-size: 0.95rem;
}

#localExternoRow {
    background: linear-gradient(135deg, rgba(240, 253, 244, 0.5), rgba(220, 252, 231, 0.3));
    border-radius: 8px;
    padding: 15px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    margin-top: 10px;
}

#localExternoRow .form-group {
    margin-bottom: 0;
}

/* === RESPONSIVIDADE FINAL === */
@media (max-width: 768px) {
    .archived-stats {
        flex-direction: column;
        align-items: center;
    }

    .archived-stat {
        min-width: 200px;
    }

    #localExterno {
        font-size: 16px;
        padding: 14px 12px;
    }

    .input-help {
        font-size: 0.75rem;
        margin-top: 6px;
    }

    #localExterno::placeholder {
        font-size: 14px;
    }
}



