.offline-apk-status-bar {
    position: sticky;
    top: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.offline-apk-status-bar__text {
    flex: 1;
    min-width: 0;
}

.offline-apk-status-bar__diag-btn {
    flex-shrink: 0;
    border: 1px solid currentColor;
    background: rgba(255, 255, 255, 0.35);
    color: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    cursor: pointer;
}

.offline-apk-status-bar--online {
    display: none;
}

.offline-apk-status-bar--offline {
    background: #fef3c7;
    color: #92400e;
}

.offline-apk-status-bar--pending {
    background: #dbeafe;
    color: #1e40af;
}

.offline-apk-status-bar--syncing {
    background: #e0e7ff;
    color: #3730a3;
}

.offline-apk-status-bar--error {
    background: #fee2e2;
    color: #991b1b;
}

.mis-pedidos-estado--pendiente_envio {
    background: #dbeafe;
    color: #1e40af;
}

.mis-pedidos-estado--sync_error {
    background: #fee2e2;
    color: #991b1b;
}

.mis-pedidos-offline-msg {
    margin: 10px 0 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 0.875rem;
    line-height: 1.4;
}

.mis-pedidos-offline-msg--error {
    background: #fef2f2;
    color: #991b1b;
}

/* Panel diagnóstico offline APK */
.offline-apk-diag-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 12px;
}

.offline-apk-diag-panel {
    width: min(520px, 100%);
    max-height: min(88vh, 720px);
    overflow: auto;
    background: #fff;
    border-radius: 16px 16px 12px 12px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
    padding: 16px;
}

.offline-apk-diag-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.offline-apk-diag-head h2 {
    margin: 0;
    font-size: 1.1rem;
    color: #0f172a;
}

.offline-apk-diag-close {
    border: none;
    background: #f1f5f9;
    color: #334155;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    font-size: 1.25rem;
    cursor: pointer;
}

.offline-apk-diag-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
}

.offline-apk-diag-stat {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px;
}

.offline-apk-diag-stat strong {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
    margin-bottom: 4px;
}

.offline-apk-diag-stat span {
    font-size: 0.9rem;
    color: #0f172a;
    word-break: break-word;
}

.offline-apk-diag-section {
    margin-bottom: 14px;
}

.offline-apk-diag-section h3 {
    margin: 0 0 8px;
    font-size: 0.9rem;
    color: #334155;
}

.offline-apk-diag-order,
.offline-apk-diag-log {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: #334155;
}

.offline-apk-diag-order strong,
.offline-apk-diag-log strong {
    color: #0f172a;
}

.offline-apk-diag-empty {
    color: #64748b;
    font-size: 0.85rem;
    margin: 0;
}

.offline-apk-diag-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.offline-apk-diag-actions .btn {
    flex: 1;
    min-width: 120px;
}
