/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #065f46 0%, #047857 25%, #059669 50%, #10b981 75%, #34d399 100%);
    min-height: 100vh;
    color: #1a202c;
    line-height: 1.6;
    position: relative;
    padding-top: 30px; /* Espaço no teto do site */
}

/* Media query para impressão - fundo branco e texto preto */
@media print {
    @page {
        size: landscape;
    }
    * {
        -webkit-print-color-adjust: exact !important;
        /* color-adjust: exact !important; */
        print-color-adjust: exact !important;
    }

    body {
        background: white !important;
        color: #000000 !important;
        font-size: 11pt !important;
        line-height: 1.3 !important;
        margin: 0 !important;
        padding: 10px !important;
    }

    .container {
        background: white !important;
        color: #000000 !important;
        border: none !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 0 !important;
        backdrop-filter: none !important;
    }

    .header {
        background: white !important;
        color: #000000 !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 10px !important;
        margin-bottom: 15px !important;
    }

    /* Todos os textos em preto */
    h1, h2, h3, h4, h5, h6, p, span, div, label, th, td, a, li, 
    .header-text h1, .department, .planning-title-header, .ue-label, 
    .day-name, .calculated-date, .signature-label, .observation-title,
    .observation-day, .observation-date, .bimestre-text, .date-text,
    .planning-header h2, .observations-label {
        color: #000000 !important;
        background: none !important;
        -webkit-text-fill-color: #000000 !important;
        text-shadow: none !important;
        background-clip: unset !important;
        -webkit-background-clip: unset !important;
    }

    /* Tabela minimalista */
.planning-table {
	border-collapse: collapse !important;
	border: none !important; /* Remover borda da tabela principal */
	background: white !important;
	width: 100% !important;
}

.planning-table th, .planning-table td {
	border: 1px solid #cccccc !important; /* Borda cinza clara para células */
	background: white !important;
	color: #000000 !important;
	padding: 4px !important;
	font-size: 9pt !important;
	line-height: 1.2 !important;
}

.table-header-row {
	page-break-before: always !important; /* Quebra de seção antes de table-header-row */
}

.table-header-row th {
	background: #f5f5f5 !important;
	color: #000000 !important;
	font-weight: bold !important;
	text-align: center !important;
}

    .day-header-cell, .column-header-cell {
        background: #f5f5f5 !important;
        color: #000000 !important;
        border: 1px solid #cccccc !important; /* Borda cinza clara */
    }

    /* Textareas e inputs */
.observations-textarea, .daily-observation-textarea {
	background: white !important;
	color: #000000 !important;
	border: 1px solid #e0e0e0 !important; /* Borda cinza bem claro */
	border-radius: 0 !important;
	font-size: 9pt !important;
	padding: 2px !important;
}

    /* Caixas de seleção com borda transparente */
.ue-select, .info-select, .bimestre-selector select, .week-date-input, .largura-select, #classe-select, #turma-select, #professor-select, select, input[type="checkbox"] {
	background: white !important;
	color: #000000 !important;
	border: none !important; /* Borda transparente para caixas de seleção e inputs */
	border-radius: 0 !important;
	font-size: 9pt !important;
	padding: 2px !important;
}

    /* Itens selecionados */
    .selected-item {
        background: #f0f0f0 !important;
        color: #000000 !important;
        border: 1px solid #cccccc !important; /* Borda cinza clara */
        border-radius: 0 !important;
        font-size: 8pt !important;
        padding: 1px 3px !important;
        margin: 1px !important;
    }

    /* Ocultar elementos desnecessários */
    .speech-to-text-button, .btn-pdf, .ad-card, .cell-edit-icon, 
    .column-edit-icon, .image-card, .loading-overlay, .notification {
        display: none !important;
    }

    /* Linha de assinatura */
    .signature-line {
        border-bottom: 1px solid #cccccc !important; /* Borda cinza clara */
        background: none !important;
    }

    /* Ajustes de layout para impressão */
    .main-container {
        max-width: none !important;
        padding: 0 !important;
    }

    .planning-row.fade-in {
        border: 1px solid #cccccc !important;
    }

    .planning-table-container {
        background: white !important;
        padding: 5px !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        margin: 10px 0 !important;
    }

    .table-wrapper {
        border: 1px solid #cccccc !important;
    }

    .observations-section, .daily-observations-section, .signature-section {
        background-color: #ffffff !important; /* Fundo branco */
        border: 1px solid #cccccc !important; /* Borda cinza clara */
        padding: 15px !important;
        margin-top: 20px !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }

    /* Aplicar estilos de texto escuro para todos os elementos dentro dessas seções */
    .observations-section *, .daily-observations-section *, .signature-section * {
        color: #000000 !important; /* Fontes escuras */
        background-color: transparent !important;
    }

    .observation-row {
        border: 1px solid #cccccc !important;
    }

    /* Garantir que textareas dentro dessas seções também tenham fundo branco e texto escuro */
    .observations-textarea, .daily-observation-textarea {
        background-color: #ffffff !important;
        color: #000000 !important;
        border: 1px solid #cccccc !important; /* Borda cinza clara */
    }

    /* Quebras de página */
    .signature-section {
        page-break-inside: avoid !important;
    }

    /* Remover gradientes e efeitos visuais */
    .header, .table-header-row, .day-header-cell, .column-header-cell {
        background: white !important;
        background-image: none !important;
    }
}

/* Container principal com cards laterais */
.main-container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.container {
    max-width: 1200px;
    margin: 15px auto 0 auto; /* Adiciona 30px de margem superior e centraliza */
    padding: 15px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

.largura-select{
    width: 62px;
    border: none;
}

#largura-select{
    width: 62px;
    border: none;
}


/* Cards de Propaganda */
.ad-card {
    position: fixed;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border: 2px solid rgba(34, 197, 94, 0.2);
}

.ad-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border-color: rgba(34, 197, 94, 0.4);
}

.ad-card a {
    text-decoration: none;
    color: inherit;
    display: block;
    text-align: center;
}

