* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
}

header h1 {
    margin-bottom: 20px;
    font-size: 28px;
}

nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-nav {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-nav.active {
    background: white;
    color: #667eea;
}

.page {
    display: none;
    padding: 30px;
    animation: fadeIn 0.3s;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* CALENDÁRIO */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.calendar-header h2 {
    font-size: 24px;
    color: #333;
}

.btn-nav-month {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-nav-month:hover {
    background: #5568d3;
    transform: scale(1.05);
}

.legenda {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.legenda-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legenda-cor {
    width: 30px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.calendario {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.dia-semana {
    text-align: center;
    font-weight: bold;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #666;
}

.dia {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 10px;
    min-height: 120px;
    background: white;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.dia:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.dia.vazio {
    background: #f8f9fa;
    cursor: default;
}

.dia.vazio:hover {
    transform: none;
    box-shadow: none;
}

.dia.sabado {
    background: #fff3cd;
}

.dia.domingo {
    background: #d1ecf1;
}

.dia.feriado {
    background: #f8d7da;
}

.dia-numero {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 8px;
    color: #333;
}

.dia-info {
    font-size: 11px;
    line-height: 1.4;
}

.empresa-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    margin: 2px 0;
    font-size: 10px;
    font-weight: 600;
    color: white;
}

.horario {
    font-weight: bold;
    color: #666;
    margin-top: 5px;
}

/* TOOLTIP */
.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 15px;
    border-radius: 8px;
    z-index: 1000;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    font-size: 13px;
    line-height: 1.6;
    display: none;
}

.tooltip h4 {
    margin-bottom: 10px;
    color: #ffd700;
}

.tooltip .turno {
    margin: 10px 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

/* PÁGINAS DE GERENCIAMENTO */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.page-header h2 {
    color: #333;
    font-size: 24px;
}

.btn-primary {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-edit {
    background: #ffc107;
    color: #000;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
    margin-right: 5px;
}

.btn-edit:hover {
    background: #e0a800;
}

.lista-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card h3 {
    margin-bottom: 10px;
    color: #333;
    font-size: 18px;
}

.card p {
    color: #666;
    margin-bottom: 15px;
}

.card-actions {
    display: flex;
    gap: 10px;
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #333;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
}

/* RESPONSIVO */
@media (max-width: 768px) {
    .calendario {
        grid-template-columns: repeat(7, 1fr);
        gap: 5px;
    }
    
    .dia {
        min-height: 80px;
        padding: 5px;
        font-size: 11px;
    }
    
    .dia-numero {
        font-size: 14px;
    }
    
    .lista-cards {
        grid-template-columns: 1fr;
    }
    
    .calendar-header {
        flex-direction: column;
    }
    
    nav {
        flex-direction: column;
    }
    
    .btn-nav {
        width: 100%;
    }
}