:root {

    --color-primary: #007bff;

    --color-text: #ecf0f1;

    --color-bg: transparent;

    --color-bg-card: #30394b;

    --color-border: #475569;

    --color-shadow: rgba(0, 0, 0, 0.3);

    --color-status-active: #10b981;

    --color-status-inactive: #ef4444;

    --font-family: 'Inter', sans-serif, Arial;

}



html {

    background: #3f3f42;

    background: linear-gradient(182deg, rgba(63, 63, 66, 1) 0%, rgba(25, 25, 84, 1) 40%, rgba(67, 72, 74, 1) 100%);

    background-size: cover;

}



body {

    background-color: var(--color-bg);

    color: var(--color-text);

    font-family: var(--font-family);

    margin: 0;

    padding: 0;

    line-height: 1.6;

}



.hidden {

    display: none;

}



.min-h-screen {

    min-height: 100vh;

}



.container {

    max-width: 1200px;

    margin: 0 auto;

    padding: 0 1.5rem;

}



.text-center {

    text-align: center;

}



.mb-12 {

    margin-bottom: 3rem;

}



header {

    background-color: var(--color-bg-card);

    border-bottom: 1px solid var(--color-border);

    padding: 1rem 0;

    box-shadow: 0 1px 3px var(--color-shadow);

    margin-bottom: 2rem;

}



header .container {

    display: flex;

    justify-content: space-between;

    align-items: center;

}



.logo-container {

    display: flex;

    align-items: center;

    gap: 0.5rem;

}



.logo {

    height: 50px;

    margin: 0 10px;

}



.main-title {

    font-size: 2.5rem;

    font-weight: 700;

    color: var(--color-primary);

    margin-bottom: 0.5rem;

}



.search-container {

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 1.5rem;

    margin-bottom: 2rem;

    padding: 1rem;

    background-color: var(--color-bg-card);

    border-radius: 8px;

    box-shadow: 0 2px 5px var(--color-shadow);

}



.search-input-wrapper {

    flex-grow: 1;

    position: relative;

    display: flex;

    align-items: center;

}



.search-input-wrapper .material-icons {

    position: absolute;

    left: 10px;

    color: #94a3b8;

}



#scanSearch {

    width: 100%;

    padding: 0.75rem 0.75rem 0.75rem 2.5rem;

    border: 1px solid var(--color-border);

    border-radius: 4px;

    font-size: 1rem;

    background-color: transparent;

    color: var(--color-text);

    transition: border-color 0.2s, box-shadow 0.2s;

}



#scanSearch:focus {

    outline: none;

    border-color: var(--color-primary);

    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);

}



#showAllBtn {

    background-color: var(--color-primary);

    color: white;

    border: none;

    padding: 0.75rem 1.25rem;

    border-radius: 4px;

    cursor: pointer;

    font-weight: 500;

    display: flex;

    align-items: center;

    gap: 0.5rem;

    transition: background-color 0.2s;

    white-space: nowrap;

}



#showAllBtn:hover {

    background-color: #0056b3;

}



.card-container {

    display: grid;

    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));

    gap: 1.5rem;

    padding-bottom: 4rem;

}



.initial-message,

.card-container > p:not(.network-card) {

    grid-column: 1 / -1;

    text-align: center;

    padding: 3rem;

    font-size: 1.2rem;

    color: #94a3b8;

    background-color: var(--color-bg);

    border-radius: 8px;

    border: 2px dashed var(--color-border);

}



.network-card {

    background-color: var(--color-bg-card);

    border: 1px solid var(--color-border);

    border-radius: 8px;

    padding: 1.5rem;

    box-shadow: 0 4px 10px var(--color-shadow);

    transition: transform 0.2s, box-shadow 0.2s;

    display: flex;

    flex-direction: column;

}



.network-card:hover {

    transform: translateY(-5px);

    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.4);

}



.card-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    border-bottom: 1px solid var(--color-border);

    padding-bottom: 0.75rem;

    margin-bottom: 1rem;

}



