@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css");

/* Define CSS Variables */
:root {
    --gray-900: #0d0c10;
    --gray-700: #344256;
    --gray-600: #2e2c3a;
    --gray-500: #52505f;
    --gray-400: #878493;
    --gray-200: #ebebebc4;
    --gray-100: #fafafa;
    --blue-dark: #007BFF;
    /* Main blue color for buttons */
    --blue-darker: #0056b3;
    /* Darker blue shade */
    --blue-light: #ebf5ff;
    --main-white: #ffffff;
    --main-black: #000000;
    --radius-4px: 4px;
    --radius-6px: 6px;
    --radius-8px: 8px;
    --header-height: 80px;
    /* Set the header height variable */
    --red-dark: #ff8585;
    --red-darker: #e56464;
    --green: #28a745;
    /* Bootstrap green shade */
    --green-darker: #1e7e34;
    /* Darker green shade for hover effects */
}

/* General Styles */
html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--gray-900);
    background-color: var(--main-white);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

img {
    max-width: 100%;
    height: auto;
}

/* Header Styles */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.9));
    padding: 15px 0;
    height: var(--header-height);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
}

.logo-link {
    display: flex;
    align-items: center;
}

.logo {
    width: 50px;
    min-width: 50px;
    height: 50px;
}

.header-right {
    display: flex;
    align-items: center;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin-left: 25px;
}

.nav-links a,
.dropbtn {
    text-decoration: none;
    color: var(--gray-900);
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1em;
}

.header-button {
    margin-left: 25px;
    padding: 10px 20px;
    font-size: 1em;
    border: none;
    border-radius: var(--radius-6px);
    background-color: var(--blue-dark);
    color: var(--main-white);
    cursor: pointer;
    transition: background-color 0.3s;
}

.header-button:hover {
    background-color: var(--blue-darker);
}

/* New .record-button styles */
.record-button {
    padding: 10px 20px;
    font-size: 1em;
    border: none;
    border-radius: var(--radius-6px);
    background-color: var(--red-dark);
    /* Red background */
    color: var(--main-white);
    /* White text */
    cursor: pointer;
    transition: background-color 0.3s;
}

.record-button:hover {
    background-color: var(--red-darker);
    /* Darker red on hover */
}

/* New .status-message styles for the recording status*/
.status-message {
    margin-top: 10px;
    /* Adds space above the status message */
    font-size: 1em;
    color: var(--green);
    /* Green text for positive status */
    font-weight: bold;
    /* Makes the status message stand out */
}

/* Dropdown Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--main-white);
    min-width: 100px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.dropdown-content a {
    padding: 8px 12px;
    display: block;
    text-decoration: none;
    color: var(--gray-900);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a:hover {
    background-color: var(--gray-100);
}

/* Main Content */
main {
    flex: 1;
    /* Added this line to make main content grow and push footer to the bottom */
    display: flex;
    flex-direction: column;
}

/* Hero Section */
.hero {
    padding-top: calc(var(--header-height) + 50px);
    padding-bottom: 20px;
    padding-left: 20px;
    padding-right: 20px;
    background-color: var(--gray-100);
}

.hero h1 {
    margin-top: 0;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-content {
    max-width: 600px;
}

.hero h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: var(--gray-900);
    text-align: left;
}

.claim {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: var(--gray-700);
    text-align: left;
}

.sub-claim {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: var(--gray-500);
    text-align: left;
}

.hero button {
    padding: 12px 24px;
    font-size: 1em;
    border: none;
    border-radius: var(--radius-6px);
    background-color: var(--blue-dark);
    color: var(--main-white);
    cursor: pointer;
    transition: background-color 0.3s;
}

.hero button:hover {
    background-color: var(--blue-darker);
}

.hero-image {
    max-width: 500px;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-8px);
}

/* Tools Section */
.tools {
    padding: 50px 20px;
    background-color: var(--gray-100);
}

.tools h2 {
    text-align: center;
    margin-bottom: 40px;
    color: var(--gray-900);
}

.tool-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.tool {
    background-color: var(--blue-light);
    border-radius: var(--radius-8px);
    margin: 10px;
    padding: 20px;
    flex: 1 1 300px;
    max-width: 400px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.tool img {
    border-radius: var(--radius-8px);
}

.tool h3 {
    margin-top: 20px;
    margin-bottom: 15px;
    color: var(--gray-900);
}

.tool p {
    color: var(--gray-600);
}

/* Footer Styles */
footer {
    background-color: var(--main-black);
    color: var(--main-white);
    padding: 20px 40px;
    border-top-left-radius: var(--radius-8px);
    border-top-right-radius: var(--radius-8px);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    flex-direction: column;
}

.footer-links a {
    margin-bottom: 10px;
    text-decoration: none;
    color: var(--main-white);
    font-weight: 500;
}

.footer-links a:hover {
    text-decoration: underline;
}

.social-media {
    display: flex;
    align-items: center;
}

.follow-us {
    display: flex;
    align-items: center;
}

.follow-us p {
    margin: 0;
    margin-right: 10px;
    color: var(--main-white);
    font-weight: 500;
}

.follow-us img {
    height: 30px;
}

/* Responsive Styles */
@media (max-width: 768px) {

    /* Header adjustments for tablets */
    .header-container {
        padding: 0 20px;
    }

    .nav-links li {
        margin-left: 15px;
    }

    .header-right .header-button {
        margin-left: 15px;
        text-indent: -9999px;
        position: relative;
    }

    .header-right .header-button::after {
        content: "\f4dd";
        font-family: "bootstrap-icons" !important;
        font-size: 1.25rem;
        position: absolute;
        top: 50%;
        left: 50%;
        translate: -50% -50%;
        color: var(--main-white);
        text-indent: 0;
    }

    #signOutBtn.header-button::after {
        content: "\f8a6" !important;
    }

    /* Hero Section adjustments for tablets */
    .hero-container {
        flex-direction: column;
    }

    .hero-image {
        margin-top: 30px;
    }


}

@media (max-width: 480px) {

    /* Header adjustments for mobile */
    .header-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        padding: 0 10px;
    }

    .header-right {
        display: flex;
        flex-direction: row;
        align-items: flex-end;
        margin-top: 0;
    }

    .nav-links {
        flex-direction: revert;
        align-items: flex-end;
        margin: 0;
        padding: 0;
    }


    /* Hero Section adjustments for mobile */
    .hero-container {
        flex-direction: column;
    }

    .hero-image {
        margin-top: 30px;
    }

    /* Footer adjustments for mobile */
    .footer-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .follow-us {
        flex-direction: row;
        align-items: center;
        margin-top: 10px;
    }

    .follow-us p {
        margin-right: 5px;
    }
}

/* -------------------------------- */
/* Login Container Styles */
/* -------------------------------- */

.login-container {
    background-color: var(--main-white);
    padding: 30px 40px;
    border-radius: var(--radius-8px);
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    margin: 100px auto;
    box-sizing: border-box;
    text-align: center;
}

.login-container h2 {
    margin-bottom: 20px;
    color: var(--gray-900);
    font-size: 1.8em;
}

.login-container input[type="email"],
.login-container input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 15px;
    border-radius: var(--radius-4px);
    border: 1px solid var(--gray-200);
    box-sizing: border-box;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    color: var(--gray-900);
}

.login-container input::placeholder {
    color: var(--gray-400);
}

.login-container button {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 10px;
    background-color: var(--blue-dark);
    color: var(--main-white);
    border: none;
    border-radius: var(--radius-4px);
    cursor: pointer;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    transition: background-color 0.3s ease;
}

.login-container button:hover {
    background-color: var(--blue-darker);
}

.login-container #signupBtn {
    background-color: var(--gray-700);
}

.login-container #signupBtn:hover {
    background-color: var(--gray-600);
}

.login-container #message {
    margin-top: 10px;
    color: var(--red-darker);
    font-size: 14px;
}

.login-container .header-button {
    margin: 5px auto;
}

/* -------------------------------- */
/* Sign Out Button Styles */
/* -------------------------------- */

.sign-out-button {
    background-color: var(--red-dark);
}

.sign-out-button:hover {
    background-color: var(--red-darker);
}

/* -------------------------------- */
/* Work Area Section Styles */
/* -------------------------------- */

/* Work Area Container */
.work-area {
    padding-top: calc(var(--header-height) + 50px);
    padding-bottom: 50px;
    padding-left: 20px;
    padding-right: 20px;
    background-color: var(--main-white);
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

.work-area-box {
    display: block;
    background-color: var(--blue-light);
    border-radius: var(--radius-8px);
    margin: 10px;
    padding: 20px;
    flex: 1 1 300px;
    max-width: 400px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.work-area-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.work-area-box:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}



.work-area-box h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--gray-900);
}

.work-area-box p {
    color: var(--gray-600);
}



/* Back Link */
.back-link {
    display: inline-block;
    color: var(--blue-dark);
    text-decoration: none;
    font-size: 16px;
}

.back-link:hover {
    text-decoration: underline;
}

/* H1 Title */
.work-area h1 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--gray-900);
    margin-top: 0;
    /* Ensure no extra margin at the top */
}

/* Session Actions */
.session-actions {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 20px;
}

.add-session-button {
    background-color: var(--blue-dark);
    color: var(--main-white);
    border: none;
    border-radius: var(--radius-4px);
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.add-session-button:hover {
    background-color: var(--blue-darker);
}

/* New Session Form */
.new-session-form {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.new-session-form input[type="text"] {
    flex: 1;
    padding: 12px 16px;
    border-radius: var(--radius-4px);
    border: 1px solid var(--gray-200);
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    color: var(--gray-900);
}

.new-session-form input::placeholder {
    color: var(--gray-400);
}

.new-session-form button {
    margin-left: 10px;
    padding: 12px 16px;
    background-color: var(--blue-dark);
    color: var(--main-white);
    border: none;
    border-radius: var(--radius-4px);
    cursor: pointer;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    transition: background-color 0.3s;
}

.new-session-form button:hover {
    background-color: var(--blue-darker);
}

/* Para pantallas móviles */
@media (max-width: 480px) {
    .new-session-form {
        display: flex;
        flex-direction: column;
        align-items: start;
        gap: 1rem;
    }
    #createSessionBtn {
        margin-left: 0;
      }
}

/* Sessions Container */
#sessionsContainer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
}

/* Session Box */
.session-box {
    background-color: var(--blue-light);
    border-radius: var(--radius-4px);
    margin: 10px 0;
    padding: 20px;
    width: 100%;
    max-width: 100%;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s, box-shadow 0.2s;
    display: flex;
    box-sizing: border-box;
}

.session-box:hover {
    background-color: var(--gray-100);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.session-box .timestamp {
    flex: 1;
    color: var(--gray-600);
    font-size: 14px;
    margin-right: 20px;
}

.session-box .session-info {
    flex: 3;
}

.session-box h2 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--gray-900);
    font-size: 18px;
}

.session-box p {
    color: var(--gray-600);
    margin-bottom: 5px;
    font-size: 16px;
}

/* No Sessions Message */
#noSessionsMessage {
    text-align: center;
    color: var(--gray-600);
    font-size: 18px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .work-area {
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 480px) {
    .work-area {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* Base Styles for Chat Container */

/* Specific styles for the chat page */
.chat-page .work-area {
    max-width: none;
    /* Remove the max-width constraint */
    width: 100%;
    /* Ensure it takes the full available width */
}


.chat-container {
    background-color: var(--main-white);
    padding: 10px;
    /* Minimum padding for mobile */
    border-radius: var(--radius-8px);
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    /* Full width on mobile */
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: 70vh;
    /* Adjust as needed */
}

/* Media Query for Laptop and Larger Screens */
@media (min-width: 1024px) {
    .chat-container {
        width: 100%;
        /* Width of 80% of the work-area */
        max-width: 1200px;
        /* Maximum width of 1000px */
        padding: 20px;
        /* Increased padding for larger screens */
    }
}

/* Media Query for Mobile Devices */
@media (max-width: 767px) {
    .chat-container {
        padding: 10px;
        /* Ensures a minimum padding of 10px on mobile */
        height: 80vh;
        min-height: 400px;
    }
}


/* Chat Window Styles */
.chat-window {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    border: 1px solid var(--gray-200);
    background-color: var(--gray-100);
    margin-bottom: 10px;
    border-radius: var(--radius-4px);
}

/* Input Area Styles */
.input-area {
    display: flex;
    padding: 10px;
    background-color: var(--main-white);
    border-top: 1px solid var(--gray-200);
    border-radius: var(--radius-4px);
    box-sizing: border-box;
}

.input-area input[type="text"] {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-4px);
    margin-right: 10px;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    color: var(--gray-900);
    box-sizing: border-box;
}

.input-area input::placeholder {
    color: var(--gray-400);
}

.input-area button {
    padding: 10px 20px;
    background-color: var(--blue-dark);
    color: var(--main-white);
    border: none;
    border-radius: var(--radius-4px);
    cursor: pointer;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    transition: background-color 0.3s ease;
}

.input-area button:hover {
    background-color: var(--blue-darker);
}

/* Message Styles */
.message {
    margin-bottom: 10px;
    padding: 10px 15px;
    border-radius: var(--radius-8px);
    max-width: 70%;
    word-wrap: break-word;
}

.user-message {
    background-color: var(--blue-light);
    align-self: flex-end;
    margin-left: auto;
}

.bot-message {
    background-color: var(--gray-200);
    align-self: flex-start;
    margin-right: auto;
    flex-direction: column;
}

/* Loading Spinner */
.loading-spinner {
    border: 3px solid #d1d5db;
    border-top: 4px solid var(--blue-dark);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 2s linear infinite;
    margin: 10px auto;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* -------------------------------- */
/* Patient Actions */
/* -------------------------------- */

.patient-actions {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 20px;
}

.add-patient-button {
    background-color: var(--blue-dark);
    color: var(--main-white);
    border: none;
    border-radius: var(--radius-4px);
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.add-patient-button:hover {
    background-color: var(--blue-darker);
}

/* New Patient Form */
.new-patient-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.new-patient-form input[type="text"] {
    flex: 1;
    padding: 12px 16px;
    border-radius: var(--radius-4px);
    border: 1px solid var(--gray-200);
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    color: var(--gray-900);
    margin: 5px;
}

.new-patient-form input::placeholder {
    color: var(--gray-400);
}

.new-patient-form button {
    padding: 12px 16px;
    background-color: var(--blue-dark);
    color: var(--main-white);
    border: none;
    border-radius: var(--radius-4px);
    cursor: pointer;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.new-patient-form button:hover {
    background-color: var(--blue-darker);
}

/* Patients Container */
#patientsContainer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
}

/* Patient Box */
.patient-box {
    background-color: var(--blue-light);
    border-radius: var(--radius-4px);
    margin: 10px 0;
    padding: 20px;
    width: 100%;
    max-width: 100%;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s, box-shadow 0.2s;
    display: flex;
    box-sizing: border-box;
}

.patient-box:hover {
    background-color: var(--gray-100);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.patient-box .timestamp {
    flex: 1;
    color: var(--gray-600);
    font-size: 14px;
    margin-right: 20px;
}

.patient-box .patient-info {
    flex: 3;
}

.patient-box h2 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--gray-900);
    font-size: 18px;
}

/* No Patients Message */
#noPatientsMessage {
    text-align: center;
    color: var(--gray-600);
    font-size: 18px;
}

/* Dashboard Container */
.dashboard-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Top Section */
.top-section {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* Symptoms Section */
.symptoms-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.symptoms-box {
    background-color: var(--blue-light);
    border-radius: var(--radius-4px);
    padding: 20px;
    margin-bottom: 10px;
}

.symptoms-box h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.symptoms-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.symptoms-box ul li {
    margin-bottom: 5px;
    color: var(--gray-900);
}

/* Diagnosis Section */
.diagnosis-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: 10px;
}

/* Diagnósticos en consideración */
.diagnosis-potential {
    background-color: rgba(0, 123, 255, 0.2);
    /* Blue with partial transparency */
    border-radius: var(--radius-4px);
    padding: 20px;
    margin-bottom: 10px;
    position: relative;
}

.diagnosis-potential h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.diagnosis-pills {
    display: flex;
    flex-wrap: wrap;
}

.diagnosis-pill {
    background-color: var(--blue-dark);
    color: var(--main-white);
    padding: 5px 10px;
    border-radius: var(--radius-4px);
    margin: 5px;
    font-size: 14px;
}

/* Spinner Styles */
.spinner {
    border: 4px solid var(--gray-200);
    border-top: 4px solid var(--blue-dark);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 2s linear infinite;
    position: absolute;
    top: 20px;
    right: 20px;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Diseases Section */
.diseases-section {
    background-color: var(--blue-light);
    border-radius: var(--radius-4px);
    padding: 20px;
}

.diseases-section h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.diseases-container {
    display: flex;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    #diseases_container > div {
        flex-direction: column;
    }
}

.disease-box {
    background-color: var(--gray-100);
    border-radius: var(--radius-4px);
    padding: 15px;
    margin: 10px;
    flex: 1 1 calc(33% - 20px);
    /* Three boxes per row */
    box-sizing: border-box;
}

.disease-box h4 {
    margin-top: 0;
    margin-bottom: 10px;
}

.disease-box p {
    margin: 5px 0;
}

/* Questions Section */
.questions-section {
    display: flex;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* Questions Column */
.questions-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin: 10px;
}

.questions-column h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.questions-container {
    display: flex;
    flex-direction: column;
}

.question-box {
    background-color: var(--gray-500);
    border-radius: var(--radius-4px);
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid var(--gray-300);
}

.question-box h4 {
    margin-top: 0;
    margin-bottom: 5px;
}

.question-box p {
    margin: 0;
}

/* Answered and Unanswered */
.question-box.answered {
    border-left: 4px solid var(--green);
}

.question-box.unanswered {
    border-left: 4px solid var(--red-dark);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .top-section {
        flex-direction: column;
    }

    .symptoms-section,
    .diagnosis-section {
        margin: 0;
    }

    .diagnosis-section {
        margin-top: 20px;
    }
}

/* Reduce Typography Size */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
li,
button,
input {
    font-size: 14px;
}

/* Dashboard Container */
.dashboard-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Controls Section */
.controls-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

#backToPacienteContainer {
    flex: 1;
}

.timer {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    background-color: var(--gray-200);
    padding: 10px;
    margin-right: 10px;
    border-radius: var(--radius-4px);
}

.record-button {
    flex: 1;
    text-align: center;
}

.status-message {
    flex: 1;
    text-align: right;
    font-weight: bold;
    color: var(--red-dark);
    animation: blink 1.5s linear infinite;
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

/* Main Content Section */
.main-content-section {
    display: flex;
    flex-wrap: nowrap;
}

/* Left Column */
.left-column {
    flex: 2;
    display: flex;
    flex-direction: column;
    margin-right: 10px;
}

/* Right Column */
.right-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: 10px;
}

/* Symptoms Section */
.symptoms-section {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

.symptoms-box {
    background-color: var(--blue-light);
    border-radius: var(--radius-4px);
    padding: 10px;
    margin-bottom: 10px;
}

.present-symptoms h3 {
    color: var(--red-dark);
}

.absent-symptoms h3 {
    color: var(--green);
}

.symptoms-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.symptoms-box ul li {
    margin-bottom: 5px;
    color: var(--gray-900);
}

/* Diagnósticos en consideración */
.diagnosis-potential {
    background-color: rgba(0, 123, 255, 0.2);
    /* Blue with partial transparency */
    border-radius: var(--radius-4px);
    padding: 10px;
    margin-bottom: 10px;
    position: relative;
}

.diagnosis-potential h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.diagnosis-pills {
    display: flex;
    flex-wrap: wrap;
}

.diagnosis-pill {
    background-color: var(--blue-dark);
    color: var(--main-white);
    padding: 5px 10px;
    border-radius: var(--radius-4px);
    margin: 5px;
    font-size: 12px;
}

/* Spinner Styles */
.spinner {
    border: 4px solid var(--gray-200);
    border-top: 4px solid var(--blue-dark);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 2s linear infinite;
    position: absolute;
    top: 10px;
    right: 10px;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Diseases Section */
.diseases-section {
    background-color: var(--blue-light);
    border-radius: var(--radius-4px);
    padding: 10px;
    margin-bottom: 10px;
}

.diseases-section h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.diseases-container {
    width: 100%;
}

.disease-row {
    display: flex;
    align-items: center;
    padding: 5px;
    border-radius: var(--radius-4px);
    margin-bottom: 5px;
}

.disease-cell {
    padding: 5px;
    font-size: 12px;
}

.disease-cell.name {
    flex: 1;
}

.disease-cell.in-favour,
.disease-cell.against {
    flex: 2;
}

.disease-cell.probability {
    flex: 1;
}

/* Probability Colors */
.disease-row.high-probability {
    background-color: var(--blue-darker);
    color: var(--main-white);
}

.disease-row.medium-probability {
    background-color: var(--blue-dark);
    color: var(--main-white);
}

.disease-row.low-probability {
    background-color: var(--blue-light);
    color: var(--gray-900);
}

/* Questions Section */
.questions-section {
    display: flex;
    flex-direction: column;
}

.questions-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

.questions-column h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.questions-container {
    display: flex;
    flex-direction: column;
}

.question-box {
    background-color: var(--gray-500);
    border-radius: var(--radius-4px);
    padding: 10px;
    margin-bottom: 5px;
    border: 1px solid var(--gray-300);
}

.question-box h4 {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 14px;
}

.question-box p {
    margin: 0;
    font-size: 12px;
}

/* Answered and Unanswered */
.question-box.answered {
    border-left: 4px solid var(--green);
}

.question-box.unanswered {
    border-left: 4px solid var(--red-dark);
}

/* Timer Styles */
.timer {
    font-size: 18px;
    font-weight: bold;
    background-color: var(--gray-200);
    padding: 10px 20px;
    border-radius: var(--radius-4px);
    color: var(--blue-dark);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .main-content-section {
        flex-direction: column;
    }

    .left-column,
    .right-column {
        margin: 0 !important;
    }

    .right-column {
        margin-top: 20px;
    }
    .report-container {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .controls-section {
        flex-direction: column;
    }

    .controls-section>* {
        margin-bottom: 10px;
    }

    .status-message {
        text-align: left;
    }
}

/* Reduce Typography Size */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
li,
button,
input {
    font-size: 14px;
}

/* Dashboard Container */
.dashboard-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: calc(100vh - var(--header-height) - 100px);
    /* Adjust height to fit viewport */
}

/* Controls Section */
.controls-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

#backToPacienteContainer {
    flex: 1;
}

.timer {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    background-color: var(--gray-200);
    padding: 10px;
    border-radius: var(--radius-4px);
}

.record-button {
    flex: 1;
    text-align: center;
}

.status-message {
    font-size: 1em;
    font-weight: bold;
    color: var(--gray-900);
}

.status-message.recording {
    color: var(--green);
    animation: blink 1.5s linear infinite;
}

.status-message.not-recording {
    color: var(--gray-900);
    animation: none;
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

/* Main Content Section */
.main-content-section {
    display: flex;
    flex-grow: 1;
    overflow: hidden;
    /* Hide overflow to enable independent scrolling */
}

/* Left Column */
.left-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-right: 10px;
    overflow-y: auto;
    /* Enable scrolling */
}

/* Right Column */
.right-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: 10px;
    overflow-y: auto;
    /* Enable scrolling */
}

