﻿@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;700&display=swap');
@import url("open-iconic/font/css/open-iconic-bootstrap.min.css");

html,
body {
    font-family: "Montserrat", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: #f8fafc;
}

:root {
    --rz-primary: #003366;
    --rz-primary-light: #004080;
    --rz-primary-lighter: #0055aa;
    --rz-primary-dark: #002855;
    --rz-primary-darker: #001f40;
    --header-bg: rgb(15, 12, 38);
    --header-border: #d1d5db;
    --header-text: #1e293b;
    --rz-text-font-family: "Montserrat", "Source Sans Pro", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif
}

.app-header {
    background-color: var(--header-bg) !important;
    border-bottom: 1px solid var(--header-border) !important;
    color: var(--header-text) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

.header-profile {
    background-color: transparent !important;
    border-bottom: 0px !important;
    display: flex;
    justify-content: end;
}

.header-profile-text {
    color: var(--rz-sidebar-toggle-hover-color);
}

.header-profile-icon {
    color: var(--rz-sidebar-toggle-hover-color);
    margin-left: 1rem;
    cursor: pointer;
}

    .header-profile-icon:hover {
        color: #0a58ca;
    }

.sidebar-custom {
    background-color: #003366 !important;
    color: white !important;
    transition: width 0.3s ease;
    display: flex !important;
    flex-direction: column !important;
}

.sidebar-title {
    color: white;
    font-size: 1.1rem;
}

.sidebar {
    background-color: transparent;
    color: white;
    border-color: transparent;
    vertical-align: middle;
}

    .sidebar:hover {
        background-color: transparent !important;
    }

.sidebar-menu {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    overflow-y: auto !important;
}

.menu-items {
    flex: 1 !important;
    overflow-y: auto !important;
}

.sidebar-footer {
    padding: 16px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    margin-top: auto !important;
}

.logout-button {
    width: 100% !important;
    background-color: transparent !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    padding: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background-color 0.2s !important;
}

    .logout-button:hover {
        background-color: rgba(255, 255, 255, 0.05) !important;
    }

/* Estilos para las notificaciones */
.notification-badge {
    position: absolute !important;
    top: -5px !important;
    right: -5px !important;
    border-radius: 9999px !important;
    padding: 0.25rem 0.5rem !important;
    font-size: 0.75rem !important;
}

.menu-badge {
    position: absolute !important;
    top: 8px !important;
    right: 16px !important;
    border-radius: 9999px !important;
    padding: 0.25rem 0.5rem !important;
    font-size: 0.75rem !important;
}

/* Estilos para las tarjetas */
.card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    margin-bottom: 1rem;
}

/* Estilos para los estados */
.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.status-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.status-info {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.status-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Estilos para la línea de tiempo */
.timeline {
    position: relative;
    padding-left: 2rem;
}

    .timeline::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 2px;
        background-color: #e5e7eb;
    }

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline-dot {
    position: absolute;
    left: -2.25rem;
    top: 0.25rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
}

.timeline-dot-completed {
    background-color: #10b981;
}

.timeline-dot-current {
    background-color: #3b82f6;
}

.timeline-dot-pending {
    background-color: #9ca3af;
}

/* Personalización de componentes Radzen */
.rz-button.rz-button-md.rz-variant-text.rz-primary {
    color: var(--rz-primary);
}

