.eb-wrapper {
    max-width: 960px;
    margin: 24px auto;
    font-family: inherit;
}

/* ── Header ── */
.eb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
    flex-wrap: wrap;
    gap: 12px;
}

.eb-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
}

.eb-subtitle {
    color: #6b7280;
    font-size: .9rem;
    margin: 0 0 24px;
}

.eb-refresh-btn {
    background: #1a1a2e;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.eb-refresh-btn:hover { background: #2d2d4e; }
.eb-refresh-btn.spinning #eb-refresh-icon { display: inline-block; animation: eb-spin .7s linear infinite; }

@keyframes eb-spin { to { transform: rotate(360deg); } }

/* ── Mensaje ── */
.eb-msg {
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: .9rem;
}
.eb-msg.loading { background: #fef9c3; color: #854d0e; border: 1px solid #fde047; }
.eb-msg.error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ── Grid ── */
.eb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

/* ── Tarjeta ── */
.eb-card {
    border-radius: 14px;
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
    transition: transform .2s, box-shadow .2s;
    position: relative;
    overflow: hidden;
}

.eb-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,.13);
}

/* Colores por línea */
.eb-card.amarilla { background: linear-gradient(135deg, #fef3c7, #fde68a); border-left: 5px solid #f59e0b; }
.eb-card.azul     { background: linear-gradient(135deg, #dbeafe, #bfdbfe); border-left: 5px solid #3b82f6; }
.eb-card.verde    { background: linear-gradient(135deg, #d1fae5, #a7f3d0); border-left: 5px solid #10b981; }
.eb-card.roja     { background: linear-gradient(135deg, #fee2e2, #fecaca); border-left: 5px solid #ef4444; }
.eb-card.default  { background: linear-gradient(135deg, #f3f4f6, #e5e7eb); border-left: 5px solid #9ca3af; }

/* ── Nombre línea ── */
.eb-card-name {
    font-size: .95rem;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.2;
}

/* ── Badge estado ── */
.eb-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.eb-badge.en-ruta {
    background: rgba(16,185,129,.15);
    color: #065f46;
}

.eb-badge.fuera-ruta {
    background: rgba(239,68,68,.15);
    color: #991b1b;
}

.eb-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.eb-badge.en-ruta .eb-badge-dot    { background: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,.3); }
.eb-badge.fuera-ruta .eb-badge-dot { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.3); }

/* ── Motivo ── */
.eb-motivo {
    font-size: .78rem;
    color: #6b7280;
    font-style: italic;
}

.eb-horario {
    font-size: .78rem;
    color: #991b1b;
    font-weight: 600;
    margin: 0;
}

/* ── Actualizado ── */
.eb-updated {
    text-align: right;
    font-size: .78rem;
    color: #9ca3af;
    margin-top: 16px;
}

/* ── Resumen ── */
.eb-summary {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.eb-summary-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 20px;
    text-align: center;
    flex: 1;
    min-width: 120px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

.eb-summary-num {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
}

.eb-summary-num.verde { color: #10b981; }
.eb-summary-num.rojo  { color: #ef4444; }
.eb-summary-num.total { color: #1a1a2e; }

.eb-summary-label {
    font-size: .78rem;
    color: #6b7280;
    margin-top: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .eb-grid {
        grid-template-columns: 1fr 1fr;
    }
}