/* Symptoms Section */
.symptoms-section {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

.symptoms-box {
    background-color: var(--blue-light);
    border-radius: var(--radius-4px);
    padding: 10px;
    margin-bottom: 10px;
}

.present-symptoms h3 {
    color: var(--red-dark);
}

.absent-symptoms h3 {
    color: var(--green);
}

.symptoms-pills {
    display: flex;
    flex-wrap: wrap;
}

.symptom-pill {
    background-color: var(--gray-400);
    color: var(--main-white);
    padding: 5px 10px;
    border-radius: var(--radius-4px);
    margin: 5px;
    font-size: 12px;
}

/* Diagnósticos en consideración */
.diagnosis-potential {
    background-color: rgba(0, 123, 255, 0.2);
    /* Blue with partial transparency */
    border-radius: var(--radius-4px);
    padding: 10px;
    margin-bottom: 10px;
    position: relative;
}

.diagnosis-potential h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.diagnosis-pills {
    display: flex;
    flex-wrap: wrap;
}

.diagnosis-pill {
    background-color: var(--blue-dark);
    color: var(--main-white);
    padding: 5px 10px;
    border-radius: var(--radius-4px);
    margin: 5px;
    font-size: 12px;
}

/* Spinner Styles */
.spinner {
    border: 4px solid var(--gray-200);
    border-top: 4px solid var(--blue-dark);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 2s linear infinite;
    position: absolute;
    top: 10px;
    right: 10px;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Diseases Section */
.diseases-section {
    background-color: var(--blue-light);
    border-radius: var(--radius-4px);
    padding: 10px;
    margin-bottom: 10px;
    flex-grow: 1;
    /* Take remaining space */
}

.diseases-section h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.diseases-container {
    width: 100%;
}

.disease-row {
    display: flex;
    align-items: center;
    padding: 5px;
    border-radius: var(--radius-4px);
    margin-bottom: 5px;
}

.disease-cell {
    padding: 5px;
    font-size: 12px;
    flex-basis: 0;
    flex-grow: 1;
}

.disease-cell.name {
    flex-basis: 16.6666%;
    /* 1/6th */
}

.disease-cell.in-favour,
.disease-cell.against {
    flex-basis: 33.3333%;
    /* 2/6th */
}

.disease-cell.probability {
    flex-basis: 16.6666%;
    /* 1/6th */
}

/* Probability Colors */
.disease-row.high-probability {
    background-color: var(--blue-darker);
    color: var(--main-white);
}

.disease-row.medium-probability {
    background-color: var(--blue-dark);
    color: var(--main-white);
}

.disease-row.low-probability {
    background-color: var(--blue-light);
    color: var(--gray-900);
}

/* Questions Section */
.questions-section {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}



.questions-container {
    display: flex;
    flex-direction: column;
}

.question-box {
    background-color: var(--gray-100);
    border-radius: var(--radius-4px);
    padding: 10px;
    margin-bottom: 5px;
    border: 1px solid var(--gray-300);
}

.question-box h4 {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 14px;
}

.question-box p {
    margin: 0;
    font-size: 12px;
}

/* Answered and Unanswered */
.question-box.answered {
    border-left: 4px solid var(--green);
}

.question-box.unanswered {
    border-left: 4px solid var(--red-dark);
}

/* Timer Styles */
.timer {
    font-size: 18px;
    font-weight: bold;
    background-color: var(--gray-200);
    padding: 10px 20px;
    border-radius: var(--radius-4px);
    color: var(--blue-dark);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Dashboard Message */
.dashboard-message {
    text-align: center;
    font-size: 16px;
    color: var(--gray-600);
    margin-top: 20px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .main-content-section {
        flex-direction: column;
    }

    .left-column,
    .right-column {
        margin: 0;
        height: 50%;
        /* Adjust height for independent scrolling */
    }

    .right-column {
        margin-top: 10px;
    }

    .controls-section {
        flex-direction: column;
    }

    .controls-section>* {
        margin-bottom: 10px;
    }

    .status-message {
        text-align: left;
    }
}




/* Mobile Adjustments */
@media (max-width: 768px) {
    .main-content-section {
        flex-direction: column;
        overflow: visible;
        /* Remove overflow */
    }

    .left-column,
    .right-column {
        margin: 0;
        height: auto;
        /* Remove fixed height */
        overflow: visible;
        /* Remove scrolling */
    }

    .right-column {
        margin-top: 10px;
    }
}


/* Ajustes para evitar solapamiento en pantallas menores a 770px */
@media (max-width: 770px) {
    .dashboard-container {
        height: auto;
        /* Remueve la altura fija */
    }

    /* Asegura que el main pueda crecer según el contenido */
    main {
        flex: 1 0 auto;
    }

    /* Opcional: Agregar padding inferior al main para evitar que el contenido toque el footer */
    main {
        padding-bottom: 60px;
        /* Ajusta según la altura de tu footer */
    }

    /* Ajustar el footer para que siempre esté visible al final */
    body {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }

    main {
        flex: 1;
    }
}


/* Floating Doctor Notes Box */

.doctor-notes-box {
   /*  position: fixed; */
    bottom: 20px;
    /* left: 50%;
    transform: translateX(-50%); */
    background-color: var(--main-white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-4px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    padding: 10px 15px;
    display: flex;
    flex-wrap: wrap;
    /* Permitir que los elementos se ajusten en pantallas pequeñas */
    align-items: center;
    justify-content: center;
    z-index: 1001;
    max-width: 100%;
}

/* Para pantallas de tablet y laptop */
/* @media (min-width: 768px) {
    .doctor-notes-box {
        width: 70%;
    }
} */

#doctorNotesBox:not(.doctor-notes-summary) {
    position: fixed; 
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
}

@media (min-width: 992px) {
    #doctorNotesBox:not(.doctor-notes-summary) {
        width: 70%;
    }
}

/* Estilos para notes-and-save */
.notes-and-save {
    display: flex;
    align-items: center;
    flex: 1 1 100%;
    margin-bottom: 10px;
    /* Espacio entre las dos secciones */
}

.doctor-notes-box textarea {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-4px);
    font-size: 14px;
    margin-right: 10px;
    resize: none;
    /* Deshabilitar el cambio de tamaño manual */
    overflow-y: auto;
    height: calc(1.5em * 2);
    /* Altura inicial para 2 líneas */
    max-height: calc(1.5em * 4);
    /* Altura máxima para 4 líneas */
}

#doctorNotesBox button {
    padding: 8px 16px;
    background-color: var(--blue-dark);
    color: var(--main-white);
    border: none;
    border-radius: var(--radius-4px);
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 14px;
}

#doctorNotesBox button:hover {
    background-color: var(--blue-darker);
}

/* Estilos para proceed-to-diagnosis */
.proceed-to-diagnosis {
    flex: 1 1 100%;
    text-align: center;
    /* Centrar el botón */
}

#proceedToDiagnosisBtn {
    padding: 8px 16px;
    background-color: var(--green);
    color: var(--main-white);
    border: none;
    border-radius: var(--radius-4px);
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 14px;
    width: 100%;
}

#proceedToDiagnosisBtn:hover {
    background-color: var(--green-dark);
    /* Ajustar según sea necesario */
}

/* Para pantallas móviles */
@media (max-width: 480px) {
    .doctor-notes-box {
        width: 90%;
        padding: 8px 10px;
    }

    .doctor-notes-box textarea {
        padding: 6px 10px;
        font-size: 12px;
        height: calc(1.5em * 2);
        /* Altura inicial para 2 líneas */
        max-height: calc(1.5em * 3);
        /* Altura máxima para 3 líneas */
    }

    .doctor-notes-box button {
        padding: 6px 12px;
        font-size: 12px;
    }

    #proceedToDiagnosisBtn {
        padding: 6px 12px;
        font-size: 12px;
    }
}


/* Report Container */
.report-container {
    display: flex;
    flex-direction: column;
}

.report-field {
    margin-bottom: 4px;
}

.report-field h3 {
    margin-bottom: 4px;
    color: var(--gray-900);
}

.text-box {
    background-color: var(--gray-200);
    padding: 10px;
    border-radius: var(--radius-4px);
    min-height: 100px;
    border: 1px solid var(--gray-400);
    font-size: 14px;
    line-height: 1.5;
    color: var(--gray-900);
    overflow-y: auto;
}

.text-box[contenteditable="true"] {
    background-color: var(--main-white);
    border-color: var(--blue-dark);
}

.edit-button {
    margin-top: 10px;
    padding: 8px 16px;
    background-color: var(--blue-dark);
    color: var(--main-white);
    border: none;
    border-radius: var(--radius-4px);
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.edit-button:hover {
    background-color: var(--blue-darker);
}

/* Adjust Report Fields Layout */
.report-field {
    position: relative;
    /* To position the button absolutely within this container */
    margin-bottom: 8px;
    /* Reduced margin for tighter spacing */
}

/* Reduce Font Size for Headers */
.report-field h3 {
    margin-bottom: 4px;
    /* Reduced margin below headers */
    font-size: 14px;
    /* Smaller font size for headers */
}

/* Style the Text Boxes */
.report-field .text-box {
    background-color: var(--gray-200);
    padding: 4px;
    /* Reduced padding */
    border-radius: var(--radius-4px);
    min-height: 60px;
    /* Reduced minimum height */
    border: 1px solid var(--gray-400);
    font-size: 12px;
    /* Smaller font size to reduce text length */
    line-height: 1.4;
    /* Slightly tighter line height */
    color: var(--gray-900);
    overflow-y: auto;
    padding-right: 80px;
    /* Space for the button on the right */
    box-sizing: border-box;
    /* Ensure padding is included in width calculations */
}

/* Position the Edit Button to the Right of the Text Box */
.report-field .edit-button {
    position: absolute;
    top: 10px;
    /* Vertically center the button */
    right: 4px;
    /* Align to the right */
    transform: translateY(-50%);
    /* Center vertically */
    font-size: 12px;
    /* Smaller font size for the button */
    padding: 6px 12px;
    /* Reduced padding */
    background-color: var(--blue-dark);
    color: var(--main-white);
    border: none;
    border-radius: var(--radius-4px);
    cursor: pointer;
    transition: background-color 0.3s;
}

/* Adjust Hover State for Edit Button */
.report-field .edit-button:hover {
    background-color: var(--blue-darker);
}

/* Optional: Adjust Text Box When in Edit Mode */
.text-box[contenteditable="true"] {
    background-color: var(--main-white);
    border-color: var(--blue-dark);
}

/* Ensure the Text Box Doesn't Overlap with the Button */
.report-field .text-box {
    padding-right: 60px;
    /* Additional padding to accommodate button width */
}

/* Report Container */
.report-container {
    display: flex;
    flex-direction: column;
   /*  width: 90%; */
}

.report-field {
    position: relative;
    margin-bottom: 5px;
}

.report-field h3 {
    margin-bottom: 5px;
    color: var(--gray-900);
}

.text-box {
    background-color: var(--gray-100);
    padding: 10px;
    border-radius: var(--radius-4px);
    min-height: 80px;
    border: 1px solid var(--gray-200);
    font-size: 14px;
    line-height: 1.5;
    color: var(--gray-900);
    overflow-y: auto;
    position: relative;
    /* Added for spinner positioning */
}

.text-box[contenteditable="true"] {
    background-color: var(--main-white);
    border-color: var(--blue-dark);
}

.edit-button {
    margin-top: 10px;
    padding: 8px 16px;
    background-color: var(--blue-dark);
    color: var(--main-white);
    border: none;
    border-radius: var(--radius-4px);
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.edit-button:hover {
    background-color: var(--blue-darker);
}

/* Loading Spinner Styles */
.text-box.loading {
    /* Keep the text visible while loading */
}

.text-box.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 4px solid var(--gray-200);
    border-top: 4px solid var(--blue-dark);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Styles for disabled proceedToDiagnosisBtn */
#proceedToDiagnosisBtn:disabled,
#proceedToDiagnosisBtn.disabled,
#proceedToDiagnosisTrialBtn:disabled,
#proceedToDiagnosisTrialBtn.disabled,
#finishPsicoSessionBtn:disabled, 
#finishPsicoSessionBtn.disabled {
    background-color: var(--gray-300);
    cursor: not-allowed;
    color: var(--gray-600);
}

/* Right Column Styles */
.right-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: 10px;
}

/* Generate Summary Button */
.generate-summary-button {
    margin-bottom: 10px;
    padding: 8px 16px;
    background-color: var(--blue-dark);
    color: var(--main-white);
    border: none;
    border-radius: var(--radius-4px);
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    width: 100%;
}

.generate-summary-button:hover {
    background-color: var(--blue-darker);
}

.generate-summary-button:disabled {
    background-color: var(--gray-400);
    cursor: not-allowed;
}

/* Summary Container */
.summary-container {
    margin-bottom: 10px;
}

.summary-text-box {
    min-height: 200px;
    margin-bottom: 10px;
    background-color: var(--gray-200);
    padding: 10px;
    border-radius: var(--radius-4px);
    border: 1px solid var(--gray-400);
    font-size: 14px;
    line-height: 1.5;
    color: var(--gray-900);
    overflow-y: auto;
    position: relative;
    /* For spinner positioning */
}

.summary-text-box[contenteditable="true"] {
    background-color: var(--main-white);
    border-color: var(--blue-dark);
}

.summary-text-box.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 4px solid var(--gray-200);
    border-top: 4px solid var(--blue-dark);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Copy Button */
.copy-button {
    padding: 8px 16px;
    background-color: var(--blue-dark);
    color: var(--main-white);
    border: none;
    border-radius: var(--radius-4px);
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.copy-button:hover {
    background-color: var(--blue-darker);
}

.copy-button:disabled {
    background-color: var(--gray-400);
    cursor: not-allowed;
}

/* Finish Consultation Button */
.finish-button {
    margin-top: auto;
    /* Push the button to the bottom */
    align-self: flex-end;
    /* Align to the right */
    padding: 8px 16px;
    background-color: var(--red-dark);
    color: var(--main-white);
    border: none;
    border-radius: var(--radius-4px);
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.finish-button:hover {
    background-color: var(--red-darker);
}


/* Doctor Notes Summary Styles */
.doctor-notes-summary {
    width: calc(100%-20px);
    min-height: 200px;
    margin-bottom: 10px;
    margin-top: 30px;
    background-color: var(--gray-200);
    padding: 10px;
    border-radius: var(--radius-4px);
    border: 1px solid var(--gray-400);
    font-size: 14px;
    line-height: 1.5;
    color: var(--gray-900);
    overflow-y: auto;
    position: relative;
    /* For spinner positioning */
}


/* Note Container */
.note-container {
    background-color: var(--gray-100);
    padding: 20px;
    border-radius: var(--radius-8px);
    width: 80%;
    /* Changed from max-width: 800px to width: 80% */
    margin: 0 auto;
    margin-top: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    /* Ensure padding is included in width calculations */
}

/* Note Header */
.note-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.note-header .creation-date,
.note-header .update-date {
    font-size: 14px;
    color: var(--gray-600);
}

/* Doctor Notes Textarea */
.doctor-notes {
    width: 100%;
    height: 300px;
    padding: 12px;
    font-size: 16px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-4px);
    resize: vertical;
    font-family: 'Inter', sans-serif;
    color: var(--gray-900);
    box-sizing: border-box;
    margin-bottom: 20px;
    /* Increased margin to create space for the button */
    background-color: var(--gray-200);
}

/* Save Button */
.save-button {
    padding: 12px 24px;
    font-size: 16px;
    border: none;
    border-radius: var(--radius-6px);
    background-color: var(--blue-dark);
    color: var(--main-white);
    cursor: pointer;
    transition: background-color 0.3s;
    display: block;
    /* Changed from float: right to block */
    margin: 0 auto;
    /* Center the button */
    max-width: 200px;
    /* Optional: Limit the maximum width of the button */
}

.save-button:hover {
    background-color: var(--blue-darker);
}

/* Disabled Save Button */
.save-button.disabled,
.save-button:disabled {
    background-color: var(--gray-400);
    cursor: not-allowed;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .note-container {
        padding: 15px;
        margin-top: 15px;
        width: 100%;
    }

    .doctor-notes {
        height: 250px;
        padding-right: 0;
    }

    .record-icon {
        width: 24px;
        height: 24px;
        cursor: pointer;
        z-index: 2;
        background: white;
        border-radius: 50%;
        padding: 5px;
        box-shadow: 0px 0px 10px rgba(0, 0, 0, .15);
    }

    .save-button {
        width: 100%;
        max-width: none;
        /* Remove max-width on smaller screens */
    }
}

@media (max-width: 480px) {
    .note-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .note-header .creation-date,
    .note-header .update-date {
        margin-bottom: 5px;
    }

    .doctor-notes {
        height: 200px;
    }

    .save-button {
        padding: 10px 20px;
        font-size: 14px;
    }
}


/* Styles for the informational text under patient name in patient chat page*/
.chat-info {
    font-size: 0.8em;
    /* Smaller font size */
    font-style: italic;
    /* Italic text */
    color: var(--gray-500);
    /* Subtle gray color */
    margin-top: 5px;
    /* Space above the text */
}


/* Responsive Adjustment for Mobile Devices of chat-sobre-paciente.html page */
@media (max-width: 480px) {
    .input-area {
        flex-direction: column;
        /* Stack input and button vertically */
    }

    .input-area input[type="text"] {
        margin-right: 0;
        /* Remove right margin */
        margin-bottom: 10px;
        /* Add space below the input */
    }

    .input-area button {
        width: 100%;
        /* Make the button full width */
    }
}


/* Credits Info Styles */
#creditsInfo {
    font-weight: bold;
    margin-right: 10px;
}

.credits-positive {
    color: var(--green);
}

.credits-negative {
    color: var(--red-dark);
}

/* Ensure header-right items are properly aligned */
.header-right {
    display: flex;
    align-items: center;
}

@media (max-width: 600px) {

    /* Reduce the font size of the credits information */
    #creditsInfo {
        font-size: 12px;
        /* Adjust as needed */
        margin-right: 10px;
        /* Reduce right margin to prevent crowding */
        text-align: right;
    }

    /* Adjust the header-right to ensure proper alignment */
    .header-right {
        flex-wrap: wrap;
        /* Allow items to wrap to the next line if necessary */
        justify-content: flex-end;
        /* Ensure items are aligned to the right */
    }

    /* Ensure nav-links and sign-out button have appropriate spacing */
    .nav-links {
        margin-top: 5px;
        /* Add top margin when wrapping occurs */
    }

    .header-button {
        margin-left: 15px;
        /* Adjust left margin for better spacing */
        margin-top: 5px;
        /* Add top margin when wrapping occurs */
    }
}


.signup-container {
    background-color: var(--main-white);
    padding: 30px 40px;
    border-radius: var(--radius-8px);
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    margin: 100px auto;
    box-sizing: border-box;
    text-align: center;
}

.signup-container h2 {
    margin-bottom: 20px;
    color: var(--gray-900);
    font-size: 1.8em;
}

.signup-container input[type="email"],
.signup-container input[type="password"],
.signup-container input[type="text"],
.signup-container select {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 15px;
    border-radius: var(--radius-4px);
    border: 1px solid var(--gray-200);
    box-sizing: border-box;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    color: var(--gray-900);
}

.signup-container input::placeholder,
.signup-container select {
    color: var(--gray-400);
}

.signup-container button {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 10px;
    background-color: var(--blue-dark);
    color: var(--main-white);
    border: none;
    border-radius: var(--radius-4px);
    cursor: pointer;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    transition: background-color 0.3s ease;
}

.signup-container button:hover {
    background-color: var(--blue-darker);
}

.signup-container #message {
    margin-top: 10px;
    color: var(--red-darker);
    font-size: 14px;
}

.signup-container .checkboxes {
    text-align: left;
    margin-bottom: 15px;
}

.signup-container .checkboxes label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: var(--gray-900);
}

.signup-container .checkboxes input[type="checkbox"] {
    margin-right: 10px;
}

.signup-container .checkboxes a {
    color: var(--blue-dark);
    text-decoration: none;
}

.signup-container .checkboxes a:hover {
    text-decoration: underline;
}

/* Styles for 'Recuperar mi contraseña' link */
.forgot-password-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--blue-dark);
    text-decoration: none;
    font-size: 14px;
}

.forgot-password-link:hover {
    text-decoration: underline;
}

/* Styles for 'Volver a acceder a mi cuenta' link */
.back-to-login-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--blue-dark);
    text-decoration: none;
    font-size: 14px;
}

.back-to-login-link:hover {
    text-decoration: underline;
}


/* New styles for mi-cuenta.html */

.account-details {
    margin-top: 20px;
    max-width: 600px;
}

.account-field {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.account-field label {
    width: 200px;
    font-weight: bold;
    color: var(--gray-900);
}

.account-field span {
    flex: 1;
    color: var(--gray-600);
}

.change-plan-button {
    margin-left: 10px;
    padding: 8px 16px;
    background-color: var(--red-dark);
    color: var(--main-white);
    border: none;
    border-radius: var(--radius-4px);
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.change-plan-button:hover {
    background-color: var(--red-darker);
}

.contact-text {
    margin-top: 30px;
    font-size: 14px;
    color: var(--gray-600);
}

.contact-text a {
    color: var(--blue-dark);
    text-decoration: none;
}

.contact-text a:hover {
    text-decoration: underline;
}


/* Styles for the plan boxes */

.plans-container {
    width: 100%;
    margin-top: 20px;
}

.plans-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.plan-box {
    background-color: var(--gray-300);
    /* Changed from var(--gray-100) to a darker gray */
    border: 1px solid var(--gray-400);
    /* Optional: Slightly darker border */
    border-radius: var(--radius-8px);
    /* Increased border-radius for more rounded corners */
    padding: 20px;
    width: calc(33% - 20px);
    box-sizing: border-box;
    margin: 10px;
    text-align: center;
    transition: background-color 0.3s, border 0.3s;
    /* Smooth transition for hover effects */
}

.plan-box:hover {
    background-color: var(--gray-200);
    /* Optional: Darker background on hover */
    border: 2px solid var(--blue-dark);
    /* Optional: Thicker border on hover */
}


.plan-box h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--gray-900);
}

.plan-box p {
    margin-bottom: 10px;
    color: var(--gray-700);
}

.plan-box .current-plan-note {
    margin-top: 15px;
    font-weight: bold;
    color: var(--blue-dark);
    font-size: 1em;
    /* Ensures consistency with other text */
}

/* Highlight the current plan with a distinct border and background */
.current-plan {
    border: 2px solid var(--blue-dark);
    background-color: var(--gray-200);
    /* Slightly different shade to distinguish current plan */
}

/* Access message styles */

.access-message {
    margin-top: 30px;
    font-size: 16px;
    /* Increased font size from 14px to 16px */
    color: var(--gray-600);
    text-align: center;
    /* Center the text */
}

.access-message a {
    color: var(--blue-dark);
    text-decoration: none;
    font-weight: bold;
    /* Optional: Make the link stand out */
}

.access-message a:hover {
    text-decoration: underline;
}

/* Responsive adjustments for plan boxes */
@media (max-width: 768px) {
    .plan-box {
        width: calc(50% - 20px);
    }
}

@media (max-width: 480px) {
    .plan-box {
        width: 100%;
        margin: 10px 0;
    }
}

