* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
}

/* Login Screen */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #001641;
    padding: 2rem;
}

.login-card {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.login-logo {
    margin-bottom: 3rem;
}

.login-logo-icon {
    width: 120px;
    height: 120px;
    /*background-color: #00D9C5;*/
    /*border-radius: 50%;*/
    display: flex;
    align-items: center;
    justify-content: center;
    /*color: white;*/
    /*font-size: 2.5rem;*/
    /*font-weight: bold;*/
    margin: 0 auto 3rem;
}

.logo-icon {
    width: 180px !important;  /* Agrandado */
    height: 180px !important; /* Agrandado */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
}

.login-title {
    font-size: 2rem;
    color: #001641;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: #002D5A;
    margin-bottom: 2rem;
}

.login-form {
    text-align: left;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    color: #002D5A;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #00D9C5;
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

.login-button {
    width: 100%;
    background-color: #00D9C5;
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 217, 197, 0.4);
}

.login-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.manual-button {
    width: 100%;
    background-color: #002D5A;
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.manual-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.recursos-demo {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.recursos-demo h4 {
    color: #002D5A;
    margin-bottom: 1rem;
    font-size: 1rem;
    text-align: center;
}

.demo-files {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.demo-file-btn {
    width: 100%;
    background-color: #00D9C5;
    color: white;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.demo-file-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 217, 197, 0.4);
}

.demo-credentials {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #002D5A;
}

.demo-credentials strong {
    color: #002D5A;
}

/* Main App Styles */
.app-container {
    display: none;
}

.app-container.active {
    display: block;
}

.header {
    background-color: #001641;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    flex-wrap: nowrap
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.logo-icon {
    width: 40px;
    height: 40px;
/*    background-color: #00D9C5;
    border-radius: 50%;*/
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-main {
    font-size: 1.8rem;
    letter-spacing: 2px;
}

.logo-subtitle {
    font-size: 0.7rem;
    opacity: 0.8;
    font-weight: normal;
    margin-top: 0.2rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    border-radius: 4px;
    font-size: 0.9rem;
}

.nav-item:hover {
    background-color: rgba(255,255,255,0.1);
}

.nav-item.active {
    background-color: rgba(255,255,255,0.2);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background-color: #00D9C5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255,255,255,0.3);
}

.user-menu {
    position: absolute;
    top: 60px;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    min-width: 280px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.user-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-menu-avatar {
    width: 50px;
    height: 50px;
    background-color: #00D9C5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 1.2rem;
}

.user-menu-info h3 {
    margin: 0;
    color: #001641;
    font-size: 1.1rem;
}

.user-menu-info p {
    margin: 0.25rem 0 0 0;
    color: #002D5A;
    font-size: 0.875rem;
}

.user-menu-items {
    padding: 0.5rem 0;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: #002D5A;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 0.95rem;
}

.user-menu-item:hover {
    background-color: #f3f4f6;
}

.user-menu-item.logout {
    color: #ef4444;
    border-top: 1px solid #e5e7eb;
}

.user-menu-item.logout:hover {
    background-color: #fef2f2;
}

.main-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.hero-section {
    background-color: #002D5A;
    color: white;
    padding: 3rem 2rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 300;
    letter-spacing: 2px;
}

hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.6;
}

.content-section {
    display: none;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

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

.section-title {
    font-size: 1.8rem;
    color: #002D5A;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-icon {
    width: 60px;
    height: 60px;
    background-color: #00D9C5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.file-upload-container {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 3rem;
    text-align: center;
    background-color: #f9fafb;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.file-upload-container:hover {
    border-color: #00D9C5;
    background-color: rgba(0,217,197,0.06);
}

.file-upload-container.dragover {
    border-color: #004987;
    background-color: rgba(0,217,197,0.06);
    transform: scale(1.02);
}

.upload-text {
    font-size: 1.1rem;
    color: #002D5A;
    margin-bottom: 1rem;
}

.file-input {
    display: none;
}

.upload-button {
    background-color: #00D9C5;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin: 0 0.5rem;
}

.upload-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 217, 197, 0.4);
}

.upload-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.delete-button {
    background-color: #ef4444;
}

.delete-button:hover {
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.success-button {
    background-color: #BFE41A;
}

.success-button:hover {
    box-shadow: 0 4px 12px rgba(191, 228, 26, 0.4);
}

.file-list {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.file-list h3 {
    color: #002D5A;
    margin-bottom: 1rem;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

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

.file-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.file-name {
    font-weight: 600;
    color: #001641;
}

.file-meta {
    font-size: 0.875rem;
    color: #002D5A;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

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

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #002D5A;
}

.stat-label {
    color: #002D5A;
    margin-top: 0.5rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.data-table th {
    background: #f8fafc;
    color: #002D5A;
    font-weight: 600;
    padding: 1rem;
    text-align: left;
    border-bottom: 2px solid #e5e7eb;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.data-table tr:hover {
    background: #f9fafb;
    cursor: pointer;
}

.search-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-input {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    flex: 1;
    min-width: 200px;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    transform: scale(0.8);
    transition: all 0.3s ease;
    max-height: 80vh;
    overflow-y: auto;
}

.modal.active .modal-content {
    transform: scale(1);
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    z-index: 3000;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success { background-color: #BFE41A; }
.notification.error { background: #ef4444; }
.notification.warning { background: #f59e0b; }
.notification.info { background-color: #00D9C5; }

.loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

.nav-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
}

.menu-toggle,
mobile-menu {
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

.fade-in {
    animation: fadeIn 0.5s ease;
}

@media (min-width: 769px) {
    .header {
        display: flex;
        align-items: center;
        padding: 1rem 2rem;
        gap: 1rem;
    }

    .logo { order: 1; flex: 0 0 auto; }
    .nav-wrapper { order: 2; flex: 1; display: flex; justify-content: center; }
    .user-info { order: 3; flex: 0 0 auto; position: static; }

    .nav-menu { display: flex; gap: 2rem; }
    .menu-toggle { display: none; }
}


@media (max-width: 768px) {
    .nav-menu { display: none; }
    .hero-title { font-size: 2rem; }
    .main-content { padding: 0 1rem; }
    .stats-grid { grid-template-columns: 1fr; }
    .search-filters { flex-direction: column; }
    .filter-input { min-width: auto; }
    .login-card { padding: 2rem; margin: 1rem; }

    /* Mejoras para los botones de archivo */
    .file-upload-container {
        padding: 2rem 1rem;
    }

    /* Contenedor de botones con mejor espaciado */
    .upload-buttons-container {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    /* Si los botones están en fila, separarlos mejor */
    .upload-button {
        margin: 0.5rem 0;
        min-width: 120px;
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }
    .upload-buttons-column {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        margin-top: 1rem;
    }

    .upload-buttons-column .upload-button {
        width: 100%;
        max-width: 300px;
        padding: 1rem;
        font-size: 1rem;
    }
}

    /* Para botones en línea horizontal con mejor espaciado */
    .buttons-row {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        justify-content: center;
        margin: 1rem 0;
    }

    .buttons-row .upload-button {
        flex: 1;
        min-width: 100px;
        margin: 0;
    }

    /* Mejoras para la lista de archivos */
    .file-list {
        padding: 1rem;
        margin-top: 1.5rem;
    }

    .file-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem 0.75rem;
    }

    .file-info {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .file-name {
        font-size: 0.9rem;
        line-height: 1.3;
        word-break: break-word;
        margin-bottom: 0.25rem;
    }

    .file-meta {
        font-size: 0.8rem;
    }

    /* Botones de archivo más pequeños y apilados */
    .file-actions {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .file-actions .upload-button,
    .file-actions .delete-button {
        width: 100%;
        padding: 0.75rem;
        font-size: 0.85rem;
        margin: 0;
    }

    /* Alternativa: botones en fila para archivos */
    .file-actions-row {
        display: flex;
        gap: 0.5rem;
        width: 100%;
    }

    .file-actions-row .upload-button,
    .file-actions-row .delete-button {
        flex: 1;
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
        margin: 0;
    }

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

    .logo {
        margin-left: 0 !important;
        margin-right: auto !important;
        position: relative !important;
        left: 0 !important;
        transform: none !important;

    }    

    .logo-main {
        font-size: 1.4rem;
    }

    .user-info {
        position: absolute;
        top: 4rem;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        align-items: center;
        gap: 0.5rem;
        z-index: 9999;

    }

    
    /* Modal responsive */
    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
        width: calc(100% - 2rem);
    }

    /* Tabla responsive */
    .data-table {
        font-size: 0.85rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
    }

    /* Notificaciones responsive */
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
        text-align: center;
    }

    /* Sección de contenido con mejor padding */
    .content-section {
        padding: 1.5rem 1rem;
        margin-bottom: 1rem;
    }

    .section-title {
        font-size: 1.4rem;
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .section-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

      .menu-toggle {
        display: block;
        position: absolute;
        top: 2.5rem;
        right: 1rem;
        background: none;
        border: none;
        font-size: 2rem;
        color: white;
        z-index: 9999;
      }

    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 100%;
        background-color: #001641;
        color: white;
        display: flex;
        flex-direction: column;
        padding: 2rem;
        z-index: 9998;
        transition: transform 0.3s ease;
        transform: translateX(100%);
    }

    .mobile-menu-overlay.show {
        transform: translateX(0);
    }

    .close-mobile-menu {
        align-self: flex-end;
        font-size: 2rem;
        background: none;
        border: none;
        color: white;
        cursor: pointer;
        margin-bottom: 2rem;
    }

    .mobile-nav {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .mobile-nav .nav-item {
        font-size: 1.2rem;
        padding: 1rem;
        border-radius: 6px;
        background-color: rgba(255,255,255,0.05);
        cursor: pointer;
        transition: background-color 0.2s;
    }

    .mobile-nav .nav-item:hover {
        background-color: rgba(255,255,255,0.15);
    }

    .nav-menu {
        display: none; /* oculta menú normal */
    }
    

    body.menu-open {
        overflow: hidden; /* evita scroll del fondo */
    }

    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Reforzamos el ancho mínimo de la tabla */
    #rendicionesTable.data-table {
        min-width: 700px; /* o más si tenés muchas columnas */
    }

    /* Opcional: Estilo para que se vea bien el scroll */
    .table-responsive::-webkit-scrollbar {
        height: 6px;
    }

    .table-responsive::-webkit-scrollbar-thumb {
        background-color: rgba(0,0,0,0.2);
        border-radius: 3px;
    }

    /* Asegurarse que la tabla no se rompa */
    .data-table {
        min-width: 600px; /* o lo que necesites según columnas */
    }
    body.menu-open .user-info {
      display: none !important;
    }


}

@media (max-width: 480px) {
    .file-upload-container {
        padding: 1.5rem 0.75rem;
    }
    
    .upload-text {
        font-size: 1rem;
    }
    
    .upload-button {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
    
    .file-item {
        padding: 0.75rem;
    }
    
    .file-name {
        font-size: 0.85rem;
    }
    
    .hero-section {
        padding: 2rem 1rem;
    }
    
    .hero-title {
        font-size: 1.6rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
}

.liquidacion-upload-section {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 2px dashed #e5e7eb;
}

.liquidacion-upload-section h3 {
    color: #002D5A;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.ejemplo-liquidacion {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.ejemplo-liquidacion h4 {
    color: #002D5A;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.ejemplo-liquidacion p {
    color: #002D5A;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.operaciones-section {
    margin-top: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h3 {
    color: #002D5A;
    font-size: 1.2rem;
    margin: 0;
}

.operacion-pendiente {
    background-color: #fefefe;
}

.operacion-conciliada {
    background-color: #f0f9ff;
}

.estado-pendiente {
    color: #f59e0b;
    font-weight: bold;
}

.estado-conciliada {
    color: #00D9C5;
    font-weight: bold;
}

/* Responsive para la sección header */
@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .section-header h3 {
        text-align: center;
    }
}