/* status.css — estils específics de la pàgina d'estat de la xarxa */

.status-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 1.5rem 5rem;
}

.status-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    margin-bottom: 0.5rem;
}

.status-subtitle {
    opacity: 0.8;
    max-width: 640px;
    margin-bottom: 1.75rem;
    line-height: 1.5;
}

/* Banner d'alerta d'error de connexió (sense emoticones) */
.status-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.75rem;
    font-size: 0.95rem;
    line-height: 1.4;
    font-weight: 600;
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid #e74c3c;
    color: #ff6b6b;
    box-shadow: 0 0 12px rgba(231, 76, 60, 0.3);
}

.status-alert.hidden {
    display: none;
}

.status-alert-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Llegenda d'estats */
.status-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.status-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.status-dot--activa      { background: #2ecc71; box-shadow: 0 0 6px rgba(46, 204, 113, 0.7); }
.status-dot--sense_dades { background: #f39c12; box-shadow: 0 0 6px rgba(243, 156, 18, 0.7); }
.status-dot--inactiva    { background: #e74c3c; box-shadow: 0 0 6px rgba(231, 76, 60, 0.7); }

/* Barra de cerca i accions */
.status-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.status-search-wrap {
    flex: 1 1 320px;
}

.status-search {
    width: 100%;
    padding: 0.65rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: inherit;
    font-family: inherit;
    font-size: 0.95rem;
}

.status-search:focus {
    outline: none;
    border-color: #7FE5B8;
    box-shadow: 0 0 0 2px rgba(127, 229, 184, 0.25);
}

.status-toolbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    opacity: 0.85;
}

.status-refresh-btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: inherit;
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.status-refresh-btn:hover {
    background: rgba(127, 229, 184, 0.12);
    border-color: #7FE5B8;
}

/* Taula */
.status-table-wrapper {
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.status-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 720px;
}

.status-table thead th {
    text-align: left;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.06);
    font-weight: 600;
    white-space: nowrap;
    position: sticky;
    top: 0;
}

.status-table tbody td {
    padding: 0.7rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
}

.status-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

.status-loading,
.status-empty {
    text-align: center;
    padding: 2rem 1rem;
    opacity: 0.75;
    white-space: normal;
}

/* Badges d'estat */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-badge--activa {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
}

.status-badge--sense_dades {
    background: rgba(243, 156, 18, 0.15);
    color: #f39c12;
}

.status-badge--inactiva {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
}

.status-updated {
    margin-top: 1rem;
    font-size: 0.8rem;
    opacity: 0.6;
}

@media (max-width: 640px) {
    .status-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .status-toolbar-right {
        justify-content: space-between;
    }
}