.no-content-message {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    /* Adjusts height to center within viewport */
    font-size: 1.5em;
    color: #333;
    font-weight: 500;
    text-align: center;
    padding: 0 20px;
}


/* About Us Section Styles */
#about-us {
    padding: 60px 20px;
    background-color: var(--main-white);
}

#about-us h2 {
    font-size: 2em;
    color: var(--gray-900);
    margin-bottom: 30px;
    text-align: center;
    font-weight: 600;
}

#about-us p {
    font-size: 1em;
    color: var(--gray-700);
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto 20px auto;
    text-align: left;
}

#about-us p:last-child {
    margin-bottom: 0;
}

/* Responsive Styles for About Us Section */
@media (max-width: 768px) {
    #about-us {
        padding: 40px 15px;
    }

    #about-us h2 {
        font-size: 1.8em;
        margin-bottom: 25px;
    }

    #about-us p {
        font-size: 0.95em;
        padding: 0 10px;
        text-align: left;
    }
}

@media (max-width: 480px) {
    #about-us h2 {
        font-size: 1.5em;
        margin-bottom: 20px;
    }

    #about-us p {
        font-size: 0.9em;
        padding: 0 5px;
    }
}


/* Styles for Chat and References Container */
.chat-and-references-container {
    display: flex;
    flex-direction: column;
    /* Default to column on small screens */
    gap: 20px;
    /* Space between chat and references */
}

@media (min-width: 1024px) {
    .chat-and-references-container {
        flex-direction: row;
        /* Side by side on larger screens */
    }

    /* Adjust flex-grow to set proportions */
    .chat-container {
        flex: 7;
        /* 70% of the container */
        /* Ensure it takes up the correct width */
        max-width: 70%;
    }

    .references-container {
        flex: 3;
        /* 30% of the container */
        /* Ensure it takes up the correct width */
        max-width: 30%;
    }
}

/* Ensure that on larger screens, the containers have appropriate widths */
@media (min-width: 1024px) {

    .chat-container,
    .references-container {
        /* Remove any conflicting width settings */
        width: auto;
    }
}

/* Optional: Ensure that the references container is ordered correctly */
@media (min-width: 1024px) {
    .chat-container {
        order: 1;
    }

    .references-container {
        order: 2;
    }
}

/* Optional: Adjust the references container to have its own scroll */
.references-container {
    flex: 3;
    /* 30% */
    max-height: 70vh;
    /* Adjust as needed */
    overflow-y: auto;
    padding: 10px;
    background-color: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-4px);
}

.chat-container {
    flex: 7;
    /* 70% */
    display: flex;
    flex-direction: column;
    max-height: 70vh;
    /* Adjust as needed */
}

/* Ensure independent scrolling */
.chat-window {
    flex: 1;
    overflow-y: auto;
}

/* References Container Scroll */
.references-container {
    overflow-y: auto;
}

/* Ensure that on small screens, the references are below the chat */
@media (max-width: 1023px) {
    .chat-and-references-container {
        flex-direction: column;
    }

    .chat-container,
    .references-container {
        max-width: 100%;
    }
}

/* Styles for References Header */
.references-header {
    font-size: 1.2em;
    color: var(--gray-900);
    margin-bottom: 15px;
    font-weight: bold;
    text-align: left;
    /* Center the header text */
}

/* Styles for No External References Message */
.no-external-references-message {
    font-size: 1em;
    color: var(--gray-600);
    text-align: center;
    margin-bottom: 15px;
    padding: 10px;
    background-color: var(--gray-200);
    border-radius: var(--radius-4px);
}

/* Optional: Add some spacing between reference boxes */
.references-container .reference-box {
    margin-bottom: 15px;
}

/* Ensure the references container has some padding */
.references-container {
    padding: 15px;
}

/* Adjust reference-box hover for better visibility */
.references-container .reference-box:hover {
    background-color: var(--gray-200);
    /* Slightly different shade for hover */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}


/* Doctor Input Diseases Styles */
#doctor-input-diseases-container {
    background-color: var(--blue-light);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-8px);
    padding: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.doctor-disease-entry.new-entry {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

#doctor-input-diseases-container .doctor-disease-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Distributes items between left and right */
    margin-bottom: 10px;
    width: 100%;
    /* Ensure it spans the container width */
}

#doctor-input-diseases-container .doctor-disease-input {
    flex: 1;
    padding: 3px 6px;
    /* Reduced padding */
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-4px);
    font-size: 12px;
    /* Reduced font size */
    margin-right: 3px;
    /* Reduced margin */
    background-color: var(--gray-100);
}

#doctor-input-diseases-container .doctor-disease-input:disabled {
    background-color: var(--gray-200);
}

#doctor-input-diseases-container .doctor-disease-button {
    padding: 5px 12px;
    /* Further reduced padding */
    background-color: var(--blue-dark);
    color: var(--main-white);
    border: none;
    border-radius: var(--radius-4px);
    cursor: pointer;
    font-size: 12px;
    /* Further reduced font size */
    transition: background-color 0.3s;
    margin-left: 3px;
    /* Optional for spacing */
    flex: none;
    /* Prevent stretching */
    align-self: flex-end;
    /* Ensure it aligns to the bottom edge, if needed */
}

#doctor-input-diseases-container .doctor-disease-button:hover {
    background-color: var(--blue-darker);
}

#doctor-input-diseases-container .doctor-disease-button.eliminar {
    background-color: var(--red-dark);
}

#doctor-input-diseases-container .doctor-disease-button.eliminar:hover {
    background-color: var(--red-darker);
}

.added-disease-pill {
    display: inline-flex;
    align-items: center;
    background-color: var(--gray-400); /* Mismo gris que tus disease-globe */
    color: var(--main-white);
    padding: 6px 14px;
    border-radius: var(--radius-4px); /* Cuadrados redondeados igual que los otros */
    font-size: 12px;
    margin: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    font-weight: 400;
}

.added-disease-pill:hover {
    background-color: none;
}

.added-diseases-wrapper {
    display: flex;
    flex-wrap: wrap;
    padding: 5px 0;
}

.btn-remove-disease {
    background: none !important; /* Quita el fondo azul */
    border: none !important;     /* Quita bordes */
    color: rgba(255, 255, 255, 0.929) !important; /* Blanco suave, no puro para no distraer */
    margin-left: 8px;
    cursor: pointer;
    padding: 0 !important;       /* Elimina el espacio interno que crea el cuadrado */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

/* Icono del cubo más pequeño */
.btn-remove-disease i {
    font-size: 12px; /* Tamaño del icono */
}

.btn-remove-disease:hover {
    color: #ff8585 !important; /* Rojo suave para indicar borrado */
    background: none !important;
}

/* Título interno de la sección */
.doctor-input-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-500);
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.new-entry .modern-select {
    padding: 8px 16px !important; /* Reducido de 12px a 6px */
    height: 14px; /* Forzamos una altura fija si fuera necesario */
    min-height: auto !important;
}

.new-entry .differential-diagnosis-button {
    padding: 6px 8px !important;
    height: auto !important;
    min-height: 28px;
    display: flex;
    align-items: center;
}

/* Differential Diagnosis Section Styles */

.differential-diagnosis-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px;
    background-color: var(--blue-light);
    /* Adjusted for better visibility */
    border: 1px solid var(--gray-300);
    /* Defined border color */
    border-radius: var(--radius-4px);
    margin-bottom: 20px;

}



/* Título con Globos VS */
.differential-diagnosis-header h3 {
    margin: 0;
    margin-right: 10px;
    font-size: 14px; /* Aumentado ligeramente para legibilidad con globos */
    flex: 0 1 auto !important;
    word-wrap: break-word;
    display: flex !important;
    flex-direction: row !important; /* Fuerza fila */
    align-items: center;
    flex-wrap: wrap !important;
    gap: 8px;
    min-width: 0;

}

/* Los "Globos" para las enfermedades */
.disease-globe {
    background-color: var(--gray-400);
    color: var(--main-white);
    padding: 5px 10px;
    border-radius: var(--radius-4px);
    margin: 0;
    font-size: 12px;
    font-weight: 400;         
    text-align: center;

    
    /* Para que el texto largo rompa dentro del globo y lo haga más alto */
    word-break: break-word; 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 1 auto;
    min-width: fit-content;

    text-align: center;
    line-height: 1.3;
    word-wrap: break-word; /* Rompe palabras si es necesario */
    white-space: normal;   /* Permite saltos de línea internos */
    
}

.vs-badge {
    color: var(--gray-700);
    font-weight: 700;
    font-size: 0.9em;
    margin: 0 2px;
    flex: 0 0 auto;
    white-space: nowrap;
}

.delete-differential-button {
    background-color: #ff8585 !important; /* Rojo profesional (tipo Tailwind red-600) */
    color: white !important;
    border: none !important;
    border-radius: var(--radius-4px);
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Efecto Hover (Oscurece el rojo al pasar el ratón) */
.delete-differential-button:hover {
    background-color: #ee6060 !important; /* Rojo más intenso */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

@media (max-width: 1100px) {
    .differential-diagnosis-header h3 {
        flex-direction: column !important; /* Cambia a columna */
        align-items: stretch !important;  /* Estira los globos al ancho total */
        gap: 5px;
    }

    .disease-globe {
        flex: none;
        width: 100%; /* El globo ocupa todo el ancho disponible */
        max-width: none;
        padding: 8px 12px; /* Un poco más de aire para dedos/táctil */
    }

    .vs-badge {
        margin: 2px 0;
        align-self: center; /* El VS se queda centrado entre los dos bloques */
    }

    .diff-prefix {
        margin-bottom: 5px;
        align-self: flex-start; /* El texto "Diferencial:" alineado a la izquierda */
    }

    .delete-differential-button {
        grid-column: 2;
        grid-row: 1; /* Forzamos que esté en la primera fila con el prefijo */
        margin: 0 0 2px 16px !important;
        align-self: flex-start;
    }
}



/* Differential Diagnosis Button Styles */
.differential-diagnosis-button {
    margin-bottom: 10px;
    padding: 6px 10px !important;
    min-height: 26px;
    /* Reduced padding */
    background-color: var(--blue-dark);
    color: var(--main-white);
    border: none;
    border-radius: var(--radius-4px);
    cursor: pointer;
    font-size: 12px !important;
    /* Reduced font size */
    transition: background-color 0.3s;
}

.differential-diagnosis-button:hover {
    background-color: var(--blue-darker);
}

.differential-diagnosis-button:disabled,
.differential-diagnosis-button.disabled {
    background-color: var(--gray-400);
    cursor: not-allowed;
    color: var(--gray-600);
}

.differential-diagnosis-box {
    background-color: var(--blue-light);
    border-radius: var(--radius-4px);
    padding: 10px;
    margin-bottom: 10px;
}

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

.differential-diagnosis-header h3 {
    margin: 0;
    font-size: 12px;
    flex: 1;
    word-wrap: break-word;
    margin-right: 10px;
}

.delete-differential-button {
    padding: 4px 8px !important;
    min-height: 26px;
    background-color: var(--red-dark);
    color: var(--main-white);
    border: none;
    border-radius: var(--radius-4px);
    cursor: pointer;
    font-size: 12px !important;
    transition: background-color 0.3s;
    margin: 0;
    flex-shrink: 0;
}

.delete-differential-button:hover {
    background-color: var(--red-darker);
}

.differential-diagnosis-body {
    position: relative;
}

.differential-diagnosis-body .spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    /* Center the spinner */
    z-index: 1;
    /* Ensure it appears above other elements */
}

.differential-diagnosis-pills {
    display: flex;
    flex-wrap: wrap;
}

.differential-diagnosis-pill {
    background-color: var(--gray-400);
    color: var(--main-white);
    padding: 5px 10px;
    border-radius: var(--radius-4px);
    margin: 5px;
    font-size: 12px;
    cursor: pointer;
}

.differential-diagnosis-pill.selected {
    background-color: var(--blue-dark);
}

.differential-diagnosis-content {
    margin-top: 10px;
}


/* Styles for the textarea container and record icon */
.textarea-container {
    position: relative;
}

.doctor-notes {
    width: 100%;
    height: 200px;
    padding: 12px;
    padding-right: 50px;
    /* Add padding to the right */
    font-size: 16px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-4px);
    resize: vertical;
    font-family: 'Inter', sans-serif;
    color: var(--gray-900);
    background-color: var(--main-white);
}

.record-icon {
    position: absolute;
    bottom: 32px;
    right: 8px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    z-index: 2;
    /* Ensure the icon appears above the textarea */
}

/* Styles for the generate report container */
.generate-report-container {
    display: flex;
    align-items: center;
    margin-top: 20px;
    margin-bottom: 10px;
    width: 100%;
    box-sizing: border-box;
    /* Include padding and borders in width */
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .generate-report-container {
        flex-direction: column;
        gap: 10px;
    }

    #generateButton {
        width: 100%;
    }
}

.prompt-input {
    flex: 1;
    /* Keeps it flexible within a flex container */
    width: 100%;
    /* Ensures it stretches to the width of the container */
    box-sizing: border-box;
    /* Includes padding and border in the element's total width */
    padding: 6px 24px;
    font-size: 16px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-4px);
    font-family: 'Inter', sans-serif;
    color: var(--gray-900);
}

.generate-button {
    padding: 6px 24px;
    font-size: 16px;
    border: none;
    border-radius: var(--radius-6px);
    background-color: var(--blue-dark);
    color: var(--main-white);
    cursor: pointer;
    transition: background-color 0.3s;
    margin-left: 5px;
}

.generate-button:hover {
    background-color: var(--blue-darker);
}

/* Disabled generate button */
.generate-button.disabled,
.generate-button:disabled {
    background-color: var(--gray-400);
    cursor: not-allowed;
}

/* Styles for the generated text container */
.generated-text-container {
    margin-top: 20px;
    position: relative;
    /* Needed for positioning the spinner */
}

.generated-text {
    width: 100%;
    height: 200px;
    padding: 12px;
    font-size: 16px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-4px);
    resize: vertical;
    font-family: 'Inter', sans-serif;
    color: var(--gray-900);
    background-color: var(--main-white);
    box-sizing: border-box;
}


/* Spinner styles */
.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border-left-color: var(--blue-dark);
    animation: spin 1s linear infinite;
    position: absolute;
    left: 50%;
    top: 50%;
    /* Remove the transform from here */
    /* transform: translate(-50%, -50%); */
}

@keyframes spin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}


@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
        /* Adjust the scale as needed */
    }

    100% {
        transform: scale(1);
    }
}

.recording {
    animation: pulse 1s infinite;
}

/* Language Select Box */
.language-select {
    min-width: 150px;
    padding: 5px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-4px);
    background-color: var(--main-white);
    color: var(--gray-900);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    cursor: pointer;
  }
  
  /* Update Language Button */
  .update-language-button {
    padding: 8px 16px;
    margin-left: 10px;
    background-color: var(--blue-dark);
    color: var(--main-white);
    border: none;
    border-radius: var(--radius-4px);
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
  }
  
  .update-language-button:hover {
    background-color: var(--blue-darker);
  }


/* Log Table Styles */
.log-container {
    margin-top: 20px;
    background-color: var(--gray-100);
    border-radius: var(--radius-4px);
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow-x: auto; /* Horizontal scroll if table is wider */
}

.log-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--main-white);
    text-align: left;
    font-size: 14px;
    color: var(--gray-900);
}

.log-table thead tr {
    background-color: var(--blue-light);
}

.log-table th,
.log-table td {
    padding: 10px;
    border-bottom: 1px solid var(--gray-200);
    vertical-align: top;
}

.log-table th {
    font-weight: 600;
    color: var(--gray-900);
}

.log-table tr:nth-child(even) {
    background-color: var(--gray-100);
}

/* Loading Spinner (centered within .log-container) */
.log-container {
    position: relative;
}

.log-container .loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* "Load More" button */
.log-pagination {
    margin-top: 20px;
    text-align: center;
}

.log-load-more {
    padding: 10px 20px;
    font-size: 14px;
    border: none;
    border-radius: var(--radius-4px);
    background-color: var(--blue-dark);
    color: var(--main-white);
    cursor: pointer;
    transition: background-color 0.3s;
}

.log-load-more:hover {
    background-color: var(--blue-darker);
}

/* (Optional) Show pointer on table rows if you plan to make them clickable */
.log-table tr:hover {
    background-color: var(--gray-200);
    cursor: default;
}



/* Blog post Section Styles */
#blog-post {
    padding: 60px 20px;
    background-color: var(--main-white);
}

#blog-post h1 {
    font-size: 2em;
    color: var(--gray-900);
    margin-bottom: 30px;
    text-align: center;
    font-weight: 600;
}

#blog-post h2 {
    font-size: 1.5em;
    color: var(--gray-900);
    margin-bottom: 15px;
    text-align: left;
    font-weight: 600;
    max-width: 800px;
}


#blog-post p {
    font-size: 1em;
    color: var(--gray-700);
    line-height: 1.6;
    max-width: 900px;
    margin: 0 auto 20px auto;
    text-align: left;
}

#blog-post li {
    font-size: 1em;
    color: var(--gray-700);
    line-height: 1.0;
    max-width: 900px;
    margin: 0 auto 20px auto;
    text-align: left;
}

/* **Add the following styles** */
#blog-post a,
#blog-post p,
#blog-post li {
    overflow-wrap: break-word; /* Modern property */
    word-wrap: break-word;     /* For older browsers */
}

#blog-post p:last-child {
    margin-bottom: 0;
}

/* Responsive Styles for blog-post */
@media (max-width: 768px) {
    #blog-post {
        padding: 40px 15px;
    }

    #blog-post h1 {
        font-size: 1.8em;
        margin-bottom: 25px;
    }

    #blog-post h2 {
        font-size: 1.2em;
        margin-bottom: 15px;
    }

    #blog-post p {
        font-size: 0.95em;
        padding: 0 10px;
        text-align: left;
    }
}

@media (max-width: 480px) {
    #blog-post h1 {
        font-size: 1.5em;
        margin-bottom: 20px;
    }

    #blog-post h2 {
        font-size: 1.1em;
        margin-bottom: 10px;
    }

    #blog-post p {
        font-size: 0.9em;
        padding: 0 5px;
    }
}



/* --------------------------------------------------- */
/* New Styles for Blog Page (blog.html)                */
/* --------------------------------------------------- */

/* Blog Container - Wraps all blog cards */
.blog-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;  /* Center the container */
    padding: 20px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 1fr;   /* Default: single column */
    gap: 20px;                    /* Space between columns/rows */
}

