/* Notion-inspired styling with preserved functionality */

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
    background-color: #ffffff;
    margin: 0;
    padding: 20px;
    color: #37352f;
    line-height: 1.5;
}

/* General adjustments */
.hidden {
    display: none !important;
}

.container {
    background: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: row;
    min-height: 100vh;
}

.header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

h1, h2 {
    text-align: center;
    color: #37352f;
    font-weight: 600;
}

form {
    display: flex;
    flex-direction: column;
}

label {
    margin-bottom: 5px;
    font-weight: 500;
    color: #37352f;
}

input, textarea, select {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #e6e6e6;
    border-radius: 3px;
    background-color: #ffffff;
    transition: border 0.2s;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #b8b8b8;
}

#add-sale-btn,
#add-client-btn,
#add-appointment-btn,
#add-property-btn {
    background: linear-gradient(135deg, #667eea 0%, #091e8a 100%);
    color: #fff;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    display: block;
    max-width: 180px;
    min-width: 120px;
    width: auto;
    text-align: center;
    margin: 20px 0 20px 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

#add-sale-btn:hover,
#add-client-btn:hover,
#add-appointment-btn:hover,
#add-property-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #091e8a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

button {
    padding: 10px;
    background: #f7f6f3;
    color: #37352f;
    border: 1px solid #e6e6e6;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-bottom: 20px;
}

button:hover {
    background: #efeeea;
}

.button-container {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
}

.appointments-list,
.properties-list,
.sales-list {
    display: none;
}

.appointments-list:not(.hidden),
.properties-list:not(.hidden),
.sales-list:not(.hidden) {
    display: block;
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.clients-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.appointments-list li,
.clients-list li {
    position: relative;
    padding: 12px;
    min-height: 80px; /* Ensure consistent height for button positioning */
}

.client-name {
    font-weight: 600;
    font-size: 1.2em;
    margin-bottom: 4px;
    display: block;
}

.clients-list .details {
    color: #666;
    line-height: 1.4;
    margin-right: 100px; /* Space for buttons */
}

.sales-list li,
.properties-list li {
    font-weight: normal;
    padding: 8px;
    margin-bottom: 5px;
    border-top: 1px solid rgba(55, 53, 47, 0.09);
}

.appointments-list li:hover,
.clients-list li:hover,
.sales-list li:hover,
.properties-list li:hover {
    background-color: rgba(55, 53, 47, 0.03);
}

.appointments-list li:last-child,
.clients-list li:last-child,
.sales-list li:last-child,
.properties-list li:last-child {
    border-top: none;
}

/* Menu adjustments */
.menu {
    background: linear-gradient(135deg, #ffffff 0%, #ededed 100%);
    border-right: 1px solid #e0e0e0;
    color: #000000;
    width: 220px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    padding: 20px;
    box-sizing: border-box;
}

.menu h1 {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #000000;
    text-align: center;
}

.menu ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.menu li {
    text-align: left;
}

.menu a {
    color: #000000;
    text-decoration: none;
    font-size: 16px;
    padding: 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.menu a:hover {
    background-color: rgba(27, 27, 27, 0.2);
}

/* Admin toggle button inside the menu */
.menu .admin-agent-toggle {
    display: none;
}
.menu .admin-agent-toggle:not(.hidden) {
    margin-bottom: 20px;
    background-color: #2eaadc;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    text-align: center;
    display: block;
    transition: background-color 0.2s;
}


.menu .admin-agent-toggle:hover {
    background-color: #1a91c9;
}

/* Logout button inside the menu */
.menu #logout {
    background-color: #ffffff;
    color: #000000;
    width: auto;
    padding: 10px 20px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    text-align: center;
    margin: 20px auto; /* Center horizontally */
    display: block;
    transition: background-color 0.2s;
}

.menu #logout:hover {
    background-color: #1a91c9;
}

/* Footer inside the menu */
.menu footer {
    margin-top: auto; /* Push footer to the bottom */
    text-align: center;
    font-size: 12px;
    color: #000000;
    line-height: 1.4;
}

.content {
    margin-left: 220px; /* Leave space for the fixed menu */
    padding: 20px;
    flex-grow: 1;
}

.edit-button {
    margin: 0;
    padding: 6px 12px;
    background-color: #f7f6f3;
    color: #37352f;
    margin-right: 4px;
}

.delete-button {
    margin: 0;
    padding: 6px 12px;
    background-color: #f7f6f3;
    color: #eb5757;
}

.toggle-container {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    justify-content: center;
}

/* Mobile-only scrollable toggle container */
@media (max-width: 768px) {
    .toggle-container,
    .sub-toggle-container {
        overflow-x: auto !important;
        flex-wrap: nowrap !important; /* Prevent wrapping */
        white-space: nowrap;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
        scrollbar-width: none; /* Hide scrollbar on Firefox */
        -ms-overflow-style: none; /* Hide scrollbar on IE/Edge */
        padding-bottom: 2px; /* Small padding to prevent cut-off */
    }
    
    .toggle-container::-webkit-scrollbar,
    .sub-toggle-container::-webkit-scrollbar {
        display: none; /* Hide scrollbar on Webkit browsers */
    }
    
    .toggle-option,
    .sales-toggle,
    .client-toggle-option,
    .property-toggle-option,
    .sub-toggle-option {
        flex-shrink: 0 !important; /* Prevent items from shrinking */
        white-space: nowrap; /* Keep text on single line */
    }
}

.toggle-option, .sales-toggle, .client-toggle-option, .property-toggle-option, .sub-toggle-option {
    background-color: #fff;
    color: #37352f;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-weight: 500;
    font-size: 15px;
    font-family: inherit;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
    outline: none;
    min-width: 100px;
}

.toggle-option.active, .sales-toggle.active, .client-toggle-option.active, .property-toggle-option.active, .sub-toggle-option.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #091e8a 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.toggle-option:hover:not(.active), .sales-toggle:hover:not(.active), .client-toggle-option:hover:not(.active), .property-toggle-option:hover:not(.active), .sub-toggle-option:hover:not(.active) {
    border-color: #bdbdbd;
    background: #f5f6fa;
    transform: translateY(-1px);
}

.admin-appointments-list {
    display: none;
}

.admin-appointments-list:not(.hidden) {
    list-style-type: none;
    padding: 10px;
    margin-top: 10px;
    border: 1px solid rgba(55, 53, 47, 0.09);
    border-radius: 3px;
    display: flex;
    flex-direction: column-reverse;
}

.admin-appointments-list li {
    font-weight: normal;
    padding: 8px;
    margin-bottom: 5px;
    border-top: 1px solid rgba(55, 53, 47, 0.09);
}

.admin-appointments-list li:last-child {
    border-top: none;
}

.clients-list .button-container {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
}

.datetime {
    font-weight: 600;
    font-size: 1.2em;
    margin-bottom: 8px;
    display: block;
}

.details {
    color: #666;
    line-height: 1.4;
    margin-right: 100px; /* Prevent text overlap with buttons */
}

/* Modal styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background-color: rgba(15, 15, 15, 0.5);
}
  
.modal-content {
    background-color: #ffffff;
    margin: 20px auto;
    padding: 20px;
    border: none;
    border-radius: 3px;
    width: 80%;
    max-width: 800px;
    min-height: fit-content;
    position: relative;
    box-shadow: rgba(15, 15, 15, 0.05) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 9px 24px;
}
  
.close {
    color: #b8b8b8;
    float: right;
    font-size: 28px;
    font-weight: bold;
}
  
.close:hover,
.close:focus {
    color: #37352f;
    text-decoration: none;
    cursor: pointer;
}

/* Mobile modal positioning */
@media (max-width: 768px) {
    .modal {
        padding-top: 120px; /* Push modal down below mobile nav bar */
    }
    
    .modal-content {
        margin: 20px auto 40px auto; /* Increased bottom margin for easier scrolling */
        width: 90%; /* Make modal wider on mobile */
        max-width: none; /* Remove max-width constraint on mobile */
    }
}

.appointment-p {
    display: none;
}

.client-p {
    display: none;
}

.property-p {
    display: none;
}

.id-p {
    display: none;
}

.type-p {
    display: none;
}

.sale-p {
    display: none;
}

.sale-info {
    color: #666;
    line-height: 1.4;
    margin-right: 100px; /* Space for buttons */
    font-size: 0.9em;
}

.tool {
    display: none;
}

.tool:not(.hidden) {
    display: flex;
    flex-direction: column;
}

.page {
    display: none;
}

.page:not(.hidden) {
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease-in-out;
}

 
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: auto;
        background-color: #1c1c1c; /* Dark background */
        display: flex;
        flex-direction: row; /* Horizontal layout */
        justify-content: flex-start; /* Align items to the left */
        align-items: center;
        padding: 15px 20px; /* Increased padding all around */
        border-radius: 0 0 15px 15px; /* More rounded corners at bottom */
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow */
        z-index: 1000;
        overflow-x: auto; /* Enable horizontal scrolling */
        white-space: nowrap; /* Prevent wrapping of menu items */
        box-sizing: border-box; /* Include padding in width calculation */
    }

    .menu ul {
        display: flex;
        flex-direction: row; /* Horizontal layout for menu items */
        gap: 10px;
        padding: 0; /* Remove padding here since we added it to parent */
        margin: 0;
        list-style: none;
        align-items: center; /* Vertically center the menu items */
    }

    .menu li {
        display: inline-block;
    }

    .menu a {
        color: #000000;
        text-decoration: none;
        font-size: 14px;
        padding: 10px 15px; /* Increased padding for better touch targets */
        border-radius: 8px; /* More rounded buttons */
        transition: background-color 0.2s;
        display: inline-block; /* Ensures padding is respected */
    }

    .menu a:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

    .menu h1 {
        display: none; /* Hide "Hola, ..." on mobile */
    }

    .menu footer {
        display: none; /* Hide footer on mobile */
    }

    .menu .admin-agent-toggle {
        display: none; /* Hide admin toggle on mobile */
    }

    .content {
        margin: 0 auto; /* Remove left margin and center content */
        padding: 110px 20px 20px 20px; /* Increased top padding to account for taller menu */
        text-align: center; /* Center content horizontally */
    }

    .appointments-list,
    .clients-list,
    .sales-list,
    .properties-list {
        margin: 0 auto; /* Center the lists horizontally */
        max-width: 600px; /* Limit the width of the lists */
    }

    .appointments-list li,
    .clients-list li {
        margin: 0 auto; /* Center individual list items */
    }

    #clientPageInner, 
    #appointmentPageInner,
    #salePageInner,
    #propertyPageInner {
        width: 90%;
        max-width: 600px;
        margin: 0 auto;
        padding: 15px;
    }
    
    form {
        width: 100%;
    }
    
    form input,
    form select,
    form textarea {
        width: 100%;
        box-sizing: border-box;
        font-size: 16px;
    }
}
.appointments-list li {
    border: 1px solid #e6e6e6;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 10px;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.appointments-list li:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Client box styling */
.clients-list li {
    border: 1px solid #e6e6e6; /* Light border */
    border-radius: 5px; /* Rounded corners */
    padding: 15px; /* Inner padding */
    margin-bottom: 10px; /* Space between items */
    background-color: #ffffff; /* White background */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle drop shadow */
}

.clients-list li:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Slightly stronger shadow on hover */
}