.ad-card img {
    width: 100px;
    height: 100px;
    margin-left: -12px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 12px;
    transition: transform 0.3s ease;
}

.ad-card:hover img {
    transform: scale(1.05);
}

.ad-card p {
    font-size: 0.5rem;
    font-weight: 500;
    color: #1e293b;
    line-height: 1.4;
}

/* Posicionamento dos cards */
.ad-left-top {
    top: 120px;
    left: 10px;
    width: 110px;
    height: 180px;
}

.ad-left-bottom {
    bottom: 120px;
    left: 10px;
    width: 110px;
    height: 180px;
}

.ad-right-top {
    top: 120px;
    right: 10px;
    width: 110px;
    height: 180px;
}

.ad-right-bottom {
    bottom: 120px;
    right: 10px;
    width: 110px;
    height: 180px;
}

/* Cabeçalho totalmente responsivo */
.header {
    background: linear-gradient(135deg, #064e3b 0%, #065f46 50%, #047857 100%);
    color: white;
    padding: clamp(15px, 4vw, 30px);
    border-radius: clamp(8px, 2vw, 15px);
    margin-bottom: clamp(15px, 4vw, 30px);
    box-shadow: 0 clamp(5px, 2vw, 10px) clamp(15px, 4vw, 30px) rgba(0, 0, 0, 0.15);
}

.header-content {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: clamp(10px, 3vw, 20px);
}

.header-text {
    flex: 1;
    min-width: clamp(200px, 50vw, 300px);
}

.header-text h1 {
    font-size: clamp(0.9rem, 3.5vw, 2.6rem);
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #d1fae5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: clamp(3px, 1.5vw, 10px);
    line-height: 1.2;
}

.department {
    font-size: clamp(0.7rem, 2.8vw, 1.8rem);
    font-weight: 600;
    color: #a7f3d0;
    margin-bottom: clamp(8px, 2.5vw, 20px);
    line-height: 1.3;
}

.planning-title-header {
    font-size: clamp(0.6rem, 2.4vw, 1.5rem);
    font-weight: 600;
    color: #d1fae5;
    margin-bottom: clamp(8px, 2.5vw, 20px);
    line-height: 1.3;
}

.image-card {
    position: relative;
    width: clamp(120px, 25vw, 180px);
    height: clamp(120px, 25vw, 180px);
    border-radius: clamp(8px, 2vw, 15px);
    overflow: hidden;
    box-shadow: 0 clamp(5px, 2vw, 10px) clamp(12px, 3vw, 25px) rgba(0, 0, 0, 0.2);
    border: clamp(2px, 0.5vw, 3px) solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

@media (max-width: 768px) {

    .bimestre-select{
    min-width: 72px;
    font-size: 18px;
    padding: 4px;
    }

    .header-content {
        flex-direction: column;
        align-items: center;
    }

    .image-card {
        order: -1; /* Garante que a imagem seja sempre o primeiro elemento */
        margin-bottom: 20px;
    }

    .header-text {
        text-align: center;
    }

    .header-text h1 {
        font-size: 2.1rem; /* Reduz o tamanho da fonte do título principal */
    }

    .department {
        font-size: 1.4rem; /* Reduz o tamanho da fonte do departamento */
    }

    .ue-section {
        align-items: center;
        width: 100%;
    }

    .ue-label {
        text-align: center;
    }

    .ue-select {
        width: 100%;
        max-width: 504px; /* Aumentado 4px (era 500px, agora 504px) */
        font-size: 2.5rem; /* Mesmo tamanho da palavra PREFEITURA MUNICIPAL DE CARAPICUIBA */
        font-weight: bold; /* Mantém negrito */
        color: white; /* Fonte branca para fundo verde */
        padding: 5px 14px; /* Aumentado 4px na largura (era 10px, agora 14px) */
    }

    .header-info-grid {
        justify-content: center;
        width: 100%;
    }

    .info-group-row {
        flex-direction: column;
        width: 100%;
        align-items: center;
    }

    .info-item {
        width: 100%;
        max-width: 500px; /* Largura adequada para tablets */
        align-items: center;
    }

    .info-item label {
        text-align: center;
    }

    #classe-select, #turma-select, #professor-select {
        width: 100%;
        max-width: 480px; /* Aumentado 4px (era 500px, agora 504px) */
        font-size: 1.5rem; /* Mesmo tamanho da palavra PREFEITURA MUNICIPAL DE CARAPICUIBA */
        font-weight: bold; /* Mantém negrito */
        color: white; /* Fonte branca para fundo verde */
        /* padding: 8px 12px; Aumentado 4px na largura (era 12px, agora 16px) */
    }

    .full-width {
        width: 100%;
    }


    #observations-text{
        min-width: 90%;
    }
}

@media (max-width: 480px) {

    .bimestre-select{
    min-width: 72px;
    font-size: 18px;
    padding: 4px;
    }

    .header {
        padding: 20px; /* Reduz o padding do cabeçalho em telas muito pequenas */
    }

    .header-text h1 {
        font-size: 1.9rem;
    }

    .department {
        font-size: 1.1rem;
    }

        #observations-text{
        min-width: 90%;
    }

    .ue-select, #classe-select, #turma-select, #professor-select {
        font-size: 2.5rem; /* Mesmo tamanho da palavra PREFEITURA MUNICIPAL DE CARAPICUIBA */
        font-weight: bold; /* Mantém negrito */
        color: white; /* Fonte branca para fundo verde */
        /* padding: 3px 12px; Aumentado 4px na largura (era 8px, agora 12px) */
        max-width: 354px; /* Aumentado 4px (era 350px, agora 354px) */
    }
}

.title-with-date {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;
}

.header-text h1 {
    font-size: 1.6rem;
    /* font-weight: 700; */
    background: linear-gradient(135deg, #ffffff 0%, #d1fae5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 30px;
}

.department {
    font-size: 1.3rem;
    font-weight: 500;
    color: #a7f3d0;
    margin-bottom: 20px;
}

/* Seção U.E. totalmente responsiva */
.ue-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(3px, 1vw, 5px);
    margin-bottom: clamp(10px, 3vw, 20px);
    width: 100%;
}