.card-header h3 {

    font-size: 1.5rem;

    font-weight: 700;

    color: var(--color-primary);

    margin: 0;

}



.status-dot {

    width: 12px;

    height: 12px;

    border-radius: 50%;

    display: inline-block;

    flex-shrink: 0;

}



.status-dot.active {

    background-color: var(--color-status-active);

    box-shadow: 0 0 5px var(--color-status-active);

}



.status-dot.inactive {

    background-color: var(--color-status-inactive);

    box-shadow: 0 0 5px var(--color-status-inactive);

}



.card-body {

    flex-grow: 1;

    display: flex;

    flex-direction: column;

    gap: 0.75rem;

    margin-bottom: 1rem;

}



.card-body p {

    margin: 0;

    display: flex;

    justify-content: space-between;

    font-size: 0.95rem;

    line-height: 1.4;

}



.card-body strong {

    font-weight: 600;

    color: var(--color-text);

    flex-shrink: 0;

    margin-right: 1rem;

}



.card-body span {

    font-weight: 400;

    text-align: right;

    color: #aebfd1;

}



.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #94a3b8;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-border);
    gap: 0.5rem;
}

.card-footer-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}


.history-btn {
    background-color: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.8rem;
    transition: background-color 0.2s, color 0.2s;
}

.history-btn:hover {
    background-color: var(--color-primary);
    color: white;
}


.card-footer .material-icons {

    font-size: 1rem;

}



.port-service-wrapper {

    display: flex;

    flex-wrap: wrap;

    justify-content: flex-end;

    gap: 4px;

    flex-basis: 70%;

}



.port-service-tag {

    background-color: #475569;

    color: #e0e6ed;

    padding: 2px 8px;

    border-radius: 4px;

    font-size: 0.85rem;

    white-space: nowrap;

}



.status-guide-container {

    margin-bottom: 1rem;

}



.status-guide {

    display: flex;

    gap: 1.5rem;

    padding: 0.5rem 1rem;

    background-color: var(--color-bg-card);

    border-radius: 8px;

    box-shadow: 0 1px 3px var(--color-shadow);

    max-width: fit-content;

    border: 1px solid var(--color-border);

}



.guide-item {

    display: flex;

    align-items: center;

    gap: 0.5rem;

    font-size: 0.85rem;

}



@media (max-width: 768px) {

    .main-title {

        font-size: 2rem;

    }

   

    .search-container {

        flex-direction: column;

        gap: 1rem;

        padding: 1rem;

    }



    .search-input-wrapper {

        width: 100%;

    }



    #showAllBtn {

        width: 100%;

        justify-content: center;

    }



    .card-container {

        grid-template-columns: 1fr;

        padding: 0 1rem;

    }



    .network-card {

        padding: 1.2rem;

    }



    .card-header h3 {

        font-size: 1.3rem;

    }

}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: var(--color-bg-card); /* antes era var(--card-dark) */
    color: var(--color-text);               /* antes era var(--text-dark) */
    padding: 30px;
    border-radius: 10px;
    width: 80%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text); /* antes era var(--text-dark) */
}

.history-details {
    padding-right: 10px; /* Evita que el scroll se pegue al borde */
}

.history-card {
    background-color: #2c3e50;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--color-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.history-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.history-card h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--color-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.history-card p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: #bdc3c7;
    display: flex;
    justify-content: space-between;
}

.history-card p strong {
    color: #ecf0f1;
    font-weight: 500;
}

.history-date {
    margin-top: 1rem;
    font-size: 0.8rem !important;
    color: #95a5a6 !important;
    text-align: right;
}

.hidden {
    display: none !important;
}


.header-status-wrapper {
    display: flex;
    align-items: center;
    gap: 8px; /* Espacio entre el ícono y el punto */
}

.change-alert-icon {
    font-size: 1.2rem;
    color: #ffc107; /* Color amarillo/ámbar, ideal para una "advertencia" de cambio, no "crítica" */
    animation: rotate-change 1.5s infinite linear; /* Agregamos una pequeña animación para llamar la atención */
}

/* Animación para el icono de cambio */
@keyframes rotate-change {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}