/* Base styles and reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #F0F2F5;
    color: #1F2937;
}

/* WebSocket Status Indicator */
.ws-status {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: white;
    border-radius: 20px;
    padding: 8px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.ws-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.ws-indicator i {
    font-size: 10px;
    transition: color 0.3s ease;
}

.ws-indicator.connected i {
    color: #10B981;
    animation: pulse 2s infinite;
}

.ws-indicator.connecting i {
    color: #F59E0B;
    animation: blink 1s infinite;
}

.ws-indicator.disconnected i {
    color: #EF4444;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes blink {
    0%, 50%, 100% {
        opacity: 1;
    }
    25%, 75% {
        opacity: 0.3;
    }
}

/* Mobile adjustments for WebSocket indicator */
@media (max-width: 768px) {
    .ws-status {
        top: 10px;
        right: 10px;
        padding: 6px 12px;
    }
    
    .ws-indicator {
        font-size: 12px;
    }
    
    .ws-indicator span {
        display: none; /* Hide text on mobile, show only icon */
    }
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Desktop sidebar styles (will be hidden on mobile) */
.sidebar {
    width: 250px;
    background-color: #1F2937;
    color: #F9FAFB;
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 20;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid #374151;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
}

.sidebar-menu li {
    padding: 10px 20px;
    margin-bottom: 5px;
    border-radius: 6px;
    margin-left: 10px;
    margin-right: 10px;
    transition: all 0.2s ease;
}

.sidebar-menu li:hover {
    background-color: #374151;
}

.sidebar-menu li.active {
    background-color: #2563EB;
}

.sidebar-menu a {
    color: #F9FAFB;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.sidebar-menu a i {
    margin-right: 10px;
    width: 20px;
}

/* Main content styles */
.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 30px;
    padding-bottom: 80px; /* Space for mobile bottom tabs */
}

/* Header styles */
.header {
    background-color: #FFFFFF;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.header:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
}

.subtitle {
    font-size: 16px;
    color: #6B7280;
}

.refresh-button {
    background: none;
    border: none;
    color: #2563EB;
    cursor: pointer;
    font-size: 18px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.refresh-button:hover {
    background-color: rgba(37, 99, 235, 0.1);
}

/* Filters styles */
.filters-container, .class-filters-container {
    background-color: #FFFFFF;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.filters-container:hover, .class-filters-container:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.filter-buttons, .class-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-button {
    background-color: #F3F4F6;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-button:hover {
    background-color: #E5E7EB;
}

.filter-button.active {
    background-color: #2563EB;
    color: #FFFFFF;
    border-color: #2563EB;
}


/*estio de texto da contagem*/
.filtered-count-text {
    text-align: center;
    margin-top: 10px;
    font-weight: bold;
    color: #374151;
}


.class-filter-button {
    background-color: #F3F4F6;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

.class-filter-button:hover {
    background-color: #E5E7EB;
}

.class-filter-button.active {
    background-color: #2563EB;
    color: #FFFFFF;
    border-color: #2563EB;
}

/* Records list */
.records-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    animation: fadeIn 0.5s ease;
}

.record-card {
    background-color: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.record-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.record-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background-color: #2563EB;
    transition: height 0.3s ease;
}

.record-card:hover::before {
    height: 100%;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.student-card {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.photo-container {
    margin-right: 15px;
}

.student-photo {
    width: 60px;
    height: 60px;
    background-color: #E5E7EB;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #9CA3AF;
    overflow: hidden;
}

.student-info {
    flex: 1;
}

.student-name {
    font-weight: 600;
    font-size: 18px;
    color: #111827;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.student-class {
    font-size: 14px;
    color: #6B7280;
}

.controls-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
}

/* Presence container styles */
.presence-container {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
    width: 100%;
}

.presence-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.presence-button:hover {
    background-color: #e5e7eb;
}

.presence-button.active {
    background-color: #059669;
    border-color: #047857;
    color: white;
    box-shadow: 0 4px 6px rgba(5, 150, 105, 0.25);
}

.presence-button:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.presence-button:active:before {
    width: 300px;
    height: 300px;
}

.presence-button i {
    margin-right: 8px;
    font-size: 16px;
}

.meal-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.meal-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #F3F4F6;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 12px 10px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 45px;
    position: relative;
    overflow: hidden;
}

.meal-button:hover {
    background-color: #E5E7EB;
}

.meal-button.active {
    background-color: #10B981;
    color: #FFFFFF;
    border-color: #10B981;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.25);
}

.meal-button:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.meal-button:active:before {
    width: 300px;
    height: 300px;
}

.meal-button i {
    margin-right: 8px;
    font-size: 16px;
}

.hours-container {
    display: flex;
    align-items: center;
    background-color: #F9FAFB;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
}

.hours-container i {
    color: #6B7280;
    margin-right: 8px;
    font-size: 16px;
}

.hours-label {
    color: #4B5563;
    font-weight: 500;
    margin-right: auto;
    font-size: 14px;
}

.hours-controls {
    display: flex;
    align-items: center;
}

.hours-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: #6B7280;
}

.hours-button:hover {
    background-color: #E5E7EB;
    color: #111827;
}

.hours-value {
    width: 30px;
    text-align: center;
    font-weight: 600;
    color: #111827;
    font-size: 16px;
}

.empty-container {
    display: flex;
    justify-content: center;
    padding: 40px;
    background-color: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    grid-column: 1 / -1;
}

.empty-container p {
    color: #6B7280;
    font-size: 16px;
}

/* Mobile bottom tabs (hidden on desktop) */
.mobile-tabs {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #FFFFFF;
    border-top: 1px solid #E5E7EB;
    z-index: 30;
    height: 64px; /* Aumentado para dar mais espaço */
    box-shadow: 0 -2px 5px rgba(0,0,0,0.05);
}

.mobile-tabs-menu {
    display: flex;
    justify-content: space-evenly; /* Alterado para space-evenly para distribuir melhor */
    align-items: center;
    height: 100%;
    padding: 0;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
    position: relative;
}

.mobile-tabs-menu::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #E5E7EB;
}

