/* Reset básico */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', sans-serif;
}

body {
    background-color: #F7F9FC;
    color: #222;
    line-height: 1.6;
    font-size: 16px;
}

/* Header*/
header {
    background-color: #1F3B73;
    color: white;
    padding: 15px 20px;
}

.contact-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.crm-title {
    font-size: 1.5rem;
    font-weight: bold;
}

/* Contenedor principal */
.container {
     width: 100%;
     padding: 30px; 
}

/* Botones generales */
.primary-btn,
.edit-btn,
.delete-btn,
.secondary-btn,
a.volver-btn {
    padding: 8px 16px;
    margin: 2px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.primary-btn {
    background-color: #5CA9E9;
    color: white;
}

.secondary-btn,
a.volver-btn {
    background-color: #E0E4EA;
    color: #1F3B73;
}

.edit-btn {
    background-color: #4CAF50;
    color: white;
}

.delete-btn {
    background-color: #E74C3C;
    color: white;
}

.primary-btn:hover,
.secondary-btn:hover,
.edit-btn:hover,
.delete-btn:hover,
a.volver-btn:hover {
    opacity: 0.85;
}

/* Login */
body {
    background: #f5f7fa;
    min-height: 100vh;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.login-container {
    width: 350px;
    margin: 120px auto;
    padding: 40px 30px 32px 30px;
    background: #fff;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18);
    border-radius: 18px;
    text-align: center;
    transition: box-shadow 0.3s;
    animation: fadeIn 0.7s;
}

@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(40px);}
    100% { opacity: 1; transform: translateY(0);}
}

.login-container h2 {
    color: #1d3557;
    margin-bottom: 10px;
    letter-spacing: 1px;
    font-size: 2em;
    font-weight: 700;
}

.login-container p {
    color: #222c3c;
    margin-bottom: 25px;
    font-size: 1.1em;
}

.login-container input[type="text"],
.login-container input[type="password"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #c8d0df;
    border-radius: 8px;
    font-size: 1em;
    outline: none;
    background: #f7fafd;
    transition: border 0.2s;
}

.login-container input[type="text"]:focus,
.login-container input[type="password"]:focus {
    border: 1.5px solid #5CA9E9;
    background: #f0f6ff;
}

.primary-btn {
    width: auto;
    padding: 10px 16px;
    background: #1F3B73;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px 0 rgba(100,170,255,0.07);
    transition: background 0.25s;
}

.primary-btn:hover {
    background: #5CA9E9;
}

.error {
    color: #d90429;
    background: #fff5f5;
    border: 1px solid #ffd6d6;
    padding: 8px;
    border-radius: 6px;
    margin-top: 15px;
    font-size: 0.98em;
}
.show-pass {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: -12px;
    margin-bottom: 10px;
    font-size: 0.95em;
    color: #457b9d;
    cursor: pointer;
    user-select: none;
}


