/* BLINDAGEM CSS NUCLEAR */
#lumus-agenda-wrapper {
    all: initial;
    display: block;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background-color: #F5EFE6;
    font-family: 'Segoe UI', Roboto, sans-serif;
    box-sizing: border-box;
    padding: 40px;
    min-height: 100vh;
}

#lumus-agenda-wrapper * {
    box-sizing: border-box;
    font-family: inherit;
}

.la-container {
    max-width: 1800px;
    margin: 0 auto;
    width: 100%;
}

/* HEADER */
.la-header {
    text-align: center;
    margin-bottom: 50px;
}

.la-header h1 {
    color: #1D4A91;
    font-size: 3rem;
    font-weight: 800;
    margin: 0 0 10px;
}

.la-header p {
    color: #666;
    font-size: 1.2rem;
    margin: 0;
}

/* GRID (7 COLUNAS) */
.la-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(200px, 1fr));
    gap: 20px;
    width: 100%;
    margin-bottom: 60px;
    overflow-x: auto;
    padding-bottom: 20px;
}

.la-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.la-day-header {
    background: #1D4A91;
    color: white;
    text-align: center;
    padding: 15px;
    border-radius: 10px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.la-day-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 550px;
}

/* SLOTS */
.la-slot {
    min-height: 130px;
    background: rgba(255, 255, 255, 0.5);
    border: 2px dashed #D1C4B0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
    flex: 1;
}

.la-slot.drag-over {
    background: #eef4ff;
    border-color: #1D4A91;
    border-style: solid;
}

/* BOTÃO ADICIONAR */
.la-empty-btn {
    font-size: 2.5rem;
    color: #D1C4B0;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    transition: all 0.2s;
}

.la-empty-btn:hover {
    color: #1D4A91;
    transform: scale(1.15);
}

/* CARD PREENCHIDO */
.la-card {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    padding: 15px;
    color: white;
    cursor: grab;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.la-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.la-card:active {
    cursor: grabbing;
}

.la-card.done {
    opacity: 0.5;
    filter: grayscale(0.8);
}

.la-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    margin-bottom: 8px;
    gap: 5px;
}

.la-pill {
    background: rgba(0, 0, 0, 0.25);
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: bold;
}

.la-pill-tipo {
    background: rgba(255, 255, 255, 0.25);
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.7rem;
}

.la-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.la-mat-title {
    display: block;
    font-size: 1.1rem;
    line-height: 1.2;
    margin-bottom: 4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    font-weight: 700;
}