.mobile-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    color: #4B5563; /* Cor mais escura para melhor contraste */
    text-decoration: none;
    font-size: 10px;
    padding: 5px 0;
    min-width: 0; /* Para permitir encolhimento dentro do flex */
    touch-action: manipulation; /* Melhora resposta de toque */
    -webkit-tap-highlight-color: transparent; /* Remove destaque ao tocar (Android) */
    position: relative; /* Para posicionamento dos elementos internos */
    width: 25%; /* Define largura fixa para cada item */
    box-sizing: border-box;
    margin: 0; /* Remove margens laterais */
}

.mobile-tab.active {
    color: #2563EB;
    position: relative;
    font-weight: 500;
}

.mobile-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 30%;
    right: 30%;
    height: 3px;
    background-color: #2563EB;
    border-radius: 3px 3px 0 0;
}

.mobile-tab i {
    font-size: 24px; /* Aumentei o tamanho do ícone */
    margin-bottom: 4px;
    display: block;
    text-align: center;
    width: 100%;
}

.mobile-tab span {
    line-height: 1.2;
    text-align: center;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 10px;
    display: block;
}

/* Modal styles */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal {
    background-color: #FFFFFF;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-header {
    padding: 16px;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.close-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: #6B7280;
    padding: 5px 10px;
    border-radius: 4px;
    position: relative;
    z-index: 200; /* Garantir que esteja em uma camada superior */
}

.close-button:hover {
    background-color: #F3F4F6;
    color: #EF4444;
}

.close-button:active {
    background-color: #E5E7EB;
}

.modal-content {
    padding: 16px;
    max-height: 400px;
    overflow-y: auto;
}

.form-group {
    margin-bottom: 16px;
}

.label {
    display: block;
    font-size: 14px;
    color: #6B7280;
    margin-bottom: 6px;
}

.input {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
}