/* Blog Card */
.blog-card {
    background-color: var(--blue-light);
    border-radius: var(--radius-8px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;  /* Ensures the image is clipped if needed */
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;   /* Show pointer to indicate it's clickable */
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Blog Card Image */
.blog-card img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Blog Card Content */
.blog-card-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Blog Card Title */
.blog-card-title {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 10px 0;
}

/* Blog Card Description (one-line summary) */
.blog-card-summary {
    font-size: 0.95em;
    color: var(--gray-700);
    margin-bottom: auto;  /* Push "Leer más" link to bottom if you like */
}

/* "Leer más" or any call to action inside the card */
.blog-card-link {
    margin-top: 10px;
    font-weight: 500;
    color: var(--blue-dark);
    text-decoration: none;
    align-self: flex-start;
}

.blog-card-link:hover {
    text-decoration: underline;
}

/* Responsive Grid (5 columns on larger screens) */
@media (min-width: 1200px) {
    .blog-container {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* 2 or 3 columns for intermediate screen sizes (optional) */
@media (min-width: 768px) and (max-width: 1199px) {
    .blog-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Single column on smaller screens (mobile) */
@media (max-width: 767px) {
    .blog-container {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------- */
/* Pagination Styles                                   */
/* --------------------------------------------------- */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px; /* Space between links */
    margin: 20px auto;
    max-width: 400px;
}

/* Pagination Links */
.blog-pagination-link {
    text-decoration: none;
    font-weight: 500;
    color: var(--blue-dark);
    font-size: 1em;
    padding: 8px 12px;
    background-color: var(--gray-100);
    border-radius: var(--radius-4px);
    transition: background-color 0.3s;
}

.blog-pagination-link:hover {
    background-color: var(--gray-200);
    text-decoration: none;
}

/* Optional: Distinguish previous and next, if needed */
.blog-pagination-link.prev::before {
    content: "← ";
}

.blog-pagination-link.next::after {
    content: " →";
}

/* For smaller devices, you might reduce padding or font-size */
@media (max-width: 480px) {
    .blog-pagination {
        gap: 10px;
    }
    .blog-pagination-link {
        font-size: 0.9em;
        padding: 6px 10px;
    }
}

/* Styles for the team members cards */

#about-us-team h2 {
    font-size: 2em; /* Increased font size */
    text-align: center; /* Centered text */
    margin-bottom: 15px;  /* Added margin */
    color: var(--gray-900) /* Gray text color */
}

.team-container-cards {
    display: grid; /* Grid display */
    grid-template-columns: repeat(3, 1fr); /* 3 columns */
    gap: 20px; /* Space between cards */
    width: 100%; /* Full width */
    padding: 10px; /* Padding */
    box-sizing: border-box; /* Include padding in width */
    justify-content: center; /* Center content */
    align-items: flex-start; /* Align to the top */
}

/* Blog Card */
.team-card {
    background-color: var(--blue-light); /* Light blue background */
    border-radius: var(--radius-8px); /* Rounded corners */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Shadow effect */
    overflow: hidden; /* Clip overflow */
    transition: transform 0.3s, box-shadow 0.3s; /* Smooth transition */
    cursor: pointer; /* Show pointer */
    text-decoration: none; /* Remove underline */
    color: inherit; /* Inherit text color */
    display: grid; /* Grid display */
    grid-template-columns: 10% 35% 1fr; /* Columns */
    grid-template-areas: 'col1 col2 col3'; /* Grid areas */
    align-items: start; /* Align to the top */
    height: 100%; /* Full height */
    max-width: 450px; /* Max width */
}

/* Blog Card Image */
.card-profile img {
    border-radius: 50%; /* 50% for a circular image */
    padding: 10px; /* Delete the padding */
    width: 100px; /* Tamaño fijo para la imagen */
    height: 100px;
    object-fit: cover; /* Evita distorsión */
}

/* Blog Card Title */
.team-card-title {
    font-size: 1.1em; /*font size */
    font-weight: 600; /*font weight */
    color: var(--gray-900); /*gray text color */
    margin-top: 2%; /*top margin */
    margin-right: 10%; /*right margin */
    text-align: center; /* Centrar el texto */
    word-wrap: break-word; /* Romper palabras largas */
    white-space: normal; /* Permitir saltos de línea */
    line-height: 1.2; /* Ajustar la separación entre líneas */
    max-width: 90%; /* Evitar que se extienda demasiado */
}
/* Logo LinkedIn */
.logo-linkedin {
    grid-area: col1; /*grid area for the logo */
    max-width: 30px; /* logo width */
    margin-top: 10px; /* top margin */
    margin-left: 10px;  /* left margin */
    width: 30px; /* logo width */
    height: 30px; /* logo height */
}

/* Card Profile */
.card-profile {
    grid-area: col2; /*grid area for the profile */
    display: flex; /*flex display */
    flex-direction: column; /*column direction */
    align-items: center; /*center align items */
    justify-content: center; /*center justify content */
    padding-top: 0; /*top padding */
    text-align: center; /*center text */
    overflow: hidden; /*control overflow */
}

/* Blog Card Content */
.team-card-content {
    grid-area: col3; /*grid area for the content */
    width: 100%;  /*full width */
    padding-right: 10px; /*right padding */
    text-align: left; /*left align text */
    padding-top: 1em; /*top padding */
    box-sizing: border-box; /*include padding in width */
    overflow: hidden; /*control overflow */
    position: relative; /*position relative for absolute elements */
    height: auto; /*auto height */
    color: var(--gray-700); /*gray text color */
}

/* Internal container */

.team-card-link {
    text-decoration: none; /*remove underline */
    display: block; /*block display */
    width: 100%; /*full width */
    height: 100%; /*full height */
}

.team-card:hover {
    transform: scale(1.02); /*scale effect */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); /*shadow effect */
}



/******************* Media Queries *******************/

/* Media Query for 900px */
@media (max-width: 900px){ /*media query 900px */
    .team-container-cards {
        display: grid; /*grid display */
        grid-template-columns: repeat(2, 1fr); /*2 columns */
        justify-content: center; /*center content */
        margin: 0%; /*margin */
        width: 100%; /*full width */
        height: 100%; /*full height */
    }

    .team-card {
        margin-bottom: 20px; /*bottom margin */
        width: 100%; /*full width */
    }
}

/* Media Query for mobile devices 600px*/
@media (max-width: 600px) {
    .team-container-cards {
        display: grid; /*grid display */
        grid-template-columns: repeat(1, 1fr); /*1 column */
    }
    
    .team-card { 
        display: grid; /*grid display */
        width: 100%; /*full width */
    }

    /* Blog Card Image */
    .card-profile img {
        width: 110px; /*image width */
        height: 110px; /*auto height */
        object-fit: cover; /* Evita distorsión */
    }
}

/* Media Query for small devices */
@media (max-width: 480px) {
    
    /* Blog Card Image */
    .team-card {
        display: grid; /*grid display */
        grid-template-columns: 1fr; /*1 column */

        grid-template-rows: auto auto auto; /*auto rows */

        grid-template-areas: /*grid areas */ 
            "logo" 
            "profile"
            "content";
        justify-items: center; /*center items */
        width: 90%; /*90% width */
        margin: 0 auto; /*center margin */
        background-color: var(--blue-light); /*light blue background */
        border-radius: var(--radius-8px); /*rounded corners */
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /*shadow effect */
        padding: 0; /*padding */
    }
    /* Logo LinkedIn */
    .card-logo {
        grid-area: logo; /*grid area for the logo */
        justify-self: start; /*start justify self */
        margin-left: 1px; /*left margin */
        margin-top: 1px; /*top margin */
        max-width: 10px; /*max width */
    }
    /* Card Profile */
    .card-profile {
        grid-area: profile; /*grid area for the profile */
        display: flex; /*flex display */
        flex-direction: column; /*column direction */
        align-items: center; /*center align items */
        justify-content: center; /*center justify content */
        text-align: center; /*center text */
        padding: 0px; /*padding */
        margin-top: 20px; /*top margin */
    }
    /* Blog Card Content */
    .team-card-content {
        grid-area: content; /*grid area for the content */
        text-align: center; /*center text */
        padding: 5px; /*padding */
        width: 100%; /*full width */
        margin-top: 0px; /*top margin */

    }
    .card-profile img {
        border-radius: 50%; /* 50% for a circular image */
        padding: 10px; /* Delete the padding */
        width: 150px; /* Tamaño fijo para la imagen */
        height: 150px;
        object-fit: cover; /* Evita distorsión */
    }
}

/* New References Section Styles */
.references-section {
    background-color: var(--blue-light);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-4px);
    padding: 15px;
    margin-top: 20px;
}
.references-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--gray-900);
    font-size: 16px;
}

/* Reference Box Styles */
.reference-box {
    background-color: var(--gray-200);
    border: 1px solid var(--main-white);
    border-radius: var(--radius-4px);
    padding: 10px;
    margin-bottom: 15px;
}
.reference-box p {
    margin: 5px 0;
    font-size: 14px;
    color: var(--gray-900);
}

/* Button for viewing the document */
.view-document-button {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 10px;
    background-color: var(--blue-dark);
    color: var(--main-white);
    text-decoration: none;
    border: none;
    border-radius: var(--radius-4px);
    font-size: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.view-document-button:hover {
    background-color: var(--blue-darker);
}

/* Toggle summary button */
.toggle-summary-button {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 10px;
    background-color: var(--gray-400);
    color: var(--main-white);
    text-decoration: none;
    border: none;
    border-radius: var(--radius-4px);
    font-size: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.toggle-summary-button:hover {
    background-color: var(--gray-500);
}

/* Style for the summary text within each reference box */
.reference-summary {
    margin-top: 10px;
    font-size: 13px;
    color: var(--gray-700);
    border-top: 1px solid var(--gray-200);
    padding-top: 10px;
}

/* Styles for the trials page */
#trialInfo {
    max-width: 300px;
    padding: 20px;
    border: 5px;
    border-color: var(--main-black);
    align-items: center;
    justify-content: center;
    display: flex;


}

/* Styles for the diagnostic when participating in trials */
.diagnosis-user-section {
    background-color: var(--blue-light);
    border-radius: var(--radius-4px);
    padding: 10px;
    margin-bottom: 10px;
}

.diagnosis-user-section h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.diagnosis-input-row {
    margin-bottom: 10px;
}

.diagnosis-input-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--gray-900);
}

.diagnosis-input-row input[type="text"] {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-4px);
    font-size: 14px;
    box-sizing: border-box;
}

#saveDiagnosisBtn {
    padding: 10px 20px;
    font-size: 14px;
    border: none;
    border-radius: var(--radius-4px);
    background-color: var(--blue-dark);
    color: var(--main-white);
    cursor: pointer;
    transition: background-color 0.3s;
}

#saveDiagnosisBtn:disabled {
    background-color: var(--gray-400);
    cursor: not-allowed;
}

#saveDiagnosisBtn:hover:not(:disabled) {
    background-color: var(--blue-darker);
}

.diagnosis-case-reference {
    margin-bottom: 15px;
    padding: 10px;
    background-color: var(--blue-light);
    border-radius: var(--radius-4px);
}

.diagnosis-case-reference p {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-900);
}


/* ========================= */
/* Voice Notes Listing Styles */
/* ========================= */

/* Wrapper for the "Nueva nota" button (optional) */
.note-actions {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 20px;
  }
  
  /* Button for creating new notes */
  .add-note-button {
    background-color: var(--blue-dark);
    color: var(--main-white);
    border: none;
    border-radius: var(--radius-4px);
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
  }
  
  .add-note-button:hover {
    background-color: var(--blue-darker);
  }
  
  /* The box displaying each note */
  .note-box {
    background-color: var(--blue-light);
    border-radius: var(--radius-4px);
    margin: 10px 0;
    padding: 20px;
    width: 100%;
    max-width: 100%;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s, box-shadow 0.2s;
    display: flex;
    box-sizing: border-box;
  }
  
  .note-box:hover {
    background-color: var(--gray-100);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  }
  
  /* Timestamp area on each note box */
  .note-box .timestamp {
    flex: 1;
    color: var(--gray-600);
    font-size: 14px;
    margin-right: 20px;
  }
  
  /* Info area on each note box */
  .note-box .note-info {
    flex: 3;
  }
  
  .note-box h2 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--gray-900);
    font-size: 18px;
  }
  
  /* No Notes Message */
  #noNotesMessage {
    text-align: center;
    color: var(--gray-600);
    font-size: 18px;
  }

/* ------------------------------------------ */
/* FROM HERE ON WE DEFINE THE STYLES FOR THE
   LANDING PAGE OF THE PRECLINICAL TRIALS    */
/* ------------------------------------------ */

/* 1) "¿Qué es Medsys AI?" -> Green Section */
.question-about-us {
    background-color: #05a68e; /* Green */
    color: #ffffff;           /* White text */
    padding: 20px;
    text-align: center;       /* Center the text content */
  }
  
  .question-about-us h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #ffffff;           /* Ensure white color for heading */
  }
  
  .question-about-us p {
    font-size: 1.5em;
    color: #ffffff;           /* White text */
  }
  
  
  /* 3) "Metodología de Participación" -> Green Section */
  .participation-methodology {
    background-color: #05a68e;  /* Green */
    color: #ffffff;            /* White text */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
  }
  
  .participation-methodology h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #ffffff;
    text-align: center;
  }
  
  .participation-methodology ul {
    list-style-type: none;  /* remove default bullets */
    padding: 0;
    margin: 0;
  }
  
  .participation-methodology li {
    margin: 20px 0;
    text-align: left;
  }
  
  .participation-methodology p {
    color: #ffffff;         /* White text */
    font-size: 1.2em;
    margin: 5px 0;
  }
  
  .participation-methodology img {
    width: 100px;
    height: auto;
    margin-top: 10px;
    border-radius: 10px;
    display: block;
  }
  
  
  /* 5) "Inscripción" -> White Section, green button */
  .inscription {
    background-color: #ffffff; /* White */
    color: #000000;            /* Black text */
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 20px;
    max-width: 900px;          /* Limit the width */
    margin-left: auto;         /* Center horizontally */
    margin-right: auto;
  }
  
  .inscription h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: var(--gray-900);
  }
  
  .inscription p {
    font-size: 1.2em;
    margin-bottom: 20px;
    color: var(--gray-700);
  }
  
  
  /* 6) "Preguntas frecuentes" -> Green Section */
  .faq-questions {
    background-color: #05a68e;  /* Green */
    color: #ffffff;            /* White text */
    padding: 20px;
    text-align: center;
  }
  
  .faq-questions h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #ffffff;
  }


/* Limit container width for sections */
.section-container {
    max-width: 900px;       /* Adjust as needed (800px, 1000px, etc.) */
    margin: 0 auto;
    padding: 0 20px;        /* Some horizontal padding */
  }
  
  /* ¿Qué es Medsys AI? section */
  .question-about-us {
    background-color: #05a68e; /* Green background */
    color: #ffffff;            /* White text */
    padding: 40px 20px;        /* Enough space around */
    text-align: center;
  }
  
  /* We rely on .section-container within .question-about-us 
     to limit the text width. */
  
  /* Metodología de Participación (green section) */
  .participation-methodology {
    background-color: #05a68e;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border-radius: 0;   /* No rounded corners */
    margin-bottom: 0;   /* Remove the gap between sections */
}
    
  /* The <ul> is turned into a flex container with vertical stacking by default */
  .participation-methodology ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    /* Reduced this from 30px (or whatever you had before) to 15px */
    gap: 15px;
  }
  
  /* Each li is a row with image on the left and text on the right for larger screens */
  .participation-methodology li {
    display: flex;
    /* Change from "align-items: flex-start" to "center" 
       so the text is vertically centered next to the image */
    align-items: center;
    gap: 20px; /* space between image and text */
  }
  
  /* The image is locked at 250px wide on desktop */
.participation-methodology li img {
    flex: 0 0 250px;
    width: 250px;
    height: auto;
    border-radius: 10px;
    display: block;
  }
  
  /* The text content takes the remaining space */
.participation-methodology li .text-content {
    flex: 1;
  }
  
  /* Make headings or strong text stand out */
  .participation-methodology li .text-content p {
    margin: 0.3em 0;
    font-size: 1.1em;
  }
  
  /* Responsive for smaller screens: stack image above text */
  @media (max-width: 768px) {
    .participation-methodology li {
      flex-direction: column;
      align-items: center;        /* center items horizontally */
    }
  
    .participation-methodology li img {
      width: 80%;                 /* reduce to fit smaller screens */
      max-width: 250px;           /* keep 250px as a max if you like */
      margin-bottom: 10px;
    }
  
    .participation-methodology li .text-content {
      text-align: center;         /* optional if you want it centered */
    }
  }
  
  
  /* The Inscripción section remains the same white background, 
     with the green button. Just a reminder: */
  .inscription {
    background-color: #ffffff;
    color: #000000;
    padding: 40px 20px;
    text-align: center;
  }
  
  /* The same pattern with .section-container if you want to limit width */
  .inscription .section-container {
    /* If you add .section-container around the content, 
       it will limit the width. 
       For example, if you want to do so, you can. 
       Otherwise, you can keep it as is. */
  }
  
  .inscription h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: var(--gray-900);
  }
  
  .inscription p {
    font-size: 1.2em;
    margin-bottom: 20px;
    color: var(--gray-700);
  }
  
  
  /* FAQ section (if you want it in green or keep it as is) */
  .faq-questions {
    background-color: #05a68e;
    color: #ffffff;
    padding: 40px 20px;
    text-align: center;
  }
  
  .faq-questions h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #ffffff;
  }
   
/* Container for each methodology item */
.methodology-item {
    display: flex;
    align-items: center;  /* Vertically center the text relative to the image */
    gap: 20px;            /* Space between image and text */
    margin-bottom: 0px;  /* Space between items */
}

/* Responsive: On screens narrower than 768px, stack the image above the text */
@media (max-width: 767px) {
    .methodology-item {
        flex-direction: column;
        text-align: center;
    }
    .methodology-item img {
        margin-bottom: 15px;
    }
}


/* Pretrial Info Section Styles */
.pretrial-info {
    background-color: #ffffff;
    padding: 40px 20px;
    margin-bottom: 20px;
  }
  
  /* Use the existing section-container class for consistent width */
  .pretrial-info .section-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
  }
  
  /* Each subsection takes equal space with a minimum width */
  .pretrial-info .subsection {
    flex: 1;
    min-width: 300px; /* Adjust as needed */
    /*padding: 0 20px; /* Adjust the value as needed */
  }
  
  /* Headings style for subsections */
  .pretrial-info .subsection h3 {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: var(--gray-900); /* or use a specific color value */
  }
  
  /* Paragraphs and list styles */
  .pretrial-info .subsection p,
  .pretrial-info .subsection li {
    font-size: 1.1em;
    color: var(--gray-700);
    line-height: 1.6;
    padding-right: 20px;
  }
  
  /* Responsive: On small screens, stack subsections vertically */
  @media (max-width: 767px) {
    .pretrial-info .section-container {
      flex-direction: column;
    }
  }

  /* Trial Info Section Styles */
.trial-info {
    background-color: hsl(0, 0%, 90%); /* Grey background */
    padding: 40px 20px;
    margin-bottom: 0px;
  }
  
  .trial-info .section-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
  }
  
  .trial-info .subsection {
    flex: 1;
    min-width: 250px; /* Adjust to control when items wrap */
  }
  
  .trial-info .subsection h3 {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: var(--gray-900);
  }
  
  .trial-info .subsection p,
  .trial-info .subsection li {
    font-size: 1.1em;
    color: var(--gray-700);
    line-height: 1.6;
  }
  
  /* Responsive: On screens smaller than 768px, stack the subsections vertically */
  @media (max-width: 767px) {
    .trial-info .section-container {
      flex-direction: column;
    }
  }
  
  /* Technical Requirements Section Styles */
.technical-requirements {
    background-color: hsl(0, 0%, 90%); /* Grey background */
    padding: 40px 20px;
    margin-bottom: 0px;
  }
  
  .technical-requirements .section-container {
    display: block; /* Single column layout */
  }
  
  .technical-requirements .subsection {
    max-width: 800px; /* Optional: limit width */
    margin: 0 auto;
  }
  
  .technical-requirements .subsection h3 {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: var(--gray-900); /* or use a specific color value */
  }

  .technical-requirements .subsection p {
    font-size: 1.1em;
    color: var(--gray-700);
    line-height: 1.6;
  }
  
  .technical-requirements .subsection ul {
    list-style: disc inside;
    font-size: 1.1em;
    color: var(--gray-700);
    line-height: 1.6;
    padding-left: 20px;
  }
  
  /* Optional Responsive Adjustments */
  @media (max-width: 767px) {
    .technical-requirements {
      padding: 20px 10px;
    }
  }

  /*Styles for the section FAQ */

  .faq-container{
    background: hsl(0, 0%, 90%);
    padding: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  }

  h2{
    font-size: 2em;
    color: var(--main-black);
    margin-bottom: 20px;
    text-align: center;
  }

.faq {
   max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

  .faq-item {
    margin-bottom: 20px;
    text-align: left;
    align-items: center;
  }

  .faq-question{
    font-weight: bold;
    cursor: pointer;
    background-color: #007BFF;
    color: white;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
  }

  summary{
    color: var(--main-black);
  }

  .faq-answer{
    display: none;
    padding: 10px;
    margin-top: 10px;
    background:var(--main-white);
    border-left: 3px solid var(--main-black);
    border-radius: 10px;
  }

  .faq-answer p{
    color: var(--main-black);
  }

  .faq-data{
    color: #ffff;
  }

  .faq-item ul, li{
    color:var(--main-black);
  }


/* ============================= */
/* Dashboard Additional Styles   */
/* ============================= */

/* Container for the dashboard controls (the label + dropdown) */
.dashboard-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 20px;
    margin-bottom: 20px;
  }
  
  .dashboard-label {
    margin-right: 10px;
    font-weight: 600;
    color: var(--gray-900);
  }
  
  .dashboard-select {
    padding: 8px 12px;
    border-radius: var(--radius-4px);
    border: 1px solid var(--gray-200);
    background-color: var(--main-white);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    cursor: pointer;
  }
  
  .dashboard-select:focus {
    outline: 2px solid var(--blue-dark);
  }
  
  /* Dashboard Content Container */
  .dashboard-content {
    margin-top: 20px;
  }
  
  /* Each high-level section in the dashboard */
  .dashboard-section {
    background-color: var(--gray-100);
    border-radius: var(--radius-4px);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  }
  
  .dashboard-section h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--gray-900);
  }
  
  /* Small boxes within a section */
  .dashboard-box {
    background-color: var(--blue-light);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-4px);
    padding: 15px;
    margin-bottom: 15px;
  }
  
  .dashboard-box h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--gray-900);
  }
  
  /* Dashboard Tables */
  .dashboard-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--main-white);
    margin-top: 10px;
    margin-bottom: 10px;
  }
  
  .dashboard-table thead {
    background-color: var(--gray-200);
  }
  
  .dashboard-table th,
  .dashboard-table td {
    padding: 10px;
    border-bottom: 1px solid var(--gray-300);
    text-align: left;
    font-size: 14px;
    color: var(--gray-900);
  }
  
  .dashboard-table tr:hover {
    background-color: var(--gray-100);
  }
  
  /* If you want a detail line style inside the .dashboard-box */
  .detail-line {
    font-size: 14px;
    margin: 5px 0;
    color: var(--gray-900);
  }
  
  .dashboard-message {
    font-size: 16px;
    color: var(--gray-600);
    text-align: center;
  }
  
  /* End of Additional Dashboard Styles */

/* .admin-links-container styling */
.admin-links-container {
    margin-top: 2rem;
    text-align: center;  /* or left/right as you prefer */
  }
  
  .admin-links-container a {
    margin: 0 0.5rem; 
    text-decoration: underline;
    cursor: pointer;
  }
  

  /* ===== Ajustes SOLO para chat-sobre-paciente.html ===== */
.chat-page .input-area{
    /* ponemos todo en fila y centrado verticalmente */
    display: flex;
    align-items: center;
}

/* El input se expande, los demás ocupan sólo su ancho */
.chat-page .input-area #chatInput{ flex: 1 1 auto; }

/* Separación uniforme entre los controles */
.chat-page .input-area #sendBtn,
.chat-page .input-area .record-icon,
.chat-page .input-area #doctorNotesSpinner{
    margin-left: 10px;
}

/* --------------- Micrófono --------------- */
.chat-page .input-area .record-icon{
    /* anulamos la posición absoluta que usa en la otra página */
    position: static !important;
    width: 32px;       /* mismo tamaño que antes */
    height: 32px;
    cursor: pointer;
}

/* --------------- Spinner --------------- */
.chat-page .input-area #doctorNotesSpinner{
    /* que se comporte como un inline-block normal */
    position: static !important;
    width: 24px;
    height: 24px;
    /* opcional: alinear mejor con el micrófono */
    transform: translateY(2px);
}


/* ============================
   IFU (Instrucciones de Uso)
   ============================ */

.ifu-section {
  /* Evita solapamiento con el header fijo y aplica respiración lateral */
  padding: calc(var(--header-height) + 40px) 20px 40px;
  background-color: var(--main-white);
}

.ifu-container {
  max-width: 900px;          /* consistente con otras secciones */
  margin: 0 auto;            /* centrado */
  text-align: center;
}

.ifu-image {
  width: 80%;
  max-width: 1000px;          /* “limitado a 400px o 80%” */
  height: auto;
  display: block;
  margin: 0 auto 16px auto;
  border-radius: var(--radius-8px);
}

.ifu-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin-top: 8px;
}

.ifu-text {
  font-size: 1rem;
  color: var(--gray-700);
  font-weight: 500;
}

.ifu-button {
  display: inline-block;
  padding: 10px 16px;
  border: none;
  border-radius: var(--radius-6px);
  background-color: var(--blue-dark);
  color: var(--main-white);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.ifu-button:hover {
  background-color: var(--blue-darker);
}

/* En móviles, apila texto y botón verticalmente */
@media (max-width: 480px) {
  .ifu-cta {
    flex-direction: column;
    gap: 8px;
  }
}


/* =================================== */
/* Chain of Thought (CoT) Section Styles */
/* =================================== */

.cot-section {
    background-color: var(--blue-light);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-4px);
    padding: 15px;
    margin-top: 20px;
}

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

.cot-header h3 {
    margin: 0;
    color: var(--gray-900);
    font-size: 16px;
}

.cot-container {
    /* No se necesita ninguna propiedad aquí para el scroll */
}

.cot-log-entry {
    padding: 8px 10px;
    border-bottom: 1px solid var(--gray-200);
}

.cot-log-entry:last-child {
    border-bottom: none;
}

.cot-log-meta {
    display: block;
    font-size: 12px;
    font-style: normal;
    font-weight: 500;
    color: var(--gray-500); /* Un poco más oscuro para legibilidad */
    margin-bottom: 4px;
}

.cot-log-message {
    margin: 0;
    font-size: 13px;
    font-style: italic;
    color: var(--gray-700); /* Gris claro pero legible */
    line-height: 1.5;
}

.cot-empty-message, .cot-error-message {
    text-align: center;
    font-style: italic;
    color: var(--gray-500);
    padding: 20px 0;
}

.cot-error-message {
    color: var(--red-darker);
}

/* --- Toggle Switch Styles --- */
.cot-toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.cot-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cot-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-400);
    transition: .4s;
    border-radius: 24px;
}

.cot-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .cot-slider {
    background-color: var(--blue-dark);
}

input:checked + .cot-slider:before {
    transform: translateX(20px);
}

/* ========================================= */
/* ESTILOS PARA LA COLUMNA IZQUIERDA (PSICO) */
/* ========================================= */

/* --- Tarjeta de Paciente --- */
.patient-info-card {
    background-color: var(--blue-light);
    border-radius: var(--radius-8px);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--gray-200);
}

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

.patient-icon-placeholder {
    width: 50px;
    height: 50px;
    background-color: var(--blue-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--main-white);
    font-size: 24px;
    flex-shrink: 0;
}