/* Property grid layout */
.properties-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.properties-list.hidden {
    display: none;
}

.properties-list:not(.hidden) {
    display: grid;
}

/* Property item styling for grid */
.properties-list li {
    position: relative;
    border: 1px solid #e6e6e6;
    border-radius: 5px;
    padding: 15px;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-height: 120px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.properties-list li:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Property card content structure for catalog */
.property-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.property-details {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.property-name {
    font-weight: 600;
    font-size: 1.2em;
    margin-bottom: 8px;
    color: #2c3e50;
    line-height: 1.3;
}

.property-price {
    font-size: 1.1em;
    font-weight: 600;
    color: #27ae60;
    margin-bottom: 6px;
}

.property-location {
    color: #666;
    font-size: 0.95em;
    margin-bottom: 12px;
    line-height: 1.4;
}

.property-status-type {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
}

.property-status, .property-type {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
    text-transform: capitalize;
}

.property-status {
    color: white;
}

.property-status.status-disponible {
    background-color: #27ae60;
}

.property-status.status-reservado {
    background-color: #f39c12;
}

.property-status.status-vendido {
    background-color: #e74c3c;
}

.property-status.status-archivada {
    background-color: #95a5a6;
}

.property-type {
    background-color: #ecf0f1;
    color: #2c3e50;
    border: 1px solid #bdc3c7;
}

.properties-list .property-name {
    font-weight: 600;
    font-size: 1.2em;
    margin-bottom: 4px;
    display: block;
}

.properties-list .details {
    color: #666;
    line-height: 1.4;
    margin-right: 100px;
    margin-bottom: 40px;
}

.properties-list .button-container {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
}

/* Responsive grid behavior */
@media (max-width: 1024px) {
    .properties-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .properties-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .properties-list .details {
        margin-right: 80px;
    }
}

.appointments-list,
.clients-list { /* Combined rule for initial state */
    display: none; /* Ensure all lists are hidden initially if they don't have .hidden by default through JS adding it */
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.appointments-list:not(.hidden),
.clients-list:not(.hidden) { /* Combined rule for visible state */
    display: block;
    /* list-style-type, padding, margin are already set above, so no need to repeat unless overriding */
}

.clients-list,
.sales-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.tool:not(.hidden) {
    display: flex;
    flex-direction: column;
}

.page {
    display: none;
}

.page:not(.hidden) {
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease-in-out;
}

/* Property filter styling */
.filter-container {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.filter-box {
    background-color: #f7f7f7;
    border: 1px solid #e6e6e6;
    border-radius: 5px;
    padding: 10px 15px;
    min-width: 200px;
}

.filter-box h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #37352f;
}

.sub-toggle-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.sub-toggle-option {
    background-color: transparent;
    color: #37352f;
    border: 1px solid #e6e6e6;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    border-radius: 3px;
    margin: 0;
}

.sub-toggle-option.active {
    background-color: #2eaadc;
    color: white;
    border-color: #2eaadc;
}

.my-properties-filter.active {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.sub-toggle-option:hover:not(.active) {
    background-color: #f0f0f0;
}

/* Sales list styling to match appointments/clients/properties */
.sales-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.sales-list:not(.hidden) {
    display: block;
}

.sales-list li {
    position: relative;
    border: 1px solid #e6e6e6;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 10px;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-height: 80px;
}

.sales-list li:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.sales-list .sale-amount {
    font-weight: 600;
    font-size: 1.2em;
    margin-bottom: 4px;
    display: block;
    color: #2eaadc;
}

.sales-list .button-container {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
}

/* Month divider styling for sales lists */
.sales-list .month-divider {
    background: none !important;
    border: none !important;
    padding: 20px 0 10px 0 !important;
    margin: 20px 0 10px 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    position: relative;
}

.sales-list .month-divider:hover {
    background: none !important;
    box-shadow: none !important;
}

.sales-list .month-divider:first-child {
    margin-top: 0 !important;
    padding-top: 10px !important;
}

.month-divider-content {
    text-align: center;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.month-divider-content h4 {
    background-color: #ffffff;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
    padding: 0 15px;
    display: inline-block;
    position: relative;
    z-index: 1;
}

.month-divider-content .month-total {
    background-color: #ffffff;
    color: #2eaadc;
    font-size: 0.875rem;
    font-weight: 700;
    margin: 0;
    padding: 0 15px;
    display: inline-block;
    position: relative;
    z-index: 1;
    margin-left: 0;
}

.month-divider-content::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, #e5e7eb 20%, #e5e7eb 80%, transparent);
    z-index: 0;
}

/* Responsive adjustments for month dividers */
@media (max-width: 768px) {
    .month-divider-content {
        flex-direction: column;
        gap: 5px;
    }
    
    .month-divider-content h4,
    .month-divider-content .month-total {
        font-size: 0.75rem;
        padding: 0 10px;
    }
}

.commission-total {
    text-align: left;
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(0deg, #060606 0%, #3e3e3e 100%);
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 2px solid #10b981; /* Thin green border */
}

.commission-total h3 {
    font-size: 16px;
    font-weight: 400;
    color: #fff;
    margin: 0 0 8px 0;
}

.commission-total h3 strong {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    display: block;
    margin-top: 4px;
}

/* Dashboard styling */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}

.dashboard-header h2 {
    margin: 0;
    text-align: left;
}

.dashboard-card {
    background-color: #f8f9fa;  
    border-radius: 20px;
    padding: 30px;
    margin: 20px 0 20px 20px;
    max-width: 800px;
    width: 60%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: left;
}

/* Download report button styling */
.download-report-btn {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 16px;
    font-weight: 400;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    margin: 0;
    transition: color 0.2s ease;
}

.download-report-btn:hover {
    color: #2563eb;
    background: none;
}

.dashboard-title {
    font-size: 24px;
    font-weight: 600;
    color: #37352f;
    margin-bottom: 10px;
}

.dashboard-amount {
    font-size: 48px;
    font-weight: 700;
    color: #37352f;
    margin-bottom: 20px;
}

.progress-container {
    margin-bottom: 15px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background-color: #d1d5db;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background-color: #10b981;
    border-radius: 6px;
    transition: width 0.5s ease-in-out;
    width: 0%;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

/* Leaderboard styling */
.leaderboard-section {
    margin: 20px 0 20px 20px;
    max-width: 800px;
    width: 60%;
}

.leaderboard-title {
    font-size: 24px;
    font-weight: 600;
    color: #37352f;
    margin-bottom: 20px;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.leaderboard-item {
    background-color: #e5e7eb;
    border-radius: 15px;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 500;
    color: #374151;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.leaderboard-item.first-place {
    background-color: #fef3c7;
    color: #92400e;
    border: 2px solid #f59e0b;
}

.leaderboard-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* --- Animas Form Custom Styles --- */

.animas-step {
    text-align: center;
    color: #b3b3d1;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.animas-title {
    text-align: center;
    font-size: 2.2rem;
    color: #5a6cae;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.animas-desc {
    text-align: center;
    color: #7d7d93;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.form-container {
    max-width: 520px;
    margin: 40px auto 0 auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 24px 0 rgba(90,108,174,0.10);
    padding: 2.5rem 2.5rem 2rem 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#clientForm {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem 2%;
    justify-content: space-between;
}


.form-group-plot {
    display: none;
}
.form-group-plot:not(.hidden) {
    flex: 0 0 48%;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #ccc; /* light grey line */
    padding-bottom: 1rem; /* space between fields and line */
    margin-bottom: 1.5rem; /* space after the line */
}


.form-group {
    flex: 0 0 48%;
    display: flex;
    flex-direction: column;
    margin-bottom: 1.2rem;
}

.form-group label {
    font-size: 1rem;
    color: #5a6cae;
    margin-bottom: 0.4rem;
    font-weight: 500;
}

.form-group input {
    font-size: 1.1rem;
    padding: 0.9rem 1.1rem;
    border-radius: 10px;
    border: 1.5px solid #e6e6f0;
    background: #f8f9fd;
    color: #37352f;
    transition: border 0.2s;
}

.form-group input:focus {
    border-color: #b3b3d1;
    outline: none;
}

.animas-submit-btn {
    width: 100%;
    margin-top: 0.5rem;
    padding: 1.1rem 0;
    background: linear-gradient(135deg, #667eea 0%, #091e8a 100%);
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 2px 8px 0 rgba(90,108,174,0.10);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    letter-spacing: 0.01em;
}

.animas-submit-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #091e8a 100%);
}

.animas-submit-btn .arrow {
    margin-left: 0.7rem;
    font-size: 1.3rem;
    font-weight: 700;
    display: inline-block;
}

/* Property image styling */
.property-image-container {
    width: 100%;
    height: 200px;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.property-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.no-image {
    color: #999;
    font-size: 14px;
    text-align: center;
    font-style: italic;
}

/* Loading Modal */
.loading-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    transition: opacity 0.3s ease;
}

.loading-modal.hidden {
    display: none;
}

.loading-modal-content {
    background: white;
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    animation: modalFadeIn 0.4s ease-out;
}

.loading-modal-content h3 {
    margin: 20px 0 10px 0;
    color: #37352f;
    font-size: 1.3rem;
    font-weight: 600;
}

.loading-modal-content p {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2eaadc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px auto;
}

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

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

/* Property images gallery in edit modal */
.property-images-gallery {
    margin: 20px 0;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    padding: 15px;
    background-color: #f8f9fa;
}

.property-images-gallery h4 {
    margin: 0 0 15px 0;
    color: #37352f;
    font-size: 16px;
    font-weight: 600;
}

.property-images-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

.property-images-container::-webkit-scrollbar {
    height: 8px;
}

.property-images-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.property-images-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.property-images-container::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}



.no-images-message {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 6px;
    border: 2px dashed #ddd;
}

.add-photo-button {
    flex-shrink: 0;
    width: 120px;
    height: 90px;
    background-color: #ffffff;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, background-color 0.2s;
}

.add-photo-button:hover {
    border-color: #9ca3af;
    background-color: #f9fafb;
}

.add-photo-button .plus-icon {
    font-size: 32px;
    color: #6b7280;
    font-weight: bold;
    user-select: none;
}

/* Login Page Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    padding: 20px;
}

.login-form-container {
    background: white;
    border-radius: 12px;
    padding: 48px 40px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-title {
    font-size: 30px;
    font-weight: 600;
    color: #1f2937;
    text-align: center;
    margin: 0 0 8px 0;
}

.login-subtitle {
    font-size: 16px;
    color: #6b7280;
    text-align: center;
    margin: 0 0 32px 0;
    line-height: 1.5;
}

.login-form-container .form-group {
    margin-bottom: 20px;
}

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

.login-form-container .form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    background-color: white;
    color: #1f2937;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    box-sizing: border-box;
    margin: 0;
}

.login-form-container .form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.login-form-container .form-group input::placeholder {
    color: #9ca3af;
}

.password-input-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease-in-out;
}

.password-toggle:hover {
    color: #374151;
}

.password-toggle:focus {
    outline: none;
    color: #3b82f6;
}

.eye-icon {
    width: 20px;
    height: 20px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    user-select: none;
}

.checkbox-container input[type="checkbox"] {
    width: auto;
    margin: 0 8px 0 0;
    padding: 0;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
}

.checkbox-container input[type="checkbox"]:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.forgot-password {
    font-size: 14px;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease-in-out;
}

.forgot-password:hover {
    color: #2563eb;
}

.login-button {
    width: 100%;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    margin: 0;
}

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

.login-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Mobile responsiveness for login */
@media (max-width: 480px) {
    .login-container {
        padding: 16px;
    }
    
    .login-form-container {
        padding: 32px 24px;
    }
    
    .login-title {
        font-size: 24px;
    }
    
    .login-subtitle {
        font-size: 14px;
        margin-bottom: 24px;
    }
}

/* Property Images Upload Section */
.property-images-upload-section {
    margin: 20px 0;
}

.property-images-upload-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #37352f;
}

.property-images-preview-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
    min-height: 110px;
    align-items: flex-start;
}

.property-images-preview-container::-webkit-scrollbar {
    height: 8px;
}

.property-images-preview-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.property-images-preview-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.property-images-preview-container::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.property-image-preview {
    position: relative;
    flex-shrink: 0;
    width: 120px;
    height: 90px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    background-color: #ffffff;
}

.property-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-image-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px;
}

.image-order-controls {
    display: flex;
    gap: 2px;
}

.image-order-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 3px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    color: #374151;
    transition: background-color 0.2s;
}

.image-order-btn:hover {
    background: rgba(255, 255, 255, 1);
}

.image-order-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.image-remove-btn {
    background: rgba(239, 68, 68, 0.9);
    border: none;
    border-radius: 3px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    color: white;
    transition: background-color 0.2s;
}

.image-remove-btn:hover {
    background: rgba(239, 68, 68, 1);
}

.image-order-number {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(59, 130, 246, 0.9);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

/* Loan Calculator Results Styling */
.loan-results {
    margin-top: 30px;
    padding: 25px;
    background-color: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e6e6e6;
    animation: fadeIn 0.3s ease-in-out;
}

.loan-results.hidden {
    display: none;
}

.loan-results h3 {
    color: #37352f;
    margin: 0 0 20px 0;
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e6e6e6;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item.total-investment {
    margin-top: 10px;
    padding-top: 15px;
    border-top: 2px solid #2eaadc;
    border-bottom: none;
    background-color: rgba(46, 170, 220, 0.05);
    border-radius: 6px;
    padding: 15px 12px;
}

.result-label {
    font-weight: 500;
    color: #37352f;
    font-size: 0.95rem;
}

.result-value {
    font-weight: 600;
    color: #2eaadc;
    font-size: 1.1rem;
}

.total-investment .result-label {
    font-weight: 600;
    color: #37352f;
}

.total-investment .result-value {
    font-weight: 700;
    color: #2eaadc;
    font-size: 1.2rem;
}

/* Calculator Toggle Styling */
.calculator-toggle-container {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.calculator-toggle-option {
    background-color: #fff;
    color: #37352f;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-weight: 500;
    font-size: 16px;
    font-family: inherit;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
    outline: none;
    min-width: 120px;
}

.calculator-toggle-option.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #091e8a 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.calculator-toggle-option:hover:not(.active) {
    border-color: #bdbdbd;
    background: #f5f6fa;
    transform: translateY(-1px);
}

/* Calculator Section Styling */
.calculator-section {
    animation: fadeIn 0.3s ease-in-out;
}

.calculator-section.hidden {
    display: none;
}

/* Loan Calculator Form Styling */
#loanCalculatorForm,
#financingCalculatorForm {
    display: flex;
    flex-direction: column;
}

#loanCalculatorForm label,
#financingCalculatorForm label {
    margin-bottom: 5px;
    font-weight: 500;
    color: #37352f;
}

#loanCalculatorForm input,
#financingCalculatorForm input {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #e6e6e6;
    border-radius: 3px;
    background-color: #ffffff;
    transition: border 0.2s;
}