.modal-actions {
    padding: 16px;
    border-top: 1px solid #E5E7EB;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.cancel-button {
    padding: 10px 16px;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    background-color: #FFFFFF;
    color: #6B7280;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    z-index: 200; /* Garantir que esteja em uma camada superior */
}

.cancel-button:hover {
    background-color: #F3F4F6;
}

.cancel-button:active {
    background-color: #E5E7EB;
}

.save-button {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    background-color: #2563EB;
    color: #FFFFFF;
    font-weight: 600;
    cursor: pointer;
}/* Students page styles */
.add-button {
    background-color: #2563EB;
    color: #FFFFFF;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.search-container {
    display: flex;
    align-items: center;
    background-color: #FFFFFF;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
}

.search-container i {
    color: #6B7280;
    margin-right: 10px;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
}

.student-item {
    position: relative;
}

.student-actions {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 8px;
}

.edit-button, .delete-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.edit-button i {
    color: #2563EB;
}

.delete-button i {
    color: #EF4444;
}

/* Calendar page styles */
.calendar-container {
    background-color: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 16px;
    margin-bottom: 16px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.calendar-title {
    font-size: 18px;
    font-weight: 600;
}

.calendar-navigation {
    display: flex;
    gap: 8px;
}

.calendar-nav-button {
    background: none;
    border: 1px solid #E5E7EB;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
}

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

.calendar-table th {
    padding: 8px;
    text-align: center;
    font-weight: 600;
    color: #6B7280;
}

.calendar-table td {
    padding: 8px;
    text-align: center;
    height: 40px;
    cursor: pointer;
    border-radius: 4px;
}

.calendar-day {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.calendar-day.other-month {
    color: #D1D5DB;
}

.calendar-day.today {
    background-color: #DBEAFE;
    font-weight: 600;
}

.calendar-day.selected {
    background-color: #2563EB;
    color: #FFFFFF;
    font-weight: 600;
}

.calendar-day-status {
    display: flex;
    gap: 2px;
    margin-top: 4px;
}

.status-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
}

.status-dot.lunch {
    background-color: #16A34A;
}

.status-dot.dinner {
    background-color: #EA580C;
}

.daily-summary {
    background-color: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 16px;
}

.summary-header {
    margin-bottom: 16px;
}

.summary-title {
    font-size: 18px;
    font-weight: 600;
}

.summary-date {
    color: #6B7280;
    font-size: 14px;
}

.summary-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    background-color: #FFFFFF;
    border-radius: 12px;
    padding: 20px;
    flex: 1;
    min-width: 160px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-item:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    transition: all 0.3s ease;
}

/* Cores para os diferentes tipos de estatísticas */
.stat-item:nth-child(1)::before {
    background-color: #059669; /* Verde para presenças */
}

.stat-item:nth-child(2)::before {
    background-color: #2563EB; /* Azul para almoços */
}

.stat-item:nth-child(3)::before {
    background-color: #7C3AED; /* Roxo para jantares */
}

.stat-item:nth-child(4)::before {
    background-color: #F59E0B; /* Amarelo para total de refeições */
}