.patient-text-data h2 {
    margin: 0;
    font-size: 1.2em;
    color: var(--gray-900);
    margin-bottom: 5px;
}

.patient-text-data p {
    margin: 0;
    font-size: 0.9em;
    color: var(--gray-600);
}

/* --- Título de Sección Historial --- */
.history-section-title h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--gray-700);
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 10px;
}

/* --- Contenedor con Scroll --- */
.history-list-container {
    flex: 1; /* Ocupa el espacio restante en la columna flex */
    overflow-y: auto; /* Scroll vertical */
    padding-right: 5px; /* Espacio para que el scroll no tape texto */
    min-height: 200px; /* Altura mínima por seguridad */
    /* Personalización sutil del scrollbar para navegadores webkit */
    scrollbar-width: thin;
    scrollbar-color: var(--gray-400) var(--gray-100);
}

/* --- Cajas de Sesiones Previas --- */
.session-summary-box {
    background-color: var(--main-white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-6px);
    padding: 15px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.session-summary-box:hover {
    border-color: var(--blue-dark);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.session-date {
    font-size: 0.85em;
    color: var(--gray-500);
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.session-content {
    font-size: 0.95em;
    color: var(--gray-900);
    line-height: 1.5;
}

/* Estado COLAPSADO (por defecto) */
.session-content.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Muestra máximo 3 líneas */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Efecto visual de desvanecimiento al final si se desea, 
       pero line-clamp suele ser suficiente */
}

/* Estado EXPANDIDO */
.session-content.expanded {
    display: block; /* Muestra todo */
}

/* Indicador visual pequeño de que es expandible (opcional) */
.session-summary-box::after {
    content: '▼';
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 10px;
    color: var(--gray-400);
    transition: transform 0.3s;
}

.session-summary-box.is-open::after {
    transform: rotate(180deg);
}

/* ========================================= */
/* ESTILOS PARA LA COLUMNA DERECHA (PSICO) */
/* ========================================= */

.objectives-module-container {
    background-color: var(--main-white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-8px);
    display: flex;
    flex-direction: column;
    height: 100%; /* Ocupa toda la altura disponible de la columna */
    max-height: calc(100vh - 150px); /* Ajuste para evitar desbordamiento de pantalla */
    overflow: hidden; /* El scroll será interno */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* --- Cabecera --- */
.obj-header {
    padding: 15px;
    border-bottom: 1px solid var(--gray-200);
    background-color: var(--gray-100);
}

.obj-header h3 {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    color: var(--gray-900);
}

.obj-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Botón de texto pequeño */
.text-action-btn {
    background: none;
    border: none;
    color: var(--blue-dark);
    font-size: 0.85em;
    cursor: pointer;
    padding: 5px 0;
    margin-top: 5px;
    text-decoration: underline;
}
.text-action-btn:hover { color: var(--blue-darker); }

/* --- Toggle Switch Personalizado --- */
.toggle-container {
    display: flex;
    align-items: center;
    font-size: 0.85em;
    color: var(--gray-600);
}

.toggle-label { margin: 0 8px; }

.switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider { background-color: var(--green); }
input:focus + .slider { box-shadow: 0 0 1px var(--green); }
input:checked + .slider:before { transform: translateX(14px); }

.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }

/* --- Lista de Objetivos --- */
.objectives-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background-color: var(--main-white);
    scrollbar-width: thin;
}

.objective-item {
    display: flex;
    align-items: flex-start; /* Alineación superior por si el texto es largo */
    padding: 10px;
    border-bottom: 1px solid var(--gray-200);
    transition: background-color 0.2s;
}

.objective-item:last-child { border-bottom: none; }
.objective-item:hover { background-color: var(--blue-light); }

.obj-checkbox {
    margin-top: 3px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: var(--green);
    transform: scale(1.2);
}

.obj-text {
    flex: 1;
    font-size: 0.95em;
    color: var(--gray-900);
    line-height: 1.4;
    word-break: break-word;
}

/* Estilo tachado para cumplidos */
.objective-item.achieved .obj-text {
    text-decoration: line-through;
    color: var(--gray-500);
}

.obj-actions {
    margin-left: 10px;
    display: flex;
    gap: 5px;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    font-size: 1.1em;
    padding: 2px;
    transition: color 0.2s;
}

.icon-btn:hover { color: var(--gray-700); }
.icon-btn.hide-btn:hover { color: var(--red-dark); }

/* --- Input Area --- */
.obj-input-area {
    padding: 15px;
    border-top: 1px solid var(--gray-300);
    background-color: var(--gray-100);
    display: flex;
    gap: 8px;
}

.obj-input-area input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-4px);
    font-size: 0.9em;
}

.add-obj-btn {
    background-color: var(--blue-dark);
    color: var(--main-white);
    border: none;
    border-radius: var(--radius-4px);
    padding: 0 15px;
    cursor: pointer;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 5px;
}

.add-obj-btn:hover { background-color: var(--blue-darker); }


/* ========================================= */
/* ESTILOS MÓDULO PREGUNTAS (COLUMNA DERECHA) */
/* ========================================= */

.questions-module-container {
    background-color: var(--main-white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-8px);
    display: flex;
    flex-direction: column;
    /* Ajustamos altura máxima para compartir espacio o hacer scroll propio */
    max-height: 500px; 
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* --- Área de Generación --- */
.generator-area {
    padding: 15px;
    background-color: var(--blue-light);
    border-bottom: 1px solid var(--gray-200);
}

.generator-area label {
    display: block;
    font-size: 0.85em;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 5px;
}

.generator-controls {
    display: flex;
    gap: 8px;
}

.obj-select {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-4px);
    font-size: 0.9em;
    background-color: var(--main-white);
    color: var(--gray-900);
}

.generate-btn {
    background-color: var(--blue-dark);
    color: var(--main-white);
    border: none;
    border-radius: var(--radius-4px);
    width: 36px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.generate-btn:hover { background-color: var(--blue-darker); }
.generate-btn:disabled { background-color: var(--gray-400); cursor: not-allowed; }

/* Spinner pequeño horizontal */
.generation-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    font-size: 0.85em;
    color: var(--blue-dark);
    font-style: italic;
}

.spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid var(--gray-300);
    border-top: 2px solid var(--blue-dark);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* --- Lista de Preguntas --- */
.questions-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background-color: var(--main-white);
    scrollbar-width: thin;
}

.question-card {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-6px);
    padding: 12px;
    margin-bottom: 12px;
    background-color: var(--main-white);
    transition: all 0.2s;
    border-left: 4px solid var(--gray-400); /* Color por defecto (sin responder) */
}

/* Estado: RESPONDIDA (status = "true") */
.question-card.answered {
    border-left-color: var(--green);
    background-color: #f0fff4; /* Verde muy tenue */
}

.q-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 5px;
}

.q-text {
    font-weight: 600;
    font-size: 0.95em;
    color: var(--gray-900);
    line-height: 1.3;
}

.q-status-icon {
    font-size: 1.2em;
    color: var(--green);
    margin-left: 8px;
}

.q-meta {
    font-size: 0.8em;
    color: var(--gray-500);
    margin-bottom: 6px;
    display: block;
}

.q-result {
    font-size: 0.9em;
    color: var(--gray-700);
    background-color: rgba(255,255,255,0.6);
    padding: 6px;
    border-radius: 4px;
    margin-top: 5px;
    border-left: 2px solid var(--green);
}

.no-questions-msg {
    text-align: center;
    color: var(--gray-500);
    font-size: 0.9em;
    padding: 20px;
}

/* ========================================= */
/* AJUSTES PARA SCROLL ÚNICO EN COLUMNA DERECHA */
/* ========================================= */

/* 1. Asegurar que la columna derecha tenga el scroll */
.right-column {
    overflow-y: auto !important; /* Fuerza el scroll aquí */
    height: 100%; /* O la altura que tenga definida tu layout padre */
    padding-bottom: 20px; /* Un poco de aire al final */
}

/* 2. Quitar scroll interno del módulo de Objetivos */
.objectives-module-container {
    height: auto !important;      /* Que crezca según contenido */
    max-height: none !important;  /* Quitar límite */
    overflow: visible !important; /* Quitar scroll interno */
    flex: none; /* Evitar que flexbox lo estire o encoja raro */
}

.objectives-list {
    overflow-y: visible !important; /* Quitar scroll de la lista */
    height: auto !important;
    max-height: 300px; /* OPCIONAL: Si tienes muchísimos objetivos, quizás quieras limitar solo la lista, si no, quita esta línea */
}

/* 3. Quitar scroll interno del módulo de Preguntas */
.questions-module-container {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

.questions-list {
    overflow-y: visible !important;
    height: auto !important;
}


/* ========================================= */
/* ESTILOS BOTONES DE RESUMEN (PSICO) */
/* ========================================= */

.summary-buttons-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.save-summary-button {
    padding: 8px 16px;
    background-color: var(--green); /* Verde para indicar guardado */
    color: var(--main-white);
    border: none;
    border-radius: var(--radius-4px);
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 6px; /* Espacio entre icono y texto */
}

.save-summary-button:hover {
    background-color: var(--green-darker);
}

.save-summary-button:disabled {
    background-color: var(--gray-400);
    cursor: not-allowed;
}

/* Ajuste responsive para móviles */
@media (max-width: 480px) {
    .summary-buttons-row {
        flex-direction: column;
    }
    .save-summary-button, .copy-button {
        width: 100%;
        justify-content: center;
    }
}


/* ========================================= */
/* LANDING PAGE REDESIGN (V3 - Final Fixes)  */
/* ========================================= */

:root {
    --brand-navy: #0f172a;       /* Dark background */
    --brand-blue: #007BFF;       /* Primary Action */
    --brand-accent: #38bdf8;     /* Highlights */
    --bg-light: #f8faff;         /* Very Light Grey */
    --bg-white: #ffffff;
    --text-main: #1e293b;
    --text-light: #94a3b8;
    
    /* Spacing & UI */
    --section-pad: 60px;
    --card-radius: 12px;
}

/* Enable Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Reset específico */
.landing-body {
    background-color: var(--bg-light);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

/* ------------------------------------------------ */
/* HEADER (FIXED WHITE) */
/* ------------------------------------------------ */

.mnav-header {
    position: fixed; /* FIXED para evitar huecos */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000;
    background: rgba(255, 255, 255, 0.98); /* Blanco sólido/translúcido */
    border-bottom: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    height: 72px;
}

.mnav-container {
    width: min(1200px, calc(100% - 44px));
    margin: 0 auto;
}

.mnav-header__inner {
    position: relative;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.mnav-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--brand-navy); /* Texto oscuro para el logo */
}

.mnav-brand__logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.mnav-brand__name {
    font-weight: 900;
    letter-spacing: -0.02em;
    font-size: 1.2rem;
    color: var(--brand-navy); /* Texto negro/azul oscuro */
}

/* Navigation Desktop */
.mnav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.mnav-link {
    text-decoration: none;
    color: var(--text-main); /* Texto oscuro para enlaces */
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s;
}

.mnav-link:hover {
    color: var(--brand-blue);
}

/* Language Selector Desktop */
.mnav-lang-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gray-600);
    font-size: 13px;
    margin-right: 10px;
}

.mnav-lang-selector .lang-link {
    text-decoration: none;
    color: var(--gray-600);
    font-weight: 500;
}

.mnav-lang-selector .lang-link.active,
.mnav-lang-selector .lang-link:hover {
    color: var(--brand-blue);
}

.mnav-divider {
    width: 1px;
    height: 20px;
    background: var(--gray-300); /* Divider gris */
}

/* Botones Desktop */
.mnav-actions {
    display: flex;
    gap: 10px;
}

.mnav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.2s;
}

.mnav-btn--primary {
    background: var(--brand-blue);
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,123,255,0.2);
}

.mnav-btn--primary:hover {
    background: #0069d9;
    transform: translateY(-1px);
}

.mnav-btn--ghost {
    background: transparent;
    color: var(--brand-navy);
    border-color: var(--gray-300);
}

.mnav-btn--ghost:hover {
    background: var(--gray-100);
}

/* Hamburger Button (Mobile) */
.mnav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.mnav-toggle__icon {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 2px;
    background: var(--brand-navy); /* Icono oscuro */
    border-radius: 999px;
    transition: background 0.2s;
}

.mnav-toggle__icon::before,
.mnav-toggle__icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 20px;
    height: 2px;
    background: var(--brand-navy); /* Icono oscuro */
    border-radius: 999px;
    transition: transform .2s ease, top .2s ease;
}
.mnav-toggle__icon::before { top: -6px; }
.mnav-toggle__icon::after { top: 6px; }

/* ------------------------------------------------ */
/* MOBILE MENU (ACORDEÓN) */
/* ------------------------------------------------ */
@media (max-width: 980px) {
    .mnav-container {
        width: min(1200px, calc(100% - 26px));
    }

    .mnav-toggle { display: inline-flex; align-items: center; justify-content: center; }

    .mnav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: grid;
        gap: 10px;
        
        /* Estado cerrado */
        max-height: 0;
        opacity: 0;
        transform: translateY(-10px);
        overflow: hidden;
        pointer-events: none;

        /* Estilo del Dropdown */
        padding: 0 20px;
        background: white; /* Fondo blanco */
        border-bottom: 1px solid var(--gray-200);
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        
        transition: all 0.3s ease;
    }

    .mnav.is-open {
        max-height: 80vh; /* Permitir expansión */
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
        padding: 20px;
    }

    .mnav-link { 
        padding: 10px 0; 
        font-size: 16px;
        border-bottom: 1px solid var(--gray-100);
    }

    .mnav-divider { display: none; }

    .mnav-actions {
        display: flex;
        flex-direction: column; /* Botones uno debajo de otro */
        width: 100%;
        margin-top: 10px;
        gap: 10px;
    }

    /* Ajuste crítico para botones móviles */
    .mnav-btn { 
        width: 100%; 
        box-sizing: border-box; /* Evita que el padding sume al ancho */
        text-align: center; 
        justify-content: center; 
        padding: 12px; 
    }
    
    /* Animación X del icono */
    .mnav-toggle.is-open .mnav-toggle__icon { background: transparent; }
    .mnav-toggle.is-open .mnav-toggle__icon::before { top: 0; transform: rotate(45deg); }
    .mnav-toggle.is-open .mnav-toggle__icon::after { top: 0; transform: rotate(-45deg); }
}

/* ------------------------------------------------ */
/* HERO SECTION (Adjusted for Fixed Header) */
/* ------------------------------------------------ */

.landing-hero.dark-mode {
    /* Padding Top aumentado para compensar el Header Fixed (72px + espacio) */
    padding-top: 140px; 
    padding-bottom: 60px;
    background: radial-gradient(circle at top right, #1e293b 0%, #0f172a 60%);
    color: white;
    position: relative;
    overflow: hidden;
    margin-top: 0;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 40px;
}

.hero-text { flex: 1; z-index: 2; }
.hero-visual { flex: 1; }

/* Badge, H1, Subtext */
.badge-new {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--brand-accent);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 20px;
}

.landing-hero h1 {
    font-size: 2.8rem;
    line-height: 1.15;
    font-weight: 800;
    margin-bottom: 20px;
    color: white;
}

.hero-sub {
    font-size: 1.1rem;
    color: #cbd5e1;
    margin-bottom: 30px;
    max-width: 550px;
}

/* Hero Buttons */
.hero-cta-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.text-link-light {
    color: white;
    text-decoration: none;
    font-weight: 600;
    opacity: 0.9;
    cursor: pointer;
}
.text-link-light:hover { text-decoration: underline; opacity: 1; }

.btn-accent {
    background: var(--brand-accent);
    color: var(--brand-navy);
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.4);
    transition: transform 0.2s;
}
.btn-accent:hover { transform: translateY(-2px); filter: brightness(1.1); }

.hero-stats {
    display: flex;
    gap: 20px;
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 25px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #e2e8f0;
    font-weight: 500;
}
.stat-item i { color: var(--brand-accent); font-size: 1.1rem; }

.hero-img-main {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

/* ------------------------------------------------ */
/* SOLUTIONS SECTION */
/* ------------------------------------------------ */

.solutions-section {
    padding: var(--section-pad) 20px;
    background-color: var(--bg-light);
    overflow: hidden;
}

.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-size: 2rem; color: var(--brand-navy); margin-bottom: 10px; }
.section-header p { font-size: 1.1rem; color: var(--gray-600); }

.carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.carousel-track {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    /* Padding lateral aumentado para que no se corten las sombras */
    padding: 20px 10px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }

.solution-card {
    min-width: 350px;
    max-width: 380px;
    background: white;
    border-radius: var(--card-radius);
    overflow: hidden;
    scroll-snap-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    border: 1px solid rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
}

.solution-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }

/* REMOVED BLUE BORDER, using simple shadow/border logic now */
.solution-card.featured-card { 
    /* border: 2px solid var(--brand-blue);  <-- REMOVED */
}

.card-image {
    position: relative;
    height: 180px;
    background: #e2e8f0;
    overflow: hidden;
}
.card-image img { width: 100%; height: 100%; object-fit: cover; }

.card-tag {
    position: absolute;
    top: 15px; right: 15px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}
.card-tag.tag-purple { background: #6f42c1; }
.card-tag.tag-green { background: #05a68e; }

.card-content { padding: 25px; flex-grow: 1; }
.card-content h3 { font-size: 1.25rem; margin: 0 0 10px 0; color: var(--brand-navy); }
.card-content p { font-size: 0.95rem; color: var(--gray-700); margin-bottom: 20px; line-height: 1.5; }

/* Pastillas */
.badges-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 15px; }
.mini-badge {
    background: #f1f5f9;
    color: var(--brand-navy);
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    border: 1px solid var(--gray-300);
}

.card-features { list-style: none; padding: 0; margin: 0; }
.card-features li {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.card-features i { color: var(--brand-blue); margin-top: 3px; }

/* Carrusel Botones */
.carousel-btn {
    background: white;
    border: 1px solid var(--gray-300);
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 10;
    flex-shrink: 0;
}
.carousel-btn:hover { background: var(--brand-blue); color: white; border-color: var(--brand-blue); }

.carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 20px; }
.dot { width: 10px; height: 10px; background: var(--gray-300); border-radius: 50%; }
.dot.active { background: var(--brand-blue); }

/* ------------------------------------------------ */
/* EVIDENCE SECTION */
/* ------------------------------------------------ */

.evidence-section.dark-accent {
    background-color: #1e293b;
    color: white;
    padding: var(--section-pad) 20px;
}

.evidence-intro { text-align: center; margin-bottom: 40px; }
.evidence-intro h2 { color: white; font-size: 2rem; margin-bottom: 10px;}
.evidence-intro p { color: #94a3b8; font-size: 1.1rem; }

.evidence-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

.evidence-box {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 30px;
    border-radius: var(--card-radius);
    text-align: left;
    transition: background 0.3s;
}
.evidence-box:hover { background: rgba(255,255,255,0.1); }

.evidence-icon { font-size: 2rem; color: var(--brand-accent); margin-bottom: 20px; }
.evidence-data h3 { font-size: 2.5rem; margin: 0; color: white; font-weight: 800; line-height: 1; }
.evidence-data p {
    color: var(--brand-accent);
    font-weight: 600;
    margin: 5px 0 15px 0;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}
.evidence-desc { color: #cbd5e1; font-size: 0.95rem; line-height: 1.5; }

/* ------------------------------------------------ */
/* FINAL CTA */
/* ------------------------------------------------ */

.final-cta-compact {
    padding: 80px 20px;
    background: white;
    text-align: center;
}
.cta-content h2 { color: var(--brand-navy); font-size: 2rem; margin-bottom: 15px; }
.cta-buttons { display: flex; justify-content: center; gap: 15px; margin-top: 30px; }

.landing-btn.btn-primary {
    background-color: var(--brand-blue);
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    border: none;
}
.landing-btn.btn-outline-dark {
    background: transparent;
    color: var(--brand-navy);
    border: 2px solid var(--brand-navy);
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 700;
}

/* ------------------------------------------------ */
/* FOOTER */
/* ------------------------------------------------ */

.landing-footer {
    background-color: #0f172a;
    padding-top: 60px;
    color: #94a3b8;
}

.landing-footer .footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-brand-name {
    color: white; font-size: 1.2rem; font-weight: 800; margin-bottom: 15px;
}

.landing-footer h4 { color: white; margin-bottom: 20px; font-size: 0.95rem; text-transform: uppercase; }
.landing-footer a { color: #94a3b8; display: block; margin-bottom: 12px; text-decoration: none; transition: color 0.2s; }
.landing-footer a:hover { color: white; }

.footer-bottom {
    max-width: 1200px;
    margin: 60px auto 0;
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
}

/* ------------------------------------------------ */
/* RESPONSIVE MEDIA QUERIES */
/* ------------------------------------------------ */

@media (max-width: 980px) {
    .landing-hero h1 { font-size: 2.2rem; }
    .hero-container { flex-direction: column; text-align: center; gap: 30px; }
    .hero-cta-wrapper { justify-content: center; }
    .hero-stats { justify-content: center; }
    .hero-sub { margin-left: auto; margin-right: auto; }
    
    .landing-footer .footer-container { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    /* Carrusel a Stack Vertical */
    .carousel-container { display: block; }
    .carousel-track {
        flex-direction: column;
        overflow-x: hidden;
        gap: 30px;
        padding: 0; /* Remove side padding in vertical mode */
    }
    .solution-card {
        min-width: 100%;
        max-width: 100%;
    }
    .carousel-btn, .carousel-dots { display: none; }

    /* Evidencia Stack Vertical Centrado */
    .evidence-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .evidence-box {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Footer y CTA */
    .cta-buttons { flex-direction: column; }
    .footer-bottom { flex-direction: column; gap: 15px; }
    
    .landing-footer .footer-container { grid-template-columns: 1fr; text-align: center; }
}

/* ========================================= */
/* FIX: CAROUSEL HINTS (Visual Cues)         */
/* ========================================= */

/* 1. Máscara de Desvanecimiento a la derecha */
/* Esto crea una "niebla" en el lado derecho que indica continuidad */
.carousel-container::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 120px; /* Ancho del degradado */
    background: linear-gradient(to right, rgba(248, 250, 255, 0), var(--bg-light) 90%);
    pointer-events: none; /* Permite hacer clic a través del degradado */
    z-index: 5;
    border-top-right-radius: var(--card-radius);
    border-bottom-right-radius: var(--card-radius);
}

/* Asegurar que el botón esté por encima de la máscara */
.carousel-btn {
    z-index: 20; 
}

/* 2. Animación de "Llamada de atención" en la flecha derecha */
@keyframes attention-bounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); } /* Mueve la flecha 5px a la derecha */
}

/* Aplicar la animación solo al botón 'Siguiente' */
.next-btn {
    animation: attention-bounce 2s infinite ease-in-out;
    background-color: var(--brand-blue); /* Hacemos el botón azul para que destaque más */
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

.next-btn:hover {
    animation: none; /* Parar animación al poner el mouse encima */
    background-color: #0069d9;
    transform: scale(1.1);
}

/* Ajuste opcional: Hacer que la flecha izquierda sea más sutil */
.prev-btn {
    background-color: white;
    color: var(--brand-navy);
    border: 1px solid var(--gray-300);
}

/* 3. Ajuste de "Peeking" (Asomar la tarjeta) */
/* Forzamos que el track tenga un padding derecho extra para que la máscara no tape el contenido al final */
.carousel-track {
    padding-right: 50px; 
}

/* MOBILE RESET: En móvil no queremos la máscara ni la animación */
@media (max-width: 768px) {
    .carousel-container::after {
        display: none;
    }
    .next-btn {
        animation: none;
    }
}

/* ========================================= */
/* FIX: MOBILE CAROUSEL ALIGNMENT            */
/* ========================================= */

@media (max-width: 768px) {
    .carousel-track {
        /* Eliminamos el padding derecho que añadimos para desktop */
        padding-right: 0 !important; 
        padding-left: 0 !important;
        
        /* Aseguramos que las tarjetas estén centradas verticalmente */
        align-items: center; 
        width: 100%;
    }

    .solution-card {
        /* Aseguramos que la tarjeta no exceda el ancho de pantalla */
        max-width: 100%;
        margin-right: 0;
    }
}

/* ========================================= */
/* FIX: LINKEDIN ICON SIZE (+80%)            */
/* ========================================= */

.landing-footer .social-links a {
    font-size: 2.3rem; /* Aumentado de 1.5rem a 2.7rem */
    line-height: 1;    /* Evita que el contenedor se estire verticalmente */
    display: inline-flex; /* Mejora el centrado vertical */
}


.verify-link-alert {
    color: var(--blue-dark); /* Usa tu variable oficial */
    text-decoration: underline;
    font-weight: bold;
    cursor: pointer;
    display: inline-block;
    margin-top: 5px;
    font-size: 14px; /* Para que coincida con el resto de textos del login */
}

.verify-link-alert:hover {
    color: var(--blue-darker); /* Efecto hover consistente con tus botones */
}

div.generated-text {
    background-color: var(--main-white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-4px);
    padding: 20px;
    height: 300px;
    overflow-y: auto;
    font-size: 15px;
    line-height: 1.6;
    color: var(--gray-900);
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
}

/* 1. FORZAR NEGRITAS (Esto es lo que te falta) */
div.generated-text strong, 
div.generated-text b {
    font-weight: 700 !important; /* !important para obligar al navegador */
    color: #000; /* Negro puro para más contraste */
}

/* 2. ARREGLAR TÍTULOS */
div.generated-text h1, 
div.generated-text h2, 
div.generated-text h3 {
    margin-top: 15px;
    margin-bottom: 10px;
    font-weight: 800 !important; /* Más grueso aún */
    font-size: 1.2em;
    color: var(--gray-900);
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 5px;
}

/* 3. ARREGLAR LISTAS (Para que los puntos no salgan desplazados) */
div.generated-text ul, 
div.generated-text ol {
    margin-top: 5px;
    margin-bottom: 15px;
    padding-left: 25px !important; /* Espacio para el punto */
    list-style-type: disc !important; /* Asegurar que sale el punto */
}

div.generated-text li {
    margin-bottom: 5px;
    display: list-item; /* Asegurar comportamiento de lista */
}

/* 4. SEPARACIÓN DE PÁRRAFOS */
div.generated-text p {
    margin-bottom: 12px;
}

.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto; /* Scroll horizontal si no cabe */
    -webkit-overflow-scrolling: touch;
    margin-bottom: 15px;
    border: 1px solid var(--gray-300); /* Borde externo */
    border-radius: var(--radius-4px);
    background-color: var(--main-white);
}

.message table,
div.generated-text table {
    display: block;
    width: 100%;
    overflow-x: auto; /* Esto añade la barrita si se sale */
    -webkit-overflow-scrolling: touch;
    border-collapse: collapse; /* Colapsa bordes para líneas finas y limpias */
    margin-top: 15px;
    margin-bottom: 20px;
    font-size: 13px;
    background-color: var(--main-white);
    border-radius: var(--radius-4px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); /* Sutil sombra para dar profundidad */
    
}

/* Celdas (Header y Data) */
.message table th, .message table td,
div.generated-text th, div.generated-text td {
    padding: 10px 12px; /* Un poco más de aire */
    border: 1px solid var(--gray-300); /* AHORA SÍ FUNCIONARÁ (con la variable nueva) */
    text-align: left;
    vertical-align: top;
    line-height: 1.4;
    white-space: normal;
}

/* Encabezados (Header) */
.message th,
div.generated-text th {
    background-color: var(--blue-light); /* Tu azul corporativo claro */
    color: var(--blue-darker);         /* Texto azul oscuro */
    font-weight: 700 !important;       /* Negrita forzada */
    text-transform: uppercase;         /* Opcional: le da un toque más "dato técnico" */
    font-size: 12px;                   /* Ligeramente más pequeño en cabeceras */
    letter-spacing: 0.5px;

}

/* Filas alternas (Efecto Cebra) */
.message tr:nth-child(even),
div.generated-text tr:nth-child(even) {
    background-color: #f8f9fa; /* Un gris muy muy suave, casi blanco */
}

/* Efecto Hover al pasar el ratón por una fila */
.message tr:hover,
div.generated-text tr:hover {
    background-color: rgba(0, 123, 255, 0.08); /* Azul muy tenue al pasar el mouse */
    transition: background-color 0.2s ease;
}
/* Grid Container para las tarjetas */
.admin-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr)); /* Adaptable */
    gap: 20px;
    width: 100%;
    margin-top: 20px;
}