.la-macro-text {
    font-size: 0.9rem;
    opacity: 0.9;
    display: block;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* AÇÕES DO CARD */
.la-card-actions {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.la-card:hover .la-card-actions {
    opacity: 1;
}

.la-btn-icon {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: white;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.la-btn-icon:hover {
    transform: scale(1.1);
}

.la-btn-icon svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

.btn-check {
    background: #28a745;
    color: white;
}

.btn-check:hover {
    background: #20c997;
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.btn-del {
    background: #dc3545;
    color: white;
}

.btn-del:hover {
    background: #e74c3c;
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

/* RESUMO POR MATÉRIA */
.la-summary {
    background: white;
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 50px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.la-summary h2 {
    color: #1D4A91;
    font-size: 1.8rem;
    margin: 0 0 30px;
    font-weight: 700;
}

.la-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.la-summary-card {
    background: #f9f9f9;
    border-left: 4px solid #1D4A91;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.2s;
}

.la-summary-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.la-mat-name {
    display: block;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.la-mat-hours {
    display: block;
    font-size: 2rem;
    font-weight: 800;
}

/* MÓDULOS DISPONÍVEIS */
.la-modulos {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

.la-modulos h2 {
    color: #1D4A91;
    font-size: 1.8rem;
    margin: 0 0 30px;
    font-weight: 700;
}

.la-modulos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.la-modulo-card {
    background: white;
    border: 2px solid #f0f0f0;
    border-top: 4px solid #1D4A91;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.la-modulo-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
    border-color: #1D4A91;
}

.la-modulo-card h3 {
    margin: 0 0 10px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1D4A91;
}

.la-modulo-descricao {
    color: #999;
    font-size: 0.85rem;
    margin: 10px 0 0;
}

/* BOTÃO ADICIONAR MÓDULO */
.la-add-modulo {
    background: linear-gradient(135deg, #1D4A91 0%, #153a72 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(29, 74, 145, 0.2);
    display: inline-block;
    margin-top: 10px;
}

.la-add-modulo:hover {
    background: linear-gradient(135deg, #153a72 0%, #0f2a54 100%);
    box-shadow: 0 6px 16px rgba(29, 74, 145, 0.35);
    transform: translateY(-2px);
}

.la-add-modulo:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(29, 74, 145, 0.2);
}

/* MODAL */
.la-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.la-modal-overlay.visible {
    display: flex;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.la-modal-box {
    background: white;
    width: 90%;
    max-width: 450px;
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.la-close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    line-height: 1;
    padding: 0;
    transition: all 0.2s;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.la-close-modal:hover {
    color: #333;
    background: #f5f5f5;
    border-radius: 50%;
}

.la-modal-box h2 {
    color: #1D4A91;
    margin: 0 0 25px;
    font-size: 1.8rem;
    font-weight: 700;
}

.la-modal-box label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 1rem;
}

.la-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.2s;
    background: white;
    color: #333;
}

.la-input:focus {
    outline: none;
    border-color: #1D4A91;
    box-shadow: 0 0 0 4px rgba(29, 74, 145, 0.1);
}

.la-input:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.la-input option {
    color: #333;
    background: white;
}

.la-duracao-options {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.dur-opt {
    flex: 1;
    text-align: center;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    background: white;
    color: #333;
}

.dur-opt:hover {
    border-color: #1D4A91;
    background: #f5f9ff;
}

.dur-opt.selected {
    background: #1D4A91;
    color: white;
    border-color: #1D4A91;
    box-shadow: 0 4px 12px rgba(29, 74, 145, 0.2);
}

.la-btn-save {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #1D4A91 0%, #153a72 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(29, 74, 145, 0.2);
}

.la-btn-save:hover:not(:disabled) {
    background: linear-gradient(135deg, #153a72 0%, #0f2a54 100%);
    box-shadow: 0 6px 16px rgba(29, 74, 145, 0.35);
    transform: translateY(-2px);
}

.la-btn-save:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(29, 74, 145, 0.2);
}

.la-btn-save:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}

/* LOGIN MESSAGE */
.la-login-msg {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 1.1rem;
}

/* SCROLLBAR CUSTOMIZADO */
#lumus-agenda-wrapper ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#lumus-agenda-wrapper ::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#lumus-agenda-wrapper ::-webkit-scrollbar-thumb {
    background: #1D4A91;
    border-radius: 10px;
}

#lumus-agenda-wrapper ::-webkit-scrollbar-thumb:hover {
    background: #153a72;
}

/* RESPONSIVE */
@media (max-width: 1400px) {
    .la-grid {
        grid-template-columns: repeat(5, minmax(150px, 1fr));
    }
}

@media (max-width: 1024px) {
    .la-grid {
        grid-template-columns: repeat(4, minmax(140px, 1fr));
    }
    .la-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    #lumus-agenda-wrapper {
        padding: 20px;
    }
    .la-grid {
        grid-template-columns: repeat(2, minmax(100px, 1fr));
        gap: 10px;
        margin-bottom: 40px;
    }
    .la-header h1 {
        font-size: 1.5rem;
    }
    .la-header p {
        font-size: 0.95rem;
    }
    .la-modulos-grid,
    .la-summary-grid {
        grid-template-columns: 1fr;
    }
    .la-modal-box {
        width: 95%;
        padding: 25px;
    }
    .la-day-body {
        min-height: 400px;
    }
    .la-slot {
        min-height: 100px;
    }
}


/* --- CSS para os Botões Específicos (Atualizado para fixar cores) --- */

/* 1. BOTÃO ADICIONAR (+) NO SLOT */
.la-empty-btn {
    font-size: 2.5rem;
    color: #D1C4B0 !important; /* Bege escuro (inativo) */
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none !important; /* Garante que não tenha fundo */
    border: none !important; /* Garante que não tenha borda */
    padding: 0;
    transition: all 0.3s ease;
    border-radius: 12px;
}

.la-slot:hover .la-empty-btn {
    color: #1D4A91 !important; /* Azul Lumus no hover */
    background-color: rgba(29, 74, 145, 0.05) !important; /* Fundo azul bem clarinho */
    transform: scale(1.1);
}

/* 2. BOTÃO SALVAR (NO MODAL) */
.la-btn-save {
    width: 100%;
    padding: 14px;
    background: #1D4A91 !important; /* Azul Lumus Sólido */
    color: white !important;
    border: none !important; /* Garante que não tenha borda */
    border-radius: 8px;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(29, 74, 145, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.la-btn-save:hover {
    background: #153a72 !important; /* Azul mais escuro */
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(29, 74, 145, 0.3);
}

.la-btn-save:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(29, 74, 145, 0.2);
}

/* 3. BOTÕES DE AÇÃO NO CARD (Check e Lixo) */
.la-btn-icon {
    width: 32px;
    height: 32px;
    border: none !important; /* Garante que não tenha borda */
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9) !important;
    color: #1D4A91 !important; /* Ícone Azul por padrão */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    backdrop-filter: blur(4px);
}

.la-btn-icon:hover {
    transform: scale(1.1);
}

/* Botão Check (Concluir) */
.btn-check:hover {
    background: #28a745 !important; /* Verde Sucesso */
    color: white !important;
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

/* Botão Lixo (Excluir) */
.btn-del:hover {
    background: #dc3545 !important; /* Vermelho Erro */
    color: white !important;
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

/* Ajuste do Ícone SVG dentro do botão */
.la-btn-icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5px;
}

/* 4. BOTÃO DE FECHAR MODAL (X) */
.la-close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    background: none !important; /* Garante sem fundo */
    border: none !important; /* Garante sem borda */
    cursor: pointer;
    color: #9CA3AF !important; /* Cinza suave */
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}
.la-close-modal:hover {
    color: #dc3545 !important; /* Vermelho (cor de "fechar" é comum) */
    background: rgba(220, 53, 69, 0.1) !important; /* Fundo vermelho suave */
    border-radius: 50%; /* Faz um círculo no hover */
}