.stat-item:nth-child(5)::before {
    background-color: #DC2626; /* Vermelho para horas extras */
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

/* Cores para os valores */
.stat-item:nth-child(1) .stat-value {
    color: #059669;
}

.stat-item:nth-child(2) .stat-value {
    color: #2563EB;
}

.stat-item:nth-child(3) .stat-value {
    color: #7C3AED;
}

.stat-item:nth-child(4) .stat-value {
    color: #F59E0B;
}

.stat-item:nth-child(5) .stat-value {
    color: #DC2626;
}

.stat-label {
    color: #6B7280;
    font-size: 14px;
    font-weight: 500;
}/* Report page styles */
.report-controls {
    background-color: #FFFFFF;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.month-selector, .year-selector {
    display: flex;
    align-items: center;
}

.month-selector label, .year-selector label {
    margin-right: 8px;
    font-size: 14px;
    color: #6B7280;
}

.month-select, .year-input {
    padding: 8px;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    font-size: 14px;
}

.generate-button, .export-button, .export-sheet-button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.generate-button:hover, .export-button:hover, .export-sheet-button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.generate-button:active, .export-button:active, .export-sheet-button:active {
    transform: translateY(0);
}

.generate-button {
    background-color: #2563EB;
    color: #FFFFFF;
}

.export-button {
    background-color: #10B981;
    color: #FFFFFF;
}

.export-sheet-button {
    background-color: #8B5CF6;
    color: #FFFFFF;
}

.monthly-summary {
    background-color: #FFFFFF;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
}

.report-table-container {
    background-color: #FFFFFF;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #FFFFFF;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.report-table th, .report-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #E5E7EB;
}

.report-table th {
    font-weight: 600;
    color: #111827;
    background-color: #F9FAFB;
    position: sticky;
    top: 0;
    z-index: 1;
}

.report-table td {
    color: #374151;
}

/* Estilo para colunas numéricas nos relatórios */
.report-table td:nth-child(3),
.report-table td:nth-child(4),
.report-table td:nth-child(5),
.report-table td:nth-child(6),
.report-table td:nth-child(7) {
    text-align: center;
}

/* Cores diferenciadas para os totais */
.report-table td:nth-child(3) {
    color: #059669;  /* Verde para presenças */
    font-weight: 600;
}

.report-table td:nth-child(4) {
    color: #2563EB;  /* Azul para almoços */
}

.report-table td:nth-child(5) {
    color: #7C3AED;  /* Roxo para jantares */
}

.report-table td:nth-child(6) {
    color: #F59E0B;  /* Amarelo para total de refeições */
    font-weight: 600;
}

.report-table td:nth-child(7) {
    color: #DC2626;  /* Vermelho para horas extras */
}

.report-table tr:hover {
    background-color: #F9FAFB;
}

/* Remover estilos para as opções de papel */
.paper-options {
    display: none;
}

.paper-options h3,
.paper-options-container,
.paper-option,
.paper-option input[type="radio"],
.paper-option label {
    display: none;
}

/* Estilos para o botão de exportação para planilha */
.export-sheet-button {
    background-color: #4285F4;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 14px;
    transition: background-color 0.3s;
    font-weight: 500;
}

.export-sheet-button:hover {
    background-color: #3367D6;
}

.export-sheet-button i {
    margin-right: 8px;
}

/* Responsivo para dispositivos móveis */
@media (max-width: 768px) {
    .report-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .export-sheet-button, .generate-button {
        width: 100%;
        justify-content: center;
        margin-top: 5px;
    }
}

/* Mobile Responsive styles */
@media (max-width: 768px) {
    .app-container {
        display: block;
    }
    
    .sidebar {
        display: none; /* Hide sidebar on mobile */
    }
    
    .main-content {
        margin-left: 0;
        padding: 10px;
        padding-bottom: 80px; /* Aumentado para espaço suficiente acima da navbar */
    }
    
    .mobile-tabs {
        display: flex; /* Show bottom tabs on mobile */
    }
    
    .header {
        padding: 15px;
    }
    
    .search-container {
        padding: 10px 12px;
    }
    
    .search-input {
        font-size: 14px;
    }
    
    .filters-container,
    .class-filters-container {
        padding: 15px;
    }
    
    .filter-buttons,
    .class-filter-buttons {
        justify-content: center;
    }
    
    .meal-controls {
        flex-direction: column;
    }
    
    .meal-button {
        width: 100%;
    }
    
    .report-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .month-selector, .year-selector {
        width: 100%;
    }
    
    .generate-button, .export-button, .export-sheet-button {
        width: 100%;
        justify-content: center;
    }
    
    .summary-stats {
        flex-wrap: wrap;
    }
}

/* iPhone specific styles for exact RN look and feel */
@media (max-width: 428px) {
    body {
        font-size: 14px;
    }
    
    .record-card,
    .student-card {
        border-radius: 8px;
        margin-left: 10px;
        margin-right: 10px;
    }
    
    .search-container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 20px;
    }
    
    .subtitle {
        font-size: 14px;
    }
    
    .filter-button,
    .class-filter-button {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .hours-container {
        flex-wrap: wrap;
        font-size: 13px;
    }
    
    .calendar-table th {
        font-size: 12px;
    }
    
    .report-table th, .report-table td {
        padding: 8px;
        font-size: 12px;
    }
}

/* Android specific adjustments */
@media (max-width: 380px) {
    .mobile-tab {
        padding: 4px 0 3px;
    }
    
    .mobile-tab i {
        font-size: 20px;
        margin-bottom: 2px;
    }
    
    .mobile-tab span {
        font-size: 9px;
    }
    
    .mobile-tabs {
        height: 58px;
    }
    
    .main-content {
        padding-bottom: 75px;
    }
}

/* Ajustes específicos para telas muito pequenas */
@media (max-width: 320px) {
    .mobile-tabs {
        height: 56px;
    }
    
    .mobile-tab {
        padding: 2px 0;
    }
    
    .mobile-tab i {
        font-size: 20px;
        margin-bottom: 2px;
    }
    
    .mobile-tab span {
        font-size: 9px;
    }
    
    .main-content {
        padding-bottom: 70px;
    }
}

/* Status de conexão */
.connection-status {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #f44336;
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    z-index: 1000;
    max-width: 80%;
    transition: all 0.3s ease;
}

.connection-status.hidden {
    display: none;
}

.connection-status span {
    flex: 1;
    margin-right: 10px;
    font-size: 14px;
}

.retry-button {
    background-color: transparent;
    border: 1px solid white;
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.retry-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.retry-button i {
    font-size: 14px;
}

/* Animação para o botão de reconexão */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.retry-button.spinning i {
    animation: spin 1s linear infinite;
}

.hidden {
    display: none !important;
}

/* Media queries para desktop */
@media (min-width: 1200px) {
    .records-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1600px) {
    .records-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1920px) {
    .records-list {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Layout para desktop */
@media (min-width: 992px) {
    .filters-section {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        margin-bottom: 20px;
    }
    
    .filters-container, .class-filters-container {
        margin-bottom: 0;
    }
}

.date-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-selector {
    position: relative;
}

.date-input {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    font-size: 14px;
    color: #374151;
    background-color: #F9FAFB;
    cursor: pointer;
    transition: all 0.3s ease;
}

.date-input:hover {
    border-color: #D1D5DB;
}

.date-input:focus {
    outline: none;
    border-color: #2563EB;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.today-button {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    background-color: #F9FAFB;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.today-button:hover {
    background-color: #E5E7EB;
}

.today-button i {
    font-size: 16px;
    color: #2563EB;
}

.summary-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.edit-day-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background-color: #2563EB;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.edit-day-button:hover {
    background-color: #1D4ED8;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.3);
}

.edit-day-button:active {
    transform: translateY(0);
}

.edit-day-button i {
    font-size: 16px;
}

/* Sistema de notificações */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    width: 320px;
    max-width: 90%;
}

.notification {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    padding: 15px;
    transform: translateX(120%);
    transition: transform 0.3s ease-out;
    display: flex;
    align-items: flex-start;
    overflow: hidden;
    position: relative;
}

.notification.show {
    transform: translateX(0);
}

.notification-icon {
    margin-right: 12px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 16px;
}

.notification-message {
    color: #555;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
}

.notification-close {
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    margin-left: 10px;
}

.notification-close:hover {
    color: #555;
}

.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background-color: rgba(0, 0, 0, 0.1);
    width: 100%;
}

.notification-progress-bar {
    height: 100%;
    width: 100%;
    transform-origin: left;
    animation: progress 5s linear forwards;
}

.notification.success .notification-icon {
    color: #4CAF50;
}

.notification.success .notification-progress-bar {
    background-color: #4CAF50;
}

.notification.error .notification-icon {
    color: #F44336;
}

.notification.error .notification-progress-bar {
    background-color: #F44336;
}

.notification.info .notification-icon {
    color: #2196F3;
}

.notification.info .notification-progress-bar {
    background-color: #2196F3;
}

.notification.warning .notification-icon {
    color: #FF9800;
}

.notification.warning .notification-progress-bar {
    background-color: #FF9800;
}

@keyframes progress {
    0% {
        transform: scaleX(1);
    }
    100% {
        transform: scaleX(0);
    }
}

/* Enhanced Form Styling */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="file"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    background-color: #f9fafb;
    color: #1f2937;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-group input[type="text"]:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
    background-color: #fff;
}