/* === Pestañas (perfil paciente) === */
.tabs {
    display: flex;
    margin-top: 20px;
    border-bottom: 2px solid #ccc;
    gap: 6px;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px 6px 0 0;
    background-color: #e2e6f3;
    font-weight: bold;
    color: #1F3B73;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.tab-btn:hover,
.tab-btn.active {
    background-color: #1F3B73;
    color: white;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
    display: block;
}

/* === Ficha de paciente === */
.ficha-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    background-color: #fff;
    border: 1px solid #dce3f0;
    border-radius: 10px;
    padding: 18px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.ficha-section {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 25px;
}

.ficha-card {
    flex: 1 1 48%;
    background-color: #ffffff;
    border: 1px solid #dce3f0;
    border-radius: 10px;
    padding: 18px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.ficha-card h3 {
    margin-top: 0;
    color: #1F3B73;
    border-bottom: 1px solid #ccc;
    margin-bottom: 10px;
    padding-bottom: 5px;
}

.ficha-card p {
    margin: 6px 0;
}

/* === Formularios (alta, edición) === */
form label {
    font-weight: bold;
    display: block;
    margin-top: 10px;
}

form input[type="text"],
form input[type="email"],
form input[type="date"],
form select {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

/* === Diseño en tarjetas (alta/editar paciente) === */
.card-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 20px;
}

.card-grid .card {
    flex: 1 1 calc(50% - 10px);
    background-color: #fff;
    padding: 18px;
    border-radius: 10px;
    border: 1px solid #dce3f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.card-grid .card label {
    margin-top: 8px;
}

/* Dirección completa en una línea */
.card-grid .card.direccion-caja input[type="text"] {
    width: 100%;
}

.card-grid .card .direccion-sub {
    display: flex;
    gap: 10px;
}

.card-grid .card .direccion-sub input {
    flex: 1;
}

/* === Tablas (radiografías, diagnósticos) === */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

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

table th {
    background-color: #EAF2FB;
    color: #1F3B73;
}

/* === Dashboard === */
.dashboard {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 3rem auto;
    max-width: 1000px;
}

.dashboard .card {
    flex: 1 1 250px;
    background-color: #f5f7fa;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.2s ease;
}

.dashboard .card:hover {
    transform: translateY(-5px);
}

.dashboard .card h2 {
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

.dashboard .card a {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.6rem 1.2rem;
    background-color: #4d91ff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
}

.dashboard .card a:hover {
    background-color: #2b6edb;
}

/* === Animaciones === */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Estilo para botón NHC (view-btn) en la tabla */

.view-btn {
    background-color: #5CA9E9; /* Azul grisáceo elegante */
    color: white;
    padding: 8px 14px;
    border: 0.3px solid #1F3B73;
    border-radius: 3px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.view-btn:hover {
    opacity: 0.85;
}

.btn-container form {
    display: inline-block;
    margin: 0 4px;
}

/* para controlar los tamaños de los íconos */
.icon-actions img {
    margin-right: 8px;
    cursor: pointer;
}

/* Modal personalizado para alta de usuario */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.custom-modal {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    max-width: 400px;
    width: 90%;
    font-family: 'Segoe UI', sans-serif;
}

.custom-modal p {
    font-size: 18px;
    margin-bottom: 20px;
}

.custom-modal .modal-btn {
    padding: 10px 18px;
    margin: 0 10px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.modal-btn-crear {
    background-color: #4d91ff;
    color: white;
}

.modal-btn-volver {
    background-color: #ddd;
    color: #1F3B73;
}

/* === CONTROL DEL BOTÓN LOGOUT IZQUIERDO === */
.logout-card {
    background-color: #E74C3C;
    border: 1px solid #dce3f0;
    border-radius: 10px;
    box-shadow: 0 2px 5px #5D6D7E;
    padding: 6px;
    margin-bottom: 6px;
    max-width: 160px;
    text-align: center;
}

.logout-card h2 {
    font-size: 1rem;
    color: #5D6D7E;
    margin-bottom: 6px;
}

.logout-card p {
    margin-bottom: 10px;
    font-size: 0.95rem;
}

/*Para los botones de agenda*/
.agenda-vista-botones {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.btn-vista {
    background-color: #dbeafe; /* azul claro */
    border: 1px solid #1e3a8a; /* azul oscuro */
    color: #1e3a8a;
    padding: 10px 16px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: background-color 0.2s ease;
}

.btn-vista:hover {
    background-color: #bfdbfe;
}

.btn-vista.activo {
    background-color: #1e3a8a;
    color: white;
}

/* Agenda diario*/ 
.agenda-diaria {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.agenda-diaria th,
.agenda-diaria td {
    border: 1px solid #ccc;
    padding: 10px;
    text-align: center;
    vertical-align: top;
}

.agenda-diaria thead th {
    background-color: #1e3a8a;
    color: white;
}

.agenda-diaria .libre {
    color: #6b7280;
    font-style: italic;
}

/* TRABJANDO LAS CAJAS DE CALENDARIO*/

.calendario-semanal td {
    background-color: #f8fafc;
    border: 1px solid #e5e7eb;
    padding: 8px;
    vertical-align: top;
    position: relative;
    border-radius: 6px;
    box-shadow: 0 0 2px rgba(0,0,0,0.05);
    transition: background-color 0.2s ease;
}

.calendario-semanal td:hover {
    background-color: #e0f2fe;
}

.calendario-semanal td.cita-programada {
    background-color: #dbeafe;
    border-left: 4px solid #1e3a8a;
    font-weight: bold;
    color: #1e3a8a;
}

/*agenda diaria*/

.bloque-franja {
    margin-top: 30px;
    border: 2px solid #1e3a8a;
    border-radius: 10px;
    padding: 15px;
    background-color: #f8fafc;
}

.bloque-franja h2 {
    margin-top: 0;
    font-size: 1.2rem;
    color: #1e3a8a;
}


/* ESTILOS DEL MENÚ*/

body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background-color: #f4f4f4;
}

.layout {
    display: flex;
}

/* Menú lateral */
body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', sans-serif;
    background-color: #F7F9FC;
}

.barra-usuario {
    background-color: #1F3B73;
    color: white;
    font-size: 14px;
    padding: 10px 25px;
    height: 45px;
    display: flex;
    align-items: center;
}

.layout {
    display: flex;
}

.menu-lateral {
    width: 200px;
    background-color: #1F3B73;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    color: white;
}

.usuario-conectado {
    text-align: center;
    font-size: 14px;
    padding: 0 20px 15px 20px;
    color: #E2E6F3;
}

.menu-lateral ul {
    list-style: none;
    padding: 0;
    margin-top: 10px;
    flex-grow: 1;
}

.menu-lateral li {
    margin: 10px 0;
    text-align: center;
}

.menu-lateral ul li a {
    display: inline-block;
    width: 140px;
    padding: 10px;
    background-color: #2C5FA0;
    color: white;
    border-radius: 12px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}   

.menu-lateral li.active a,
.menu-lateral a:hover {
    background-color: #244f8a;
}

.cerrar-sesion {
    text-align: center;
    padding: 10px;
    margin-top: 20px;
}

.btn-cerrar {
    display: inline-block;
    background-color: #E74C3C;
    color: white;
    padding: 10px 10px;
    text-decoration: none;
    border-radius:24px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.btn-cerrar:hover {
    background-color: #c0392b;
}

.panel-info {
    margin-left: 200px;
    padding: 30px;
}

.info-box {
    background-color: #cce6ff;
    border-left: 5px solid #007acc;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 16px;
}

/* Títulos pequeños y con color azul claro */

h1, .h1, .titulo-agenda {
    font-size: 26px;
    color: #1F3B73;
    margin-bottom: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

h2, .h2 {
    font-size: 22px;
    color: #1F3B73;
    margin-bottom: 12px;
    font-weight: 600;
    letter-spacing: -0.5px;
}


.titulo-agenda {
    font-size: 20px;
    color: #1F3B73;
    margin-bottom: 10px;
    font-weight: 600;
}   

.titulo-instrucciones {
    color: #6b7280;
    opacity: 1;
    font-style: italic;
}


.fecha-navegacion {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.fecha-navegacion input[type="date"] {
    padding: 4px 8px;
    font-size: 0.9rem;
}

.fecha-navegacion button {
    background-color: #5CA9E9;
    border: none;
    padding: 5px 10px;
    color: white;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
}

/* Estilo personalizado para el selector de fecha */
.fecha-navegacion input[type="date"] {
    background-color: #f0f4fa;
    border: 1px solid #1F3B73;
    border-radius: 5px;
    color: #1F3B73;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 5px 10px;
    outline: none;
    transition: border-color 0.3s;
}

.fecha-navegacion input[type="date"]:focus {
    border-color: #5CA9E9;
    box-shadow: 0 0 3px #5CA9E9;
}

/* === Estilo específico: Formulario de crear cita === */
.form-cita-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 28px;
    background: #fff;
    padding: 32px 28px 24px 28px;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(31,59,115,0.07);
    max-width: 640px;
    margin: 35px auto 0 auto;
    border: 1px solid #E2E6F3;
    align-items: end;
}

.form-cita-grid .full { grid-column: 1 / 3; }

.form-cita-grid label {
    font-weight: bold;
    margin-bottom: 2px;
    color: #1F3B73;
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.form-cita-grid input[type="text"],
.form-cita-grid input[type="number"],
.form-cita-grid select,
.form-cita-grid textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 7px;
    background: #F7F9FC;
    font-size: 15px;
    color: #222;
    margin-bottom: 0;
    font-family: 'Segoe UI', sans-serif;
}

.form-cita-grid input[readonly], 
.form-cita-grid input[readonly]:focus {
    background: #E2E6F3;
    color: #5D6D7E;
    cursor: default;
    border-color: #E2E6F3;
}

.form-cita-grid textarea {
    min-height: 45px;
    resize: vertical;
}

.form-cita-grid .acciones {
    display: flex; 
    gap: 12px; 
    justify-content: flex-end;
    margin-top: 18px;
}

.form-cita-grid .acciones .primary-btn,
.form-cita-grid .acciones .secondary-btn {
    margin: 0;
    font-size: 1rem;
}

.form-cita-grid .paciente-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-cita-grid .paciente-row input[type="text"] {
    flex: 1 1 auto;
}

.form-cita-grid .paciente-row button {
    background: #5CA9E9;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 20px;
    padding: 0 16px;
    height: 40px;
    cursor: pointer;
    transition: background 0.2s;
}
.form-cita-grid .paciente-row button:hover {
    background: #1F3B73;
}
.form-card, .form-cita-grid {
    max-width: 520px;
    min-height: 400px;
    padding: 12px 8px 8px 8px;
    margin: 0 auto;
    border-radius: 18px;
    box-shadow: 0 2px 12px rgba(31,59,115,0.05);
    background: #fff;
}
.estado-cita-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.estado-cita-row select {
    flex: 1 1 250px;
    max-width: 350px;
    font-size: 1.05em;
}

/* Estado de la Cita: select coloreado y alineado */
.estado-cita-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icono-estado-select img {
    width: 22px;
    height: 22px;
    vertical-align: middle;
}

#estado-cita-select {
    /* Esto debe permitir el override vía JS */
    background-image: none !important;
    background-color: inherit !important;
    color: inherit !important;
}

/* Por defecto, el fondo blanco */
#estado-cita-select {
    background-color: #fff;
    color: #222;
}


@media (max-width: 700px) {
    .form-cita-grid { grid-template-columns: 1fr; }
    .form-cita-grid .full { grid-column: 1 / 2; }
}



/* Buscador de pacientes en pop-up */
.busqueda-paciente-popup main.container {
    max-width: 820px;
    padding: 24px 20px 10px 20px;
    min-height: 160px;
}

.form-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.form-inline input[type="text"] {
    flex: 1 1 250px;
    padding: 8px 12px;
    border: 1px solid #5CA9E9;
    border-radius: 8px;
    font-size: 16px;
    background: #F7F9FC;
}

.form-inline button {
    background-color: #5CA9E9;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 7px 16px;
    font-weight: bold;
    cursor: pointer;
    font-size: 15px;
}

.tabla-resultados {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 15px;
    background: #fff;
    border-radius: 7px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(31,59,115,0.06);
}
.tabla-resultados th, .tabla-resultados td {
    border-bottom: 1px solid #E2E6F3;
    padding: 9px 12px;
    text-align: left;
}
.tabla-resultados th {
    background: #E2E6F3;
    color: #1F3B73;
    font-weight: bold;
}
.tabla-resultados tr:last-child td {
    border-bottom: none;
}
.tabla-resultados button {
    background: #5CA9E9;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}
.tabla-resultados button:hover {
    background: #1F3B73;
}


/* Mostrar cita en agenda*/
.cita-en-agenda {
    display: block;
    padding: 10px 8px 10px 0;
    border-radius: 9px;
    margin-bottom: 2px;
    min-height: 75px;
    text-decoration: none;
    color: #222;
    font-size: 1rem;
    transition: box-shadow 0.2s;
    border: 1px solid #e0e4ea;
}
.cita-en-agenda:hover {
    box-shadow: 0 2px 9px rgba(30, 58, 138, 0.10);
    outline: 2px solid #5CA9E9;
    z-index: 2;
}

.cita-en-agenda .icono-estado {
    width: 26px;
    vertical-align: middle;
    margin-right: 6px;
    margin-bottom: 4px;
}

.cita-en-agenda .nhc {
    color: #5D6D7E;
    font-size: 0.96em;
    font-weight: normal;
}
.cita-en-agenda .telefono {
    color: #1F3B73;
    font-size: 0.95em;
    margin-right: 12px;
}
.cita-en-agenda .hora {
    display: inline-block;
    color: #5CA9E9;
    font-weight: bold;
    margin-right: 10px;
    font-size: 0.96em;
}
.cita-en-agenda .obs {
    display: block;
    margin-top: 2px;
    font-size: 0.92em;
    color: #444;
    font-style: italic;
    word-break: break-all;
    max-width: 220px;
    white-space: pre-line;
}


a.volver-btn {
    background-color: #E2E6F3;
    color: #1F3B73;
    border-radius: 6px;
    padding: 7px 18px;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 16px;
    font-size: 1.06em;
    transition: background 0.18s;
    border: 1px solid #dce3f0;
}
a.volver-btn:hover {
    background: #5CA9E9;
    color: #fff;
    border: 1px solid #5CA9E9;
}

/* Manejo presupuesto Tratamientos*/
.tratamientos-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 18px;
}
.tratamientos-table th, .tratamientos-table td {
    border: 1px solid #e2e2e2;
    padding: 8px 10px;
    text-align: left;
}
.tratamientos-table th {
    background: #f0f7ff;
}
.tratamiento-row input[type="number"] {
    width: 50px;
}
.subtotal {
    margin-top: 14px;
    font-size: 1.2em;
    font-weight: bold;
    color: #124985;
}


/* MKT (por ahora)*/

.kpi-dashboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    margin-top: 30px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}
.kpi-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 8px #0002;
    padding: 26px 24px 20px 24px;
    display: flex;
    flex-direction: column;
    min-height: 120px;
    justify-content: flex-end;
    margin-bottom: 0;
}
.kpi-title {
    font-size: 20px;
    color: #555;
    margin-bottom: 10px;
}
.kpi-value {
    font-size: 44px;
    font-weight: 500;
    color: #222;
}
.dashboard-title {
    color: #1F3B73;
    font-size: 1.7em;
    font-weight: 700;
    text-align: left;
    margin-bottom: 24px;
    letter-spacing: -0.8px;
}
@media (max-width: 900px) {
    .kpi-dashboard { grid-template-columns: 1fr; }
}


/* PRESUPUESTO POR DIENTES*/
.btn-diente {
    background: #f4f4f4;
    border: 1px solid #ccc;
    padding: 3px 8px;
    margin: 1px;
    border-radius: 4px;
    cursor: pointer;
    min-width: 32px;
    text-align: center;
    transition: background 0.2s, border 0.2s;
}
.btn-diente.activo {
    background: #007BFF;
    color: white;
    border: 2px solid #004F9E;
}
.arcada-superior, .arcada-inferior {
    display: flex;
    justify-content: center;
    margin-bottom: 3px;
}
.selector-dientes {
    margin-bottom: 8px;
}

/* Botón de regreso arriba a la izquierda (icono back3.png).*/
.btn-back {
    display: inline-flex;
    align-items: center;
    background: none;
    border: none;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 1em;
    }
.btn-back img {
    width: 22px;
    height: 22px;
    margin-right: 6px;
    }


/* HISTORIAL CLÍNICO*/ 
/* Botón de retroceso */
.btn-back { 
    position: absolute; 
    top: 20px; 
    left: 20px; 
}

/* Tabla de historial */
.historial-table { 
    width: 100%; 
    border-collapse: collapse; 
    background: #fff; 
    margin-top: 30px;
}
.historial-table th, .historial-table td { 
    padding: 10px 12px; 
    border-bottom: 1px solid #ccc; 
    font-size: 16px;
}
.historial-table th { 
    background: #E2E6F3; 
    color: #1F3B73;
}
/* Columna de notas: más estrecha pero alto flexible */
.historial-table td.notas-col, .historial-table th.notas-col {
    max-width: 320px;
    width: 320px;
    white-space: normal;
    word-break: break-word;
    vertical-align: top;
}

/* Etiquetas tipo */
.tipo-comentario { 
    color: #fff; 
    background: #F5B041; 
    border-radius: 16px; 
    padding: 5px 18px; 
    font-weight: 600;
    font-size: 16px;
    display: inline-block;
}
.tipo-tratamiento { 
    color: #fff; 
    background: #1F3B73; 
    border-radius: 16px; 
    padding: 5px 18px; 
    font-weight: 600;
    font-size: 16px;
    display: inline-block;
}

/* Estados (borde lateral color) */
.fila-pendiente { border-left: 6px solid #E74C3C; }
.fila-realizado { border-left: 6px solid #4CAF50; }
.fila-cancelado { border-left: 6px solid #888; color: #888; background: #F7F9FC; }

/* Fila tipo chat para añadir comentario */
.chat-add-row { 
    display: flex; 
    align-items: flex-end; 
    gap: 10px; 
    margin: 24px 0 12px 0;
}

/* Campo de comentarios tipo chat: más alto, redondeado */
.chat-add-input {
    flex: 1;
    padding: 16px 18px;
    border: 1.5px solid #5CA9E9;
    border-radius: 22px;
    font-size: 17px;
    font-family: 'Segoe UI', sans-serif;
    width: 300px;
    min-width: 120px;
    max-width: 98%;
    min-height: 48px;
    max-height: 120px;
    resize: vertical;
    box-shadow: 0 1px 4px rgba(95, 169, 233, 0.06);
    outline: none;
    transition: border 0.2s;
}
.chat-add-input:focus {
    border-color: #1F3B73;
}

/* Botón Añadir tipo chat */
.chat-add-btn {
    background: #4CAF50;
    color: #fff;
    border: none;
    padding: 14px 26px 14px 18px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.06);
    outline: none;
}
.chat-add-btn img {
    width: 22px; 
    height: 22px; 
    margin-right: 7px;
}
.chat-add-btn:hover { 
    background: #449D48; 
}

/* Selector de estado */
.select-estado {
    font-size: 15px;
    padding: 5px 14px;
    border-radius: 10px;
    border: 1.5px solid #ccc;
    background: #fff;
    font-family: 'Segoe UI', sans-serif;
}

/* Colaborador */
.colab-badge { 
    color: #5CA9E9; 
    font-weight: 600; 
    font-size: 15px;
}

/* Responsive para móviles */
@media (max-width: 700px) {
    .historial-table th, .historial-table td { font-size: 14px; }
    .chat-add-btn { font-size: 15px; padding: 11px 16px 11px 12px; }
    .chat-add-input { font-size: 15px; }
    .historial-table td.notas-col, .historial-table th.notas-col { max-width: 90vw; width: 95vw;}
}


/*PARA CITAS SELECT */

.badge-select-estado {
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    padding: 2px 14px;
    border: none;
    color: #fff;
    margin-top: 2px;
    margin-bottom: 2px;
}
.badge-select-estado option {
    color: #222;
    font-weight: 500;
}
.agenda-diaria td form { margin: 0; }


/* BOTONES BÚSQUDA PACIENTE*/ 
.form-botones-parejos {
    display: flex;
    gap: 16px;
    align-items: stretch; /* Alinea la altura de los botones */
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.form-botones-parejos input[type="text"] {
    flex: 2 1 0;
    min-width: 180px;
    padding: 8px 12px;
    font-size: 1rem;
}

.boton-mitad {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    font-size: 1rem;
    padding: 0; 
    min-width: 0;
    text-align: center;
}

@media (max-width: 700px) {
    .form-botones-parejos {
        flex-direction: column;
        gap: 10px;
    }
    .boton-mitad, .form-botones-parejos input[type="text"] {
        width: 100%;
        min-width: unset;
    }
}

.btn-verde {
    background: #4CAF50 !important;
    color: #fff !important;
    border: none;
}
.btn-verde:hover, .btn-verde:focus {
    background: #388e3c !important;
}