#loanCalculatorForm input:focus,
#financingCalculatorForm input:focus {
    outline: none;
    border-color: #b8b8b8;
}

/* Loan Calculator Button Styling */
.loan-calculate-btn {
    background: linear-gradient(135deg, #667eea 0%, #1c15de 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
}

.loan-calculate-btn:hover {
    background: linear-gradient(135deg, #1c15de 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.loan-calculate-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

/* Mobile responsiveness for loan results */
@media (max-width: 768px) {
    .loan-results {
        margin-top: 20px;
        padding: 20px;
    }
    
    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        padding: 10px 0;
    }
    
    .result-label,
    .result-value {
        font-size: 0.9rem;
    }
    
    .total-investment .result-value {
        font-size: 1.1rem;
    }
    
    .loan-calculate-btn {
        width: 100%;
        padding: 14px 24px;
        font-size: 18px;
    }
}

/* Sales Form Modal Styles */
.sales-form-container {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.sales-form-left,
.sales-form-right {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sales-form-left h3,
.sales-form-right h3 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #37352f;
    border-bottom: 2px solid #e6e6e6;
    padding-bottom: 8px;
}

.sales-form-left h4,
.sales-form-right h4 {
    margin: 15px 0 10px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #667eea;
}

.sales-form-left label,
.sales-form-right label {
    margin-bottom: 5px;
    font-weight: 500;
    color: #37352f;
    font-size: 0.95rem;
}

.sales-form-left input,
.sales-form-left select,
.sales-form-left textarea,
.sales-form-right input,
.sales-form-right select,
.sales-form-right textarea {
    margin-bottom: 12px;
    padding: 10px;
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    background-color: #ffffff;
    transition: border 0.2s;
    font-size: 0.95rem;
}

.sales-form-left input:focus,
.sales-form-left select:focus,
.sales-form-left textarea:focus,
.sales-form-right input:focus,
.sales-form-right select:focus,
.sales-form-right textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.sales-form-left input[readonly] {
    background-color: #f8f9fa;
    color: #6c757d;
}

.sales-form-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.sales-submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #091e8a 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sales-next-btn {
    background: linear-gradient(135deg, #2eaadc 0%, #1e90d1 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(46, 170, 220, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sales-submit-btn:hover {
    background: linear-gradient(135deg, #091e8a 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.sales-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.sales-next-btn:hover {
    background: linear-gradient(135deg, #1e90d1 0%, #2eaadc 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 170, 220, 0.4);
}

.sales-next-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(46, 170, 220, 0.3);
}

/* Conditional sections styling */
#salePropertyPlotSection {
    background-color: #f8f9fa;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    padding: 15px;
    margin-top: 10px;
    transition: all 0.3s ease;
}

#saleFinancingFields {
    background-color: #f8f9fa;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    padding: 15px;
    margin-top: 10px;
    transition: all 0.3s ease;
}

#salePropertyPlotSection.hidden,
#saleFinancingFields.hidden {
    display: none !important;
}

/* Mobile responsiveness for sales form */
@media (max-width: 768px) {
    .sales-form-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .sales-form-left h3,
    .sales-form-right h3 {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    .sales-form-left input,
    .sales-form-left select,
    .sales-form-left textarea,
    .sales-form-right input,
    .sales-form-right select,
    .sales-form-right textarea {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .sales-form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .sales-submit-btn,
    .sales-next-btn {
        width: 100%;
        padding: 14px 24px;
        font-size: 18px;
    }
    
    #salePropertyPlotSection,
    #saleFinancingFields {
        padding: 12px;
        margin-top: 8px;
    }
}

/* Documents Upload Form Styles */
.documents-form-container {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
}

.documents-form-left,
.documents-form-right {
    flex: 1;
}

.documents-form-left h3,
.documents-form-right h3 {
    color: #37352f;
    margin-bottom: 20px;
    margin-top: 30px;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
}

.documents-form-left h3:first-child,
.documents-form-right h3:first-child {
    margin-top: 0;
}

.documents-form-left label,
.documents-form-right label {
    display: block;
    margin-bottom: 8px;
    color: #37352f;
    font-weight: 500;
    font-size: 14px;
}

.documents-form-left input,
.documents-form-left select,
.documents-form-right input,
.documents-form-right select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.documents-form-left input:focus,
.documents-form-left select:focus,
.documents-form-right input:focus,
.documents-form-right select:focus {
    outline: none;
    border-color: #2eaadc;
    box-shadow: 0 0 0 3px rgba(46, 170, 220, 0.1);
}

.documents-form-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

.documents-submit-btn {
    background: linear-gradient(135deg, #2eaadc 0%, #1e90d1 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(46, 170, 220, 0.3);
}

.documents-previous-btn {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.documents-previous-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

.documents-previous-btn:active {
    transform: translateY(0);
}

.documents-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 170, 220, 0.4);
}

.documents-submit-btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .documents-form-container {
        flex-direction: column;
        gap: 0;
    }
    
    .documents-form-left h3,
    .documents-form-right h3 {
        margin-top: 20px;
        font-size: 14px;
    }
    
    .documents-form-left input,
    .documents-form-left select,
    .documents-form-right input,
    .documents-form-right select {
        font-size: 16px;
        padding: 14px;
    }
    
    .documents-form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .documents-submit-btn,
    .documents-previous-btn {
        font-size: 16px;
        padding: 16px 24px;
        width: 100%;
    }
}

/* Documents upload section styles */
.documents-upload-section {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.documents-upload-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

.document-upload-item {
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background-color: white;
}

.document-upload-item label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #555;
}

.document-upload-item input[type="file"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
}

.upload-status {
    margin-top: 5px;
    padding: 5px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
}

.upload-status.uploading {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.upload-status.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.upload-status.error {
    background-color: #f8d7da;
    color: #e74c3c;
    border: 1px solid #f5c6cb;
}

.document-upload-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 5px;
}

.view-document-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.view-document-btn:hover {
    background: #219a52;
}

.upload-document-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.upload-document-btn:hover {
    background: #2980b9;
}

.view-document-btn.hidden {
    display: none;
}

@media (max-width: 768px) {
    .document-upload-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .view-document-btn,
    .upload-document-btn {
        width: 100%;
        padding: 10px;
        font-size: 14px;
    }
}

/* Signing Appointment Modal Styles */
.signing-form-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.signing-form-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.signing-form-section h3 {
    margin: 0 0 16px 0;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 8px;
}

.sale-info-display {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sale-info-display p {
    margin: 0;
    font-size: 14px;
    color: #6c757d;
}

.sale-info-display strong {
    color: #495057;
    font-weight: 600;
}

.sale-info-display span {
    color: #212529;
    font-weight: 500;
}

.signing-form-section label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.signing-form-section input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
    transition: border-color 0.2s ease;
}

.signing-form-section input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.signing-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.signing-submit-btn {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

.signing-cancel-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.signing-cancel-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.signing-cancel-btn:active {
    transform: translateY(0);
}

.signing-submit-btn:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.signing-submit-btn:active {
    transform: translateY(0);
}

/* Manage Signing Appointment Modal Styles */
.manage-signing-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.signing-info-section,
.modify-signing-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.signing-info-section h3,
.modify-signing-section h3 {
    margin: 0 0 16px 0;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 8px;
}

.signing-info-display {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.signing-info-display p {
    margin: 0;
    font-size: 14px;
    color: #6c757d;
}

.signing-info-display strong {
    color: #495057;
    font-weight: 600;
}

.signing-info-display span {
    color: #212529;
    font-weight: 500;
}

.modify-signing-section label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.modify-signing-section input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
    transition: border-color 0.2s ease;
}

.modify-signing-section input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.manage-signing-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.modify-appointment-btn {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.cancel-appointment-btn {
    background: linear-gradient(135deg, #dc3545, #bd2130);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

.modify-appointment-btn:hover {
    background: linear-gradient(135deg, #1e7e34, #155724);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.cancel-appointment-btn:hover {
    background: linear-gradient(135deg, #bd2130, #a71e2a);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.modify-appointment-btn:active,
.cancel-appointment-btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .signing-form-container {
        gap: 16px;
    }
    
    .signing-form-section {
        padding: 16px;
    }
    
    .signing-form-section h3 {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .signing-form-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .signing-submit-btn,
    .signing-cancel-btn {
        width: 100%;
        padding: 14px;
        font-size: 16px;
    }

    .manage-signing-container {
        gap: 16px;
    }
    
    .signing-info-section,
    .modify-signing-section {
        padding: 16px;
    }
    
    .signing-info-section h3,
    .modify-signing-section h3 {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .manage-signing-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .modify-appointment-btn,
    .cancel-appointment-btn {
        width: 100%;
        padding: 14px;
        font-size: 16px;
    }
}

/* ====== ADMIN CLIENT CARDS STYLES ====== */

.client-item {
    margin-bottom: 16px;
    list-style: none;
}

.client-card {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.client-card:hover {
    border-color: #ff9800;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.1);
    transform: translateY(-1px);
}

.client-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f3f4;
}

.client-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #37352f;
}

.client-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-lead {
    background-color: #e3f2fd;
    color: #1976d2;
}

.status-cita {
    background-color: #fff3e0;
    color: #f57c00;
}

.status-cerrado {
    background-color: #e8f5e8;
    color: #388e3c;
}

.status-descartado {
    background-color: #ffebee;
    color: #d32f2f;
}

.client-details {
    margin-bottom: 16px;
}

.client-details p {
    margin: 4px 0;
    font-size: 14px;
    color: #5f6368;
    line-height: 1.4;
}

.client-details strong {
    color: #37352f;
    font-weight: 500;
}


/* Filter container for agent filter */
.filter-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.filter-container label {
    font-size: 14px;
    font-weight: 500;
    color: #37352f;
    margin: 0;
}

.filter-container select {
    padding: 6px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
    color: #37352f;
    min-width: 150px;
}

.filter-container select:focus {
    outline: none;
    border-color: #ff9800;
    box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.2);
}

/* Empty state for client lists */
.clients-list:empty::after {
    content: "No hay clientes en esta categoría";
    display: block;
    text-align: center;
    padding: 40px 20px;
    color: #9aa0a6;
    font-style: italic;
    font-size: 14px;
}

/* Responsive adjustments for client cards */
@media (max-width: 768px) {
    .client-card {
        padding: 12px;
    }
    
    .client-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .client-header h3 {
        font-size: 14px;
    }
    
    .client-status {
        font-size: 11px;
        padding: 3px 10px;
    }
    
    .client-details p {
        font-size: 13px;
    }
    
    .filter-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .filter-container select {
        width: 100%;
        min-width: unset;
    }
}