/* Tarjeta individual (param-box) */
.param-box {
    background-color: var(--main-white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-8px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Para que el header no se salga */
    transition: transform 0.2s, box-shadow 0.2s;
    max-height: 600px; /* Limitar altura si el JSON es muy largo */
}

.param-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Cabecera de la tarjeta */
.param-header {
    background-color: var(--blue-light);
    padding: 15px 20px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.param-header h3 {
    margin: 0;
    color: var(--blue-dark);
    font-family: monospace; /* Fuente monoespaciada para IDs */
    font-size: 1.1em;
    font-weight: 700;
}

/* Botón pequeño de copiar */
.copy-button-small {
    padding: 3px 8px;       /* Tamaño reducido */
    font-size: 13px;        /* Letra pequeña */
    background-color: var(--main-white);
    border: 1px solid var(--gray-400);
    border-radius: var(--radius-4px);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px; /* Para que no "baile" al cambiar el texto */
}

.copy-button-small:hover {
    background-color: var(--gray-200);
}

/* Estado de éxito (Verde) */
.copy-button-small.copied {
    background-color: var(--green);
    color: var(--main-white);
    border-color: var(--green-darker);
    pointer-events: none; /* Evita doble clic mientras está verde */
}

/* Contenido JSON */
.param-content {
    padding: 0;
    background-color: #fafafa; /* Fondo ligeramente gris para código */
    overflow: auto; /* Scroll interno si es necesario */
    flex: 1;
}

.param-content pre {
    margin: 0;
    padding: 13px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 20px;
    line-height: 1.5;
    color: var(--gray-900);
}

/* Contenedor principal del árbol */
.json-tree {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray-900);
    padding: 15px;
}

/* Elementos desplegables (<details>) */
.tree-details {
    margin-left: 15px; /* Indentación para hijos */
}

/* El resumen o título de la rama (<summary>) */
.tree-summary {
    cursor: pointer;
    list-style: none; /* Quitar triángulo por defecto */
    outline: none;
    position: relative;
    padding-left: 15px;
}

/* Triángulo personalizado */
.tree-summary::-webkit-details-marker { display: none; }
.tree-summary::before {
    content: '▶';
    font-size: 9px;
    color: var(--gray-500);
    position: absolute;
    left: 0;
    top: 2px;
    transition: transform 0.2s;
}

/* Girar triángulo al abrir */
.tree-details[open] > .tree-summary::before {
    transform: rotate(90deg);
}

/* Colores de las claves y valores */
.tree-key {
    color: var(--gray-900); /* Negro para la clave (ej: model_name) */
    font-weight: 600;
    margin-right: 5px;
}

.tree-separator {
    margin-right: 5px;
    color: var(--gray-500);
}

/* Tipos de datos */
.tree-val-string { color: #22863a; } /* Verde */
.tree-val-number { color: #005cc5; } /* Azul */
.tree-val-boolean { color: #d73a49; font-weight: bold; } /* Rojo */
.tree-val-null { color: #6a737d; font-style: italic; } /* Gris */

/* Efecto hover en la línea */
.tree-summary:hover {
    background-color: rgba(0, 123, 255, 0.05); /* Azul muy clarito */
    border-radius: 4px;
}

/* Línea simple (clave: valor) que no se despliega */
.tree-item {
    margin-left: 15px;
    padding: 2px 0;
}

/* Responsive: Una sola columna en móvil */
@media (max-width: 768px) {
    .admin-grid-container {
        grid-template-columns: 1fr;
    }
    
    /* El buscador ocupa todo el ancho */
    .dashboard-controls input {
        max-width: 100% !important;
    }
}



/* Modern Form Elements (Filters) */
/* Contenedor principal en fila */
.filter-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 20px !important;
    margin-bottom: 20px !important;
    align-items: flex-end !important;
    flex-wrap: wrap !important;
}

.filter-control {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    min-width: 200px !important;
    flex: 1 !important;
    max-width: 300px !important;
}

.filter-label {
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    color: var(--gray-500) !important;
    letter-spacing: 0.5px !important;
    margin-left: 4px !important;
    display: block !important;
}

.select-wrapper {
    position: relative !important;
    width: 100% !important;
}

/* Flecha personalizada */
.select-wrapper::after {
    content: "▼" !important; 
    font-family: "bootstrap-icons" !important;
    position: absolute !important;
    right: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 12px !important;
    color: var(--blue-dark) !important;
    pointer-events: none !important;
    z-index: 10 !important;
}

.modern-select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    
    width: 100% !important;
    padding: 12px 40px 12px 16px !important;
    
    font-family: 'Inter', sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--gray-900) !important;
    
    background-color: var(--main-white) !important;
    border: 1px solid var(--gray-200) !important;
    border-radius: var(--radius-8px) !important;
    
    cursor: pointer !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02) !important;
    transition: all 0.2s ease-in-out !important;
}

.modern-select:hover {
    border-color: var(--blue-dark) !important;
    background-color: #f8faff !important; /* Gris azulado muy claro */
}

.modern-select:focus {
    outline: none !important;
    border-color: var(--blue-dark) !important;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1) !important;
}

@media (max-width: 480px) {
    .filter-row {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .filter-control {
        max-width: 100% !important;
    }
}



/* --- Indicador de Procesando Audio --- */

/* ======================================================= */
/* NUEVOS ESTILOS PARA INDICADOR DE PROCESO (Lado Derecho) */
/* ======================================================= */

/* 1. El Contenedor Agrupador (Wrapper) */
/* Este div toma el espacio 'flex: 1' que antes tenía el status */
.right-status-wrapper {
    flex: 1; 
    display: flex;
    flex-direction: column; /* Apila los elementos verticalmente: Procesando arriba, Status abajo */
    align-items: flex-end;  /* Alinea todo a la DERECHA */
    justify-content: center;
    min-height: 45px; /* Altura mínima para evitar saltos bruscos */
}

/* Ajuste necesario para el mensaje de status original */
/* Le quitamos el flex:1 para que no intente crecer dentro del wrapper */
.right-status-wrapper .status-message {
    flex: 0 0 auto !important; 
    width: auto !important;
    text-align: right;
    margin-top: 4px; /* Pequeño espacio entre el procesando y el estado */
}

/* 2. El Indicador de Procesando */
#processing-indicator-container {
    display: none;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 2px; /* Espacio debajo del indicador */
    opacity: 0;
    transition: opacity 0.3s ease;
    width: 100%;
}

#processing-indicator-container.visible {
    display: flex;
    opacity: 1;
}

/* El Spinner (Círculo de carga) - Tamaño ajustado */
.processing-spinner {
    width: 14px;  /* Tamaño similar al texto */
    height: 14px;
    border: 2px solid var(--gray-200);
    border-top: 2px solid var(--blue-dark);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px; /* Espacio con el texto */
    flex-shrink: 0;
}

/* El Texto del indicador */
.processing-text {
    font-family: 'Inter', sans-serif;
    font-size: 1em; /* Hereda el tamaño (14px o lo que tenga el padre) */
    font-weight: bold; /* Misma negrita que el status */
    color: var(--blue-dark); 
    white-space: nowrap;
}

/* Animación de rotación */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* RESPONSIVE: En móviles mantenemos la alineación o ajustamos */
@media (max-width: 768px) {
    /* En móvil, forzamos que el wrapper ocupe todo el ancho y CENTRE el contenido */
    .right-status-wrapper {
        align-items: center !important; /* Fuerza el centro horizontal */
        width: 100%;
        margin-top: 15px; /* Un poco más de espacio con el botón */
    }

    /* El mensaje de "Sin captación" también centrado */
    .right-status-wrapper .status-message {
        text-align: center !important;
        width: 100% !important;
    }

    /* El indicador de "Procesando" centrado */
    #processing-indicator-container {
        justify-content: center !important; /* Centra spinner y texto */
        margin-bottom: 5px;
    }
}

/* Contenedor del título para que el input no mueva todo */
.title-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

/* El icono de edición elegante */
.edit-icon-svg {
    width: 18px;
    height: 18px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
    fill: #4a90e2; /* Color azul corporativo */
}

.edit-icon-svg:hover {
    opacity: 1;
}

/* El input que aparece al editar */
.edit-title-input {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    border: 1px solid #4a90e2;
    border-radius: 4px;
    padding: 2px 8px;
    outline: none;
    width: 100%;
    color: #333;
}


/* MODIFICACIÓN DE TITULOS EN NOTAS DE VOZ

/* Estilos para el contenedor de la nota en la lista */
.note-box {
    cursor: pointer;
    display: flex;
    align-items: center; /* Centrado vertical de todos los hijos */
    justify-content: flex-start;
    min-height: 70px;    /* Ajusta según el alto que desees para las cajas */
    padding: 10px 20px;
    transition: background-color 0.2s;
    position: relative;
    gap: 20px;
}

/* Sección izquierda: Fecha y Título juntos */
.note-left-section {
    display: flex;
    align-items: center; /* Centra la fecha y el título entre sí */
    gap: 20px;
    height: 100%;        /* Para que el centrado sea respecto a la caja */
}
.note-timestamp {
    min-width: 150px;
    flex-shrink: 0;
    text-align: left;
}

/* Ajustes para el H1 de esta página */
h1.note-title-editable {
    margin: 0 !important;
    font-size: 1.8rem !important; /* Tamaño más pequeño y controlado */
    font-weight: 700;
    cursor: pointer;
    line-height: 1 !important;    /* Altura de línea mínima para que no flote */
    display: flex;
    vertical-align: middle;
    border: 1px solid transparent; 
    padding: 2px 8px;
    transition: all 0.2s ease;
    align-items: center;

    word-break: break-all;
    overflow-wrap: break-word;
    white-space: normal;
    max-width: calc(100% - 40px);
}


.note-title-editable {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    
    /* EL AJUSTE CLAVE */
    line-height: 1;    /* Altura de línea controlada */
    display: inline-block;
    vertical-align: middle;
    padding-top: 8px;  
    align-items: center;
    border: 1px solid transparent;
    border-radius: 4px;
    box-sizing: border-box;
    text-align: left;

    word-break: break-all;
    overflow-wrap: break-word;
    white-space: normal;
    max-width: calc(100% - 40px);


    
}

/* ESTADO DE EDICIÓN: La "cajita" que querías */
.note-title-editable.is-editing {
    cursor: text !important;
    background-color: #ffffff !important;
    border-color: #4a90e2 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    outline: none;
    border-radius: 4px;
    border: 1px solid transparent; 
    padding: 2px 7px;

}

/* Clase para desactivar el puntero de la caja mientras se edita */
.note-box.editing-active {
    cursor: default !important;
}

/* Ajuste específico para el contenedor del lápiz */
.edit-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.6;
    height: 1.9rem; /* Forzamos que la zona del lápiz sea similar a la del texto */
    margin-left: auto;
    flex-shrink: 0;
}

.title-edit-container {
    display: flex;
    align-items: center; /* Centrado vertical automático del lápiz */
    gap: 10px;           /* Espacio reducido entre texto y lápiz */
    margin-bottom: 15px;
    line-height: 1;
    width: 100%;
    max-width: 100%;
}

/* Ajuste del icono visual */
.edit-icon-visual {
    width: 18px;         /* Reducido ligeramente para acompañar al texto más pequeño */
    height: 18px;
    background-color: #4a90e2;
    opacity: 0.6;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.82-1.83z'/></svg>") no-repeat center;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.82-1.83z'/></svg>") no-repeat center;
    mask-size: contain;
    -webkit-mask-size: contain;
}

/* Interacción */
.edit-icon-container:hover .edit-icon-visual {
    opacity: 1;
    transform: scale(1.1);
    background-color: #357abd; /* Color un poco más oscuro al pasar el ratón */
}

.is-editing + .edit-icon-container {
    opacity: 0;
    pointer-events: none;
}
/* Anular el empuje a la derecha solo en la pantalla de detalle */
.title-edit-container .edit-icon-container {
    margin-left: 0 !important; /* Quita el espacio automático */
    height: auto;              /* Deja que el alto sea natural */
}

/* --- ESTILOS RESPONSIVE PARA MÓVIL --- */
@media (max-width: 500px) {
    .note-box {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px 45px 15px 15px; /* Añadimos padding a la derecha para que el texto no choque con el lápiz */
        gap: 8px;
        position: relative; /* Indispensable para el posicionamiento del lápiz */
        min-height: 80px;
    }

    .note-left-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        width: 100%;
    }

    .note-timestamp {
        min-width: unset;
        font-size: 0.8rem;
        color: #666;
    }

    .note-title-editable {
        font-size: 0.95rem;
        width: 100%;
        padding: 2px 0;
        line-height: 1.3;
    }

    /* POSICIONAMIENTO DEL LÁPIZ CENTRADO */
    .edit-icon-container {
        position: absolute;
        right: 15px;      /* Distancia desde el borde derecho */
        top: 0;           /* Desde arriba hasta abajo */
        bottom: 0;
        margin: auto 0;   /* Centrado vertical automático en combinación con top/bottom 0 */
        display: flex;    /* Para centrar el SVG internamente */
        align-items: center;
        justify-content: center;
        width: 30px;      /* Ancho fijo para el área táctil */
        height: 100%;     /* Ocupa todo el alto para permitir el centrado */
    }

    .edit-icon-visual {
        width: 18px;
        height: 18px;
    }
}

/* Ajuste fino para la edición en móvil */
.note-title-editable.is-editing {
    margin-right: 0;
    padding: 6px 8px;
}

@media (max-width: 500px) {
    .title-edit-container {
        justify-content: flex-start; /* Asegura que todo empiece a la izquierda */
    }

    .title-edit-container .edit-icon-container {
        position: static !important; /* Forzamos que se quede junto al texto y no flotando */
        margin-left: 10px !important; 
        top: auto;
        right: auto;
    }
}


/* Estilos para las páginas de Auth (Verificación y Reset) */

.auth-card-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100%;
    margin: 0 auto;
    padding: 60px 0;
}

.auth-card-container h1#message {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    display: block !important;
    text-align: center !important;
}

.auth-card-container p {
    margin: 0 auto 30px auto;
    max-width: 80%;         /* Para que el texto no sea una línea infinita y se vea elegante */
}

.status-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

/* Botón de completar verificación (más pequeño) */
.btn-auth-submit {
    padding: 10px 24px; /* Tamaño reducido */
    font-size: 16px;
    font-weight: 600;
    background-color: #007bff; /* Ajusta al color de Medsys AI */
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: inline-block;
    width: auto; /* Evita que ocupe todo el ancho */
    min-width: 180px;
}

.btn-auth-submit:hover {
    background-color: #0056b3;
}

.btn-auth-submit:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Botón de login (el que aparece al final) */
.btn-auth-success {
    padding: 10px 24px;
    background-color: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    display: none; /* Se activa por JS */
    margin: 20px auto 0;
    width: fit-content;
}

.sub-text {
    color: #666;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

#login-link.btn-auth-success {
    display: none; /* Por defecto oculto */
    margin: 20px auto 0 !important;
    text-decoration: none;
    background-color: #28a745;
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
}


/* Contenedor del icono: ahora es solo un espacio flexible */
.symbol-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    min-height: 80px; /* Mantiene el espacio visual */
    transition: color 0.4s ease;
}

/* El símbolo en sí */
#status-symbol {
    font-size: 60px; /* Tamaño grande y elegante */
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    line-height: 1;
}

/* Colores según estado (sin bordes) */
.symbol-success { color: #28a745 !important; }
.symbol-info { color: #007bff !important; }
.symbol-warning { color: #fd7e14 !important; }

/* El sobre inicial no tiene color específico o usa el gris de tu tema */
.symbol-default { color: #333; }


.icon-key {
    width: 42px;
    height: 42px;
    background-color: #007bff; /* Color azul Medsys */
    /* Nueva llave: más estilizada, vertical y minimalista */
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7.5' cy='15.5' r='5.5'/%3E%3Cpath d='m21 2-9.6 9.6'/%3E%3Cpath d='m15.5 7.5 3 3'/%3E%3Cpath d='m17.5 5.5 3 3'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7.5' cy='15.5' r='5.5'/%3E%3Cpath d='m21 2-9.6 9.6'/%3E%3Cpath d='m15.5 7.5 3 3'/%3E%3Cpath d='m17.5 5.5 3 3'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
    display: block;
}

/* Estilo para el contenedor del input y el botón */
#password-form-container {
    display: flex;
    flex-direction: column; /* O row si los quieres uno al lado del otro */
    gap: 20px; /* Espacio entre ellos */
    align-items: center;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

/* Forzar la misma altura en ambos */
#new-password, 
#reset-btn {
    width: 100%;
    
    height: 40px;      /* Define una altura fija para ambos */
    
    box-sizing: border-box !important;
    
    border-radius: 8px; /* Para que se vean modernos y uniformes */
    font-size: 15px;
    padding-left: 10px !important;
    padding-right: 10px !important;
    border: 1px solid #ccc;
    margin-bottom: 10px;
}

/* Ajuste específico para el botón para quitar estilos por defecto */
#reset-btn {
    background-color: #007bff; /* Tu color de Medsys AI */
    color: white;
    cursor: pointer;
    border: none;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s ease;
}

#reset-btn:hover {
    background-color: #0056b3;
}

/* ESTILOS LOGOS COLABORADORES */

.partners-strip {
    /* Un gris un pelín más oscuro para crear el "corte" que buscas */
    background-color: #eeeff1; 
    padding: 40px 0; /* Más espacio arriba y abajo para que respire */
    border-top: 1px solid #e2e4e7;
    border-bottom: 1px solid #e2e4e7;
    margin-bottom: 0 !important;
    width: 100%;
    overflow: hidden;
}

.partners-container {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center; /* Centra todo el contenido */
    display: flex;
    flex-direction: column; /* Pone el texto arriba y los logos abajo */
    align-items: center;
    gap: 30px; /* Espacio entre el título y los logos */
}

.partners-label {
    font-family: 'Inter', sans-serif;
    font-size: 2rem; /* Más grande como pediste */
    color: #070707; /* Un gris intermedio para que no sea negro total */
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.5px;
    display: block;
}

.partners-logos {
    display: flex;
    align-items: center;
    /* Por defecto, si hay pocos, los centramos */
    justify-content: center; 
    gap: 60px;
    flex-wrap: nowrap; 
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 20px 0;
    width: auto; 
    max-width: 100%;
    scrollbar-width: none; 
    -ms-overflow-style: none;
}

.partners-logos::-webkit-scrollbar {
    display: none;
}

.partner-logo {
    flex: 0 0 auto; /* Evita que crezcan o se encojan */
    width: auto;
    height: 70px;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.4s ease;
}
.partner-logo[src*="enisa"] {
    height: 95px; 
}

.partner-logo[src*="accion"] {
    height: 138px; 
}

.partner-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: translateY(-2px); /* Pequeño efecto de elevación al pasar el ratón */
}

