/* Estilos generales */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
}

h1, h2 {
    color: #333;
    text-align: center;
}

.container {
    max-width: 1920px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form input, .form select, .form button {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

.form button {
    background-color: #28a745;
    color: #fff;
    cursor: pointer;
    border: none;
}

.form button:hover {
    background-color: #218838;
}

.menu ul {
    list-style-type: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.menu ul li a {
    display: block;
    padding: 10px;
    background-color: #007bff;
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
}

.menu ul li a:hover {
    background-color: #0056b3;
}

.navbar {
    background-color: #333;
}

.navbar a {
    float: left;
    display: block;
    color: #f2f2f2;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
}

.navbar a:hover {
    background-color: #ddd;
    color: black;
}

footer {
    text-align: center;
    padding: 20px;
    background-color: #333;
    color: #fff;
    margin-top: 20px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.table th, .table td {
    padding: 10px;
    border: 1px solid #ccc;
    text-align: left;
}

.table th {
    background-color: #007bff;
    color: #fff;
}

.table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.table tr:hover {
    background-color: #f1f1f1;
}

/* Estilos para el contenedor de inicio de sesión */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f4f4f4;
}

.login-box {
    background-color: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-box h1 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
}

.login-box input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

.login-box button {
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
}

.login-box button:hover {
    background-color: #0056b3;
}

.register-link {
    margin-top: 15px;
    font-size: 14px;
    color: #666;
}

.register-link a {
    color: #007bff;
    text-decoration: none;
}

.register-link a:hover {
    text-decoration: underline;
}

.register-box {
    display: none;
    margin-top: 20px;
}

.register-box h2 {
    margin-bottom: 20px;
    font-size: 20px;
    color: #333;
}

.btn {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.btn-success {
    color: #fff;
    background-color: #28a745;
    border-color: #28a745;
}

.btn-warning {
    color: #212529;
    background-color: #ffc107;
    border-color: #ffc107;
}

.btn-danger {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    background-color: #197adb;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.05);
}

.card {
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.card-body {
    padding: 20px;
}

.table-responsive {
    overflow-x: auto;
}

.filtros {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
}

.form-row {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.form-group {
    flex: 1;
}

.form-control {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.chart-container {
    position: relative;
    height: 400px;
    margin-top: 20px;
}

@media print {
    body {
        padding: 0;
        background: white;
    }
    .chart-container {
        height: auto !important;
    }
}

/* Estilos para el calendario */
.calendar {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.calendar th, .calendar td {
    border: 1px solid #ddd;
    padding: 10px;
    vertical-align: top;
    height: 100px;
    width: 14.28%; /* Para 7 columnas iguales */
}

.calendar th {
    background-color: #f2f2f2;
    text-align: center;
}

.calendar-day {
    height: 100%;
    position: relative;
}

.day-number {
    font-weight: bold;
    margin-bottom: 5px;
}

.visita-item {
    background-color: #e3f2fd;
    border-left: 3px solid #2196f3;
    padding: 3px;
    margin: 2px 0;
    font-size: 12px;
    border-radius: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.visita-item:hover {
    background-color: #bbdefb;
    cursor: pointer;
}

.today {
    background-color: #fffde7;
}

.calendar-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    align-items: center;
}

.current-month {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
}

.small-btn {
    padding: 2px 5px;
    font-size: 12px;
}

/* Estilos para el formulario rápido */
.add-visita-form {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #eee;
}

.add-visita-form .form-row {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.add-visita-form .form-group {
    flex: 1;
}

.add-visita-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.add-visita-form input, 
.add-visita-form select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.navbar a[href*="calendario.php"] {
    background-color: #e3f2fd;
    color: #0d47a1;
    font-weight: bold;
}

/* Estilos para el chat */
.chat-container {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    scroll-behavior: smooth;
}

/* Efectos para mensajes */
.alert-light {
    border-left: 4px solid #6c757d;
}

.alert-info {
    border-left: 4px solid #0dcaf0;
}

/* Responsive */
@media (max-width: 768px) {
    .chat-container {
        height: 50vh !important;
    }
    
    .w-75 {
        width: 90% !important;
    }
}