.ue-label {
    font-weight: 600;
    color: #d1fae5;
    font-size: clamp(0.5rem, 2vw, 1.2rem);
    margin-left: 0;
    text-align: center;
    line-height: 1.2;
}

.ue-select {
    padding: clamp(2px, 0.8vw, 5px) clamp(6px, 1.5vw, 16px);
    border: none;
    border-radius: clamp(3px, 0.8vw, 8px);
    font-size: clamp(0.8rem, 3.2vw, 2.5rem);
    font-weight: bold;
    width: 100%;
    max-width: clamp(250px, 70vw, 604px);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    line-height: 1.2;
}

.header-info-grid {
    margin-top: clamp(10px, 3vw, 20px);
    display: flex;
    flex-direction: column;
    gap: clamp(5px, 2vw, 10px);
}

.info-group-row {
    display: flex;
    gap: clamp(8px, 2vw, 15px);
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-start;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: clamp(3px, 1vw, 5px);
    flex: 1 1 auto;
    min-width: clamp(120px, 30vw, 150px);
}

.info-item label {
    font-weight: 600;
    color: #d1fae5;
    font-size: clamp(0.7rem, 2.5vw, 1.2rem);
}

.info-select {
    padding: clamp(4px, 1vw, 8px) clamp(8px, 2vw, 16px);
    border: none;
    border-radius: clamp(3px, 0.8vw, 6px);
    font-size: clamp(0.8rem, 3vw, 1.5rem);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    width: 100%;
}

.ue-select:focus {
    outline: none;
    border-color: #34d399;
    box-shadow: 0 0 0 3px rgba(52, 211, 193, 0.2);
}

.ue-select option {
    background: #064e3b;
    color: white;
}

.date-range-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.end-date {
    font-size: 1.1rem;
    font-weight: 600;
    color: #14532d; /* Verde escuro */
    background: rgba(52, 211, 153, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
}

.week-date-input {
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    font-size: 1.4rem;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.1);
    color: #14532d; /* Verde escuro */
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.week-date-input:focus {
    outline: none;
    border-color: #34d399;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2);
}

.subtitle {
    font-size: 1rem;
    color: #a7f3d0;
    font-weight: 500;
    margin-bottom: 15px;
}

/* Novas seções do cabeçalho */
.header-selection {
    margin: 20px 0;
}

.header-select {
    width: 100%;
    /* padding: 12px 15px; */
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.header-select:focus {
    outline: none;
    border-color: #34d399;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2);
}

.header-select option {
    background: #064e3b;
    color: white;
}

.header-info-grid {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-group-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-start; /* Alinhamento à esquerda por padrão */
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1 1 auto; /* Permite que os itens cresçam e encolham */
    min-width: 150px; /* Largura mínima para evitar que fiquem muito pequenos */
}

.info-item label {
    font-weight: 600;
    /* color: #d1fae5;.date-text */
    font-size: 1.2rem;
}

.info-select {
    padding: 8px 16px; /* Aumentado 4px na largura (era 12px, agora 16px) */
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    font-size: 2.5rem; /* Mesmo tamanho da palavra PREFEITURA MUNICIPAL DE CARAPICUIBA */
    /* font-weight: bold; Negrito adicionado */
    background: rgba(255, 255, 255, 0.1);
    color: white; /* Fonte branca para fundo verde */
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    width: 100%; /* Garante que o select ocupe a largura total do seu info-item */
}

/* Ajustes específicos para cada select - Removidos para flexibilidade */
#classe-select, #turma-select, #professor-select {
    width: 100%; /* Garante que o select ocupe a largura total do seu info-item */
    /* font-weight: bold; Negrito adicionado */
    font-size: 1.1rem; /* Mesmo tamanho da palavra PREFEITURA MUNICIPAL DE CARAPICUIBA */
    color: white; /* Fonte branca para fundo verde */
    /* padding: 8px 16px; Aumentado 4px na largura (era 12px, agora 16px) */
}

.info-select:focus {
    outline: none;
    border-color: #34d399;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2);
}

.info-select option {
    background: #064e3b;
    color: white;
}

.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-card:hover img {
    transform: scale(1.05);
}

.image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
}

.image-placeholder i {
    font-size: 3rem;
    margin-bottom: 10px;
}

/* Tabela de Planejamento */
.planning-table-container {
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
    margin-top: 25px;
    overflow: hidden;
}

.planning-title-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
    gap: 15px;
}

.planning-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.planning-header h2 {
    font-size: 1.8rem;
    color: #1e293b;
    font-weight: 700;
}

.bimestre-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bimestre-selector select {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    background: #f0fdf4;
    color: #14532d;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bimestre-selector select:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.bimestre-text {
    font-size: 1rem;
    color: #1e293b;
}

.table-wrapper {
    overflow-x: auto;
    padding-bottom: 15px;
    border: 1px solid #cccccc;
}

.planning-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.planning-table th,
.planning-table td {
    border: 1px solid #e5e7eb;
    padding: 12px 15px;
    text-align: left;
    vertical-align: top; /* Alinhamento superior */
    width: 16.67%; /* Largura igual para todas as colunas */
}

/* Coluna de data com largura específica */
.planning-table th:first-child,
.planning-table td:first-child {
    width: 12%; /* Largura menor para a coluna de data */
    min-width: 120px; /* Largura mínima para mostrar a data */
}

.planning-table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.planning-table .day-label {
    font-weight: 600;
    color: #1f2937;
    font-size: 1rem;
    margin-bottom: 5px;
}

.planning-table .calculated-date {
    font-size: 0.65rem;
    color: #6b7280;
}

/* Estilos para o ícone de lápis e o select com hover */
.select-container {
    position: relative;
    min-height: 50px; /* Ajuste conforme necessário */
    display: flex;
    align-items: center;
    justify-content: center;
}