.form-group input[type="text"]::placeholder {
    color: #9ca3af;
    opacity: 0.7;
}

/* File input styling */
.form-group input[type="file"] {
    padding: 10px;
    background-color: white;
    cursor: pointer;
}

.form-group input[type="file"]::-webkit-file-upload-button {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    margin-right: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.form-group input[type="file"]::-webkit-file-upload-button:hover {
    background-color: #2563eb;
}

/* Photo preview styling */
.photo-preview {
    margin-top: 12px;
    text-align: center;
}

.preview-container {
    display: inline-block;
    position: relative;
    margin: 0 auto;
}

.photo-preview img {
    border: 2px solid #e5e7eb;
    padding: 3px;
    border-radius: 50%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 120px;
    max-height: 120px;
    transition: transform 0.3s ease;
}

.photo-preview img:hover {
    transform: scale(1.05);
}

.preview-loading {
    padding: 15px;
    color: #6b7280;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.preview-loading i {
    font-size: 1.5rem;
    color: #3b82f6;
}

.btn-link {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    margin: 8px auto 0;
    padding: 5px 10px;
    text-decoration: none;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-link:hover {
    color: #dc2626;
    background-color: rgba(239, 68, 68, 0.1);
}

/* Modal styling */
.modal {
    background-color: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
    background-color: #f9fafb;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.modal-content {
    padding: 24px;
}

.modal-actions {
    padding: 16px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid #e5e7eb;
    background-color: #f9fafb;
}

.cancel-button, .save-button {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.cancel-button {
    background-color: #f3f4f6;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

.cancel-button:hover {
    background-color: #e5e7eb;
}

.save-button {
    background-color: #3b82f6;
    color: white;
}

.save-button:hover {
    background-color: #2563eb;
}

.close-button {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.close-button:hover {
    background-color: #e5e7eb;
    color: #1f2937;
}

/* Add required field indicator */
.form-group label::after {
    content: "*";
    color: #ef4444;
    margin-left: 4px;
}

.form-group label[for="student-photo"]::after,
.form-group label[for="student-photo-file"]::after {
    content: "";
}

/* Custom file upload styling */
.file-upload-container {
    position: relative;
    margin-top: 8px;
}

.file-upload-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #3b82f6;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    text-align: center;
    margin-bottom: 5px;
}

.file-upload-button:hover {
    background-color: #2563eb;
}

.file-name-display {
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 5px;
}

/* Firefox specific styling */
@-moz-document url-prefix() {
    .form-group input[type="file"] {
        padding: 8px;
    }
}

/* Mobile responsiveness for the form */
@media (max-width: 576px) {
    .form-group label {
        font-size: 0.9rem;
    }
    
    .form-group input[type="text"],
    .form-group input[type="file"] {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
    
    .photo-preview img {
        max-width: 100px;
        max-height: 100px;
    }
    
    .modal-content {
        padding: 16px;
    }
    
    .modal-actions {
        padding: 12px 16px;
    }
}

/* Filters Section */
.filters-section {
    margin-bottom: 20px;
}

.search-container {
    display: flex;
    align-items: center;
    background-color: #FFFFFF;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.search-container:focus-within {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #3b82f6;
}

.search-container i {
    color: #6B7280;
    margin-right: 10px;
    font-size: 1.1rem;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    background-color: transparent;
}

.search-input::placeholder {
    color: #9ca3af;
}