/* Ajuste para móviles */
@media (max-width: 768px) {
    .partners-logos {
        gap: 30px;
    }
    .partner-logo {
        height: 45px;
    }
    .partner-logo[src*="enisa"] {
    height: 70px; 
    }
    .partner-logo[src*="accion"] {
    height: 100px; 
}
    .partners-prev, .partners-next {
        display: none;
    }
    .partners-prev, 
    .partners-next,
    .partners-strip .carousel-container::after {
        display: none !important;
    }
}

.partners-strip .carousel-container::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100px;
    background: linear-gradient(to right, rgba(238, 239, 241, 0), #eeeff1 90%); /* Color ajustado al fondo gris #eeeff1 */
    pointer-events: none;
    z-index: 5;
    opacity: 0; /* Oculto por defecto */
    transition: opacity 0.3s ease;
}

.partners-strip .carousel-container.is-overflowing::after {
    opacity: 1;
}

.partners-prev, .partners-next {
    display: none; /* Quitamos el !important anterior */
    background-color: var(--brand-blue);
    color: white;
    border: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
}

/* Solo las mostramos si el JS añade esta clase */
.partners-prev.is-visible, 
.partners-next.is-visible {
    display: flex;
}
/* Esta clase la activaremos con JS cuando el contenido sea más ancho que la pantalla */
.partners-logos.is-overflowing {
    justify-content: flex-start !important;
}

.partners-strip .carousel-container {
    position: relative;
    overflow: visible; 
}

/* ========================================== */
/* ESTILOS PARA PACIENTE NUEVO TRIAL (FIXED)  */
/* ========================================== */

/* Contenedor principal */
#newTrialPatientForm {
    display: none; /* Se controla por JS */
    flex-direction: column;
    align-items: center; 
    width: 100%;
    max-width: 950px;
    margin: 30px auto;
}

/* Fila de controles: Alineación perfecta por la base */
#newTrialPatientForm .filter-row {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: flex-end !important; /* Alinea los bordes inferiores */
    gap: 20px !important;
    margin-bottom: 25px !important;
    width: 100%;
}

/* Forzamos que los 3 campos tengan la misma estructura de caja */
#newTrialPatientForm input#iupInput,
#newTrialPatientForm select#sexSelect,
#newTrialPatientForm input#birthYearInput {
    /* Altura idéntica */
    height: 45px !important;
    min-height: 45px !important;
    
    /* Reseteo de estilos internos */
    margin: 0 !important;
    padding: 0 15px !important; /* Solo padding lateral para evitar saltos de altura */
    
    /* Bordes y Esquinas */
    border: 1px solid var(--gray-200) !important;
    border-radius: var(--radius-8px) !important;
    background-color: var(--main-white) !important;
    
    /* Tipografía */
    font-size: 14px !important;
    font-family: 'Inter', sans-serif !important;
    color: var(--gray-900) !important;
    
    /* Modelo de caja: Vital para que el border no sume altura */
    box-sizing: border-box !important;
    display: block !important;
}

/* Ajuste específico para que el texto en los inputs no esté pegado arriba */
#newTrialPatientForm input#iupInput,
#newTrialPatientForm input#birthYearInput {
    line-height: 45px !important;
}

/* Contenedor individual de cada campo */
#newTrialPatientForm .filter-control {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px; /* Espacio entre Label e Input */
}

/* Forzar que el label tenga un tamaño consistente */
#newTrialPatientForm .filter-label {
    font-weight: 600;
    font-size: 12px;
    color: var(--gray-500);
    text-transform: uppercase;
}

/* Botón Crear Paciente */
#createTrialPatientBtn {
    background-color: var(--blue-dark) !important;
    color: var(--main-white) !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

#createTrialPatientBtn:disabled {
    background-color: var(--gray-400) !important;
    color: var(--gray-600) !important;
    cursor: not-allowed !important; /* Muestra el símbolo de prohibido */
    opacity: 0.7;
}

#createTrialPatientBtn:not(:disabled) {
    background-color: var(--blue-dark) !important;
    cursor: pointer !important;
}

#createTrialPatientBtn:disabled:hover {
    background-color: var(--gray-400) !important;
}

/* Estado de error para los inputs */
.input-error {
    border-color: var(--red-dark) !important;
}

/* Estado por defecto/éxito */
.input-success {
    border-color: var(--gray-200) !important;
}

/* Control de visibilidad del formulario */
.is-hidden {
    display: none !important;
}

.is-flex {
    display: flex !important;
}

/* El botón ya tiene sus estilos dinámicos gracias a la pseudo-clase :disabled 
   que añadimos anteriormente, por lo que no hace falta tocar el color aquí. */