.select-icon {
    background-color: #059669; /* Verde escuro */
    color: white;
    border-radius: 50%;
    width: 24px; /* Reduzido de 30px para 24px */
    height: 24px; /* Reduzido de 30px para 24px */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem; /* Reduzido de 0.8rem para 0.7rem */
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1;
}

.select-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.select-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.planning-table .planning-select {
    flex-shrink: 0;
    width: 100%;
    padding: 6px 8px;
    border: 2px solid #bbf7d0;
    border-radius: 6px;
    font-size: 0.75rem;
    background: #f0fdf4;
    color: #14532d;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns=\'http://www.w3.org/2000/svg\' fill=\'none\' viewBox=\'0 0 20 20\'%3e%3cpath stroke=\'%2314532d\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'1.5\' d=\'m6 8 4 4 4-4\'%3e%3c/svg%3e");
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 35px;
}

.planning-table .planning-select:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.planning-table .selected-text {
    margin-top: 8px;
    font-size: 0.85rem;
    color: #374151;
    padding: 6px 8px;
    background-color: #f3f4f6;
    border-radius: 4px;
    white-space: pre-wrap; /* Para quebras de linha */
    border-left: 3px solid #059669;
    min-height: 20px;
}

.planning-table .selected-items {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
    min-height: 20px;
}

.planning-table .selected-item {
    background-color: #dcfce7; /* Verde claro */
    color: #14532d; /* Verde escuro */
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 0.65rem; /* Tamanho pequeno */
    border: none;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-weight: 500;
}

.planning-table .selected-item:hover {
    background-color: #bbf7d0; /* Verde claro mais escuro no hover */
    color: #065f46; /* Verde mais escuro no hover */
}

.planning-table .edit-button {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 0.9rem;
    margin-left: 8px;
    transition: color 0.2s ease;
}

.planning-table .edit-button:hover {
    color: #3b82f6;
}

/* Observações Diárias */
.daily-observations-section {
    margin-top: 30px;
    padding: 25px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.daily-observation-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.daily-observation-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.daily-observation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.daily-observation-header .day-name {
    font-weight: 700;
    color: #14532d; /* Verde escuro */
    font-size: 1.1rem;
}

.daily-observation-header .day-date {
    font-size: 0.9rem;
    color: #6b7280;
}

.daily-observation-textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #cccccc; /* Verde claro */
    border-radius: 8px;
    font-size: 0.9rem;
    color: #1e293b;
    background-color: #f0fdf4; /* Verde bem claro */
    resize: vertical;
    transition: border-color 0.3s ease;
}