.rz-badge {
    border-radius: 9999px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Estilos específicos para el panel menu */
.rz-panel-menu {
    background-color: transparent !important;
    color: white !important;
}

    .rz-panel-menu .rz-navigation-item-link {
        color: white !important;
    }

    .rz-panel-menu .rz-navigation-item-icon {
        color: white !important;
    }

    .rz-panel-menu .rz-navigation-item-wrapper:hover {
        background-color: rgba(255, 255, 255, 0.1) !important;
    }

    .rz-panel-menu .rz-navigation-item-wrapper-active {
        background-color: rgba(255, 255, 255, 0.2) !important;
    }

        .rz-panel-menu .rz-navigation-item-wrapper-active .rz-navigation-item-link {
            color: white !important;
            font-weight: bold !important;
        }

/* Ajustes para el modo colapsado */
.rz-sidebar:not(.rz-sidebar-expanded) .rz-panel-menu .rz-navigation-item-text {
    display: none !important;
}

.rz-sidebar:not(.rz-sidebar-expanded) .rz-panel-menu .rz-navigation-item-icon {
    margin-right: 0 !important;
}

.rz-sidebar:not(.rz-sidebar-expanded) .rz-panel-menu .rz-navigation-item {
    text-align: center !important;
}

.rz-sidebar:not(.rz-sidebar-expanded) .rz-panel-menu .rz-navigation-item-wrapper {
    padding: 0.5rem 0 !important;
}

/* Media queries para dispositivos móviles */
@media (max-width: 767.98px) {
    .rz-sidebar {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
    }

        .rz-sidebar:not(.rz-sidebar-expanded) {
            transform: translateX(-100%) !important;
        }

    .user-profile-info {
        display: none !important;
    }
}

/* Estilos para el error UI de Blazor */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* Estilos para el sidebar y su contenido */
.rz-sidebar {
    display: flex !important;
    flex-direction: column !important;
}

.rz-sidebar-content {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

/* Estilos para el loader */
.loader {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--rz-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -20px;
    margin-left: -20px;
}

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

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

/* Estilos para la página de documentos */
.document-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.document-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

    .document-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

.document-header {
    display: flex;
    align-items: center;
    padding: 16px;
    gap: 16px;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.document-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    flex-shrink: 0;
}

.document-title {
    flex-grow: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .document-title h3 {
        margin: 0;
        font-size: 16px;
        font-weight: 500;
    }

.document-status {
    margin-left: auto;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-available {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.status-pending {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.document-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.document-info-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.document-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.document-business {
    display: flex;
    align-items: center;
    gap: 4px;
}

.business-label {
    font-weight: 500;
    color: #4b5563;
    font-size: 14px;
}

.business-name {
    font-size: 16px;
    font-weight: 500;
    color: #1f2937;
    margin-top: 4px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #e5e7eb;
}

.document-details {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.detail-item {
    font-size: 14px;
    color: #4b5563;
}

.detail-label {
    font-weight: 500;
    color: #1f2937;
}

.document-actions {
    display: flex;
    gap: 8px;
    padding: 16px;
    border-top: 1px solid #e2e8f0;
    background-color: #f8fafc;
}

.action-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

/* Estilos para las pestañas */
.rz-tabview-nav {
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.rz-tabview-selected-item {
    background-color: white;
    border-bottom: 2px solid #3b82f6;
    color: #3b82f6;
    font-weight: 500;
}

.rz-tabview-nav-item:not(.rz-tabview-selected-item):hover {
    background-color: #f1f5f9;
}

/* Estilos para los filtros */
.filter-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 16px;
    margin-bottom: 24px;
}

.search-box {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #3b82f6;
}

.search-input {
    width: 100%;
    padding-left: 40px;
    border-color: #dbeafe;
    border-radius: 8px;
}

.filter-dropdown {
    width: 100%;
    border-color: #e0e7ff;
    border-radius: 8px;
}

/* Estilos para la página de facturación */
.invoice-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

    .invoice-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

.invoice-info {
    display: flex;
    gap: 16px;
}

.invoice-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    flex-shrink: 0;
}

.invoice-details {
    flex-grow: 1;
}

.invoice-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.invoice-number {
    background-color: #f3f4f6;
    border-radius: 4px;
    padding: 2px 8px;
}

.invoice-business {
    margin-top: 4px;
    margin-bottom: 8px;
}

.invoice-meta {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.meta-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.invoice-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    height: 100%;
    justify-content: space-between;
}

.action-buttons {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

/* Estilos para los badges de estado de factura */
.invoice-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 8px;
    text-align: center;
    min-width: 80px;
    line-height: 1;
}

.invoice-status-paid {
    background-color: #34d399;
    color: white;
}

.invoice-status-pending {
    background-color: #fbbf24;
    color: white;
}

/* Estilos para la página de seguimiento */
.tracking-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.tracking-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.tracking-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tracking-selector {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tracking-map-container {
    position: relative;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tracking-map {
    width: 100%;
    height: 100%;
    border: none;
}

.tracking-map-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f8fafc;
}

.tracking-info-container {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.tracking-details {
    flex: 1;
    min-width: 300px;
}

.tracking-timeline {
    flex: 1;
    min-width: 300px;
}

.detail-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.detail-card-header {
    display: flex;
    align-items: center;
    padding: 16px;
    gap: 12px;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.detail-card-title {
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

.detail-card-content {
    padding: 16px;
}

.detail-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 14px;
    color: #6b7280;
}

.detail-value {
    font-size: 16px;
    font-weight: 500;
    color: #1f2937;
}

.shipment-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
}

.status-in-transit {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.status-delivered {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.status-delayed {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.timeline-container {
    padding: 16px;
}

.timeline {
    position: relative;
    padding-left: 32px;
}

    .timeline::before {
        content: "";
        position: absolute;
        left: 7px;
        top: 0;
        bottom: 0;
        width: 2px;
        background-color: #e5e7eb;
    }

.timeline-item {
    position: relative;
    padding-bottom: 24px;
}

    .timeline-item:last-child {
        padding-bottom: 0;
    }

.timeline-dot {
    position: absolute;
    left: -32px;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: white;
    border: 2px solid #e5e7eb;
    z-index: 1;
}

.timeline-dot-completed {
    background-color: #10b981;
    border-color: #10b981;
}

.timeline-dot-current {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.timeline-dot-pending {
    background-color: white;
    border-color: #9ca3af;
}

.timeline-content {
    background-color: #f9fafb;
    border-radius: 8px;
    padding: 12px 16px;
}

.timeline-date {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
}

.timeline-title {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 4px;
}

.timeline-description {
    font-size: 14px;
    color: #4b5563;
}

.timeline-location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #6b7280;
    margin-top: 8px;
}

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

    .tracking-selector {
        width: 100%;
    }

    .tracking-map-container {
        height: 300px;
    }

    .tracking-info-container {
        flex-direction: column;
    }
}


.filtros-card {
    background: #f9fafb;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #e5e7eb;
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    margin-bottom: 2rem;
}

.filtros-tabs .rz-tabview-nav {
    background: transparent;
    border-bottom: 2px solid #e5e7eb;
}

.filtros-tabs .rz-tabview-nav-item {
    font-weight: 500;
    color: #64748b;
    border-radius: 8px 8px 0 0;
    margin-right: 4px;
    transition: background 0.2s, color 0.2s;
}

.filtros-tabs .rz-tabview-selected-item {
    background: #fff;
    color: #003366;
    border-bottom: 2px solid #003366;
    font-weight: 600;
}

.filtros-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

    .filtros-header .icon {
        font-size: 1.5rem;
        color: #003366;
    }

    .filtros-header h5 {
        margin: 0;
        font-size: 1.1rem;
        font-weight: 600;
        color: #1e293b;
    }

    .filtros-header .info {
        margin-left: auto;
        color: #64748b;
        font-size: 0.95rem;
        display: flex;
        align-items: center;
        gap: 4px;
    }

.detalle-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    text-align: center;
    padding: 2rem 1rem;
    color: #64748b;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px dashed #cbd5e1;
}

.welcome-banner-img {
    position: relative;
    background-image: url('/img/puerto.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    margin-bottom: 2rem;
    min-height: 220px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-banner-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, rgba(0,91,170,0.85) 0%, rgba(60,141,188,0.7) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    width: 100%;
    height: 100%;
    text-align: center;
    z-index: 1;
}

    .welcome-banner-overlay h1 {
        font-size: 2.5rem;
        margin-bottom: 0.5rem;
        font-weight: bold;
        letter-spacing: 2px;
        color: #fff;
        cursor: default;
    }

    .welcome-banner-overlay p {
        font-size: 1.25rem;
        margin: 0;
        cursor: default;
    }

.iframe-container {
    position: absolute;
    width: 95%;
    height: 95%;
    padding-bottom: 52%;
}

    .iframe-container iframe {
        position: inherit;
        width: 100%;
        height: 100%;
        border: 0;
    }