.add-patient-trial-button {
    display: block;          /* Convierte el botón en bloque */
    margin-left: auto;       /* Empuja desde la izquierda */
    margin-right: auto;      /* Empuja desde la derecha */
    background-color: var(--blue-dark);
    color: var(--main-white);
    border: none;
    border-radius: var(--radius-4px);
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.add-patient-trial-button:hover {
    background-color: var(--blue-darker);
}

/* Clase para mensajes de error de texto */
.text-error {
    color: #E56464 !important;
    font-size: 13px;
    font-weight: 500;
    margin-top: 15px;      /* Más espacio respecto al botón */
    line-height: 1.5;     /* Espacio entre las líneas de error */
    text-align: center;    /* Alineado al centro como tu botón */
    width: 100%;           /* Ocupa todo el ancho del form */
}

/*ESTILOS PANTALLA DE ENSAYOS PACIENTE
/* Contenedor de cabecera y filas */
.patient-list-header, .patient-row {
    display: grid;
    /* Usamos proporciones fijas para asegurar que el título caiga justo encima del objeto */
    grid-template-columns: 1fr 1fr 1fr 1.8fr 1.8fr; 
    align-items: center;    /* Centrado vertical total */
    justify-items: center;  /* Centrado horizontal de cada celda del grid */
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.patient-list-header {
    font-weight: bold;
    color: #555;
    border-bottom: 2px solid #eee;
    text-align: left;
}

.patient-row {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.patient-row:hover {
    background: #f9f9f9;
}

.col-diag, .col-incidents {
    display: flex;
    flex-direction: row; /* Uno al lado del otro */
    align-items: center; /* Centrado vertical interno */
    justify-content: center; /* Centrado horizontal interno */
    gap: 15px; /* Espacio entre el texto/punto y el botón */
}

/* Estado e Incidencias */
.status-badge { padding: 4px 12px; border-radius: 4px; font-size: 0.85rem; font-weight: bold; }
.status-badge.completado { background-color: #e8f5e9; color: #2e7d32; }
.status-badge.incompleto { background-color: #ffebee; color: #c62828; }

.incident-dot {
    height: 12px;
    width: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

/* Botones estilo captura */
.btn-report, .btn-diag {
    padding: 8px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    margin-right: 5px;
}

.btn-report {
    background-color: #E56464 !important;
    color: white !important;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}
.btn-diag {
    background-color: #1976d2;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

/* ADAPTACIÓN PARA PANTALLAS MENORES DE 1000PX */
@media (max-width: 1000px) {
    .patient-list-header {
        display: none;
    }

    .patient-row {
        display: flex;
        flex-direction: column;
        padding: 20px;
        margin-bottom: 20px;
        border: 1px solid #e0e0e0;
        border-radius: 12px;
        background-color: #fff;
        gap: 12px;
    }

    /* Filas estándar (ID, Fecha, Estado) */
    .patient-row > div {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        border-bottom: 1px solid #f5f5f5;
        padding-bottom: 8px;
    }

    /* SECCIONES ESPECIALES: Título arriba, contenido abajo */
    .col-diag, .col-incidents {
        flex-direction: column !important; /* Forzamos apilamiento vertical */
        align-items: flex-start !important; /* Alineado a la izquierda */
        gap: 10px;
        background-color: #fcfcfc; /* Un ligero fondo para agrupar visualmente */
        padding: 12px !important;
        border-radius: 8px;
    }

    /* Estilo para los títulos (Pseudo-elementos) */
    .col-date::before { content: attr(data-label); font-weight: bold; color: #555; }
    .col-id::before { content: attr(data-label); font-weight: bold; color: #555; }
    .col-status::before { content: attr(data-label); font-weight: bold; color: #555; }
    
    /* Títulos para las secciones especiales */
    .col-diag::before { 
        content: attr(data-label); 
        font-weight: 700; 
        color:  #555; 
        margin-bottom: 5px;
        font-size: 0.95rem;
    }
    .col-incidents::before { 
        content: attr(data-label); 
        font-weight: 700; 
        color: #555; 
        margin-bottom: 5px;
        font-size: 0.95rem;
    }

    /* Contenedores internos de datos en las secciones especiales */
    /* Como en el HTML los spans y botones son hermanos directos de .col-diag, 
       necesitan ocupar el ancho total para no verse amontonados */
    .val-diag-status, .val-incidents-text {
        text-align: left !important;
        width: 100%;
        margin-bottom: 5px;
        font-weight: 500;
    }

    .btn-diag, .btn-report {
        width: 100%; /* Botones a ancho completo para mejor usabilidad táctil */
        margin-left: 0 !important;
        margin-top: 5px;
    }

    /* Ajuste para el punto de incidencia y el texto */
    .col-incidents {
        display: block; /* Cambiamos a block para que el flujo sea natural */
    }
    
    .incident-dot {
        display: inline-block;
        margin-right: 8px;
    }
}


/* Estilos para Reporte de Incidencias */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.modal-content h2 {
    margin-top: 0;
    font-size: 1.25rem;
    color: #333;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.form-group select, .form-group textarea {
    padding: 10px;
    border: 1px solid #b5c3fb;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
}

.char-count {
    font-size: 0.75rem;
    color: #666;
    margin-top: 5px;
    text-align: right;
}

.error-message {
    color: #E56464;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 5px;
    transition: opacity 0.3s ease;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.secondary-button {
    background: #f0f0f0;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.secondary-button:hover {
    background: #e5e5e5;
}

#incidentDescription {
    resize: vertical; /* Solo permite agrandar hacia abajo */
    min-height: 100px;
    max-height: 300px; /* Opcional: para que no crezca infinitamente */
    width: 100%; /* Asegura que ocupe todo el ancho del contenedor */
    box-sizing: border-box; /* Evita que el padding lo saque del popup */
}

@media (max-width: 700px) {
    #incidentDescription {
    resize: vertical; /* Solo permite agrandar hacia abajo */
    min-height: 100px;
    max-height: 300px; /* Opcional: para que no crezca infinitamente */
    width: 100%; /* Asegura que ocupe todo el ancho del contenedor */
    box-sizing: border-box; /* Evita que el padding lo saque del popup */
}
}


/* Estados dinámicos para el reporte de incidencias */
.char-count-error {
    color: #E56464 !important;
}

.char-count-success {
    color: #2e7d32 !important;
}

.input-error {
    border-color: #E56464 !important;
}

.input-default {
    border-color: #ddd !important;
}


/* Estados para el punto de incidencia */
.incident-dot.has-incidents {
    background-color: #E56464;
}

.incident-dot.no-incidents {
    background-color: #4caf50;
}

/* Estados para el diagnóstico */
.val-diag-status.available {
    color: #2e7d32;
}

.val-diag-status.not-available {
    color: #757575;
}

/* Estado para botón deshabilitado */
.btn-register-disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-load-more {
    display: block;
    margin: 20px auto;
    padding: 10px 25px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
.btn-load-more:hover { background-color: #0056b3; }

/* ESTILOS PARA BOTÓN Y POP UP DE DIAGNÓSTICO AL ALTA ENSAYO CLÍNICO 2026 */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none; /* Se cambia a flex en JS */
    align-items: center; justify-content: center;
    z-index: 10000;
}

.gs-confirm-text {
    background: #f8f9fa;
    padding: 15px;
    border-left: 4px solid #007bff;
    margin: 15px 0;
    font-style: italic;
    color: #333;
}

.gs-textarea {
    width: 100%;
    box-sizing: border-box;
    height: 120px;
    margin: 15px 0;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: none;
    display: block;
}

/* Mensaje de error en el modal Gold Standard */
.gs-error-message {
    display: none; /* Oculto por defecto */
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: -10px;
    margin-bottom: 10px;
    font-weight: 500;
    text-align: left;
}


.btn-incident-top {
    display: block;
    margin: 0px auto 10px auto; /* Centrado horizontal con margen inferior */
    background-color: #d9534f !important; /* Color rojizo según la imagen */
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

.is-hidden-control {
    display: none !important;
}


.control-arm-notice {
    text-align: center;
    max-width: 500px;
    margin: 100px auto; /* Mucho margen superior para centrarlo verticalmente en el hueco blanco */
    padding: 20px;
    background-color: #e0ebf7;
    border: 1px solid #7eb3e9;
    border-radius: 8px;
    font-size: 1rem;
    color: #3b4148;
    line-height: 1.6;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}


.disabled-btn {
    background-color: #ccc !important;
    color: #666 !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}

.disabled-btn:hover::after {
    content: "Complete los campos requeridos";
    position: absolute;
    background: #333;
    color: #fff;
    padding: 5px;
    font-size: 12px;
    border-radius: 4px;
}


/* Estilos para observaciones del ensayo clinico */
.textarea-observations-trial {
    display: block;
    width: 100%;
    min-height: 80px;       /* Altura inicial generosa */
    padding: 12px;
    margin-top: 8px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-4px);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--gray-800);
    background-color: #ffffff;
    box-sizing: border-box;  /* Fundamental para que el padding no lo ensanche */
    resize: vertical;        /* Solo permite estirar hacia abajo */
    transition: border-color 0.2s, box-shadow 0.2s;
}

.textarea-observations-trial:focus {
    outline: none;
    border-color: var(--blue-primary);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.textarea-observations-trial::placeholder {
    color: var(--gray-400);
    font-style: italic;
}


.incident-report-wrapper {
    display: flex;             
    justify-content: center;    
    align-items: center;        
    width: 100%;               
    margin-bottom: 15px;       
    padding: 0px 0;           
}


.control-arm-message {
    padding: 50px;
    text-align: center;
    font-style: italic;
    color: #403f3f;
    width: 100%;
    line-height: 1.5;
}

/* Estilo botón guardar diagnosticos ensayo inhabilitado cuando ya se han guardado */
.btn-finalizado-trial {
    background-color: #c7c5c5 !important; 
    color: #ea6666 !important;
    cursor: not-allowed !important;      /* Cursor de prohibido */
    box-shadow: none !important;
    border: none !important;
    opacity: 0.8;
    pointer-events: none;                /* Evita que se dispare el hover o click */
}

/* Efecto visual de 'no disponible' para los campos de texto */
.input-bloqueado-trial {
    background-color: #f9f9f9 !important;
    border-color: #e0e0e0 !important;
    color: #888 !important;
    cursor: not-allowed !important;
}

/* Esstilo razones de cambiar diagnostico ensayo revisado */
.char-counter-text {
    font-size: 12px;
    margin-top: 5px;
    transition: color 0.3s ease;
    display: block;
}

/* Estado cuando no llega al mínimo (Rojo) */
.counter-invalid {
    color: #d9534f !important;
    font-weight: normal !important;
}

/* Estado cuando es válido (Verde y Negrita) */
.counter-valid {
    color: #28a745 !important;
    font-weight: bold !important;
}

/* Estilos pantalla investigador principal */
.supervisor-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr 1fr 2fr 1.5fr 50px;
    gap: 15px;
    align-items: center;
    padding: 12px;
}

/* Estilo del desplegable de incidencias */
.incidents-dropdown {
    background: #f9f9f9;
    border: 1px solid #eee;
    margin: 0 10px 10px 10px;
    padding: 15px;
    border-radius: 0 0 8px 8px;
    font-size: 1em;
}

.incident-item {
    border-bottom: 1px solid #ddd;
    padding: 10px 0;
}

.incident-item:last-child {
    border-bottom: none;
}

.incident-item ul {
    list-style: none;
    padding-left: 10px;
    margin-top: 5px;
}

/* Contenedor que agrupa la fila y su desplegable */
.patient-wrapper {
    background: #fff;
    border: 1px solid #e2e8f0; /* Borde único para todo el bloque */
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden; /* Para que el fondo del desplegable respete el redondeo */
    transition: all 0.3s ease;
}

/* Ajuste de la fila para que no tenga borde propio si está dentro del wrapper */
.patient-row {
    border-bottom: none !important; /* Quitamos cualquier línea divisoria interna */
    background: transparent;
}

.val-user-email {
    font-size: 0.95em;
    color: #555;
    word-break: break-all;
}


/* Estado base: Sin incidencias (Gris) */
.btn-consult-supervisor {
    background-color: #f1f5f9 !important;
    color: #64748b !important;
    border: 1px solid #e2e8f0;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.btn-consult-supervisor:hover {
    background-color: #e2e8f0;
}

/* Estado activo: Con incidencias (Naranja vibrante) */
.btn-consult-supervisor.has-incidents {
    background-color: #ffb24dab !important; /* Fondo naranja muy claro */
    color: #434343;           /* Texto naranja fuerte */
    border-color: #f3ac60;    /* Borde naranja */
}

.btn-consult-supervisor.has-incidents:hover {
    background-color: #ef9e3c;
}

/* --- Estilos para botón Descarga datos ZIP Paciente --- */

/* --- ESTILO DEL BOTÓN DE DESCARGA (ADMIN) --- */

.btn-download-audio-icon {
    background-color: #7290b0 !important; /* He usado el azul de tu botón "Registrar" para que combine */
    color: white;
    
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    
    cursor: pointer;
    
    /* CENTRADO ABSOLUTO */
    display: flex !important;    /* Forzamos flex */
    align-items: center !important;    /* Centrado vertical */
    justify-content: center !important; /* Centrado horizontal */
    
    padding: 0 !important; /* Quitamos padding que pueda estar desplazando el icono */
    margin: 0 auto;        /* Lo centra dentro de su celda del grid */
    
    transition: background-color 0.2s, transform 0.1s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.btn-download-audio-icon:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

.btn-download-audio-icon::before {
    content: "";
    width: 20px;
    height: 20px;
    background-color: white; /* El color del icono */
    
    /* Usamos el SVG como máscara */
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3" /></svg>');
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3" /></svg>');
    
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

/* --- ESTILO ESPECÍFICO PARA EL SVG INTERNO --- */
.btn-download-audio-icon .icon-svg {
    width: 20px;
    height: 20px;
    display: block; /* Elimina espacios residuales de línea de texto */
    stroke: white;
    stroke-width: 2.5; /* Un poco más de grosor para que se vea claro */
    
    /* Evitamos que el SVG herede márgenes */
    margin: 0 !important;
}

/* Asegurar que la columna del grid no tenga alineaciones extrañas */
.col-download-action {
    display: flex !important;
    align-items: center;
    justify-content: center;
    height: 100%; /* Para que ocupe todo el alto de la fila */
}

/* Asegurar que la columna del grid esté centrada */
.supervisor-grid > .col-download-action {
    display: flex;
    justify-content: center;
}

/* --- Estilos Estadísticas Ensayo Clínico 2026 --- */

/* 1. Bloque Superior: Tarjetas (izquierda) y Franjas (derecha) */
.top-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr; /* Las franjas tienen un poco más de espacio */
    gap: 20px;
    margin-bottom: 20px;
    align-items: stretch;
}

.global-cards-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stats-card {
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: center;
    border: 1px solid #f0f0f0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stats-card h3 {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.stats-card p {
    font-size: 1.6rem;
    font-weight: 800;
    color: #007bff;
    margin: 0;
}

.stats-subtext {
    display: block;
    margin-top: 10px;
    font-size: 0.85rem;
    color: #888;
}

/* 2. Estilo General de las Tablas de Estadísticas */
.doctor-stats-table-wrapper {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
    box-sizing: border-box;
}

.doctor-stats-table-wrapper.full-width {
    max-width: none !important;
    width: 100%;
    margin-bottom: 30px;
    margin-left: auto;
    margin-right: auto;
}

.doctor-stats-table-wrapper.compact {
    margin-bottom: 0;
}

.doctor-stats-table-wrapper h3 {
    font-size: 1rem;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

/* Centrar columnas de datos en la tabla de Investigadores (excepto el email) */
.doctor-stats-table-wrapper.full-width .doctor-stats-table th:nth-child(n+2),
.doctor-stats-table-wrapper.full-width .doctor-stats-table td:nth-child(n+2) {
    text-align: center !important;
}

/* El email del investigador se mantiene a la izquierda */
.doctor-stats-table-wrapper.full-width .doctor-stats-table td:first-child {
    text-align: left;
    font-weight: 500;
}

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

.doctor-stats-table th {
    text-align: left;
    padding: 12px;
    background-color: #f8f9fa;
    border-bottom: 2px solid #eee;
    color: #444;
    font-size: 0.85rem;
}

.doctor-stats-table td {
    padding: 12px;
    border-bottom: 1px solid #f9f9f9;
    color: #666;
    font-size: 0.85rem;
}

/* Ajustes específicos para la tabla pequeña de franjas horarias */
.compact .doctor-stats-table td {
    font-size: 0.95rem !important; /* Aumentado de 0.8rem */
    padding: 10px 8px;
}

/* También ajustamos los headers de esta tabla específica */
.compact .doctor-stats-table th {
    font-size: 0.9rem !important;
}

/* Centrado de las columnas de datos en la tabla de franjas */
.compact .doctor-stats-table th:nth-child(2),
.compact .doctor-stats-table td:nth-child(2),
.compact .doctor-stats-table th:nth-child(3),
.compact .doctor-stats-table td:nth-child(3) {
    text-align: center !important;
}

/* Mantenemos la primera columna (nombres de franjas) alineada a la izquierda */
.compact .doctor-stats-table td:first-child {
    text-align: left;
    font-weight: 500; /* Un poco más de grosor para destacar el nombre */
}

@media (max-width: 1000px) {
    /* Ocultamos la cabecera de la tabla */
    .patient-list-header.supervisor-grid {
        display: none;
    }

    /* Contenedor principal de la tarjeta del paciente */
    .patient-row.supervisor-grid {
        display: flex;
        flex-direction: column;
        padding: 16px;
        margin-bottom: 24px;
        border: 1px solid #e0e4e8;
        border-radius: 12px;
        background-color: #fff;
        gap: 0; /* Controlamos el espacio con paddings internos */
        box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    }

    /* BLOQUE 1: DATOS GENERALES (Fecha, IUP, Investigador, Estado) */
    .col-date, .col-id, .col-email, .col-status {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid #f0f2f5;
    }

    /* Etiquetas para los datos generales */
    .col-date::before { content: "Fecha y hora de creación"; }
    .col-id::before { content: "Identificador Único de Paciente"; }
    .col-email::before { content: "Investigador"; }
    .col-status::before { content: "Estado"; }

    .col-date::before, .col-id::before, .col-email::before, .col-status::before {
        font-weight: 600;
        color: #4a5568;
        font-size: 0.9rem;
    }

    /* BLOQUES 2 y 3: SECCIONES ESPECIALES (Diagnóstico e Incidencias) */
    .col-diag, .col-incidents {
        display: flex;
        flex-direction: column !important;
        align-items: flex-start !important;
        width: 100% !important;
        padding: 16px !important;
        margin-top: 12px;
        border-radius: 8px;
        background-color: #f8fafc; /* Fondo suave para diferenciar secciones */
        border: 1px solid #edf2f7;
    }

    /* Títulos de sección */
    .col-diag::before { content: "Diagnóstico Alta"; }
    .col-incidents::before { content: "Incidencias"; }

    .col-diag::before, .col-incidents::before {
        font-weight: 700;
        color: #2d3748;
        margin-bottom: 8px;
        font-size: 1rem;
    }

    /* Ajuste de los valores dentro de las secciones especiales */
    .val-diag-status, .val-incidents-text {
        margin-bottom: 12px;
        font-weight: 500;
        color: #2b6cb0; /* Azul para destacar el estado disponible */
    }

    /* Botones a ancho completo para facilitar el clic táctil */
    .btn-diag, .val-btn-consult {
        width: 100% !important;
        margin-left: 0 !important;
        padding: 12px !important;
        border-radius: 6px !important;
        font-weight: 600 !important;
        text-align: center;
    }

    /* Ajuste del contenedor desplegable de incidencias */
    .incidents-dropdown {
        width: 100% !important;
        box-sizing: border-box;
        padding: 12px !important;
        margin-top: 10px;
        background-color: #ffffff;
        border-top: 1px solid #edf2f7;
    }

    /* Cada ítem de incidencia individual */
    .incident-item {
        background-color: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        padding: 15px;
        margin-bottom: 15px;
        width: 100%;
        box-sizing: border-box;
    }

    /* El título de la incidencia (ej: Incidencia 1) */
    .incident-number {
        display: block;
        font-size: 1rem;
        color: #2d3748;
        border-bottom: 2px solid #cbd5e0;
        padding-bottom: 5px;
        margin-bottom: 10px;
    }

    /* Lista de detalles de la incidencia */
    .incident-item ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .incident-item li {
        display: flex;
        flex-direction: column; /* Apilamos etiqueta y valor */
        margin-bottom: 8px;
        font-size: 0.9rem;
        border-bottom: 1px solid #edf2f7;
        padding-bottom: 4px;
    }

    .incident-item li:last-child {
        border-bottom: none;
    }

    /* Etiquetas (Fecha, Tipo, Gravedad, etc.) */
    .incident-item li b {
        color: #4a5568;
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 0.025em;
        margin-bottom: 2px;
    }

    /* Valores del reporte */
    .incident-item span {
        color: #1a202c;
        font-weight: 500;
        line-height: 1.4;
    }

    /* Ajuste especial para el campo Descripción (que suele ser largo) */
    .report-description {
        word-break: break-word; /* Evita que el texto largo rompa el ancho */
        white-space: normal;
        display: block;
        margin-top: 4px;
        font-style: italic;
    }
}

@media (max-width: 780px) {
    /* Las estadísticas generales y la tabla de franjas pasan a ser una sola columna */
    .top-stats-grid {
        grid-template-columns: 1fr;
    }

    /* Permitimos que los headers de las tablas de estadísticas rompan línea */
    .doctor-stats-table th {
        white-space: normal; /* Permite que el texto largo se parta */
        vertical-align: middle;
        line-height: 1.2;
        padding: 8px 4px;
    }

    /* Ajuste específico para emails largos en la tabla de investigadores */
    .doctor-stats-table td:first-child {
        max-width: 100px;
        font-size: 0.75rem;
    }

    /* Reducimos el padding de las tablas para ganar espacio lateral */
    .doctor-stats-table-wrapper {
        padding: 10px;
    }

    /* Hacemos las tablas horizontales scrolleables si aún así no caben */
    .doctor-stats-table-wrapper {
        overflow-x: auto;
    }
}


/* Estilos para la sección de acciones de supervisión */
.supervisor-actions {
    margin-bottom: 25px;
    display: flex;
    justify-content: flex-start;
}

.btn-download {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #3772b1 !important; /* Un verde suave para distinguir de otros botones */
    padding: 10px 20px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.btn-download:hover {
    background-color:  #2b6cb0 !important;
}


/* TOGGLE RESEARCH_CHAT */
/* Contenedor padre para agrupar el toggle y la caja de fuentes */
/* Contenedor para alinear el botón a la derecha arriba */
/* Este contenedor alinea el H1 a la izquierda y el botón a la derecha */
.header-session-container {
    display: flex;
    justify-content: space-between; /* Separa los elementos a los extremos */
    align-items: center;            /* Los centra verticalmente entre sí */
    width: 100%;
}
/* Contenedor principal del selector */
.mode-selector-container {
    display: flex;
    align-items: center;
    gap: 15px; /* Espacio entre los textos y el botón */
}

/* Estilo para las etiquetas de texto laterales */
.mode-label {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #999; /* Color apagado para la opción no seleccionada */
    transition: all 0.3s ease;
}

/* Clase para resaltar la opción activa */
.mode-label.active {
    color: #333;
    font-weight: 700;
}

.mode-label.active-blue {
    color: #007bff;
    font-weight: 700;
}

/* --- El Switch (Ahora más pequeño y limpio) --- */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc; /* Color cuando apunta a la derecha */
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* --- ESTADOS --- */

/* Cuando está CHECKED (Respuesta rápida - Izquierda) */
/* Nota: Si quieres que por defecto sea profunda, el checkbox debe estar unchecked */
.switch input:checked + .slider {
    background-color: #007bff;
}

.switch input:checked + .slider:before {
    transform: translateX(24px);
}


/* Adaptación para móviles (Pantallas de 425px o menos) */
/* Adaptación para móviles (Pantallas de 425px o menos) */
@media screen and (max-width: 500px) {
    
    /* 1. Reorganizamos el contenedor principal en columna */
    .header-session-container {
        display: flex;
        flex-direction: column;
        align-items: flex-start; /* Alineamos todo a la izquierda */
        gap: 10px; /* Reducimos el espacio entre el título y el toggle */
        margin-bottom: 25px !important;
        padding-left: 5px; /* Un pequeño margen para que no pegue al borde */
    }

    /* 2. Reducimos el tamaño de la fuente para que quepa bien en una línea */
    .mode-label {
        font-size: 13px; /* Un poco más pequeña */
    }

    /* 3. Aseguramos que el contenedor del toggle no use flex-start para alinearse a la izquierda */
    .mode-selector-container {
        
        width: 100%;
        gap: 10px; /* Reducimos el espacio entre textos y el switch */
    }

    /* 4. Opcional: reducimos el tamaño del título en móvil */
    #sessionTopic {
        margin-top: 5px !important;
        margin-bottom: 0 !important;
        line-height: 1.2;
    }
}

@media screen and (max-width: 375px) {
    .mode-selector-container {
        gap: 6px; /* Reducimos el espacio entre elementos al mínimo */
        width: 100%;
        justify-content: flex-start;
    }

    .mode-label {
        font-size: 11px; /* Bajamos un poco más el tamaño de fuente */
        letter-spacing: -0.2px; /* Juntamos un pelín las letras */
        white-space: nowrap; /* ¡CLAVE! Evita que el texto salte de línea */
    }

    /* Reducimos el tamaño del switch para ganar espacio */
    .switch {
        width: 44px;
        height: 22px;
        flex-shrink: 0; /* Evita que el botón se aplaste */
    }

    .slider:before {
        height: 16px;
        width: 16px;
        left: 3px;
        bottom: 3px;
    }

    /* Ajustamos el recorrido del círculo para el nuevo tamaño */
    .switch input:checked + .slider:before {
        transform: translateX(22px);
    }
}


/* ESTILOS DESCARGA DE DATOS SUPERVISORS */
/* Estilos para la interfaz de descarga */
.td-status-wrapper {
    text-align: center;
    margin-top: 100px;
    padding: 30px;
}

.td-title-success {
    color: #10b981;
    font-size: 24px;
    font-weight: bold;
}

.td-title-error {
    color: #dc2626;
    font-size: 24px;
    font-weight: bold;
}

.td-text-body {
    color: #4b5563;
    margin: 10px 0;
}

.td-error-box {
    color: #b91c1c;
    background-color: #fee2e2;
    padding: 15px;
    border-radius: 4px;
    display: inline-block;
    margin: 20px 0;
}

/* Clases para los botones (usando nombres únicos para no chocar con los tuyos) */
.td-btn-main {
    margin-top: 20px;
    padding: 12px 24px;
    cursor: pointer;
    background-color: #27ae60;
    color: #ffffff;
    border: none;
    border-radius: 5px;
}

.td-btn-alt {
    margin-top: 20px;
    padding: 10px 20px;
    cursor: pointer;
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 5px;
}

/* Estilo para el botón enviar en research_chat bloqueado*/
/* Estado base del botón Stop */
.btn-stop-minimal {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: center;
    background-color: #ef4444 !important; /* Mantenemos el rojo */
    border-radius: 8px; /* Radio de borde estándar */
    
    /* --- CLAVE PARA EL EFECTO GORDITO --- */
    height: 42px !important;    /* Igualamos la altura estándar del botón Enviar */
    min-width: fit-content !important; /* Aumentamos padding lateral para dar cuerpo */
    flex-shrink: 0 !important;
    /* ------------------------------------- */

    cursor: pointer !important;
    border: none !important;
    transition: background-color 0.2s ease;
    gap: 8px; /* Espacio entre icono y texto */
    margin-left: 10px; /* Separación con el input */
}

.btn-stop-minimal:hover {
    background-color: #dc2626 !important;
}

.input-disabled-prohibited {
    cursor: not-allowed !important;
    background-color: #f9fafb !important; /* Un gris muy tenue para dar feedback visual */
}

/* Cursor prohibido para el Botón */
.btn-prohibited {
    cursor: not-allowed !important;
    opacity: 0.7; /* Lo hace ver un poco más apagado */
}

/* El icono proporcional al nuevo tamaño gordito */
.stop-icon-only {
    width: 14px !important;
    height: 14px !important;
}

/* El texto proporcional */
.stop-text {
    opacity: 1 !important;
    max-width: none !important;
    font-size: 14px !important; /* Misma fuente que el botón enviar */
    font-weight: 500;
    color: white;
    white-space: nowrap;
}

.input-area:has(#chatInput:disabled) {
    cursor: not-allowed !important;
}

#chatInput:disabled {
    background-color: #f4f4f4 !important;
    cursor: not-allowed !important;
    pointer-events: fill; 
}

/* Contenedor general del pensamiento dentro del mensaje */
.thought-container {
    order: 1;
}

/* El botón ultra-elegante y minimalista */
.thought-button {
    cursor: pointer;
    background: transparent !important; /* Forzamos quitar cualquier fondo */
    border: none !important;           /* Quitamos bordes */
    padding: 0;                        /* Sin relleno para que parezca texto puro */
    /* IGUALAMOS ESTAS PROPIEDADES A LAS DE .message-time */
    font-size: 0.75rem !important;  /* Mismo tamaño que la hora */    /* Mismo color gris claro */
    font-family: inherit;           /* Misma fuente */
    font-style: italic;                /* Cursiva elegante */
    color: #8b8b8b !important;                      /* Gris oscuro discreto */
    transition: color 0.2s ease;
    outline: none;
    box-shadow: none !important;       /* Eliminamos sombras si las hubiera */
}

/* Efecto hover muy sutil */
.thought-button:hover {
    color: #000;                       /* Se oscurece un poco al pasar el ratón */
    text-decoration: underline;        /* Opcional: subrayado fino para indicar que es link */
}
.thought-button:hover .emoji {
    filter: grayscale(0%); /* El emoji recupera su color */
    opacity: 1;            /* El emoji recupera su opacidad total */
}

/* Caja de despliegue del razonamiento */
.reasoning-box {
    width: 100%;
    margin-top: 8px;
    padding: 10px;
    background-color: transparent; /* Fondo transparente */
    border-top: 1px solid #eee;   /* Una línea divisoria muy fina arriba */
    box-sizing: border-box;
}

/* Estilo de cada línea de pensamiento */
.reasoning-item {
    font-size: 0.8rem;
    color: #777;        /* Gris intermedio */
    font-style: italic; /* Letras en cursiva */
    line-height: 1.4;
    margin-bottom: 5px;
    padding-left: 5px;
}

.brain-icon {
    width: 11px;
    height: 11px;
    object-fit: contain;
    flex-shrink: 0;
    filter: grayscale(100%) brightness(4); /* */
}
.arrow-icon{
    width: 9px;
    height: 7px;
    object-fit: contain;
    flex-shrink: 0;
    filter: grayscale(100%) brightness(4); /* */
}
.message-footer {
    display: flex;
    justify-content: flex-end; /* Alinea al final (derecha) */
    align-items: center;
    gap: 15px;
    width: 100%;
    margin-top: 0px;
    line-height: 1;   /* Reduce la altura de línea de la hora */
}

/* Forzamos al botón a tener el orden 1 (IZQUIERDA) */
.thought-container {
    order: 1; 
    display: flex;
    align-items: center;
}

/* Forzamos a la hora a tener el orden 2 (DERECHA DEL TODO) */
.message-time {
    order: 2; 
    font-size: 0.75rem;
    color: #a0a0a0;
    white-space: nowrap;
}
.message-text-content p {
    margin-bottom: 4px !important; /* Ajusta este número a tu gusto */
}
.stop-button {
    width: 17px;   /* Ajusta según el tamaño de tu botón */
    height: 17px;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}
/* Animación de palpitación */
@keyframes pulse-animation {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

.latest-step {
  animation: pulse-animation 2s infinite ease-in-out;
  font-weight: 600; /* Opcional: para que resalte más */
}
/* --- MEDIA QUERY PARA MÓVILES O CHATS ESTRECHOS --- */
@media screen and (max-width: 800px) {
    .loading-spinner {
        /* Forzamos dimensiones idénticas e inamovibles */
        width: 24px !important;
        height: 24px !important;
        
        /* Estas dos líneas evitan que se quede plano */
        min-width: 24px !important; 
        flex-shrink: 0 !important;
        
        /* Aseguramos que la proporción sea siempre 1:1 */
        aspect-ratio: 1 / 1 !important;
    }
}
@media (max-width: 400px) {
    .message-footer {
        flex-direction: column;  /* Apila uno sobre otro */
        align-items: flex-end;   /* Todo alineado a la derecha */
        gap: 4px;
    }
    
    .message-time {
        margin-left: 0;          /* Quita el empuje lateral en modo columna */
    }

    .thought-button {
        width: fit-content;      /* Evita que el botón ocupe todo el ancho */
    }
}

/* Quitar el margen excesivo que mete el Markdown */
.message-text-content p {
    margin: 0 0 2px 0 !important;
    padding: 0 !important;
}

/* Estilos para mensaje de error password segura*/
.error-message-password {
    color: #E56464;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 5px;
    display: none;
    transition: opacity 0.3s ease;
}

.error-message-password.visible {
    display: block !important;
}

#validation-error {
    max-width: 450px;    /* Mismo ancho que el formulario para alineación */
    margin: 10px auto 0; /* Centrado horizontalmente y con espacio arriba */
    color: #E56464 !important;
    font-size: 14px;
    text-align: center;
    line-height: 1.5;
    display: none;       /* Se activa con .visible */
}

#validation-error.visible {
    display: block;
}

.error-text-red {
    color: #E56464 !important; /* Tono de rojo uniforme */
    font-size: 14px;
    margin-top: 8px;
    display: block;
}

/* Estado cuando el botón de cancelar ya ha sido pulsado o la BBDD tiene stop: true */
.btn-stop-minimal.disabled-cancel {
    background-color: #9ca3af !important; /* Gris */
    opacity: 0.6;
    cursor: not-allowed !important;
    pointer-events: none; /* Evita que se dispare el evento click */
}

/* Para asegurar que el cursor de prohibido se vea incluso si el botón está "disabled" */
.btn-prohibited, 
.btn-stop-minimal.disabled-cancel {
    cursor: not-allowed !important;
}
/* Usamos 768px o menos, que es donde suelen empezar los problemas de desplazamiento */
@media screen and (max-width: 768px) {
    
    /* Buscamos el contenedor que envuelve al input y al botón */
    /* Ajusta '.input-area' al nombre real de tu div contenedor si es distinto */
    .input-area, 
    div:has(> #chatInput) { 
        display: flex !important;
        flex-direction: column !important; /* Fuerza a que el botón vaya debajo */
        align-items: stretch !important;   /* Estira el botón al ancho total */
        padding: 10px !important;         /* Alinea con el padding del chat */
        gap: 8px !important;
    }

    .btn-stop-minimal, 
    #sendBtn {
        width: 100% !important;   /* Ocupa todo el ancho disponible del chat */
        margin-left: 0 !important; /* ELIMINA el desplazamiento a la derecha */
        margin-right: 0 !important;
        left: 0 !important;
        position: relative !important;
        min-width: 100% !important;
    }
    
    /* Si tienes un icono dentro, asegúrate que no empuje el texto */
    .stop-icon-only {
        margin-left: 0 !important;
    }
}
#validationMessage {
    white-space: pre-line; /* Esto hace que el \n funcione como un salto de línea real */
    margin-top: 10px;
    line-height: 1.4;
}

/* Asterisco rojo para campos requeridos */
.required-asterisk {
    color: #dc3545; /* Rojo de advertencia */
    font-weight: bold;
    margin-left: 2px;
    font-size: 15px
}

/* Leyenda pequeña arriba del formulario */
.required-legend {
    font-size: 12px;
    color: #dc3545;
    margin-bottom: 10px;
    font-style: italic;
}

.section-header-row {
    display: flex;
    justify-content: space-between; /* Empuja el título a la izquierda y la leyenda a la derecha */
    align-items: baseline;          /* Alinea el texto por la base */
    margin-bottom: 10px;            /* Espacio con el primer input */
}

.section-header-row h3 {
    margin: 0;
}

.reference-box.cited-reference {
    background-color: #e8f4fd; /* O el color que prefieras para destacar */
    border-color: #2196f3;
}


/* Estilo evolucionado del Widget */
.connectivity-widget {
    position: relative !important;
    background: #ffffff !important;
    border: 1px solid #f0f0f0 !important; /* Borde muy sutil */
    border-radius: 20px !important;      /* Forma de píldora como tus otros botones */
    padding: 4px 12px !important;
    cursor: pointer !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #444 !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05) !important; /* Sombra suave */
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
}

.connectivity-widget:hover {
    box-shadow: 0 3px 8px rgba(0,0,0,0.1) !important;
    transform: translateY(-1px);
    border-color: #e0e0e0 !important;
}

/* Header del widget */
.conn-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* La bolita con un gradiente para que parezca un LED */
.status-circle {
    width: 10px !important;
    height: 10px !important;
    border-radius: 50% !important;
}

/* Desplegable estilizado */
.conn-details {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    background: #ffffff !important;
    border-radius: 12px !important;
    border: 1px solid #eee !important;
    padding: 12px !important;
    min-width: 160px !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
    z-index: 2000;
}

.conn-details.show {
    display: block !important;
    animation: fadeInDown 0.2s ease-out;
}

/* Animación de entrada */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Triángulo del desplegable */
.dropdown-icon {
    font-size: 8px !important;
    color: #aaa !important;
    margin-left: 6px !important;
    transition: transform 0.2s ease;
}

.connectivity-widget.open .dropdown-icon {
    transform: rotate(180deg);
}

/* Este es el contenedor que lo arregla todo */
.controls-section {
    display: flex !important;
    justify-content: space-between !important; /* Separa los tres grupos */
    align-items: center !important;          /* Centra verticalmente */
    width: 100% !important;
    padding: 10px 0 !important;
    position: relative !important;
}

/* Forzamos que la izquierda y la derecha pesen lo mismo para que el centro sea REAL */
.controls-left {
    flex: 1 !important; 
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important; /* Todo a la izquierda */
    gap: 8px !important;
}


/* Ajuste del widget para que no parezca un botón gigante */
.connectivity-widget {
    background: #ffffff !important;
    border: 1px solid #f0f0f0 !important;
    border-radius: 20px !important;      /* Forma de cápsula */
    padding: 4px 12px !important;
    display: inline-flex !important;     /* Importante para que no ocupe todo el ancho */
    align-items: center !important;
    cursor: pointer !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
}

/* Colores dinámicos para el texto del estado */
.status-text.perfect { 
    color: #2ecc71 !important; 
}

.status-text.mid { 
    color: #f1c40f !important; 
}

.status-text.low { 
    color: #e67e22 !important; 
}

.status-text.lost { 
    color: #e74c3c !important; 
}

.status-text.offline { 
    color: #000000 !important; 
}

/* Estilo base para que el texto resalte */
#connStatusText {
    font-weight: 700;
    text-transform: capitalize; /* Para que la primera letra sea Mayúscula */
}

/* --- ESTADOS DINÁMICOS DE LA BOLITA (LED) --- */

/* Estado Perfecto (Verde) - Ya lo tenías, lo incluyo para completar el grupo */
.status-circle.perfect { 
    background: radial-gradient(circle, #2ecc71 0%, #27ae60 100%) !important;
    box-shadow: 0 0 6px rgba(46, 204, 113, 0.6) !important;
}

/* Estado Estable/Medio (Amarillo) */
.status-circle.mid { 
    background: radial-gradient(circle, #f1c40f 0%, #f39c12 100%) !important;
    box-shadow: 0 0 6px rgba(241, 196, 15, 0.5) !important;
}

/* Estado Inestable/Bajo (Naranja) */
.status-circle.low { 
    background: radial-gradient(circle, #e67e22 0%, #d35400 100%) !important;
    box-shadow: 0 0 6px rgba(230, 126, 34, 0.5) !important;
}

/* Estado Desconectado/Perdido (Rojo) */
.status-circle.lost { 
    background: radial-gradient(circle, #e74c3c 0%, #c0392b 100%) !important;
    box-shadow: 0 0 8px rgba(231, 76, 60, 0.6) !important;
}

.status-circle.offline { 
    background: radial-gradient(circle, #000000 0%, #000000 100%) !important;
    box-shadow: 0 0 8px rgba(231, 76, 60, 0.6) !important;
}


.login-container input[type="text"],
.login-container input[type="tel"],
.login-container select,
.signup-container input[type="tel"] {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 15px;
    border-radius: var(--radius-4px);
    border: 1px solid var(--gray-200);
    box-sizing: border-box;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    color: var(--gray-900);
}

.login-container select,
.signup-container input[type="tel"]::placeholder,
.login-container input[type="tel"]::placeholder,
.login-container input[type="text"]::placeholder {
    color: var(--gray-400);
}

#mfa-login-block {
    margin-top: 10px;
}

#mfa-login-block p {
    margin-bottom: 15px;
    color: var(--gray-600);
}