.daily-observation-textarea:focus {
    outline: none;
    border-color: #059669; /* Verde mais escuro no foco */
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

/* Seção de Observações Geral */
.observations-section {
    margin-top: 30px;
    padding: 25px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.observations-label {
    font-weight: 700;
    color: #14532d; /* Verde escuro */
    font-size: 1.1rem;
    margin-bottom: 10px;
    display: block;
}

.observations-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 2px solid #bbf7d0; /* Verde claro */
    border-radius: 8px;
    font-size: 1rem;
    color: #1e293b;
    background-color: #f0fdf4; /* Verde bem claro */
    resize: vertical;
    transition: border-color 0.3s ease;
}

.observations-textarea:focus {
    outline: none;
    border-color: #059669; /* Verde mais escuro no foco */
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

/* Seção de Assinaturas */
h1.signature-section {
    margin-top: 30px;
    padding: 25px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.signature-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.signature-item {
    text-align: center;
    flex: 0.3;
    min-width: 200px;
}

.signature-line {
    border-bottom: 2px solid #d1d5db;
    /* margin-bottom: 10px; */
    margin-top: 50px;
}

.signature-label {
    font-size: 0.95rem;
    color: #4b5563;
    font-weight: 500;
    margin-bottom: 70px;
}

/* Botão Gerar PDF */
.pdf-section {
    margin-top: 30px;
    text-align: center;
}

.btn-pdf {
    background-color: #059669; /* Verde principal */
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-pdf:hover {
    background-color: #047857; /* Verde mais escuro no hover */
    transform: translateY(-2px);
}

.btn-pdf:disabled {
    background-color: #a7f3d0; /* Verde claro quando desabilitado */
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: #059669;
    font-size: 1.2rem;
    font-weight: 600;
}

.loading-spinner i {
    font-size: 3rem;
    animation: spin 1.5s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Notificações */
.notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

.notification.success {
    background-color: #10b981; /* Verde sucesso */
}

.notification.error {
    background-color: #ef4444; /* Vermelho erro */
}

.notification.hide {
    opacity: 0;
}

/* Estilos para o botão de voz */
.speech-to-text-button {
    position: absolute;
    right: 10px;
    bottom: 10px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 10;
    transition: background-color 0.2s ease;
}

.speech-to-text-button:hover {
    background-color: #059669;
}

.speech-to-text-button i {
    font-size: 0.9rem;
}



/* Responsividade melhorada para mobile */
@media (max-width: 768px) {
    .planning-table-container {
        padding: 15px;
    }
    
    .planning-table {
        font-size: 0.85rem;
    }
    
    .planning-table th,
    .planning-table td {
        padding: 8px 6px;
        width: auto; /* Remove largura fixa em mobile */
    }
    
    .planning-table th:first-child,
    .planning-table td:first-child {
        width: auto;
        min-width: 100px;
    }
    
    .select-container {
        min-height: 40px;
    }
    
    .select-icon {
        width: 20px;
        height: 20px;
        font-size: 0.6rem;
    }
    
    .planning-select {
        font-size: 0.7rem;
        padding: 4px 6px;
    }
    
    .selected-text {
        font-size: 0.75rem !important;
        padding: 4px 6px !important;
    }
    
    .selected-item {
        font-size: 0.65rem !important;
        padding: 1px 4px !important;
    }
    
    .day-label {
        font-size: 0.9rem !important;
    }
    
    .calculated-date {
        font-size: 0.35rem !important;
    }
}

@media (max-width: 480px) {
    .planning-table th,
    .planning-table td {
        padding: 6px 4px;
    }
    
    .planning-table {
        font-size: 0.8rem;
    }
    
    .select-icon {
        width: 18px;
        height: 18px;
        font-size: 0.55rem;
    }
    
    .planning-select {
        font-size: 0.65rem;
        padding: 3px 5px;
    }
}

/* Melhorias no título do planejamento semestral */
.planning-title-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 20px;
    gap: 15px;
}

.planning-header h2 {
    font-size: 1.8rem;
    color: #1e293b;
    font-weight: 700;
    margin-right: 10px;
}

.date-range-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .planning-title-section {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .planning-header {
        width: 100%;
        justify-content: space-between;
    }
    
    .planning-header h2 {
        font-size: 1.5rem;
    }
    
    .date-range-selector {
        width: 100%;
        justify-content: flex-start;
    }
}


/* Estilos para o novo quadrado de edição na célula */
.cell-content {
    position: relative;
    min-height: 50px; /* Altura mínima para acomodar o quadrado e o conteúdo */
    padding-bottom: 15px; /* Espaço para o quadrado */
}

.cell-edit-square {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 20px; /* Quádruplo do tamanho original (10px * 2) */
    height: 20px; /* Quádruplo do tamanho original (10px * 2) */
    background-color: #059669; /* Verde escuro */
    border-radius: 2px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.selected-item {
    text-align: justify;
}

.cell-edit-square:hover {
    background-color: #34d399; /* Verde mais claro no hover */
}



.selected-item {
    text-align: justify;
}



/* Estilos para container do textarea com microfone */
.textarea-container {
    position: relative;
    display: flex;
    align-items: stretch;
}

.textarea-container .daily-observation-textarea {
    flex: 1;
    padding-right: 45px; /* Espaço para o botão do microfone */
}

/* Estilos para data das observações */
.observation-date {
    color: #14532d; /* Verde escuro */
    font-weight: bold;
}

/* Animação de pulsação para o microfone */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Estilos melhorados para o botão de voz */
.speech-to-text-button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #10b981;
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 10;
    transition: all 0.2s ease;
}

.speech-to-text-button:hover {
    background-color: #059669;
    transform: translateY(-50%) scale(1.05);
}

.speech-to-text-button.recording {
    background-color: #ef4444 !important;
    animation: pulse 1s infinite;
}

.speech-to-text-button i {
    font-size: 1rem;
}



.planning-title-header {
    font-size: 2rem; /* Maior que UNIDADE ESCOLAR (1.2rem) */
    font-weight: 700;
    color: #d1fae5; /* Cor clara para bom contraste com o fundo verde */
    margin-top: 10px;
    margin-bottom: 20px;
    text-align: center; /* Mesmo alinhamento de Secretaria Municipal de Educação */
}

@media (max-width: 768px) {
    .planning-title-header {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .planning-title-header {
        font-size: 1.3rem;
    }
        
    .calculated-date {
        font-size: 0.25rem !important;
    }
}



/* Estilos para o ícone de edição (círculo com lápis) */
.cell-edit-icon {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 24px; /* Tamanho do círculo */
    height: 24px; /* Tamanho do círculo */
    background-color: #10b981; /* Verde */
    border-radius: 50%; /* Transforma em círculo */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem; /* Tamanho do ícone de lápis */
    color: white;
    /* transition: background-color 0.2s ease; */
    z-index: 10;
}

.cell-edit-icon:hover {
    background-color: #059669;
}

/* Alinhamento do conteúdo da caixa de seleção à esquerda */
.select-wrapper {
    text-align: left; /* Alinha o conteúdo da caixa de seleção à esquerda */
}

/* Formatação do bimestre em negrito e visível */
.bimestre-select {
    font-weight: bold !important;
    font-size: 1.2rem !important;
    color: #14532d !important; /* Verde escuro para melhor contraste */
}

/* Formatação das adaptações curriculares */
.observation-label {
    font-size: 0.9rem !important;
    font-weight: bold !important;
}

/* Responsividade milimétrica para o ícone */
@media (max-width: 768px) {
    .cell-edit-icon {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
        bottom: 3px;
        right: 3px;
    }
    
    .bimestre-select {
        font-size: 1.1rem !important;
    }
}

@media (max-width: 480px) {
    .cell-edit-icon {
        width: 18px;
        height: 18px;
        font-size: 0.6rem;
        bottom: 2px;
        right: 2px;
    }
    
    .bimestre-select {
        font-size: 1rem !important;
    }
}

@media (max-width: 360px) {
    .cell-edit-icon {
        width: 16px;
        height: 16px;
        font-size: 0.5rem;
        bottom: 2px;
        right: 2px;
    }
    
    .bimestre-select {
        font-size: 0.9rem !important;
    }
}



/* Estilos para a nova estrutura da tabela */
.day-section {
    margin-bottom: 20px;
}

.planning-table {
    width: 100%;
    border-collapse: collapse;
}

.planning-table th,
.planning-table td {
    text-align: left;
    padding: 10px;
    border: 1px solid #e2e8f0;
}

.planning-table th {
    background-color: #f1f5f9;
}

.day-and-date-cell {
    width: 150px;
}

.content-cell {
    position: relative;
}

.selected-items {
    text-align: left;
}

/* Formatação do bimestre */
.bimestre-select {
    font-weight: bold;
}

/* Formatação das adaptações curriculares */
.observation-label {
    font-size: 0.9rem;
    font-weight: bold;
}





.table-wrapper {
    width: 97%;
    margin: 0 auto; /* Centralizar a tabela */
}

/* Tabela responsiva */
.planning-table {
    width: 100%;
    table-layout: fixed;
    font-size: clamp(0.6rem, 2.2vw, 0.9rem);
}

.planning-table th {
    padding: clamp(4px, 1vw, 8px);
    font-size: clamp(0.7rem, 2.5vw, 1rem);
    font-weight: 600;
    text-align: center;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.planning-table td {
    padding: clamp(2px, 0.5vw, 4px);
    border: 1px solid #e2e8f0;
    vertical-align: top;
    min-height: clamp(40px, 8vw, 60px);
    position: relative;
}

.day-and-date-cell {
    text-align: center;
    font-weight: 600;
    background-color: #f1f5f9;
}

.day-label {
    font-size: clamp(0.6rem, 2vw, 0.8rem);
    font-weight: 700;
    color: #1e293b;
    margin-bottom: clamp(2px, 0.5vw, 4px);
}

.calculated-date {
    font-size: clamp(0.5rem, 1.8vw, 0.7rem);
    color: #64748b;
    font-weight: 500;
}

.planning-table th, .planning-table td {
    width: auto; /* Redefinir a largura para que a tabela se ajuste */
}

.planning-table th:first-child, .planning-table td:first-child {
    width: 10%; /* Largura menor para a primeira coluna */
}



.planning-table th:not(:first-child),
.planning-table td:not(:first-child) {
    width: 18%; /* Aproximadamente (100-10)/5 = 18% para as 5 colunas restantes */
}

.cell-content {
    position: relative;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: clamp(3px, 0.8vw, 6px);
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-size: clamp(0.6rem, 2vw, 0.9rem);
    line-height: 1.3;
}

.selected-items {
    text-align: left;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.selected-item {
    display: inline-block;
    margin: clamp(1px, 0.2vw, 2px);
    padding: clamp(2px, 0.6vw, 4px) clamp(4px, 1.2vw, 8px);
    background-color: #e0f2fe;
    border-radius: clamp(2px, 0.6vw, 4px);
    border: 1px solid #0284c7;
    cursor: pointer;
    font-size: clamp(0.5rem, 1.6vw, 0.8rem);
    transition: all 0.2s ease;
    line-height: 1.2;
}

.selected-item:hover {
    background-color: #fecaca;
    border-color: #dc2626;
}

.select-wrapper {
    position: relative;
    z-index: 10;
}

.planning-select {
    width: 100%;
}




.signature-container {
    display: flex
;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
    margin-top: 30px;

}




/* Botões de gravação de áudio nos textareas - Totalmente responsivos */
.textarea-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.speech-to-text-button {
    position: absolute;
    right: clamp(0.3rem, 1vw, 0.5rem);
    bottom: clamp(0.3rem, 1vw, 0.5rem);
    background-color: #10b981;
    color: white;
    border: none;
    border-radius: 50%;
    width: clamp(1.2rem, 4vw, 2rem);
    height: clamp(1.2rem, 4vw, 2rem);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: clamp(0.5rem, 2vw, 0.8rem);
    transition: all 0.3s ease;
    z-index: 5;
}

.speech-to-text-button:hover {
    background-color: #059669;
    transform: scale(1.1);
}

.speech-to-text-button.recording {
    background-color: #ef4444;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 clamp(5px, 2vw, 10px) rgba(239, 68, 68, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}



/* Estilo específico para o select do bimestre */
.bimestre-selector select {
    padding: 4px 4px;
}


/* Estilos responsivos para as linhas de observação na tabela */
.observation-row {
    background-color: #f8fafc;
}

.observation-cell {
    padding: clamp(8px, 2vw, 15px) !important;
    border: 1px solid #cccccc !important;
}

.daily-observation-container {
    width: 100%;
}

.observation-label {
    display: block;
    font-weight: 600;
    color: #1e293b;
    font-size: clamp(0.7rem, 2.2vw, 0.9rem);
    margin-bottom: clamp(5px, 1.5vw, 8px);
}

.observation-date {
    color: #64748b;
    font-weight: 500;
}

.daily-observation-textarea {
    width: 100%;
    min-height: clamp(60px, 12vw, 80px);
    padding: clamp(6px, 1.5vw, 10px);
    border: 1px solid #cccccc;
    border-radius: clamp(4px, 1vw, 6px);
    font-size: clamp(0.7rem, 2vw, 0.9rem);
    font-family: inherit;
    resize: vertical;
    background-color: white;
    transition: border-color 0.3s ease;
}

.daily-observation-textarea:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 clamp(2px, 0.5vw, 3px) rgba(16, 185, 129, 0.1);
}

.daily-observation-textarea::placeholder {
    color: #9ca3af;
    font-size: clamp(0.6rem, 1.8vw, 0.8rem);
}


.table-header-row th {
    padding: clamp(3px, 0.8vw, 6px);
    font-size: clamp(0.6rem, 1vw, 0.9rem);
    font-weight: 600;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.day-header-cell {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    position: relative;
    color: white;
}

.column-header-cell {
    background: linear-gradient(135deg, #065f46 0%, #047857 100%);
    position: relative;
    color: white;
}

.day-header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(1px, 0.3vw, 2px);
    position: relative;
}

.day-name {
    font-size: clamp(0.6rem, 1.8vw, 0.9rem);
    font-weight: 700;
    color: white;
}

.column-edit-icon {
    position: absolute;
    right: clamp(2px, 0.4vw, 3px);
    top: 50%;
    transform: translateY(-50%);
    background-color: #10b981;
    color: white;
    border-radius: clamp(1px, 0.3vw, 2px);
    width: clamp(0.7rem, 1.5vw, 1rem);
    height: clamp(0.7rem, 1.5vw, 1rem);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: clamp(0.3rem, 0.8vw, 0.5rem);
    transition: all 0.3s ease;
    z-index: 15;
}

.column-edit-icon:hover {
    background-color: #059669;
    transform: translateY(-50%) scale(1.1);
}


/* Seção de planejamento semanal - Responsividade milimétrica */
.planning-section h2 {
    font-size: clamp(0.7rem, 2.8vw, 1.8rem) !important;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: clamp(6px, 2vw, 20px);
    text-align: center;
    line-height: 1.2;
}

.bimestre-selector {
    display: flex;
    align-items: center;
    gap: clamp(4px, 1.2vw, 10px);
    margin-bottom: clamp(6px, 2vw, 15px);
}

.bimestre-text {
    font-size: clamp(0.5rem, 1.8vw, 1rem) !important;
    font-weight: 600;
    color: #374151;
    line-height: 1.2;
}

.bimestre-selector select {
    padding: clamp(1px, 0.4vw, 4px) clamp(2px, 0.6vw, 6px) !important;
    font-size: clamp(0.5rem, 1.6vw, 0.9rem) !important;
    border: 1px solid #cccccc;
    border-radius: clamp(1px, 0.4vw, 4px);
    background-color: white;
    color: #374151;
    cursor: pointer;
    line-height: 1.2;
}

.date-range-selector {
    display: flex;
    align-items: center;
    gap: clamp(3px, 1vw, 8px);
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: clamp(8px, 2.5vw, 20px);
}

.date-text {
    /* font-size: clamp(0.5rem, 1.6vw, 0.9rem) !important; */
    color: #374151;
    font-weight: 500;
    line-height: 1.2;
}

.week-date-input {
    padding: clamp(1px, 0.4vw, 4px) clamp(2px, 0.8vw, 6px) !important;
    font-size: clamp(0.5rem, 1.4vw, 0.8rem) !important;
    border: 1px solid #cccccc;
    border-radius: clamp(1px, 0.4vw, 4px);
    background-color: white;
    line-height: 1.2;
}

.end-date {
    font-size: clamp(0.5rem, 1.4vw, 0.8rem) !important;
    color: #6b7280;
    font-weight: 500;
    padding: clamp(1px, 0.4vw, 4px) clamp(2px, 0.8vw, 6px);
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: clamp(1px, 0.4vw, 4px);
    line-height: 1.2;
}


/* Estilo para a linha de cabeçalho da tabela */
.table-header-row {
    background: linear-gradient(135deg, #065f46 0%, #047857 100%);
    color: white;
}


/* Estilos para a nova formatação da seção de observação */
.observation-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: clamp(8px, 2vw, 15px);
    flex-wrap: wrap;
    gap: clamp(8px, 2vw, 15px);
}

.observation-title {
    font-weight: 700;
    color: #14532d;
    font-size: clamp(0.7rem, 2.5vw, 1.1rem);
    text-align: center;
}

.observation-day-date {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(2px, 0.5vw, 4px);
}

.observation-day {
    font-weight: 600;
    color: #14532d;
    font-size: clamp(0.6rem, 2.2vw, 0.9rem);
    text-align: left;
}

.observation-date {
    color: #14532d;
    font-weight: 500;
    font-size: clamp(0.5rem, 1.8vw, 0.8rem);
    text-align: left;
}

/* Centralizar e tornar responsiva a data da tabela */
.planning-table .calculated-date {
    text-align: center;
    font-size: clamp(0.3rem, 2vw, 0.6rem);
    font-weight: 600;
    color: #374151;
    padding: clamp(4px, 1vw, 8px);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    line-height: 1.2;
}

/* Responsividade para mobile */
@media (max-width: 768px) {
    .observation-header {
        flex-direction: column;
        align-items: center;
        gap: clamp(4px, 1vw, 8px);
    }
    
    .observation-day-date {
        align-items: center;
        text-align: center;
    }
    
    .observation-day,
    .observation-date {
        text-align: center;
    }
}


/* Estilos para o ícone do lápis nas células - posicionado no meio da linha */
.cell-edit-icon {
    position: absolute;
    right: clamp(2px, 0.4vw, 3px);
    /* top: 50%; */
    transform: translateY(-50%);
    padding: clamp(2px, 0.4vw, 3px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #10b981;
    color: white;
    border-radius: clamp(1px, 0.3vw, 2px);
    width: clamp(0.7rem, 1.5vw, 1rem);
    height: clamp(0.7rem, 1.5vw, 1rem);
    font-size: clamp(0.3rem, 0.8vw, 0.5rem);
    /* transition: all 0.3s ease; */
    z-index: 10;
}

.cell-edit-icon:hover {
    background-color: #059669;
    transform: translateY(-50%) scale(1.1);
}

/* Ajustar o conteúdo das células removendo padding right e bottom */
.cell-content {
    position: relative;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: clamp(3px, 0.8vw, 6px);
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-size: clamp(0.6rem, 2vw, 0.9rem);
    line-height: 1.3;
}

.selected-items {
    text-align: left;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.selected-item {
    display: inline-block;
    margin: clamp(1px, 0.2vw, 2px);
    background-color: #e0f2fe;
    border-radius: clamp(2px, 0.6vw, 4px);
    border: 1px solid #0284c7;
    cursor: pointer;
    font-size: clamp(0.5rem, 1.6vw, 0.8rem);
    transition: all 0.2s ease;
    line-height: 1.2;
}

/* Estilo específico para selected-item dentro da tabela de planejamento - 96% da largura */
.planning-table .selected-item {
    display: block;
    width: 96% !important;
    margin: clamp(1px, 0.2vw, 2px) auto;
    padding: clamp(2px, 0.6vw, 4px) clamp(4px, 1.2vw, 8px);
    text-align: left;
    font-size: clamp(0.4rem, 1.2vw, 0.7rem) !important;
    line-height: 1.1 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
    max-width: 96% !important;
    min-width: 96% !important;
    box-sizing: border-box !important;
}

.selected-item:hover {
    background-color: #fecaca;
    border-color: #dc2626;
}


/* Estilos de impressão para melhor contraste e visibilidade */
@media print {
    @page {
        size: landscape;
    }
    /* * {
        -webkit-print-color-adjust: exact !important;
        color-adjust: exact !important;
        print-color-adjust: exact !important;
    } */
    
    body {
        background: white !important;
        color: #000000 !important;
    }
    
    .header-container {
        background: #ffffff !important;
        color: #000000 !important;
        border: 2px solid #000000 !important;
    }
    
    .header-text h1 {
        color: #000000 !important;
        background: none !important;
        -webkit-background-clip: unset !important;
        -webkit-text-fill-color: #000000 !important;
        background-clip: unset !important;
    }
    
    .department {
        color: #000000 !important;
        font-weight: 700 !important;
        font-size: 1.2rem !important;
        text-decoration: underline !important;
        margin-bottom: 15px !important;
    }
    
    .planning-title-header {
        color: #000000 !important;
        font-weight: 700 !important;
    }
    
    .ue-label {
        color: #000000 !important;
        font-weight: 600 !important;
    }
    
    .ue-select {
        background: #ffffff !important;
        color: #000000 !important;
        border: 2px solid #000000 !important;
    }
    
    .table-header-row {
        background: #f0f0f0 !important;
        color: #000000 !important;
    }
    
    .table-header-row th {
        background: #f0f0f0 !important;
        color: #000000 !important;
        border: 2px solid #000000 !important;
        font-weight: 700 !important;
    }
    
    .day-header-cell {
        background: #e0e0e0 !important;
        color: #000000 !important;
        border: 2px solid #000000 !important;
    }
    
    .column-header-cell {
        background: #f0f0f0 !important;
        color: #000000 !important;
        border: 2px solid #000000 !important;
    }
    
    .day-name {
        color: #000000 !important;
        font-weight: 700 !important;
    }
    
    .planning-table {
        border: 2px solid #000000 !important;
    }
    
    .planning-table td,
    .planning-table th {
        border: 1px solid #000000 !important;
        color: #000000 !important;
    }
    
    .calculated-date {
        color: #000000 !important;
        font-weight: 600 !important;
    }
    
    .selected-item {
        background: #f0f0f0 !important;
        color: #000000 !important;
        border: 1px solid #000000 !important;
    }
    
    .observation-title,
    .observation-day,
    .observation-date {
        color: #000000 !important;
        font-weight: 600 !important;
    }
    
    .daily-observation-textarea {
        background: #ffffff !important;
        color: #000000 !important;
        border: 2px solid #000000 !important;
    }
    
    .cell-edit-icon,
    .speech-to-text-button {
        display: none !important;
    }
}

/* Melhorar contraste geral para tela */
.table-header-row {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%) !important;
    color: #ffffff !important;
}

.table-header-row th {
    color: #ffffff !important;
    font-weight: 600 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.day-header-cell {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%) !important;
    color: #ffffff !important;
}

.column-header-cell {
    background: linear-gradient(135deg, #065f46 0%, #047857 100%) !important;
    color: #ffffff !important;
}

.day-name {
    font-weight: 700 !important;
}

/* Melhorar contraste do cabeçalho principal */
.header-text h1 {
    color: #ffffff !important;
    /* text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7); */
    font-weight: 700 !important;
}

.department {
    color: #ffffff !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
    font-weight: 600 !important;
}

.planning-title-header {
    color: #ffffff !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
    font-weight: 600 !important;
}



/* ==========================================================================
   Responsividade para Telas Pequenas (max-width: 360px) - styles.css
   ========================================================================== */
@media (max-width: 360px) {
    
    /* Ajustes no Container Principal */
    .container {
        padding: 10px;
        margin: 10px auto 0 auto;
    }

    /* Ajustes no Cabeçalho */
    .header {
        padding: 10px;
        margin-bottom: 15px;
    }

    .header-content {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .header-text {
        min-width: 100%;
        text-align: center;
    }

    .header-text h1 {
        font-size: 1.5rem; /* Reduzindo o tamanho da fonte principal */
        margin-bottom: 5px;
    }

    .department, .planning-title-header {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    /* Ajustes na Imagem do Cabeçalho */
    .image-card {
        width: 100px;
        height: 100px;
        margin: 0 auto;
    }

    /* Ajustes nos Seletores de Informação do Cabeçalho */
    .header-info-grid {
        display: block; /* Volta para o fluxo normal */
    }

    .info-group-row {
        flex-direction: column;
        gap: 10px;
    }

    .info-item {
        width: 100%;
    }

    .ue-section {
        margin-bottom: 10px;
    }

    /* Ajustes na Tabela de Planejamento */
    .planning-title-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .planning-header {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .planning-header h2 {
        font-size: 1.2rem;
    }

    .bimestre-selector {
        margin-top: 5px;
    }

    .date-range-selector {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        font-size: 0.9rem;
    }

    .week-date-input {
        width: 100%;
        max-width: 200px;
    }

    /* Ajustes na Tabela (para evitar overflow horizontal) */
    .table-wrapper {
        overflow-x: auto; /* Permite rolagem horizontal na tabela */
    }

    .planning-table {
        min-width: 600px; /* Garante que a tabela não fique muito estreita */
    }

    .planning-table th, .planning-table td {
        font-size: 0.7rem;
        padding: 5px;
    }

    /* Ajustes nas Observações */
    .observations-section, .daily-observations-section {
        padding: 10px;
    }

    .observations-textarea, .daily-observation-textarea {
        font-size: 0.9rem;
    }

    /* Ajustes nas Assinaturas */
    .signature-section {
        padding: 10px;
    }

    .signature-container {
        flex-direction: column;
        gap: 20px;
    }

    .signature-item {
        width: 100%;
    }

    /* Ocultar Cards de Propaganda em telas muito pequenas, se eles estiverem visíveis */
    .ad-card {
        display: none !important;
    }
}



/* Estilos para o botão 'Sair' no canto superior direito */
.logout-button-container {
    position: fixed; /* Posicionamento fixo em relação à viewport */
    top: 25px; /* 25px da margem superior da tela */
    right: 25px; /* 25px da margem direita da tela */
    z-index: 10; /* Garante que o botão esteja acima de outros elementos */
}

.btn-logout-top {
    background-color: #ccff00; /* Amarelo fluorescente */
    color: #000000; /* Texto preto para contraste */
    border: none;
    border-radius: 5px;
    padding: 4px 8px;
    font-size: 0.56rem;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(204, 255, 0, 0.8); /* Efeito de iluminação */
    transition: all 0.2s ease-in-out;
}

.btn-logout-top:hover {
    box-shadow: 0 0 15px rgba(204, 255, 0, 1); /* Efeito de iluminação mais forte ao passar o mouse */
    transform: translateY(-2px);
}



